Virtual routing configuration control method and device, storage medium and electronic equipment
By constructing feature tensors and component topology tensors for virtual routes and combining them with deep reinforcement learning algorithms to optimize the configuration of virtual routes, the problem of low resource utilization is solved, and dynamic tuning of virtual route performance and efficient resource utilization are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- JINAN INSPUR DATA TECH CO LTD
- Filing Date
- 2026-03-16
- Publication Date
- 2026-06-12
AI Technical Summary
Traditional static configuration methods cannot adapt to the high concurrency, multi-tenancy, and dynamic spatiotemporal distribution characteristics of cloud services, resulting in low resource utilization of virtual routers.
By acquiring queue data, CPU data, and traffic data of virtual routers, feature extraction and encoding are performed to construct queue feature tensors, CPU feature tensors, and component topology tensors. Combined with deep reinforcement learning algorithms, configuration prediction is performed to generate target actions to optimize the configuration parameters of virtual routers.
It enables dynamic, closed-loop optimization of virtual routing performance, improves resource utilization, and can respond to dynamic changes in network traffic in real time and optimize throughput, latency, packet loss rate, and energy consumption.
Smart Images

Figure CN121842080B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computers, and more specifically, to a configuration control method and apparatus for a virtual router, a storage medium, and an electronic device. Background Technology
[0002] In cloud computing environments, virtual routers, as key components, face performance challenges due to dynamic changes in network traffic and uneven resource allocation. Traditional static configuration methods cannot adapt to the high concurrency, multi-tenancy, and dynamic spatiotemporal distribution characteristics of cloud services, leading to a mismatch between computing resources (such as CPU cores) and network resources (such as network interface card queues). This results in phenomena such as some cores being overloaded while others are idle, ultimately leading to low resource utilization of virtual routers. Summary of the Invention
[0003] This application provides a configuration control method and apparatus for virtual routing, a storage medium, and an electronic device to at least solve the technical problem of low resource utilization in virtual routing in related technologies.
[0004] According to one embodiment of this application, a configuration control method for a virtual router is provided, comprising: acquiring queue data, CPU data, and traffic data of the virtual router, and acquiring component operation information of the virtual router; performing feature extraction on the queue data, CPU data, and traffic data to obtain queue feature tensors, CPU feature tensors, and traffic feature tensors associated with the virtual router, and performing feature encoding on the component operation information to obtain component topology tensors associated with the virtual router, wherein the component topology tensors are used to indicate the component dependencies of the virtual router; combining the queue feature tensors, CPU feature tensors, traffic feature tensors, and component topology tensors to obtain a target state tensor associated with the virtual router, wherein the target state tensor is used to indicate the operating state of the virtual router; performing configuration prediction on the virtual router based on the target state tensor to obtain a target action corresponding to the target state tensor, and executing the target action, wherein the target action is used to correct the configuration parameters of the virtual router.
[0005] According to one embodiment of this application, a configuration control device for a virtual router is provided, comprising: an acquisition unit, configured to acquire queue data, CPU data, and traffic data of the virtual router, and to acquire component operation information of the virtual router; an extraction unit, configured to extract features from the queue data, CPU data, and traffic data to obtain queue feature tensors, CPU feature tensors, and traffic feature tensors associated with the virtual router, and to encode features from the component operation information to obtain component topology tensors associated with the virtual router, wherein the component topology tensors are used to indicate component dependencies of the virtual router; a combination unit, configured to combine the queue feature tensors, CPU feature tensors, traffic feature tensors, and component topology tensors to obtain a target state tensor associated with the virtual router, wherein the target state tensor is used to indicate the operating state of the virtual router; and a prediction unit, configured to predict the configuration of the virtual router based on the target state tensor to obtain a target action corresponding to the target state tensor, and to execute the target action, wherein the target action is used to correct the configuration parameters of the virtual router.
[0006] According to yet another embodiment of this application, a computer-readable storage medium is also provided, in which a computer program is stored, wherein the computer program is configured to perform the steps in any of the above method embodiments when it is run.
[0007] According to yet another embodiment of this application, an electronic device is also provided, including a memory and a processor, wherein a computer program is stored in the memory and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.
[0008] The embodiments provided in this application acquire queue data, CPU data, and traffic data of the virtual router, as well as component operation information. By extracting and encoding features from this data, detailed queue feature tensors, CPU feature tensors, traffic feature tensors, and component topology tensors that reflect the current system state are constructed. This multi-scale state modeling technique not only captures instantaneous changes in traffic but also understands the dependencies and topological relationships between components, making optimization strategies more accurate and comprehensive. Based on the aforementioned state tensors, configuration prediction is performed, and the resulting target actions can simultaneously consider multiple optimization objectives such as throughput, latency, packet loss rate, and energy consumption, achieving multi-objective collaborative optimization. The generated optimization strategy can not only respond to dynamic changes in network traffic in real time but also understand the utilization efficiency of underlying hardware resources. By combining the queue feature tensor, CPU feature tensor, traffic feature tensor, and component topology tensor, the obtained target state tensor contains a comprehensive description of the virtual router's operating state. Configuration prediction based on this state tensor can generate intelligent actions that take into account historical traffic patterns, current system state, and hardware topology constraints, enabling dynamic and closed-loop optimization of virtual routing performance. This, in turn, improves the resource utilization of virtual routing and solves the technical problem of low resource utilization in related technologies. Attached Figure Description
[0009] Figure 1 This is a hardware structure block diagram of a virtual routing configuration control method according to an embodiment of this application.
[0010] Figure 2 This is a flowchart of a virtual routing configuration control method according to an embodiment of this application.
[0011] Figure 3 This is a structural block diagram of a virtual routing configuration control device according to an embodiment of this application. Detailed Implementation
[0012] The embodiments of this application will be described in detail below with reference to the accompanying drawings and examples.
[0013] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0014] To facilitate a clearer understanding of the embodiments of this application, some terms appearing in the embodiments are explained below.
[0015] DRL (Deep Reinforcement Learning): An artificial intelligence technique that combines deep learning and reinforcement learning to make autonomous decisions in complex environments.
[0016] NUMA (Non-Uniform Memory Access): A memory architecture design for multiprocessor computers where different processors may experience different latency and bandwidth when accessing different memory regions.
[0017] RSS (Receive Side Scaling): A network driver technology that efficiently distributes network received traffic across multiple CPU cores.
[0018] vRouter (Virtual Router): A virtual router. Router functionality implemented in software; a key component of Network Functions Virtualization (NFV).
[0019] PMD (Poll Mode Driver): A high-performance network packet processing mechanism that uses continuous hardware polling instead of interrupts to avoid kernel context switching overhead.
[0020] LLC (Last Level Cache): The last level of cache. It is the last level in the CPU cache hierarchy, with the largest capacity and the slowest speed of the shared cache.
[0021] IPC (Instructions Per Clock): Instructions per clock cycle. A metric for CPU performance, representing the average number of instructions executed by the processor per clock cycle.
[0022] LPM (Longest Prefix Match): The core algorithm used in IP networks to find the next-hop address in the routing table.
[0023] PPO (Proximal Policy Optimization): An advanced reinforcement learning algorithm that improves training stability and efficiency by limiting the magnitude of policy updates.
[0024] RCU (Read-Copy-Update): A mechanism for achieving efficient, lock-free data structure synchronization in concurrent environments.
[0025] The methods and embodiments provided in this application can be executed on a computer terminal or similar computing device. Taking running on a computer terminal as an example, Figure 1 This is a hardware structure block diagram of a computer terminal for a virtual routing configuration control method according to an embodiment of this application. Figure 1 As shown, a computer terminal may include one or more ( Figure 1 Only one is shown in the diagram. A processor 102 (which may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.) and a memory 104 for storing data are also shown. The computer terminal may further include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the computer terminal described above. For example, the computer terminal may also include components that are more complex than those described above. Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.
[0026] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the virtual routing configuration control method in this embodiment. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, thus implementing the above-described method. The memory 104 may include high-speed random access memory and non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to a computer terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0027] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider for the computer terminal. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module used for wireless communication with the Internet.
[0028] As an optional solution, this embodiment provides a configuration control method for virtual routing, such as... Figure 2 As shown, it includes:
[0029] S202, obtain queue data, central processing unit data and traffic data of the virtual router, as well as obtain component operation information of the virtual router;
[0030] S204, extract features from queue data, CPU data and traffic data to obtain queue feature tensor, CPU feature tensor and traffic feature tensor associated with virtual routes, and encode the component running information to obtain component topology tensor associated with virtual routes, wherein the component topology tensor is used to indicate the component dependencies of virtual routes.
[0031] S206, combine the queue feature tensor, central processing unit feature tensor, traffic feature tensor and component topology tensor to obtain the target state tensor associated with the virtual route, wherein the target state tensor is used to indicate the running state of the virtual route;
[0032] S208, perform configuration prediction on the virtual route based on the target state tensor, obtain the target action corresponding to the target state tensor, and execute the target action, wherein the target action is used to correct the configuration parameters of the virtual route.
[0033] Optionally, in this embodiment, the queue data of the virtual router refers to the real-time status information of each receive (Rx) and send (Tx) queue in the virtual router (vRouter), mainly including queue depth, instantaneous high watermark value, average data packet dwell time, batch processing size, number of lost packets, and queue empty polling rate, etc. By collecting queue data, the load and processing efficiency of the network interface can be monitored, and queue congestion and processing bottlenecks can be identified.
[0034] Optionally, in this embodiment, the central processing unit data involves the computational behavior characteristics of the CPU cores running the forwarding logic, including the effective instruction cycle (reflecting the actual packet processing cycle), idle cycle (reflecting the polling of the empty queue) of each core, the hit / miss rate of each level of cache (L1, L2, LLC), the missing status of the Data Translation Back Buffer (DTLB), branch prediction efficiency, and instructions per clock cycle (IPC), thereby gaining a deeper understanding of the actual utilization of the CPU cores and the microarchitecture performance.
[0035] Optionally, in this embodiment, the traffic data includes the characteristics of the data flow passing through the virtual router, such as average packet length, flow concurrency, new connection rate, proportion of large flows, and quintuple entropy value, which are used to evaluate the distribution characteristics of traffic, service type, and service level requirements, and are an important reference for optimization strategies.
[0036] Optionally, in this embodiment, the component runtime information includes the state of key components within the virtual router, such as the routing table structure, flow table caching strategy, and memory layout, as well as the dynamic topology relationships of hardware resources such as NICs (Network Interface Cards), PCIe buses, and NUMA nodes. By encoding this information to generate a component topology tensor, the dependencies and topological influences between components can be reflected, facilitating understanding and optimization by the intelligent model.
[0037] Optionally, in this embodiment, the queue feature tensor, central processing unit feature tensor, flow feature tensor, and component topology tensor represent multidimensional numerical representations of queue state, CPU performance indicators, flow characteristics, and component dependencies, respectively, and serve as inputs for the intelligent model to evaluate system state and generate optimization strategies.
[0038] Optionally, in this embodiment, the target state tensor is constructed by combining queue, CPU, traffic feature tensor and component topology tensor. It comprehensively describes the operating state of the virtual router at a specific moment and provides a comprehensive perspective for subsequent configuration prediction.
[0039] Optionally, in this embodiment, configuration prediction is achieved by analyzing the target state tensor and using a deep reinforcement learning algorithm to predict a set of policy actions that can improve the performance of virtual routing, including but not limited to RSS re-fragmentation and flow traction, polling parameter adjustment, routing table structure optimization, CPU core frequency control, and memory access policy adjustment.
[0040] Optionally, in this embodiment, the target action is the result of configuration prediction, specifically referring to a set of action instructions proposed by the intelligent model based on the current virtual router's operating status and business requirements, for modifying or optimizing vRouter configuration parameters, aiming to improve forwarding efficiency, reduce latency, and improve resource utilization efficiency and energy efficiency ratio.
[0041] Optionally, in this embodiment, a series of low-overhead, high-frequency telemetry techniques are used to collect real-time queue data, central processing unit data, and traffic data of the virtual router, as well as related component operation information. This data is retrieved through a dedicated acquisition module, ensuring its real-time nature and accuracy.
[0042] The collected raw data is transformed into a vector form understandable by neural networks through feature engineering. Queue data, CPU data, and traffic data are converted into queue feature tensors, CPU feature tensors, and traffic feature tensors, respectively. Simultaneously, component operation information is encoded using a graph neural network (GNN) to generate component topology tensors reflecting component dependencies and topological influences. This stage uses data preprocessing and smoothing techniques to eliminate noise and retain key information.
[0043] Next, the system fuses the queue feature tensor, CPU feature tensor, traffic feature tensor, and component topology tensor to generate a target state tensor that comprehensively describes the current state of the virtual router. This tensor includes both numerical statistics and an understanding of the topology, providing comprehensive runtime information for the intelligent model.
[0044] The target state tensor is input into the intelligent scheduling decision module, where a deep reinforcement learning framework is used for policy prediction. Based on the current state and predicted future traffic trends, the model generates a set of optimal configuration policies, i.e., target actions. These target actions are then transformed by the transactional configuration execution module and applied atomically and securely to the virtual routing data plane, achieving millisecond-level adaptive performance tuning. During configuration changes, the system utilizes Read Replication Update (RCU) and fault rollback mechanisms to ensure seamless execution of changes and system stability.
[0045] The embodiments provided in this application acquire queue data, CPU data, and traffic data of the virtual router, as well as component operation information. By extracting and encoding features from this data, detailed queue feature tensors, CPU feature tensors, traffic feature tensors, and component topology tensors that reflect the current system state are constructed. This multi-scale state modeling technique not only captures instantaneous changes in traffic but also understands the dependencies and topological relationships between components, making optimization strategies more accurate and comprehensive. Based on the aforementioned state tensors, configuration prediction is performed, and the resulting target actions can simultaneously consider multiple optimization objectives such as throughput, latency, packet loss rate, and energy consumption, achieving multi-objective collaborative optimization. The generated optimization strategy can not only respond to dynamic changes in network traffic in real time but also understand the utilization efficiency of underlying hardware resources. By combining the queue feature tensor, CPU feature tensor, traffic feature tensor, and component topology tensor, the obtained target state tensor contains a comprehensive description of the virtual router's operating state. Configuration prediction based on this state tensor can generate intelligent actions that take into account historical traffic patterns, current system state, and hardware topology constraints. These actions cover multiple aspects such as RSS adjustment, CPU core and queue binding, batch size adjustment, frequency control, and memory access optimization, realizing dynamic and closed-loop tuning of virtual router performance, thereby achieving the technical effect of improving the resource utilization of virtual routers.
[0046] As an optional approach, configuration prediction of the virtual route is performed based on the target state tensor to obtain the target action corresponding to the target state tensor, including:
[0047] Input the target state tensor into the action decision model to obtain a set of configuration vectors output by the action decision model;
[0048] If a set of configuration vectors includes a desired configuration vector that meets the desired conditions, obtain the desired action corresponding to the desired configuration vector;
[0049] Each expected action corresponding to a set of configuration vectors is identified as the target action.
[0050] Optionally, in this embodiment, the action decision model refers to an intelligent module based on deep learning technology (especially deep reinforcement learning, DRL). Its main function is to predict a set of optimal configuration adjustment actions based on the input system state (represented as a target state tensor) to improve the data plane performance and resource utilization efficiency of the virtual router. This model typically contains a neural network structure capable of processing multi-dimensional state data and outputting multi-dimensional, multi-level optimization strategies.
[0051] Optionally, in this embodiment, the configuration vector is a specific representation of the optimization strategy output by the action decision model. It is a vector containing multiple parameters, which cover multiple adjustable configuration points of the virtual routing data plane, such as RSS hash configuration, round-robin batch size, CPU core frequency, memory access policy, routing table structure, etc. The value of each parameter represents an adjustment suggestion for the corresponding configuration point, and the configuration vector as a whole constitutes a set of collaborative optimization strategies.
[0052] Optionally, in this embodiment, the expected conditions refer to a series of conditions and standards formulated based on the current state of the system and future predictions to evaluate whether the configuration prediction results meet the performance objectives. For example, the expected conditions may include specific objectives such as "throughput improvement of more than 5%", "long-tail latency reduction to below 3ms", and "energy consumption reduction of more than 20%". These conditions constitute constraints on the model output, ensuring that the generated strategy is both effective and safe.
[0053] Optionally, in this embodiment, the expected configuration vector is one type of configuration vector. It is generated by the action decision model, and its predicted configuration adjustment result can achieve the optimization objective under expected conditions. The expected configuration vector is "feasible" and "preferred" among all possible optimization strategies. It will be further transformed into specific operational actions and executed in the virtual routing runtime environment to achieve the expected performance optimization.
[0054] Optionally, in this embodiment, the expected actions are specific execution actions based on the expected configuration vector transformed into the virtual routing data plane, including but not limited to adjusting RSS mapping, modifying the polling parameters of the PMD thread, dynamically adjusting the CPU frequency, and optimizing the routing table structure. These actions are a direct reflection of the prediction results of the action decision model, aiming to fine-tune the operating parameters of the virtual router to cope with changes in dynamic load and traffic patterns.
[0055] Optionally, in this embodiment, the target state tensor (containing queue features, CPU features, traffic features, and component topology dependency information) is input into the action decision model. The neural network structure inside the model processes the input tensor and predicts a set of possible configuration vectors by identifying key patterns and trends in the state.
[0056] From a set of configuration vectors, the system further filters out those expected configuration vectors that meet or exceed the expected conditions. The expected conditions are specifically defined performance metric thresholds or business requirements. The configuration adjustment results predicted by the model will be evaluated to determine whether the expected performance improvement or optimization goals can be achieved.
[0057] For expected configuration vectors that meet the expected conditions, the system translates them into specific operational actions, such as "redirecting traffic in queue 2 to queue 5" or "adjusting the polling batch size of CPU core 3 to 64". These expected actions represent suggested changes to the virtual router's operating parameters, aiming to improve system performance and resource utilization efficiency.
[0058] Among a series of anticipated actions, the system selects the safest and most efficient actions as the target actions. Once the target actions are determined, they are applied atomically and rollbackably to the virtual routing data plane through a transactional configuration execution module, ensuring the security and efficiency of configuration changes. This process achieves seamless integration between the intelligent model and the physical system, ensuring the effectiveness of performance optimization strategies in the real world.
[0059] The embodiments provided in this application utilize a deep reinforcement learning framework to "learn" how to optimize system performance by adjusting the configuration parameters of virtual routes from the target state tensor. The configuration vector output by the model contains optimization suggestions across multiple dimensions, while the expected conditions serve as a screening criterion, helping the system identify those expected configuration vectors that can truly bring significant performance improvements. Finally, the expected configuration vectors are transformed into specific operational actions, forming a set of target actions, which are applied to the system atomically to achieve millisecond-level performance tuning. This not only overcomes the limitations of traditional static configuration schemes in dealing with dynamic loads but also achieves deep optimization of the virtual route data plane performance through the dynamic prediction and fine-tuning of intelligent models.
[0060] As an alternative approach, if a set of configuration vectors includes expected configuration vectors that meet the expected conditions, the expected action corresponding to the expected configuration vector is obtained, including:
[0061] If a set of configuration vectors includes a first expected configuration vector that meets the first expected condition, obtain the first expected action corresponding to the first expected configuration vector. The first expected condition is used to indicate that there is a processor load of a first central processor in the virtual router that is greater than a first migration load threshold and a processor load of a second central processor that is less than a second migration load threshold. The first expected action is used to indicate that the traffic of the first central processor is migrated to the second central processor. The first migration load threshold is greater than the second migration load threshold.
[0062] Optionally, in this embodiment, the first expected condition refers to the processor load of a specific CPU (i.e., the first central processing unit) in the virtual router exceeding a preset first migration load threshold, while the processor load of another specific CPU (i.e., the second central processing unit) is below a second migration load threshold. Detecting this condition is a prerequisite for the execution of the dynamic load balancing strategy and is used to identify uneven load distribution in the system.
[0063] Optionally, in this embodiment, the first migration load threshold is a set upper limit for processor load. When the load of any CPU core reaches or exceeds this threshold, it indicates that the core may be facing overload risk and load migration measures need to be taken to balance resource usage. The second migration load threshold is a set lower limit for processor load, used to identify which CPU cores in the system are currently under low load and can accept traffic migration and other resource-intensive tasks. The second migration load threshold is usually lower than the first migration load threshold to ensure that the target CPU core has sufficient processing headroom.
[0064] Optionally, in this embodiment, the first expected configuration vector is a set of recommended configuration vectors output by the action decision model under the condition of satisfying the first expected condition. Its purpose is to redirect some traffic of the first central processing unit to the second central processing unit by adjusting the resource allocation strategy to achieve load balancing. The first expected configuration vector includes specific optimization strategies such as CPU core binding adjustment and queue redistribution.
[0065] Optionally, in this embodiment, the first expected action is a specific operation instruction extracted from the first expected configuration vector for executing the optimization strategy. Its goal is to reduce the load on the first central processing unit (CPU) and utilize the idle processing capacity of the second CPU. The first expected action may include RSS hash configuration adjustment, rebinding of CPU cores and queues, batch processing parameter optimization, etc.
[0066] Optionally, in this embodiment, the load of each CPU core is monitored by collecting central processing unit (CPU) data in real time, including the ratio of active to idle cycles, cache hit rate, and memory access pressure. Then, the load of each core is compared and analyzed to identify whether there is a situation where the load of the first CPU exceeds a first migration load threshold (i.e., faces overload risk), while the load of the second CPU is below a second migration load threshold (i.e., has sufficient processing capacity). This process is completed using a dynamic state modeling module, ensuring the accuracy and real-time nature of the analysis results.
[0067] Upon confirming the existence of the first anticipated condition (i.e., processor load imbalance), the intelligent scheduling decision module processes the target state tensor based on a deep reinforcement learning model to generate a set of configuration vectors. The first anticipated configuration vector is a specific solution for the load imbalance situation, aiming to achieve balance through optimized resource allocation strategies. This vector includes load migration suggestions for the first and second CPUs, such as adjusting the RSS indirection table to redirect traffic originally handled by the first CPU to the second CPU, and possible CPU core frequency adjustment strategies.
[0068] The expected configuration vector is further parsed into specific operational actions. For the first identified expected configuration vector, the system will generate a first expected action, i.e., an explicit instruction to adjust resource allocation, such as "migrate traffic destined for IP XXXX / 24 from the queue of the first CPU to the queue of the second CPU". In addition, auxiliary actions such as adjusting batch size and optimizing prefetching strategy may also be included to further improve processing efficiency and resource utilization.
[0069] The transactional configuration execution module is responsible for translating the initial expected action into actual data plane configuration changes, achieving dynamic resource adjustments with millisecond-level response times. Configuration changes are implemented by building shadow configurations, using the RCU mechanism for atomic pointer swapping, and executing necessary state transition protocols (such as TCP connection state synchronization). This process ensures seamless execution of configuration changes while guaranteeing system stability and security through rollback mechanisms.
[0070] Through the embodiments provided in this application, by setting a first migration load threshold and a second migration load threshold, the system can flexibly determine when to perform resource migration and which target processor is more suitable for migration. This not only enhances the targeting of the optimization strategy, but also avoids unnecessary resource adjustments, enabling the system to respond to load changes with finer granularity and achieve optimal resource allocation.
[0071] As an optional approach, if a set of configuration vectors includes expected configuration vectors that meet the expected conditions, the expected action corresponding to the expected configuration vector is obtained, including:
[0072] If a set of configuration vectors includes a second expected configuration vector that meets the second expected condition, obtain the second expected action corresponding to the second expected configuration vector. The second expected condition is used to indicate that there is a processor load of a third central processor in the virtual router that is greater than the hibernation load threshold or a processor load of a fourth central processor that is less than the hibernation load threshold. The second expected action is used to instruct the third central processor to disable hibernation or instruct the fourth central processor to hibernate.
[0073] Optionally, in this embodiment, the second anticipated condition refers to an energy efficiency problem caused by the system detecting load differences among the central processing units (CPUs) within the virtual router. Specifically, it is a specific state where the processor load of a third CPU exceeds the hibernation load threshold, or the processor load of a fourth CPU is less than the hibernation load threshold. The existence of this condition indicates that the system needs to take measures to adjust the CPU's operating state to optimize overall energy efficiency.
[0074] Optionally, in this embodiment, the hibernation load threshold is a set processor load level threshold. When the actual load of the processor is lower than this threshold, it indicates that the current workload of the processor is low, and it can enter a hibernation state to save energy. Conversely, if the processor load is higher than this threshold, it should remain active to avoid latency caused by hibernation.
[0075] Optionally, in this embodiment, the second expected configuration vector is a set of configuration parameters generated by an intelligent decision-making model, used to respond to the second expected condition to optimize CPU resource utilization and energy efficiency in the virtual router. The vector may include strategies such as adjusting CPU core frequency, hibernation state, and batch size to achieve dynamic energy efficiency management.
[0076] The second expected action is a specific operational instruction parsed directly from the second expected configuration vector, used to execute the optimization strategy. For example, when the load of the third CPU is detected to be higher than the hibernation threshold, the second expected action may include "disable hibernation" or "increase operating frequency"; conversely, for the fourth CPU, the expected action may be "enter hibernation state".
[0077] Optionally, in this embodiment, a runtime telemetry acquisition module monitors the processor load of each CPU core in the virtual router in real time, including key indicators such as the ratio of active to idle cycles, cache hit rate, and memory access pressure. Simultaneously, based on a preset hibernation load threshold, the system analyzes whether these cores meet the conditions for hibernation or remaining active to assess the current energy efficiency status.
[0078] Upon identifying a second anticipated condition (i.e., the load on a third CPU exceeds the hibernation threshold, or the load on a fourth CPU falls below the threshold), the intelligent scheduling decision module utilizes a deep reinforcement learning model to process the target state tensor and generate a set of configuration policies containing the second anticipated configuration vector. The second anticipated configuration vector focuses on adjusting the CPU's operating state to achieve energy efficiency optimization. For example, for a third CPU, the configuration vector might include "disable hibernation" and "increase core frequency"; for a fourth CPU, it might contain instructions such as "enter hibernation" and "decrease frequency".
[0079] The second expected configuration vector is further parsed into specific, executable operation instructions, i.e., the second expected action. This process is completed by the action transformation submodule in the decision model, which transforms the abstract optimization strategy into specific control instructions for the virtual routing data plane, such as "set Pstate", "disable Cstate", or "adjust CPU core frequency". These actions are used to directly act on the data plane to achieve fine-tuning of the CPU's operating state.
[0080] The transactional configuration execution module is responsible for applying the second expected action atomically and losslessly to the data plane of the virtual router. For example, it adjusts the PMD thread parameters of the third CPU to ensure its continuous operation, while simultaneously adjusting the Pstate of the fourth CPU to reduce power consumption. After execution, the system monitors changes in performance metrics such as CPU utilization, energy consumption, and network throughput through the effect evaluation module to verify the effectiveness of the action. If the effect is unsatisfactory or there are unexpected impacts, the system will automatically trigger a rollback mechanism to restore the system to the stable state before the change, while simultaneously feeding back the anomaly information to the decision model to optimize future decision-making strategies.
[0081] The embodiments provided in this application can identify uneven distribution of CPU load and dynamically adjust the CPU's energy efficiency status based on real-time traffic prediction and business needs. Through a closed-loop feedback mechanism, the decision-making model is continuously optimized to ensure optimal system energy efficiency.
[0082] As an optional approach, if a set of configuration vectors includes expected configuration vectors that meet the expected conditions, the expected action corresponding to the expected configuration vector is obtained, including:
[0083] If a set of configuration vectors includes a third expected configuration vector that meets the third expected condition, obtain the third expected action corresponding to the third expected configuration vector. The third expected condition is used to indicate that the hotspot access address in the virtual route is changed, and the third expected action is used to indicate that the processing priority of the changed hotspot access address is increased.
[0084] Optionally, in this embodiment, the third expected condition refers to a significant change in the hotspot access address in the virtual router, that is, the system detects that the access pattern of the IP address range or prefix (hotspot prefix) with high access frequency has been updated or shifted, which may be caused by the redistribution of network traffic, the launch of new services, or changes in tenant behavior.
[0085] Optionally, in this embodiment, hotspot access addresses refer to IP addresses or address ranges that are frequently accessed within a specific time window, carrying most of the network traffic. The existence of hotspot access addresses directly affects the performance of the network data plane, because frequent access to the same address (or similar addresses) can take advantage of the principle of locality of reference in caching. If the cache layout does not match the hotspot access pattern, cache misses will be triggered, leading to performance degradation.
[0086] Optionally, in this embodiment, when the network environment or business needs change, the original hot access addresses may become inactive, while new hot access addresses may emerge. Changed addresses refer to these newly emerging IP addresses or address ranges with high access frequency, which are objects that the system needs to pay special attention to and optimize.
[0087] Optionally, in this embodiment, based on the output of the deep reinforcement learning model, the third expected configuration vector is a set of parameter adjustment suggestions designed for the third expected condition, which aims to optimize the virtual route's ability to handle changing addresses, such as adjusting the routing table structure to improve the access efficiency of hotspot prefixes, optimizing the prefetch strategy of the software pipeline to reduce cache misses, or changing the binding relationship between CPU cores and queues.
[0088] The third expected action is a specific operation instruction directly parsed from the third expected configuration vector, used to actually perform parameter adjustments on the data plane. For example, for a new hotspot access address, the system may perform actions such as "increasing the prefetch distance to the changed address" or "adjusting the RSS mapping to direct traffic from the changed address to a CPU core with higher processing priority".
[0089] Optionally, in this embodiment, a runtime telemetry mechanism is used to continuously collect traffic data from the virtual router, paying particular attention to the access frequency and distribution of hotspot access addresses. By performing online clustering and identification of traffic patterns, the system can promptly detect changes in hotspot access addresses, i.e., the emergence of new hotspot addresses or a decrease in the access popularity of existing hotspot addresses.
[0090] When a significant change in a hotspot access address is detected, the intelligent scheduling decision module will utilize a deep reinforcement learning model, combined with the current target state tensor, to generate a third expected configuration vector. This configuration vector contains optimization suggestions across multiple dimensions, such as adjusting the routing table structure to promote hotspot prefixes to CPU cache-friendly linear arrays or hash tables to reduce cache access latency; or adjusting the prefetch strategy in the software pipeline to preload data related to changed addresses and avoid cache misses.
[0091] The third expected configuration vector generated by the intelligent model is further parsed into specific optimization operation instructions, i.e., the third expected action. For example, if the model predicts that the efficiency of accessing changing addresses needs to be optimized, the expected action may include "prioritizing traffic with changing addresses" by adjusting the RSS indirection table to ensure that traffic is quickly directed to CPU cores that are more efficient at processing this type of packet.
[0092] The transactional configuration execution module is responsible for applying the third-party anticipated actions atomically and losslessly to the data plane of the virtual router. For example, by updating RSS mappings, traffic with changed addresses is preferentially directed to specific CPU cores; simultaneously, by adjusting the prefetch distance in the software pipeline, it ensures that data with changed addresses is pre-loaded into the cache, reducing access latency. After the actions are executed, the system collects performance metrics changes in real time, such as CPU cache hit rate, network throughput, and average latency, to evaluate the effectiveness of the actions and ensure that the optimization operations not only improve performance but also do not introduce new bottlenecks or problems.
[0093] The embodiments provided in this application utilize high-frequency remote sensing technology to continuously monitor traffic characteristics and identify new hotspot access addresses. Addressing the specific needs of virtual routing data plane optimization in cloud environments, a set of intelligent and dynamically responsive hotspot access address handling strategies is provided through real-time monitoring, intelligent decision-making, and secure execution.
[0094] As an optional approach, if a set of configuration vectors includes expected configuration vectors that meet the expected conditions, the expected action corresponding to the expected configuration vector is obtained, including:
[0095] If a set of configuration vectors includes a fourth expected configuration vector that meets the fourth expected condition, obtain the fourth expected action corresponding to the fourth expected configuration vector. The fourth expected condition is used to indicate that there is a correlation between the fourth central processor and the first memory region in the virtual route that is less than a preset correlation threshold. The fourth expected action is used to indicate that the first mapping relationship between the fourth central processor and the first memory region is corrected to the second mapping relationship between the fourth central processor and the second memory region. The correlation between the fourth central processor and the second memory region is greater than or equal to the correlation threshold.
[0096] Optionally, in this embodiment, the fourth expected condition indicates that the access affinity between a specific CPU (i.e., the fourth CPU) and a memory region (i.e., the first memory region) in the virtual router is lower than a preset affinity threshold. This means that the current CPU-memory mapping relationship may no longer be optimal. The decrease in affinity may stem from changes in business traffic patterns, causing previously frequently accessed memory regions to become less frequently accessed, or previously less accessed memory regions (such as the second memory region) to become hotspots for access.
[0097] Optionally, in this embodiment, the association threshold is a set minimum access association level standard used to determine whether the mapping between the CPU core and the memory region needs to be adjusted. If the detected association level is lower than this threshold, a re-evaluation of the mapping relationship is triggered to find a more efficient configuration.
[0098] Optionally, in this embodiment, the fourth expected configuration vector is a parameter adjustment suggestion output by the intelligent decision model in response to the fourth expected condition, aimed at optimizing the access efficiency of the fourth central processing unit and memory regions. The configuration vector may include adjusting the binding relationship between CPU cores and specific memory regions (such as the second memory region), as well as other related optimization measures.
[0099] The fourth expected action is a specific operation instruction directly parsed from the fourth expected configuration vector, used to perform mapping relationship corrections. For example, "prioritize the access relationship between the fourth CPU and the second memory region" may involve adjusting the RSS mapping rules to ensure that traffic related to the second memory region is preferentially directed to the fourth CPU for processing.
[0100] Optionally, in this embodiment, the first mapping relationship is the access mapping relationship between the fourth central processing unit and the first memory region in the current system. This is constructed based on previous traffic patterns and resource allocation strategies, and may become suboptimal as the network environment changes. The second mapping relationship is a new mapping scheme proposed by the intelligent decision-making model to replace the first mapping relationship. Its goal is to improve the access correlation between the fourth central processing unit and the second memory region, thereby improving overall performance and resource utilization efficiency.
[0101] Optionally, in this embodiment, a dynamic state modeling module continuously monitors the access correlation between the fourth central processing unit and the first memory region. This evaluation is based on key indicators such as CPU cache hit rate, data translation back buffer (DTLB) misses, and memory access latency. By comparing the correlation degree with a set correlation threshold, the system can identify whether the current mapping relationship needs to be adjusted to address the performance challenges brought about by changes in traffic patterns.
[0102] When the correlation is below a preset threshold, the intelligent scheduling decision module analyzes the global state tensor to predict potentially more efficient access patterns between the fourth CPU and another memory region (such as the second memory region). Based on this prediction, the module generates a fourth expected configuration vector, which includes suggestions for adjusting CPU memory mapping relationships, such as "adjusting the core binding of the fourth CPU from the first memory region to the second memory region".
[0103] The system further parses the fourth expected configuration vector output by the intelligent model into specific operation instructions—the fourth expected action. For example, the fourth expected action might include "updating the RSS indirection table to prioritize traffic related to the second memory region to the fourth central processing unit," aiming to optimize the data processing path related to the second memory region and improve processing efficiency.
[0104] The transactional configuration execution module is responsible for applying the fourth expected action atomically and losslessly to the data plane of the virtual router, ensuring that configuration changes do not interrupt services. During execution, the system utilizes Read Replication Update (RCU) and fault rollback mechanisms to guarantee the security of configuration changes. After configuration changes, the system continues to monitor performance metrics, assessing the impact of mapping adjustments on key performance indicators such as CPU utilization, cache efficiency, and network throughput, ensuring that the changes have a positive effect and meet the expected quality of service requirements.
[0105] The embodiments provided in this application optimize resource mapping relationships through intelligent decision-making and transactional configuration execution to improve the performance of the virtual routing data plane and resource utilization efficiency. Specifically, the system uses high-frequency telemetry technology to monitor the behavior of the central processing unit (CPU) and memory access characteristics in real time, identifying a declining trend in the correlation between the fourth CPU and the first memory region. When this trend exceeds a preset correlation threshold, the intelligent decision-making model generates a fourth expected configuration vector based on the current state and traffic prediction, proposing optimization suggestions for the CPU-memory mapping relationship. Subsequently, the expected configuration vector is transformed into a specific fourth expected action, namely, adjusting the binding rules of the fourth CPU to form a stronger access correlation with the second memory region, thereby improving processing efficiency and reducing memory access latency.
[0106] As an alternative approach, the target state tensor is input into the action decision model to obtain a set of configuration vectors output by the action decision model, including:
[0107] Using the state-aware module in the action decision model, feature recognition is performed on the queue feature tensor, central processing unit feature tensor, traffic feature tensor and component topology tensor to obtain the first feature vector;
[0108] Using the temporal prediction module in the action decision model, feature prediction is performed on the first historical state tensor of the virtual route at multiple time steps before the target state tensor is input into the action decision model, and the second feature vector is obtained.
[0109] Feature fusion is performed on the first and second feature vectors to obtain a set of configuration vectors.
[0110] Optionally, in this embodiment, the state awareness module is a key component of the intelligent decision-making model. Its main function is to perform in-depth analysis and feature extraction on the queue state, central processing unit state, business traffic characteristics, and component topology-related information collected during current runtime, and construct a first feature vector reflecting the current state of the system. The state awareness module uses graph neural network (GNN) and multilayer perceptron (MLP) technologies to convert complex multidimensional state data into a form that the model can understand and process, providing intuitive contextual information for subsequent decision-making.
[0111] The first feature vector, generated by the state-aware module, contains refined representations of the queue feature tensor, CPU feature tensor, traffic feature tensor, and component topology tensor, enabling it to capture key features and patterns of the current system state. The construction of the first feature vector is based on in-depth analysis of state data across various dimensions. Through data dimensionality reduction and feature extraction techniques, state information is mapped into a low-dimensional, high-resolution feature space.
[0112] The time-series prediction module is another core module in the model. It performs time-domain feature analysis and future trend prediction based on historical state sequences, generating a second feature vector. The time-series prediction module typically employs sequence modeling techniques such as Transformer to capture the characteristics of flow patterns evolving over time, such as periodic fluctuations and long-term / short-term dependencies. This provides forward-looking information for intelligent decision-making, enabling the model to consider possible future changes while processing the current state.
[0113] The second feature vector, output by the time-series prediction module, contains predicted features of the virtual routing state for multiple future time steps (e.g., within the past few seconds). Combining historical data and current state analysis, the second feature vector can reveal potential traffic trends and possible system state changes, thereby guiding more forward-looking resource scheduling and configuration optimization.
[0114] Optionally, in this embodiment, real-time status data obtained from the runtime telemetry acquisition module, including queue feature tensors, central processing unit feature tensors, traffic feature tensors, and component topology tensors, are input into the status perception module for in-depth analysis. The module employs techniques such as graph neural networks and multilayer perceptrons to identify key patterns and trends, generate a first feature vector, and provide an overview of the current system status for subsequent decision-making.
[0115] While being state-aware, the time-series prediction module collects and analyzes the first historical state tensor. Using Transformer or other time-series analysis techniques, it uncovers the traffic patterns and system operating habits hidden in the historical data, predicts the state changes at multiple future time steps, and generates a second feature vector to provide insights into future trends for decision-making.
[0116] The model combines the first and second feature vectors at a feature fusion layer. This step may involve simple feature concatenation, or the fusion process may be designed as part of the model, implemented through a custom neural network layer (such as the combination of the GAT attention network and the Transformer, as shown in the figure). The fused decision vector contains a comprehensive analysis of the current state and a comprehensive consideration of future predictions. The model outputs a set of configuration vectors, aiming to achieve performance optimization and efficient resource utilization by adjusting the configuration parameters of the virtual routing data plane.
[0117] Through the embodiments provided in this application, the system can obtain the information needed for decision-making from two dimensions—current state and future prediction—by organically combining two modules: state awareness and time-series prediction. The state awareness module captures current multi-scale state data, including queue depth, CPU utilization, and flow table lookup efficiency, to construct a first feature vector reflecting the real-time operating status of the virtual router. The time-series prediction module, on the other hand, analyzes historical state sequences to predict the evolution of future traffic patterns, generating a second feature vector that predicts the future system state. These two feature vectors are merged at the feature fusion layer to form a set of decision vectors that comprehensively consider current and future information, which is then output by the action decision model as a set of configuration vectors. This approach not only focuses on current system performance bottlenecks but also proactively analyzes traffic trends. By dynamically adjusting configuration parameters, such as RSS mapping, CPU core binding, and software prefetching strategies, it achieves full-path, multi-dimensional, and closed-loop adaptive optimization of the virtual router data plane to cope with dynamic and unpredictable loads in the cloud environment.
[0118] As an alternative approach, before inputting the target state tensor into the action decision model to obtain a set of configuration vectors output by the action decision model, the method further includes:
[0119] Based on the second historical state tensor of the virtual routing historical time period and multiple configuration control policies, the initial action decision model is trained multiple times until the training loss value corresponding to the initial action decision model is less than the preset loss threshold, thus determining the action decision model. The input of each model training is the second historical state tensor and one of the multiple configuration control policies.
[0120] Optionally, in this embodiment, the second historical state tensor is constructed from state data collected by the telemetry acquisition module during the historical time period of virtual router operation, and includes operational information in multiple dimensions such as queues, processors, traffic characteristics, and topology relationships. The second historical state tensor is used for model training to help the intelligent decision-making module learn how to make optimal configuration control strategies based on different system states.
[0121] Optionally, in this embodiment, the multiple configuration control strategies are a series of preset strategies for optimizing the virtual routing data plane, including but not limited to adjusting RSS mapping, CPU core binding, batch size, and routing table structure. These strategies serve as labels for model training, guiding the intelligent decision-making model to learn how to make correct action decisions given a state tensor.
[0122] Optionally, in this embodiment, the preset loss threshold is an upper limit of an indicator set during model training to determine whether the model has achieved sufficient training accuracy and generalization ability. When the model training loss value (such as mean squared error MSE, cross-entropy, etc.) is lower than this threshold, the model is considered to have fully learned how to make effective configuration control strategies in different virtual routing states.
[0123] Optionally, in this embodiment, during operation, the running status data of the virtual router is continuously collected, including information such as queue depth, processor utilization, cache hit rate, memory access mode, traffic characteristics and topology relationship, etc., to construct a series of second historical state tensors, which are stored in the experience replay buffer for subsequent model training.
[0124] Using the second historical state tensor as input and one of multiple configuration control policies as a label, an initial action decision model is trained. The training process may involve multiple iterations, with each iteration selecting a different historical state tensor and configuration policy. The model parameters are adjusted using the backpropagation algorithm to minimize the difference between the predicted action and the actual optimal action (i.e., the training loss). As training progresses, the model gradually learns how to predict the optimal configuration control policy under different virtual routing states.
[0125] At the end of each iteration of model training, the training loss value is evaluated to see if it is lower than a preset loss threshold. If the loss value is lower than the threshold, it indicates that the model has reached the expected training accuracy and can accurately predict the configuration control strategy of virtual routing; if the loss value does not reach the threshold, training continues until the preset standard is reached. Ultimately, through this training process, an optimized decision-making model capable of effectively tuning virtual routing data planes is determined.
[0126] The embodiments provided in this application collect the operational states of virtual routers at different historical points in time to construct multiple second historical state tensors, each representing the system's operational state at a specific moment. Simultaneously, based on expert experience or historical performance data, a series of configuration control strategies are preset. These strategies serve as labels during model training, helping the model learn how to output a set of configuration vectors that improve performance or energy efficiency when faced with specific state tensors. Model training employs deep learning algorithms, such as PPO (Proximal Policy Optimization) or DQN (Deep Q-Network). Through continuous iteration, the weight parameters of the neural network are adjusted until the difference (training loss) between the configuration control strategy predicted by the model and the preset strategies falls below a preset threshold. At this point, the model is considered to have the capability for practical application and becomes an action decision model.
[0127] As an alternative approach, during the multiple training iterations of the initial action decision model, the method also includes:
[0128] After training the initial action decision model for the i-th time, obtain the probability ratio between the first configuration control strategy used in the i-th model training and the second configuration control strategy used in the i-1-th model training.
[0129] The training loss value corresponding to the i-th model training is determined based on the probability ratio, the advantage evaluation parameter corresponding to the i-th model training, and the preset pruning parameter.
[0130] Wherein, the training loss value corresponding to the i-th model training is the smaller value between the first parameter and the second parameter. The first parameter is the product of the probability ratio and the advantage evaluation parameter. When the probability ratio is within the expected range, the second parameter is the probability ratio. When the probability ratio is not within the expected range, the second parameter is the value closest to the probability ratio between the upper limit and the lower limit of the expected range.
[0131] Optionally, in this embodiment, the i-th model training refers to the i-th iteration of training the model based on historical data, where i is a positive integer representing the number of training iterations.
[0132] The first configuration control strategy is the specific configuration strategy used as a training sample in the i-th model training iteration. It is selected from a set of multiple pre-defined configuration control strategies and represents an optimized scheme for handling virtual routing data planes. The second configuration control strategy is the configuration control strategy used in the (i-1)-th model training iteration. It serves as the basis for the model's learning and optimization in the previous iteration and is used to compare and evaluate the model's performance improvement in the current iteration (i-th iteration).
[0133] Optionally, in this embodiment, the probability ratio refers to the ratio of the probability that the decision policy output in the i-th model training (i.e., the first configuration control policy) is sampled to the probability that the policy output in the (i-1)-th model training (i.e., the second configuration control policy) is sampled. This ratio is used to evaluate the update magnitude and stability of the model policy.
[0134] Optionally, in this embodiment, the advantage evaluation parameter is used in the intelligent decision-making model to measure the superiority of the current decision-making strategy (first configuration control strategy) compared to the historical strategy (second configuration control strategy) in a specific state (i.e., the target state tensor). The advantage evaluation parameter directly reflects the improvement effect of the decision-making strategy and is an important basis for model learning iteration.
[0135] Optionally, in this embodiment, the preset pruning parameter is a fixed threshold used in the model training loss function to limit the range of the product of the probability ratio and the advantage evaluation parameter, thereby avoiding instability or performance degradation caused by excessive policy updates during model training. The preset pruning parameter is a key parameter in the proximal policy optimization (PPO) algorithm, which helps to balance exploration and exploitation.
[0136] Optionally, in this embodiment, after completing the i-th model training, the intelligent decision-making system calculates the ratio of the sampling probability of the model for the first configuration control strategy in the current iteration to the sampling probability of the second strategy in the previous iteration (i.e., the (i-1)-th iteration) based on the policy output distribution of the action decision model. This ratio reflects the degree and direction of updating the model's decision strategy.
[0137] By collecting actual system performance metrics (such as throughput, latency, and energy consumption) under the target state tensor (current virtual routing running state) using the first configuration control strategy and the second configuration control strategy (i-1th training iteration), the relative performance difference between the two strategies is calculated. This difference is transformed into an advantage evaluation parameter to measure the performance improvement of the first configuration control strategy compared to the previous iteration strategy.
[0138] Combining the calculated probability ratio and the dominance evaluation parameter, the training loss value for the i-th model training iteration is calculated using the pruning surrogate objective function of the PPO algorithm. Specifically, the training loss value L_i is determined by the smaller of the first parameter R and the second parameter C, where the first parameter R is the product of the probability ratio π and the dominance evaluation parameter A. If the probability ratio π exceeds the expected range, the second parameter C is set to the value closest to π between the upper and lower limits of the expected range. This mechanism ensures that the model update considers both the actual improvement effect of the policy (reflected by the A parameter) and avoids being overly aggressive (by limiting the range of π).
[0139] The embodiments provided in this application utilize probability ratios and dominance evaluation parameters to control the magnitude and direction of model updates, ensuring training stability and efficiency. In each iteration of model training (i.e., the i-th training iteration), the system not only trains the model based on states and actions but also evaluates the performance difference and update degree between the current policy (first configuration control policy) and the previous iteration policy (second configuration control policy) by calculating the probability ratio π and the dominance evaluation parameter A. This avoids "large jumps" in the model during the learning process, which could lead to performance fluctuations or getting stuck in local optima.
[0140] As an optional approach, after performing the target action, the method also includes:
[0141] Obtain the first performance improvement parameter of the virtual router in the first time period after the target action is executed, wherein the first performance improvement parameter is used to indicate the performance improvement of the virtual router in the first time period;
[0142] Predict a second performance improvement parameter for the virtual router in a second time period following the first time period, wherein the second performance improvement parameter is used to indicate the expected performance improvement of the virtual router after the second time period;
[0143] The first performance enhancement parameter and the second performance enhancement parameter are fused together to obtain the target performance enhancement parameter used to indicate the effect of the target action execution.
[0144] Optionally, in this embodiment, the first time period refers to a short time window after the target action is executed, used to evaluate the immediate impact of the target action on the virtual routing performance in real time. This time window is usually dynamic and can be set from a few milliseconds to a few seconds, depending on different business needs and network environments.
[0145] Optionally, in this embodiment, the first performance improvement parameter is the performance improvement amount monitored and calculated in real time by the system through a high-precision telemetry acquisition mechanism after the virtual router performs the target action within a first time period. It includes performance change data in multiple dimensions such as throughput, latency, packet loss rate, and energy consumption, and is used to evaluate the immediate effect of the target action.
[0146] Optionally, in this embodiment, the second time period, compared to the first time period, refers to a longer time window after the target action is completed. Its purpose is to predict the long-term impact of the target action on future performance using a time-series prediction model. This time window can also be adjusted according to business scenarios and system habits, potentially ranging from tens of seconds to several minutes.
[0147] The second performance improvement parameter is based on the analysis results of the time-series prediction module. The system predicts the further improvement in virtual routing performance that will be achieved after the second time period. This parameter reflects the long-term effect of the target action, taking into account factors such as the evolution of traffic patterns and dynamic changes in hardware performance. It is a forward-looking indicator for evaluating the effectiveness of the target action.
[0148] Optionally, in this embodiment, during the first time period after the target action is executed, the system collects the performance indicators of the virtual route through a real-time telemetry mechanism and calculates the first performance improvement parameter. This step involves high-frequency sampling and statistical analysis of key performance indicators such as network throughput, average latency, and packet loss rate to quantify the immediate performance changes brought about by the target action.
[0149] Based on the historical operational data and current state of the virtual router, the time-series prediction module analyzes the model to predict the long-term impact of the target action on performance after the second time period, and outputs the second performance improvement parameters. This step utilizes the long-short-term dependency capture capability of the Transformer encoder in the deep learning model, as well as the dynamic trend history within the system, to predict the persistence and stability of the performance improvement caused by the target action.
[0150] The first and second performance improvement parameters are fused to generate the target performance improvement parameters. This fusion may involve weighted averaging, maximum value selection, or more complex nonlinear combination mechanisms to ensure a comprehensive consideration of both immediate performance improvement and long-term prediction. The calculation of the target performance improvement parameters also considers the importance and trade-offs of performance indicators in different time periods; for example, in latency-sensitive scenarios, greater weight may be given to immediate latency reduction.
[0151] Through the embodiments provided in this application, after an action is executed, the system not only focuses on the immediate effect of the action but also evaluates its long-term impact on future performance through a predictive model. Finally, by fusing the immediate effect and long-term prediction, a performance improvement parameter that comprehensively reflects the execution effect of the target action is obtained. By introducing long-term performance prediction, the system can better evaluate and select action strategies that not only bring immediate performance improvements but also continuously optimize future states, ensuring the foresight and effectiveness of optimization decisions. Simultaneously, by fusing immediate and predicted effects, the target performance improvement parameter can comprehensively reflect the overall impact of the target action, providing more comprehensive and accurate information for decision-making.
[0152] As an optional approach, the first performance enhancement parameter and the second performance enhancement parameter are fused, including:
[0153] Based on the action type and execution time of the target action, determine the discount parameter corresponding to the second performance improvement parameter;
[0154] Multiply the discount parameter by the second performance improvement parameter to obtain the discounted second performance improvement parameter;
[0155] The sum of the first performance improvement parameter and the discounted second performance improvement parameter is determined as the target performance improvement parameter.
[0156] Optionally, in this embodiment, in virtual routing data plane optimization, the action type refers to the type of action or configuration control strategy generated by the model, such as adjusting CPU core frequency, optimizing RSS hash configuration, changing batch size, adjusting routing table structure, etc. Each action type corresponds to different performance impacts and optimization objectives.
[0157] Optionally, in this embodiment, execution time refers to the point in time when the action or configuration control policy output by the action decision model is executed in the actual virtual routing environment. Considering execution time is crucial for understanding the immediate effects and long-term impacts of actions, especially in latency-sensitive application scenarios.
[0158] Optionally, in this embodiment, the discount parameter is a value between 0 and 1 used by the intelligent decision-making model to evaluate the current value of future performance improvements. This parameter reflects the current discounted value of future gains. Generally, the further into the future the improvement is, the smaller the discount parameter, indicating a lower current value.
[0159] Optionally, in this embodiment, a reasonable discount parameter is determined based on the action type and execution time of the target action. This parameter reflects the trade-off between immediate performance improvement and future performance prediction. Different action types and execution times may require different discount rates to accurately assess the current and future value of the action.
[0160] Multiplying the determined discounting parameter by the second performance improvement parameter yields a discounted performance improvement that takes into account the time value of money. This discounting mechanism ensures that the model not only focuses on immediate effects but also assesses long-term impacts, helping decision-makers to gain a more comprehensive understanding of the combined effects of actions.
[0161] Finally, the first performance improvement parameter and the discounted second performance improvement parameter are added together to obtain the final target performance improvement parameter. This fusion process combines immediate performance improvements with discounted long-term predictive effects, providing decision-makers with a performance metric that integrates immediate feedback and future trends.
[0162] The embodiments provided in this application not only focus on the immediate performance improvement of the target action, but also predict its potential impact on future performance through a time-series prediction model. Furthermore, by using a discounting parameter, the long-term prediction effect is discounted for time value, ultimately fusing the immediate effect and long-term prediction into a single target performance improvement parameter. By introducing a discounting parameter, the system can reasonably assess future performance improvements, avoiding overemphasizing immediate feedback while neglecting the potential long-term benefits of the action. This fusion mechanism ensures the forward-looking and robust nature of the model's decisions, providing more comprehensive and accurate guidance for optimizing the virtual routing data plane.
[0163] As an optional approach, after performing the target action, the method also includes:
[0164] When an execution request for a reference action is detected, the time difference between the trigger time of the execution request and the completion time of the target action is obtained;
[0165] If the time difference is less than the time threshold, the reference action is prohibited from being executed;
[0166] When the time difference is greater than or equal to the time difference threshold, predict the third performance improvement parameter of the virtual router after performing the reference action;
[0167] If the third performance improvement parameter is less than the expected threshold, the reference action should be prohibited.
[0168] If the third performance enhancement parameter is greater than or equal to the expected threshold, execute the reference action.
[0169] Optionally, in this embodiment, the target action refers to a set of configuration control policies generated and executed by the intelligent scheduling decision module of the present invention based on the current operating state of the virtual router. These policies aim to improve the performance of the virtual router, reduce latency, and reduce energy consumption, and are applied to the data plane through the transactional configuration execution module to achieve immediate results.
[0170] Optionally, in this embodiment, the reference action is another set of configuration control policies that may be requested and executed subsequently by the intelligent decision-making module or operations and maintenance personnel, aiming to further optimize the operating state of the virtual router. The reference action may be a decision based on adjustments to new runtime states, business requirements, or performance metrics.
[0171] Optionally, in this embodiment, when the intelligent decision-making module or maintenance personnel request the execution of a reference action, the system first records the trigger time of the execution request and compares it with the execution completion time of the most recently completed target action to calculate the time difference between the two.
[0172] Based on the calculated time difference, the system determines whether the time difference is less than a time threshold to prevent configuration jitter caused by excessively frequent actions. If the time difference is less than the time threshold, the system will automatically block the execution of the reference action until the time difference grows to equal or exceed the time threshold.
[0173] When the time difference is greater than or equal to the time threshold, the system uses a time-series prediction model to predict the third performance improvement parameter of the virtual route after executing the reference action. This prediction is based on current and historical state data and takes into account the expected impact of the reference action on system performance.
[0174] The system further determines whether the predicted third performance improvement parameter is less than the expected threshold. If the third performance improvement parameter is lower than the expected threshold, it means that the execution of the reference action may not significantly improve performance. Therefore, the system will prohibit the execution of this action to avoid unnecessary resource consumption and performance fluctuations.
[0175] If the third performance improvement parameter is not lower than the expected threshold, the system will determine the necessity of executing the reference action and apply the reference action to the data plane of the virtual route through the transactional configuration execution module to achieve the predicted performance improvement.
[0176] The embodiments provided in this application achieve intelligent management of the timing and effect of action execution by monitoring the relationship between time difference and time threshold, and by comparing the predicted performance improvement of reference actions with the expected threshold. This mechanism ensures that the execution of actions not only responds promptly to changes in network state, but also avoids system performance fluctuations caused by frequent actions, while ensuring that each action execution has a significant performance improvement effect.
[0177] As an optional approach, one can obtain queue data, CPU data, and traffic data of the virtual router, as well as component operation information of the virtual router, including:
[0178] Data generated by the virtual router within a preset time period is collected using sliding windows of different lengths, wherein the length of the preset time period is longer than the length of any sliding window.
[0179] The data is classified and normalized to obtain queue data, central processing unit data, traffic data, and component operation information.
[0180] Optionally, in this embodiment, a sliding window is a time series analysis method in data processing. By setting a fixed-length time window, the data within the window is continuously updated over time to reflect the state over a recent period. In this invention, the sliding window is used to collect the queue status, CPU usage, and service traffic characteristics of virtual routers at different time scales, thereby constructing a state that can reflect the dynamic behavior of the system.
[0181] Optionally, in this embodiment, during the telemetry data acquisition process, the preset time period refers to the overall time range within which the system continuously collects data for subsequent analysis. This time period is typically divided into multiple sliding windows, with data within each window used to capture the system state at different time scales. The selection of the preset time period is based on expectations of business traffic fluctuations and system state changes, ensuring the comprehensiveness of the data.
[0182] Optionally, in this embodiment, a preset time period is first set, for example, from several minutes to several hours. During this period, the system continuously collects queue data, CPU data, traffic data, and component operation information of the virtual router using sliding window technology. The duration of the sliding window can be set to multiple levels such as 10ms, 100ms, and 1s to capture instantaneous, medium-term, and long-term system dynamics. The overall length of the preset time period is greater than the time limit of any sliding window, ensuring the continuity and comprehensiveness of the data across multiple time scales.
[0183] The collected raw data undergoes data classification and normalization to transform it into a format that the model can understand. Data classification categorizes the collected data according to type (such as queue depth, CPU utilization, and streaming concurrency), facilitating subsequent feature engineering. Normalization ensures that data with different dimensions (such as tens of thousands of PPS values versus percentages of CPU utilization) can be mapped to the same numerical range, eliminating dimensional differences and allowing the data to be directly used as input to the neural network, thus improving the model's training efficiency and prediction accuracy.
[0184] Through the embodiments provided in this application, by setting preset time periods and multiple sliding windows of different durations, the system can continuously and at multiple scales collect the operational status of virtual routing, including the instantaneous depth of queues, CPU instruction cycle efficiency, characteristic changes in service traffic, and the operational status of component topologies. These collection processes reflect the real-time operational status and long-term behavioral patterns of the virtual routing data plane, providing a comprehensive data foundation for building intelligent decision-making models.
[0185] As an optional approach, the target action is performed, including:
[0186] Create a shadow view in the background memory of the virtual router. The shadow view is used to store the target configuration information obtained by executing the target action.
[0187] The configuration pointer of the target CPU associated with the target action is moved from the original view to the shadow view, where the target CPU executes the operation according to the target configuration information.
[0188] Optionally, in this embodiment, the shadow view is a copy of the configuration information created in the background memory of the virtual router, used to store the target configuration information that will take effect soon. The existence of the shadow view allows the system to preprocess and verify new configuration settings without affecting the current running state.
[0189] Optionally, in this embodiment, the configuration pointer is a memory address pointer in the data plane software used to point to the currently active configuration information. By modifying the configuration pointer, the system can switch from the original configuration information to the target configuration information, thereby applying a new configuration strategy and achieving performance optimization.
[0190] Optionally, in this embodiment, before executing the target action, the system first creates a shadow view in the background memory of the virtual router. This view is used to preload the target configuration information contained in the target action, such as updating the RSS hash configuration or adjusting the CPU core scheduling policy.
[0191] Once the shadow view is built and verified (e.g., checking configuration integrity and consistency), the system atomically switches the target CPU's configuration pointer from the original view to the shadow view using a transactional configuration execution mechanism. This operation ensures that the switching of the configuration pointer does not cause interruption of data plane operation or packet loss, achieving zero-downtime configuration updates.
[0192] After the configuration pointer is switched, the target CPU will execute the new operating strategy according to the target configuration information stored in the shadow view. For example, if the target action is to adjust the batch size, the target CPU will adjust its packet processing efficiency based on the batch parameters in the shadow view to maximize forwarding performance or reduce energy consumption.
[0193] In the embodiments provided in this application, to avoid interference with data plane operation during configuration updates, the system employs a mechanism of creating a shadow view. This preloads the target configuration information into background memory while simultaneously performing integrity checks. After the shadow view verification is complete, an atomic switch from the original view to the shadow view is achieved by modifying the configuration pointer. This ensures that the new configuration is applied to the target CPU instantly and without loss, achieving millisecond-level performance tuning. This process not only improves the security of optimization operations but also significantly enhances execution efficiency.
[0194] As an optional approach, the method may also include the following steps before performing the target action:
[0195] Generate corresponding action identifiers for the target action;
[0196] The method also includes the following in the process of performing the target action:
[0197] Create an action execution log corresponding to the action identifier;
[0198] If an expected anomaly is detected in the action execution log, the configuration parameters of the virtual route will be reverted to the version before the target action was executed.
[0199] Optionally, in this embodiment, the action identifier is a unique identifier used to distinguish and record different target action instructions, ensuring the uniqueness and traceability of each action in the system. The generation of the action identifier is typically based on information such as the type of action, execution time, and sequence.
[0200] Optionally, in this embodiment, the action execution log is a log file created and maintained by the system when the target action is executed, which records in detail the execution process, execution results, and system state changes. This is helpful for subsequent fault analysis, performance tuning, and audit trail.
[0201] Optionally, in this embodiment, the expected anomaly information is a pre-defined series of possible anomalies, such as hardware access failures, memory allocation failures, and configuration parameter conflicts. This information is set based on a deep understanding of the system and operational experience, helping the system to quickly identify anomalies when encountering problems.
[0202] Optionally, in this embodiment, when the intelligent tuning system decides to execute a target action, it first generates a unique action identifier for that action. This identifier contains the action type, execution time, and sequence information, which is used for subsequent tracking and management of the action's execution process and results.
[0203] During the execution of the target action, the system synchronously creates an action execution log. The log details system state changes related to the action, configuration parameter modifications, and the results of the action execution. This action execution log provides comprehensive data for subsequent anomaly detection, performance analysis, and troubleshooting.
[0204] When the intelligent tuning system detects anticipated anomalies in the action execution log, it immediately triggers a configuration parameter callback mechanism. This mechanism instantly restores the configuration parameters of the virtual routing data plane to their state before the target action was executed, ensuring system configuration stability and business continuity. This process typically completes within milliseconds, ensuring safe and efficient configuration change operations in production environments.
[0205] Through the embodiments of this application, before executing the target action, the system generates an action identifier, providing a unique identity for each action to facilitate tracking and management. During action execution, an action execution log is created to record detailed execution information, providing data support for subsequent auditing and troubleshooting. More importantly, when abnormal information is detected in the action execution log, the system immediately triggers a callback mechanism for configuration parameters, restoring the data plane to a stable state before the target action was executed, effectively avoiding performance degradation or service interruption caused by configuration errors or hardware anomalies.
[0206] As an optional approach, the target action is performed, including:
[0207] If the target action instructs the migration of target type data from the fifth central processing unit to the sixth central processing unit, the fifth central processing unit will cache the first data of the target type received to the cache queue;
[0208] After migrating the second data of the target type received in the fifth central processing unit to the sixth central processing unit, the first data is migrated from the cache queue to the sixth central processing unit, wherein the sixth central processing unit has a higher processing priority for the first data than for the second data.
[0209] Optionally, in this embodiment, the target type of data refers to data streams that require specific processing or migration based on intelligent optimization strategies. For example, data types may be classified according to traffic characteristics (such as packet length, number of concurrent streams) or business requirements (such as latency sensitivity, throughput requirements).
[0210] Optionally, in this embodiment, the cache queue is a queue used to temporarily store the data stream received by the fifth CPU but not yet processed during the data migration process. The cache queue ensures the integrity and order of data during migration, avoiding data loss or out-of-order processing caused by immediate migration.
[0211] Optionally, in this embodiment, when the target action indicates that data of the target type needs to be migrated from the fifth CPU to the sixth CPU, the system first requires the fifth CPU to cache the first batch of unprocessed data of the target type into a dedicated cache queue. This caching operation ensures the security and stability of the data during the migration process, avoiding the processing chaos that might result from immediate migration.
[0212] After the second batch of data belonging to the target type has been processed and moved to the sixth CPU in the fifth CPU, the system then migrates the first data in the cache queue to the sixth CPU. More importantly, the sixth CPU sets a higher processing priority for the received first data to ensure that this type of data stream can be processed first to meet business needs (such as latency-sensitive businesses).
[0213] The embodiments provided in this application, by introducing a cache queue for the phased migration of data streams and a mechanism for assigning processing priorities to data streams after migration, not only ensure the security and orderliness of the data migration process, but also prioritize the performance requirements of critical businesses by dynamically adjusting processing priorities, thus avoiding the impact of data stream migration on the performance of critical businesses.
[0214] As an optional solution, the aforementioned virtual routing configuration control method can be applied to intelligent collaborative optimization scenarios for cloud virtual routing data planes. With the booming development of the cloud computing industry, the scale and business complexity of data centers are increasing daily. As the "highway" connecting computing and storage, the performance, flexibility, and intelligence level of the network have become key bottlenecks determining the quality of service (SLA) and operating costs of cloud platforms. Against this backdrop, Network Function Virtualization (NFV) technology has emerged, transforming traditional network functions (such as routing, switching, firewalls, and load balancing) based on dedicated hardware into software running on general-purpose servers, namely Virtual Network Functions (VNFs). Among these, the virtual router (vRouter), as the core VNF responsible for east-west (between virtual machines) and north-south (between virtual machines and the external network) traffic forwarding, directly impacts the network throughput and latency of the entire cloud environment.
[0215] To overcome the performance limitations of traditional kernel-based protocol stack-based forwarding, the industry has widely adopted kernel bypass technology. This type of technology achieves line-rate forwarding capabilities of tens of millions of PPS (packets per second) by completely moving network device drivers and packet processing logic to user space and employing technologies such as polling mode drivers (PMD), large page memory, and zero-copy.
[0216] However, existing high-speed virtual forwarding technologies still face a significant common challenge: their optimal performance is highly dependent on a set of static, pre-configured parameters. These parameters include the binding relationship between CPU cores and network interface card queues (affinity), RSS hash configuration, round-robin batch size, routing table structure, etc. This static "one-time tuning" approach proves inadequate when facing the highly dynamic, heterogeneous, and unpredictable traffic loads in cloud environments. For example:
[0217] Load imbalance: When a tenant’s business traffic suddenly increases, or multiple high-bandwidth streams happen to be hashed to the same CPU core for processing, it will cause that core to be overloaded, while other cores will be idle or under low load, resulting in resource waste and performance bottlenecks.
[0218] Head-of-line blocking: In a single queue, a large data packet that requires complex processing (such as fragmentation or depth detection) may occupy processing resources for a long time, blocking the rapid forwarding of many subsequent small data packets, resulting in a sharp deterioration in long-tail latency.
[0219] Cache failure: When traffic characteristics (such as accessed hot IP address ranges) change, the original route cache or flow cache may fail on a large scale, resulting in a large number of cache misses, which in turn leads to frequent access to main memory and severely slows down the forwarding speed.
[0220] This embodiment discloses a data plane intelligent collaborative optimization system and method for cloud virtual routing. This embodiment belongs to the field of cloud computing infrastructure and network virtualization technology, specifically involving a technical solution for full-path, multi-dimensional, closed-loop adaptive optimization of virtual routers and virtual switches based on kernel bypass technology in a private cloud operating system and large-scale cloud management platform environment, targeting the dynamic spatiotemporal distribution characteristics of high-concurrency, multi-tenant network traffic.
[0221] This embodiment aims to address a significant technical bottleneck in existing high-speed virtual forwarding technologies: Under traditional static configuration modes, fixed polling strategies, static queue binding relationships, and rigid routing lookup structures struggle to respond in real time to sudden traffic surges or changes in tenant business models, leading to a mismatch between computing resources (CPU) and network resources (NIC). Specifically, this manifests as: some cores being overloaded while others are idle (uneven load), long-tail latency caused by large flows blocking smaller flows, and cache jitter during the routing lookup process. Furthermore, existing AI network optimization solutions are mostly limited to end-to-end path selection, lacking fine-grained control over the micro-states within the single-machine data plane (such as PCIe bus pressure, LLC hit rate, and instruction pipeline efficiency).
[0222] This embodiment introduces a layered hardware-software collaborative architecture, combined with an intelligent decision-making mechanism based on deep reinforcement learning (DRL) and online clustering algorithms, to construct a closed-loop system that includes panoramic telemetry, multi-scale state modeling, transactional configuration execution, and secure rollback protection. The technical solution of this embodiment will be described in detail below.
[0223] I. Overall System Architecture Design and Logical Layering
[0224] This embodiment proposes a layered, decoupled, and hardware-software collaborative system architecture, consisting of a hardware and virtualization resource layer, a high-speed forwarding data plane layer, and an intelligent tuning and control orchestration layer, from bottom to top. Each layer interacts with the others through standardized data interfaces and control protocols, ensuring the system's scalability and compatibility.
[0225] (I) Hardware and Virtualization Resource Layer
[0226] This layer forms the physical foundation for system operation, providing a pool of underlying resources that can be defined and dynamically scheduled by software.
[0227] Multi-Queue NICs and Hardware Offloading Capabilities: The system relies on physical network interface cards (NICs) that support multi-queue technology. These NICs must have receiver scaling capabilities, able to calculate hash values based on the packet's five-tuple (source IP, destination IP, source port, destination port, protocol number) and distribute traffic to different hardware receive queues. Furthermore, the system utilizes the NIC's hardware offloading functions, such as checksum calculation offloading, TCP segmentation offloading (TSO), and hardware encapsulation / decapsulation capabilities for Virtual LANs (VLANs) or tunneling protocols (such as VXLAN and Geneve), to reduce the processing burden on the general-purpose CPU.
[0228] NUMA Architecture and Bus Topology: The system runs on a multi-core server with a Non-Non-Uniform Memory Access (NUMA) architecture. This embodiment pays special attention to the physical affinity between the PCIe bus topology and the CPU cores, identifying the NUMA node where the physical network card resides, and the latency differences between different CPU cores accessing local and remote memory. The system maintains a dynamic "resource topology map" that records the physical distance and bandwidth bottlenecks from the PCIe root complex to each CPU core, serving as the basis for subsequent affinity scheduling.
[0229] Virtualized execution environment: The host machine runs a kernel-based virtual machine monitor (such as KVM) or a container runtime environment. Hardware resources are virtualized into multiple virtual function interfaces (VFs) through SR-IOV (Single Root I / O Virtualization) technology, or directly allocated to the forwarding data plane through PCI passthrough mode, achieving hardware-level isolation and acceleration. Furthermore, it supports Intel's Direct Data I / O (DDIO) technology, allowing the network card to directly DMA write data packets to the CPU's last-level cache (LLC), reducing memory read / write latency.
[0230] (II) High-speed forwarding data plane
[0231] This layer is the core engine for packet processing, employing a "kernel bypass" design and running in user space.
[0232] User-mode polling and zero-copy driver: The data plane does not rely on the network protocol stack of the operating system kernel, but instead directly takes over the register space and DMA (direct memory access) ring buffer of the physical network card through the user-mode driver. The system adopts polling mode instead of the traditional interrupt mode. The CPU core continuously checks the receive ring for new packets, thereby avoiding the overhead of context switching and interrupt storms.
[0233] Multi-level pipeline and batch processing mechanism: The forwarding logic is designed as a multi-level pipeline structure, including packet parsing, flow table lookup, route matching, access control (ACL), packet modification (NAT / Encap / Decap), and packet dispatch scheduling. To improve instruction cache (I-Cache) efficiency, the system adopts vectorized batch processing technology, processing a batch of packets at a time, rather than processing them individually. The system supports "elastic batch processing" technology, meaning the batch size is not fixed but dynamically scales based on the current instruction cycle consumption.
[0234] Programmable dynamic configuration interface: The data plane is not only the execution layer but also exposes fine-grained control interfaces, allowing upper-layer controllers to dynamically modify internal parameters, including but not limited to: the CPU core ID bound to each polling thread, RSS hash keys and indirection tables, the memory layout of the route compression tree, and the aging time of the flow table cache. Furthermore, the data plane includes a lightweight "micro-rule engine" that allows the injection of temporary filtering rules based on eBPF principles for rapid response to abnormal traffic.
[0235] (III) Intelligent Tuning and Control Orchestration Layer
[0236] This layer is the decision-making brain of the system, and it usually runs as an independent service process on the control node or on an isolated core parallel to the data plane.
[0237] Data Acquisition and Preprocessing Pipeline: This pipeline is responsible for pulling high-frequency telemetry data from the data plane and performing noise reduction, aggregation, and formatting. It uses a lock-free circular buffer as the transmission medium to ensure that telemetry data acquisition does not block the forwarding thread.
[0238] AI Inference and Decision Engine: It incorporates multiple machine learning models (such as time-series prediction models and reinforcement learning agents) to generate optimal configuration strategies based on the current state. The engine supports a decoupled mode of "online inference" and "offline training" to ensure low latency in the inference process.
[0239] The transaction manager and policy issuer are responsible for translating the abstract policies generated by the decision engine into concrete, executable instructions on the data plane, and monitoring the execution status of these instructions to ensure configuration consistency. This module implements a database-like transaction mechanism (ACID) to guarantee the atomicity of configuration changes.
[0240] II. High-precision runtime observation and panoramic telemetry acquisition mechanism
[0241] To achieve millisecond-level fine-tuning, this invention designs a low-overhead, high-precision telemetry acquisition subsystem. Unlike traditional minute-level SNMP monitoring, this system achieves microsecond-level data sampling through shared memory and atomic counters.
[0242] (I) Queue-level microstate acquisition
[0243] The system performs in-depth profiling of each Rx / Tx queue of the physical network card and virtual interface.
[0244] Instantaneous queue depth and high-water mark monitoring: The head and tail pointers of the DMA circular buffer are read in real time to calculate the current instantaneous queue length. The system also maintains a "high-water mark" for a sampling period, recording the peak value of the queue length for detecting micro-burst traffic. This is crucial for capturing traffic characteristics that are low in average rate but high in instantaneous peak value.
[0245] Dwell Time and Header Impedance Statistics: By adding high-precision timestamps at the enqueue and dequeue times (using the CPU's TSC register), the average dwell time of data packets in the queue is calculated. Simultaneously, the number of packet losses due to queue fullness and the descriptor refill delay due to PCIe bandwidth limitations are also statistically analyzed.
[0246] Batch size distribution and empty polling rate: This metric tracks the actual number of data packets received in each polling operation (BurstSize). This indicator reflects the current traffic density: if most polls have a BurstSize close to the maximum value, the system is saturated; if a large number of polls are empty (ZeroPoll), CPU resources are wasted. The system calculates the "empty polling rate" (ZeroPollRate) as a key input for energy efficiency optimization.
[0247] (II) Thread and Computing Resource Profile
[0248] For each PMD (PollModeDriver) thread that runs the forwarding logic, its computational behavior characteristics are collected.
[0249] Effective cycle to idle cycle ratio: Due to the use of polling mode, traditional CPU utilization metrics always show 100%. This invention calculates the true "effective utilization" by reading the hardware performance counter (PMU) and distinguishing between "effective instruction cycles" (cycles for processing data packets) and "idle query cycles" (cycles for checking empty queues).
[0250] Caching and memory subsystem metrics: Collect hit rate and miss rate of L1 / L2 / LLC caches, as well as the miss status of the Data Transformation Back Buffer (DTLB). A high LLCM miss rate usually indicates that the currently processed data stream has extremely high randomness or too many flow table entries, requiring adjustment of the caching strategy.
[0251] Branch prediction efficiency and instruction pipeline: This section analyzes the success rate of CPU branch prediction units and instructions per clock cycle (IPC). In complex ACL or routing lookup logic, branch prediction failures can lead to pipeline flushing, severely impacting performance. The system uses these metrics to evaluate the execution efficiency of the current code path.
[0252] (III) Analysis of Business Traffic and Routing Characteristics
[0253] At the logical level, multi-dimensional statistics are performed on the business data flowing through the system.
[0254] Prefix Hotness and Locality of Access: During the Longest Prefix Match (LPM) lookup, the hit count for each routing prefix is calculated. The system uses a "DecayingCounter" algorithm to identify "Hot Prefixes" within the current time window, i.e., the 10% of prefixes that carry 90% of the traffic. This characteristic directly guides the optimization of the routing table structure.
[0255] Flow fingerprinting: The system extracts fingerprints from traffic based on five-tuples, statistically analyzing flow duration, packet length distribution (e.g., percentage of 64-byte packets vs. percentage of 1500-byte packets), and flow concurrency. The system pays particular attention to TCP flags (SYN / FIN / RST) to determine the rate of connection establishment and teardown.
[0256] Multi-tenant isolation metrics: Aggregate statistics based on tenant ID or VNI to identify the existence of "noisy neighbors," i.e., whether a sudden surge in traffic from a tenant has crowded out shared resources, causing packet loss for other tenants.
[0257] III. Multi-scale feature construction and dynamic state modeling
[0258] The collected raw data is transformed into "state vectors" that the intelligent model can understand through feature engineering. This invention employs a multi-scale modeling method that is compatible with both temporal and spatial features, and introduces graph neural network concepts to model the network topology.
[0259] (I) Feature Preprocessing and Normalization
[0260] Sliding window aggregation: To smooth out transient jitter, the system maintains sliding windows across multiple time scales (e.g., 10ms, 100ms, 1s). The mean, variance, skewness, and kurtosis are calculated for the data within each window. Skewness and kurtosis characteristics are particularly crucial for identifying DDoS attacks or abnormal traffic bursts.
[0261] Spatial normalization and dynamic baseline: Indicators with different dimensions (such as million-level PPS values and percentage values of CPU utilization) are mapped to the [0,1] or [-1,1] interval. Dynamic baseline technology is used to dynamically adjust the upper and lower bounds of normalization based on historical data from the past 24 hours or week, eliminating biases caused by day-night traffic fluctuations.
[0262] One-hot encoding and embedding: For discrete features (such as the current scheduling algorithm ID and NUMA node ID), one-hot encoding is used. For high-dimensional sparse features (such as destination IP address ranges), hash embedding is used to map them into low-dimensional dense vectors for neural network processing.
[0263] (II) Online Clustering and Recognition of Traffic Scenarios
[0264] This invention incorporates a lightweight unsupervised clustering module for real-time identification of current traffic patterns.
[0265] Feature space definition: The feature space is constructed by selecting "average packet length", "concurrency of flows", "new connection rate", "proportion of large flows", and "entropy value of the quintuple" as key dimensions. Entropy value is used to measure the dispersion of traffic; a low entropy value usually means that traffic is concentrated on a few flows.
[0266] Online K-Means Evolution: Employing streaming K-Means algorithm or Gaussian Mixture Model (GMM), cluster centers (Centroids) are updated based on real-time data streams. The model supports a "forgetting mechanism," reducing the weight of older data over time.
[0267] Scene label generation: Based on the clustering results, scene labels are assigned to the current time slice, such as "small packet attack scene", "large file transfer scene", "hybrid high throughput scene", "low load idle scene", and "control protocol storm scene". These labels are used as context input to the subsequent decision model, which greatly reduces the policy search space and improves the convergence speed.
[0268] (III) Tensor Representation and Graph Structure of System State
[0269] Ultimately, the global state of the system is modeled as a high-dimensional tensor S_t. This tensor contains not only numerical statistics but also topological information:
[0270] Queue tensor S_{queue}: The length, packet loss rate, and waiting delay vector of all queues.
[0271] Core tensor S_{core}: Effective utilization, IPC, and CacheMiss vectors of all forwarding cores.
[0272] Traffic tensor S_{traffic}: Traffic pattern label, hotspot prefix distribution vector.
[0273] The topology graph G_{topo} describes the physical and logical connections between network interface ports, PCIe buses, NUMA nodes, CPU cores, and virtual network interfaces using an adjacency matrix representation from a graph neural network (GNN). This enables the model to understand the concepts of "distance" and "congestion propagation."
[0274] IV. AI-based Intelligent Scheduling Decision-Making Mechanism
[0275] The decision-making module is the core of this invention, aiming to establish a mapping function from "system state" to "optimal configuration". This invention adopts a hybrid decision-making architecture that combines reinforcement learning (RL) with heuristic rules, and introduces a prediction mechanism.
[0276] (I) Action Space Design
[0277] The output of the decision model is not a single parameter, but a set of configuration vectors that work together.
[0278] RSS refraction and stream pulling strategy:
[0279] Action definition: Modify the NIC's RSS indirection table to redirect traffic with a specific hash value to a specified Rx queue.
[0280] Application scenario: When an overloaded CPU core is detected while other cores are idle, load balancing is achieved by adjusting the indirection table to "pull" some traffic (such as a specific large flow) to the queue corresponding to the idle core. The system also supports adjusting the Toeplitz hash algorithm key (HashKey) to completely disperse traffic with severe hash collisions.
[0281] Polling – Sleep Adaptive Parameters and Frequency Control:
[0282] Action definition: Adjust the PMD thread's `Batch_Size` (maximum number of packets received at one time), `Sleep_Interval` (number of microseconds to sleep after empty polling), and the CPU's P-state (frequency state).
[0283] Optimization logic: Under low load, enable microsecond-level sleep (e.g., `usleep(10)`) and reduce `Batch_Size`, while reducing CPU frequency to save energy; under high load, disable sleep, lock the highest frequency, and increase `Batch_Size` (e.g., from 32 to 128) to maximize instruction pipeline efficiency and throughput.
[0284] Routing structure reorganization and prefetching strategies:
[0285] Action definition: Adjust the size of the first-level index of the route compression tree, trigger the reordering of the hot spot cache (CacheLayout), and adjust the "prefetchStride" in the software pipeline.
[0286] Optimization logic: When a change in the hotspot prefix set is detected, the decision module issues an instruction to promote the new hotspot prefix to a CPU L1 / L2 cache-friendly linear array or hash table. Simultaneously, based on the current memory latency, the prefetch instruction is dynamically adjusted to be executed a certain number of instruction cycles earlier to mask memory access latency.
[0287] Queues – Core Affinity Mapping:
[0288] Action definition: Dynamically modify the mapping relationship between the receive queue and the processing thread, and even start or stop the forwarding thread at runtime (Scale-out / Scale-in).
[0289] Optimization logic: Based on the NUMA topology, ensure that the queue interrupt and the processing thread are located on the same NUMA node to avoid remote memory access across the QPI / UPI bus.
[0290] (II) Specific Architecture and Training Mechanism of Deep Reinforcement Learning Decision Model (Learning, DRL) Framework
[0291] As the core of intelligent scheduling, unlike the general black-box model, this invention specifically designs a dual-stream sensing network structure and a multi-time-scale training mechanism tailored to the characteristics of cloud network traffic.
[0292] Dual-Stream Perception Neural Network Architecture
[0293] The agent's neural network adopts a dual-stream architecture with parallel "state-aware stream" and "temporal prediction stream", which are finally converged at the feature fusion layer.
[0294] State Feature Extraction Subnetwork (StateEmbeddingNetwork):
[0295] For the static state tensor at the current moment (such as the instantaneous length of each queue, CPU Cache Miss rate, and topological adjacency matrix), a feature extractor that combines a multilayer perceptron (MLP) and a graph convolutional network (GCN) is designed.
[0296] For numerical features (such as queue depth), they are mapped to high-dimensional feature vectors through three fully connected layers (256 neurons per layer, with ReLU activation function).
[0297] For topological features (such as the connection graph G_topo between NUMA nodes), a Graph Attention Network (GAT) layer is used to aggregate the load information of neighboring nodes and generate a topology embedding vector. This enables the model to understand the physical path of "congestion propagation".
[0298] TrendPredictionNetwork:
[0299] To address the response lag issue caused by traditional RL decisions based solely on the current state, this invention incorporates a timing analysis module based on a Transformer encoder in parallel.
[0300] Input construction: The input is a sequence of historical states over the past T time steps (e.g., T=50).
[0301] Attention mechanism: Utilizes multi-head self-attention to capture long-range dependencies of traffic over time (e.g., identify traffic with periodic pulse features of 5 seconds).
[0302] Output: This subnet not only outputs a vector predicting future traffic trends, but also passes its hidden state as contextual information to the policy network.
[0303] Feature Fusion & Policy Headers:
[0304] The two features mentioned above are combined in the fusion layer through a concatenation operation and then input into the backend of the Actor-Critic architecture.
[0305] Actor Network (Policy Generation): Outputs the probability distribution of the action space. For continuous actions (such as BatchSize), it outputs the mean μ and variance σ of a Gaussian distribution; for discrete actions (such as CoreID), it outputs the Softmax probability.
[0306] Critic Network (Value Assessment): Outputs a scalar V(s) representing the expected long-term reward of the current state, used to guide the updating of Actors.
[0307] PPO-based hybrid action space training algorithm
[0308] This system uses the Proximal Policy Optimization (PPO) algorithm for training, which is an on-policy algorithm, but it has been specifically modified in this invention for network tuning scenarios.
[0309] Processing of mixed motion space:
[0310] Traditional PPOs struggle to handle both discrete and continuous actions simultaneously. This invention decomposes the action space into multiple independent subspaces, and the Actor network has multiple output heads.
[0311] Header A (Discrete): Outputs the Logits of CoreID, sampled using a categorical distribution.
[0312] Head B (Continuous): Outputs the normalized value of BatchSize, sampled using a Beta distribution (the Beta distribution is more suitable than the Gaussian distribution for bounded action intervals, avoiding output of negative or out-of-limit values).
[0313] This allows the model to simultaneously decide "which core to guide the flow to" and "what size polling batch to set" in a single inference.
[0314] Clipped SurrogateObjective:
[0315] To ensure training stability and avoid performance collapse caused by excessively large policy update steps, the following loss function L(theta) is adopted:
[0316] L(theta)=E_t[min(r_t(theta) x A_hat_t,clip(r_t(theta),1-epsilon,1+epsilon) x A_hat_t)]
[0317] Where r_t(theta) is the probability ratio between the old and new policies, A_hat_t is the advantage function calculated using Generalized Advantage Estimation (GAE), and epsilon is the pruning threshold (usually set to 0.2). This mechanism ensures that the policy only undergoes "tiny, safe" iterations, making it ideal for production network systems with extremely high stability requirements.
[0318] To address the issue of network performance fluctuations caused by the "random experimentation" in the initial stage of reinforcement learning, this embodiment designs a two-stage training process:
[0319] Phase 1: Expert-Guided Imitation Learning
[0320] In the initial stage of system deployment, the exploration function of RL is not enabled. The system has a built-in traditional controller based on expert rules (such as "increase the number of cores if the queue length is >100"). The data (state-action pairs) generated by this controller is used as "teaching data". The deep neural network minimizes the Kullback-Leibler divergence (KLDivergence) between the predicted action and the expert action through supervised learning. This enables the neural network to quickly acquire a "passable" level of decision-making ability.
[0321] Phase Two: Reinforcement Learning Takeover and Fine-tuning
[0322] Once the loss of imitation learning converges, the system smoothly switches to PPO training mode. At this point, the model begins to explore by adding Gaussian noise to the expert policy, trying action combinations not covered by the expert rules, thereby discovering a better policy than the expert rules (e.g., discovering an advanced policy of "expanding capacity in advance because the queue is short but the traffic is expected to surge").
[0323] The reward function is the guiding principle for AI learning. This embodiment designs a standardized reward function with dynamic weights:
[0324] R_t=w_1(t) x T_tilde-w_2(t) x L_tilde-w_3(t) x D_tilde-w_4(t) x E_tilde-P_osc
[0325] Normalization term (X_tilde): Throughput T, latency L, packet loss D, and energy consumption E are all normalized by Z-Score using a historical sliding window to eliminate dimensional differences.
[0326] SLA-aware dynamic weight w_i(t): The weight is not fixed, but dynamically injected based on the current business SLA label. For example, when a VoIP traffic label is detected, the latency weight w_2 will automatically increase exponentially.
[0327] Oscillation penalty term P_osc: To suppress frequent model configuration changes, an action smoothing penalty is introduced. If the difference between Action_t and Action_{t-1} is too large, the corresponding reward points are deducted. This forces the model to learn to "plan before acting," only implementing changes when the expected benefit is significant.
[0328] (III) Rule Engine and Security Constraints
[0329] After the AI model outputs the strategy, a "safety filter" based on expert rules is introduced.
[0330] Order preservation constraint: For the same TCP connection, the processing order must be guaranteed.
[0331] Atomicity constraint: No black hole routes or loops can occur during configuration changes.
[0332] Resource constraints: The number of CPU cores allocated cannot exceed the quota reserved by the host machine.
[0333] De-jittering rule: If the configuration suggested by the AI is too similar to the current configuration, or if the suggestion is to frequently flip, the rule engine will block the strategy and maintain the status quo.
[0334] V. Transactional Configuration Execution and Lossless Secure Migration
[0335] Translating decisions into actual data plane configuration is a high-risk operation. This invention proposes a "configuration transaction" mechanism that ensures state switching is completed within a millisecond-level time window and is completely unaffected by business traffic (ZeroDowntime).
[0336] (I) Shadow Configuration and Double Buffering Technique
[0337] To avoid race conditions during the configuration process, the data plane uses a "double buffering" mode to manage configuration data.
[0338] Shadow View Construction: When a new policy is received, the data plane does not directly modify the active configuration structure, but instead builds a completely new "ShadowView" in background memory. For example, it might build a new route compression tree or a new RSS mapping table. This process is completed in the control plane thread and does not affect data plane forwarding.
[0339] Pre-validation: Performs an integrity check on the shadow view to ensure there are no dangling pointers, logical conflicts, or memory out-of-bounds risks.
[0340] (II) Atomic Switching Based on RCU
[0341] Lock-free switching is achieved by utilizing the Read-Copy-Update (RCU) concept.
[0342] Atomic pointer swap: Using atomic CPU instructions (such as `atomic_exchange` or `compare_and_swap`), the global configuration pointer is instantly changed from the "active view" to the "shadow view". Because the pointer assignment is atomic, the read thread (forwarding thread) will always see either the old configuration or the new configuration at any given time, and will never see an intermediate state.
[0343] Quiescent Period and Reclamation of Old Resources: After the switch, the old configuration view is not released immediately. The system waits for all currently executing read threads to complete their current processing cycle (i.e., enter the quiescent period, QuiescentState) before safely reclaiming the memory occupied by the old view. This completely eliminates the performance overhead of read-write locks.
[0344] (III) Lossless migration mechanism for complex flow states
[0345] When a strategy involves migrating the processing of a stream from CoreA to CoreB, the issues of cache state synchronization and message out-of-order delivery must be addressed. This invention designs a three-step protocol: "Mark-Dump-Switch".
[0346] Marking Phase: In CoreA's receive logic, a "migration mark" is added to the target stream. CoreA stops processing new packets for that stream and temporarily buffers new packets in a dedicated "migration circular queue," processing only older packets.
[0347] State synchronization: The connection tracking table (ConntrackTable) and NAT mapping table entries for this flow in CoreA are synchronously copied to the local storage of CoreB. Fast copying is achieved using the CPU cache coherence protocol (MESI) or shared memory.
[0348] Drain & Switch: After confirming that there are no residual packets in the CoreA pipeline, the RSS table is updated, and new packets in that flow are directly redirected to CoreB. CoreB first processes the backlog of packets in the "migration circular queue," and then begins processing new packets arriving directly from the NIC. This process ensures strict packet ordering.
[0349] (iv) Transaction rollback and fault recovery
[0350] The system generates a unique transaction ID for each configuration change. If an exception is caught during execution (such as hardware register write failure, memory allocation failure, or timeout), the system immediately performs a reverse operation using the transaction log (UndoLog) to restore the system to a stable snapshot before the change and reports a fault alarm to the control layer.
[0351] VI. Advanced Memory and Caching Optimization Techniques
[0352] This invention, based on traditional network optimization, delves into the underlying memory subsystem for optimization, which is the key innovation for achieving high-performance forwarding.
[0353] Dynamic defragmentation of Hugepages: Virtual routers typically use 2MB or 1GB of Hugepages to reduce TLB (Translation Lookaside Buffer) gaps. However, after long-term operation, memory fragmentation can lead to Hugepage allocation failures. This system introduces a background defragmentation process that moves and merges memory pages during low-load periods to ensure that the data plane always has sufficient contiguous physical memory available, and to allocate memory on NUMA nodes that are identical to the CPU cores whenever possible.
[0354] Adaptive adjustment of software prefetch strategy: In packet processing pipelines, accessing packet headers or flow tables often leads to CacheMiss. The system dynamically adjusts the parameters of the software prefetch instruction (`_mm_prefetch`) by monitoring IPC and CacheMissRate. For example, when an increase in memory latency is detected, the system automatically increases the prefetchDistance, loading data into the L1 cache more cycles in advance, thereby "masking" memory access latency.
[0355] Direct Cache Access (DCA / DDIO) Control: The system controls the network card to write data packets to a specific area of the LLC (WayPartitioning) by configuring the TLP (Transaction Layer Packet) attribute of the PCIe device. This invention can allocate more LLC space to critical service queues according to different queue priorities, preventing high-throughput non-critical services from "washing out" the cached data of critical services (CachePollution).
[0356] VII. Synergy between Green Computing and Energy Efficiency
[0357] In response to the energy conservation and emission reduction requirements of modern data centers, this invention takes energy efficiency as one of the core optimization objectives.
[0358] Frequency-aware scheduling algorithm: The system schedules not only data packets but also CPU frequencies (P-states). When it detects that the current traffic is below line speed and the queue length is short, the system will proactively request the operating system to reduce the CPU core's operating frequency, or use Intel SpeedSelect Technology (SST) to adjust the core priority.
[0359] Microsecond-level sleep injection: Under extremely low load, simple polling can cause the CPU to idle at 100%, wasting a lot of power. The system uses a traffic prediction model to accurately calculate the gap between two arriving data packets and injects `monitor / mwait` instructions or microsecond-level `usleep` commands, causing the CPU to enter C1 or deeper power-saving states (C-states). The intelligent model balances the trade-off between power saving and wake-up latency, ensuring that sleep does not lead to packet loss.
[0360] VIII. Closed-loop feedback and continuous model evolution
[0361] The system is not only an executor, but also a learner. Through a continuous feedback loop, the intelligent model can adapt to the ever-changing business environment.
[0362] (I) Performance Evaluation and Reward Calculation
[0363] Within an evaluation window after the policy takes effect, the system collects performance metrics again.
[0364] Relative gain calculation: Calculate the performance improvement of the new strategy relative to the baseline strategy or the previous version strategy.
[0365] Delayed feedback attribution: Considering the inertia of network systems, the effects of policies may be delayed. The system adopts an "n-step return" mechanism, which discounts the returns of multiple future time steps and attributes them to the current action, thus solving the credit assignment problem.
[0366] (II) Experience Replay and Offline Training
[0367] The system maintains a large-capacity "ExperienceReplayBuffer" to store samples in the quadruple (State, Action, Reward, Next_State).
[0368] Sample diversity protection: Prioritized Experience Replay is used to give higher sampling weights to samples with large prediction errors (i.e., "unexpected"), thereby accelerating the model's learning of corner cases.
[0369] Imitation Learning: During the cold start phase of a system, the RL model may perform poorly due to a lack of training data. At this time, the system uses the strategies generated by traditional heuristic algorithms (expert systems) as "teaching data" to quickly initialize the weights of the neural network through imitation learning, giving it basic usability. It then switches to reinforcement learning mode to improve itself.
[0370] (III) Oscillation Detection and Hysteresis Control
[0371] To prevent the system from frequently switching between two similar strategies (flapping), this invention introduces a hysteresis comparator. Switching is only triggered when the estimated benefit of the new strategy exceeds a certain threshold of the current strategy (e.g., an improvement of >5%). Furthermore, after each configuration change, a mandatory "cooldown" period is enforced, during which new changes are prohibited unless an urgent security event occurs.
[0372] IX. Engineering Integration and Application Scenarios
[0373] This embodiment features a standardized interface that facilitates integration with mainstream cloud ecosystems.
[0374] Integration with cloud management platforms: The intelligent scheduling controller runs in Operator mode within a Kubernetes cluster or as a plugin for OpenStackNeutron. It listens for resource change events on the cloud platform (such as creating virtual machines or adjusting bandwidth limits) and translates them into data plane constraints.
[0375] Visualization and Observability: A dedicated dashboard is provided to display a real-time "heatmap" of each virtual router, showing CPU core load distribution, hotspot routing prefixes, and historical trajectory and benefit curves of AI tuning. Training samples can be exported for offline analysis by data scientists.
[0376] Multi-scenario adaptation:
[0377] NFV gateway scenario: For gateways that handle complex services such as NAT and firewalls, the focus is on optimizing flow table cache hit rate and connection tracking performance.
[0378] Storage backend network scenarios: For storage traffic such as Ceph / iSCSI (large packets, high throughput), the focus is on optimizing BatchSize and RSS load balancing to reduce the overhead of small packet processing.
[0379] Edge computing scenarios: In resource-constrained edge nodes, the focus is on optimizing energy efficiency and reducing power consumption through aggressive sleep strategies.
[0380] The embodiments provided in this application overcome the core challenge of optimizing the performance of virtual routing data planes in cloud environments by constructing an intelligent collaborative tuning system encompassing full-stack telemetry, AI-driven decision-making, transactional execution, deep memory optimization, and closed-loop evolution. Without altering existing hardware infrastructure, the solution significantly improves network throughput, reduces long-tail latency, and substantially enhances the utilization efficiency and energy efficiency of computing resources through software-defined intelligent control, providing crucial technical support for building a high-performance, adaptive, and green next-generation cloud network infrastructure.
[0381] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods of the various embodiments of this application.
[0382] This embodiment also provides a virtual routing configuration control device for implementing the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0383] Figure 3 This is a structural block diagram of a virtual routing configuration control device according to an embodiment of this application, such as... Figure 3 As shown, the device includes:
[0384] The acquisition unit 302 is used to acquire queue data, central processing unit data, and traffic data of the virtual router, as well as to acquire component operation information of the virtual router;
[0385] The extraction unit 304 is used to extract features from queue data, central processing unit data and traffic data to obtain queue feature tensor, central processing unit feature tensor and traffic feature tensor associated with virtual routes, and to encode the component running information to obtain component topology tensor associated with virtual routes, wherein the component topology tensor is used to indicate the component dependency relationship of virtual routes.
[0386] Combination unit 306 is used to combine queue feature tensor, central processing unit feature tensor, traffic feature tensor and component topology tensor to obtain target state tensor associated with virtual route, wherein the target state tensor is used to indicate the running state of virtual route;
[0387] The prediction unit 308 is used to perform configuration prediction on the virtual route based on the target state tensor, obtain the target action corresponding to the target state tensor, and execute the target action, wherein the target action is used to correct the configuration parameters of the virtual route.
[0388] As an optional solution, prediction unit 308 includes:
[0389] The input module is used to input the target state tensor into the action decision model and obtain a set of configuration vectors output by the action decision model.
[0390] The first acquisition module is used to acquire the expected action corresponding to the expected configuration vector when a set of configuration vectors includes an expected configuration vector that meets the expected conditions.
[0391] The first determining module is used to determine each expected action corresponding to a set of configuration vectors as the target action.
[0392] As an optional solution, the first acquisition module includes:
[0393] The first acquisition submodule is used to acquire the first expected action corresponding to the first expected configuration vector when a set of configuration vectors includes a first expected configuration vector that meets the first expected condition. The first expected condition is used to indicate that there is a processor load of a first central processor in the virtual router that is greater than a first migration load threshold and a processor load of a second central processor that is less than a second migration load threshold. The first expected action is used to indicate that the traffic of the first central processor is migrated to the second central processor. The first migration load threshold is greater than the second migration load threshold.
[0394] As an optional solution, the first acquisition module includes:
[0395] The second acquisition submodule is used to acquire the second expected action corresponding to the second expected configuration vector when a set of configuration vectors includes a second expected configuration vector that meets the second expected conditions. The second expected conditions are used to indicate that the processor load of the third central processor in the virtual router is greater than the hibernation load threshold or the processor load of the fourth central processor is less than the hibernation load threshold. The second expected action is used to instruct the third central processor to disable hibernation or instruct the fourth central processor to hibernate.
[0396] As an optional solution, the first acquisition module includes:
[0397] The third acquisition submodule is used to acquire the third expected action corresponding to the third expected configuration vector when a set of configuration vectors includes a third expected configuration vector that meets the third expected condition. The third expected condition is used to indicate that the hotspot access address in the virtual router is changed, and the third expected action is used to indicate that the processing priority of the changed address of the hotspot access address is increased.
[0398] As an optional solution, the first acquisition module includes:
[0399] The fourth acquisition submodule is used to acquire the fourth expected action corresponding to the fourth expected configuration vector when a set of configuration vectors includes a fourth expected configuration vector that meets the fourth expected condition. The fourth expected condition is used to indicate that there is a correlation between the fourth central processor and the first memory region in the virtual router that is less than a preset correlation threshold. The fourth expected action is used to indicate that the first mapping relationship between the fourth central processor and the first memory region is corrected to the second mapping relationship between the fourth central processor and the second memory region. The correlation between the fourth central processor and the second memory region is greater than or equal to the correlation threshold.
[0400] As an optional solution, the input module includes:
[0401] The identification submodule is used to identify the features of the queue feature tensor, central processing unit feature tensor, flow feature tensor and component topology tensor using the state perception module in the action decision model, and obtain the first feature vector.
[0402] The prediction submodule is used to use the temporal prediction module in the action decision model to perform feature prediction on the first historical state tensor of the virtual route at multiple time steps before the target state tensor is input into the action decision model, and obtain the second feature vector.
[0403] The fusion submodule is used to fuse the first feature vector and the second feature vector to obtain a set of configuration vectors.
[0404] As an optional solution, the device also includes:
[0405] The training module is used to train the initial action decision model multiple times based on the second historical state tensor of the virtual routing historical time period and multiple configuration control strategies before inputting the target state tensor into the action decision model and obtaining a set of configuration vectors output by the action decision model. This process continues until the training loss value of the initial action decision model is less than a preset loss threshold, thus determining the obtained action decision model. The input for each model training is the second historical state tensor and one of the multiple configuration control strategies.
[0406] As an optional solution, the device also includes:
[0407] The second acquisition module is used to acquire the probability ratio between the first configuration control strategy used in the i-th model training and the second configuration control strategy used in the (i-1)-th model training during the process of multiple model trainings of the initial action decision model.
[0408] The second determining module is used to determine the training loss value corresponding to the i-th model training based on the probability ratio, the advantage evaluation parameter corresponding to the i-th model training, and the preset pruning parameter during the process of training the initial action decision model multiple times.
[0409] Wherein, the training loss value corresponding to the i-th model training is the smaller value between the first parameter and the second parameter. The first parameter is the product of the probability ratio and the advantage evaluation parameter. When the probability ratio is within the expected range, the second parameter is the probability ratio. When the probability ratio is not within the expected range, the second parameter is the value closest to the probability ratio between the upper limit and the lower limit of the expected range.
[0410] As an optional solution, the device also includes:
[0411] The third acquisition module is used to acquire the first performance improvement parameter of the virtual router in the first time period after the execution of the target action, wherein the first performance improvement parameter is used to indicate the performance improvement of the virtual router in the first time period.
[0412] The first prediction module is used to predict a second performance improvement parameter of the virtual router in a second time period after the execution of the target action, wherein the second performance improvement parameter is used to indicate the expected performance improvement of the virtual router after the second time period.
[0413] The fusion module is used to fuse the first performance enhancement parameter and the second performance enhancement parameter after the target action is executed, so as to obtain the target performance enhancement parameter used to indicate the effect of the target action.
[0414] As an optional solution, the fusion module includes:
[0415] The first determination submodule is used to determine the discount parameter corresponding to the second performance improvement parameter based on the action type and execution time of the target action.
[0416] The calculation submodule is used to multiply the discount parameter by the second performance improvement parameter to obtain the discounted second performance improvement parameter;
[0417] The second determining submodule is used to determine the sum of the first performance improvement parameter and the discounted second performance improvement parameter as the target performance improvement parameter.
[0418] As an optional solution, the device further includes:
[0419] The third acquisition module is used to acquire the time difference between the trigger time of the execution request and the completion time of the execution of the target action when the execution request of the reference action is detected after the target action is executed.
[0420] The first control module is used to prevent the execution of the reference action after the target action is executed, provided that the time difference is less than a time threshold.
[0421] The second prediction module is used to predict the third performance improvement parameter of the virtual router after executing the reference action, provided that the time difference is greater than or equal to the time difference threshold after the target action is executed.
[0422] The second control module is used to prevent the execution of the reference action after the target action is executed, if the third performance improvement parameter is less than the expected threshold.
[0423] The third control module is used to execute a reference action after the target action is performed, provided that the third performance enhancement parameter is greater than or equal to the expected threshold.
[0424] As an optional solution, the acquisition unit 302 includes:
[0425] The data acquisition module is used to collect data generated by the virtual router within a preset time period according to sliding windows of different time lengths, wherein the length of the preset time period is longer than the length of any sliding window.
[0426] The processing module is used to classify and normalize the data to obtain queue data, central processing unit data, traffic data, and component operation information.
[0427] As an optional solution, prediction unit 308 includes:
[0428] The first creation module is used to create a shadow view in the background memory of the virtual router. The shadow view is used to store the target configuration information obtained by executing the target action.
[0429] The adjustment module is used to change the configuration pointer of the target CPU associated with the target action from the original view to the shadow view, whereby the target CPU executes the operation according to the target configuration information after being pointed to.
[0430] As an optional solution, the device also includes:
[0431] The generation module is used to generate a corresponding action identifier for the target action before the target action is executed;
[0432] The device also includes:
[0433] The second creation module is used to create an action execution log corresponding to the action identifier during the execution of the target action;
[0434] The callback module is used to revert the configuration parameters of the virtual router to the version before the target action was executed if expected abnormal information is detected in the action execution log during the execution of the target action.
[0435] As an optional solution, prediction unit 308 includes:
[0436] The caching module is used to cache the first data of the target type received by the fifth central processor to the cache queue when the target action indicates that the target type data is to be migrated from the fifth central processor to the sixth central processor;
[0437] The migration module is used to migrate the first data from the cache queue to the sixth central processor after migrating the second data of the target type received in the fifth central processor to the sixth central processor, wherein the sixth central processor has a higher processing priority for the first data than for the second data.
[0438] Specific examples in this embodiment can be found in the examples described in the above embodiments and exemplary implementations, and will not be repeated here.
[0439] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods of the various embodiments of this application.
[0440] It should be noted that the above modules can be implemented by software or hardware. For the latter, they can be implemented in the following ways, but are not limited to: all the above modules are located in the same processor; or, the above modules are located in different processors in any combination.
[0441] Embodiments of this application also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to perform the steps in any of the above method embodiments when it is run.
[0442] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.
[0443] Embodiments of this application also provide an electronic device, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.
[0444] In one exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.
[0445] Embodiments of this application also provide a computer program product, including a non-volatile computer-readable storage medium storing the computer program product, wherein the computer program, when executed by a processor, implements the steps of the methods in various embodiments of this application.
[0446] Specific examples in this embodiment can be found in the examples described in the above embodiments and exemplary implementations, and will not be repeated here.
[0447] Obviously, those skilled in the art should understand that the modules or steps of this application described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. They can be implemented using computer-executable program code, and thus can be stored in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those presented here, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, this application is not limited to any particular combination of hardware and software.
[0448] The above are merely preferred embodiments of this application and are not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the principles of this application should be included within the protection scope of this application.
Claims
1. A configuration control method for a virtual router, characterized in that, include: Obtain queue data, CPU data, and traffic data of the virtual router, as well as the component operation information of the virtual router; Feature extraction is performed on the queue data, the CPU data, and the traffic data to obtain the queue feature tensor, CPU feature tensor, and traffic feature tensor associated with the virtual route; and feature encoding is performed on the component operation information to obtain the component topology tensor associated with the virtual route, wherein the component topology tensor is used to indicate the component dependencies of the virtual route. The queue feature tensor, the central processing unit feature tensor, the traffic feature tensor, and the component topology tensor are combined to obtain the target state tensor associated with the virtual route, wherein the target state tensor is used to indicate the running state of the virtual route; Using the state-aware module in the action decision model, feature recognition is performed on the queue feature tensor, the central processing unit feature tensor, the traffic feature tensor, and the component topology tensor to obtain a first feature vector; using the time-series prediction module in the action decision model, feature prediction is performed on the first historical state tensor of the virtual route at multiple time steps before the target state tensor is input into the action decision model to obtain a second feature vector; feature fusion is performed on the first feature vector and the second feature vector to obtain a set of configuration vectors; If the set of configuration vectors includes an expected configuration vector that meets the expected conditions, obtain the expected action corresponding to the expected configuration vector; Each of the expected actions corresponding to the set of configuration vectors is determined as the target action; Execute the target action, wherein the target action is used to correct the configuration parameters of the virtual route.
2. The method according to claim 1, characterized in that, When the set of configuration vectors includes an expected configuration vector that meets the expected conditions, obtaining the expected action corresponding to the expected configuration vector includes: If the set of configuration vectors includes a first expected configuration vector that meets the first expected condition, obtain the first expected action corresponding to the first expected configuration vector. The first expected condition is used to indicate that there is a processor load of a first central processor in the virtual router that is greater than a first migration load threshold and a processor load of a second central processor that is less than a second migration load threshold. The first expected action is used to indicate that the traffic of the first central processor is migrated to the second central processor. The first migration load threshold is greater than the second migration load threshold.
3. The method according to claim 1, characterized in that, When the set of configuration vectors includes an expected configuration vector that meets the expected conditions, obtaining the expected action corresponding to the expected configuration vector includes: If the set of configuration vectors includes a second expected configuration vector that meets the second expected condition, obtain the second expected action corresponding to the second expected configuration vector. The second expected condition is used to indicate that the processor load of the third central processor in the virtual router is greater than the hibernation load threshold or the processor load of the fourth central processor is less than the hibernation load threshold. The second expected action is used to instruct the third central processor to disable hibernation or instruct the fourth central processor to hibernate.
4. The method according to claim 1, characterized in that, When the set of configuration vectors includes an expected configuration vector that meets the expected conditions, obtaining the expected action corresponding to the expected configuration vector includes: If the set of configuration vectors includes a third expected configuration vector that meets the third expected condition, obtain the third expected action corresponding to the third expected configuration vector, wherein the third expected condition is used to indicate the transmission change of the hotspot access address in the virtual route, and the third expected action is used to indicate increasing the processing priority of the changed address of the hotspot access address.
5. The method according to claim 1, characterized in that, When the set of configuration vectors includes an expected configuration vector that meets the expected conditions, obtaining the expected action corresponding to the expected configuration vector includes: If the set of configuration vectors includes a fourth expected configuration vector that meets the fourth expected condition, obtain the fourth expected action corresponding to the fourth expected configuration vector. The fourth expected condition is used to indicate that there is a correlation between the fourth central processing unit and the first memory region in the virtual router that is less than a preset correlation threshold. The fourth expected action is used to indicate that the first mapping relationship between the fourth central processing unit and the first memory region is corrected to a second mapping relationship between the fourth central processing unit and the second memory region. The correlation between the fourth central processing unit and the second memory region is greater than or equal to the correlation threshold.
6. The method according to claim 1, characterized in that, The method further includes: Based on the second historical state tensor of the virtual routing historical time period and multiple configuration control strategies, the initial action decision model is trained multiple times until the training loss value corresponding to the initial action decision model is less than a preset loss threshold, and the action decision model is determined. The input of each model training is the second historical state tensor and one of the multiple configuration control strategies.
7. The method according to claim 6, characterized in that, During the process of training the initial action decision model multiple times, the method further includes: After training the initial action decision model for the i-th time, the probability ratio between the first configuration control strategy used in the i-th model training and the second configuration control strategy used in the (i-1)-th model training is obtained. The training loss value corresponding to the i-th model training is determined based on the probability ratio, the advantage evaluation parameter corresponding to the i-th model training, and the preset pruning parameter. Wherein, the training loss value corresponding to the i-th model training is the smaller value between the first parameter and the second parameter, the first parameter is the product of the probability ratio and the advantage evaluation parameter, the second parameter is the probability ratio when the probability ratio is within the expected range, and the second parameter is the value closest to the probability ratio between the upper limit and the lower limit of the expected range when the probability ratio is not within the expected range.
8. The method according to claim 1, characterized in that, After performing the target action, the method further includes: Obtain a first performance improvement parameter of the virtual router during a first time period after the target action is performed, wherein the first performance improvement parameter is used to indicate the performance improvement of the virtual router during the first time period; A second performance improvement parameter is predicted for the virtual router during a second time period following the first time period, wherein the second performance improvement parameter is used to indicate the expected performance improvement of the virtual router after the second time period; The first performance enhancement parameter and the second performance enhancement parameter are fused to obtain the target performance enhancement parameter used to indicate the effect of the target action.
9. The method according to claim 8, characterized in that, The fusion of the first performance enhancement parameter and the second performance enhancement parameter includes: Based on the action type and execution time of the target action, determine the discount parameter corresponding to the second performance improvement parameter; Multiply the discounting parameter by the second performance improvement parameter to obtain the discounted second performance improvement parameter; The sum of the first performance improvement parameter and the discounted second performance improvement parameter is determined as the target performance improvement parameter.
10. The method according to any one of claims 1 to 9, characterized in that, After performing the target action, the method further includes: When an execution request for a reference action is detected, the time difference between the trigger time of the execution request and the completion time of the target action is obtained; If the time difference is less than a time threshold, the reference action is prohibited from being performed; If the time difference is greater than or equal to the time difference threshold, predict the third performance improvement parameter of the virtual route after performing the reference action; If the third performance improvement parameter is less than the expected threshold, the reference action shall be prohibited. If the third performance enhancement parameter is greater than or equal to the expected threshold, the reference action is performed.
11. The method according to any one of claims 1 to 9, characterized in that, The process of acquiring queue data, CPU data, and traffic data of the virtual router, as well as acquiring component operation information of the virtual router, includes: Data generated by the virtual router within a preset time period is collected using sliding windows of different durations, wherein the duration of the preset time period is longer than the duration of any sliding window. The data is classified and normalized to obtain the queue data, the central processing unit data, the traffic data, and the component operation information.
12. The method according to any one of claims 1 to 9, characterized in that, The execution of the target action includes: A shadow view is created in the background memory of the virtual router, wherein the shadow view is used to store the target configuration information obtained by performing the target action; The configuration pointer of the target CPU associated with the target action is moved from the original view to the shadow view, wherein the target CPU after being moved to the shadow view performs the operation according to the target configuration information.
13. The method according to any one of claims 1 to 9, characterized in that, Before performing the target action, the method further includes: Generate a corresponding action identifier for the target action; During the execution of the target action, the method further includes: Create an action execution log corresponding to the action identifier; If expected abnormal information is detected in the action execution log, the configuration parameters of the virtual route will be reverted to the version before the target action was executed.
14. The method according to any one of claims 1 to 9, characterized in that, The execution of the target action includes: When the target action indicates that data of the target type should be migrated from the fifth central processing unit to the sixth central processing unit, the first data of the target type received by the fifth central processing unit should be cached in the cache queue. After migrating the second data of the target type received in the fifth central processing unit to the sixth central processing unit, the first data is migrated from the cache queue to the sixth central processing unit, wherein the sixth central processing unit has a higher processing priority for the first data than for the second data.
15. A configuration control device for a virtual router, characterized in that, include: The acquisition unit is used to acquire queue data, central processing unit data, and traffic data of the virtual router, as well as to acquire component operation information of the virtual router; An extraction unit is used to extract features from the queue data, the central processing unit data, and the traffic data to obtain queue feature tensors, central processing unit feature tensors, and traffic feature tensors associated with the virtual route, and to perform feature encoding on the component operation information to obtain component topology tensors associated with the virtual route, wherein the component topology tensors are used to indicate the component dependencies of the virtual route. A combination unit is used to combine the queue feature tensor, the central processing unit feature tensor, the traffic feature tensor and the component topology tensor to obtain the target state tensor associated with the virtual route, wherein the target state tensor is used to indicate the running state of the virtual route; The prediction unit is configured to: utilize the state-aware module in the action decision model to perform feature recognition on the queue feature tensor, the central processing unit feature tensor, the traffic feature tensor, and the component topology tensor to obtain a first feature vector; utilize the time-series prediction module in the action decision model to perform feature prediction on the first historical state tensor of the virtual router at multiple time steps before the target state tensor is input into the action decision model to obtain a second feature vector; perform feature fusion on the first feature vector and the second feature vector to obtain a set of configuration vectors; if the set of configuration vectors includes an expected configuration vector that meets the expected conditions, obtain the expected action corresponding to the expected configuration vector; determine each of the expected actions corresponding to the set of configuration vectors as a target action; and execute the target action, wherein the target action is used to correct the configuration parameters of the virtual router.
16. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of the method according to any one of claims 1 to 14.
17. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 14.
18. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 14.