CN-122027544-A - OSPF dynamic route optimization method, medium, equipment and product
Abstract
The invention discloses an OSPF dynamic route optimization method, medium, equipment and product, relating to the OSPF route optimization field, wherein the method comprises the steps of deploying a link agent on a router in an OSPF area, and calculating logic cost based on static cost, local strategy and link QoS data acquired in real time; the method comprises the steps of taking areas as nodes, taking links between the areas as edges, taking logic cost as weight of the edges to construct a topological graph, obtaining bandwidth, delay and current utilization rate of the links, combining the logic cost and topology embedding to construct area feature vectors, deploying area agents on area border routers, wherein the input of the area agents is the area feature vectors, the output of the area agents is a link cost scaling coefficient between the areas, embedding a TLV field comprising the cost scaling coefficient into a Type10 LSA of a link state database, updating the link state database, calculating an optimal path by using an SPF algorithm, and generating a routing table. The OSPF cost configuration of the present invention has dynamic self-adapting capability.
Inventors
- LI SHIZHAO
- WANG HAIYANG
Assignees
- 重庆工程职业技术学院
Dates
- Publication Date
- 20260512
- Application Date
- 20260129
Claims (10)
- 1. An OSPF dynamic route optimization method is characterized by comprising the following steps: Acquiring link QoS data in real time; Deploying a link agent on a router in each area of the OSPF, wherein the link agent is responsible for collecting link state information of the area and calculating logic cost of links in the area based on static cost, local strategy and link QoS data acquired in real time; constructing a topological graph by taking the areas as nodes and the links between the areas as edges and the logic cost of the links as the weight of the edges, and generating topological embedding of each link by using a graph neural network model; Obtaining the bandwidth, delay and current utilization rate of a link, and embedding and constructing a regional feature vector by combining the logic cost of the link and the topology of the link; the regional proxy is deployed on the regional boundary router, wherein the input of the regional proxy is a regional feature vector, and the output is a link cost scaling coefficient between regions; Writing the cost scaling coefficient into a TLV structure, embedding a TLV field comprising the cost scaling coefficient into a Type10 LSA of a link state database, and updating the link state database; And calculating an optimal path by using an SPF algorithm and generating a routing table based on the updated link state database.
- 2. The method for dynamic route optimization of OSPF according to claim 1, wherein the link QoS data comprises utilization, delay, and packet loss rate.
- 3. The OSPF dynamic route optimization method of claim 1, wherein the cost of the intra-area link is calculated based on static cost, local policy and link QoS data acquired in real time, and the formula is as follows: Wherein, the The current cost, representing the links within region i, is a dynamic value, Representing the static cost weight of the model, Representing the current static cost of region i, 、 And Respectively is 、 And Is used for the dynamic weight coefficient of the (c), Indicating the utilization of region i Is used to determine the current cost component of (1), The reference delay for the region i is indicated, The reference packet loss rate for region i is indicated, The policy adjustment item representing region i.
- 4. The method of claim 1 wherein the regional proxy uses a lightweight depth Actor-Critic model.
- 5. The method for dynamic route optimization of OSPF of claim 1, wherein the regional feature vector is expressed as: Wherein, the Indicating the link bandwidth of region i, The delay of the region i is indicated, Indicating the current utilization of the area i, Representing the link logical cost of region i, The link topology embedding for region i, i=0, 1.
- 6. The method for dynamic route optimization of OSPF of claim 1, wherein the method is based on total network utilization And maximum link load The reward function of the regional proxy is designed as follows: Wherein, the Indicating that the current prize is to be awarded, And Representing the weight parameters.
- 7. The method of OSPF dynamic route optimization of claim 1, wherein the TLV field comprising a cost scaling factor is represented by [ TLV type identifier, total length of TLV field, link cost scaling factor, timestamp, MD5 checksum ].
- 8. A computer-readable storage medium, in which a computer program is stored, characterized in that the method according to any one of claims 1 to 7 is implemented when the computer program is executed by a processor.
- 9. An electronic device comprising a processor and a memory, the processor being interconnected with the memory, wherein the memory is configured to store a computer program comprising computer readable instructions, the processor being configured to invoke the computer readable instructions to perform the method of any of claims 1-7.
- 10. A computer program product comprising computer programs/instructions which, when executed by a processor, implement the method of any of claims 1 to 7.
Description
OSPF dynamic route optimization method, medium, equipment and product Technical Field The present invention relates to the field of OSPF route optimization technologies, and in particular, to an OSPF dynamic route optimization method, medium, device, and product. Background Open Shortest path first (Open Shortest PATH FIRST, OSPF) is a link state routing protocol that relies on each router in the network to periodically broadcast link state advertisements (LINK STATE ADVERTISEMENT, LSA) and build a complete topology Database locally, link state Database (LINK STATE Database, LSDB), and then calculate the routing table by Dijkstra's Shortest path algorithm. The cost of conventional OSPF is usually manually configured by a network administrator according to static indexes such as link bandwidth, delay and the like, and lacks the capability of responding to the dynamic changes of traffic characteristics, burst traffic and link states. To overcome the above-mentioned deficiencies, there have been attempts to introduce reinforcement learning into OSPF route optimization. For example, the link cost is adjusted in real time within the whole network range by using deep reinforcement learning (Deep Reinforcement Learning, DRL), or a centralized learning module is deployed on an SDN control plane, and network self-adaption is realized by issuing OSPF parameters. However, these solutions have the following drawbacks in general: 1. And in the single-layer learning structure, most schemes only adopt a single global DR proxy to carry out unified decision on the whole network, so that the computational complexity grows exponentially along with the network scale, and the real-time operation in a large-scale backbone network is difficult. 2. Centralized deployment, namely, relying on an external SDN controller or a special server to carry out model reasoning and parameter issuing, increasing network delay and single-point fault risks, and being difficult to maintain consistency in network segmentation or cross-domain scenes. 3. Offline training, lack of online incremental learning, that is, most of the realization adopts a fixed model after offline training, and is difficult to quickly adapt to topology change, service burst or link failure, so that the route optimization effect is reduced. Disclosure of Invention The invention aims to solve the problem that the traditional OSPF cost configuration lacks dynamic self-adaption capability, and provides an OSPF dynamic route optimization method which comprises the following steps: acquiring link QoS (Quality of Service ) data in real time; Deploying a link agent on a router in each area of the OSPF, wherein the link agent is responsible for collecting link state information of the area and calculating logic cost of links in the area based on static cost, local strategy and link QoS data acquired in real time; constructing a topological graph by taking the areas as nodes and the links between the areas as edges and the logic cost of the links as the weight of the edges, and generating topological embedding of each link by using a graph neural network model; Obtaining the bandwidth, delay and current utilization rate of a link, and embedding and constructing a regional feature vector by combining the logic cost of the link and the topology of the link; the regional proxy is deployed on the regional boundary router, wherein the input of the regional proxy is a regional feature vector, and the output is a link cost scaling coefficient between regions; Writing the cost scaling coefficient into a TLV structure, embedding a TLV field comprising the cost scaling coefficient into a Type10 LSA of a link state database, and updating the link state database; Based on the updated link state database, a Shortest path first (Shortest PATH FIRST, SPF) algorithm is used to calculate the optimal path and generate a routing table. Further, the link QoS data includes utilization, delay, and packet loss rate. Further, the cost of the intra-area link is calculated based on the static cost, the local policy and the link QoS data acquired in real time, and the formula is as follows: Wherein, the The current cost, representing the links within region i, is a dynamic value,Representing the static cost weight of the model,Representing the current static cost of region i,、AndRespectively is、AndIs used for the dynamic weight coefficient of the (c),Indicating the utilization of region iIs used to determine the current cost component of (1),The reference delay for the region i is indicated,The reference packet loss rate for region i is indicated,The policy adjustment item representing region i. Further, the regional proxy adopts a lightweight depth Actor-Critic model. Further, the region feature vector is expressed as: Wherein, the Indicating the link bandwidth of region i,The delay of the region i is indicated,Indicating the current utilization of the area i,Representing the link logical cost of region i,