Traffic management methods and electronic devices
By acquiring network traffic data for quantitative prediction and hardware mapping, traffic adjustment strategies are generated, solving the problems of flexibility and real-time performance in network performance optimization, realizing autonomous optimization of network devices, and improving resource utilization and transmission stability.
Patent Information
- Application Number
- CN202611530645.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-29
- Publication Date
- 2026-11-17
AI Technical Summary
Existing technologies suffer from poor flexibility, insufficient real-time performance, and resource waste in network performance optimization. They are unable to adapt to sudden and periodic fluctuations in network traffic, resulting in insufficient resources during busy periods and idle resources during off-peak periods, with low-latency flows being congested and blocked.
By acquiring network traffic data, performing numerical quantization and lightweight prediction, generating traffic adjustment strategies, and converting them into hardware-executable configuration signals, the hardware processing unit is driven to adjust parameters in real time, thereby achieving device-level autonomous optimization.
It improves network resource utilization, reduces transmission latency, enhances traffic transmission stability, and meets the needs of emerging applications for high-performance and low-latency networks.
Smart Images

Figure CN123123148A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of traffic management technology, and in particular to a traffic management method and electronic device. Background Technology
[0002] Currently, related technologies mainly rely on software-defined or static hardware configuration for network performance optimization. These solutions are difficult to adapt to the significant spatiotemporal characteristics of network traffic and have three main limitations: First, they lack flexibility and cannot cope with sudden or periodic fluctuations in traffic, easily leading to insufficient resources during busy periods and idle resources during off-peak periods. Second, they lack real-time performance, mostly operating on a reactive basis, requiring parameter adjustments to be triggered only after performance degradation is detected, making it difficult to proactively avoid congestion and latency issues. Third, they are inefficient in resource utilization, exhibiting both excessive resource consumption in low-bandwidth scenarios and wasted resources by leaving high-bandwidth channels idle, while failing to prioritize resource allocation for low-latency flows, making them susceptible to congestion and blocking. Summary of the Invention
[0003] This application provides a traffic management method and electronic device to at least solve the problems of poor flexibility, insufficient real-time performance, resource waste, and low-latency flow blocking in related technologies.
[0004] This application provides a traffic management method, including: Acquire network traffic data from network devices; the network traffic data is used to characterize the traffic transmission status of network devices. The network traffic data is numerically quantized to obtain quantized input data adapted to the lightweight model. The quantized input data is then input into the lightweight prediction model to predict the quantized output data. The quantized output data is then numerically dequantized to obtain the future traffic prediction results. Generate traffic adjustment strategies based on future traffic forecasts; Based on predefined policy hardware mapping relationships, traffic adjustment policies are converted into configuration signals, which are then used to adjust the traffic parameters of hardware processing units in network devices.
[0005] This application also provides an electronic device, including: a memory for storing a computer program; and a processor for executing the computer program to implement the steps of any of the above-described traffic management methods.
[0006] The traffic management method and electronic device provided in this application are driven by a lightweight model prediction, replacing the traditional mode of software definition or static hardware configuration in related technologies. By adapting the network devices with limited hardware resources through numerical quantization, it can achieve low latency, low error, and high accuracy in predicting future traffic while accurately matching the spatiotemporal characteristics of traffic and flexibly responding to sudden and periodic traffic fluctuations. The prediction results are transformed into targeted traffic adjustment strategies, and configuration signals are directly generated by hardware mapping of the strategies to drive the hardware processing unit to respond and adjust parameters in real time. This not only eliminates the dependence on external computing power and achieves device-level autonomous optimization, but also effectively improves network resource utilization, reduces transmission latency, and enhances traffic transmission stability, ultimately meeting the stringent requirements of various emerging applications for high performance and low latency. Attached Figure Description
[0007] To more clearly illustrate the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0008] Figure 1 A schematic flowchart illustrating the first traffic management method provided in this application embodiment; Figure 2 A flowchart illustrating the second traffic management method provided in this application embodiment; Figure 3 A flowchart illustrating the third traffic management method provided in this application embodiment; Figure 4 A flowchart illustrating the fourth traffic management method provided in this application embodiment; Figure 5 A schematic diagram of a specific traffic management system provided in an embodiment of this application; Figure 6 A schematic diagram illustrating the key technical steps of a traffic management system provided in an embodiment of this application; Figure 7 A schematic diagram illustrating a specific traffic management method provided in an embodiment of this application; Figure 8 A schematic diagram of a specific network device capable of implementing a traffic management method, provided as an embodiment of this application; Figure 9 This is a schematic diagram of the structure of a flow management device provided in an embodiment of this application. Detailed Implementation
[0009] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of this application.
[0010] It should be noted that, in the description of this application, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. The terms "first," "second," etc., in this application are used to distinguish similar objects and are not used to describe a specific order or sequence.
[0011] With the explosive development of emerging technologies such as cloud computing, artificial intelligence, and the industrial internet, network infrastructure is facing a triple challenge: a surge in computing power density, increasingly complex traffic types, and stringent real-time requirements. On the one hand, global internet traffic is increasing exponentially, driven by the widespread adoption of smart devices, the development of mobile internet, and the prevalence of rich media content, which is expected to continue. On the other hand, network traffic is significantly affected by multiple factors, including user behavior, network topology, and application types, exhibiting pronounced spatiotemporal characteristics. Dramatic traffic fluctuations during peak hours can easily lead to network congestion and increased latency.
[0012] While network devices in related technologies can improve basic forwarding performance through hardware offloading (such as the RoCEv2 protocol achieving microsecond-level latency), the network performance optimization solutions of related technologies still mainly rely on software-defined or static hardware configurations. They are difficult to match the obvious spatiotemporal characteristics of traffic and have core limitations such as lack of flexibility, insufficient real-time performance, resource waste (such as large bandwidth channels being idle), and low-latency streams being blocked by congestion.
[0013] Specifically, the core limitations of the relevant technology are as follows: 1) The rigidity of static resource allocation mechanisms: Insufficient flexibility: Network devices using related technologies rely on pre-configured static resource allocation schemes, which cannot cope with sudden and periodic fluctuations in traffic (such as a surge in video streams during peak hours or dense transmission of small data packets during office hours). This results in situations where fixed buffers overflow or are not fully utilized, leading to a lack of flexibility with "insufficient resources during busy times and wasted resources during idle times".
[0014] Resource waste: When faced with small data packet traffic with low bandwidth requirements, resources (such as CPU interrupts and bandwidth) are over-occupied or large bandwidth channels are idle, resulting in resource waste.
[0015] Low-latency streams are congested: When faced with low-latency demand traffic, resources cannot be allocated preferentially, resulting in increased transmission latency.
[0016] 2) Network performance tuning lag issue: Network performance optimization of related technologies is an "ex-post adjustment" mode. Only after a decline in network performance (such as packet loss or excessive latency) is detected can parameter adjustments (such as increasing the buffer or switching the scheduling algorithm) be triggered. This passive adjustment method cannot detect traffic change trends in advance, resulting in delayed optimization and making it difficult to avoid performance fluctuations (such as game lag or video buffering).
[0017] To address the rigidity of static resource allocation mechanisms and the lag in network performance adjustments in related technologies, this application proposes a method that accurately predicts traffic patterns. This allows network devices to anticipate or sense changes in network traffic trends in advance, enabling them to dynamically and flexibly adjust their operating modes and resource allocation strategies. This optimizes network performance, effectively improving network stability, reliability, and efficiency, and meeting the stringent requirements of various emerging applications.
[0018] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0019] Figure 1 This is a flowchart illustrating the first traffic management method provided in the embodiments of this application.
[0020] like Figure 1 As shown, the method includes the following steps: Step 101: Obtain network traffic data from network devices.
[0021] In some embodiments, this application can obtain the network traffic data of a network device through the network device's traffic monitoring module.
[0022] This application first collects raw traffic data from network devices according to preset collection rules; then, it performs data preprocessing on the raw traffic data to obtain network traffic data. Data preprocessing includes at least one of data completion processing, data standardization processing, and data structuring processing. This application avoids invalid data affecting model accuracy and strategy effectiveness by first collecting raw data and then refining it through preprocessing.
[0023] In some embodiments, a network device refers to a hardware device that has network data transmission and forwarding functions, such as a smart network card, a router, or a switch.
[0024] In this application, network traffic data is structured data (after preprocessing) reflecting the network transmission status, and is a set of features strongly correlated with network performance (such as data packets per second, packet loss rate trends, etc.). Network performance is a core capability indicator of network devices for transmitting data, including transmission latency, throughput, packet loss rate, resource utilization, etc.
[0025] Network traffic data can specifically include data packets per second, bits per second, average data packet length, queue length, packet loss rate, transmission latency, bandwidth utilization, number of TCP (Transmission Control Protocol) connections, QoS (Quality of Service) priority, port identifier, etc.
[0026] Raw traffic data is unprocessed data collected directly from network devices and may contain outliers, missing values, and redundant information (such as invalid data packet records and duplicate statistics).
[0027] Pre-defined collection rules are predefined collection specifications, including collection frequency (e.g., 1ms / time), collection dimensions (e.g., data packet size, port number), and collection time period (e.g., distinguished by weekdays / holidays), to ensure data timeliness and integrity.
[0028] Data preprocessing is a purification process for raw traffic data. Its core purpose is to improve data quality and adapt it to the model's input requirements. Data completion processing: filling in missing values in the original data (e.g., using linear interpolation to complete missing data packets per second); Data standardization: Scaling the data to a uniform range (e.g., [0,1]) to eliminate dimensional differences (e.g., avoiding the impact of differences in the numerical range of bit count and data packet count on model training). Data structuring: Transform unstructured / semi-structured raw data (such as messy log records) into a format that the model can recognize (such as tabular feature matrices, time series samples).
[0029] In one optional embodiment of this application, taking a smart network interface card (NIC) as an example, the data acquisition and preprocessing process is as follows: First, raw traffic data is collected through the traffic monitoring module of the smart network interface card (NIC). Collection rules are formulated based on time differences (day / night, weekday / rest day / holiday), further subdividing the data into multiple time periods such as 9:00-12:00 and 12:00-14:00 on weekdays, collecting multi-dimensional traffic characteristics at a microsecond frequency of 1ms / time. After collection, core features strongly correlated with network performance are selected, such as the variance of packet size within the last 10ms (used to determine traffic bursts), QoS priority and port number combinations (used to identify application types), and packet loss rate trends (used to predict congestion risks). Redundant data is removed to ensure the timeliness and effectiveness of the features.
[0030] The raw traffic data is then preprocessed and cleaned to generate network traffic data that is compatible with the model input. Specific operations include: 1) Anomaly Handling: Invalid data caused by hardware errors (e.g., PPS of 0) is removed, and data purity is improved through noise reduction. For missing data, linear interpolation is used for completion. This method estimates the value at the missing location based on the linear relationship between two valid data points before and after the missing data. It is characterized by simple calculation, intuitive results, and preservation of the overall data trend. The linear interpolation formula is as follows: = , Let time point a correspond to the missing value, and let b be the number of packets per second (PPS) at time point a. The previous valid data point before time point a is ( , The next valid data point is ( , ); 2) Normalization: The original flow data is scaled to the [0,1] interval, and the influence of dimensions is eliminated by a normalization formula, transforming it into dimensionless pure data. This facilitates data comparison and improves model training performance. The normalization formula is as follows: = , in Represents any value in the original traffic data set. This represents the minimum value in the original traffic data set. This represents the maximum value in the original traffic data set, and N represents the normalized set, taking the value as a decimal in the range [0,1]. The normalization method scales the original traffic data proportionally to facilitate better comparison or improve model training performance. 3) Structured Processing: A sliding window technique is used to generate time series samples, with a fixed window size of 5-10ms and a sliding step size of 1ms, to slide and cut the continuous time series data. If the data sampling frequency is 1000Hz (1000 PPS data points are collected per second), then a 5ms window contains 5 PPS data points (time step length = 5), a 10ms window contains 10 PPS data points (time step length = 10), and adjacent windows overlap by 4 or 9 data points, which can maximize the utilization of the original data and finally form a structured sample set to adapt to the input of lightweight prediction models (such as LSTM models).
[0031] Step 102: Numerical quantization is performed on the network traffic data to obtain quantized input data adapted to the lightweight model. The quantized input data is then input into the lightweight prediction model to predict the quantized output data. Numerical inverse quantization is then performed on the quantized output data to obtain the future traffic prediction results.
[0032] In some embodiments, given that this application applies to network devices with limited hardware resources, such as smart network interface cards (NICs), where hardware computing power and storage capacity are significantly constrained, this application employs a lightweight prediction model to adapt to the deployment conditions of the device. That is, this application can utilize a trained lightweight model to analyze preprocessed network traffic data, predict future network traffic trends (such as traffic intensity, type, and congestion risk), and provide a basis for subsequently generating pre-optimized strategies.
[0033] In response to the operational characteristics of the lightweight prediction model, this application further performs quantization and dequantization processing on the input and output data respectively: the input data is quantized into a format suitable for integer operations of the model, and after the model outputs, the prediction results with actual physical meaning are restored by dequantization, thereby balancing the low resource consumption of the model on the device and the prediction accuracy.
[0034] In this application, quantization refers to the process of mapping high-precision floating-point data to low-precision fixed-point data (such as INT8); dequantization refers to the process of mapping fixed-point data back to floating-point data, which is the inverse process of quantization.
[0035] This application quantizes the input data into an input suitable for a lightweight model, and at the output end, it dequantizes to restore the prediction results with actual physical meaning. This achieves low latency and low resource consumption operation of the model on the device, while ensuring the accuracy and efficiency of traffic prediction, thus forming a precise fit with the lightweight model architecture of this application.
[0036] Lightweight prediction models are prediction models optimized for network device hardware resources (such as embedded processors). They typically compress parameter scale (e.g., below one million) through techniques such as model quantization and layer pruning to ensure low inference latency (e.g., ≤1ms). Common types include temporal prediction models such as Long Short-Term Memory Networks (LSTM) and Temporal Convolutional Networks (TCN).
[0037] The future traffic prediction result is the traffic trend for a specific future time period (e.g., 5-10ms) output by the model. Specifically, it includes packet transmission data (which can be used to deduce future traffic intensity and traffic type) and queue length (which can be used to determine future queue status and congestion risk), providing the core basis for generating accurate traffic adjustment strategies.
[0038] Step 103: Generate a traffic adjustment strategy based on the future traffic forecast results.
[0039] In some embodiments, this application can determine traffic status information, such as traffic intensity, traffic type, and queue status, based on future traffic prediction results from a lightweight prediction model. According to the determined traffic status information, corresponding optimization rules are matched to generate targeted adjustment strategies, ensuring that resource allocation, algorithm configuration, etc., are accurately adapted to future traffic demands.
[0040] Traffic intensity: such as the average / peak values of packets per second (PPS) and bits per second (BPS); Flow types: such as steady flow (small fluctuations), burst flow (peak value significantly higher than the mean), and short-duration flow (short duration). Queue status: such as whether the future queue length will exceed the threshold, and whether there is a risk of congestion / packet loss.
[0041] Traffic scaling strategies are a set of specific operational rules designed to optimize network performance, and they mainly include three categories: Bandwidth allocation strategies include reserving more than 60% of port bandwidth for high-priority traffic and expanding the cache pool size. Congestion control algorithm switching strategy: such as switching to BBR algorithm when traffic surges and switching to Reno algorithm when traffic is stable; Queue scheduling strategy: such as switching to the deficit circular scheduling (DRR) algorithm when there is concurrent mixed streaming to avoid low-priority streams waiting indefinitely.
[0042] Step 104: Based on the predefined policy hardware mapping relationship, the traffic adjustment policy is converted into a configuration signal, so as to adjust the traffic parameters of the hardware processing unit in the network device according to the configuration signal.
[0043] In some embodiments, this application can convert software-level adjustment strategies into hardware-recognizable electrical signals (configuration signals) through preset policy-hardware mapping rules, and send them to the hardware processing unit so that the hardware processing unit can adjust its flow parameters based on the configuration signals. At the same time, this application can also ensure the execution effect through verification and feedback mechanisms, and finally achieve low-latency optimization of software decision-making and hardware implementation, ensuring that the optimization strategy takes effect quickly and accurately.
[0044] The predefined policy hardware mapping relationship is the correspondence between the pre-set traffic adjustment policy and the hardware configuration signal and hardware parameter. For example, the "reserve 60% bandwidth" policy corresponds to the "bandwidth allocation register control word (value is 60% of the total port bandwidth)", which ensures that the policy can be directly converted into hardware executable instructions.
[0045] Configuration signals are electrical signals / digital instructions that can be recognized by the hardware processing unit. They are the hardware representation of a strategy (such as register control words and algorithm selection bits) and are used to instruct the hardware to adjust specific parameters.
[0046] Hardware processing units are hardware acceleration modules in network devices that are responsible for traffic forwarding and parameter adjustment, such as FPGA (Field Programmable Gate Array) and ASIC (Application-Specific Integrated Circuit), and have low-latency execution characteristics (such as ≤500ns execution latency).
[0047] Traffic parameters are configuration items related to traffic transmission that can be adjusted by the hardware processing unit, and include at least: Resource allocation parameters: bandwidth allocation ratio, hardware cache pool size; Algorithm configuration parameters: congestion control algorithm selection bit, queue scheduling mechanism identifier; Timing control parameters: interrupt aggregation threshold, queue priority register value.
[0048] In some embodiments, after sending the configuration signal to the hardware processing unit, this application can determine the lighting display mode of the hardware processing unit and, based on the lighting display mode, determine whether the hardware processing unit has successfully received the configuration signal; if the hardware processing unit has not successfully received the configuration signal, a configuration signal is sent to the hardware processing unit so that the hardware processing unit adjusts the flow parameters based on the configuration signal, otherwise no processing is performed.
[0049] Among them, the light display mode is the status feedback mechanism of the hardware processing unit. The signal reception status is configured by different light flashing frequencies / colors (e.g., green light flashing at 2Hz = successful reception, red light flashing at 4Hz = failed reception, and dark light = no reception).
[0050] Furthermore, after determining that the hardware processing unit adjusts traffic parameters based on configuration signals, the network performance indicators of the network device are obtained according to a preset period; based on the network performance indicators and preset optimization targets, an optimization effect evaluation report is generated, so as to adjust the traffic adjustment strategy and / or the model parameters of the lightweight prediction model according to the optimization effect evaluation report.
[0051] Among them, network performance metrics are the core indicators used to evaluate the optimization effect after the strategy is implemented, such as actual packet loss rate, transmission delay, bandwidth utilization, queue length, etc.
[0052] The preset optimization target is a pre-defined performance standard, such as packet loss rate <0.1%, transmission delay <50ms, and PPS / BPS deviation rate <10%.
[0053] The optimization effect evaluation report is an evaluation document generated based on actual performance indicators and preset optimization goals. It is used to determine whether the optimization has met the standards. If it has not met the standards, it will trigger strategy fine-tuning (such as adjusting the bandwidth reservation ratio) or model iteration (such as updating the parameters of the lightweight prediction model).
[0054] In one optional embodiment of this application, taking a smart network interface card (NIC) as an example, the optimization strategy execution, effect evaluation, and offline iteration process are as follows: After the optimization strategy is generated, it is directly converted into configuration signals recognizable by the FPGA / ASIC chip (hardware processing unit) through the built-in strategy hardware mapping module of the smart network interface card. These signals include PROG (programming reset signal), INIT (initialization complete signal), DONE (configuration complete signal), and CLK (clock signal) for operations such as adjusting the queue priority register and modifying the congestion algorithm control word. This hardware-level execution latency is ≤500ns, far superior to the software-level optimization speed of ≥10ms, ensuring that the strategy takes effect in real time.
[0055] After the configuration signal is sent to the hardware processing unit, the receiving status of the FPGA / ASIC chip is confirmed through a heartbeat light detection mechanism: Successful reception: The heartbeat light flashes green at a rate of 2Hz; Failed reception: The heartbeat light flashes red at a rate of 4Hz; No reception: The heartbeat light remains dark.
[0056] After the optimization strategy is executed, the real-time performance metrics of the target queue are collected at a frequency of 1ms / time through the hardware counting module inside the smart network card FPGA / ASIC chip. The core effectiveness metrics include: the deviation rate of the actual PPS (packets per second) and BPS (bits per second) from the predicted value, whether the queue length is controlled within the preset threshold, and whether the packet loss rate has decreased.
[0057] The collected metrics are compared with the preset optimization targets (PPS / BPS deviation rate <10%, packet loss rate <0.1%), an optimization effect evaluation report is generated, and iterative adjustments to the strategy and model are carried out based on the report. 1) Target met (deviation rate <10%): Maintain the current strategy and start the next round of prediction and optimization according to the original 5ms cycle; 2) If the target is not met (e.g., packet loss rate > 0.1%): Analyze the reasons for the deviation (e.g., prediction model error, insufficient hardware resources) and trigger two-way adjustments: At the model level: Incorporate current traffic samples into the training set, and update the prediction model parameters through incremental learning to improve subsequent prediction accuracy; At the strategy level: fine-tune and optimize parameters (such as further increasing the target queue weight and expanding the hardware cache allocation ratio), and reissue the execution.
[0058] The analysis of the causes of deviations can be carried out in the following way: 1) Quantitative deviation: Calculate the difference between the actual packet loss rate and the target of 0.1%, and locate high deviation scenarios by time, port / queue, and traffic type; 2) Five-dimensional investigation: Investigate one by one from data quality, model prediction (quantization / pruning accuracy loss, trend misjudgment), strategy mapping (unreasonable parameters / priority mismatch), hardware execution (configuration not taking effect / insufficient cache), and environmental interference (link failure / external sudden events); 3) Verification and confirmation: Finally, tests are conducted using the controlled variable method (such as turning off prediction and replaying real traffic), register verification, and model backtesting to pinpoint the root cause.
[0059] In addition, to continuously improve adaptability, this application can also carry out offline data management and iterative optimization operations: 1) Daily data storage: Classified by weekdays / rest days / holidays, real-time collected traffic characteristics, prediction results, and optimization effects are stored in the database (InfluxDB offline database on the server) to build a complete historical dataset; 2) Weekly Model Updates: Offline training is conducted using historical traffic datasets to optimize the lightweight prediction model (e.g., adjusting the number of nodes in the LSTM hidden layer and optimizing the Transformer attention mechanism). The traffic dataset is divided into training and testing sets in a 7:3 ratio, and model performance is verified through cross-validation. The goal is to achieve a traffic type prediction accuracy of ≥95% and a traffic intensity change prediction error of ≤10%. 3) Construction of scenario strategy library: Based on historical optimization effect evaluation reports, the optimal strategies under different scenarios such as financial transaction flow, AI training flow, and IoT sensing flow are statistically analyzed, and a scenario strategy mapping library is constructed. 4) Rapid adaptation to new scenarios: When network devices (such as smart network cards) access new scenarios such as VR video streams for the first time, scenario recognition is completed through traffic feature matching, and adaptation strategies are directly called from the scenario policy mapping library, reducing the initialization optimization time from 50ms to less than 10ms.
[0060] In summary, this application achieves autonomous intelligent traffic management for network devices through a closed-loop process encompassing data acquisition and preprocessing, quantitative prediction, strategy generation, hardware implementation, and effect iteration. First, multi-dimensional raw traffic data is collected from network devices. This data is then preprocessed with supplementation, standardization, and structure to extract effective information. Next, a lightweight prediction model is adapted using numerical quantization, achieving low-latency, low-error future traffic prediction on devices with limited hardware resources. Subsequently, based on the predicted traffic intensity, type, and queue status, targeted strategies such as bandwidth allocation, congestion algorithm switching, and queue scheduling are generated. These strategies are then converted into configuration signals that drive hardware units such as FPGAs / ASICs to adjust parameters in real time (execution latency ≤ 500ns). Light feedback confirms the reception status, and performance indicators evaluate the optimization effect. Incremental learning and offline iteration continuously improve model accuracy and scenario adaptability, ultimately eliminating reliance on external computing power and achieving device-level autonomous optimization. This significantly improves network resource utilization, reduces transmission latency, and enhances traffic transmission stability, meeting the stringent requirements of emerging applications for high performance and low latency.
[0061] Figure 2 A flowchart of the second traffic management method proposed in this application is further shown. Based on Figure 1 The illustrated embodiment further explains the steps preceding step 102. Figure 2 This may include the following steps.
[0062] Step 201: Input historical traffic sample data into the initial prediction model, train the initial prediction model, and obtain the trained initial prediction model.
[0063] In this embodiment, historical traffic sample data can be derived from raw traffic data historically collected by network devices. Specifically, the acquisition of historical network traffic data includes: the network device collecting raw traffic data according to preset collection rules; performing at least one of data completion processing, data standardization processing, and data structuring processing on the raw traffic data to obtain network traffic data; classifying and storing the network traffic data according to weekdays, rest days, and / or holidays in a database to construct a historical dataset; and extracting historical traffic sample data from the historical dataset, which is used for quantitative calibration and / or offline training of the initial prediction model.
[0064] Step 202: Obtain the first initial model weight and the second initial model weight from at least one initial model weight in the first layer of the trained initial prediction model, where the first layer is any layer of the initial prediction model.
[0065] Step 203: Determine the weight scaling factor based on the first initial model weights and the second initial model weights.
[0066] In one alternative embodiment, at least one initial model weight of the first layer in the trained initial prediction model is obtained, the maximum value among the at least one initial model weight is determined as the first initial model weight, and the minimum value among the at least one initial model weight is determined as the second initial model weight, wherein the first layer is any layer of the initial prediction model.
[0067] Next, based on the difference between the first initial model weights and the second initial model weights, a weight scaling factor is determined. For example, the difference is divided by the difference between the maximum and minimum values of the INT8 quantization range (127-(-128)=255) to obtain the weight scaling factor. The first initial model weights and the second initial model weights represent the upper and lower limits of quantization for that layer, respectively, and the weight scaling factor represents the FP32 value corresponding to one INT8 unit. Subsequently, at least one initial model weight is quantized based on the weight scaling factor. For example, floating-point weights are mapped to integer weights according to the method of INT8 value = round(FP32 weights / weight scaling factor) to obtain at least one quantized model weight after quantization.
[0068] Step 204: Quantize at least one initial model weight based on the weight scaling factor to obtain at least one quantized model weight.
[0069] In some embodiments, considering the limited hardware resources of network devices, overly complex models cannot be used. Therefore, this application requires the deployment of a lightweight prediction model in the network device. Before deploying the lightweight prediction model, this application needs to compress the model parameters of the initial prediction model to obtain a lightweight prediction model and ensure that the inference latency in the network device is less than 1ms.
[0070] This application can compress the model parameters of the initial prediction model through quantization model and layer pruning techniques, so as to compress the initial prediction model into a lightweight prediction model with low latency, low storage and low computing power consumption, which can be easily applied in network devices with limited resources.
[0071] Specifically, the quantization model can be the INT8 model. The core compression object of the INT8 quantization model is the LSTM gating weight parameters in the LSTM model (referring to the switching strength of the input gate, forget gate, and output gate, as well as the update amplitude of the cell state, accounting for more than 90% of the model storage), and the secondary compression object is the activation value of the core weight parameters (referring to the specific value output after the weighted sum of the core weight parameters + activation function, which can be understood as the output result of the original FP32 data after gating weight processing).
[0072] The quantization principle of the INT8 model is as follows: the original FP32 (32-bit floating-point) precision weight parameters and activation values are mapped to INT8 (8-bit signed integers, with a value range of [-128, 127]). Key numerical features are preserved through the weight scaling factor (Scale) and zero offset (Zero Point), achieving 4 times storage compression (from 32 bits to 8 bits) while reducing the amount of hardware computation (integer operations are 5-10 times faster than floating-point operations).
[0073] The specific quantification formula is as follows: Quantization: int8_val = round(fp32_val / scale); Dequantization: fp32_val = int8_val × scale.
[0074] Where scale = (FP32 maximum value - FP32 minimum value) / (INT8 maximum value - INT8 minimum value), is obtained from the calibration dataset (e.g., 10,000 historical traffic features). The FP32 maximum value is the first initial model weight mentioned in this application, the FP32 minimum value is the second initial model weight, the INT8 maximum value is the maximum value of the quantization range, and the INT8 minimum value is the minimum value of the quantization range.
[0075] Specifically, this application can use 10,000 traffic feature samples (i.e., traffic sample data, with 10-dimensional standardized features as input) as a calibration set to statistically analyze the FP32 value range of the LSTM layer 1 weights: assuming the maximum weight = 2.31 and the minimum weight = -2.28; Based on the maximum and minimum weight values, calculate the scaling factor: scale = (2.31 - (-2.28)) / (127 - (-128)) = 4.59 / 255 ≈ 0.018; Then, a weight scaling factor is used to quantize at least one initial model weight, achieving an FP32 to INT8 mapping, resulting in at least one quantized model weight: each initial model weight value is quantized, for example: The FP32 weight value = 1.53 is quantized to INT8_val = round (1.53 / 0.018) ≈ 85; FP32 weight value = -0.9 quantized to INT8_val = round (-0.9 / 0.018) = -50; The FP32 weight value = 0.003 (close to 0, with little impact on prediction) is quantized as INT8_val = round (0.003 / 0.018) ≈ 0; After quantization, the 18432 weight parameters of LSTM layer 1 changed from "4 bytes / each" to "1 byte / each", and the storage size decreased from 73.7KB to 18.4KB (4x compression).
[0076] Step 204: Based on the preset layer pruning rules, determine at least one target model weight among at least one quantized model weight, so as to obtain a lightweight prediction model according to at least one target model weight.
[0077] In this embodiment of the application, a first absolute value of a first quantization model weight is determined among at least one quantization model weight, wherein the first quantization model weight is any quantization model weight among at least one quantization model weight; if the first absolute value is less than or equal to a preset pruning threshold, the first quantization model weight is removed from at least one quantization model weight to obtain at least one target model weight.
[0078] After obtaining the quantized model weights, this application can reduce the number of model parameters and computational load by "removing parameters / layers in the model that have minimal impact on the prediction results," while ensuring that the loss in prediction accuracy is controlled within an acceptable range (e.g., <5%). In the traffic prediction model, pruning mainly targets "redundant connections" of weight parameters (e.g., connections with absolute weight values close to 0) and redundant network layers (e.g., LSTM layers that contribute little to feature extraction).
[0079] Pruning guidelines: 1) Weight-level pruning: Remove connections whose absolute weight is less than a threshold θ (e.g., θ=0.005); 2) Hierarchical pruning: Calculate the "feature importance score" of each layer (e.g., through Dropout sensitivity analysis) and remove layers with scores below the threshold.
[0080] Specifically, the weighted pruning process is as follows: 1) Weight importance assessment: This application can calculate the absolute value of all INT8 weights (at least one quantized model weight) of LSTM layer 1 (since they have been quantized, the calculation is directly based on the INT8 value). Statistical distribution: It is assumed that 90% of the absolute values of the weights are concentrated in [0, 30] (corresponding to [0, 0.54] in FP32), and 10% of the absolute values of the weights are concentrated in [31, 85] (corresponding to [0.558, 1.53] in FP32). 2) Set the pruning threshold: Based on the validation set test, determine the pruning threshold θ to be INT8=10 (corresponding to 0.18 in FP32), and remove all weighted connections with an absolute value ≤10; 3) Pruning execution: LSTM layer 1: Among the more than 10,000 weights, 4,000 quantized model weights have an absolute value ≤ 10 (accounting for 40%). These connections are directly removed, leaving more than 6,000 effective weights. These more than 6,000 effective weights are determined as the target model weights.
[0081] 4) Sparse matrix storage: Since the weights of the pruned target model are “sparse” (e.g., 40% sparsity of LSTM layer 1), this application can use a “coordinate list (COO)” to store only the position and value of the target model weights, further reducing storage costs.
[0082] For hierarchical pruning, this application can also implement it based on a sensitivity analysis strategy: For the first layer of the initial prediction model, the feature importance score of the layer is calculated using methods such as Dropout sensitivity analysis. Specifically, the contribution of the layer to the traffic prediction result can be quantified by comparing the difference in prediction accuracy when the layer is retained versus when it is temporarily removed; if the feature importance score of the layer is less than or equal to a preset layer pruning threshold, it is determined to be a redundant layer with minimal impact on model performance, and the layer is directly removed from the initial prediction model, further simplifying the model structure and reducing inference computational power consumption.
[0083] In summary, this application uses a combination of INT8 quantization and layer pruning techniques to compress parameters of the initial prediction model (such as the LSTM traffic prediction model), achieving the construction of a lightweight prediction model that is adapted to the limited hardware resources of network devices. This lightweight prediction model has the characteristics of low latency (inference latency <1ms), low storage, and low computing power consumption, and can be directly deployed on resource-constrained network devices such as smart NICs. While ensuring that the prediction accuracy loss is <5%, it provides efficient model support for subsequent traffic prediction and dynamic optimization.
[0084] Figure 3 A flowchart of the third traffic management method proposed in this application is further shown. Based on Figure 1 The illustrated embodiment further explains step 102. Figure 3 This may include the following steps.
[0085] Step 301: Standardize the network traffic data and map it to a preset range to obtain standard input data.
[0086] Step 302: Using the first and second standard input data of the standard input data, determine the input scaling factor, and use the input scaling factor to quantize the standard input data to obtain quantized input data.
[0087] Step 303: Input the quantized input data into the lightweight prediction model to predict the quantized output data.
[0088] Step 304: Using the first and second quantized output data of the quantized output data, determine the output scaling factor, and perform numerical inverse quantization on the quantized output data based on the output scaling factor to obtain the future traffic prediction result.
[0089] In some embodiments, this application can deploy a lightweight prediction model with INT8 quantization and layer pruning in the embedded processor of a network device, input the collected network traffic data, achieve an inference latency of ≤1ms, and output future traffic prediction results that can determine the traffic type (such as financial transaction flow, AI training flow) and intensity change trend.
[0090] Specifically, this application achieves efficient and accurate future traffic prediction through a four-step data processing flow: standardization, quantization, model inference, and dequantization. First, network traffic data is standardized and mapped to a preset interval to eliminate dimensional differences and obtain standard input data. Then, based on the maximum value (first standard input data) and minimum value (second standard input data) of this standard input data, an input scaling factor is determined. This factor is used to quantize the standard input data into integer format quantized input data suitable for the lightweight prediction model. This preserves key traffic characteristics while reducing model computational complexity and storage overhead through integer operations (storage volume compressed by 4 times, computation speed reduced by 10%). The system improves accuracy by 5-10 times, making it compatible with devices with limited hardware resources, such as smart network cards. The quantized input data is then fed into a lightweight prediction model, and quantized output data is obtained through low-latency inference (≤1ms). Finally, an output scaling factor is determined based on the maximum value (first quantized output data) and minimum value (second quantized output data) of the quantized output data. This factor is used to dequantize the quantized output data and restore it to a future traffic prediction result with actual physical meaning (such as PPS / BPS, traffic type), effectively offsetting errors in the quantization process and ensuring prediction accuracy (error ≤10%). This provides a reliable basis for subsequent optimization strategies such as bandwidth allocation and congestion control.
[0091] In some embodiments, this application uses a lightweight LSTM model after INT8 quantization and layer pruning to predict future PPS (packets per second) as an example.
[0092] First, convert the network traffic data into INT8 input (i.e., standard input data) that the model can recognize: The network device's hardware counter acquires network traffic data in 10 dimensions at 1ms intervals (corresponding to a 10ms window), as shown in Table 1.
[0093] Table 1
[0094] After obtaining the network traffic data, the data is first standardized to map it to the [0,1] interval of FP32 (based on the maximum / minimum value of the feature calibrated offline), thus obtaining standard input data. For example, if the maximum value of the PPS feature is 20000 and the minimum value is 0, then the standardized value of PPS at time t is 9200 / 20000 = 0.46; Subsequently, using the input scaling factor (also known as the weight scaling factor) obtained offline, the standardized FP32 format standard input data is quantized into INT8 format quantized input data. The quantization calculation formula is: INT8 input value = round(standardized value / scale). This input scaling factor can be calculated based on the extreme values of the standard input data, i.e., the maximum value (first standard input data) and the minimum value (second standard input data) in the standard input data.
[0095] Example: The Scale of the PPS feature is 0.0078125 (corresponding to the INT8 range [0,127]. Since the flow feature has no negative values, asymmetric quantization is used). Then the INT8 value of PPS at time t is round(0.46 / 0.0078125) = round(58.88) = 59 (INT8).
[0096] The final output is a 10×10 INT8 input matrix (10 time steps × 10-dimensional features). Example row (time t): [59, 32, 18, ..., 27] (all INT8 values).
[0097] Next, the quantized input data is fed into the lightweight model, and the quantized output data is obtained through INT8 integer operations using an LSTM + fully connected layer, as follows: The LSTM layer INT8 forward computation (gating logic + hidden state update), the input gate i_t at time t is calculated as follows: 1) Input x_t (INT8): [59, 32, 18, ..., 27] (10-dimensional); 2) After pruning, W_ii (INT8) retains only 60% of the effective weights (10×64→10×38). For example, the effective weights of the first row are [8, 0, 12, ..., 0] (0 represents the links removed after pruning). 3) Calculate W_ii x_t (INT8): 59×8 + 32×0 + 18×12 + ... +27×0 = 472 + 0 +216 + ... +0 = 688 (INT8, truncated to 127 when overflowing); 4) Add W_hi h_{t-1} (the output of the hidden layer at the previous time step, INT8) and b_i (bias, INT8=5), the final INT8 value of i_t = 688+120+5=813 → truncated to 127 (the maximum value of INT8), and after sigmoid approximation, the output i_t=120 (INT8).
[0098] The fully connected layer maps the output of the 64-dimensional hidden layer to a 1-dimensional PPS prediction (INT8), which is the quantized output data.
[0099] After obtaining the INT8 prediction value (i.e., the quantized output data), this application needs to dequantize it into the actual PPS (i.e., the future traffic prediction result), as follows: The PPS output scaling factor (Scale_out=157.48, Zero_point=0) from offline calibration is used. If y_int8=127, then PPS_fp32=127×157.48≈19999 (close to the maximum PPS value of 20000); if y_int8=60, then PPS_fp32=60×157.48≈9449. Based on the systematic error introduced by pruning / quantization, the correction value from offline calibration (e.g., +50) is added, finally yielding the predicted PPS value for the next 5ms: 9449+50=9499 PPS. The output scaling factor can be calculated based on the extreme values of the quantized output data, i.e., the maximum value (first quantized output data) and the minimum value (second quantized output data) in the quantized output data.
[0100] Furthermore, after obtaining the future traffic prediction results, this application can perform result verification, the verification process of which is as follows: 1) Accuracy verification: The deviation between the predicted value and the most recent 3 predictions is compared with the network device firmware (if the deviation is >10%, a second verification of the backup model (ARIMA) is triggered). 2) Strategy Mapping: Match the predicted PPS value with a preset threshold and output optimization instructions: If the predicted PPS is 9499 (close to the threshold of 10000): trigger network device cache expansion (request 10% space from the shared cache pool); If the predicted PPS is 15000 (exceeding the threshold): additionally trigger the interruption of aggregation adjustment (rx_usecs is reduced from 100μs to 50μs).
[0101] In summary, this application first standardizes multi-dimensional network traffic data to eliminate dimensional differences and obtain standard input data; then, it quantizes the data into INT8 format quantized input data using an input scaling factor to meet the integer operation requirements of the hardware layer; subsequently, the quantized input data is input into a lightweight prediction model optimized by INT8 quantization and layer pruning, and the embedded processor or FPGA of the network device performs fast inference within ≤1ms, outputting quantized output data; finally, based on the output scaling factor, inverse quantization and error correction are performed to obtain future traffic prediction results (such as PPS values) with actual physical meaning.
[0102] Figure 4 A flowchart of the fourth traffic management method proposed in this application is further shown. Based on Figure 1 The illustrated embodiment further explains step 103. Figure 4 This may include the following steps.
[0103] Step 401: Determine the future traffic intensity and future traffic type based on the data to be transmitted in the future data packets.
[0104] In some embodiments, this application defines two core pieces of information based on future data packet transmission data: first, the future traffic intensity, i.e. the average and peak values of future PPS (data packets per second) or BPS (bits per second); and second, the future traffic type, which is divided into three categories according to characteristics: steady flow (PPS fluctuation < 5%), burst flow (PPS peak > twice the average), and short-duration flow (duration < 3ms).
[0105] Step 402: Determine the future queue state based on the future queue length.
[0106] In some embodiments, this application may also combine future queue length data to determine the queue operation risk (i.e., determine the future queue state), focusing on two key points: whether the future queue length exceeds a preset threshold (such as 80% of the queue capacity) and whether there is a risk of packet loss due to queue overflow.
[0107] Step 403: Generate a traffic adjustment strategy based on future traffic intensity, future traffic type, and future queue status.
[0108] In this embodiment, a network device identifier associated with the future traffic prediction result is determined; a traffic adjustment priority is determined based on the future traffic type; structured traffic prediction data corresponding to the future traffic prediction result is constructed based on the network device identifier, traffic adjustment priority, future traffic intensity, and future queue status; and a traffic adjustment strategy is generated based on the structured traffic prediction data and preset adjustment rules. The traffic adjustment strategy includes at least one of a bandwidth allocation strategy, a congestion control algorithm switching strategy, and a queue scheduling strategy.
[0109] This application can integrate future traffic intensity, traffic type, and queue status to generate at least one strategy including bandwidth allocation, congestion control algorithm switching, and queue scheduling according to the following logic: First, associate the future traffic prediction results (such as future 5ms PPS / traffic type / packet loss risk) with the network interface card queue identifier (such as RSS queue ID) and port identifier (such as physical port number / logical port ID) bound when collecting traffic to clarify the network device identifier (port ID, queue ID) to which the predicted traffic belongs, and mark the optimization priority based on the future traffic type. Burst traffic or high packet loss risk traffic is high priority (requires immediate optimization), stable traffic is medium priority (optimized periodically), and short-term traffic is low priority (monitored only without active intervention).
[0110] Then, information such as network device identification, traffic adjustment priority, future traffic intensity, and future queue status are integrated to generate structured traffic prediction data (i.e., a traffic prediction and queue mapping table), clarifying the prediction results and optimization priorities for each port / queue. The traffic prediction and queue mapping table is shown in Table 2.
[0111] Table 2
[0112] Finally, based on the structured data from traffic prediction and pre-defined adjustment rules, the three core resource strategies are dynamically adjusted: Bandwidth resource allocation: For high-priority traffic (such as financial transaction flow), reserve more than 60% of the port bandwidth; for continuous flow such as large file transfer, dynamically expand the cache pool size (such as from 2MB to 8MB) to avoid cache overflow and packet loss.
[0113] Congestion control algorithm switching: When traffic intensity increases sharply (such as when an AI training task is started), switch the algorithm from CUBIC to BBR (to adapt to high bandwidth and low latency scenarios); when traffic fluctuations are small (such as video-on-demand streaming), switch to the Reno algorithm to reduce computing power consumption.
[0114] Queue scheduling mechanism adjustment: When mixed-flow concurrency occurs, the scheduling mechanism will be switched from WFQ to DRR to balance the low latency of high-priority flows with the fairness of low-priority flows; for high-priority flows, the WF2Q weight will be increased by 20%-50% or the initial value of the DRR deficit counter will be increased, and an additional 10%-20% hardware buffer will be allocated. If it is TCP traffic, a window expansion factor adjustment instruction will be issued; for medium-priority stable flows, the rx_usecs threshold will be adjusted according to the predicted PPS to balance CPU load and latency, and tasks such as SSL / TLS encryption will be offloaded to the network card hardware; for low-priority short-term flows, only the monitoring alarm threshold will be adjusted to avoid frequent policy changes.
[0115] In summary, this application not only solves the resource mismatch problem caused by indiscriminate adjustment in related technologies, but also ensures resources for high-priority flows in advance, optimizes the balance of stable flows, and reduces disturbances to short-term flows, effectively improving network resource utilization and transmission stability, and meeting the differentiated needs of different types of traffic.
[0116] Furthermore, for ease of understanding, such as Figure 5 As shown, this application provides a schematic diagram of a specific traffic management system.
[0117] Reference Figure 5 This application is based on a five-layer architecture of data acquisition, predictive modeling, decision optimization, hardware execution, and feedback adjustment. It relies on the processing capabilities of the hardware processing unit of the network device (i.e., the FPGA / ASIC acceleration unit and embedded computing capabilities of the smart network card) to achieve end-to-end low latency optimization.
[0118] Taking a network device as an example, specifically a smart network interface card (NIC): 1) Data Acquisition Layer: Through the intelligent network card traffic monitoring module, key features of the data stream (such as packet size, frame rate, port number, QoS identifier, historical transmission rate, and packet loss rate trend in the past 10ms) are collected at a microsecond sampling frequency according to time differences (day / night, weekday / rest day / holiday). Features that are strongly correlated with performance are filtered out, and redundant data is extracted to ensure the timeliness and effectiveness of the features.
[0119] 2) Predictive Modeling Layer: Deploy a lightweight LSTM / TCN model with INT8 quantization and layer pruning in the network card embedded processor. Input the collected traffic features to achieve an inference latency of ≤1ms and output the traffic type (such as financial transaction flow, AI training flow) and intensity change trend prediction results.
[0120] 3) Decision Optimization Layer: Based on the prediction results, strategies are generated. When high-priority traffic is approaching, 60%+ bandwidth is reserved. When the traffic intensity surges, the BBR congestion algorithm is switched. When mixed-flow concurrency occurs, the DRR queue scheduling is adjusted to ensure that resource allocation and algorithms adapt to traffic demand. The core is "allocate resources on demand and switch algorithms on demand".
[0121] 4) Hardware execution layer: Through the policy hardware mapping module, the optimization policy is converted into FPGA / ASIC configuration signals, and the queue priority register, congestion algorithm control word, etc. are adjusted to achieve an execution delay of ≤500ns, ensuring that the optimization takes effect in real time.
[0122] 5) Feedback Adjustment Layer: Real-time monitoring of indicators such as target flow latency and packet loss rate after optimization. If the expected results are not met (e.g., latency exceeds 50ms), incremental adjustments are automatically triggered (e.g., increasing the bandwidth reservation ratio).
[0123] Among them, such as Figure 6 The diagram illustrates the key technical steps of a traffic management system. (Refer to...) Figure 6 The key technical steps of the traffic management system are divided into three progressive closed loops: First, raw traffic data is processed through traffic feature engineering to build a lightweight prediction model, providing a foundation for subsequent predictions; next, based on the future traffic prediction results output by the model, adaptive optimization strategies are generated to suit traffic intensity, type, and queue status; finally, the strategies are transformed into hardware-executable configuration signals, and adjustments are executed in real time at the network device hardware layer. Performance feedback is used to continuously optimize the model and strategies, forming a complete technical chain of "model building, strategy generation, hardware execution, and feedback iteration." The specific execution process can be found in [reference needed]. Figures 1 to 4 The embodiments shown will not be described in detail here.
[0124] This application, through the aforementioned traffic management system, can achieve the following: Figure 7 For specific traffic management methods, please refer to [reference needed]. Figure 7The traffic management method of this application is as follows: First, traffic data from weekdays / rest days / holidays is collected, and time-series samples are generated after outlier removal, linear interpolation completion, data normalization, and sliding window processing. Then, a lightweight LSTM model is deployed, and a "Traffic Prediction-Queue Mapping Table" is generated using INT8 quantization and layer pruning techniques. Next, bandwidth allocation, congestion control algorithms, and queue scheduling mechanisms are dynamically adjusted based on the prediction results, and the strategy (including queue priority, cache adjustment, etc.) is executed in real time by FPGA / ASIC hardware, while the command reception status is fed back via a heartbeat indicator. Afterwards, real-time performance indicators are collected to generate an "Optimization Effect Evaluation Report." If the PPS / BPS deviation is ≤10%, the strategy is maintained; otherwise, a backup model is triggered for verification. Finally, the data is stored in InfluxDB daily, and the prediction model and scenario strategy library are optimized based on historical data to achieve a traffic type prediction accuracy of ≥95% and an intensity prediction error of ≤10%. This ultimately forms a closed-loop traffic management process of "data preprocessing, model prediction, strategy execution, effect feedback, and iterative optimization." The specific execution process can be found in [reference needed]. Figures 1 to 4 The embodiments shown will not be described in detail here.
[0125] Furthermore, the traffic management method of this application can be directly deployed on network devices, relying on the control unit to achieve distributed autonomous prediction and execution functions. This enables network devices to break through the traditional mode of passively receiving upper-layer instructions, forming a complete closed-loop capability of autonomous monitoring, autonomous decision-making, and autonomous optimization. It does not rely on external computing power, can achieve network performance optimization in a more efficient way, and has the advantage of lower latency. Figure 8 The diagram shown is a schematic representation of a specific network device capable of implementing a traffic management method according to this application. (Refer to...) Figure 8 The network device of this application consists of a hardware counting module, a processor, a heartbeat indicator, a hardware mapping module, a memory, a communication interface, and a communication bus. Each module interacts with the other via the communication bus: the hardware counting module collects traffic data and transmits it to the processor; the processor carries a lightweight prediction model, performs core calculations such as traffic prediction and strategy generation, and uses the heartbeat indicator to provide feedback on command reception status; the hardware mapping module converts the strategy into hardware-executable configuration signals; the memory stores traffic data, model parameters, and optimization strategies; and the communication interface enables information exchange between the device and external systems. This device can autonomously collect, calculate, and execute traffic data using its own hardware modules, eliminating the need for external computing power and achieving a lower latency and more efficient autonomous optimization loop for network performance. The specific execution process of each module in the network device can be found in [reference needed]. Figures 1 to 4 The embodiments shown will not be described in detail here.
[0126] In summary, this application enables network devices to anticipate or sense changes in network traffic trends in advance through accurate traffic prediction patterns. This allows them to dynamically and flexibly adjust their operating modes and resource allocation strategies in advance, thereby optimizing network performance and effectively improving network stability, reliability, and efficiency. Ultimately, this meets the stringent requirements of various emerging applications for networks.
[0127] 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.
[0128] Embodiments of this application also provide a flow management device 900. Figure 9 This is a schematic diagram of the structure of a flow management device provided in an embodiment of this application, as shown below. Figure 9 As shown, it includes: The acquisition unit 910 is used to acquire network traffic data of the network device, and the network traffic data is used to characterize the traffic transmission status of the network device. The prediction unit 920 is used to perform numerical quantization on network traffic data to obtain quantized input data adapted to the lightweight model, and input the quantized input data into the lightweight prediction model to predict the quantized output data. The quantized output data is then numerically dequantized to obtain the future traffic prediction result. The strategy generation unit 930 is used to generate traffic adjustment strategies based on future traffic prediction results; Traffic management unit 940 is used to convert traffic adjustment policies into configuration signals based on predefined policy hardware mapping relationships, so as to adjust the traffic parameters of hardware processing units in network devices according to the configuration signals.
[0129] In one possible implementation of this application embodiment, the acquisition unit 910 is used to: acquire raw traffic data related to the network performance of the network device according to a preset acquisition rule; perform data preprocessing on the raw traffic data to obtain network traffic data, wherein the data preprocessing includes at least one of data completion processing, data standardization processing, and data structuring processing.
[0130] In one possible implementation of this application embodiment, the apparatus further includes a construction unit, configured to: input historical traffic sample data into an initial prediction model before inputting network traffic data into a lightweight prediction model to obtain future traffic prediction results, train the initial prediction model, and obtain a trained initial prediction model; obtain a first initial model weight and a second initial model weight from at least one initial model weight in the first layer of the trained initial prediction model, wherein the first layer is any layer of the initial prediction model; determine a weight scaling factor based on the first initial model weight and the second initial model weight; quantize the at least one initial model weight based on the weight scaling factor to obtain at least one quantized model weight; and determine at least one target model weight from the at least one quantized model weight based on a preset layer pruning rule, so as to obtain a lightweight prediction model based on the at least one target model weight.
[0131] In one possible implementation of this application embodiment, the prediction unit 920 is configured to: determine a first absolute value of a first quantization model weight among at least one quantization model weight, wherein the first quantization model weight is any quantization model weight among at least one quantization model weight; and remove the first quantization model weight from at least one quantization model weight if the first absolute value is less than or equal to a preset pruning threshold, so as to obtain at least one target model weight.
[0132] In one possible implementation of this application embodiment, the prediction unit 920 is configured to: standardize network traffic data and map the network traffic data to a preset range to obtain standard input data; quantize the standard input data using an input scaling factor to obtain quantized input data, wherein the input scaling factor is determined based on the standard input data; input the quantized input data into a lightweight prediction model to predict quantized output data; and perform inverse quantization on the quantized output data based on the output scaling factor to obtain future traffic prediction results, wherein the output scaling factor is determined based on the quantized output data.
[0133] In one possible implementation of this application embodiment, the future traffic prediction result includes at least one of future data packet transmission data and future queue length. The strategy generation unit 930 is used to: determine the future traffic intensity and future traffic type based on the future data packet transmission data; determine the future queue state based on the future queue length; and generate a traffic adjustment strategy based on the future traffic intensity, future traffic type, and future queue state.
[0134] In one possible implementation of this application embodiment, the strategy generation unit 930 is configured to: determine the network device identifier associated with the future traffic prediction result; determine the traffic adjustment priority based on the future traffic type; construct the traffic prediction structured data corresponding to the future traffic prediction result based on the network device identifier, traffic adjustment priority, future traffic intensity, and future queue status; and generate a traffic adjustment strategy based on the traffic prediction structured data and preset adjustment rules, wherein the traffic adjustment strategy includes at least one of a bandwidth allocation strategy, a congestion control algorithm switching strategy, and a queue scheduling strategy.
[0135] In one possible implementation of this application embodiment, the traffic management unit 940 is configured to: send a configuration signal to the hardware processing unit of the network device; determine the lighting display mode of the hardware processing unit, and determine whether the hardware processing unit has successfully received the configuration signal based on the lighting display mode; and, if the hardware processing unit has not successfully received the configuration signal, send a configuration signal to the hardware processing unit so that the hardware processing unit adjusts the traffic parameters based on the configuration signal.
[0136] In one possible implementation of this application embodiment, the traffic management unit 940 is configured to: after adjusting the traffic parameters of the hardware processing unit in the network device according to the configuration signal, obtain the network performance indicators of the network device; generate an optimization effect evaluation report based on the network performance indicators and preset optimization targets, so as to adjust the traffic adjustment strategy and / or the model parameters of the lightweight prediction model according to the optimization effect evaluation report.
[0137] For a description of the features in the embodiment corresponding to the flow management device, please refer to the relevant description in the embodiment corresponding to the flow management method, which will not be repeated here.
[0138] 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-described traffic management method embodiments.
[0139] Embodiments of this application also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the above-described traffic management method embodiments when it is run.
[0140] 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.
[0141] Embodiments of this application also provide a computer program product, which includes a computer program that, when executed by a processor, implements the steps in any of the above-described traffic management method embodiments.
[0142] Embodiments of this application also provide another computer program product, including a non-volatile computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in any of the above-described traffic management method embodiments.
[0143] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0144] The foregoing has provided a detailed description of the traffic management method, electronic device, storage medium, and product provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are merely for the purpose of helping to understand the method and its core ideas. It should be noted that those skilled in the art can make various improvements and modifications to this application without departing from its principles, and these improvements and modifications also fall within the protection scope of the claims of this application.
Claims
1. A traffic management method, characterized in that, include: Acquire network traffic data of the network device, wherein the network traffic data is used to characterize the traffic transmission status of the network device; The network traffic data is numerically quantized to obtain quantized input data adapted to the lightweight model, and the quantized input data is input into the lightweight prediction model to predict quantized output data. The quantized output data is then numerically dequantized to obtain future traffic prediction results. Based on the predicted future traffic flow, a traffic adjustment strategy is generated. Based on a predefined policy hardware mapping relationship, the traffic adjustment policy is converted into a configuration signal, so as to adjust the traffic parameters of the hardware processing unit in the network device according to the configuration signal.
2. The method according to claim 1, characterized in that, The acquisition of network traffic data from network devices includes: Collect raw traffic data of the network device according to preset collection rules; The original traffic data is preprocessed to obtain the network traffic data. The data preprocessing includes at least one of data completion processing, data standardization processing, and data structuring processing.
3. The method according to claim 1, characterized in that, The lightweight prediction model is pre-built in the following way: Historical traffic sample data is input into the initial prediction model, and the initial prediction model is trained to obtain the trained initial prediction model. Obtain the first initial model weight and the second initial model weight from at least one initial model weight in the first layer of the trained initial prediction model, wherein the first layer is any layer of the initial prediction model; Determine the weight scaling factor based on the first initial model weights and the second initial model weights; Based on the weight scaling factor, the at least one initial model weight is quantized to obtain at least one quantized model weight after quantization. Based on preset layer pruning rules, at least one target model weight is determined among the at least one quantized model weights, so as to obtain the lightweight prediction model according to the at least one target model weight.
4. The method according to claim 3, characterized in that, The step of determining at least one target model weight among the at least one quantized model weights based on preset layer pruning rules includes: Determine a first absolute value of a first quantization model weight among the at least one quantization model weights, wherein the first quantization model weight is any quantization model weight among the at least one quantization model weights; If the first absolute value is less than or equal to a preset pruning threshold, the first quantization model weight is removed from the at least one quantization model weight to obtain the at least one target model weight.
5. The method according to claim 1, characterized in that, The process of numerically quantizing the network traffic data to obtain quantized input data adapted to the lightweight model, and then inputting the quantized input data into the lightweight prediction model to predict quantized output data, followed by numerical inverse quantization of the quantized output data to obtain future traffic prediction results, includes: The network traffic data is standardized and mapped to a preset range to obtain standard input data. Using the first and second standard input data of the standard input data, an input scaling factor is determined, and the standard input data is numerically quantized using the input scaling factor to obtain quantized input data; The quantized input data is input into the lightweight prediction model to predict the quantized output data. Using the first and second quantized output data of the quantized output data, an output scaling factor is determined, and the quantized output data is numerically dequantized based on the output scaling factor to obtain the future traffic prediction result.
6. The method according to claim 1, characterized in that, The future traffic prediction result includes at least one of the following: future packet transmission data and future queue length. The step of generating a traffic adjustment strategy based on the future traffic prediction results includes: Based on the future data packet transmission data, determine the future traffic intensity and future traffic type; Determine the future queue state based on the future queue length; The traffic adjustment strategy is generated based on the future traffic intensity, the future traffic type, and the future queue status.
7. The method according to claim 6, characterized in that, The process of generating the traffic adjustment strategy based on the future traffic intensity, the future traffic type, and the future queue status includes: Determine the network device identifier associated with the future traffic prediction results; Based on the aforementioned future traffic types, determine the priority of traffic adjustment; Based on the network device identifier, the traffic adjustment priority, the future traffic intensity, and the future queue status, construct the traffic prediction structured data corresponding to the future traffic prediction result; Based on the structured traffic prediction data and preset adjustment rules, the traffic adjustment strategy is generated. The traffic adjustment strategy includes at least one of the following: bandwidth allocation strategy, congestion control algorithm switching strategy, and queue scheduling strategy.
8. The method according to claim 1, characterized in that, The step of adjusting the traffic parameters of the hardware processing unit in the network device according to the configuration signal includes: The configuration signal is sent to the hardware processing unit of the network device; The lighting display mode of the hardware processing unit is determined, and based on the lighting display mode, it is determined whether the hardware processing unit has successfully received the configuration signal. If the hardware processing unit fails to receive the configuration signal, the configuration signal is sent to the hardware processing unit so that the hardware processing unit adjusts the flow parameters based on the configuration signal.
9. The method according to claim 1, characterized in that, After adjusting the traffic parameters of the hardware processing unit in the network device according to the configuration signal, the method further includes: Obtain the network performance metrics of the network device; Based on the network performance indicators and preset optimization objectives, an optimization effect evaluation report is generated to adjust the traffic adjustment strategy and / or the model parameters of the lightweight prediction model according to the optimization effect evaluation report.
10. An electronic device, characterized in that, include: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the traffic management method according to any one of claims 1-9.
