Method and device for determining routing path

By building an inter-node communication cost matrix and updating the target triple, the flexibility and resource consumption problems of routing path determination in the prior art are solved, and efficient and stable data transmission is achieved when network changes are achieved.

CN119071216APending Publication Date: 2024-12-03VISIONVERA INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410992659.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-23
Publication Date
2024-12-03

AI Technical Summary

Technical Problem

The existing routing path determination technology lacks flexibility when facing changes in network topology, dynamic routing protocols are complex in computing and high resource consumption, and hybrid routing protocol management and maintenance costs are high, making it difficult to achieve high efficiency in large-scale networks. Stable data transmission.

Method used

By building an inter-node communication cost matrix, obtain the target triple with the highest priority in the routing path queue, calculate the communication cost from the initial node to the adjacent node, and update the target triple until the target node is the destination node, and determine the optimal one. Routing path.

Benefits of technology

It realizes the rapid determination of the optimal routing path when network changes, improves data transmission efficiency and stability, and reduces resource consumption and management costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119071216A_ABST
    Figure CN119071216A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a method and device for determining a routing path, and the method comprises the steps: obtaining a target triple with the highest priority in a routing path queue according to a communication cost matrix of M nodes, the communication cost matrix is a matrix composed of the communication cost between every two nodes, the routing path queue comprises at least one triple, and each triple comprises communication cost of a current path from an initial node to a current node, a serial number of the current node and the current path; under the condition that the current node is a non-destination node, calculating a communication cost from the initial node to an adjacent node of the current node, and updating a current path of the target triple according to the adjacent node; and circulating the above steps until the current node in the target triple is a destination node, and determining the current path in the target triple as a target routing path from the initial node to the destination node.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of network communication technology, and in particular to a method and device for determining a routing path. Background Art

[0002] In the field of network communications, routing path calculation is a key link in achieving data packet forwarding. Traditional technologies for determining routing forwarding paths mainly include the following: static routing protocols, dynamic routing protocols, and hybrid routing protocols. However, static routing protocols are not adaptable to changes in network topology and cannot adapt to changes in network conditions. In addition, in large-scale networks, manually configuring static routing paths is cumbersome and error-prone. Dynamic routing protocols need to calculate the optimal path through routing algorithms, which consumes more computing resources. In addition, when the network topology changes, dynamic routing protocols require a certain amount of time to converge, and temporary routing instability may occur during this period. Hybrid routing protocols require administrators to reasonably configure static and dynamic routing paths, which requires a high level of technical skills and experience, and has high management and maintenance costs. Summary of the invention

[0003] In view of the above problems, an embodiment of the present invention proposes a method and device for determining a routing path that overcomes the above problems or at least partially solves the above problems.

[0004] In order to solve the above problem, an embodiment of the present invention discloses a method for determining a routing path, the method comprising:

[0005] According to the communication cost matrix of the M nodes, the target triplet with the highest priority in the routing path queue is obtained, wherein the communication cost matrix is ​​a matrix composed of the communication costs between every two nodes, and the routing path queue includes at least one triplet, each of which includes the communication cost of the current path from the initial node to the current node, the sequence number of the current node, and the current path;

[0006] In the case where the current node is not a destination node, calculating the communication cost from the initial node to the adjacent node of the current node, and updating the target triplet according to the communication cost from the initial node to the adjacent node and the sequence number of the adjacent node;

[0007] The above steps are repeated until the current node in the target triplet is the destination node, and the current path in the target triplet is determined as the target routing path from the initial node to the destination node.

[0008] Optionally, when the current node is not a destination node, calculating the communication cost from the initial node to the adjacent node of the current node, and updating the target triplet according to the communication cost from the initial node to the adjacent node and the sequence number of the adjacent node, includes:

[0009] In the case where the current node is not a destination node, determining whether an adjacent node of the current node belongs to one of the nodes in the current path of the target triple;

[0010] In the case where the adjacent node does not belong to one of the nodes in the current path of the target triple, calculating the communication cost from the initial node to the adjacent node;

[0011] The target triplet is updated according to the communication cost from the initial node to the adjacent node and the sequence number of the adjacent node.

[0012] Optionally, updating the target triplet according to the communication cost from the initial node to the adjacent node and the sequence number of the adjacent node includes:

[0013] Updating the communication cost from the initial node to the current node in the target triplet to the communication cost from the initial node to the adjacent node;

[0014] Updating the sequence number of the current node in the target triplet to the sequence number of the adjacent node;

[0015] The adjacent node is used as the next hop node of the current node to update the current path in the target triplet.

[0016] Optionally, when the adjacent node does not belong to one of the nodes in the current path of the target triplet, calculating the communication cost from the initial node to the adjacent node includes:

[0017] In the case where the adjacent node does not belong to one of the nodes in the current path of the target triplet, obtaining a communication cost from the initial node to the current node, a communication cost from the current node to the adjacent node, and a current load value of the adjacent node;

[0018] The communication cost from the initial node to the adjacent node is calculated according to the communication cost from the initial node to the current node, the communication cost from the current node to the adjacent node, and the current load value of the adjacent node.

[0019] Optionally, the communication cost from the initial node to the adjacent node is calculated by the following formula:

[0020] new_cost=current_cost+M[current_node][neighbor]+α*L[neighbor]

[0021] Wherein, new_cost represents the communication cost from the initial node to the adjacent node;

[0022] current_cost represents the communication cost from the initial node to the current node;

[0023] M[current_node][neighbor] represents the communication cost from the current node to the neighboring node;

[0024] α represents the load balancing factor;

[0025] L[neighbor] represents the current load value of the neighboring node.

[0026] Optionally, acquiring the target triplet with the highest priority in the routing path queue according to the communication cost matrix of the M nodes includes:

[0027] Obtain a network topology diagram of M nodes and determine the communication cost between every two nodes;

[0028] Constructing a communication cost matrix of the M nodes according to the network topology diagram and the communication cost between every two nodes;

[0029] According to the communication cost matrix of the M nodes, obtaining the communication cost of the current path of each triplet in the routing path queue;

[0030] The triplet with the lowest communication cost of the current path is determined as the target triplet with the highest priority in the routing path queue.

[0031] Optionally, the determining of the communication cost between every two nodes includes at least one of the following:

[0032] Determine the communication cost based on the physical distance between two nodes;

[0033] Determine the communication cost based on the link quality between two nodes;

[0034] Determine the communication cost based on the network congestion level of the two nodes;

[0035] The communication cost is determined based on the historical communication data between the two nodes.

[0036] The embodiment of the present invention further discloses a device for determining a routing path, the device comprising:

[0037] An acquisition module is used to acquire the target triplet with the highest priority in the routing path queue according to the communication cost matrix of the M nodes, wherein the communication cost matrix is ​​a matrix composed of the communication cost between every two nodes, and the routing path queue includes at least one triplet, each of which includes the communication cost of the current path from the initial node to the current node, the sequence number of the current node, and the current path;

[0038] A calculation module, used for calculating the communication cost from the initial node to the adjacent node of the current node when the current node is not a destination node, and updating the target triplet according to the communication cost from the initial node to the adjacent node and the sequence number of the adjacent node;

[0039] The determination module is used to loop the above steps until the current node in the target triplet is the destination node, and determine the current path in the target triplet as the target routing path.

[0040] The embodiment of the present invention further discloses an electronic device, including:

[0041] one or more processors; and

[0042] One or more machine-readable media having instructions stored thereon, when executed by the one or more processors, enable the electronic device to perform the method for determining a routing path as described above.

[0043] The embodiment of the present invention further discloses a computer-readable storage medium, wherein a computer program stored in the storage medium enables a processor to execute the method for determining a routing path as described above.

[0044] The embodiments of the present invention include the following advantages:

[0045] The embodiment of the present invention obtains the target triplet with the highest priority in the routing path queue according to the communication cost matrix composed of the communication cost between every two nodes in the M nodes, wherein the routing path queue includes at least one triplet, each triplet includes the communication cost of the current path from the initial node to the current node, the sequence number of the current node and the current path, that is, the communication cost matrix can accurately describe the direct connection relationship between each node in the network and the corresponding communication cost of factors such as distance and bandwidth, so as to determine the current path with the minimum communication cost (that is, the highest priority), which provides a reliable basis for the final routing path calculation.

[0046] If the current node is not a destination node, the total communication cost from the initial node to the adjacent nodes of the current node is continued to be calculated through the target triplet, and the adjacent nodes are used as the next hop nodes of the current node to update the current path of the target triplet, and the above steps are repeated until the current node in the target triplet is a destination node, and the current path in the target triplet is determined as the target routing path from the initial node to the destination node. Thus, by evaluating the quality of the path through the communication cost, the optimal target routing path can be quickly determined, and the efficiency and stability of data transmission can be improved. Moreover, when the network status changes, only the communication cost matrix needs to be updated, and the target routing path is determined by the updated communication cost matrix, which can not only reduce resource consumption, but also reduce the cost of management and maintenance. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Figure 1 is a flowchart of a method for determining a routing path provided by an embodiment of the present invention;

[0048] Figure 2 It is a network topology diagram without adding communication cost provided by an embodiment of the present invention;

[0049] Figure 3 is the original matrix without adding communication cost provided by the embodiment of the present invention;

[0050] Figure 4 A network topology diagram for adding communication cost provided by an embodiment of the present invention;

[0051] Figure 5 is a communication cost matrix for adding communication cost provided by an embodiment of the present invention;

[0052] Figure 6 It is a structural block diagram of a device for determining a routing path provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0053] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0054] At present, the method of determining the routing forwarding path through static routing protocols is manually configured by the administrator, which does not require complex calculation and negotiation processes, and the routing path is fixed, and will not change due to changes in network topology, and has high stability. However, it lacks flexibility and is not suitable for large networks. The method of determining the routing forwarding path through dynamic routing protocols is to automatically calculate and adjust the routing path according to the network status, which reduces the manual configuration of the administrator, and can adjust the routing path according to real-time conditions such as network topology and traffic load. It has strong adaptability, but the calculation complexity is high and the convergence process may lead to unstable routing. The method of determining the routing forwarding path through hybrid routing protocols is to comprehensively utilize the advantages of static and dynamic routing, that is, the static routing path is used for the stable network part, and the dynamic routing path is used to flexibly adapt to the changing network part. It can adjust part of the routing path as needed while ensuring the stability of the network, which improves the performance and flexibility of the network, but the configuration complexity is high, and the management and maintenance costs are high.

[0055] In summary, different routing forwarding path technologies have their own advantages and disadvantages. Static routing protocols are simple and easy to implement but lack flexibility, dynamic routing protocols are automated and adaptable but have high computational complexity, and hybrid routing protocols combine the advantages of both but have high configuration and management costs. In practical applications, multiple factors need to be considered comprehensively to select the most suitable routing forwarding path.

[0056] Therefore, the embodiment of the present invention accurately describes the direct connection relationship between each node in the network through the communication cost matrix of multiple nodes, provides a reliable basis for routing path calculation, introduces a communication cost calculation method based on the communication cost matrix, evaluates the quality of the path through the communication cost, can quickly determine the optimal target routing path, and improves the efficiency and stability of data transmission. In addition, when the network status changes, only the communication cost matrix needs to be updated, and the target routing path is determined by the updated communication cost matrix, which can not only reduce resource consumption, but also reduce the cost of management and maintenance.

[0057] Specifically, Figure 1 As shown, an embodiment of the present invention provides a method for determining a routing path, and the method specifically includes:

[0058] Step 101, based on the communication cost matrix of multiple nodes, obtain the target triplet with the highest priority in the routing path queue, wherein the communication cost matrix is ​​a matrix composed of the communication costs between every two nodes, and the routing path queue includes at least one triplet, each triplet includes the communication cost of the current path from the initial node to the current node, the sequence number of the current node, and the current path.

[0059] Specifically, the communication cost matrix is ​​a two-dimensional matrix that represents the connection relationship and communication cost between nodes in the network. For example, if the number of nodes is M, M is an integer greater than 1, and the serial number corresponding to the node starts from 0, that is, the serial numbers of the M nodes are 0 to M-1. The communication cost of each two nodes in the communication cost matrix can be represented by C[i][j], which represents the communication cost from node i to node j. i and j are positive integers from 0 to M-1. i can be equal to j, or i can be an integer different from j.

[0060] If there is no direct connection between nodes i and j, that is, there are other nodes between nodes i and j, then the element corresponding to C[i][j] in the communication cost matrix can be represented by a very large number (e.g., infinity ∞) to represent the communication cost. If i and j are equal, it means that nodes i and j are the same node, then the element corresponding to C[i][j] in the communication cost matrix can be represented by 0.

[0061] The communication cost refers to the path cost between nodes.

[0062] After obtaining the communication cost matrix, it is necessary to determine the sequence number of the initial node, the sequence number of the destination node, and the sequence number of the current node, and obtain the current path from the initial node to the current node, and obtain the communication cost of the current path from the initial node to the current node through the communication cost matrix. A triple is formed by the sequence number of the current node, the current path from the initial node to the current node, and the communication cost of the current path, and each triple is added to the routing path queue. The routing path queue is a priority routing path queue, that is, at least one triple in the routing path queue has a priority relationship.

[0063] Step 102, when the current node is not the destination node, calculate the communication cost from the initial node to the adjacent node of the current node, and update the target triplet according to the communication cost from the initial node to the adjacent node and the sequence number of the adjacent node.

[0064] Specifically, after determining the target triplet with the highest priority in the routing path queue, the current path in the target triplet can be known, and the last node in the current path (i.e., the current node) can be further known. Determine whether the current node is the destination node. If the current node is not the destination node, it is necessary to determine the next hop node of the current node. Therefore, it is necessary to obtain the adjacent nodes adjacent to the current node, and obtain the communication cost from the initial node to the adjacent node through the communication cost matrix. The three elements of the target triplet are updated through the communication cost from the initial node to the adjacent node and the sequence number of the adjacent node to complete the update of the target triplet.

[0065] Step 103, looping the above steps until the current node in the target triplet is the destination node, and determining the current path in the target triplet as the target routing path from the initial node to the destination node.

[0066] Specifically, after the target triplet is updated, continue to execute steps 101 to 102, and continue to update the triplet in the routing path queue until the current node of the target triplet with the highest priority in the path queue is the destination node. The process ends and the current path of the triplet where the destination node is located is determined as the target routing path from the initial node to the destination node.

[0067] The embodiment of the present invention obtains the target triplet with the highest priority in the routing path queue according to the communication cost matrix composed of the communication cost between every two nodes in the M nodes, wherein the routing path queue includes at least one triplet, each triplet includes the communication cost of the current path from the initial node to the current node, the sequence number of the current node and the current path, that is, the communication cost matrix can accurately describe the direct connection relationship between each node in the network and the corresponding communication cost of factors such as distance and bandwidth, so as to determine the current path with the minimum communication cost (that is, the highest priority), which provides a reliable basis for the final routing path calculation.

[0068] If the current node is not a destination node, the total communication cost from the initial node to the adjacent nodes of the current node is continued to be calculated through the target triplet, and the adjacent nodes are used as the next hop nodes of the current node to update the current path of the target triplet, and the above steps are repeated until the current node in the target triplet is a destination node, and the current path in the target triplet is determined as the target routing path from the initial node to the destination node. Thus, by evaluating the quality of the path through the communication cost, the optimal target routing path can be quickly determined, and the efficiency and stability of data transmission can be improved. Moreover, when the network status changes, only the communication cost matrix needs to be updated, and the target routing path is determined by the updated communication cost matrix, which can not only reduce resource consumption, but also reduce the cost of management and maintenance.

[0069] In an optional specific embodiment, the step 101 obtains the target triplet with the highest priority in the routing path queue according to the communication cost matrix of the multiple nodes, and specifically includes:

[0070] Obtain a network topology diagram of multiple nodes and determine the communication cost between each two nodes;

[0071] Constructing a communication cost matrix of the plurality of nodes according to the network topology diagram and the communication cost between every two nodes;

[0072] According to the communication cost matrix of the plurality of nodes, obtaining the communication cost of the current path of each triplet in the routing path queue;

[0073] The triplet with the lowest communication cost of the current path is determined as the target triplet with the highest priority in the routing path queue.

[0074] Specifically, when the method for determining the routing path is applied to the controller node, a network topology diagram of multiple nodes is obtained, and an original matrix can be constructed according to the relative positions and states of the multiple nodes, and the original matrix can only describe the connection relationship between two nodes. After determining the communication cost between each two nodes in the multiple nodes, a communication cost matrix can be constructed according to the relative positions and states of the multiple nodes and the communication cost between each two nodes, and the communication cost matrix can not only describe the connection relationship between the two nodes, but also describe the communication cost between the two nodes.

[0075] The communication cost matrix can be used to calculate the communication cost of the current path of each triple in the routing path queue. By comparing the size, the triple with the lowest communication cost of the current path can be determined, and the triple is determined as the target triple with the highest priority. That is, the higher the priority, the lower the communication cost of the current path, and the higher the quality of the current path. The communication cost can be used to know the direct connection relationship between each node in the network and the corresponding communication cost of factors such as distance and bandwidth, so that the current path with the lowest communication cost (that is, the highest priority) can be determined, providing a reliable basis for the final routing path calculation.

[0076] The above network topology diagram and communication cost matrix are explained below through a specific example:

[0077] Figure 2 is the network topology diagram of the connection between nodes 1 to 14 and the network topology diagram of the connection between the controller node W and nodes 1 to 14. According to the relative position and state of nodes 1 to 14, the original matrix can be constructed, such as Figure 3 As shown in the figure, the original matrix is ​​a 14*14 two-dimensional matrix, which can only describe the connection relationship between every two nodes. The element in the i-th row and j-th column in the original matrix represents the connection relationship between node i and node j. If the connection relationship is 0, it means that node i and node j are the same node; if the connection relationship is ∞, node i and node j are not directly connected; if the connection relationship is 1, node i and node j are directly connected. Among them, i and j are both integers between 1 and 14.

[0078] like Figure 4As shown, after determining the communication cost between each two nodes between nodes 1 to 14 in the network topology diagram, a communication cost matrix can be constructed according to the relative position and state between nodes 1 to 14 and the communication cost between each two nodes, as shown in FIG. Figure 5 As shown. The communication cost matrix not only describes the connection relationship between two nodes, but also describes the communication cost between two nodes. The elements in the i-th row and j-th column of the communication cost matrix represent the connection relationship and communication cost between node i and node j. If the element value corresponding to node i and node j in the communication cost matrix is ​​0, it means that node i and node j are the same node; if the element value corresponding to node i and node j in the communication cost matrix is ​​∞, node i and node j are not directly connected; if the element value corresponding to node i and node j in the communication cost matrix is ​​an integer greater than 0, it means that the communication cost between node i and node j is the element value. Among them, i and j are both integers between 1 and 14.

[0079] The controller node W is responsible for collecting and monitoring the state changes of multiple nodes to facilitate timely updating of the communication cost matrix. The following is an explanation of the process of determining the target triplet:

[0080] First, the original matrix is ​​obtained and initialized as a communication cost matrix, where the communication cost matrix is ​​a 14×14 matrix, the initial node is node 1, and the destination node is node 14.

[0081] Initialize the load matrix L to an all-zero matrix, which means that the load values ​​of all nodes are zero at the beginning. The purpose of the load matrix is ​​to record the load of each node so that load balancing can be considered when calculating the communication cost. Usually, the value of the load matrix L is updated according to the actual load of the nodes in the network.

[0082] Initialize the routing path queue to be empty in order to store the triples. Since the initial node is node 1, the initial current path is [1], the communication cost of the current path is 0, and the triples formed are (0, 1, [1]), that is, the routing path queue is initially: (0, 1, [1]), and the target triple (0, 1, [1]) with the highest priority is taken out from the routing path queue.

[0083] It should be noted that the communication cost matrix can be in not only a two-dimensional matrix form but also a table form. The following is an explanation of the communication cost matrix in table form through a specific example:

[0084] The number of multiple nodes is 5, namely node A to node E. The sequence number corresponding to node A is 0, the sequence number corresponding to node B is 1, the sequence number corresponding to node C is 2, the sequence number corresponding to node D is 3, and the sequence number corresponding to node E is 4. The specific communication cost matrix is ​​shown in Table 1 below:

[0085] Table 1 Communication cost matrix

[0086] A(0) B(1) C(2) D(3) E(4) A(0) 0 1 4 ∞ ∞ B(1) 1 0 4 2 7 C(2) 4 4 0 3 5 D(3) ∞ 2 3 0 4 E(4) ∞ 7 5 4 0

[0087] In the above communication cost matrix, C[0][0], C[1][1], C[2][2], C[3][3], and C[4][4] are all 0, indicating that the communication cost of the same node is 0. C[0][1] = C[1][0] = 1, indicating that the communication cost between node 0 and node 1 is 1; C[0][2] = C[2][0] = 4, indicating that the communication cost between node 0 and node 2 is 4; C[0][3] = C[3][0] = ∞, indicating that node 0 and node 3 are not directly connected; C[0][4] = C[4][0] = ∞, indicating that node 0 and node 4 are not directly connected. C[1][2] = C[2][1] = 4, indicating that the communication cost between node 1 and node 2 is 4; C[1][3] = C[3][1] = 2, indicating that the communication cost between node 1 and node 3 is 2; C[1][4] = C[4][1] = 7, indicating that the communication cost between node 1 and node 4 is 7. C[2][3]=C[3][2]=3, indicating that the communication cost between node 2 and node 3 is 3; C[2][4]=C[4][2]=5, indicating that the communication cost between node 2 and node 3 is 5. C[3][4]=C[4][3]=4, indicating that the communication cost between node 3 and node 4 is 4.

[0088] Assume that node 0 is the initial node and node 4 is the destination node. Get the original matrix from node 0 to node 4, and initialize the original matrix as the communication cost matrix. Initialize the load matrix L as an all-zero matrix. In this example, the role of the load matrix L is ignored, that is, the load matrix L is always kept as an all-zero matrix.

[0089] Initialize the routing path queue to empty. Since the initial node is node 0, the initial current path is [0], the communication cost of the current path is 0, and the composed triple is (0, 0, [0]). That is, the routing path queue is initially: (0, 0, [0]). Take out the target triple with the highest priority (0, 0, [0]) from the routing path queue.

[0090] Furthermore, the determining of the communication cost between every two nodes includes but is not limited to at least one of the following:

[0091] The first one is to determine the communication cost based on the physical distance between two nodes. If the network topology is known, the communication cost can be determined based on the physical distance between the nodes. Generally speaking, a shorter physical distance means a lower communication cost.

[0092] The second item: Determine the communication cost based on the link quality between the two nodes (such as signal strength, signal-to-noise ratio, etc.); generally, better link quality usually corresponds to lower communication cost.

[0093] The third item: Determine the communication cost based on the network congestion level of the two nodes; if the impact of network congestion on communication performance is considered, the network congestion level can be included in the calculation of the communication cost. Generally, a link with less congestion may have a lower communication cost.

[0094] Item 4: Determine the communication cost based on the historical communication data between the two nodes (such as transmission success rate, average delay, etc.); generally, a better communication history may mean a lower communication cost.

[0095] It should be noted that the value of the communication cost can be determined by multiple rules, depending on the algorithm for designing the communication cost and the characteristics of the network. A common method is to determine the communication cost based on the communication distance between nodes, communication delay, etc. The communication distance can be a physical distance or the number of hops in the network topology. The communication delay can be a transmission delay, a router processing delay, etc. When designing the communication cost, the communication cost is comprehensively determined by one or more of the above-mentioned mixed indicators (i.e., one or more of the first to fourth items), and the calculation rules of the communication cost are determined according to the specific application scenarios and requirements. By evaluating the quality of the path through the communication cost, the optimal target routing path can be quickly determined, thereby improving the efficiency and stability of data transmission.

[0096] After determining the target triplet with the highest priority in the routing path queue, when the current node in the target triplet is a non-destination node, the communication cost from the initial node to the adjacent node of the current node is calculated, and the target triplet is updated according to the communication cost from the initial node to the adjacent node and the sequence number of the adjacent node. The process of updating the target triplet is described below through an optional specific embodiment, which specifically includes steps 1021 to 1023:

[0097] Step 1021: When the current node is not a destination node, determine whether an adjacent node of the current node belongs to one of the nodes in the current path of the target triple.

[0098] Specifically, after determining the target triplet with the highest priority in the routing path queue, determine whether the sequence number of the current node in the target triplet is the sequence number of the destination node. If the sequence number of the current node is the same as the sequence number of the destination node, it means that the current node is the destination node. If the sequence number of the current node is different from the sequence number of the destination node, it means that the current node is a non-destination node, and it is necessary to obtain the adjacent nodes of the current node, and determine whether the adjacent node belongs to one of the nodes in the current path, that is, determine whether the adjacent node exists in the current path. If the adjacent node belongs to one of the nodes in the current path, that is, the adjacent node exists in the current path, then keep the target triplet unchanged. If the adjacent node does not belong to one of the nodes in the current path, that is, the adjacent node does not exist in the current path, then execute step 1022.

[0099] It should be noted that in order to avoid routing path loops, routing path loops can be avoided by checking whether the current path already contains the current adjacent node when processing adjacent nodes. When processing adjacent nodes of the current node, if it is found that the adjacent node already exists in the current path, the adjacent node is not added to the current path, thereby avoiding the formation of loops.

[0100] Step 1022: When the adjacent node does not belong to one of the nodes in the current path of the target triplet, calculate the communication cost from the initial node to the adjacent node.

[0101] Specifically, if the adjacent node of the current node does not belong to one of the nodes in the current path, that is, the adjacent node does not exist in the current path, the adjacent node can be used as the next hop node of the current node to update the current path, that is, the communication cost from the initial node to the adjacent node needs to be calculated.

[0102] The content of the above step 1022 is specifically described below through an optional specific embodiment:

[0103] In the case where the adjacent node does not belong to one of the nodes in the current path of the target triplet, obtaining a communication cost from the initial node to the current node, a communication cost from the current node to the adjacent node, and a current load value of the adjacent node;

[0104] The communication cost from the initial node to the adjacent node is calculated according to the communication cost from the initial node to the current node, the communication cost from the current node to the adjacent node, and the current load value of the adjacent node.

[0105] Specifically, if the neighboring node of the current node does not belong to one of the nodes in the current path, the neighboring node can be used as the next hop node of the current node to update the current path. First, the communication cost from the initial node to the current node needs to be obtained from the target triplet; and the communication cost from the current node to the neighboring node needs to be obtained from the communication cost matrix; and the current load value of the neighboring node also needs to be obtained. The communication cost from the initial node to the current node, the communication cost from the current node to the neighboring node, and the current load value of the neighboring node can be used to calculate the communication cost from the initial node to the adjacent node.

[0106] Furthermore, the communication cost from the initial node to the adjacent node can be specifically calculated by the following formula:

[0107] new_cost=current_cost+M[current_node][neighbor]+α*L[neighbor]

[0108] Wherein, new_cost represents the communication cost from the initial node to the adjacent node;

[0109] current_cost represents the communication cost from the initial node to the current node;

[0110] M[current_node][neighbor] represents the communication cost from the current node to the neighboring node;

[0111] α represents the load balancing factor; it is used to adjust the impact of load on communication cost;

[0112] L[neighbor] represents the current load value of the neighboring node.

[0113] Specifically, if the adjacent node of the current node does not belong to one of the nodes in the current path, the communication cost from the initial node to the current node is obtained from the target triplet, and the communication cost between the current node and the adjacent node is obtained from the communication cost matrix, and the current load value of the adjacent node is obtained, and the communication cost from the initial node to the current node is added to the communication cost between the current node and the adjacent node, plus the product of the load value of the adjacent node and the load balancing coefficient, and the calculated value is the communication cost from the initial node to the adjacent node.

[0114] It should be noted that other factors may be added as needed to jointly calculate the communication cost from the initial node to the adjacent node, which is not specifically limited here.

[0115] The following is a description of the process of determining the target routing path based on a calculation formula of the communication cost from the initial node to the adjacent node through a specific embodiment:

[0116] The load balancing coefficient α is set to 0.5, and the specific communication cost matrix is ​​shown in Table 1. In this example, the role of the load matrix L is ignored, that is, the load matrix L is always kept as an all-zero matrix.

[0117] Initialize the routing path queue to empty. Since the initial node is node 0, the initial current path is [0], the communication cost of the current path is 0, and the composed triple is (0, 0, [0]). That is, the routing path queue is initially: (0, 0, [0]). Take out the target triple with the highest priority (0, 0, [0]) from the routing path queue.

[0118] Since the current node in the target triplet is node 0, it can be known from the communication cost matrix that the adjacent nodes of node 0 include: node 1 and node 2.

[0119] For node 1, the communication cost current_cost of node 0 is 0, the communication cost M[current_node][neighbor] from node 0 to node 1 is 1, and the current load value L[neighbor] of node 1 is 0, then:

[0120] The communication cost from node 0 to node 1 is new_cost = 0 + 1 + 0.5 * 0 = 1

[0121] The updated target triplet is: (1, 1, [0, 1]), where the first element 1 represents the communication cost from node 0 to node 1, the middle element 1 represents the sequence number of node 1, and [0, 1] indicates that the current path is from node 0 to node 1.

[0122] For node 2, the communication cost current_cost of node 0 is 0, the communication cost M[current_node][neighbor] from node 0 to node 2 is 4, and the current load value L[neighbor] of node 2 is 0, then:

[0123] The communication cost from node 0 to node 2 is new_cost = 0 + 4 + 0.5 * 0 = 4

[0124] The updated target triplet is: (4, 2, [0, 2]), where the first element 4 represents the communication cost from node 0 to node 2, the middle element 2 represents the sequence number of node 2, and [0, 2] indicates that the current path is from node 0 to node 2.

[0125] In summary, the updated routing path queue is: (1, 1, [0, 1]), (4, 2, [0, 2]).

[0126] Continuing the loop, in (1, 1, [0, 1]) and (4, 2, [0, 2]), since the communication cost between [0, 1] is 1 and the communication cost of [0, 2] is 4, the communication cost of [0, 1] is small, that is, (1, 1, [0, 1]) is the target triplet with the highest priority in the routing path queue.

[0127] Since the current node in the target triplet is node 1, it can be known from the communication cost matrix that the adjacent nodes of node 1 include: node 0, node 2, node 3 and node 4.

[0128] For node 0, since node 0 is already included in [0, 1], node 0 is no longer added as an adjacent node to the subsequent path to avoid forming a loop.

[0129] For node 2, the communication cost current_cost of [0, 1] is 1, the communication cost M[current_node][neighbor] from node 1 to node 2 is 4, and the current load value L[neighbor] of node 2 is 0, then:

[0130] The communication cost from node 1 to node 2 new_cost = 1 + 4 + 0.5 * 0 = 5

[0131] The updated target triplet is: (5, 2, [0, 1, 2]), where the first element 5 represents the communication cost from node 1 to node 2, the middle element 2 represents the sequence number of node 2, and [0, 1, 2] means that the current path is from node 0 to node 1 and then to node 2.

[0132] For node 3, the communication cost current_cost of node 1 is 1, the communication cost M[current_node][neighbor] from node 1 to node 3 is 4, and the current load value L[neighbor] of node 3 is 0, then:

[0133] The communication cost from node 1 to node 3 is new_cost = 1 + 2 + 0.5 * 0 = 3

[0134] The updated target triplet is (3, 3, [0, 1, 3]). The first element 3 represents the communication cost from node 1 to node 3. The middle element 3 represents the sequence number of node 3. [0, 1, 3] means that the current path is from node 0 to node 1 and then to node 3.

[0135] For node 4, the communication cost current_cost of node 1 is 1, the communication cost M[current_node][neighbor] from node 1 to node 4 is 7, and the current load value L[neighbor] of node 4 is 0, then:

[0136] The communication cost from node 1 to node 4 is new_cost = 1 + 7 + 0.5 * 0 = 8

[0137] The updated target triplet is (8, 4, [0, 1, 4]). The first element 8 represents the communication cost from node 1 to node 4. The middle element 4 represents the sequence number of node 4. [0, 1, 4] indicates that the current path is from node 0 to node 1 and then to node 4.

[0138] In summary, the updated routing path queue is: (4, 2, [0, 2]), (5, 2, [0, 1, 2]), [(3, 3, [0, 1, 3]), (8, 4, [0, 1, 4])].

[0139] Similarly, continuing the cycle, [(3, 3, [0, 1, 3]) is the target triplet with the highest priority in the routing path queue.

[0140] Since the current node in the target triplet is node 3, it can be known from the communication cost matrix that the adjacent nodes of node 3 include: node 1, node 2, and node 4.

[0141] For node 1, since node 1 is already included in [0, 1, 3], node 1 is no longer added as an adjacent node to the subsequent path to avoid forming a loop.

[0142] For node 2, the communication cost current_cost of [0, 1, 3] is 3, the communication cost M[current_node][neighbor] from node 3 to node 2 is 3, and the current load value L[neighbor] of node 2 is 0, then:

[0143] The communication cost from node 3 to node 2 is new_cost = 3 + 3 + 0.5 * 0 = 6

[0144] The updated target triplet is: (6, 2, [0, 1, 3, 2]).

[0145] For node 4, the communication cost current_cost of [0, 1, 3] is 3, the communication cost M[current_node][neighbor] from node 3 to node 4 is 4, and the current load value L[neighbor] of node 4 is 0, then:

[0146] The communication cost from node 3 to node 4 is new_cost = 3 + 4 + 0.5 * 0 = 7

[0147] The updated target triplet is (7, 4, [0, 1, 3, 4]).

[0148] In summary, the updated routing path queues are: (4, 2, [0, 2]), (5, 2, [0, 1, 2]), (8, 4, [0, 1, 4]), (6, 2, [0, 1, 3, 2]), (7, 4, [0, 1, 3, 4]).

[0149] Similarly, the cycle continues: (4, 2, [0, 2]) is the target triplet with the highest priority in the routing path queue.

[0150] Since the current node in the target triplet is node 2, it can be known from the communication cost matrix that the adjacent nodes of node 2 include: node 0, node 1, node 3, and node 4.

[0151] For node 0, since node 0 is already included in [0, 2], node 0 is no longer added as an adjacent node to the subsequent path to avoid forming a loop.

[0152] For node 1, the communication cost current_cost of [0, 2] is 4, the communication cost M[current_node][neighbor] from node 2 to node 1 is 4, and the current load value L[neighbor] of node 1 is 0, then:

[0153] The communication cost from node 2 to node 1 is new_cost = 4 + 4 + 0.5 * 0 = 8

[0154] The updated target triplet is: (8, 1, [0, 2, 1]).

[0155] For node 3, the communication cost current_cost of [0, 2] is 4, the communication cost M[current_node][neighbor] from node 2 to node 3 is 3, and the current load value L[neighbor] of node 3 is 0, then:

[0156] The communication cost from node 2 to node 3 new_cost = 4 + 3 + 0.5 * 0 = 7

[0157] The updated target triplet is (7, 3, [0, 2, 3]).

[0158] For node 4, the communication cost current_cost of [0, 2] is 4, the communication cost M[current_node][neighbor] from node 2 to node 4 is 5, and the current load value L[neighbor] of node 4 is 0, then:

[0159] The communication cost from node 2 to node 4 is new_cost = 4 + 5 + 0.5 * 0 = 9

[0160] The updated target triplet is (9, 4, [0, 2, 4]).

[0161] In summary, the updated routing path queues are: (5, 2, [0, 1, 2]), (8, 4, [0, 1, 4]), (6, 2, [0, 1, 3, 2]), (7, 4, [0, 1, 3, 4]), (8, 1, [0, 2, 1]), (7, 3, [0, 2, 3]), (9, 4, [0, 2, 4]).

[0162] Similarly, the cycle continues: (5, 2, [0, 1, 2]) is the target triplet with the highest priority in the routing path queue.

[0163] Since the current node in the target triplet is node 2, it can be known from the communication cost matrix that the adjacent nodes of node 2 include: node 0, node 1, node 3, and node 4.

[0164] For nodes 0 and 1, since [0, 1, 2] already includes nodes 0 and 1, nodes 0 and 1 are no longer added as adjacent nodes to the subsequent path to avoid forming a loop.

[0165] For node 3, the communication cost current_cost of [0, 1, 2] is 5, the communication cost M[current_node][neighbor] from node 2 to node 3 is 3, and the current load value L[neighbor] of node 3 is 0, then:

[0166] The communication cost from node 2 to node 3 new_cost = 5 + 3 + 0.5 * 0 = 8

[0167] The updated target triplet is (8, 3, [0, 1, 2, 3]).

[0168] For node 4, the communication cost current_cost of [0, 1, 2] is 5, the communication cost M[current_node][neighbor] from node 2 to node 4 is 5, and the current load value L[neighbor] of node 4 is 0, then:

[0169] The communication cost from node 2 to node 4 new_cost = 5 + 5 + 0.5 * 0 = 10

[0170] The updated target triplet is (10, 4, [0, 1, 2, 4]).

[0171] In summary, the updated routing path queue is: (8, 4, [0, 1, 4])], (6, 2, [0, 1, 3, 2]), (7, 4, [0, 1, 3, 4]), (8, 1, [0, 2, 1]), (7, 3, [0, 2, 3]), (9, 4, [0, 2, 4]), (8, 3, [0, 1, 2, 3]), (10, 4, [0, 1, 2, 4]).

[0172] Similarly, the cycle continues: (6, 2, [0, 1, 3, 2]) is the target triplet with the highest priority in the routing path queue.

[0173] Since the current node in the target triplet is node 2, it can be known from the communication cost matrix that the adjacent nodes of node 2 include: node 0, node 1, node 3, and node 4.

[0174] For nodes 0, 1, and 3, since they are already included in [0, 1, 3, 2], they are no longer added as adjacent nodes to the subsequent path to avoid forming a loop.

[0175] For node 4, the communication cost current_cost of [0, 1, 3, 2] is 6, the communication cost M[current_node][neighbor] from node 2 to node 4 is 5, and the current load value L[neighbor] of node 4 is 0, then:

[0176] The communication cost from node 2 to node 4 is new_cost = 6 + 5 + 0.5 * 0 = 11

[0177] The updated target triplet is (11, 4, [0, 1, 3, 2, 4]).

[0178] In summary, the updated routing path queues are: (8, 4, [0, 1, 4])], (7, 4, [0, 1, 3, 4]), (8, 1, [0, 2, 1]), (7, 3, [0, 2, 3]), (9, 4, [0, 2, 4]), (8, 3, [0, 1, 2, 3]), (10, 4, [0, 1, 2, 4]), (11, 4, [0, 1, 3, 2, 4]).

[0179] Similarly, continue the loop: (7, 4, [0, 1, 3, 4]) and (7, 3, [0, 2, 3]) are the target triples with the highest priority in the routing path queue. Since there are two target triples with the highest priority, and the current node in (7, 3, [0, 2, 3]) is not the destination node, it is necessary to process the adjacent nodes of node 3 in (7, 3, [0, 2, 3]): node 0, node 1, node 2, and node 4.

[0180] For nodes 0 and 2, since [0, 2, 3] already includes nodes 0 and 2, nodes 0 and 2 are no longer added as adjacent nodes to the subsequent path to avoid forming a loop.

[0181] For node 1, the communication cost current_cost of [0, 2, 3] is 7, the communication cost M[current_node][neighbor] from node 3 to node 1 is 2, and the current load value L[neighbor] of node 1 is 0, then:

[0182] The communication cost from node 3 to node 1 is new_cost = 7 + 2 + 0.5 * 0 = 9

[0183] The updated target triplet is (9, 1, [0, 2, 3, 1]).

[0184] For node 4, the communication cost current_cost of [0, 2, 3] is 7, the communication cost M[current_node][neighbor] from node 3 to node 4 is 4, and the current load value L[neighbor] of node 4 is 0, then:

[0185] The communication cost from node 3 to node 1 is new_cost = 7 + 4 + 0.5 * 0 = 11

[0186] The updated target triplet is (11, 4, [0, 2, 3, 4]).

[0187] In summary, the updated routing path queue is: (8, 4, [0, 1, 4])], (7, 4, [0, 1, 3, 4]), (8, 1, [0, 2, 1]), (9, 4, [0, 2, 4]), (8, 3, [0, 1, 2, 3]), (10, 4, [0, 1, 2, 4]), (11, 4, [0, 1, 3, 2, 4]), (9, 1, [0, 2, 3, 1]), (11, 4, [0, 2, 3, 4]).

[0188] Similarly, continue the cycle: (7, 4, [0, 1, 3, 4]) is the target triplet with the highest priority in the routing path queue. Since the current node of the target triplet is node 4, and node 4 is the destination node, the target routing path is: [0, 1, 3, 4], and the communication cost is 7.

[0189] In the above embodiment, after obtaining the target routing path [0, 1, 3, 4], the initial node transmits data to the destination node along the path [0, 1, 3, 4]. When the destination node feeds back data to the initial node, the destination node can transmit data to the initial node along the path [4, 3, 1, 0]. In addition, the routing path queue is a data structure implemented using a minimum heap to ensure that the current path with the minimum communication cost is obtained. The minimum heap is a sorted complete binary tree in which the data value of any non-terminal node is not greater than the value of its left child node and right child node.

[0190] Step 1023: Update the target triplet according to the communication cost from the initial node to the adjacent node and the sequence number of the adjacent node.

[0191] The content of the above step 1023 is specifically described below through an optional specific embodiment:

[0192] Updating the communication cost from the initial node to the current node in the target triplet to the communication cost from the initial node to the adjacent node;

[0193] Updating the sequence number of the current node in the target triplet to the sequence number of the adjacent node;

[0194] The adjacent node is used as the next hop node of the current node to update the current path in the target triplet.

[0195] Specifically, the communication cost from the initial node to the current node in the target triplet is replaced by the communication cost from the initial node to the adjacent node, and the sequence number of the current node in the target triplet is replaced by the sequence number of the adjacent node, and the adjacent node is added after the current node in the current path in the target triplet, that is, the adjacent node is added to the current path as the next hop node of the current node, thereby forming a new current path. The new target triplet is formed by the communication cost from the initial node to the adjacent node, the sequence number of the adjacent node and the new current path, thereby completing the update of the target triplet. By dynamically updating the communication cost from the initial node to the adjacent node, the current path can be adjusted in time to ensure that the target routing path with the best quality is obtained.

[0196] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.

[0197] In summary, the above embodiments of the present invention accurately describe the direct connection relationship between each node in the network and the corresponding communication cost of factors such as distance and bandwidth through the communication cost matrix, so as to determine the current path with the lowest communication cost (i.e., the highest priority), providing a reliable basis for the final routing path calculation. In addition, by evaluating the quality of the path through the communication cost, the optimal target routing path can be quickly determined, the efficiency and stability of data transmission can be improved, and the situation of data packet loss caused by routing jitter can be reduced. In addition, when the network status changes, only the communication cost matrix needs to be updated, and the target routing path is determined by the updated communication cost matrix, which can not only reduce resource consumption, but also reduce the cost of management and maintenance.

[0198] Reference Figure 6 The embodiment of the present invention provides a device for determining a routing path, which may specifically include the following modules:

[0199] An acquisition module 601 is used to acquire the target triplet with the highest priority in the routing path queue according to the communication cost matrix of multiple nodes, wherein the communication cost matrix is ​​a matrix composed of the communication cost between every two nodes, and the routing path queue includes at least one triplet, each triplet includes the communication cost of the current path from the initial node to the current node, the sequence number of the current node, and the current path;

[0200] A calculation module 602 is used to calculate the communication cost from the initial node to the adjacent node of the current node when the current node is not a destination node, and update the target triplet according to the communication cost from the initial node to the adjacent node and the sequence number of the adjacent node;

[0201] The determination module 603 is used to loop the above steps until the current node in the target triplet is the destination node, and determine the current path in the target triplet as the target routing path.

[0202] The embodiment of the present invention obtains the target triplet with the highest priority in the routing path queue according to the communication cost matrix composed of the communication cost between every two nodes in the M nodes, wherein the routing path queue includes at least one triplet, each triplet includes the communication cost of the current path from the initial node to the current node, the sequence number of the current node and the current path, that is, the communication cost matrix can accurately describe the direct connection relationship between each node in the network and the corresponding communication cost of factors such as distance and bandwidth, so as to determine the current path with the minimum communication cost (that is, the highest priority), which provides a reliable basis for the final routing path calculation.

[0203] If the current node is not a destination node, the total communication cost from the initial node to the adjacent nodes of the current node is continued to be calculated through the target triplet, and the adjacent nodes are used as the next hop nodes of the current node to update the current path of the target triplet, and the above steps are repeated until the current node in the target triplet is a destination node, and the current path in the target triplet is determined as the target routing path from the initial node to the destination node. Thus, by evaluating the quality of the path through the communication cost, the optimal target routing path can be quickly determined, and the efficiency and stability of data transmission can be improved. Moreover, when the network status changes, only the communication cost matrix needs to be updated, and the target routing path is determined by the updated communication cost matrix, which can not only reduce resource consumption, but also reduce the cost of management and maintenance.

[0204] In a preferred embodiment of the present invention, the calculation module 602 is specifically used for:

[0205] In the case where the current node is not a destination node, determining whether an adjacent node of the current node belongs to one of the nodes in the current path of the target triple;

[0206] In the case where the adjacent node does not belong to one of the nodes in the current path of the target triple, calculating the communication cost from the initial node to the adjacent node;

[0207] The target triplet is updated according to the communication cost from the initial node to the adjacent node and the sequence number of the adjacent node.

[0208] In a preferred embodiment of the present invention, when the calculation module 602 updates the target triplet according to the communication cost from the initial node to the adjacent node and the sequence number of the adjacent node, it is specifically used to:

[0209] Updating the communication cost from the initial node to the current node in the target triplet to the communication cost from the initial node to the adjacent node;

[0210] Updating the sequence number of the current node in the target triplet to the sequence number of the adjacent node;

[0211] The adjacent node is used as the next hop node of the current node to update the current path in the target triplet.

[0212] In a preferred embodiment of the present invention, when the calculation module 602 calculates the communication cost from the initial node to the adjacent node when the adjacent node does not belong to one of the nodes in the current path of the target triplet, it is specifically used to:

[0213] In the case where the adjacent node does not belong to one of the nodes in the current path of the target triplet, obtaining a communication cost from the initial node to the current node, a communication cost from the current node to the adjacent node, and a current load value of the adjacent node;

[0214] The communication cost from the initial node to the adjacent node is calculated according to the communication cost from the initial node to the current node, the communication cost from the current node to the adjacent node, and the current load value of the adjacent node.

[0215] In a preferred embodiment of the present invention, the communication cost from the initial node to the adjacent node is specifically calculated by the following formula:

[0216] new_cost=current_cost+M[current_node][neighbor]+α*L[neighbor]

[0217] Wherein, new_cost represents the communication cost from the initial node to the adjacent node;

[0218] current_cost represents the communication cost from the initial node to the current node;

[0219] M[current_node][neighbor] represents the communication cost from the current node to the neighboring node;

[0220] α represents the load balancing factor;

[0221] L[neighbor] represents the current load value of the neighboring node.

[0222] In a preferred embodiment of the present invention, the acquisition module 601 is specifically used for:

[0223] Obtain a network topology diagram of multiple nodes and determine the communication cost between each two nodes;

[0224] Constructing a communication cost matrix of the plurality of nodes according to the network topology diagram and the communication cost between every two nodes;

[0225] According to the communication cost matrix of the plurality of nodes, obtaining the communication cost of the current path of each triplet in the routing path queue;

[0226] The triplet with the lowest communication cost of the current path is determined as the target triplet with the highest priority in the routing path queue.

[0227] In a preferred embodiment of the present invention, the determining of the communication cost between every two nodes includes at least one of the following:

[0228] Determine the communication cost based on the physical distance between two nodes;

[0229] Determine the communication cost based on the link quality between two nodes;

[0230] Determine the communication cost based on the network congestion level of the two nodes;

[0231] The communication cost is determined based on the historical communication data between the two nodes.

[0232] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0233] In summary, the above embodiments of the present invention accurately describe the direct connection relationship between each node in the network and the corresponding communication cost of factors such as distance and bandwidth through the communication cost matrix, so as to determine the current path with the lowest communication cost (i.e., the highest priority), providing a reliable basis for the final routing path calculation. In addition, by evaluating the quality of the path through the communication cost, the optimal target routing path can be quickly determined, the efficiency and stability of data transmission can be improved, and the situation of data packet loss caused by routing jitter can be reduced. In addition, when the network status changes, only the communication cost matrix needs to be updated, and the target routing path is determined by the updated communication cost matrix, which can not only reduce resource consumption, but also reduce the cost of management and maintenance.

[0234] It should be noted that the division of units in the embodiments of the present invention is schematic and is only a logical function division. There may be other division methods in actual implementation. In addition, each functional unit in each embodiment of the present invention may be integrated into a processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0235] 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 processor-readable storage medium. Based on this understanding, the technical solution of the present invention 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. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) or a processor (processor) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program codes.

[0236] An embodiment of the present invention further provides an electronic device, including:

[0237] one or more processors; and

[0238] One or more machine-readable media having instructions stored thereon, when executed by the one or more processors, enable the electronic device to perform the method for determining a routing path as described above.

[0239] The processor can be a central processing unit (CPU), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or a complex programmable logic device (CPLD), and the processor can also adopt a multi-core architecture.

[0240] It should be noted here that the above-mentioned electronic device provided by the embodiment of the present invention can implement all the method steps implemented by the above-mentioned routing path determination method embodiment, and can achieve the same technical effect. The parts and beneficial effects that are the same as the method embodiment in this embodiment will not be described in detail here.

[0241] An embodiment of the present invention further provides a processor-readable storage medium, which stores a computer program that enables a processor to execute the above-mentioned method for determining a routing path.

[0242] The processor-readable storage medium can be any available medium or data storage device that can be accessed by the processor, including but not limited to magnetic storage (such as floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO), etc.), optical storage (such as CD, DVD, BD, HVD, etc.), and semiconductor storage (such as ROM, EPROM, EEPROM, non-volatile memory (NANDFLASH), solid-state drive (SSD)), etc.

[0243] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) containing computer-usable program code.

[0244] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer executable instructions. These computer executable instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0245] These processor executable instructions may also be stored in a processor readable memory that can direct a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the processor readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0246] These processor-executable instructions may also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0247] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

Claims

1. A method for determining a routing path, characterized in that: The method comprises: According to the communication cost matrix of multiple nodes, the target triplet with the highest priority in the routing path queue is obtained, wherein the communication cost matrix is ​​a matrix composed of the communication cost between every two nodes, and the routing path queue includes at least one triplet, each triplet includes the communication cost of the current path from the initial node to the current node, the sequence number of the current node, and the current path; In the case where the current node is not a destination node, calculating the communication cost from the initial node to the adjacent node of the current node, and updating the target triplet according to the communication cost from the initial node to the adjacent node and the sequence number of the adjacent node; The above steps are repeated until the current node in the target triplet is the destination node, and the current path in the target triplet is determined as the target routing path from the initial node to the destination node.

2. The method according to claim 1, characterized in that When the current node is not a destination node, calculating the communication cost from the initial node to the adjacent node of the current node, and updating the target triplet according to the communication cost from the initial node to the adjacent node and the sequence number of the adjacent node, including: In the case where the current node is not a destination node, determining whether an adjacent node of the current node belongs to one of the nodes in the current path of the target triple; In the case where the adjacent node does not belong to one of the nodes in the current path of the target triple, calculating the communication cost from the initial node to the adjacent node; The target triplet is updated according to the communication cost from the initial node to the adjacent node and the sequence number of the adjacent node.

3. The method according to claim 2, characterized in that The updating of the target triplet according to the communication cost from the initial node to the adjacent node and the sequence number of the adjacent node includes: Updating the communication cost from the initial node to the current node in the target triplet to the communication cost from the initial node to the adjacent node; Updating the sequence number of the current node in the target triplet to the sequence number of the adjacent node; The adjacent node is used as the next hop node of the current node to update the current path in the target triplet.

4. The method according to claim 2, characterized in that: The step of calculating the communication cost from the initial node to the adjacent node when the adjacent node does not belong to one of the nodes in the current path of the target triplet includes: In the case where the adjacent node does not belong to one of the nodes in the current path of the target triplet, obtaining a communication cost from the initial node to the current node, a communication cost from the current node to the adjacent node, and a current load value of the adjacent node; The communication cost from the initial node to the adjacent node is calculated according to the communication cost from the initial node to the current node, the communication cost from the current node to the adjacent node, and the current load value of the adjacent node.

5. The method according to claim 4, characterized in that The communication cost from the initial node to the adjacent node is specifically calculated by the following formula: new_cost=current_cost+M[current_node][neighbor]+α*L[neighbor] Wherein, new_cost represents the communication cost from the initial node to the adjacent node; current_cost represents the communication cost from the initial node to the current node; M[current_node][neighbor] represents the communication cost from the current node to the neighboring node; α represents the load balancing factor; L[neighbor] represents the current load value of the neighboring node.

6. The method according to claim 1, characterized in that The step of obtaining the target triplet with the highest priority in the routing path queue according to the communication cost matrix of the multiple nodes includes: Obtain a network topology diagram of multiple nodes and determine the communication cost between each two nodes; Constructing a communication cost matrix of the plurality of nodes according to the network topology diagram and the communication cost between every two nodes; According to the communication cost matrix of the plurality of nodes, obtaining the communication cost of the current path of each triplet in the routing path queue; The triplet with the lowest communication cost of the current path is determined as the target triplet with the highest priority in the routing path queue.

7. The method according to claim 6, characterized in that The determining of the communication cost between every two nodes includes at least one of the following: Determine the communication cost based on the physical distance between two nodes; Determine the communication cost based on the link quality between two nodes; Determine the communication cost based on the network congestion level of the two nodes; The communication cost is determined based on the historical communication data between the two nodes.

8. A device for determining a routing path, characterized in that: The device comprises: An acquisition module is used to acquire the target triplet with the highest priority in the routing path queue according to the communication cost matrix of multiple nodes, wherein the communication cost matrix is ​​a matrix composed of the communication cost between every two nodes, and the routing path queue includes at least one triplet, each triplet includes the communication cost of the current path from the initial node to the current node, the sequence number of the current node, and the current path; A calculation module, used for calculating the communication cost from the initial node to the adjacent node of the current node when the current node is not a destination node, and updating the target triplet according to the communication cost from the initial node to the adjacent node and the sequence number of the adjacent node; The determination module is used to loop the above steps until the current node in the target triplet is the destination node, and determine the current path in the target triplet as the target routing path.

9. An electronic device, characterized in that: include: one or more processors; and One or more machine-readable media having instructions stored thereon, when executed by the one or more processors, enable the electronic device to perform the method for determining a routing path as claimed in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer program stored therein enables the processor to execute the method for determining a routing path as claimed in any one of claims 1 to 7.