Link state routing method and device based on multiple optimal criteria

By constructing a global view and initialization router that builds a number of optimal standards, calculate and extract the optimal path of Packo, solve the problem that traditional route algorithms cannot take into account multiple indicators, and achieve efficient and accurate routing computing and layering. , Distributed routing protocol.

CN116319531BActive Publication Date: 2025-01-28TSINGHUA UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310282654.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-22
Publication Date
2025-01-28
Estimated Expiration
2043-03-22

AI Technical Summary

Technical Problem

Traditional routing algorithms cannot efficiently calculate the correct route while taking into account multiple indicators, and it is difficult to implement hierarchical and distributed routing protocols.

Method used

By constructing a global view of a network topology with multiple optimal guidelines, and initialization of the router, calculate the current path of the current nodes of each router to other nodes, extract the optimal path of Packo, use multiple optimal optimal items Guidelines improve the efficiency and accuracy of path acquisition.

Benefits of technology

In the case of taking into account multiple optimal guidelines, the correct routing is calculated, ensuring the efficiency and accuracy of the routing algorithm, and supporting hierarchical and distributed routing protocols.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116319531B_ABST
    Figure CN116319531B_ABST
Patent Text Reader

Abstract

The present application relates to a link state routing method and device based on multiple optimal criteria, wherein the method includes: based on at least one router, constructing a global view of network topology with multiple optimal criterion measurement values, and respectively initializing at least one router in the global view of network topology; based on the global view of network topology, calculating the path from the current node of each initialized router to other nodes; extracting the Pareto optimal path from the current node of each router in the path to each destination node, thereby improving the efficiency and accuracy of optimal path acquisition through multiple optimal criteria. Thus, the problems that traditional routing algorithms cannot efficiently calculate the correct route while taking into account multiple indicators and are difficult to implement hierarchical and distributed routing protocols are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of routing optimization, and in particular to a link state routing method and device based on multiple optimal criteria. Background Art

[0002] Traditional routing algorithms only use one optimal criterion when calculating the optimal path, such as the shortest distance path, the minimum delay path, the maximum bandwidth path, etc. This method cannot adapt to situations where multiple indicators are required at the same time. Simply synthesizing multiple indicators (metric values) into a comprehensive indicator through mathematical operations is difficult to simultaneously meet the different requirements of different types of traffic for paths. For example, delay-sensitive traffic hopes to use the minimum delay path, while throughput-sensitive traffic hopes to use the maximum bandwidth path.

[0003] Therefore, traditional routing algorithms cannot efficiently calculate the correct route while taking into account multiple indicators, and it is difficult to implement hierarchical and distributed routing protocols, which needs to be solved urgently. Summary of the invention

[0004] The present application provides a link state routing method and device based on multiple optimal criteria to solve the problems that traditional routing algorithms cannot efficiently calculate correct routes while taking into account multiple indicators and are difficult to implement hierarchical and distributed routing protocols.

[0005] The first aspect of the present application provides a link state routing method based on multiple optimal criteria, including the following steps: based on at least one router, constructing a global view of network topology with multiple optimal criterion measurement values, and initializing at least one router in the global view of the network topology; based on the global view of the network topology, calculating the path from the current node of each initialized router to other nodes; extracting the Pareto optimal path from the current node of each router in the path to each destination node, thereby improving the efficiency and accuracy of optimal path acquisition through multiple optimal criteria.

[0006] Optionally, in one embodiment of the present application, the initialization of at least one router in the global view of the network topology includes: constructing a first n+2 dimensional vector for each node in the global view of the network topology, where n is a positive integer; establishing n priority queues; initializing the first n+2 dimensional vector of the node where each router is located, and adding it to each priority queue.

[0007] Optionally, in one embodiment of the present application, the path from the node where each router is currently located to each other node is calculated based on the global view of the network topology, including: comparing the head elements in each priority queue to search for the optimal head element that meets the preset conditions, and deleting the optimal head element from each priority queue; constructing a second n+2 dimensional vector for all adjacent nodes of the node corresponding to the optimal head element; based on a preset strategy, comparing the second n+2 dimensional vector of each adjacent node with at least one first n+2 dimensional vector of the adjacent node one by one; if the second n+2 dimensional vector is better than any first n+2 dimensional vector, the optimal head element is deleted from the priority queue; The first n+2-dimensional vector is replaced by the second n+2-dimensional vector, and the second n+2-dimensional vector is added to each priority queue in turn; if the second n+2-dimensional vector is inferior to any of the first n+2-dimensional vectors, no operation is performed; if the second n+2-dimensional vector is equal to or incomparable with all the first n+2-dimensional vectors, the second n+2-dimensional vector is added to each priority queue in turn; repeatedly compare the head elements in each priority queue to search for the optimal head element that meets the preset conditions, and delete the optimal head element from each priority queue until each priority queue is empty.

[0008] Optionally, in one embodiment of the present application, extracting the Pareto optimal path from the node where each router is currently located in the path to each destination node includes: taking the destination node as the current node, the first n+2-dimensional vector corresponding to the destination node as the current vector, and extracting the previous hop node from the current vector; if the previous hop node is the node where the router is currently located, connecting the destination node and the previous hop node in sequence, and extracting a path from the node where the router is currently located to the previous hop node; otherwise, searching the first n+2-dimensional vector of the previous hop node for an n+2-dimensional vector that can calculate the current vector by combining the link from the previous hop node to the current node, and taking the n+2-dimensional vector as the new current vector, and the previous hop node as the new current node; repeatedly performing the operation of extracting the previous hop node from the current vector and extracting a path from the current node to the previous hop node until all n+2-dimensional vectors of the destination node have been visited.

[0009] The second aspect of the present application provides a link state routing device based on multiple optimal criteria, including: based on at least one router, constructing a global view of network topology with multiple optimal criterion measurement values, and initializing at least one router in the global view of the network topology; a calculation module, used to calculate the path from the current node of each initialized router to other nodes based on the global view of the network topology; an extraction module, used to extract the Pareto optimal path from the current node of each router in the path to each destination node, thereby improving the efficiency and accuracy of optimal path acquisition through multiple optimal criteria.

[0010] Optionally, in one embodiment of the present application, the initialization module includes: a first construction unit, used to construct a first n+2 dimensional vector for each node in the global view of the network topology, where n is a positive integer; a queue unit, used to establish n priority queues; and an enqueue unit, used to initialize the first n+2 dimensional vector of the node where each router is located, and add it to each of the priority queues.

[0011] Optionally, in one embodiment of the present application, the calculation module includes: a first comparison unit, used to compare the head elements in each priority queue to search for the optimal head element that meets the preset conditions, and delete the optimal head element from each priority queue; a second construction unit, used to construct a second n+2 dimensional vector for all adjacent nodes of the node corresponding to the optimal head element; a second comparison unit, used to compare the second n+2 dimensional vector of each adjacent node with at least one first n+2 dimensional vector of the adjacent node one by one based on a preset strategy; if the second n+2 dimensional vector is better than any of the first n+2 dimensional vectors, the first comparison unit is used to compare the second n+2 dimensional vector with the first n+2 dimensional vector. if the second n+2-dimensional vector is inferior to any of the first n+2-dimensional vectors, no operation is performed; if the second n+2-dimensional vector is equal to or incomparable to all of the first n+2-dimensional vectors, the second n+2-dimensional vector is added to each priority queue in turn; a first repeating unit is used to repeatedly compare the head elements in each priority queue to search for the optimal head element that meets the preset condition, and delete the optimal head element from each priority queue until each priority queue is empty.

[0012] Optionally, in one embodiment of the present application, the extraction module includes: a processing unit, used to take the destination node as the current node, the first n+2-dimensional vector corresponding to the destination node as the current vector, and extract the previous hop node from the current vector; a connection unit, used to connect the destination node and the previous hop node in sequence if the previous hop node is the node where the router is currently located, and extract a path from the node where the router is currently located to the previous hop node; otherwise, a search unit, used to search for an n+2-dimensional vector in the first n+2-dimensional vector of the previous hop node that can calculate the current vector by combining the link from the previous hop node to the current node, and use the n+2-dimensional vector as the new current vector, and the previous hop node as the new current node; a second repetition unit, used to repeatedly perform the operation of extracting the previous hop node from the current vector and extracting a path from the current node to the previous hop node until all n+2-dimensional vectors of the destination node have been visited.

[0013] The third aspect of the present application provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the link state routing method based on multiple optimal criteria as described in the above embodiment.

[0014] The fourth aspect of the present application provides a computer-readable storage medium, which stores a computer program. When the program is executed by a processor, it implements the link state routing method based on multiple optimal criteria as described above.

[0015] Therefore, the embodiments of the present application have the following beneficial effects:

[0016] The embodiment of the present application can construct a global view of network topology with multiple optimal criteria measurement values ​​based on at least one router, and initialize at least one router in the global view of network topology respectively; based on the global view of network topology, calculate the path from the current node of each router to other nodes after initialization; extract the Pareto optimal path from the current node of each router in the path to each destination node, thereby improving the efficiency and accuracy of optimal path acquisition through multiple optimal criteria. The present application proposes a routing algorithm using multiple optimal criteria on the basis of existing link state routing protocols and algorithms, so that the Pareto paths under all given multiple optimal criteria can be calculated, that is, no other path is better than the path, and the efficiency and accuracy of the routing algorithm are ensured while taking into account multiple optimal criteria. Thus, the problems that the traditional routing algorithm cannot efficiently calculate the correct route while taking into account multiple indicators and it is difficult to implement hierarchical and distributed routing protocols are solved.

[0017] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:

[0019] Figure 1 A flowchart of a link state routing method based on multiple optimal criteria provided according to an embodiment of the present application;

[0020] Figure 2 A global view of network topology provided for one embodiment of the present application;

[0021] Figure 3 is an example diagram of a link state routing device based on multiple optimal criteria according to an embodiment of the present application;

[0022] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.

[0023] Among them, 10 is a link state routing device based on multiple optimal criteria, 100 is an initialization module, 200 is a calculation module, 300 is an extraction module, 401 is a memory, 402 is a processor, and 403 is a communication interface. DETAILED DESCRIPTION

[0024] Embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, and should not be construed as limiting the present application.

[0025] The following describes the link state routing method and device based on multiple optimal criteria of the embodiment of the present application with reference to the accompanying drawings. In view of the problems mentioned in the above background technology, the present application provides a link state routing method based on multiple optimal criteria, in which a global view of network topology with multiple optimal criterion metrics is constructed based on at least one router, and at least one router in the global view of network topology is initialized respectively; based on the global view of network topology, the path from the current node of each router to other nodes after initialization is calculated; the Pareto optimal path from the current node of each router in the path to each destination node is extracted, thereby improving the efficiency and accuracy of optimal path acquisition through multiple optimal criteria. The present application proposes a routing algorithm using multiple optimal criteria on the basis of existing link state routing protocols and algorithms (such as OSPF), so that all Pareto paths under given multiple optimal criteria can be calculated, that is, no other path is better than the path, and the efficiency and accuracy of the routing algorithm are ensured while taking into account multiple optimal criteria. Thus, the problems that the traditional routing algorithm cannot efficiently calculate the correct route while taking into account multiple indicators and it is difficult to implement hierarchical and distributed routing protocols are solved.

[0026] Specifically, Figure 1 A flowchart of a link state routing method based on multiple optimal criteria provided in an embodiment of the present application.

[0027] like Figure 1 As shown, the link state routing method based on multiple optimal criteria includes the following steps:

[0028] In step S101, a global view of network topology having multiple optimal criterion metric values ​​is constructed based on at least one router, and at least one router in the global view of network topology is initialized respectively.

[0029] The embodiment of the present application can first construct a global view of the network topology with multiple metric values ​​for each router in the current network. The specific steps are as follows:

[0030] 1. Each router generates state information for the link directly connected to itself. Let the link from router node u to v be (u, v), and its link state information contains a metric vector, defined as an n-dimensional vector l(u, v) = (a1, a2, a3, ..., a n), where a k represents the kth metric value of the link;

[0031] 2. Based on the existing link state protocol, each router performs neighbor discovery, link state information flooding, and maintains a consistent link state database, thereby building a global view of the network topology with multiple metrics.

[0032] Therefore, in the process of establishing a global view of the network topology, the embodiments of the present application can put indicators under multiple optimal criteria into the link state information, thereby establishing a global view of the network topology, taking into account multiple optimal criteria, and using them as input for path calculation to ensure the performance of the routing algorithm.

[0033] Optionally, in one embodiment of the present application, at least one router in the global view of the network topology is initialized separately, including: constructing a first n+2 dimensional vector for each node in the global view of the network topology, where n is a positive integer; establishing n priority queues; initializing the first n+2 dimensional vector of the node where each router is located, and adding it to each priority queue.

[0034] It should be noted that after building the global view of the network topology, each router in the global view of the network topology needs to prepare and initialize the path calculation respectively. The specific steps are as follows:

[0035] 1. Create an n+2-dimensional vector f for each node r in the global view of the network topology r =(a1,a2,a3,…,a n ,p,r), to represent the current optimal metric vector of the node (a1,a2,a3,…,a n ), the metric corresponds to a path from s to node r, where r’s previous hop is p; for any node r that is not equal to s, a k The initial value of is the worst value that the kth metric can take (for example, if the metric is the path length, then a k The value is positive infinity (+∞); if the metric value is the path bandwidth, then a k The value is 0, etc.), the initial value of p is empty;

[0036] 2. Establish n priority queues Q1, Q2, ..., Q n , where each element is an n+2-dimensional vector (a1, a2, a3, …, a n ,p,r); the elements in the kth priority queue are sorted according to the metric a k The values ​​of are arranged in order of merit, that is, in Q k The head element is always larger than Q k Other elements in the kvalue, while other metric values ​​a j (j≠k) in Q k is not considered;

[0037] 3. Initialize the n+2-dimensional vector of node s to x s =(a1,a2,a3,…,a n ,s,s), where a k is the optimal value that the kth metric can take, and x s Join each priority queue Q1, Q2, ..., Q n .

[0038] Therefore, the embodiment of the present application performs initialization respectively through each router in the global view of the network topology, thereby providing a reliable data basis for subsequent path calculation.

[0039] In step S102, based on the global view of the network topology, the paths from the current node of each initialized router to other nodes are calculated.

[0040] After constructing a global view of the network topology and respectively initializing the routers in the global view of the network topology, the embodiment of the present application further needs to calculate and obtain the path from the current node of each initialized router to other nodes.

[0041] Optionally, in one embodiment of the present application, based on a global view of the network topology, the path from the node where each router is currently located to each other node is calculated, including: comparing the head elements in each priority queue to search for the optimal head element that meets the preset conditions, and deleting the optimal head element from each priority queue; constructing a second n+2-dimensional vector for all adjacent nodes of the node corresponding to the optimal head element; based on a preset strategy, comparing the second n+2-dimensional vector of each adjacent node with at least one first n+2-dimensional vector of the adjacent node one by one; if the second n+2-dimensional vector is better than any first n+2-dimensional vector, then replacing the first n+2-dimensional vector with the second n+2-dimensional vector, and adding it to each priority queue in turn; if the second n+2-dimensional vector is worse than any first n+2-dimensional vector, then no operation is performed; if the second n+2-dimensional vector is equal to or incomparable with all first n+2-dimensional vectors, then adding it to each priority queue in turn; repeatedly comparing the head elements in each priority queue to search for the optimal head element that meets the preset conditions, and deleting the optimal head element from each priority queue until each priority queue is empty.

[0042] It should be noted that, in the embodiment of the present application, the specific steps for each router to respectively calculate the path from the node s to other nodes in the network are as follows:

[0043] 1. Compare the priority queues Q1, Q2, ..., Q n Find an element at the head of the priority queue that satisfies the condition that it is not inferior to any other element at the head of the priority queue. u The element x v , where x v =(a1,a2,a3,…,a n ,p,v) is not inferior to x u =(a'1,a'2,a'3,…,a' n ,p',u), which means that there is at least one k such that a k Better than a' k , and from Q1, Q2, ..., Q n Delete x from v ;

[0044] 2. Given f v =(a1,a2,a3,…,a n ,p,v), for the adjacent node u of node v, u≠p is satisfied, and it is known that l(u,v)=(b1,b2,b3,…,b n ), construct n+2 dimensional vector g u =(a1⊕1b1,a2⊕2b2,a3⊕3b3,…,a n ⊕ n b n ,v,u), where the operator ⊕ k Indicates that the two values ​​of the kth metric are merged. The specific operation method depends on the type of metric. For example, if the metric is path length, then a k ⊕ k b k for a k +b k , if the metric is bandwidth, then a k ⊕ k b k is min(a k ,b k )wait;

[0045] 3. u The n+2-dimensional vector f already exists at node u u Compare one by one (there may be multiple f u ): If there exists some f u Better than g u , then no operation is performed; if g u Better than some f u , then use g u Replace the f u , and g u Add Q1, Q2, ..., Q nIn; if g u Not inferior to all f u , then g u as the new n+2-dimensional vector of node u, and g u Add Q1, Q2, ..., Q n ; Among them, (a1, a2, a3, …, a n ,p,u) is better than (a'1,a'2,a'3,...,a' n ,p',u), means that for all k, there is a k Better than a' k .

[0046] 4. Repeat steps 2 and 3 until all neighbor nodes of node v have been visited;

[0047] 5. Repeat steps 1 to 4 until queues Q1, Q2, ..., Q n All are empty.

[0048] Therefore, in the embodiment of the present application, each router calculates the path from the node to other nodes respectively, so that the link state routing protocol realizes a hierarchical and distributed routing protocol by allowing each router to independently calculate its own optimal path.

[0049] In step S103, the Pareto optimal path from the current node of each router in the path to each destination node is extracted, so as to improve the efficiency and accuracy of obtaining the optimal path through multiple optimal criteria.

[0050] After each router obtains the path from the current node to other nodes in the global view of the network topology, the embodiment of the present application can then extract the Pareto optimal path from the current node of each router in the above path to each destination node.

[0051] Optionally, in one embodiment of the present application, extracting the Pareto optimal path from the node where each router is currently located in the path to each destination node includes: taking the destination node as the current node, the first n+2-dimensional vector corresponding to the destination node as the current vector, and taking out the previous hop node from the current vector; if the previous hop node is the node where the router is currently located, then connecting the destination node and the previous hop node in sequence, and extracting a path from the node where the router is currently located to the previous hop node; otherwise, searching in the first n+2-dimensional vector of the previous hop node for an n+2-dimensional vector that can calculate the current vector by combining the link from the previous hop node to the current node, and taking the n+2-dimensional vector as the new current vector, and the previous hop node as the new current node; repeatedly performing the operation of taking out the previous hop node from the current vector and extracting a path from the current node to the previous hop node until all n+2-dimensional vectors of the destination node have been visited.

[0052] In an embodiment of the present application, for each destination node u in the global view of the network topology, the specific steps of extracting the Pareto optimal path from s to u are as follows:

[0053] 1. Take node u as the current node and an n+2-dimensional vector of node u as the current vector;

[0054] 2. Take the previous hop node from the current vector;

[0055] 3. If the previous hop node is node s, then connect the destination node with the previous hop node in sequence to extract a path from s to u;

[0056] 4. Otherwise, search in the n+2-dimensional vector of the previous hop node and find an n+2-dimensional vector such that the current vector can be calculated using the vector and the link from the previous hop node to the current node. Then use the n+2-dimensional vector of the previous hop node as the new current vector and the previous hop node as the new current node, and repeat steps 2 to 4.

[0057] 5. Repeat steps 1 to 4 until all n+2-dimensional vectors of node u have been visited.

[0058] Therefore, the embodiments of the present application calculate the Pareto optimal path from the current node to each destination node in the network, thereby ensuring that the correct route can be calculated in an efficient manner when multiple indicators need to be taken into account.

[0059] The following application will further illustrate and introduce the link state routing method based on multiple optimal criteria of the present application through a specific embodiment and in combination with the accompanying drawings.

[0060] In a specific embodiment of the present application, the global view of the network topology includes 4 nodes u, v, w, and x, wherein the bandwidth of the link (x, w) is 20 and the delay is 3, the bandwidth of the link (x, v) is 10 and the delay is 2, the bandwidth of the link (u, v) and the link (v, u) are both 20 and the delay is 4, the bandwidth of the link (w, u) is 5 and the delay is 1, and the bandwidth of the link (v, u) is 10 and the delay is 3, as shown in FIG. Figure 2 As shown, the tuple in the figure represents a two-dimensional vector of metric values ​​of each link. For the path to be calculated, its metric value vector includes two metric values: bandwidth and delay. The larger the bandwidth, the better, and the smaller the delay, the better. Therefore, in the specific embodiment of the present application, n=2.

[0061] The process of calculating the path from x to u using the link state routing method of multiple optimal criteria in the specific embodiment of the present application is as follows:

[0062] 1) Establish the initial 4-dimensional vectors of each node except the source node x, which are (0, +∞, -, w), (0, +∞, -, v), and (0, +∞, -, u);

[0063] 2) Establish two priority queues Q1 and Q2. The elements in Q1 are sorted from large to small according to the first metric value (bandwidth), and the elements in Q2 are sorted from small to large according to the second metric value (delay);

[0064] 3) Initialize the 4-dimensional vector (+∞, 0, x, x) of node x and add it to Q1 and Q2 respectively. At this time, both Q1 and Q2 have only one element (+∞, 0, -, x);

[0065] 4) The head elements of priority queues Q1 and Q2 are both (+∞, 0, x, x), (+∞, 0, x, x) is not inferior to (+∞, 0, x, x), take out (+∞, 0, x, x) and delete it from Q1 and Q2, the current node is x;

[0066] (4.1) Consider the neighbor node w that can be reached from x through the link (x,w). Given l(x,w)=(20,1), construct a vector (min(+∞,20),0+1,x,w)=(20,1,x,w). This vector is better than the existing vector (0,+∞,-,w) of w. Therefore, update (0,+∞,-,w) to (20,1,x,w) and add it to Q1 and Q2.

[0067] (4.2) Consider the neighbor node v that can be reached from x through the link (x, v). Given l(x, v) = (10, 2), construct a vector (min(+∞, 10), 0+2, x, v) = (10, 2, x, v). This vector is better than the existing vector (0, +∞, -, v) of v. Therefore, update (0, +∞, -, v) to (10, 2, x, v) and add it to Q1 and Q2.

[0068] At this time, the elements in Q1 are (20,1,x,w) and (10,2,x,v) in descending order of priority.

[0069] At this time, the elements in Q2 are (20,1,x,w) and (10,2,x,v) in descending order of priority.

[0070] 5) The head elements of priority queues Q1 and Q2 are both (20,1,x,w). (20,1,x,w) is not inferior to (20,1,x,w). Take out (20,1,x,w) and delete it from Q1 and Q2. The current node is w.

[0071] (5.1) Consider the neighbor node v that can be reached from w through the link (w,v). Given l(w,v) = (20,4), construct a vector (min(20,20),1+4,w,v) = (20,5,w,v). This vector is not inferior to all existing vectors of v (10,2,x,v). Therefore, (20,5,w,v) is used as the new vector of node v and added to Q1 and Q2.

[0072] (5.2) Consider the neighbor node u that can be reached from w through the link (w,u). Given l(w,u) = (5,1), construct the vector (min(20,5),1+1,w,u) = (5,2,w,u). This vector is better than the existing vector (0,+∞,-,u) of u. Therefore, update (0,+∞,-,u) to (5,2,w,u) and add it to Q1 and Q2.

[0073] At this time, the elements in Q1 are (20,5,w,v), (10,2,x,v), (5,2,w,u) in descending order of priority.

[0074] At this time, the elements in Q2 are (10,2,x,v), (5,2,w,u), and (20,5,w,v) in descending order of priority.

[0075] 6) The head elements of priority queues Q1 and Q2 are (20,5,w,v) and (10,2,x,v) respectively. (20,5,w,v) is not inferior to (10,2,x,v). Take out (20,5,w,v) and delete it from Q1 and Q2. The current node is v.

[0076] (6.1) Node w is the previous hop node of v in (20,5,w,v), so it is not considered;

[0077] (6.2) Consider the neighbor node u that can be reached from v through the link (v,u). Given l(v,u) = (10,3), construct the vector (min(20,10),5+3,v,u) = (10,8,v,u), which is not inferior to all the existing vectors of u (5,2,w,u). Therefore, (10,8,v,u) is used as the new vector of node u and added to Q1 and Q2.

[0078] At this time, the elements in Q1 are (10,2,x,v), (10,8,v,u), and (5,2,w,u) in descending order of priority.

[0079] At this time, the elements in Q2 are (10,2,x,v), (5,2,w,u), and (10,8,v,u) in descending order of priority.

[0080] 7) The head elements of priority queues Q1 and Q2 are both (10, 2, x, v). (10, 2, x, v) is not inferior to (10, 2, x, v). Take out (10, 2, x, v) and delete it from Q1 and Q2. The current node is v.

[0081] (7.1) Consider the neighbor node w that can be reached from v through the link (v,w). It is known that l(v,w) = (20,4). Construct the vector (min(10,20),2+4,v,w) = (10,6,v,w). The existing vector (20,1,x,w) of w is better than this vector, so no operation is performed.

[0082] (7.2) Consider the neighbor node u that can be reached from v through the link (v,u). Given l(v,u) = (10,3), construct the vector (min(10,10),2+3,v,u) = (10,5,v,u). This vector is better than the existing vector (10,8,v,u) of u. Therefore, update (10,8,v,u) to (10,5,v,u) and add it to Q1 and Q2.

[0083] At this time, the elements in Q1 are (10,5,v,u), (10,8,v,u), (5,2,w,u) in descending order of priority;

[0084] At this time, the elements in Q2 are (5,2,w,u), (10,5,v,u), and (10,8,v,u) in descending order of priority.

[0085] 8) The head elements of priority queues Q1 and Q2 are (10,5,v,u) and (5,2,w,u) respectively. (10,5,v,u) is not inferior to (5,2,w,u). Take out (10,5,v,u) and delete it from Q1 and Q2. The current node is u.

[0086] (8.1) Node u has no adjacent nodes, so no operation is performed;

[0087] At this time, the elements in Q1 are (10,8,v,u), (5,2,w,u) in descending order of priority;

[0088] At this time, the elements in Q2 are (5, 2, w, u) and (10, 8, v, u) in descending order of priority.

[0089] 9) The head elements of priority queues Q1 and Q2 are (10,8,v,u) and (5,2,w,u) respectively. (10,8,v,u) is not inferior to (5,2,w,u). Take out (10,8,v,u) and delete it from Q1 and Q2. The current node is u.

[0090] (9.1) Node u has no adjacent nodes, so no operation is performed;

[0091] At this time, the elements in Q1 are (5, 2, w, u) in descending order of priority;

[0092] At this time, the elements in Q2 are (5, 2, w, u) in descending order of priority.

[0093] 10) The head elements of priority queues Q1 and Q2 are both (5, 2, w, u). (5, 2, w, u) is not inferior to (5, 2, w, u). Take out (5, 2, w, u) and delete it from Q1 and Q2. The current node is u.

[0094] (10.1) Node u has no adjacent nodes, so no operation is performed;

[0095] At this time, both Q1 and Q2 are empty.

[0096] 11) Q1 and Q2 are both empty, and we start to extract the path from x to the destination node u. At this time, u has two vectors: (10,5,v,u) and (5,2,w,u);

[0097] 12) Extract the path from x to the destination node u starting from (10,5,v,u). The specific steps are as follows:

[0098] (12.1) Take the previous hop node v from (10,5,v,u). v has two vectors (10,2,x,v) and (20,5,w,v). Since (min(10,10),2+3,v,u)=(10,5,v,u) can be obtained from (10,2,x,v) and l(v,u)=(10,3), (10,2,x,v) is used as the new current vector and v is used as the new current node.

[0099] (12.2) Take the previous hop node x from (10,2,x,v), where x is the source node. This gives us a path from x to u: xvu.

[0100] 13) Extract the path from x to the destination node u starting from (5,2,w,u). The specific steps are as follows:

[0101] (13.1) Take the previous hop node w from (5,2,w,u). w has only one vector (20,1,x,w). Since (20,1,x,w) and l(w,u)=(5,1) can get (min(20,5),1+1,w,u)=(5,2,w,u), (20,1,x,w) is used as the new current vector and w is used as the new current node.

[0102] (13.2) Take the previous hop node x from (20,1,x,w), where x is the source node. This gives us a path from x to u: xwu.

[0103] (14) After both vectors of u have been visited, the link state routing method based on multiple optimal criteria is completed, and the final output is two paths: xvu and xwu.

[0104] According to the link state routing method based on multiple optimal criteria proposed in the embodiment of the present application, a global view of the network topology with multiple optimal criterion measurement values ​​is constructed based on at least one router, and at least one router in the global view of the network topology is initialized respectively; based on the global view of the network topology, the path from the current node of each initialized router to each other node is calculated; the Pareto optimal path from the current node of each router in the path to each destination node is extracted, thereby improving the efficiency and accuracy of optimal path acquisition through multiple optimal criteria. The present application proposes a routing algorithm using multiple optimal criteria on the basis of existing link state routing protocols and algorithms, so that all Pareto paths under given multiple optimal criteria can be calculated, that is, no other path is better than this path, while taking into account multiple optimal criteria, the efficiency and accuracy of the routing algorithm are ensured.

[0105] Next, a link state routing device based on multiple optimal criteria proposed in an embodiment of the present application is described with reference to the accompanying drawings.

[0106] Figure 3 It is a block diagram of a link state routing device based on multiple optimal criteria according to an embodiment of the present application.

[0107] like Figure 3 As shown, the link state routing device 10 based on multiple optimal criteria includes: an initialization module 100 , a calculation module 200 and an extraction module 300 .

[0108] The initialization module 100 is used to construct a global view of network topology having multiple optimal criterion metric values ​​based on at least one router, and initialize at least one router in the global view of network topology respectively.

[0109] The calculation module 200 is used to calculate the path from the current node of each initialized router to other nodes based on the global view of the network topology.

[0110] The extraction module 300 is used to extract the Pareto optimal path from the current node of each router in the path to each destination node, thereby improving the efficiency and accuracy of obtaining the optimal path through multiple optimal criteria.

[0111] Optionally, in one embodiment of the present application, the initialization module 100 includes: a first construction unit, a queue unit, and an enqueue unit.

[0112] The first construction unit is used to construct a first n+2-dimensional vector for each node in the global view of the network topology, where n is a positive integer.

[0113] Queue unit, used to establish n priority queues.

[0114] The enqueue unit is used to initialize the first n+2-dimensional vector of the node where each router is located, and add it to each priority queue.

[0115] Optionally, in one embodiment of the present application, the calculation module 200 includes: a first comparison unit, a second construction unit, a second comparison unit and a first repetition unit.

[0116] The first comparison unit is used to compare the head elements in each priority queue to search for the best head element that meets the preset conditions, and delete the best head element from each priority queue.

[0117] The second construction unit is used to construct a second n+2 dimensional vector for all adjacent nodes of the node corresponding to the optimal head element.

[0118] A second comparison unit is used to compare the second n+2-dimensional vector of each adjacent node with at least one first n+2-dimensional vector of the adjacent node one by one based on a preset strategy; if the second n+2-dimensional vector is better than any first n+2-dimensional vector, the second n+2-dimensional vector replaces the first n+2-dimensional vector and is added to each priority queue in turn; if the second n+2-dimensional vector is worse than any first n+2-dimensional vector, no operation is performed; if the second n+2-dimensional vector is equal to or incomparable with all first n+2-dimensional vectors, it is added to each priority queue in turn.

[0119] The first repeating unit is used to repeatedly compare the head elements in each priority queue to search for the best head element that meets the preset conditions, and delete the best head element from each priority queue until each priority queue is empty.

[0120] Optionally, in one embodiment of the present application, the extraction module 300 includes: a processing unit, a connection unit, a search unit and a second repetition unit.

[0121] The processing unit is used to take the destination node as the current node, the first n+2-dimensional vector corresponding to the destination node as the current vector, and extract the previous hop node from the current vector.

[0122] The connection unit is used to connect the destination node and the previous hop node in sequence if the previous hop node is the node where the router is currently located, and extract a path from the node where the router is currently located to the previous hop node. Otherwise,

[0123] The search unit is used to search for an n+2-dimensional vector in the first n+2-dimensional vector of the previous hop node that can calculate the current vector by combining the link from the previous hop node to the current node, and use the n+2-dimensional vector as a new current vector and the previous hop node as a new current node.

[0124] The second repetition unit is used to repeatedly perform the operation of taking out the previous hop node from the current vector and extracting a path from the current node to the previous hop node until all n+2-dimensional vectors of the destination node have been visited.

[0125] It should be noted that the above explanation of the link state routing method embodiment based on multiple optimal criteria is also applicable to the link state routing device based on multiple optimal criteria in this embodiment, which will not be described in detail here.

[0126] According to the link state routing device based on multiple optimal criteria proposed in the embodiment of the present application, a global view of the network topology with multiple optimal criterion measurement values ​​is constructed based on at least one router, and at least one router in the global view of the network topology is initialized respectively; based on the global view of the network topology, the path from the current node of each initialized router to each other node is calculated; the Pareto optimal path from the current node of each router in the path to each destination node is extracted, thereby improving the efficiency and accuracy of optimal path acquisition through multiple optimal criteria. The present application proposes a routing algorithm using multiple optimal criteria on the basis of existing link state routing protocols and algorithms, so that all Pareto paths under given multiple optimal criteria can be calculated, that is, no other path is better than this path, while taking into account multiple optimal criteria, the efficiency and accuracy of the routing algorithm are ensured.

[0127] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device may include:

[0128] Memory 401 , processor 402 , and a computer program stored in the memory 401 and executable on the processor 402 .

[0129] When the processor 402 executes the program, the link state routing method based on multiple optimal criteria provided in the above embodiment is implemented.

[0130] Furthermore, the electronic device further comprises:

[0131] The communication interface 403 is used for communication between the memory 401 and the processor 402 .

[0132] The memory 401 is used to store computer programs that can be executed on the processor 402 .

[0133] The memory 401 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.

[0134] If the memory 401, the processor 402 and the communication interface 403 are implemented independently, the communication interface 403, the memory 401 and the processor 402 can be connected to each other through a bus and communicate with each other. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0135] Optionally, in a specific implementation, if the memory 401, the processor 402 and the communication interface 403 are integrated on a chip, the memory 401, the processor 402 and the communication interface 403 can communicate with each other through an internal interface.

[0136] The processor 402 may be a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application.

[0137] An embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the link state routing method based on multiple optimal criteria as described above is implemented.

[0138] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or N embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.

[0139] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of this application, "N" means at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0140] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, fragment or portion of code comprising one or N executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present application belong.

[0141] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purpose of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or N wirings (electronic devices), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways as necessary and then storing it in a computer memory.

[0142] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above embodiment, the N steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. If implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0143] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.

[0144] In addition, each functional unit in each embodiment of the present application may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.

[0145] The storage medium mentioned above may be a read-only memory, a magnetic disk or an optical disk, etc. Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limiting the present application. A person of ordinary skill in the art may change, modify, replace and modify the above embodiments within the scope of the present application.

Claims

1. A link state routing method based on multiple optimal criteria, characterized in that: The following steps are involved: Based on at least one router, construct a global view of network topology having a plurality of optimal criterion metric values, and respectively initialize at least one router in the global view of network topology; Based on the global view of the network topology, calculate the path from the current node of each initialized router to other nodes; Extracting the Pareto optimal path from the current node of each router in the path to each destination node, thereby improving the efficiency and accuracy of obtaining the optimal path through multiple optimal criteria; Initializing at least one router in the global view of the network topology respectively includes: Constructing a first n+2 dimensional vector for each node in the global view of the network topology, where n is a positive integer; Establish n priority queues; Initializing the first n+2-dimensional vector of the node where each router is located, and adding it to each priority queue; The calculating, based on the global view of the network topology, the path from the node where each router is currently located to each other node comprises: Comparing the head elements in each priority queue to search for an optimal head element that meets a preset condition, and deleting the optimal head element from each priority queue; Constructing a second n+2 dimensional vector for all adjacent nodes of the node corresponding to the optimal head element; Based on a preset strategy, the second n+2-dimensional vector of each adjacent node is compared with at least one first n+2-dimensional vector of the adjacent node one by one; if the second n+2-dimensional vector is better than any of the first n+2-dimensional vectors, the second n+2-dimensional vector replaces the first n+2-dimensional vector and is added to each priority queue in sequence; if the second n+2-dimensional vector is worse than any of the first n+2-dimensional vectors, no operation is performed; if the second n+2-dimensional vector is equal to or incomparable with all of the first n+2-dimensional vectors, the second n+2-dimensional vector is added to each priority queue in sequence; Repeatingly comparing the head elements in each priority queue to search for the optimal head element that meets the preset condition, and deleting the optimal head element from each priority queue until each priority queue is empty; The extracting the Pareto optimal path from the node where each router is currently located in the path to each destination node includes: Taking the destination node as the current node, taking the first n+2-dimensional vector corresponding to the destination node as the current vector, and taking the previous hop node from the current vector; If the previous hop node is the node where the router is currently located, the destination node and the previous hop node are sequentially connected to extract a path from the node where the router is currently located to the previous hop node; otherwise, Searching for an n+2-dimensional vector in the first n+2-dimensional vector of the previous hop node that can be used to calculate the current vector by combining the link from the previous hop node to the current node, and using the n+2-dimensional vector as a new current vector and the previous hop node as a new current node; The operation of taking out the previous hop node from the current vector and extracting a path from the current node to the previous hop node is repeatedly performed until all n+2-dimensional vectors of the destination node have been visited.

2. A link state routing device based on multiple optimal criteria, characterized in that: include: An initialization module, configured to construct a global view of a network topology having a plurality of optimal criterion metric values ​​based on at least one router, and to respectively initialize at least one router in the global view of the network topology; A calculation module, used to calculate the path from the current node of each initialized router to other nodes based on the global view of the network topology; An extraction module, used to extract the Pareto optimal path from the current node of each router in the path to each destination node, thereby improving the efficiency and accuracy of optimal path acquisition through multiple optimal criteria; The initialization module includes: A first construction unit, configured to construct a first n+2-dimensional vector for each node in the global view of the network topology, wherein n is a positive integer; Queue unit, used to establish n priority queues; An enqueue unit, configured to initialize the first n+2-dimensional vector of the node where each router is located, and add the vector to each priority queue; The calculation module comprises: A first comparison unit, configured to compare the head elements in each priority queue to search for an optimal head element that meets a preset condition, and delete the optimal head element from each priority queue; A second construction unit, used for constructing a second n+2 dimensional vector for all adjacent nodes of the node corresponding to the optimal head element; a second comparison unit, configured to compare the second n+2-dimensional vector of each adjacent node with at least one first n+2-dimensional vector of the adjacent node one by one based on a preset strategy; if the second n+2-dimensional vector is better than any of the first n+2-dimensional vectors, the second n+2-dimensional vector replaces the first n+2-dimensional vector and adds the second n+2-dimensional vector to each priority queue in sequence; if the second n+2-dimensional vector is worse than any of the first n+2-dimensional vectors, no operation is performed; if the second n+2-dimensional vector is equal to or incomparable with all of the first n+2-dimensional vectors, the second n+2-dimensional vector is added to each priority queue in sequence; A first repeating unit, configured to repeatedly compare the head elements in each priority queue to search for the optimal head element that meets the preset condition, and delete the optimal head element from each priority queue until each priority queue is empty; The extraction module comprises: a processing unit, configured to take the destination node as a current node, the first n+2-dimensional vector corresponding to the destination node as a current vector, and extract a previous hop node from the current vector; a connecting unit, configured to connect the destination node and the previous hop node in sequence if the previous hop node is the node where the router is currently located, and extract a path from the node where the router is currently located to the previous hop node; otherwise, A searching unit, configured to search for an n+2-dimensional vector in the first n+2-dimensional vector of the previous hop node that can be used to calculate the current vector by combining the link from the previous hop node to the current node, and use the n+2-dimensional vector as a new current vector and the previous hop node as a new current node; The second repetition unit is used to repeatedly perform the operation of taking out the previous hop node from the current vector and extracting a path from the current node to the previous hop node until all the n+2-dimensional vectors of the destination node have been visited.

3. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the link state routing method based on multiple optimal criteria as claimed in claim 1.

4. A computer-readable storage medium having a computer program stored thereon, characterized in that: The program is executed by a processor to implement the link state routing method based on multiple optimal criteria as claimed in claim 1.

Citation Information

Patent Citations

  • Routing method based on link quality and queuing delay

    CN106487684A

  • A determination method and system for an optimal network routing path of the internet of things

    CN108092892A