A network routing table updating apparatus and updating method

CN123020447APending Publication Date: 2026-10-30GUANGZHOU LIANDONG XINWANG ELECTRONIC COMMUNICATIONS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611185221.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-06
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

[0005]为了解决现有技术因用户态限速、无法感知内核执行指令的真实进度与负载状况,导致在路由震荡过程中存在资源分配不合理及死锁风险的技术问题,本发明的目的在于提供一种网络路由表更新装置和更新方法,所采用的技术方案具体如下:

Benefits of technology

通过按路由操作类型获取内核态实际执行耗时以确定基准耗时值,精准量化不同路由操作的内核执行成本,再基于表征系统处理能力的多维状态指标确定系统过载概率,实现对系统崩溃风险的动态感知,同时依据系统过载概率确定不小于预设最小生存配额的安全处理时间配额,保障极端过载场景下的指令下发基础通道,最终结合安全处理时间配额与对应类型路由指令的基准耗时值约束下发路由指令,能够自适应调控路由指令下发速率,有效避免内核资源过载,消除控制平面死锁风险,提升路由更新处理的稳定性与网络故障收敛效率。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123020447A_ABST
    Figure CN123020447A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of route updating, in particular to a network route table updating device and method, which solves the technical problem that, in the prior art, because of user state speed limitation and inability to perceive the real progress and load condition of kernel execution instructions, there is the technical problem of unreasonable resource allocation and deadlock risk in the route oscillation process. The method comprises the following steps: for different types of route operations, acquiring actual execution time consumption of the route operations in the kernel state, and determining a benchmark time consumption value of the corresponding type of route operation under the current system load according to the actual execution time consumption; acquiring multi-dimensional state indexes and determining a system overload probability; according to the system overload probability, determining a safe processing time quota allowed for issuing route instructions in the current scheduling period; and in response to the route instructions to be issued, issuing the route instructions to be issued to the kernel according to the safe processing time quota and the benchmark time consumption value of the type to which the route instructions to be issued belong.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of routing update technology, and more specifically to a network routing table update device and update method. Background Technology

[0002] In today's internet backbone and large data center networks, routers commonly rely on dynamic routing protocols such as Border Gateway Protocol (BGP) to maintain network topology. When a link failure or routing policy change occurs, the router receives a large number of routing update messages. These messages need to be processed by routing daemons (such as FRR, BIRD, etc.) and then written to the operating system kernel's forwarding table through the Netlink interface. The efficiency and stability of routing update processing directly determine the overall network connectivity.

[0003] Existing technical solutions typically employ fixed rate-limiting mechanisms (such as the token bucket algorithm) to control the rate at which route updates are sent, in order to prevent the kernel from becoming overloaded due to excessive instantaneous traffic. This user-space counting-based rate-limiting method can only limit the rate at the instruction sending level and cannot perceive the actual progress and load of kernel instruction execution.

[0004] However, existing technologies suffer from unreasonable resource allocation and deadlock risks during routing oscillations due to the asynchronous lag between user-space rate limiting and kernel execution, and the inability to distinguish the actual computational cost differences in the kernel for different routing operations such as adding and deleting. Specifically, when kernel processing capacity decreases, the fixed sending rate can cause kernel buffer backlog and process blocking; high-time-consuming add operations are underestimated in terms of load, while low-time-consuming delete operations are excessively rate-limited, thus affecting fault recovery speed; in extreme cases, the routing daemon process cannot send heartbeat messages in time, causing BGP neighbor disconnection and a wider range of network outages. Summary of the Invention

[0005] To address the technical problems of existing technologies, such as unreasonable resource allocation and deadlock risks during routing oscillations due to user-space rate limiting and the inability to perceive the actual progress and load of kernel instruction execution, the present invention aims to provide a network routing table update device and method, the specific technical solution of which is as follows: Firstly, a network routing table update method is provided, comprising: for different types of routing operations, obtaining the actual execution time of the routing operation in kernel mode, and determining the baseline execution time value of the corresponding type of routing operation under the current system load based on the actual execution time; obtaining multi-dimensional state indicators to characterize the system's processing capacity, and determining the system overload probability based on the multi-dimensional state indicators; the system overload probability is used to characterize the risk level of the system approaching the performance collapse edge; determining the safe processing time quota allowed for issuing routing instructions within the current scheduling cycle based on the system overload probability; the safe processing time quota is greater than a preset minimum survival quota; in response to the routing instruction to be issued, issuing the routing instruction to be issued to the kernel under the constraint of the safe processing time quota, based on the safe processing time quota and the baseline execution time value of the type of the routing instruction to be issued.

[0006] Based on the above technical solution, in the network routing table update method provided by this invention, the actual execution time in kernel mode is obtained according to the routing operation type to determine the baseline time value, accurately quantifying the kernel execution cost of different routing operations. Then, the system overload probability is determined based on multi-dimensional state indicators characterizing the system's processing capacity, realizing dynamic perception of system crash risk. At the same time, a safe processing time quota not less than the preset minimum survival quota is determined according to the system overload probability to ensure the basic channel for instruction issuance under extreme overload scenarios. Finally, the routing instructions are issued in combination with the safe processing time quota and the baseline time value of the corresponding type of routing instruction. This can adaptively adjust the routing instruction issuance rate, effectively avoid kernel resource overload, eliminate the risk of control plane deadlock, and improve the stability of routing update processing and network fault convergence efficiency.

[0007] In conjunction with the first aspect above, in one possible implementation, the method for obtaining the actual execution time of the routing operation in kernel mode specifically includes: attaching probes to the entry and exit points of the routing operation function in kernel mode to obtain the execution timestamp of each routing operation and determine the actual execution time of each routing operation.

[0008] In conjunction with the first aspect above, in one possible implementation, the method for determining the baseline execution time value of the corresponding type of routing operation under the current system load based on the actual execution time specifically includes: for each scheduling cycle, calculating the percentile execution time value within each scheduling cycle according to the type of routing operation based on the actual execution time of multiple routing operations; and using a preset smoothing algorithm, determining the baseline execution time value of the current cycle based on the baseline execution time value of the previous cycle and the percentile execution time value of the current cycle.

[0009] In conjunction with the first aspect above, in one possible implementation, the aforementioned multidimensional state indicators include: the interface transmission latency when the routing protocol daemon calls the kernel interface to send instructions, the system soft interrupt utilization rate, and the standard deviation of the routing operation time fluctuation. The method for obtaining these multidimensional state indicators specifically includes: calculating the average blocking time when the routing protocol daemon calls the kernel interface sending function within the current scheduling period, as the interface transmission latency; calculating the proportion of the soft interrupt processing time increment to the total CPU time increment within the current scheduling period, as the system soft interrupt utilization rate; and calculating the standard deviation of the actual execution time of multiple routing operations within the current scheduling period, as the standard deviation of the routing operation time fluctuation.

[0010] In conjunction with the first aspect mentioned above, in one possible implementation, the method for determining the system overload probability based on multi-dimensional state indicators specifically includes: normalizing the interface transmission delay and fluctuation standard deviation to obtain normalized interface delay and normalized time consumption fluctuation; determining the comprehensive stress index based on the normalized interface delay, system soft interrupt occupancy rate, and normalized time consumption fluctuation; and mapping the comprehensive stress index to the system overload probability with a value within a preset range.

[0011] In conjunction with the first aspect mentioned above, in one possible implementation, the method of mapping the comprehensive pressure index is a nonlinear mapping.

[0012] In conjunction with the first aspect above, in one possible implementation, the method for determining the safe processing time quota allowed for issuing routing instructions within the current scheduling period based on the system overload probability specifically includes: determining an initial quota based on the system overload probability and the physical duration of the scheduling period; the higher the system overload probability, the lower the initial quota; comparing the initial quota with a preset minimum survival quota, and taking the maximum value of the two as the safe processing time quota.

[0013] In conjunction with the first aspect above, in one possible implementation, the method of responding to a routing instruction to be issued and, based on the security processing time quota and the baseline time value of the type of the routing instruction to be issued, issuing the routing instruction to be issued to the kernel under the constraint of the security processing time quota, specifically includes: routing the routing instruction to be issued to a high-priority queue or a normal-priority queue according to the type of the routing instruction; if the system overload probability is greater than a preset risk threshold, instructions are preferentially retrieved from the high-priority queue for processing until the high-priority queue is empty; if there is a remaining security processing time quota at this time, instructions are retrieved from the normal-priority queue for processing; the baseline time value corresponding to the operation type of the retrieved current instruction is queried as the estimated cost of this issuance, and the issuance is determined based on the security processing time quota and the accumulated estimated cost.

[0014] In conjunction with the first aspect above, in one possible implementation, the method for determining whether to allow an instruction to be issued based on the security processing time quota and the accumulated estimated cost specifically includes: if no instruction has been issued in the current scheduling period, then the current instruction is allowed to be issued; if an instruction has been issued in the current scheduling period, and the sum of the accumulated estimated cost and the estimated cost of the current instruction is less than or equal to the security processing time quota, then the current instruction is allowed to be issued; if an instruction has been issued in the current scheduling period, and the sum of the accumulated estimated cost and the estimated cost of the current instruction is greater than the security processing time quota, then the current instruction is rejected, and the scheduling of the current scheduling period is terminated.

[0015] Secondly, a network routing table update device is provided, comprising: a baseline construction module, used to obtain the actual execution time of routing operations in kernel mode for different types of routing operations, and determine the baseline execution time value of the corresponding type of routing operation under the current system load based on the actual execution time; a risk assessment module, used to obtain multi-dimensional state indicators to characterize the system's processing capacity, and determine the system overload probability based on the multi-dimensional state indicators; the system overload probability is used to characterize the risk level of the system approaching the performance collapse edge; a quota calculation module, used to determine the safe processing time quota allowed for issuing routing instructions within the current scheduling cycle based on the system overload probability; the safe processing time quota is greater than a preset minimum survival quota; and an instruction scheduling module, used to respond to the routing instruction to be issued, and, based on the safe processing time quota and the baseline execution time value of the type of the routing instruction to be issued, issue the routing instruction to be issued to the kernel under the constraint of the safe processing time quota.

[0016] The present invention has the following beneficial effects: By obtaining the actual execution time in kernel mode according to the routing operation type to determine the baseline time value, the kernel execution cost of different routing operations is accurately quantified. Then, based on multi-dimensional state indicators that characterize the system's processing capacity, the system overload probability is determined, realizing dynamic perception of the risk of system crash. At the same time, based on the system overload probability, a safe processing time quota not less than the preset minimum survival quota is determined to ensure the basic channel for instruction issuance under extreme overload scenarios. Finally, by combining the safe processing time quota with the baseline time value of the corresponding type of routing instruction to constrain the issuance of routing instructions, the routing instruction issuance rate can be adaptively adjusted, effectively avoiding kernel resource overload, eliminating the risk of control plane deadlock, and improving the stability of routing update processing and network fault convergence efficiency. Attached Figure Description

[0017] To more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 A structural diagram of a network routing table update apparatus provided in one embodiment of the present invention; Figure 2 This is a flowchart of a network routing table update method provided in one embodiment of the present invention. Detailed Implementation

[0019] To further illustrate the technical means and effects adopted by the present invention to achieve its intended purpose, the following, in conjunction with the accompanying drawings and preferred embodiments, details the specific implementation, structure, features, and effects of a network routing table updating device and method proposed according to the present invention. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. Furthermore, specific features, structures, or characteristics in one or more embodiments can be combined in any suitable form.

[0020] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.

[0021] The following description, in conjunction with the accompanying drawings, details a specific scheme for a network routing table update device and update method provided by the present invention.

[0022] Please see Figure 1 The diagram illustrates a network routing table update device according to an embodiment of the present invention. The network routing table update device includes: a baseline construction module 1, a risk assessment module 2, a quota calculation module 3, and an instruction scheduling module 4.

[0023] This network routing table update device is deployed on network routing equipment such as Internet backbone routers and large data center switches running the Linux operating system. Each module relies on the hardware entities of the routing equipment, such as the central processing unit, memory, and forwarding control chip, and works collaboratively with software entities such as the extended Berkeley Packet Filter (eBPF) probe, routing daemon, and system monitoring components to form a complete closed-loop control architecture encompassing micro-cost measurement, macro-risk perception, resource quota allocation, and command scheduling. The following provides a detailed introduction to each module and its sub-modules: The baseline construction module 1 is the core of the micro-cost measurement of the entire device. It mainly relies on the eBPF probe program in the kernel layer of the routing device and the ring buffer hardware storage unit shared by the kernel and user space to realize its function. This module collects the actual execution timestamps of different types of routing operations in the kernel space by attaching monitoring probes to the entry and exit of the kernel routing operation functions, calculates the actual execution time of a single routing operation, and then statistically analyzes the time consumption values ​​by operation type and processes them through a smoothing algorithm to finally determine the baseline time consumption values ​​of various routing operations under the current system load. At the same time, it calculates the standard deviation of the fluctuation of the routing operation time. The baseline time consumption value output by the baseline construction module 1 is directly transmitted to the instruction scheduling module 4 as the cost measurement basis for the issuance of routing instructions. The output standard deviation of the fluctuation is transmitted to the risk assessment module 2, becoming the key input data for system overload risk assessment.

[0024] Risk assessment module 2 is the core of the device's macro-system status perception. It relies on hardware entities such as the system central processing unit monitoring unit and Netlink interface monitoring components of the routing equipment to realize data acquisition and calculation. This module collects the sending delay of the routing protocol daemon calling the kernel interface and the system soft interrupt occupancy rate. At the same time, it receives the standard deviation of the routing operation time fluctuation transmitted by the baseline construction module 1. After normalizing and unifying the dimensions of the three types of multi-dimensional status indicators, the system overload probability is calculated through nonlinear mapping. The system overload probability output by risk assessment module 2 is synchronously transmitted to quota calculation module 3 and instruction scheduling module 4, which not only provides the core basis for resource allocation of quota calculation module 3, but also provides the judgment standard for the scheduling mode switching of instruction scheduling module 4.

[0025] The quota calculation module 3 is the core of the system resource allocation of the device. It is integrated into the routing daemon process scheduling unit in the control plane of the routing device and relies on the control plane processor of the routing device to realize the calculation function. This module receives the system overload probability transmitted by the risk assessment module 2, calculates the preliminary time quota in combination with the physical duration of the scheduling cycle, and then compares the preliminary quota with the preset minimum survival quota and takes the maximum value to finally determine the safe processing time quota in the current scheduling cycle. The safe processing time quota output by the quota calculation module 3 will be directly transmitted to the instruction scheduling module 4 as the core constraint condition for the issuance of routing instructions. At the same time, through the minimum survival quota guarantee setting, a basic channel is reserved for the issuance of instructions in extreme overload scenarios.

[0026] The instruction scheduling module 4 is the core of instruction execution in the device. It relies on the forwarding control chip of the routing equipment and the dual-queue instruction buffer hardware to realize instruction scheduling and issuance. This module simultaneously receives the baseline time value transmitted by the baseline construction module 1, the system overload probability transmitted by the risk assessment module 2, and the security processing time quota transmitted by the quota calculation module 3. First, it divides the instructions into high-priority queues and ordinary-priority queues according to the routing instruction type. Then, it switches the scheduling mode according to the system overload probability. Finally, it combines the baseline time value and the security processing time quota to complete the instruction judgment, deduction, and issuance. After the instruction scheduling module 4 completes the instruction issuance, the relevant data of the kernel's routing operation will flow back to the baseline construction module 1 to provide data support for the next round of baseline time value update, realizing the adaptive closed-loop control of the entire device.

[0027] Please see Figure 2 The diagram illustrates a flowchart of a network routing table update method according to an embodiment of the present invention. The network routing table update method includes: S1. For different types of routing operations, obtain the actual execution time of the routing operation in kernel mode, and determine the baseline execution time value of the corresponding type of routing operation under the current system load based on the actual execution time.

[0028] In some implementations, to obtain the actual execution time of routing operations at the kernel level without interrupting system operation, data collection is achieved by attaching probes to the entry and exit points of the routing operation functions in kernel mode. Specifically, during the system initialization phase, the pre-compiled extended Berkeley packet filter program is loaded into the kernel and attached to the entry and exit points of the Linux kernel routing table operation functions. The probe at the entry point marks the start of the routing operation, and the probe at the exit point marks its end. When the probe at the entry point captures a routing operation, it distinguishes the operation type (addition, deletion, or modification, etc.) by reading the flag bits in the routing message structure of the function parameters.

[0029] Within the current system scheduling cycle, whenever the kernel executes a routing table operation function, the mounted probe performs the following operations: First, it identifies the operation type by reading the function parameter structure at the function entry point. If an insertion operation is detected with a replacement flag, the operation type is marked as modification; if the insertion operation has no replacement flag, it is marked as addition; if it is a deletion operation, it is marked as deletion. Next, it calculates the execution time by obtaining the function entry and exit timestamps and calculating the difference between them to obtain the actual execution time of the operation. This value reflects the actual time consumed in kernel mode. Finally, it reports the data by writing the sampling record containing the operation type and execution time into a circular buffer shared by user mode and kernel mode to complete the time collection for a single routing operation. This non-intrusive method collects the real kernel time of routing operations without modifying the kernel source code, avoiding asynchronous deviations between user-mode monitoring data and the actual kernel state, and providing accurate raw data support for subsequent cost measurement.

[0030] Furthermore, since the time taken for a single operation is subject to random fluctuations due to the CPU cache hit rate and lock contention, directly using instantaneous values ​​may cause severe oscillations in the flow control strategy. Therefore, this step uses an exponentially weighted moving average algorithm to statistically smooth the sampled data in order to generate a stable billing benchmark.

[0031] For each scheduling cycle, at the end of each cycle, based on the actual execution time of multiple routing operations, the quantile time value within each scheduling cycle is calculated according to the type of routing operation. Specifically, the 95th quantile time value is calculated. Using the 95th quantile value instead of the average is to filter out noise introduced by occasional long-tail delays, ensuring that the baseline value covers the vast majority of execution cases. Then, using a preset smoothing algorithm, the baseline time value for the current cycle is determined based on the baseline time value of the previous cycle and the quantile time value of the current cycle. This smoothing algorithm is expressed as: In the formula, The baseline value representing the single operation time of routing operation of type k in the nth scheduling cycle is expressed in units of time (e.g., microseconds). The smoothing factor is used to adjust the sensitivity of the baseline value to changes in the current load, and its value range is an open interval (0, 1). It represents the 95th percentile time of routing operations of type k within the nth scheduling period, that is, 95% of the routing operations of the same type within this period take no more than this value, and its dimension is consistent with the atomic execution time (e.g., microseconds). The baseline value representing the single operation time of routing operation of type k in the (n-1)th scheduling cycle is the unit of time (e.g., microseconds).

[0032] The formula is a weighted summation. By weighting the statistical value of the current period with the baseline value of the previous period, the baseline execution time of the current period is obtained. This is the stable execution time of the same type of routing operation under the current system load after filtering out instantaneous jitter and long-tail noise.

[0033] In particular, during the first scheduling cycle when the system is first started, without any historical data, the statistical results of the current cycle are the most reliable benchmark that reflects the current actual load. The 95th percentile time value of the first scheduling cycle is directly used as the initial benchmark time value. Starting from the second scheduling cycle, the benchmark time value can be smoothly updated using the formula.

[0034] S2. Obtain multi-dimensional state indicators to characterize the system's processing capacity, and determine the system overload probability based on the multi-dimensional state indicators.

[0035] System overload probability is used to characterize the degree of risk of a system approaching the edge of performance collapse.

[0036] In some implementations, multidimensional state metrics include: interface sending latency when the routing protocol daemon calls the kernel interface to send instructions, system soft interrupt utilization, and the standard deviation of the fluctuation in routing operation time.

[0037] The average blocking time when the routing protocol daemon calls the kernel interface send function within the current scheduling period is calculated as the interface send latency. This metric directly reflects the backlog in the kernel receive buffer. Specifically, if the routing protocol daemon calls the kernel interface send function 0 times within the current scheduling period, the interface send latency is directly assigned a value of 0.

[0038] The system soft interrupt utilization rate is defined as the ratio of the increase in soft interrupt processing time to the total increase in CPU time within the current scheduling cycle. This indicator reflects the resource saturation of the kernel in processing network data packets.

[0039] The standard deviation of the actual execution time of multiple routing operations within the current scheduling period is used as the standard deviation of the routing operation time fluctuation. This indicator is used to characterize the dispersion of the execution time of routing operations within the same period. The larger the value, the more drastic the fluctuation of the execution time of the routing operation, the more intense the kernel spinlock contention, and the higher the uncertainty of the system's processing capacity.

[0040] Because the physical dimensions and numerical ranges of interface transmission delay, system soft interrupt occupancy rate, and the standard deviation of routing operation time fluctuation differ significantly, directly combining them can cause large numerical indicators to mask the influence of small numerical indicators. Therefore, it is necessary to first normalize the interface transmission delay and the standard deviation of fluctuation separately, mapping each indicator to the same numerical range to obtain normalized interface delay and normalized time fluctuation. Specifically, for the normalization of interface transmission delay, a maximum tolerable delay is set, representing the typical delay value of the system under unacceptable blocking conditions, for example, preferably set to 1000 microseconds. The interface transmission delay is mapped to the numerical range [0, 1] through maximum linear normalization, while the portion exceeding the maximum tolerable delay is truncated. For the normalization of the standard deviation of routing operation time fluctuation, a fluctuation upper limit is set, representing the typical standard deviation value of the system under severe jitter, for example, preferably set to 100 microseconds. The time fluctuation standard deviation is mapped to the preset numerical range [0, 1] through maximum linear normalization, while the portion exceeding the fluctuation upper limit is truncated.

[0041] Based on the normalized interface latency, system soft interrupt utilization, and normalized latency fluctuation, the comprehensive stress index is determined and expressed as: In the formula, The comprehensive pressure index is a dimensionless parameter that comprehensively reflects the current pressure level of the system. Characterizes the normalized interface transmission delay; Characterizes the system's soft interrupt utilization rate; The standard deviation of the time-consuming fluctuation after normalization; , , The preset weight coefficients, ranging from 0.5 to 5, are used to adjust the contribution of normalized interface latency, system soft interrupt utilization, and normalized latency fluctuation to overload judgment. The larger the coefficient value, the higher the weight of the corresponding feature on system overload. The preset center offset, with a value of 3 to 5, is preferred for the general equalization configuration. It is used to calibrate the critical zero point of the comprehensive pressure index and determines the ease with which the system is judged to be overloaded.

[0042] It should be noted that the weighting coefficients are not subject to the mathematical constraint that the sum of weights equals 1; they are only used to adjust the contribution of each indicator to the stress index. For example, in a routing oscillation scenario (intense kernel lock contention), frequent additions and deletions of routes intensify kernel spinlock contention, significantly increasing latency fluctuations. Increasing the standard deviation weight of the fluctuation can help anticipate kernel execution instability risks in advance. In this case, a weighting can be set... , , In high-concurrency soft interrupt scenarios (network packet storms), system resources are heavily consumed by soft interrupts, leaving the kernel with insufficient capacity to handle routing operations. In such cases, increasing the soft interrupt occupancy weight can quickly detect the risk of resource exhaustion. This can be achieved by setting... , , .

[0043] The formula is a weighted summation and offset correction. First, the three state indicators are weighted and summed using weight coefficients. Then, the center offset is subtracted to correct the offset of the comprehensive pressure index, so that the system triggers an overload warning under a reasonable pressure level.

[0044] After obtaining the comprehensive stress index, a preset nonlinear mapping method is used to map the comprehensive stress index to the system overload probability within a preset range. For example, the nonlinear mapping method is the Sigmoid activation function in a logistic regression model. The S-shaped curve characteristic of this function can simulate the abrupt change in system performance under critical conditions. The specific calculation formula is as follows: In the formula, The probability of system overload in the nth scheduling cycle is used to characterize the risk of the system approaching the edge of performance collapse; e is a natural constant and is the base of the exponential function. The comprehensive pressure index characterizing the nth scheduling cycle; Characterized by using the natural constant e as the base, The result of exponential operation on an exponent.

[0045] The final result obtained by the formula is the system overload probability, which physically means mapping the dimensionless comprehensive pressure index to a risk probability value in the range of (0,1). The S-shaped curve characteristic of this result can accurately simulate the sudden change characteristics of system performance under critical conditions: in the low pressure stage, the overload probability increases slowly with the pressure index; when approaching the critical state, the overload probability jumps rapidly; in the high pressure stage, the overload probability approaches 1.

[0046] S3. Based on the system overload probability, determine the safe processing time quota allowed for issuing routing instructions within the current scheduling cycle.

[0047] The safe processing time quota is greater than the preset minimum survival quota.

[0048] In some implementations, to mitigate the risks of unreliable data and system instability during the initial startup phase, a cold start initialization configuration is required to ensure the system safely passes through the initialization phase. When it is detected that the current system is in its first scheduling control cycle, the system overload probability is forcibly set to 0, indicating that the system is in a healthy state by default. At the same time, the initial safe processing time quota is set to half the physical duration of the scheduling cycle. For example, if the physical duration of the scheduling cycle is set to 50,000 microseconds, the initial safe processing time quota is set to 25,000 microseconds.

[0049] For normal operation cycles without cold starts, an initial quota is determined based on the system overload probability and the physical duration of the scheduling cycle. First, the physical duration of the scheduling cycle and the system's basic reserved time are determined. The physical duration of the scheduling cycle determines the granularity of control, for example, set to 50,000 microseconds. The system's basic reserved time is the time slice reserved for the operating system kernel, for example, set to 5,000 microseconds, to handle timer interrupts, message sending and receiving, and other non-routable update tasks, ensuring that the daemon process does not completely lose its communication capability. Then, the initial quota is obtained through a preset calculation method, as follows: In the formula, The initial quota for the current scheduling cycle is expressed in units of time (e.g., microseconds). The physical duration characterizes the system scheduling cycle, with the dimension of time units, and determines the granularity of control; The basic reserved time of the system is represented by the unit of time, which is the time slice reserved for the operating system kernel to process non-routable update tasks; Characterizes the system overload probability in the nth scheduling cycle.

[0050] Characterizes the maximum available time for route updates within the scheduling period; The availability coefficient is smaller as the system overload probability increases, indicating that the time budget allocated to route updates is compressed more severely. Multiplying these two factors yields the initial quota. This represents the theoretical maximum time budget allowed for issuing routing commands under the current system overload risk, and the initial quota. With system overload probability The rate increases and decreases monotonically, achieving the effect of dynamically compressing the route update time budget based on system risk.

[0051] In extreme network storm scenarios, the system overload probability can deteriorate rapidly and approach 1. If the initial quota is used directly, it will approach 0, rendering the system unable to issue any commands, including deletion / reversal commands that could eliminate routing loops and black holes, thus causing a control plane deadlock. To address this issue, a preset minimum survival quota is introduced to provide a safety margin for the initial quota. The minimum survival quota is typically set as a small percentage of the physical duration of the scheduling cycle, such as 5% of the scheduling cycle duration. For example, when the scheduling cycle is 50,000 microseconds, the minimum survival quota is 2,500 microseconds. The initial quota is compared with the preset minimum survival quota, and the larger of the two is taken as the safe processing time quota.

[0052] The security processing time quota obtained by the above method not only achieves the effect of dynamically adjusting the routing update resource budget according to the system overload risk, but also avoids control plane deadlock caused by quota returning to zero through the bottom-line correction mechanism. This ensures that the system can still issue critical instructions normally under extreme scenarios such as high load and routing oscillation, thereby improving the robustness and stability of routing update scheduling.

[0053] S4. In response to the routing instruction to be sent, the routing instruction to be sent to the kernel is sent according to the security processing time quota and the baseline time value of the type of the routing instruction to be sent, under the constraint of the security processing time quota.

[0054] In some implementations, to prioritize the recovery of core services when resources are limited, routing instructions to be issued are routed to either a high-priority queue or a regular-priority queue based on their type. Specifically, instructions with deletion or reversal operations are placed in the high-priority queue. These instructions typically correspond to network fault responses, and their effectiveness directly determines the time required to eliminate traffic black holes; they are extremely urgent and usually have low execution costs. Instructions with addition or modification operations are placed in the regular-priority queue. These instructions involve learning new paths, consume significant resources, and may contain unstable intermediate states during network instability, allowing for appropriate delays. This implementation prioritizes routing instructions, ensuring the issuance of core fault recovery instructions first, avoiding delays in fault recovery due to resource contention, and providing a queue foundation for subsequent risk-adaptive scheduling modes.

[0055] A risk threshold should be pre-set, matching the rapidly rising segment of the mapping function of the system overload probability. The value is typically between 0.7 and 0.9, with a preferred general configuration of 0.8. The specific value should be adjusted in coordination with business orientation, hardware performance, and minimum allowable quota. For scenarios prioritizing fault recovery or low-performance devices, the threshold can be lowered to 0.6 to 0.7, while for high-performance or convergence-priority scenarios, it can be raised to 0.8 to 0.9. Extreme configurations below 0.5 or above 0.95 should be avoided to balance overload prevention and business convergence efficiency.

[0056] Then, the scheduling order of the two queues is dynamically adjusted based on the system overload probability. If the system overload probability is greater than the preset risk threshold, a defensive scheduling mode is entered, prioritizing the processing of instructions from the high-priority queue. The scheduler forcibly locks most of the safe processing time quota, such as 90% or even 100%, for use only by the high-priority queue. Instructions in the ordinary priority queue are temporarily suspended until the high-priority queue is empty. If there is still safe processing time quota remaining, instructions are then retrieved from the ordinary priority queue for processing. If the system overload probability is less than or equal to the risk threshold, a normal scheduling mode is entered, allowing the two queues to share the safe processing time quota. A weighted round-robin or a preset high-to-low scheduling algorithm can be used to maximize the system's routing convergence speed. This achieves dynamic adaptation of the scheduling strategy to the system risk state. In a high-risk state, it actively suppresses new operations that consume a lot of time, quickly releasing kernel pressure. In a stable state, it balances the efficiency of fault recovery and route learning, improving the robustness and business adaptability of scheduling.

[0057] A command to be issued is retrieved from the head of the target queue. Based on the operation type of the retrieved command, the corresponding baseline time value is retrieved as the estimated cost for this issuance. Then, based on the security processing time quota and the accumulated estimated cost, it is determined whether issuance is permitted. The accumulated estimated cost is the total estimated time obtained by summing the baseline time values ​​corresponding to each issued routing command within the current scheduling cycle, used to measure the security processing time quota already used in the current cycle.

[0058] If no instructions have been issued in the current scheduling cycle, the current instruction is allowed to be issued, even if the estimated cost of the current instruction exceeds the safe processing time quota. This one-time delivery policy ensures that at least one instruction can be processed in each scheduling cycle, avoiding deadlock caused by a single high-cost instruction blocking the queue. If instructions have been issued in the current scheduling cycle, and the sum of the accumulated estimated cost and the estimated cost of the current instruction is less than or equal to the safe processing time quota, the current instruction is allowed to be issued. When issuing the instruction, the Netlink interface is called to write the instruction to the kernel and update the accumulated estimated cost, providing a basis for the admission judgment of subsequent instructions. If instructions have been issued in the current scheduling cycle, and the sum of the accumulated estimated cost and the estimated cost of the current instruction is greater than the safe processing time quota, the current instruction is rejected, kept at the head of the queue, and the scheduling of the current scheduling cycle is terminated to avoid overloading the kernel due to over-quota execution. Under the constraint of safe processing time quota, precise cost control of instruction issuance is achieved. This eliminates the risk of head-of-line blocking and deadlock caused by high-cost instructions by ensuring that the delivery is guaranteed every time, and ensures that the routing update operation does not exceed the kernel's safe processing capacity by cumulative deduction, thereby improving the stability and security of scheduling.

[0059] Based on the above technical solution, the actual execution time in kernel mode is obtained according to the routing operation type to determine the baseline time value, accurately quantifying the kernel execution cost of different routing operations. Then, the system overload probability is determined based on multi-dimensional state indicators that characterize the system's processing capacity, realizing dynamic perception of system crash risk. At the same time, a safe processing time quota not less than the preset minimum survival quota is determined according to the system overload probability to ensure the basic channel for instruction issuance under extreme overload scenarios. Finally, the routing instructions are issued in combination with the safe processing time quota and the baseline time value of the corresponding type of routing instruction. This can adaptively adjust the routing instruction issuance rate, effectively avoid kernel resource overload, eliminate the risk of control plane deadlock, and improve the stability of routing update processing and network fault convergence efficiency.

[0060] It should be noted that the order of the above embodiments of the present invention is merely for descriptive purposes and does not represent the superiority or inferiority of the embodiments. The processes depicted in the accompanying drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0061] The various embodiments in this specification are described in a progressive manner. The same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on describing the differences from other embodiments.

[0062] In this embodiment of the invention, the network routing table update device can be divided into functional units according to the above method example. For example, each function can be divided into its own functional unit, or two or more functions can be integrated into one processing unit. The integrated unit can be implemented in hardware or as a software functional unit. It should be noted that the unit division in this embodiment is illustrative and only represents one logical functional division; in actual implementation, there may be other division methods.

[0063] Although the invention has been described herein in conjunction with various embodiments, those skilled in the art, by reviewing the accompanying drawings and the disclosure, will understand and implement other variations of the disclosed embodiments in carrying out the claimed invention. In this invention, the word "comprising" does not exclude other components or steps, and "a" or "an" does not exclude a plurality. A single processor or other unit can implement several of the functions listed in this invention.

[0064] Although the invention has been described in conjunction with specific features and embodiments, it is obvious that various modifications and combinations can be made therein without departing from the scope of the invention. Accordingly, this specification and drawings are merely illustrative of the invention and are to be considered as covering any and all modifications, variations, combinations, or equivalents within the scope of the invention. Clearly, those skilled in the art can make various alterations and modifications to the invention without departing from its scope. Thus, if such modifications and modifications of the invention fall within the scope of the invention and its equivalents, the invention is also intended to include such modifications and modifications.

Claims

1. A method for updating a network routing table, characterized in that, include: For different types of routing operations, the actual execution time of the routing operation in kernel mode is obtained, and the baseline execution time value of the corresponding type of routing operation under the current system load is determined based on the actual execution time. A multidimensional state index is obtained to characterize the system's processing capacity, and the system overload probability is determined based on the multidimensional state index; the system overload probability is used to characterize the risk level of the system approaching the edge of performance collapse. Based on the system overload probability, determine the safe processing time quota allowed for issuing routing instructions within the current scheduling cycle; The security processing time quota is greater than the preset minimum survival quota; In response to a routing instruction to be issued, the routing instruction to be issued is sent to the kernel under the constraint of the security processing time quota and the baseline time value of the type to which the routing instruction to be issued belongs.

2. The network routing table update method according to claim 1, characterized in that, Obtaining the actual execution time of the routing operation in kernel mode includes: By attaching probes to the entry and exit points of the routing operation functions in kernel mode, the execution timestamps of each routing operation can be obtained, thus determining the actual execution time of each routing operation.

3. The network routing table update method according to claim 2, characterized in that, Based on the actual execution time, determine the baseline execution time value of the corresponding type of routing operation under the current system load, including: For each scheduling cycle, based on the actual execution time of multiple routing operations, the time quantile values ​​within each scheduling cycle are calculated according to the type of routing operation. Using a preset smoothing algorithm, the baseline time value for the current period is determined based on the baseline time value of the previous period and the quantile time value of the current period.

4. The network routing table update method according to claim 1, characterized in that, The multidimensional state indicators include: interface transmission latency when the routing protocol daemon calls the kernel interface to send commands, system soft interrupt utilization, and the standard deviation of the routing operation time fluctuation; obtaining the multidimensional state indicators includes: The average blocking time when the routing protocol daemon calls the kernel interface sending function within the current scheduling period is calculated and used as the interface sending delay. The proportion of the soft interrupt processing time increment to the total central processing unit time increment within the current scheduling cycle is taken as the soft interrupt utilization rate of the system. The standard deviation of the actual execution time of multiple routing operations within the current scheduling period is used as the fluctuation standard deviation of the routing operation time.

5. The network routing table update method according to claim 4, characterized in that, Determining the system overload probability based on the multidimensional state indicators includes: The interface transmission delay and the fluctuation standard deviation are normalized respectively to obtain normalized interface delay and normalized time consumption fluctuation. The comprehensive stress index is determined based on the normalized interface latency, the system soft interrupt utilization rate, and the normalized latency fluctuation. The comprehensive pressure index is mapped to the system overload probability within a preset range.

6. The network routing table update method according to claim 5, characterized in that, The mapping method for the comprehensive pressure index is a non-linear mapping.

7. The network routing table update method according to claim 1, characterized in that, Based on the system overload probability, determine the safe processing time quota allowed for issuing routing instructions within the current scheduling period, including: The initial quota is determined based on the system overload probability and the physical duration of the scheduling cycle; the higher the system overload probability, the lower the initial quota. The initial quota is compared with the preset minimum survival quota, and the maximum value of the two is taken as the security processing time quota.

8. The network routing table update method according to claim 1, characterized in that, In response to a routing instruction to be issued, and based on the security processing time quota and the baseline time value of the type of the routing instruction to be issued, the routing instruction to be issued is issued to the kernel under the constraint of the security processing time quota, including: Based on the type of routing instruction, the routing instructions to be sent are distributed to either a high-priority queue or a normal-priority queue; If the system overload probability is greater than the preset risk threshold, instructions are preferentially retrieved from the high-priority queue for processing until the high-priority queue is empty. If the safety processing time quota is still available at this time, instructions are retrieved from the normal priority queue for processing. The baseline time value corresponding to the operation type of the retrieved current instruction is queried as the estimated cost of this issuance, and the issuance is determined based on the security processing time quota and the accumulated estimated cost.

9. The network routing table update method according to claim 8, characterized in that, Based on the security processing time quota and the accumulated estimated costs, determine whether to allow the issuance, including: If no instructions have been issued within the current scheduling period, then the issuance of the current instruction is permitted; If an instruction has already been issued within the current scheduling period, and the sum of the accumulated estimated cost and the estimated cost of the current instruction is less than or equal to the security processing time quota, then the current instruction is allowed to be issued. If an instruction has already been issued within the current scheduling period, and the sum of the accumulated estimated cost and the estimated cost of the current instruction exceeds the security processing time quota, then the issuance of the current instruction will be rejected, and the scheduling of the current scheduling period will be terminated.

10. A network routing table update device, characterized in that, include: The benchmark construction module is used to obtain the actual execution time of the routing operation in kernel mode for different types of routing operations, and determine the benchmark execution time value of the corresponding type of routing operation under the current system load based on the actual execution time. The risk assessment module is used to acquire multi-dimensional state indicators to characterize the system's processing capacity, and to determine the system overload probability based on the multi-dimensional state indicators; the system overload probability is used to characterize the degree of risk that the system is approaching the edge of performance collapse. The quota calculation module is used to determine the safe processing time quota allowed for issuing routing instructions within the current scheduling period based on the system overload probability; the safe processing time quota is greater than the preset minimum survival quota. The instruction scheduling module is used to respond to the routing instruction to be issued, and, based on the security processing time quota and the baseline time value of the type of the routing instruction to be issued, issue the routing instruction to be issued to the kernel under the constraint of the security processing time quota.