Dynamic bandwidth allocation method and device and medium
By obtaining the device access time decay factor, delay sensitivity factor and predicted traffic, dynamically adjusting the bandwidth weight, the dynamic adaptability and fairness of network bandwidth allocation in the prior art are solved, and efficient resource utilization and service response are achieved.
Patent Information
- Application Number
- CN202510614763.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-13
- Publication Date
- 2025-07-25
AI Technical Summary
The existing network bandwidth allocation methods cannot dynamically adapt to new access devices or scene changes, resulting in high-time services being unable to obtain resources in a timely manner, lack of mixed scenario recognition capabilities, poor traffic prediction accuracy and real-time performance, and differences in device access time lead to unfair resource allocation and low resource utilization.
By obtaining the device access time attenuation factor, delay sensitivity factor, message feature factor and predicted traffic, a dynamic bandwidth allocation method is adopted, combined with long and short-term memory network to predict burst traffic, dynamically adjust bandwidth weights, realize multi-dimensional dynamic priority fusion, accurately identify composite business needs, and optimize resource allocation.
It realizes dynamic scenario adaptability, improves the accuracy of hybrid scenario recognition, optimizes burst traffic processing capabilities, ensures fairness in equipment access, improves resource utilization, ensures high-priority services to quickly obtain resources, and increases bandwidth utilization to 85-90%.
Smart Images

Figure CN120378382A_ABST
Abstract
Description
Technical Field
[0001] This application relates at least to the field of network technologies, and particularly to a dynamic bandwidth allocation method, apparatus, and medium. Background Art
[0002] In the existing network bandwidth allocation method, bandwidth is allocated to devices using static priorities. After analysis by this application, the following disadvantages exist: There is no differential consideration for the bandwidth allocation of newly connected devices, there is no distinction for the different requirements of the same device running different services, and the traffic changes of the same device running the same service at different times are not considered. These may all lead to inaccurate network bandwidth allocation for devices. Summary of the Invention
[0003] In view of the above deficiencies, this application provides a dynamic bandwidth allocation method, apparatus, and medium to solve the following technical problem: How to dynamically allocate bandwidth to devices.
[0004] In a first aspect, this application provides a dynamic bandwidth allocation method, and the method includes:
[0005] Obtain a device access duration attenuation factor that decays to a first value as the device accesses the network for a certain duration;
[0006] Obtain the current delay sensitivity factor and packet feature factor of the device according to the service currently run by the device;
[0007] Obtain the predicted traffic of the device within a first preset duration from the current to the future according to the service currently run by the device;
[0008] Allocate the current network bandwidth for the device according to the device access duration attenuation factor, delay sensitivity factor, packet feature factor, and predicted traffic.
[0009] Further, obtaining a device access duration attenuation factor that decays to a first value as the device accesses the network for a certain duration specifically includes:
[0010] Obtain the device access duration attenuation factor that decays to a first value as the device accesses the network for a certain duration according to the following formula:
[0011]
[0012] where α is the initial access weight of the device accessing the network, β is the decay rate constant, t is the current time, t0 is the initial time when the device accesses the network, and the time unit is minutes, It approaches the first value 0.3 when (t - t0) = 30 minutes.
[0013] Further, obtaining the current delay sensitivity factor and packet feature factor of the device according to the service currently run by the device specifically includes:
[0014] Obtain the current delay sensitivity factor DSF of the device according to the current measured delay of the service currently running on the device and its maximum tolerable delay.
[0015] Obtain the current packet characteristic factor PSD of the device according to the packet length distribution of the packets of the service currently running on the device for sending and receiving.
[0016] Further, obtain the current delay sensitivity factor DSF of the device according to the current measured delay of the service currently running on the device and its maximum tolerable delay, specifically including:
[0017] Obtain the current delay sensitivity factor of the device according to the following formula:
[0018]
[0019] where D AT = Rx - Tx is the current measured delay of the main service currently running on the device, Rx and Tx are the reception time and transmission time of sending and receiving probe packets between the device and the server of the main service respectively, D MAX = μ + 2σ is the maximum tolerable delay of the main service, μ and σ are the mean and variance of the Gaussian distribution constructed according to the historical delay data of the main service respectively.
[0020] Further, obtain the current packet characteristic factor PSD of the device according to the packet length distribution of the packets of the service currently running on the device for sending and receiving, specifically including:
[0021] Obtain the current packet characteristic factor of the device according to the following formula:
[0022]
[0023] where i represents the i-th preset packet length interval, n is the number of preset packet length intervals, W i is the weight of each preset packet length interval, and the weight of the interval with a small packet length is greater than the weight of the interval with a large packet length, P i is the proportion of the packets of all the services currently running on the device for sending and receiving within the current and previous second preset duration that are located in each packet length interval.
[0024] Further, obtain the predicted traffic of the device within the first preset duration from the current to the future according to the service currently running on the device, specifically including:
[0025] Parse the packets sent and received by the device within the second preset duration, including parsing software identification, server name indication SNI, application layer protocol negotiation ALPN field, and encryption handshake characteristics in the packets to identify several services currently running on the device;
[0026] Identify the primary service among several services, and the identification order of the primary service is game or real-time control service > live broadcast or video conferencing service > upload or download service;
[0027] Use the long short-term memory network LSTM to obtain the predicted traffic LSTM of the primary service within the first preset duration from the current to the future according to the historical traffic data of the primary service pred 。
[0028] Furthermore, allocate the current network bandwidth for the device according to the device access duration attenuation factor, delay sensitivity factor, packet feature factor, and predicted traffic, specifically including:
[0029] Obtain the bandwidth allocation weight of the device according to the following formula: Priority = a·T weight +b·DSF + c·PSD + d·LSTM pred ;
[0030] Obtain the conventional total bandwidth of the home network where the device is located, and allocate the current network bandwidth for the device in the conventional total bandwidth of the home network according to the level of Priority.
[0031] Furthermore, after allocating the current network bandwidth for the device in the conventional total bandwidth of the home network according to the level of Priority, the method further includes:
[0032] When the actual required traffic of the primary service exceeds the predicted traffic LSTM pred by a proportion greater than the preset ratio threshold, call the reserved bandwidth of the home network where the device is located to expand the current network bandwidth of the device;
[0033] Obtain the optical power jitter of the optical module of the home network where the device is located within the second preset duration, and dynamically set the amount of reserved bandwidth in the total bandwidth of the home network according to the magnitude of the optical power jitter.
[0034] In a second aspect, the present application provides a dynamic bandwidth allocation device, and the device includes:
[0035] A duration module for obtaining the device access duration attenuation factor that decays to a first value with the duration of the device accessing the network;
[0036] A dual-factor module for obtaining the current delay sensitivity factor and packet feature factor of the device according to the service currently running on the device;
[0037] A prediction module for obtaining the predicted traffic of the device within the first preset duration from the current to the future according to the service currently running on the device;
[0038] The allocation module, connected to the duration module, the two-factor module, and the prediction module, is used to allocate the current network bandwidth for the device according to the device access duration attenuation factor, the delay sensitivity factor, the packet feature factor, and the predicted traffic.
[0039] In a third aspect, the present application provides a computer-readable storage medium in which a computer program is stored. When the computer program is run by a processor, the dynamic bandwidth allocation method described above is implemented.
[0040] The present application provides a dynamic bandwidth allocation method, apparatus, and medium. By obtaining the device access duration attenuation factor, the delay sensitivity factor, the packet feature factor, and the predicted traffic as the basis for dynamically allocating bandwidth for the device, dynamic optimization of bandwidth allocation is achieved. Specifically, the device access duration attenuation factor can strive for a reasonable initial bandwidth for a newly connected device. The delay sensitivity factor and the packet feature factor can distinguish the scenario classification of the device's currently running services, and reasonably allocate bandwidth for each device according to the scenario classification when multiple devices are used concurrently. The predicted traffic can strive for bandwidth in advance for the possible burst traffic that may arrive for the services currently running on the device. Description of the Drawings
[0041] Figure 1 is a flowchart of a dynamic bandwidth allocation method according to an embodiment of the present application;
[0042] Figure 2 is a schematic structural diagram of a dynamic bandwidth allocation apparatus according to an embodiment of the present application;
[0043] Figure 3 is a flowchart of another dynamic bandwidth allocation method according to an embodiment of the present application. Detailed Embodiments
[0044] To enable those skilled in the art to better understand the technical solutions of the present application, the embodiments of the present application will be further described in detail below with reference to the drawings.
[0045] It can be understood that the specific embodiments and drawings described herein are only for explaining the present application, rather than limiting the present application.
[0046] It can be understood that, without conflict, the various embodiments in the present application and the various features in the embodiments can be combined with each other.
[0047] It can be understood that, for the convenience of description, only the parts related to the present application are shown in the drawings of the present application, and the parts unrelated to the present application are not shown in the drawings.
[0048] It can be understood that each module and unit involved in the embodiments of the present application may correspond to only one entity structure, or may be composed of multiple entity structures. Alternatively, multiple modules and units may also be integrated into one entity structure.
[0049] It can be understood that, without conflict, the functions and steps marked in the flowcharts and block diagrams of the present application may occur in an order different from that marked in the accompanying drawings.
[0050] It can be understood that in the flowcharts and block diagrams of the present application, the possible architectures, functions, and operations of the systems, devices, equipment, and methods according to the embodiments of the present application are shown. Among them, each block in the flowchart or block diagram may represent a module, unit, program segment, or code, which contains executable instructions for implementing the specified function. Moreover, each block or combination of blocks in the block diagram and flowchart may be implemented by a hardware-based device for implementing the specified function, or may be implemented by a combination of hardware and computer instructions.
[0051] It can be understood that the modules and units involved in the embodiments of the present application may be implemented in software or in hardware. For example, the modules and units may be located in the processor.
[0052] Embodiment 1:
[0053] As Figure 1 shown, the present application provides a dynamic bandwidth allocation method, and the method includes:
[0054] S1. Obtain a device access duration decay factor that decays to a first value as the device accesses the network for a duration;
[0055] S2. Obtain the current delay sensitivity factor and packet characteristic factor of the device according to the service currently running on the device;
[0056] S3. Obtain the predicted traffic of the device within a first preset duration from the current to the future according to the service currently running on the device;
[0057] S4. Allocate the current network bandwidth for the device according to the device access duration decay factor, delay sensitivity factor, packet characteristic factor, and predicted traffic.
[0058] In this embodiment, the method realizes dynamic optimization of bandwidth allocation by obtaining the device access duration attenuation factor, the delay sensitivity factor, the packet feature factor, and the predicted traffic as the basis for dynamically allocating bandwidth to the device. Specifically, the device access duration attenuation factor can strive for a reasonable initial bandwidth for a newly connected device to the network. The delay sensitivity factor and the packet feature factor can distinguish the scenario classification of the services currently running on the device. When multiple devices are used concurrently, the bandwidth can be reasonably allocated to each device according to the scenario classification. The predicted traffic can strive for bandwidth in advance for the burst traffic that may arrive for the services currently running on the device. As Figure 1 The method shown is correspondingly applied to the device shown in Figure 2 Figure.
[0059] More specifically, this embodiment provides a dynamic bandwidth allocation method that integrates device access time, real-time scenario applications, and traffic peaks, and realizes the optimal scheduling of network resources through a big data-driven adaptive algorithm, which is applicable to home network environments such as FTTH (Fiber To The Home) and FTTR (Fiber To The Room).
[0060] Currently, when multiple devices in the same local area network compete for the bandwidth of the local area network, the specific bandwidth allocated to the device in the total bandwidth of the local area network may be determined by the performance of the device itself or the static priority label of the device set by the user. There is no method for the edge device (such as an optical modem, etc.) to dynamically configure the bandwidth for the device.
[0061] The problems caused by the above current situation include: 1) Inflexible static priority allocation: Using fixed QoS (Quality of Service) tags to divide the bandwidth ratio, it cannot dynamically adapt to new access devices or scenario changes, resulting in high-timeliness services (such as newly accessed emergency video conferences) being unable to obtain resources in a timely manner; 2) Insufficient single-dimensional scenario recognition ability: Only relying on protocol types (such as HTTP (Hypertext Transfer Protocol) / RTP (Real-time Transport Protocol), etc.) to allocate bandwidth, it cannot recognize hybrid scenarios (such as the "screen sharing + voice" composite service in a video conference), resulting in inaccurate resource allocation; 3) Poor traffic prediction accuracy and real-time performance: If the moving average method is used to predict traffic, the response delay to burst traffic is ≥5 minutes, and the peak scenario bandwidth preemption failure rate > 15%; 4) Lack of device fairness (common defect): Not considering the difference in device access time, long-term online devices (such as NAS (Network Attached Storage)) occupy excessive bandwidth, and newly accessed high-priority devices (such as temporary medical monitors) cannot quickly obtain resources; 5) Low resource utilization rate (common defect): To cope with burst traffic, 20% redundant bandwidth needs to be reserved, resulting in an average utilization rate of only 65 - 70%.
[0062] In response to the above current situation, the method provided in this embodiment can achieve the following effects: 1) Solve the dynamic scenario adaptability problem: Implement multi-dimensional dynamic priority fusion based on device access time, real-time scenario type, and traffic prediction, eliminating resource rigidity caused by static allocation; 2) Improve the recognition accuracy of hybrid scenarios: Classify scenarios in real time through two factors, namely packet size distribution (PSD) and delay sensitivity factor (DSF), to accurately identify the composite service requirements; 3) Optimize the burst traffic handling ability: Adopt an LSTM (Long Short-Term Memory) prediction model (error < 5%) combined with a real-time compensation mechanism to compress the burst traffic response delay to the sub-second level (< 200ms); 4) Ensure device access fairness: Introduce an access time decay factor (dynamic decay of exponential function weights) to ensure that newly accessed high-priority devices can quickly obtain resources and avoid long-term device monopolies; 5) Improve resource utilization rate: Through a dynamic bandwidth pool scheduling mechanism, reduce the redundant bandwidth reservation ratio from 20% to 5%, and increase the average utilization rate to 85 - 90%.
[0063] For example, in the home broadband scenario, when multiple devices are used concurrently (such as a child taking classes through video conferencing, parents watching 4K live broadcasts, and NAS continuously backing up data), the system dynamically optimizes the bandwidth in the following ways: 1) Dynamic scenario adaptation: Real-time collection of device access time, current service type (such as video conferencing DSF = 0.8) and LSTM to predict future traffic, fusion calculation of priorities. When a burst cloud game is accessed, the bandwidth automatically switches from NAS (with a weight of 0.3) to the game (with a weight of 1.0), and the latency drops from 30 ms to 8 ms; 2) Hybrid scenario recognition: Distinguish the "live broadcast + game" composite service through packet size (PSD = 0.4) and latency sensitivity (DSF = 0.9) to avoid misjudgment by traditional protocol tags; 3) Burst traffic response: LSTM predicts the live broadcast bullet screen peak 10 seconds in advance, calls 5% of the emergency bandwidth pool resources, and completes the flow table adjustment within 200 ms. The stuttering rate drops from 15% to 1%; 4) Fair access guarantee: The newly accessed medical monitor preempts the NAS bandwidth through an exponentially decaying weight (initial 1.5).
[0064] As Figure 3 shown, the working principle of the method is: Through real-time traffic analysis (DPI (deep packet inspection) engine extracts PSD packet characteristics and DSF latency sensitivity), AI (Artificial Intelligence) prediction (LSTM model predicts future 5-minute traffic trends), and dynamic priority scheduling (combines device access time, service scenario, and prediction results to calculate weights), finally, the SDN (Software Defined Network) controller performs precise bandwidth allocation to achieve intelligent resource optimization when multiple services are concurrent in the home network, ensuring that high-priority services (such as games, video conferencing) obtain low-latency guarantee, while increasing the overall bandwidth utilization rate to more than 89%.
[0065] In one embodiment, S1, obtaining a device access duration attenuation factor that decays to a first value as the device accesses the network for a certain duration, specifically includes:
[0066] Obtaining the device access duration attenuation factor that decays to a first value as the device accesses the network for a certain duration according to the following formula:
[0067]
[0068] where α is the initial access weight of the device accessing the network, β is the decay rate constant, t is the current time, t0 is the initial time when the device accesses the network, and the time unit is minutes, and it approaches the first value of 0.3 when (t - t0) = 30 minutes.
[0069] In this embodiment, an access time decay factor is introduced, which is a mathematical mechanism for dynamically adjusting the device bandwidth weight. Through an exponential function model, the initial weight of newly accessed devices is relatively high and gradually decays to the baseline value over time. Its core objectives are as follows: 1) Give priority to ensuring new devices: Dynamically adjust the device bandwidth weight through an exponential function to solve the problem that long-term online devices (such as NAS) occupy too much bandwidth, and ensure that newly accessed high-priority devices (such as medical monitors, cloud game terminals) can quickly obtain resources; 2) Avoid resource monopoly: Restrict long-term online devices (such as NAS, smart home hubs) from continuously occupying bandwidth and improve network fairness. The exponential calculation formula for the access time decay factor is: where t0 is the device access time (unit: minute); α is the initial weight coefficient (default 1.5, indicating that the initial weight of the new device is increased by 50%); β is the decay rate (default 0.05, controlling the weight decline speed); t is the current time (unit: minute). For example, The initial weight is increased by 50% (i.e., T Weight = 1.5) to give priority to ensuring that newly accessed high-priority devices (such as medical monitors, cloud game terminals) can quickly obtain bandwidth resources; New devices usually correspond to bursty and highly time-sensitive services (such as video conferencing, emergency data transmission), which require immediate response to avoid latency affecting the user experience; By increasing the initial weight, new devices can preempt bandwidth in the initial stage of accessing the network and avoid being crowded out by long-term online devices (such as NAS, smart home hubs); Over time, the weight decreases according to the exponential decay function to ensure that long-term devices do not continuously monopolize bandwidth and achieve dynamic fair distribution. Another example is that when a new device accesses, its weight is 1.5 and it is allocated temporary bandwidth of 20 Mbps (total bandwidth of 100 Mbps). After 5 minutes, the weight decays to about 1.2, and the bandwidth allocation ratio gradually decreases. After 30 minutes, the weight decays to about 0.3, which is the same as the weight of long-term devices.
[0070] In one implementation manner, S2. Obtain the current delay sensitivity factor and packet characteristic factor of the device according to the service currently running on the device, specifically including:
[0071] Obtain the current delay sensitivity factor DSF of the device according to the current measured delay and its maximum tolerable delay of the service currently running on the device;
[0072] Obtain the current packet characteristic factor PSD of the device according to the packet length distribution of the packets sent and received by the service currently running on the device.
[0073] In this embodiment, a dual-factor (delay sensitivity DSF + message feature PSD) precise classification scenario function is provided. The core function of the dual-factor is to solve the shortcomings of traditional solutions in hybrid scenario recognition, dynamic resource allocation, and emergency response, and to provide high-precision, low-latency, and high-robustness service quality assurance for home networks. It is the core technical support for high-demand scenarios such as smart homes and cloud games. The dual factor can be used for: 1) dynamic business scenario identification, accurately distinguishing high-priority services, such as cloud games, video conferencing, live broadcasts, file downloads, etc.; 2) decoupling of mixed scenarios, identifying complex services (such as "games + live broadcasts with simultaneous interpretation"), and avoiding misjudgment of traditional single protocol labels; 3) on-demand bandwidth scheduling: allocate more resources to high DSF (delay-sensitive) services to ensure that the delay is less than 10ms; low DSF services (such as downloads) use idle bandwidth; 4) fairness guarantee: combined with the device access time attenuation factor, avoid newly connected high-priority devices from being squeezed out by long-term online devices; 5) burst traffic prediction: analyze the traffic pattern through PSD (packet length distribution), reserve bandwidth pool resources in advance, and reduce congestion risks; 6) cross-layer collaborative control: combined with the physical layer optical power data, distinguish between link quality problems and application layer bursts, and optimize network bandwidth in a targeted manner.
[0074] In one implementation, according to the currently measured delay of the service currently running on the device and its maximum tolerable delay, obtaining the current delay sensitivity factor DSF of the device specifically includes:
[0075] Obtain the current delay sensitivity factor of the device according to the following formula:
[0076]
[0077] Among them, D AT =Rx-Tx is the current measured delay of the main service currently running on the device. Rx and Tx are the receiving time and sending time of the detection message sent and received between the device and the server of the main service, respectively. D MAX =μ+2σ is the maximum tolerable delay of the main service, and μ and σ are the mean and variance of the Gaussian distribution constructed according to the historical delay data of the main service.
[0078] In this embodiment, the Delay Sensitivity Factor (DSF) is used to measure the sensitivity of network services to transmission delay. The higher the DSF value, the more sensitive the service is to delay (such as cloud gaming, video calls, etc.). The implementation method of its quantization and monitoring is as follows: By measuring the end-to-end delay in real time and combining the tolerance threshold of the delay for the service type, the delay sensitivity of the service is quantified, including: 1) Two-way timestamp marking method: Deploy high-precision clock modules at the device end (such as a home gateway) and the server end (such as a cloud gaming platform), support the IEEE 1588 Precision Time Protocol (PTP), and record the transmission timestamp (Tx) and the reception timestamp (Rx) by sending probe messages (such as TWAMP (Two-Way Active Measurement Protocol)), and calculate the end-to-end delay D AT = Rxserver - Txclient, with an accuracy of ±0.1 ms; 2) Historical delay baseline modeling: Parse protocol traffic such as RTP / QUIC (Quick UDP Internet Connections) through a DPI (Deep Packet Inspection) engine, statistically analyze historical delay data to construct a Gaussian distribution model (mean μ, variance σ), and set the maximum tolerable delay D MAX = μ + 2σ (such as 50 ms for games and 300 ms for video conferences). When the measured delay exceeds μ + 2σ, an alarm is triggered; 3) Calculate DSF based on D AT and D MAX There can be various design methods for the formula. The principle is that the larger the measured delay and the smaller the maximum tolerable delay, the larger the DSF value, so as to allocate more bandwidth for the service.
[0079] In an implementation manner, according to the packet length distribution of the packets of the services currently received and sent by the device, the packet feature factor PSD of the device is obtained, which specifically includes:
[0080] Obtain the packet feature factor of the device according to the following formula:
[0081]
[0082] where i represents the i-th preset packet length interval, n is the number of preset packet length intervals, W i is the weight preset for each packet length interval, and the weight of the interval with a small packet length is greater than the weight of the interval with a large packet length, P iIt is the proportion of packets sent and received by all services currently running on the device in each packet length interval within the current and previous second preset duration.
[0083] In this embodiment, the packet signature descriptor (PSD) can form a descriptor to distinguish different service scenarios by analyzing the characteristics of data packets (such as packet length distribution, transmission frequency, protocol type). The PSD value is mainly used to reflect the traffic pattern. For example, small packets with high frequency are generally for games or large packets continuously may be for video services, etc. Therefore, the packet length distribution is used here as a means to quantify the packet characteristics. The proportion of packets in different intervals (such as <64B, 64 - 512B, >512B) is statistically calculated. When the proportion of small packets (such as game instructions) is high, the PSD value is high; when the proportion of large video packets is high, the PSD value is low. The calculation formula can be: Where, W i is the weight of each packet length interval (such as the weight of small packets is 0.7 and the weight of large packets is 0.3), and p i is the proportion of the corresponding interval (such as the proportion of quantity or the proportion of packet length). For example, a high proportion of small packets (<64 bytes) → marked as games or real - time control services; continuous transmission of large packets (>512 bytes) → marked as video streams or file downloads, realizing the distinction between high - frequency short - interval transmission (such as game heartbeat packets) and low - frequency continuous transmission (such as NAS backup), tagging each data stream. For example, for high - latency - sensitive, small - packet high - frequency packet characteristics, mark high priority for subsequent module calls.
[0084] In one embodiment, S3. Obtain the predicted traffic of the device from the current to the future first preset duration according to the services currently running on the device, specifically including:
[0085] Parse the packets sent and received by the device within the second preset duration, including parsing the software identifier, server name indication (SNI), application - layer protocol negotiation (ALPN) field, and encryption handshake characteristics in the packets to identify several services currently running on the device;
[0086] Identify the primary service among several services. The identification order of the primary service is games or real - time control services > live broadcast or video conference services > upload or download services;
[0087] Use the long short - term memory network (LSTM) to obtain the predicted traffic LSTM of the primary service from the current to the future first preset duration according to the historical traffic data of the primary service pred .
[0088] In this embodiment, LSTM is a type of Recurrent Neural Network (RNN). Its core, through the mechanisms of input gate, forget gate, and output gate, can effectively capture long-term dependencies in time series data. This characteristic makes it particularly suitable for the scenario of home network traffic prediction, especially for the identification and response to bursty traffic.
[0089] Two layers of LSTM are selected for the home network scenario to balance model complexity and computational efficiency and adapt to the computing power limitations of edge devices (such as optical network terminals). Each layer has 128 neurons, providing sufficient capacity to cover the temporal characteristics of multi-device concurrent traffic in the home network. The Dropout rate is 0.2 to prevent overfitting and improve the model's generalization ability to traffic fluctuations. When predicting traffic, the first layer of LSTM extracts short-term fluctuations (such as user operation instruction packets), and the second layer captures long-term trends (such as user online duration patterns). The final error is controlled within 5%. For example, LSTM analyzes traffic patterns in units of time windows (such as 30 minutes) based on historical traffic data (such as temporal characteristics like bandwidth usage, traffic peaks, and packet length distributions); predicts the bandwidth demand within the next 5 minutes (error < 5%) to provide a decision basis for dynamic resource allocation; can predict the bursty traffic demand for cloud game screen rendering, the bullet screen peak of live broadcasts / video conferences, or the bandwidth occupancy of multi-person videos to avoid lag. When LSTM predicts that the traffic is about to surge suddenly, it automatically invokes the resources of the emergency bandwidth pool (reserving 5% of the total bandwidth) to avoid instantaneous congestion; adjusts the network configuration (such as SDN flow tables) in advance based on the prediction results, reducing the processing delay of bursty traffic to the sub-second level (< 200ms); dynamically adjusts the redundant bandwidth ratio according to the prediction results (from 20% in the traditional solution to 5%) to avoid resource waste; allocates more resources to high-latency sensitive services (such as games) in combination with the prediction data to ensure their service quality (latency < 10ms).
[0090] The input data of the LSTM can be obtained by combining with the PSD. Based on the deep packet inspection DPI accelerated by DPDK (Data Plane Development Kit), the protocol types (such as HTTP (Hypertext Transfer Protocol) / RTP (Real-time Transport Protocol) / QUIC (Quick UDP Internet Connections) / and encrypted traffic (JA3 fingerprint), etc.) are parsed. Through packet feature extraction, the traffic is then marked and output. The DPI performs in-depth parsing, and matches the payload features through regular expressions (such as the SKYPE identifier of Skype (an instant messaging software) and the SSRC (Synchronous Source) mode of Zoom (a multi-person mobile cloud video conferencing software)); the plaintext traffic can directly parse the service types of unencrypted protocols such as HTTP and FTP (File Transfer Protocol); encrypted traffic analysis: extracts the SNI (Server Name Indication) and ALPN (Application-Layer Protocol Negotiation) fields of TLS (Transport Layer Security) / QUIC traffic, and combines with the JA3 fingerprint library to identify the application type. The above-mentioned packet features can be used simultaneously for: 1) Supporting the calculation of delay sensitivity (DSF): Input the protocol type and packet length distribution provided by the traffic parsing engine, and output the DSF value calculated by combining with the measured delay (for example, game traffic → DSF = 0.9); 2) Assisting traffic prediction (LSTM model): Input the historical traffic features (such as packet length distribution and protocol ratio), and output the predicted bandwidth demand for the next 5 minutes (for example, "The game traffic will increase by 30% at 8 pm"); 3) Obtaining the priority of service scenario classification: The priority of the game category is set to the highest (weight 1.0), the priority of the video conferencing category is the second highest (weight 0.8), and the priority of the download category is the lowest (weight 0.2).
[0091] In one embodiment, S4. According to the device access duration attenuation factor, delay sensitivity factor, packet feature factor, and predicted traffic, allocate the current network bandwidth for the device, specifically including:
[0092] Obtain the bandwidth allocation weight of the device according to the following formula: Priority = a·T weight +b·DSF + c·PSD + d·LSTM pred ;
[0093] Obtain the general total bandwidth of the home network where the device is located, and allocate the current network bandwidth for the device in the general total bandwidth of the home network according to the Priority level.
[0094] In this embodiment, the priority weight formula for the final bandwidth allocation is calculated as: Priority = 0.4·T weight +0.3·DSF + 0.2·PSD + 0.1·LSTM pred , to drive dynamic priority decision-making. This is just a simple demonstration of the design formula and can be further improved in the future. The application effects of the following two scenarios are as follows: Scenario 1: Cloud gaming + live simultaneous transmission, characteristics: high-frequency small packets (game operations) + continuous large packets (live streaming), classification: DSF = 0.9 (game latency 8 ms), PSD = 0.4 (mixed packet length), strategy: allocate 70% of the bandwidth to gaming and 30% to live streaming to ensure that the game latency < 10 ms; Scenario 2: Concurrent operation of multiple devices in the home, characteristics: smart home (low DSF) + video conferencing (medium DSF) + NAS backup (high PSD), classification: dynamic weight allocation, prioritize video conferencing (weight 0.8) and limit the NAS bandwidth (weight 0.3).
[0095] In one implementation, after allocating the current network bandwidth for the device in the general total bandwidth of the home network according to the Priority level, the method further includes:
[0096] When the actual required traffic of the primary service exceeds the predicted traffic LSTM pred by a proportion greater than the preset ratio threshold, call the reserved bandwidth of the home network where the device is located to expand the current network bandwidth of the device;
[0097] Obtain the optical power jitter of the optical module of the home network where the device is located within the second preset duration, and dynamically set the amount of reserved bandwidth in the total bandwidth of the home network according to the magnitude of the optical power jitter.
[0098] In this embodiment, in order to achieve efficient resource utilization, a dynamic redundant bandwidth is set. When the optical power fluctuates rapidly, it is marked as "link unstable", the buffer size is dynamically increased to smooth traffic bursts, and traffic fluctuations are smoothed through dynamic buffer management. For example, when it is detected that the optical power fluctuation > 2 dBm within 10 seconds, the buffer capacity is increased by 50% to reduce jitter. When a live traffic burst occurs, bandwidth is extended for the device where the live service is located from the buffer, and the congestion latency of the live service is reduced from 1.5 ms to 0.3 ms. The actual required traffic of the primary service can be judged according to situations such as service stuttering.
[0099] In addition, an optical power monitoring module can be set on the optical module to collect the received optical power of each slave device in real time (range: -28 dBm to -3 dBm), with an accuracy of ±0.5 dBm. The main functions are as follows: monitoring the network health status to ensure normal fiber optic connection and avoid network interruption caused by abnormal optical power; fault diagnosis to quickly locate problems in the fiber optic link, such as breakpoints or connector failures; assisting in bandwidth allocation. Although dynamic bandwidth allocation is mainly based on DSF, PSD, and traffic prediction, etc., a stable physical layer connection is a prerequisite, and optical power data may be used to ensure transmission quality. When the detected optical power is lower than -28 dBm, there may be attenuation in the fiber optic link (such as bending loss, connector contamination), triggering a maintenance notification or switching to a backup link; when the detected optical power is higher than -3 dBm, the optical receiving module faces an overload risk, automatically reducing the transmitter power or enabling an optical attenuator; if the optical power drops suddenly, the traffic analysis engine preferentially marks critical services (such as video conferencing) and triggers bandwidth preemption to ensure the minimum.
[0100] The architecture implemented by the system corresponding to this embodiment includes: In terms of hardware: an FPGA (Field Programmable Gate Array) is used to implement message parsing and delay calculation, supporting nanosecond-level timestamp marking (Xilinx Ultrascale+ series); in terms of the kernel: lightweight traffic preprocessing is implemented based on eBPF (extended Berkeley Packet Filter, a kernel technology) / XDP (eXpress Data Path, fast data path) to reduce the overhead of user-space to kernel-space switching. The dynamic bandwidth allocation process includes: traffic collection: obtaining raw data through the optical power monitoring module (accuracy ±0.5 dBm) and the DPI engine; feature extraction: parallel computing of DSF (delay sensitivity) and PSD (packet length distribution); scenario classification: inputting the two factors into the classification model and outputting the scenario priority (such as "urgent video conferencing"); bandwidth scheduling: the SDN controller issues a flow table to adjust the port rate limit according to the priority (granularity 1 Mbps). The effects include: a classification accuracy of 93%; the game delay is compressed from 20 ms to <10 ms (a 50% reduction); the resource utilization rate is increased from 65% to 89%, and the redundant bandwidth reservation is reduced by 15%.
[0101] Specific examples are as follows: Record the duration t - t0 (unit: minutes) of the device accessing the network, and dynamically adjust its bandwidth weight through an exponential decay function to ensure that newly connected devices can obtain resources preferentially; Based on the end-to-end delay measurement and the service type tolerance threshold, obtain the delay sensitivity factor DSF, and normalize it to a value between 0 and 1 to reflect the sensitivity of the service to delay; Calculate the PSD value through packet length distribution statistics to quantify the traffic pattern (high proportion of small packets → game type, high proportion of large packets → video type); Based on the 30-minute historical traffic data, predict the device bandwidth requirements for the next 5 minutes, with an error < 5%; Finally, output the dynamic weights of each device for bandwidth allocation. In a home network, a newly connected cloud game terminal (DSF = 0.9) and a long-term online NAS device (PSD = 0.2) are used concurrently. The initial weight of the new device is T weight = 1.5 = (the access time decay factor takes effect), the NAS weight decays to 0.3 with the access time, and the LSTM predicts that the game traffic will increase by 30% in the next 5 minutes, triggering the reservation of the emergency bandwidth pool. The final weight calculation P riority = 0.4·T weight + 0.3·DSF + 0.2·PSD + 0.1·LSTM pred → game priority weight = 1.2, NAS weight = 0.3; The SDN controller adjusts the port rate limit in 1Mbps granularity based on the OpenFlow 1.3 protocol to achieve fine-grained bandwidth allocation. 70% of the bandwidth is allocated to the game (delay < 10ms), 30% is allocated to the NAS (speed limited to 20Mbps), and 5% of the total bandwidth resources are reserved. The reserved bandwidth is marked in real time through the OpenFlow protocol (such as 5% of the total bandwidth) and stored in the flow table; When the actual traffic exceeds the predicted value by 10%, dynamic compensation is triggered, and the reserved resources are called and the Flow-Mod message is sent to adjust the port rate. For example, when the live barrage burst traffic exceeds the predicted value by 15%, the flow table is adjusted through the Flow-Mod message, and the live port rate is increased from 50Mbps to 70Mbps, and the bandwidth expansion is completed within 200ms, and the stuttering rate is reduced from 15% to 1%; The new device accesses the network through 802.1X authentication and is given the initial time weight T weigh = 1.5, the weight T weight is one of the core parameters of the priority formula, and together with DSF (delay sensitivity), PSD (packet characteristics), and the LSTM prediction value, it determines the final bandwidth allocation weight and allocates the temporary bandwidth B INIT = min(100Mbps, 0.2Ctotal), where Ctotal represents the total network bandwidth (such as 500Mbps). The upper limit of the temporary bandwidth allocation is min(100Mbps, 0.2Ctotal), that is, the initial bandwidth of the new device does not exceed 20% of the total bandwidth or 100Mbps (take the smaller value); PSD and DSF can also be calculated as a scenario priority coefficient S firsti , for dynamic priority weight calculation, determining the device bandwidth allocation ratio, e.g., PSD > 0.7 and DSF > 0.5 → game category S i Priority = 1.0, video conferencing S i Priority = 0.8.
[0102] This embodiment provides a method for dynamic bandwidth allocation in a home network. Based on the device access time, scenario applications (DSF + PSD for differentiating scenarios such as games / videos / livestreams), and LSTM traffic, a three-dimensional dynamic priority model is predicted and constructed. Scenarios are accurately classified through a dual-factor (DSF + PSD), and an emergency bandwidth pool is combined to handle burst traffic, achieving a game latency < 10 ms, a bandwidth utilization rate of 89%, and a burst processing success rate of 99.8%. Compared with traditional solutions, the latency is reduced by 50%, and the resource utilization rate is increased by 24%. It is applicable to high-demand scenarios such as smart homes and cloud games.
[0103] Embodiment 2:
[0104] As Figure 2 shown, this application provides a dynamic bandwidth allocation device, and the device includes:
[0105] Duration module 1, for obtaining the device access duration decay factor that decays to a first value with the duration of the device accessing the network;
[0106] Dual-factor module 2, for obtaining the current latency sensitivity factor and packet feature factor of the device according to the service currently running on the device;
[0107] Prediction module 3, for obtaining the predicted traffic of the device within a first preset duration from the current to the future according to the service currently running on the device;
[0108] Allocation module 4, connected to the duration module 1, the dual-factor module 2, and the prediction module 3, for allocating the current network bandwidth for the device according to the device access duration decay factor, latency sensitivity factor, packet feature factor, and predicted traffic.
[0109] In an embodiment, the duration module 1 is specifically used for:
[0110] Obtaining the device access duration decay factor that decays to a first value with the duration of the device accessing the network according to the following formula:
[0111]
[0112] where α is the initial access weight of the device accessing the network, β is the decay rate constant, t is the current time, t0 is the initial time when the device accesses the network, and the time unit is minutes, and it approaches the first value 0.3 when (t - t0) = 30 minutes.
[0113] In one embodiment, the dual-factor module 2 specifically includes:
[0114] A DSF unit, configured to obtain the current delay sensitivity factor DSF of the device according to the current measured delay of the service currently running on the device and its maximum tolerable delay;
[0115] A PSD unit, configured to obtain the current packet characteristic factor PSD of the device according to the packet length distribution of the packets of the service currently running on the device for sending and receiving.
[0116] In one embodiment, the DSF unit is specifically configured to:
[0117] Obtain the current delay sensitivity factor of the device according to the following formula:
[0118]
[0119] where D AT = Rx - Tx is the current measured delay of the main service currently running on the device, Rx and Tx are the reception time and transmission time of sending and receiving probe packets between the device and the server of the main service respectively, D MAX = μ + 2σ is the maximum tolerable delay of the main service, μ and σ are the mean and variance of the Gaussian distribution constructed according to the historical delay data of the main service respectively.
[0120] In one embodiment, the PSD unit is specifically configured to:
[0121] Obtain the current packet characteristic factor of the device according to the following formula:
[0122]
[0123] where i represents the i-th preset packet length interval, n is the number of preset packet length intervals, W i is the weight preset for each packet length interval, and the weight of the interval with a small packet length is greater than the weight of the interval with a large packet length, P i is the proportion of the packets sent and received by all the services currently running on the device within the current and previous second preset duration that are located in each packet length interval.
[0124] In one embodiment, the prediction module 3 specifically includes:
[0125] A packet parsing unit, configured to parse the packets sent and received by the device within the second preset duration, including parsing software identifiers, server name indication SNI, application layer protocol negotiation ALPN fields, and encryption handshake characteristics in the packets to identify several services currently running on the device;
[0126] The service classification unit, connected to the message parsing unit, is used to identify the primary service among several services. The identification order of the primary service is: gaming or real-time control services > live broadcast or video conferencing services > upload or download services;
[0127] The LSTM unit, connected to the service classification unit, is used to adopt the long short-term memory network (LSTM) to obtain the predicted traffic of the primary service within the first preset duration from the current to the future according to the historical traffic data of the primary service. pred 。
[0128] In one embodiment, the allocation module 4 specifically includes:
[0129] The allocation calculation unit is used to obtain the bandwidth allocation weight of the device according to the following formula: Priority = a·T weight +b·DSF + c·PSD + d·LSTM pred ;
[0130] The allocation execution unit, connected to the allocation calculation unit, is used to obtain the conventional total bandwidth of the home network where the device is located, and allocate the current network bandwidth for the device in the conventional total bandwidth of the home network according to the level of Priority.
[0131] In one embodiment, the allocation execution unit further includes:
[0132] The supplementary allocation unit is used to call the reserved bandwidth of the home network where the device is located to expand the current network bandwidth of the device when the ratio of the actual required traffic of the primary service exceeding the predicted traffic LSTM pred is greater than the preset ratio threshold;
[0133] The total allocation unit is used to obtain the optical power jitter of the optical module of the home network where the device is located within the second preset duration, and dynamically set the amount of reserved bandwidth in the total bandwidth of the home network according to the magnitude of the optical power jitter.
[0134] Example 3:
[0135] Embodiment 3 of the present application provides a computer-readable storage medium, in which a computer program is stored. When the computer program is run by a processor, it implements the dynamic bandwidth allocation method as described in Embodiment 1, or implements the dynamic bandwidth allocation device as described in Embodiment 2.
[0136] The computer-readable storage medium includes volatile or non-volatile, removable or non-removable media implemented in any method or technology for storing information such as computer-readable instructions, data structures, computer program units, or other data. The computer-readable storage medium includes, but is not limited to, RAM (Random Access Memory), ROM (Read-Only Memory), EEPROM (Electrically Erasable Programmable Read Only Memory), flash memory or other memory technologies, CD-ROM (Compact Disc Read-Only Memory), digital versatile discs (DVDs) or other optical disc storage, magnetic cassettes, tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer.
[0137] In addition, the present application may also provide a computer device including a memory and a processor. A computer program is stored in the memory. When the processor runs the computer program stored in the memory, the processor executes the dynamic bandwidth allocation method as described in Embodiment 1. The computer device may be the dynamic bandwidth allocation device as described in Embodiment 2.
[0138] Among them, the memory is connected to the processor. The memory can be a flash memory, a read-only memory or other memories. The processor can be a central processing unit or a single-chip microcomputer.
[0139] Embodiments 1-3 of the present application provide a dynamic bandwidth allocation method, device and medium. By obtaining the device access duration attenuation factor, delay sensitivity factor, packet feature factor and predicted traffic as the basis for dynamically allocating bandwidth to the device, dynamic optimization of bandwidth allocation is achieved. Specifically, the device access duration attenuation factor can strive for a reasonable initial bandwidth for a newly connected device. The delay sensitivity factor and the packet feature factor can distinguish the scenario classification of the device's currently running service. When multiple devices are used concurrently, bandwidth is reasonably allocated to each device according to the scenario classification. The predicted traffic can strive for bandwidth in advance for the burst traffic that may arrive for the service currently running on the device.
[0140] It can be understood that the above embodiments are merely exemplary embodiments adopted to illustrate the principle of the present application. However, the present application is not limited thereto. For those of ordinary skill in the art, various modifications and improvements can be made without departing from the spirit and essence of the present application, and these modifications and improvements are also regarded as the protection scope of the present application.
Claims
1. A dynamic bandwidth allocation method, characterized in that, The method includes: Obtaining a device access duration attenuation factor when the duration of the device accessing the network decays to a first value; Obtaining the current delay sensitivity factor and packet characteristic factor of the device according to the service currently running on the device; Obtaining the predicted traffic of the device within a first preset duration from the current time to the future according to the service currently running on the device; Allocating the current network bandwidth for the device according to the device access duration attenuation factor, delay sensitivity factor, packet characteristic factor, and predicted traffic.
2. The method according to claim 1, wherein Obtaining a device access duration attenuation factor when the duration of the device accessing the network decays to a first value specifically includes: Obtaining the device access duration attenuation factor when the duration of the device accessing the network decays to a first value according to the following formula: Where α is the initial access weight for the device to access the network, β is the decay rate constant, t is the current time, t0 is the initial time when the device accesses the network, and the time unit is minutes. It approaches the first value of 0.3 at (t - t0) = 30 minutes.
3. The method according to claim 1 or 2, characterized in that, Obtaining the current delay sensitivity factor and packet characteristic factor of the device according to the service currently running on the device specifically includes: Obtaining the current delay sensitivity factor DSF of the device according to the currently measured delay and its maximum tolerable delay of the service currently running on the device; Obtaining the current packet characteristic factor PSD of the device according to the packet length distribution of the packets sent and received by the service currently running on the device.
4. The method according to claim 3, characterized in that, Obtaining the current delay sensitivity factor DSF of the device according to the currently measured delay and its maximum tolerable delay of the service currently running on the device specifically includes: Obtaining the current delay sensitivity factor of the device according to the following formula: Among them, D AT = Rx - Tx is the currently measured delay of the main service currently running on the device. Rx and Tx are the reception time and transmission time of the probing packets sent and received between the device and the server of the main service respectively. D <AX = μ + 2σ is the maximum tolerable delay of the main service. μ and σ are the mean and variance of the Gaussian distribution constructed based on the historical delay data of the main service respectively.
5. The method according to claim 4, characterized in that Obtaining the current packet characteristic factor PSD of the device according to the packet length distribution of the packets sent and received by the service currently running on the device specifically includes: Obtaining the current packet characteristic factor of the device according to the following formula: where i represents the i-th preset data packet length interval, n is the number of preset data packet length intervals, and W i is the weight of each preset data packet length interval, and the weight of the interval with a small data packet length is greater than the weight of the interval with a large data packet length. P i is the proportion of the packets sent and received by all services currently running on the device within the current and previous second preset duration that are located in each data packet length interval.
6. The method according to claim 5, wherein Obtaining the predicted traffic of the device within a first preset duration from the current time to the future according to the service currently running on the device specifically includes: Parsing the packets sent and received by the device within a second preset duration, including parsing software identifiers, server name indication SNI, application layer protocol negotiation ALPN fields, and encryption handshake characteristics in the packets to identify several services currently running on the device; Identifying the primary service among the several services, and the identification order of the primary service is game or real-time control services > live broadcast or video conferencing services > upload or download services; Use the long short-term memory network (LSTM) to obtain the predicted traffic of the primary service within the first preset duration from the current to the future based on the historical traffic data of the primary service LSTM pred .
7. The method according to claim 6, characterized in that, Allocating the current network bandwidth for the device according to the device access duration attenuation factor, delay sensitivity factor, packet characteristic factor, and predicted traffic specifically includes: Obtain the bandwidth allocation weight of the device according to the following formula: Priority = a·T weight + b·DSF + c·PSD + d·LSTM pred ; Obtaining the conventional total bandwidth of the home network where the device is located, and allocating the current network bandwidth for the device in the conventional total bandwidth of the home network according to the level of Priority.
8. The method according to claim 7, characterized in that After allocating the current network bandwidth for the device in the conventional total bandwidth of the home network according to the level of Priority, the method further includes: When the actual demand traffic of the primary service exceeds the predicted traffic of LSTM pred by a ratio greater than the preset ratio threshold, the reserved bandwidth of the home network where the device is located is called to expand the current network bandwidth of the device; Obtaining the optical power jitter of the optical module of the home network where the device is located within a second preset duration, and dynamically setting the amount of reserved bandwidth in the total bandwidth of the home network according to the magnitude of the optical power jitter.
9. A dynamic bandwidth allocation device, characterized in that, The device includes: A duration module for obtaining a device access duration attenuation factor when the duration of the device accessing the network decays to a first value; A dual-factor module for obtaining the current delay sensitivity factor and packet characteristic factor of the device according to the service currently running on the device; A prediction module for obtaining the predicted traffic of the device within a first preset duration from the current time to the future according to the service currently running on the device; The allocation module is connected to the duration module, the dual-factor module, and the prediction module, and is used to allocate the current network bandwidth for the device according to the device access duration attenuation factor, the delay sensitivity factor, the packet feature factor, and the predicted traffic.
10. A computer-readable storage medium, characterized in that, A computer program is stored in the computer-readable storage medium, and when the computer program is run by a processor, the dynamic bandwidth allocation method described in any one of claims 1-8 is implemented.
Citation Information
Cited By
Bandwidth selection method, system and equipment based on household intelligent terminal and medium
CN120881026A