Data packet flow control method and control system thereof
By using an intelligent adaptive traffic control mechanism, network status information is acquired in real time, traffic changes are predicted, and control parameters are dynamically adjusted. This solves the problems of slow response speed and poor adaptability in existing technologies, and achieves efficient network traffic management and optimization.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING COMPUTER NETWORK TECH CO LTD
- Filing Date
- 2026-03-19
- Publication Date
- 2026-05-01
AI Technical Summary
Existing packet flow control methods are slow to respond and poorly adaptable in high-bandwidth, low-latency, and large-scale dynamic network environments. They cannot effectively handle burst traffic, resulting in low bandwidth utilization, increased latency, and network congestion.
An intelligent adaptive flow control mechanism is introduced. By acquiring network status information in real time, intelligent algorithms are used to analyze and predict traffic change trends, dynamically adjust flow control parameters, and combine token bucket, leaky bucket and adaptive control strategies. Priority scheduling algorithms are used to ensure that data packets with high real-time requirements are transmitted first, and network status changes are monitored in real time for rapid response.
It significantly improves the accuracy and response speed of network traffic management, optimizes traffic scheduling and bandwidth allocation, reduces latency and packet loss rate, ensures the transmission quality of critical applications, and avoids network congestion and bandwidth waste.
Smart Images

Figure CN121967324A_ABST
Abstract
Description
A data packet flow control method and its control system Technical Field
[0001] This invention relates to computer network technology, and in particular to a data packet flow control method and its control system, which is suitable for flow management and optimization in high-bandwidth, low-latency network environments, and has broad application prospects, especially in real-time applications, burst traffic, and multi-path network environments. Background Technology
[0002] Packet flow control methods and control systems refer to the management and adjustment of the transmission rate of data packets in a network through certain algorithms or mechanisms to ensure network stability and efficiency, prevent network congestion or packet loss, and typically aim to optimize the utilization of network resources and ensure that data packets are transmitted at an appropriate rate, thereby improving network performance. Commonly used in the TCP protocol, the receiver informs the sender of the maximum amount of data that can be received, and the sender must send data within this limit to avoid data overflow. Alternatively, the sender can obtain a token; only when it possesses a token can it send a data packet. The token generation rate is capped, and the token bucket capacity is also limited. When the tokens in the bucket are exhausted, the data packet is delayed or dropped. This method can balance the burstiness of traffic and ensure that the network is not over-congested. The flow control algorithm simulates a leaky bucket. When a data packet enters the "bucket," if the bucket is full, the packet is discarded, and the packets "leak out" at a fixed rate, achieving smooth flow output. This helps avoid sudden traffic spikes and ensures transmission stability. Commonly used in the TCP protocol, it dynamically adjusts the data transmission rate by continuously assessing the network state. When network congestion occurs, the sender reduces the data transmission rate, while when the network is idle, the transmission rate can gradually increase. It controls the inflow rate of traffic by sorting, buffering, or discarding incoming data packets. The receiver informs the sender of the current network state, such as the size of the receive window and the degree of network congestion. Specific strategies for flow control include TCP congestion control algorithms, token buckets, and leaky buckets.
[0003] However, while existing packet flow control methods and their control systems have played an important role in network management and optimization, they still have some defects and shortcomings, especially when dealing with large-scale, highly dynamic network environments. With the continuous development of network technology, traditional packet flow control methods are gradually unable to meet the complex needs of modern networks. In particular, in high-bandwidth, low-latency, and large-scale dynamic network environments, existing flow control methods, such as token bucket, leaky bucket algorithms, and congestion control based on traditional TCP protocols, suffer from slow response speed, poor adaptability, and inability to handle burst traffic, resulting in low bandwidth utilization, increased latency, and network congestion. Summary of the Invention
[0004] To address the shortcomings of existing technologies, the present invention aims to provide a data packet flow control method and its control system. By introducing an intelligent adaptive flow control mechanism, it achieves efficient and real-time network flow scheduling, optimizes the use of network resources, and provides flexible network topology adaptability.
[0005] The technical solution adopted by this invention to solve its technical problem is:
[0006] A data packet flow control method includes:
[0007] Obtain real-time network status information, including bandwidth, latency, packet loss rate, and traffic distribution;
[0008] Based on real-time status information, intelligent algorithms are used to analyze and predict future traffic trends.
[0009] Based on the prediction results and application requirements, dynamically adjust the flow control parameters and adopt flow control strategies, including but not limited to token bucket, leaky bucket or adaptive control strategies.
[0010] For bursts of traffic, a priority scheduling algorithm is used to ensure that data packets with high real-time requirements are transmitted first.
[0011] Monitor network status changes in real time, regularly optimize and adjust control strategies, and respond quickly to network congestion or bandwidth fluctuations by adjusting the transmission rate.
[0012] As a preferred method, the real-time status information of the network, including bandwidth, latency, packet loss rate, and traffic distribution, is as follows:
[0013] Bandwidth is the maximum transmission rate of a network, estimated by measuring the total amount of data passing through the network within a certain time period. The calculation formula is:
[0014]
[0015] in, The amount of data transmitted per unit of time;
[0016] The time spent on transmission;
[0017] Latency is the time required for data to travel from the source to the destination. Network latency consists of several parts, including propagation delay and queuing delay. The calculation formula is as follows:
[0018]
[0019] RTT is the time it takes for a data packet to be sent from the source to the destination and back.
[0020] The contribution of each component in the network to latency is estimated by measuring each component individually.
[0021] Propagation delay is determined by the speed at which the signal travels in the medium, as shown in the formula:
[0022]
[0023] Processing latency is the delay caused by the device processing data packets;
[0024] Packet loss rate is the proportion of data packets lost during transmission, calculated using the following formula:
[0025]
[0026] The number of lost data packets refers to the packets that were not successfully received during transmission;
[0027] The total number of data packets sent is the total number of data packets attempted to be sent;
[0028] Traffic distribution describes the proportion of different types of traffic in a network. It is used to analyze the percentage of different traffic types in the total network traffic. The calculation formula is as follows:
[0029]
[0030] A certain type of traffic refers to the data traffic generated by a specific type of application or service on the network.
[0031] Total traffic is the sum of all data traffic in the network.
[0032] As a preferred method, the approach of using intelligent algorithms to analyze and predict future traffic trends based on real-time status information is as follows:
[0033] The ARIMA model includes autoregressive, differencing, and moving average components:
[0034] Autoregressive component:
[0035]
[0036] in, This represents the current value of the time series. , ,..., The coefficients of the model, It is white noise;
[0037] Moving average section:
[0038]
[0039] in, , ,..., These are the coefficients of the model;
[0040] Non-stationarity is eliminated by differencing the time series data.
[0041]
[0042] The synthesis formula for the ARIMA model is:
[0043]
[0044] Establishing a linear correlation between traffic and bandwidth, latency, and packet loss rate, the regression model takes the following form:
[0045]
[0046] For predicted flow;
[0047] , ,..., For real-time status information;
[0048] , ,..., These are the regression coefficients;
[0049] This is the error term;
[0050] The formula for an LSTM network includes forget gate, input gate, and output gate:
[0051] The forgetting gate determines which information is discarded:
[0052]
[0053] The input gate determines which information is written to the cell state:
[0054]
[0055] The output gate determines what information is output from the cell state:
[0056]
[0057] Cell state: The cell state is updated based on the outputs of the forget gate and the input gate.
[0058]
[0059] The final output value is determined by the output gate:
[0060]
[0061] LSTM networks extract patterns from real-time traffic data through multiple iterations of training, and predict future traffic changes.
[0062] In some network environments, neural networks are used for traffic prediction based on real-time state information. Through adaptive learning, the neural network predicts future traffic based on the input real-time data. The neural network model formula is as follows:
[0063]
[0064] in, For predicted flow;
[0065] This is the input real-time status information;
[0066] and For the network's weights and biases;
[0067] This is the activation function.
[0068] As a preferred approach, the flow control parameters are dynamically adjusted based on the prediction results and application requirements, and a flow control strategy is adopted, including but not limited to token bucket, leaky bucket, or adaptive control strategies.
[0069] Token Bucket Algorithm Calculation Formula:
[0070] Token generation rate: Tokens per second;
[0071] Bucket capacity: Token;
[0072] Current token count: ;
[0073] Requested bandwidth size:
[0074] When a data packet arrives, the algorithm retrieves a token from the bucket. If there are enough tokens in the bucket, the data packet will be transmitted; otherwise, it will be discarded or delayed. The formula is as follows:
[0075]
[0076] If there is a traffic request:
[0077]
[0078] otherwise:
[0079]
[0080] Leaky bucket algorithm calculation formula:
[0081] Bucket capacity: ;
[0082] rate: ;
[0083] Number of packets in the current bucket: ;
[0084] Number of data packets received: ;
[0085] The bucket is updated whenever a data packet arrives:
[0086]
[0087] Output flow:
[0088]
[0089] When the bucket is full, newly arriving data packets will be discarded.
[0090]
[0091] The adaptive flow control strategy dynamically adjusts flow control parameters based on the real-time network status. The flow control system obtains real-time network bandwidth predictions and latency estimates, and adjusts the parameters in the following manner:
[0092] Adjust the token generation rate based on the predicted bandwidth:
[0093]
[0094] in, This is the bandwidth prediction value. Maximum token generation rate;
[0095] Adjust the output rate of the leaky bucket based on the packet loss rate:
[0096]
[0097] in, Based on the output rate, The current packet loss rate;
[0098] Traffic transmission based on delay adjustment:
[0099]
[0100] in, To delay prediction, It is a function that adaptively adjusts the output flow rate based on delay and control parameters;
[0101] The classic feedback control strategy is used to adjust the flow control parameters. The PID controller adjusts the control quantity through three parts: proportional, integral, and derivative. The PID control formula is as follows:
[0102]
[0103] in, For error;
[0104] , , These are the adjustment coefficients for proportional, integral, and derivative equations;
[0105] PID control is used to dynamically adjust flow control parameters.
[0106] As a preferred approach, for bursty traffic, a priority scheduling algorithm is used to ensure that data packets with high real-time requirements are transmitted first.
[0107] Set up multiple queues, each with a different priority:
[0108] , ,..., The data packet queues are of different priorities, among which As the highest priority, Lowest priority;
[0109] Data packets in each queue are arranged in the order of arrival;
[0110] If queue If there are data packets, then from Transmit data packets in the middle;
[0111] like If empty, then from Data packets are transmitted in the middle, and so on;
[0112] Formula expression:
[0113]
[0114] in, ,and It has the highest priority;
[0115] Multiple data packets are configured, with each data packet requiring a processing time of [time value missing]. ;
[0116] The priority of each data packet is based on its processing time. It is determined that data packets with shorter processing times will be transmitted first.
[0117] Scheduling rules:
[0118] Transmit using data packets with the shortest processing time;
[0119] Formula expression:
[0120]
[0121] Data packets are selected according to priority:
[0122]
[0123] Weighted fair queuing calculation formula:
[0124] Let each stream The weight is The data packet transmission rate is ;
[0125] For each stream Each has its corresponding weighted rate, and the priority is determined by the weight.
[0126] Weighted fair scheduling formula:
[0127] The weighted rate for each stream is:
[0128]
[0129] in, The total transmission rate of the system, For flow The weights;
[0130] Processing time per data packet:
[0131]
[0132] in, For the size of the data packet, The weighted rate of the flow;
[0133] The scheduling rules ensure that high-priority real-time data packets are transmitted first, and the flow weights are used. Adjustments are made based on the real-time requirements of the stream;
[0134] EDF scheduling algorithm calculation formula:
[0135] Each task The deadline is ;
[0136] Current time is The remaining time for the task is ;
[0137] The task with the earliest deadline is transmitted first, according to the formula:
[0138]
[0139] Task In The earliest due date will be executed first.
[0140] The scheduling rules prioritize tasks according to their earliest deadlines, expressed by the following formula:
[0141]
[0142] By combining time-slice round-robin and priority scheduling, data packets with high real-time requirements are given priority and allocated more time slices;
[0143] Time slice rotation calculation formula:
[0144] The priority of each data packet is Packets with high real-time requirements are scheduled first;
[0145] The time slice for each packet is Packets with higher priority are allocated more time slices;
[0146] The scheduling rules are ordered according to priority, and the time slice for each data packet is determined by its priority:
[0147]
[0148] High-priority packets receive more resources during time-slice rotation.
[0149] As a preferred approach, real-time monitoring of network status changes, periodic optimization and adjustment of control strategies, and rapid response to network congestion or bandwidth fluctuations are employed. The method for adjusting the transmission rate is as follows:
[0150] TCP congestion control employs four mechanisms—slow start, congestion avoidance, fast retransmission, and fast recovery—to adjust the sending rate and respond in real time to changes in network status.
[0151] The initial sending window size is set to or ;
[0152] When no packet loss occurs within a round-trip time, cwnd grows exponentially:
[0153]
[0154] Once packet loss is detected or the threshold is reached, the congestion avoidance phase begins, at which point the growth of congestion limit (cwnd) becomes linear.
[0155]
[0156] If packet loss occurs, the congestion control phase begins:
[0157]
[0158] At the same time, TCP will set a threshold Set as And return to the slow start phase;
[0159] If network bandwidth fluctuates, TCP adjusts its concurrency limit (cwnd) and sending rate based on network latency and packet loss rate. The dynamic adjustment formula based on latency or bandwidth feedback is as follows:
[0160]
[0161] Where RTT stands for round-trip time;
[0162] Bandwidth adaptive algorithms dynamically adjust the transmission rate based on real-time measured bandwidth changes. Bandwidth adaptive algorithms include TCP Vegas and TCP Cubic, which optimize network traffic by dynamically monitoring bandwidth and latency.
[0163] Based on real-time measured network bandwidth, transmission rate Adjust using the following formula:
[0164]
[0165] in, For a moment Available bandwidth, This refers to the network latency at that moment;
[0166] A bandwidth prediction algorithm is used to predict future bandwidth fluctuations and adjust the rate when fluctuations occur.
[0167]
[0168] Where, is the adjustment factor. For a moment Bandwidth estimation;
[0169] TCP Vegas is an improved TCP congestion control algorithm that adjusts the sending rate. Vegas controls the sending rate by calculating the difference between the expected delay and the actual delay.
[0170]
[0171] Where cwnd is the congestion window and RTT_expected is the expected round-trip time estimated based on historical network latency;
[0172] Vegas reduces the window size and thus the sending rate when the actual RTT exceeds the expected RTT.
[0173]
[0174] If RTT_{actual} is less than the expected value, the sending rate increases;
[0175] AQM takes proactive measures before network congestion occurs, such as dropping some packets or marking packets to notify the source to adjust the sending rate.
[0176] The RED algorithm dynamically calculates the packet loss probability based on the queue length. :
[0177]
[0178] in, This is the current queue length. The threshold of the queue, To adjust the parameters;
[0179] When network congestion occurs, network devices notify the source end to adjust the rate by marking data packets with ECN:
[0180]
[0181] Among them, the ECN feedback prompts the source to reduce the sending rate.
[0182] A packet flow control system includes:
[0183] The real-time network status monitoring module is used to obtain information on bandwidth, latency, packet loss rate, and traffic distribution in the network in real time.
[0184] The intelligent analysis module is used to analyze and predict real-time network conditions using reinforcement learning algorithms, and generate predictive models for network traffic.
[0185] The adaptive traffic adjustment module is used to dynamically adjust the network traffic control strategy based on the output results of the intelligent analysis module.
[0186] The priority scheduling module is used to prioritize data streams with high real-time requirements based on the needs of the application layer.
[0187] The control strategy feedback module adjusts the traffic control strategy based on real-time network status monitoring to ensure continuous system optimization and self-adaptation.
[0188] Another technical problem to be solved by the present invention is to provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, it implements a data packet flow control method and a control system as described above.
[0189] Another technical problem to be solved by the present invention is to provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a data packet flow control method and its control system.
[0190] The beneficial effects of this invention are:
[0191] This invention employs machine learning algorithms to analyze and predict traffic change trends, adjusting traffic control strategies in real time to achieve dynamic adaptation to network conditions. This significantly improves the accuracy and response speed of network traffic management. Combining traditional control methods such as token bucket and leaky bucket with adaptive traffic control, this invention can flexibly switch between different strategies based on the actual network environment, optimizing traffic scheduling and bandwidth allocation. For bursty traffic, a priority scheduling algorithm is used to ensure that traffic for real-time applications is transmitted first, reducing latency and packet loss rates, and improving network quality. By establishing a control strategy feedback mechanism, the system can quickly respond to changes in network conditions and dynamically adjust traffic control strategies, thereby minimizing network congestion and bandwidth waste. Attached Figure Description
[0192] Figure 1 is a schematic diagram of a data packet flow control system according to the present invention. Detailed Implementation
[0193] The principles and features of the present invention are described below. The examples given are for illustrative purposes only and are not intended to limit the scope of the invention. The invention is described more specifically by way of example in the following paragraphs. The advantages and features of the invention will become clearer from the following description and claims.
[0194] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.
[0195] Example
[0196] The technical solution adopted by this invention to solve its technical problem is:
[0197] A data packet flow control method includes:
[0198] Obtain real-time network status information, including bandwidth, latency, packet loss rate, and traffic distribution;
[0199] Based on real-time status information, intelligent algorithms are used to analyze and predict future traffic trends.
[0200] Based on the prediction results and application requirements, dynamically adjust the flow control parameters and adopt flow control strategies, including but not limited to token bucket, leaky bucket or adaptive control strategies.
[0201] For bursts of traffic, a priority scheduling algorithm is used to ensure that data packets with high real-time requirements are transmitted first.
[0202] Monitor network status changes in real time, regularly optimize and adjust control strategies, and respond quickly to network congestion or bandwidth fluctuations by adjusting the transmission rate.
[0203] By dynamically adjusting traffic control parameters and using intelligent prediction, the system can flexibly respond to changes in the network environment, avoiding network congestion or resource waste. Employing a priority scheduling algorithm ensures that data streams with high real-time requirements are transmitted first, guaranteeing the transmission quality of critical applications. Through intelligent algorithm-based traffic prediction and feedback mechanisms, the system can respond promptly to network changes, making optimizations and adjustments to maintain efficient network operation. It supports different traffic control strategies, flexibly adjusting according to different network conditions and application needs to ensure system adaptability. Through real-time monitoring and feedback mechanisms, the system can continuously adjust its strategies during operation to adapt to changing network environments, improving network performance and user experience.
[0204] The methods for obtaining real-time network status information, including bandwidth, latency, packet loss rate, and traffic distribution, are as follows:
[0205] Bandwidth is the maximum transmission rate of a network, estimated by measuring the total amount of data passing through the network within a certain time period. The calculation formula is:
[0206]
[0207] in, The amount of data transmitted per unit of time;
[0208] The time spent on transmission;
[0209] Latency is the time required for data to travel from the source to the destination. Network latency consists of several parts, including propagation delay and queuing delay. The calculation formula is as follows:
[0210]
[0211] RTT is the time it takes for a data packet to be sent from the source to the destination and back.
[0212] The contribution of each component in the network to latency is estimated by measuring each component individually.
[0213] Propagation delay is determined by the speed at which the signal travels in the medium, as shown in the formula:
[0214]
[0215] Processing latency is the delay caused by the device processing data packets;
[0216] Packet loss rate is the proportion of data packets lost during transmission, calculated using the following formula:
[0217]
[0218] The number of lost data packets refers to the packets that were not successfully received during transmission;
[0219] The total number of data packets sent is the total number of data packets attempted to be sent;
[0220] Traffic distribution describes the proportion of different types of traffic in a network. It is used to analyze the percentage of different traffic types in the total network traffic. The calculation formula is as follows:
[0221]
[0222] A certain type of traffic refers to the data traffic generated by a specific type of application or service on the network.
[0223] Total traffic is the sum of all data traffic in the network.
[0224] Real-time monitoring of multiple metrics, including bandwidth, latency, packet loss rate, and traffic distribution, provides a comprehensive understanding of network conditions and data support for subsequent traffic control strategies. Based on real-time data analysis, network traffic can be dynamically adjusted to avoid congestion, optimize bandwidth utilization, and ensure critical applications receive sufficient resources. Timely monitoring and response to network changes improves network stability and reliability. Automatic strategy adjustments based on network conditions ensure efficient and smooth network operation even with changes in bandwidth and latency, avoiding the lag caused by manual configuration. Optimized traffic allocation and priority scheduling guarantee the protection of real-time and latency-sensitive applications, improving user experience. Intelligent algorithms predict traffic trends and make advance adjustments to avoid network congestion, latency, and packet loss, ensuring stable network operation even under high load.
[0225] The method for analyzing and predicting future traffic trends using intelligent algorithms based on real-time status information is as follows:
[0226] The ARIMA model includes autoregressive, differencing, and moving average components:
[0227] Autoregressive component:
[0228]
[0229] in, This represents the current value of the time series. , ,..., The coefficients of the model, It is white noise;
[0230] Moving average section:
[0231]
[0232] in, , ,..., These are the coefficients of the model;
[0233] Non-stationarity is eliminated by differencing the time series data.
[0234]
[0235] The synthesis formula for the ARIMA model is:
[0236]
[0237] Establishing a linear correlation between traffic and bandwidth, latency, and packet loss rate, the regression model takes the following form:
[0238]
[0239] For predicted flow;
[0240] , ,..., For real-time status information;
[0241] , ,..., These are the regression coefficients;
[0242] This is the error term;
[0243] The formula for an LSTM network includes forget gate, input gate, and output gate:
[0244] The forgetting gate determines which information is discarded:
[0245]
[0246] The input gate determines which information is written to the cell state:
[0247]
[0248] The output gate determines what information is output from the cell state:
[0249]
[0250] Cell state: The cell state is updated based on the outputs of the forget gate and the input gate.
[0251]
[0252] The final output value is determined by the output gate:
[0253]
[0254] LSTM networks extract patterns from real-time traffic data through multiple iterations of training, and predict future traffic changes.
[0255] In some network environments, neural networks are used for traffic prediction based on real-time state information. Through adaptive learning, the neural network predicts future traffic based on the input real-time data. The neural network model formula is as follows:
[0256]
[0257] in, For predicted flow;
[0258] This is the input real-time status information;
[0259] and For the network's weights and biases;
[0260] This is the activation function.
[0261] By combining ARIMA, regression models, and LSTM networks, accurate real-time predictions of network traffic can be made, and network resources can be intelligently adjusted based on the prediction results to avoid problems such as overload and congestion. ARIMA and regression models provide traditional time series analysis and statistical methods, while LSTM networks can capture more complex time series patterns, especially when there is a large amount of historical data, providing more accurate predictions. By considering real-time status information from multiple dimensions such as bandwidth, latency, and packet loss rate, regression models can more comprehensively reflect traffic change trends, providing data support for optimizing traffic management. LSTM networks extract patterns from data through adaptive learning, and can dynamically adjust prediction strategies when the network environment changes, thereby improving the accuracy of network traffic prediction. This solution can automatically adjust network resource configuration during peak traffic periods, ensuring bandwidth priority for important applications and improving overall network performance and user experience.
[0262] Based on the prediction results and application requirements, the flow control parameters are dynamically adjusted, and flow control strategies are adopted, including but not limited to token bucket, leaky bucket, or adaptive control strategies.
[0263] Token Bucket Algorithm Calculation Formula:
[0264] Token generation rate: Tokens per second;
[0265] Bucket capacity: Token;
[0266] Current token count: ;
[0267] Requested bandwidth size:
[0268] When a data packet arrives, the algorithm retrieves a token from the bucket. If there are enough tokens in the bucket, the data packet will be transmitted; otherwise, it will be discarded or delayed. The formula is as follows:
[0269]
[0270] If there is a traffic request:
[0271]
[0272] otherwise:
[0273]
[0274] Leaky bucket algorithm calculation formula:
[0275] Bucket capacity: ;
[0276] rate: ;
[0277] Number of packets in the current bucket: ;
[0278] Number of data packets received: ;
[0279] The bucket is updated whenever a data packet arrives:
[0280]
[0281] Output flow:
[0282]
[0283] When the bucket is full, newly arriving data packets will be discarded.
[0284]
[0285] The adaptive flow control strategy dynamically adjusts flow control parameters based on the real-time network status. The flow control system obtains real-time network bandwidth predictions and latency estimates, and adjusts the parameters in the following manner:
[0286] Adjust the token generation rate based on the predicted bandwidth:
[0287]
[0288] in, This is the bandwidth prediction value. Maximum token generation rate;
[0289] Adjust the output rate of the leaky bucket based on the packet loss rate:
[0290]
[0291] in, Based on the output rate, The current packet loss rate;
[0292] Traffic transmission based on delay adjustment:
[0293]
[0294] in, To delay prediction, It is a function that adaptively adjusts the output flow rate based on delay and control parameters;
[0295] The classic feedback control strategy is used to adjust the flow control parameters. The PID controller adjusts the control quantity through three parts: proportional, integral, and derivative. The PID control formula is as follows:
[0296]
[0297] in, For error;
[0298] , , These are the adjustment coefficients for proportional, integral, and derivative equations;
[0299] PID control is used to dynamically adjust flow control parameters.
[0300] Adaptive flow control strategies enable the system to automatically adjust flow control parameters in real time based on network conditions, thereby achieving optimal network traffic management. Token bucket and leaky bucket algorithms effectively smooth traffic, preventing network congestion caused by sudden traffic spikes, while ensuring the flexibility and stability of flow control. Combining bandwidth prediction, packet loss rate, and latency prediction, flow control parameters can be precisely adjusted to ensure network load balancing and optimize resource utilization. Through PID control, the system can adaptively adjust flow control parameters based on real-time traffic data and changes in the network environment, maintaining network efficiency and stability. Precise flow control avoids network overload and latency issues, improving overall network performance and user experience.
[0301] To handle bursts of traffic, a priority scheduling algorithm is used to ensure that data packets with high real-time requirements are transmitted first.
[0302] Set up multiple queues, each with a different priority:
[0303] , ,..., The data packet queues are of different priorities, among which As the highest priority, Lowest priority;
[0304] Data packets in each queue are arranged in the order of arrival;
[0305] If queue If there are data packets, then from Transmit data packets in the middle;
[0306] like If empty, then from Data packets are transmitted in the middle, and so on;
[0307] Formula expression:
[0308]
[0309] in, ,and It has the highest priority;
[0310] Multiple data packets are configured, with each data packet requiring a processing time of [time value missing]. ;
[0311] The priority of each data packet is based on its processing time. It is determined that data packets with shorter processing times will be transmitted first.
[0312] Scheduling rules:
[0313] Transmit using data packets with the shortest processing time;
[0314] Formula expression:
[0315]
[0316] Data packets are selected according to priority:
[0317]
[0318] Weighted fair queuing calculation formula:
[0319] Let each stream The weight is The data packet transmission rate is ;
[0320] For each stream Each has its corresponding weighted rate, and the priority is determined by the weight.
[0321] Weighted fair scheduling formula:
[0322] The weighted rate for each stream is:
[0323]
[0324] in, The total transmission rate of the system, For flow The weights;
[0325] Processing time per data packet:
[0326]
[0327] in, For the size of the data packet, The weighted rate of the flow;
[0328] The scheduling rules ensure that high-priority real-time data packets are transmitted first, and the flow weights are used. Adjustments are made based on the real-time requirements of the stream;
[0329] EDF scheduling algorithm calculation formula:
[0330] Each task The deadline is ;
[0331] Current time is The remaining time for the task is ;
[0332] The task with the earliest deadline is transmitted first, according to the formula:
[0333]
[0334] Task In The earliest due date will be executed first.
[0335] The scheduling rules prioritize tasks according to their earliest deadlines, expressed by the following formula:
[0336]
[0337] By combining time-slice round-robin and priority scheduling, data packets with high real-time requirements are given priority and allocated more time slices;
[0338] Time slice rotation calculation formula:
[0339] The priority of each data packet is Packets with high real-time requirements are scheduled first;
[0340] The time slice for each packet is Packets with higher priority are allocated more time slices;
[0341] The scheduling rules are ordered according to priority, and the time slice for each data packet is determined by its priority:
[0342]
[0343] High-priority packets receive more resources during time-slice rotation.
[0344] Priority scheduling algorithms ensure that data packets with high real-time requirements are transmitted first, preventing low-priority packets from consuming bandwidth and affecting the execution of high-priority tasks. Weighted fair queuing algorithms guarantee that bandwidth resources are allocated fairly according to the weights of different flows, while meeting the real-time requirements of the flows. Combining time-slice round-robin and priority scheduling ensures the rational allocation of system resources, guaranteeing not only real-time performance but also improving resource utilization efficiency. By dynamically adjusting transmission priorities and resource allocation, this scheme can effectively cope with sudden traffic surges, avoiding network congestion and data packet loss. Through EDF scheduling algorithms and the shortest processing time priority rule, the most urgent tasks are transmitted first, reducing data packet latency and optimizing system response time.
[0345] Real-time monitoring of network status changes, periodic optimization and adjustment of control strategies, and rapid response to network congestion or bandwidth fluctuations are employed. The method for adjusting the transmission rate is as follows:
[0346] TCP congestion control employs four mechanisms—slow start, congestion avoidance, fast retransmission, and fast recovery—to adjust the sending rate and respond in real time to changes in network status.
[0347] The initial sending window size is set to or ;
[0348] When no packet loss occurs within a round-trip time, cwnd grows exponentially:
[0349]
[0350] Once packet loss is detected or the threshold is reached, the congestion avoidance phase begins, at which point the growth of congestion limit (cwnd) becomes linear.
[0351]
[0352] If packet loss occurs, the congestion control phase begins:
[0353]
[0354] At the same time, TCP will set a threshold Set as And return to the slow start phase;
[0355] If network bandwidth fluctuates, TCP adjusts its concurrency limit (cwnd) and sending rate based on network latency and packet loss rate. The dynamic adjustment formula based on latency or bandwidth feedback is as follows:
[0356]
[0357] Where RTT stands for round-trip time;
[0358] Bandwidth adaptive algorithms dynamically adjust the transmission rate based on real-time measured bandwidth changes. Bandwidth adaptive algorithms include TCP Vegas and TCP Cubic, which optimize network traffic by dynamically monitoring bandwidth and latency.
[0359] Based on real-time measured network bandwidth, transmission rate Adjust using the following formula:
[0360]
[0361] in, For a moment Available bandwidth, This refers to the network latency at that moment;
[0362] A bandwidth prediction algorithm is used to predict future bandwidth fluctuations and adjust the rate when fluctuations occur.
[0363]
[0364] Where, is the adjustment factor. For a moment Bandwidth estimation;
[0365] TCP Vegas is an improved TCP congestion control algorithm that adjusts the sending rate. Vegas controls the sending rate by calculating the difference between the expected delay and the actual delay.
[0366]
[0367] Where cwnd is the congestion window and RTT_expected is the expected round-trip time estimated based on historical network latency;
[0368] Vegas reduces the window size and thus the sending rate when the actual RTT exceeds the expected RTT.
[0369]
[0370] If RTT_{actual} is less than the expected value, the sending rate increases;
[0371] AQM takes proactive measures before network congestion occurs, such as dropping some packets or marking packets to notify the source to adjust the sending rate.
[0372] The RED algorithm dynamically calculates the packet loss probability based on the queue length. :
[0373]
[0374] in, This is the current queue length. The threshold of the queue, To adjust the parameters;
[0375] When network congestion occurs, network devices notify the source end to adjust the rate by marking data packets with ECN:
[0376]
[0377] Among them, the ECN feedback prompts the source to reduce the sending rate.
[0378] This solution dynamically adjusts the transmission rate by monitoring key parameters such as network latency, packet loss rate, and bandwidth in real time, responding promptly to changes in network status and avoiding network congestion. Through mechanisms like slow start, congestion avoidance, and the RED algorithm, the system can identify and take measures in advance when network congestion is imminent, preventing it and improving network stability. Using bandwidth adaptive algorithms (such as TCP Vegas and Cubic), the system automatically adjusts the transmission rate based on bandwidth changes, maximizing the use of available bandwidth and improving data transmission efficiency. Bandwidth prediction algorithms can predict future bandwidth fluctuations and adjust the rate when fluctuations occur, ensuring smooth network transmission and reducing the impact of bandwidth fluctuations. Through proactive queue management and ECN mechanisms, the network can proactively drop or mark packets before congestion occurs, notifying the source end in advance to adjust the rate, improving network reliability and performance. By adjusting the transmission rate in real time, congestion is avoided, reducing packet loss and retransmissions caused by congestion, lowering latency, and improving network response speed.
[0379] A packet flow control system includes:
[0380] The real-time network status monitoring module is used to obtain information on bandwidth, latency, packet loss rate, and traffic distribution in the network in real time.
[0381] The intelligent analysis module is used to analyze and predict real-time network conditions using reinforcement learning algorithms, and generate predictive models for network traffic.
[0382] The adaptive traffic adjustment module is used to dynamically adjust the network traffic control strategy based on the output results of the intelligent analysis module.
[0383] The priority scheduling module is used to prioritize data streams with high real-time requirements based on the needs of the application layer.
[0384] The control strategy feedback module adjusts the traffic control strategy based on real-time network status monitoring to ensure continuous system optimization and self-adaptation.
[0385] Through reinforcement learning-based intelligent analysis modules and feedback mechanisms, the system can adaptively adjust traffic control strategies and dynamically optimize performance based on real-time network status monitoring. The system can predict network traffic changes in advance and adjust the transmission rate in real time, reducing network congestion, latency, and packet loss, thus improving network transmission efficiency. The priority scheduling module ensures that applications with high real-time requirements are protected, guaranteeing an unaffected user experience. The combination of real-time feedback mechanisms and intelligent analysis enables the system to continuously optimize under various network environments, improving its long-term stability and performance. Facing complex and ever-changing network environments, this solution can flexibly adjust to ensure that various types of application traffic receive appropriate bandwidth and priority under different network conditions.
[0386] This embodiment also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements a data packet flow control method and its control system as described above.
[0387] This embodiment also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements a data packet flow control method and control system as described above.
[0388] The specific algorithms of the intelligent analysis module include parameter tuning of the reinforcement learning model, selection of training data, and real-time model update process;
[0389] Based on the application type and real-time requirements of the data packets, the data packets are divided into multiple priority levels, including high-priority data packets, medium-priority data packets, and low-priority data packets;
[0390] The system dynamically adjusts data packet priorities based on real-time network monitoring. When network congestion or insufficient bandwidth occurs, high-priority data packets are prioritized for transmission. Specific priority adjustment rules include bandwidth allocation priority, latency sensitivity adjustment, and network load monitoring.
[0391] During the scheduling process, a queue-based scheduling algorithm is adopted. The system puts data packets of different priorities into different queues. The scheduling order of data packets follows the priority queue processing, round-robin scheduling mechanism, and weighted fair queuing rules.
[0392] Whenever the network status changes, the scheduling system adjusts the priority strategy in real time based on the feedback information.
[0393] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0394] Those skilled in the art will understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the system can be divided into different functional units or modules to complete all or part of the functions described above.
[0395] The above embodiments of the present invention are not intended to limit the scope of protection of the present invention. The implementation of the present invention is not limited thereto. All other modifications, substitutions or alterations made to the above structure of the present invention based on the above content of the present invention, in accordance with ordinary technical knowledge and common practice in the field, without departing from the basic technical idea of the present invention, shall fall within the scope of protection of the present invention.
Claims
1. A data packet flow control method, characterized in that, This includes: acquiring real-time network status information, including bandwidth, latency, packet loss rate, and traffic distribution; analyzing and predicting future traffic trends using intelligent algorithms based on real-time status information; dynamically adjusting traffic control parameters and employing traffic control strategies, including but not limited to token bucket, leaky bucket, or adaptive control strategies, based on prediction results and application requirements; using priority scheduling algorithms to ensure that data packets with high real-time requirements are transmitted first for burst traffic; monitoring changes in network status in real time, periodically optimizing and adjusting control strategies, and responding quickly to network congestion or bandwidth fluctuations by adjusting the transmission rate.
2. The data packet flow control method according to claim 1, characterized in that, The method for obtaining real-time network status information, including bandwidth, latency, packet loss rate, and traffic distribution, is as follows: Bandwidth is the network's maximum transmission rate, estimated by measuring the total amount of data passing through the network within a certain time period. The calculation formula is: in, The amount of data transmitted per unit of time; The time spent on transmission; latency is the time required for data to travel from the source to the destination. Network latency is divided into several parts, including propagation latency and queuing latency. The calculation formula is: RTT is the time it takes for a data packet to travel from the source to the destination and back; the contribution of each link in the network to the delay is estimated by measuring each link individually; the propagation delay is determined by the speed at which the signal travels in the medium, as shown in the formula: Processing latency is the delay caused by the device processing data packets; packet loss rate is the proportion of data packets lost during transmission, calculated using the following formula: The number of lost data packets refers to packets that were not successfully received during transmission; the total number of data packets sent is the total number of data packets that were attempted to be sent; traffic distribution describes the proportion of different types of traffic in the network, used to analyze the proportion of different traffic types in the total network traffic, and is calculated using the following formula: A specific type of traffic refers to the data traffic generated by a particular type of application or service on the network; total traffic is the sum of all data traffic on the network.
3. The data packet flow control method according to claim 2, characterized in that, Based on real-time status information, the method of using intelligent algorithms to analyze and predict future traffic trends is as follows: The ARIMA model includes autoregressive, differencing, and moving average components: Autoregressive component: in, This represents the current value of the time series. , ,..., The coefficients of the model, White noise; moving average portion: in, , ,..., These are the coefficients of the model; non-stationarity is eliminated by differencing the time series. The synthesis formula for the ARIMA model is: Establishing a linear correlation between traffic and bandwidth, latency, and packet loss rate, the regression model takes the following form: For predicted flow; , ,..., For real-time status information; , ,..., These are the regression coefficients; The error term; the LSTM network formula includes forget gate, input gate, and output gate: the forget gate determines which information is discarded: The input gate determines which information is written to the cell state: The output gate determines what information is output from the cell state: Cell state: The cell state is updated based on the outputs of the forget gate and the input gate. The final output value is determined by the output gate: LSTM networks extract patterns from real-time traffic data through multiple iterations of training to predict future traffic changes. In some network environments, neural networks are used for traffic prediction based on real-time state information. Through adaptive learning, the neural network predicts future traffic based on the input real-time data. The neural network model formula is as follows: in, For predicted flow; This is the input real-time status information; and For the network's weights and biases; This is the activation function.
4. The data packet flow control method according to claim 3, characterized in that, Based on the prediction results and application requirements, the flow control parameters are dynamically adjusted, and flow control strategies are adopted, including but not limited to token bucket, leaky bucket, or adaptive control strategies. The token bucket algorithm calculation formula is as follows: Token generation rate: Tokens / second; Bucket capacity: Token; Current token count: Requested bandwidth size: When a data packet arrives, the algorithm retrieves a token from the bucket. If there are enough tokens in the bucket, the data packet will be transmitted; otherwise, it will be discarded or delayed. The formula is as follows: If there is a traffic request: otherwise: Leaky Bucket Algorithm Formula: Bucket Capacity: ;rate: Number of packets in the current bucket: Number of data packets received: The bucket is updated whenever a data packet arrives: Output flow: When the bucket is full, newly arriving data packets will be discarded. The adaptive flow control strategy dynamically adjusts flow control parameters based on the real-time network status. The flow control system obtains real-time network bandwidth predictions and latency estimates, and adjusts parameters as follows: The token generation rate is adjusted based on the predicted bandwidth. in, This is the bandwidth prediction value. Maximum token generation rate; adjust the leaky bucket output rate based on packet loss rate: in, Based on the output rate, Given the current packet loss rate; adjust traffic transmission based on latency: in, To delay prediction, This is a function that adaptively adjusts the output flow rate based on delay and control parameters; it uses a classic feedback control strategy to regulate the flow control parameters. The PID controller adjusts the control quantity through three parts: proportional, integral, and derivative. The PID control formula is: in, For error; , , These are the adjustment coefficients for proportional, integral, and derivative functions; the flow control parameters are dynamically adjusted through PID control.
5. The data packet flow control method according to claim 4, characterized in that, To handle bursts of traffic, a priority scheduling algorithm is used to ensure that data packets with high real-time requirements are transmitted first. This is achieved by establishing multiple queues, each with a different priority level. , ,..., The data packet queues are of different priorities, among which As the highest priority, The lowest priority; data packets in each queue are queued sequentially according to their arrival order; if the queue If there are data packets, then from Transmit data packets in the middle; like If empty, then from Data packets are transmitted in the middle, and so on; the formula is expressed as: in, ,and The highest priority is given to the first data packet; multiple data packets are configured, with each data packet having a processing time of [time value missing]. The priority of each data packet is based on its processing time. It is determined that data packets with shorter processing times are transmitted first; scheduling rule: data packets with the shortest processing time are transmitted; formula expression: Data packets are selected according to priority: Weighted fair queuing algorithm formula: Let each flow The weight is The data packet transmission rate is For each stream Each flow has a corresponding weighted rate, and the priority is determined by the weight; the weighted fair scheduling formula is: the weighted rate of each flow is: in, The total transmission rate of the system, For flow Weights; Processing time for each data packet: in, For the size of the data packet, The weighted rate of the stream; the scheduling rule ensures that high-priority real-time data packets are transmitted first, and the weight of the stream is used for this purpose. Adjustments are made based on the real-time requirements of the stream; EDF scheduling algorithm calculation formula: for each task The deadline is The current time is The remaining time for the task is The task with the earliest deadline is transmitted first, according to the following formula: Task In The task with the earliest due date is executed first; the scheduling rule arranges tasks according to the order of the earliest deadline, expressed by the formula: Combining time-slice round-robin and priority scheduling, data packets with high real-time requirements are given priority and allocated more time slices; the time-slice round-robin calculation formula is: the priority of each data packet is... Packets with high real-time requirements are scheduled first; the time slice for each packet is... Packets with higher priority are allocated more time slices; the scheduling rules are based on priority, and the time slice allocated to each data packet is determined by its priority. High-priority packets receive more resources during time-slice rotation.
6. The data packet flow control method according to claim 5, characterized in that, The system monitors network status changes in real time, periodically optimizes and adjusts control strategies, and responds quickly to network congestion or bandwidth fluctuations. The method for adjusting the sending rate is as follows: TCP congestion control employs four mechanisms to adjust the sending rate: slow start, congestion avoidance, fast retransmission, and fast recovery, responding to changes in network status in real time; the initial sending window size is set to... or When no packet loss occurs within a round-trip time, cwnd grows exponentially. Once packet loss is detected or the threshold is reached, the congestion avoidance phase begins, at which point the growth of congestion limit (cwnd) becomes linear. If packet loss occurs, the congestion control phase begins: At the same time, TCP will set a threshold Set as Then, it returns to the slow start phase; if network bandwidth fluctuates, TCP adjusts its cwnd and sending rate based on network latency and packet loss rate. The dynamic adjustment formula based on latency or bandwidth feedback is as follows: RTT stands for Round Trip Time. Bandwidth adaptive algorithms dynamically adjust the transmission rate based on real-time measured bandwidth changes. These algorithms include TCP Vegas and TCP Cubic, which optimize network traffic by dynamically monitoring bandwidth and latency. The transmission rate is based on real-time measured network bandwidth. Adjust using the following formula: in, For a moment Available bandwidth, The network latency at that moment is used; a bandwidth prediction algorithm is employed to predict future bandwidth fluctuations, and the rate is adjusted when fluctuations occur. Where, is the adjustment factor. For a moment Bandwidth estimation; TCP Vegas is an improved TCP congestion control algorithm that adjusts the sending rate by calculating the difference between the expected and actual latency. Where cwnd is the congestion window, and RTT_expected is the expected round-trip time estimated based on historical network latency; Vegas reduces the window size when the actual RTT exceeds the expected RTT, thereby reducing the transmission rate. If RTT_{actual} is less than the expected value, the sending rate increases; AQM takes proactive measures before network congestion occurs, such as dropping some packets or marking packets to notify the source to adjust the sending rate; the RED algorithm dynamically calculates the packet loss probability based on the queue length. : in, This is the current queue length. The threshold of the queue, To adjust parameters; when network congestion occurs, network devices notify the source end to adjust the rate by marking data packets with ECN: Among them, the ECN feedback prompts the source to reduce the sending rate.
7. A data packet flow control system, characterized in that, It includes: a real-time network status monitoring module, used to acquire bandwidth, latency, packet loss rate, and traffic distribution information in the network in real time; an intelligent analysis module, used to analyze and predict the real-time network status through reinforcement learning algorithms and generate a predictive model of network traffic; and an adaptive traffic adjustment module, used to dynamically adjust the network traffic control strategy based on the output results of the intelligent analysis module. The priority scheduling module is used to prioritize data streams with high real-time requirements based on the needs of the application layer. The control strategy feedback module adjusts the traffic control strategy based on real-time network status monitoring to ensure continuous system optimization and self-adaptation.
8. An electronic device, characterized in that, The device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, it implements a packet flow control method as described in any one of claims 1-6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by the processor, the program implements a packet flow control method as described in any one of claims 1-6.