A bandwidth allocation method and device, electronic equipment and storage medium

By using smart network interface cards for real-time monitoring and hardware-level bandwidth scheduling, the problems of high response latency and CPU forwarding bottlenecks in centralized software processing architectures are solved, enabling efficient forwarding and resource utilization of dedicated line gateways.

CN121262091BActive Publication Date: 2026-08-04BEIJING KINGSOFT CLOUD NETWORK TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING KINGSOFT CLOUD NETWORK TECH CO LTD
Filing Date
2025-11-04
Publication Date
2026-08-04

AI Technical Summary

Technical Problem

In existing technologies, the high response latency and CPU forwarding bottleneck caused by centralized software processing architecture cannot meet the demand for millisecond-level bandwidth scheduling and low-latency forwarding for bursty traffic.

Method used

By using smart network interface cards (NICs) to monitor network status indicators of multiple dedicated links in real time, identify hot flows, and establish hardware direct forwarding channels at the hardware level to bypass CPU processing, millisecond-level dynamic scheduling of multi-link bandwidth and hardware direct forwarding of hot flows are achieved.

Benefits of technology

It significantly improves the forwarding performance and resource utilization of dedicated line gateways, realizes millisecond-level dynamic scheduling of multi-link bandwidth and direct hardware connection forwarding of hot flow, and eliminates the CPU forwarding bottleneck.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121262091B_ABST
    Figure CN121262091B_ABST
Patent Text Reader

Abstract

The application provides a bandwidth allocation method and device, electronic equipment and storage medium. The method comprises: monitoring network state indexes of a plurality of dedicated line links in real time; performing heat analysis on service flows transmitted on the plurality of dedicated line links based on the network state indexes to identify hot flows meeting preset conditions; selecting a target link from the plurality of dedicated line links according to flow characteristics of the hot flows and the network state indexes; establishing a hardware direct connection forwarding channel for the hot flows on the target link, and synchronizing configuration information of the hardware direct connection forwarding channel to a control component; receiving a global bandwidth allocation strategy issued by the control component based on the configuration information, and calling the hardware direct connection forwarding channel to perform local flow scheduling for the hot flows according to the global bandwidth allocation strategy and the network state indexes. Thus, the forwarding performance and resource utilization of the dedicated line gateway are significantly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer network technology, and in particular to a bandwidth allocation method, apparatus, electronic device and storage medium. Background Technology

[0002] As enterprises deepen their digital transformation, hybrid cloud architecture has become a mainstream trend. More and more businesses rely on dedicated lines to achieve high-speed and stable interconnection between on-premises data centers (IDCs) and public virtual private clouds (VPCs). As the core hub for achieving cross-cloud and cross-regional network interconnection, the dedicated line gateway's forwarding performance, bandwidth utilization, and scheduling efficiency directly impact the experience of critical services.

[0003] Existing technologies typically employ software-based solutions using a central processing unit (CPU) to implement multi-link bandwidth scheduling for leased line gateways. The control plane periodically collects status information from each leased line, centrally calculates traffic scheduling strategies at the software level, and then distributes them to the data plane. The data plane forwards traffic using software running on a general-purpose server (such as a kernel protocol stack or a Data Plane Development Kit, DPDK), employing algorithms such as Equal-Cost Multipath Routing (ECMP) or weighted hashing to distribute traffic across multiple links.

[0004] However, this centralized software processing architecture requires all traffic policy checks, Network Address Translation (NAT), and Access Control List (ACL) filtering to be performed by the CPU. As a result, it suffers from high response latency and severe CPU forwarding bottlenecks, and cannot meet the demands of burst traffic for millisecond-level bandwidth scheduling and low-latency forwarding. Summary of the Invention

[0005] This application provides a bandwidth allocation method, apparatus, electronic device, and storage medium to solve the problems of high response latency and severe CPU forwarding bottleneck in the centralized software processing architecture of the prior art.

[0006] Firstly, this application provides a bandwidth allocation method applied to a smart network interface card (NIC), comprising: Real-time monitoring of network status indicators for multiple dedicated line links; Based on the network status indicators, the heat analysis of service flows transmitted on multiple leased links is performed to identify hot flows that meet preset conditions. Based on the flow characteristics of the heat flow and the network status indicators, a target link is selected from multiple leased links; A hardware direct forwarding channel is established for the heat flow on the target link, and the configuration information of the hardware direct forwarding channel is synchronized to the control component; The receiving control component sends a global bandwidth allocation policy based on the configuration information, and according to the global bandwidth allocation policy and the network status indicators, calls the hardware direct forwarding channel to perform local traffic scheduling for the hot flow.

[0007] In one possible implementation, the step of performing heat analysis on service flows transmitted on multiple leased links based on the network status indicators to identify hot flows that meet preset conditions includes: Extract bandwidth utilization data and transmission latency data for each dedicated line link from the network status indicators; Within the sliding time window, the number of bytes for each service stream is calculated based on the bandwidth utilization data, and the packet rate for each service stream is calculated based on the transmission delay data. When the number of bytes in any service flow within the window exceeds a first threshold, or the packet rate exceeds a second threshold, the service flow is determined to be a hot flow.

[0008] In one possible implementation, selecting a target link from multiple leased links based on the flow characteristics of the heat flux and the network status indicators includes: Extract the remaining bandwidth and current latency of each dedicated line link from the network status indicators; If the remaining bandwidth of any leased link is greater than or equal to the bandwidth of the heat flow, the leased link is identified as a candidate link, and a candidate link set is obtained. The candidate link with the lowest current latency in the candidate link set is determined as the target link.

[0009] In one possible implementation, after invoking the hardware direct forwarding channel to perform local traffic scheduling for the hot flow based on the global bandwidth allocation policy and the network status indicators, the method further includes: Extract the remaining available bandwidth of each leased link from the network status indicators; When the remaining available bandwidth is lower than a preset threshold, the bandwidth sharing weight of each service flow is recalculated according to the service priority level defined in the global bandwidth allocation strategy, and the flow table output port configuration of the hardware direct forwarding channel is adjusted according to the recalculated bandwidth sharing weight.

[0010] In one possible implementation, the receiving control component, based on the global bandwidth allocation strategy issued by the configuration information, includes: The control component receives the approval result of the hardware direct forwarding channel through the first channel, and the first channel adopts a low-latency transmission protocol. The system receives the complete parameters of the global bandwidth allocation strategy issued by the control component through a second channel, which employs a reliable transmission protocol. When a discrepancy is detected between the bandwidth allocation policy version of the local storage and the policy version of the control component, a resynchronization request is initiated to the control component.

[0011] In one possible implementation, the method further includes: When the remaining available bandwidth of the target link is detected to be continuously lower than the fault threshold for a preset time, the transmission of the hot flow through the hardware direct forwarding channel is terminated, and a new hardware direct forwarding channel is established by reselecting a backup link from multiple leased links, and the channel switching event is reported to the control component.

[0012] In one possible implementation, the method further includes: When all backup links fail to meet bandwidth requirements, the hardware direct-connection forwarding channel binding of the hot flow is released, and the encapsulation and forwarding operation of the hot flow is performed by the host central processing unit.

[0013] In one possible implementation, the step of invoking the hardware direct forwarding channel to perform local traffic scheduling for the hot flow based on the global bandwidth allocation policy and the network status indicators includes: The physical bandwidth resources of multiple dedicated line links are virtualized into a unified global bandwidth pool, wherein the real-time total capacity of the global bandwidth pool is dynamically adjusted based on the bandwidth utilization of each link in the network status indicators. Based on the tenant quota and service priority parameters defined in the global bandwidth allocation strategy, the bandwidth token allocation quota for the hot flow is determined from the global bandwidth pool. The bandwidth token allocation quota is positively correlated with the real-time remaining bandwidth of the target link where the hot flow is located. Configure the token bucket parameters in the flow table entry corresponding to the hardware direct forwarding channel according to the bandwidth token allocation quota; The hardware direct forwarding channel allocates dedicated bandwidth tokens to the hot flow based on the token bucket parameters and implements token rate limiting forwarding.

[0014] Secondly, this application provides a bandwidth allocation device for use with a smart network interface card (NIC), comprising: The monitoring module is used to monitor the network status indicators of multiple leased links in real time. The identification module is used to perform heat analysis on the service flows transmitted on multiple leased links based on the network status indicators, and identify the hot flows that meet the preset conditions. The selection module is used to select a target link from multiple leased links based on the flow characteristics of the heat flow and the network status indicators. A module is established to create a hardware direct forwarding channel for the heat flow on the target link and to synchronize the configuration information of the hardware direct forwarding channel to the control component. The scheduling module is used to receive the global bandwidth allocation policy issued by the control component based on the configuration information, and, according to the global bandwidth allocation policy and the network status indicators, call the hardware direct forwarding channel to perform local traffic scheduling for the hot flow.

[0015] In one possible implementation, the identification module is specifically used for: Extract bandwidth utilization data and transmission latency data for each dedicated line link from the network status indicators; Within the sliding time window, the number of bytes for each service stream is calculated based on the bandwidth utilization data, and the packet rate for each service stream is calculated based on the transmission delay data. When the number of bytes in any service flow within the window exceeds a first threshold, or the packet rate exceeds a second threshold, the service flow is determined to be a hot flow.

[0016] In one possible implementation, the selection module is specifically used for: Extract the remaining bandwidth and current latency of each dedicated line link from the network status indicators; If the remaining bandwidth of any leased link is greater than or equal to the bandwidth of the heat flow, the leased link is identified as a candidate link, and a candidate link set is obtained. The candidate link with the lowest current latency in the candidate link set is determined as the target link.

[0017] In one possible implementation, the device further includes an adjustment module for: Extract the remaining available bandwidth of each leased link from the network status indicators; When the remaining available bandwidth is lower than a preset threshold, the bandwidth sharing weight of each service flow is recalculated according to the service priority level defined in the global bandwidth allocation strategy, and the flow table output port configuration of the hardware direct forwarding channel is adjusted according to the recalculated bandwidth sharing weight.

[0018] In one possible implementation, the scheduling module is configured to: The control component receives the approval result of the hardware direct forwarding channel through the first channel, and the first channel adopts a low-latency transmission protocol. The system receives the complete parameters of the global bandwidth allocation strategy issued by the control component through a second channel, which employs a reliable transmission protocol. When a discrepancy is detected between the bandwidth allocation policy version of the local storage and the policy version of the control component, a resynchronization request is initiated to the control component.

[0019] In one possible implementation, the device further includes a reselection module for: When the remaining available bandwidth of the target link is detected to be continuously lower than the fault threshold for a preset time, the transmission of the hot flow through the hardware direct forwarding channel is terminated, and a new hardware direct forwarding channel is established by reselecting a backup link from multiple leased links, and the channel switching event is reported to the control component.

[0020] In one possible implementation, the apparatus further includes an execution module for: When all backup links fail to meet bandwidth requirements, the hardware direct-connection forwarding channel binding of the hot flow is released, and the encapsulation and forwarding operation of the hot flow is performed by the host central processing unit.

[0021] In one possible implementation, the scheduling module is specifically used for: The physical bandwidth resources of multiple dedicated line links are virtualized into a unified global bandwidth pool, wherein the real-time total capacity of the global bandwidth pool is dynamically adjusted based on the bandwidth utilization of each link in the network status indicators. Based on the tenant quota and service priority parameters defined in the global bandwidth allocation strategy, the bandwidth token allocation quota for the hot flow is determined from the global bandwidth pool. The bandwidth token allocation quota is positively correlated with the real-time remaining bandwidth of the target link where the hot flow is located. Configure the token bucket parameters in the flow table entry corresponding to the hardware direct forwarding channel according to the bandwidth token allocation quota; The hardware direct forwarding channel allocates dedicated bandwidth tokens to the hot flow based on the token bucket parameters and implements token rate limiting forwarding.

[0022] Thirdly, this application provides an apparatus comprising: a processor and a memory, the processor being configured to execute a bandwidth allocation program stored in the memory to implement the bandwidth allocation method described in any one of the first aspects.

[0023] Fourthly, this application provides a storage medium storing one or more programs that can be executed by one or more processors to implement the bandwidth allocation method described in any one aspect.

[0024] Compared with the prior art, the technical solution provided in this application has the following advantages: First, the method provided in this application periodically collects real-time status indicators of multiple leased links through a smart network interface card (NIC) and completes preliminary traffic scheduling at the hardware layer. This hardware-level processing avoids the latency of centralized collection, calculation, and instruction issuance in the traditional control plane, reducing the scheduling response time from seconds to milliseconds. Second, the smart NIC's built-in service flow statistics module quickly identifies high-frequency, low-latency-sensitive target flows and directly guides them to the hardware forwarding channel, bypassing CPU processing. This mechanism completely avoids the latency and resource contention caused by software processing via the CPU for high-frequency service flows, fundamentally eliminating the CPU forwarding bottleneck. This achieves millisecond-level dynamic bandwidth scheduling of multiple links and direct hardware forwarding of hot flows, significantly improving the forwarding performance and resource utilization of the leased gateway. Attached Figure Description

[0025] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0026] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0027] One or more embodiments are illustrated by way of example with reference numerals in the accompanying drawings. These illustrations do not constitute a limitation on the embodiments. Elements with the same reference numerals in the drawings are denoted as similar elements. Unless otherwise stated, the figures in the drawings are not to be limited by scale.

[0028] Figure 1 A flowchart illustrating an embodiment of a bandwidth allocation method provided in this application; Figure 2 A flowchart illustrating an embodiment of another bandwidth allocation method provided in this application; Figure 3 A bandwidth allocation system architecture diagram provided in this application embodiment; Figure 4 A block diagram illustrating an embodiment of a bandwidth allocation device provided in this application; Figure 5This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0029] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0030] The following disclosure provides numerous different embodiments or examples for implementing various structures of this application. To simplify the disclosure, specific examples of components and arrangements are described below. These are merely examples and are not intended to limit the scope of this application. Furthermore, reference numerals and / or letters may be repeated in different examples. Such repetition is for simplification and clarity and does not in itself indicate a relationship between the various embodiments and / or arrangements discussed.

[0031] To address the issues of high response latency and severe CPU forwarding bottlenecks in existing centralized software processing architectures, which fail to meet the demands of burst traffic for millisecond-level bandwidth scheduling and low-latency forwarding, this application provides a bandwidth allocation method that enables millisecond-level dynamic scheduling of multi-link bandwidth and direct hardware-connected forwarding of hot flows, significantly improving the forwarding performance and resource utilization of leased gateways.

[0032] Figure 1 This is a flowchart illustrating an embodiment of a bandwidth allocation method provided in this application. Figure 1 As shown, the method includes the following steps: Step 101: Monitor the network status indicators of multiple leased links in real time.

[0033] Leased link: refers to a dedicated physical or virtual communication channel connecting a local data center and a virtual private cloud in the cloud, providing a highly reliable and low-latency network connection.

[0034] Network status indicators include parameters that reflect the real-time quality and performance of the link, such as bandwidth utilization, transmission latency, packet loss rate, and link jitter.

[0035] In this embodiment, the smart network interface card (NIC) actively collects real-time network status indicators for each leased link at millisecond intervals using its built-in hardware counter and status monitoring module. The smart NIC obtains bandwidth utilization by directly reading the traffic statistics register of the physical port or virtual interface, and obtains transmission latency by sending probe packets and calculating response times. This achieves link status awareness without CPU (Central Processing Unit) intervention, providing an accurate and low-latency data foundation for subsequent traffic scheduling.

[0036] Step 102: Based on the network status indicators, perform heat analysis on the service flows transmitted on the multiple leased links to identify the hot flows that meet the preset conditions.

[0037] Service flow: refers to a sequence of data packets in a communication session that is uniquely identified by the five-tuple of source IP, destination IP, protocol type, source port, and destination port.

[0038] Heat analysis: refers to the process of statistically analyzing and evaluating the traffic characteristics of business flows, mainly including indicators such as the number of bytes per unit time, the number of data packets, and the packet sending rate.

[0039] Hot flow: refers to the traffic flow that exceeds a preset threshold (such as the number of bytes greater than 50MB, or the packet rate higher than 2000 packets / second) within a set sliding time window (e.g., 5 seconds).

[0040] In this embodiment of the application, step 102 may specifically include the following steps: extracting bandwidth utilization data and transmission delay data of each leased link from the network status indicators; within a sliding time window, calculating the number of bytes of each service flow based on the bandwidth utilization data, and calculating the packet rate of each service flow based on the transmission delay data; when the number of bytes of any service flow within the window exceeds a first threshold, or the packet rate exceeds a second threshold, determining that the service flow is a hot flow.

[0041] Bandwidth utilization data: This refers to the percentage of bandwidth actually used by a leased link per unit time relative to its theoretical maximum bandwidth. It is a key indicator for measuring link load. Transmission latency data: This refers to the time required for a data packet to travel from the sender to the receiver, usually measured in milliseconds (ms). It measures the latency performance of the link. Sliding time window: This refers to a fixed-length time interval that slides over time (e.g., 5 seconds). It is used to limit the time range of statistical calculations and ensure the timeliness of the analysis. Byte count: This refers to the total amount of data transmitted by a service flow within the statistical time window, measured in bytes. Packet rate: This refers to the number of service flow data packets passing through per unit time, usually measured in packets per second (pps). First threshold: A byte count threshold (e.g., 50MB) used to determine if a service flow is a hot flow; exceeding this value indicates a hot flow. Second threshold: A packet rate threshold (e.g., 2000 packets per second) used to determine if a service flow is a hot flow; exceeding this value indicates a hot flow.

[0042] This scheme first extracts real-time bandwidth utilization and transmission latency data for each leased link from network status indicators. Then, within a set sliding time window (e.g., 5 seconds), the total number of bytes transmitted by each service flow within that time period is calculated based on the bandwidth utilization data, while the real-time packet rate of each service flow is calculated based on the transmission latency data. Finally, when any service flow is detected to have more than one threshold (e.g., 50MB) in bytes within the current sliding time window, or its packet rate exceeds a second threshold (e.g., 2000 packets / second), that service flow is identified as a hot flow. Through this identification mechanism based on multi-dimensional indicators and dynamic thresholds, this invention can quickly and accurately identify critical service flows that are sensitive to latency or have high bandwidth consumption from massive service flows, providing precise target objects for subsequent hardware direct forwarding, thereby significantly improving the processing efficiency and service experience of the leased gateway.

[0043] Step 103: Select a target link from multiple leased links based on the flow characteristics of the heat flow and the network status indicators.

[0044] Traffic characteristics: refers to the network transmission demand characteristics of heat flow, including the required bandwidth, tolerable latency, SLA (Service Level Agreement) requirements, etc.

[0045] Target link: refers to the dedicated channel selected from available links based on the heat flow requirements and the real-time status of multiple dedicated links, which is the most suitable for transmitting the heat flow.

[0046] In this embodiment of the application, S103 may specifically include the following steps: extracting the remaining bandwidth and current latency of each leased link from the network status indicators; determining the leased link as a candidate link when the remaining bandwidth of any leased link is greater than or equal to the bandwidth of the hot flow, thereby obtaining a candidate link set; and determining the candidate link with the lowest current latency in the candidate link set as the target link.

[0047] Remaining Bandwidth: Refers to the unused and available bandwidth resources on a given leased link, typically measured in Mbps or Gbps. Current Latency: Refers to the real-time delay required for data packets to transmit on a given leased link, typically measured in milliseconds (ms), reflecting the link's immediate communication quality. Bandwidth Requirements: Refers to the bandwidth resources required for the normal transmission of the target hot stream, usually preset according to service type or quality of service requirements. Candidate Link Set: Refers to the set of available links selected from all leased links whose remaining bandwidth meets the hot stream requirements. Target Link: Refers to the leased link ultimately selected for transmitting the hot stream; it is the optimal path chosen from the candidate link set based on a preset strategy.

[0048] In this scheme, firstly, the remaining bandwidth and current latency data of each leased link are extracted from real-time collected network status indicators. Next, the remaining bandwidth of each link is compared with the bandwidth requirement of the target hot flow, and leased links with remaining bandwidth greater than or equal to the bandwidth required by the hot flow are selected as candidate links, forming a candidate link set. Finally, the link with the lowest current latency is selected from the candidate link set and determined as the target link, serving as the final forwarding path for the hot flow. Through this multi-level filtering mechanism based on real-time link status, this invention can dynamically and efficiently select the optimal forwarding path for hot flows, fully guaranteeing the bandwidth requirements of the hot flow while minimizing transmission latency, thereby significantly improving the link utilization of the leased gateway and the communication quality of critical services.

[0049] Step 104: Establish a hardware direct forwarding channel for the heat flow on the target link, and synchronize the configuration information of the hardware direct forwarding channel to the control component.

[0050] Hardware direct forwarding channel: refers to a high-speed forwarding path created on a smart network interface card (NIC), implemented through flow table entries or hardware forwarding tables, allowing data packets matching the flow table entry to be forwarded directly within the NIC without needing to be uploaded to the host CPU for processing.

[0051] Control component: refers to the centralized management software system running on the control plane, which is responsible for global policy management, resource coordination and status monitoring.

[0052] In this embodiment, the smart network interface card (NIC) creates hardware flow table entries for hot flows, specifying that they are forwarded from the target link. The flow table entries include matching rules (five-tuples) and forwarding actions (output port or tunnel encapsulation parameters). Simultaneously, the smart NIC reports the configuration information (including flow identifier, target link, allocated bandwidth, etc.) of the created direct forwarding channel to the control component in real time via a high-speed communication channel (such as RDMA (Remote Direct Memory Access) or PCIe (Peripheral Component Interconnect Express) channel) to ensure the synchronization of the global state of the control plane.

[0053] Step 105: Receive the global bandwidth allocation policy issued by the control component based on the configuration information, and according to the global bandwidth allocation policy and the network status indicators, call the hardware direct forwarding channel to perform local traffic scheduling for the hot flow.

[0054] Global bandwidth allocation strategy: refers to the bandwidth management strategy formulated by the control component, including the total bandwidth pool allocation, the basic quota for each tenant or service, priority rules, etc.

[0055] Local traffic scheduling: refers to the fine-grained management operations performed by the smart network interface card (NIC) on traffic passing through the hardware direct forwarding channel, such as rate control and priority scheduling, based on global policies and real-time network status.

[0056] In this embodiment, after receiving the direct connection channel information reported by the smart network interface card (NIC), the control component reviews or adjusts it according to the global bandwidth allocation policy and sends the policy decision (such as bandwidth limit and priority marking) to the smart NIC. After receiving the policy, the smart NIC, in conjunction with real-time collected network status indicators, uses a hardware traffic scheduler (such as a token bucket or queue scheduling mechanism) to perform local rate control and scheduling of hot traffic in the direct connection channel, ensuring that it conforms to the global policy while making full use of link resources.

[0057] The technical solution provided in this application firstly collects real-time status indicators of multiple leased links periodically through a smart network interface card (NIC) and completes preliminary traffic scheduling at the hardware layer. This hardware-level processing avoids the latency of centralized collection, calculation, and instruction issuance in the traditional control plane, reducing the scheduling response time from seconds to milliseconds. Secondly, the smart NIC's built-in service flow statistics module quickly identifies high-frequency access and low-latency sensitive target flows and directly guides them to the hardware forwarding channel, bypassing CPU processing. This mechanism completely avoids the latency and resource contention caused by software processing through the CPU for high-frequency service flows, fundamentally eliminating the CPU forwarding bottleneck. This achieves millisecond-level dynamic bandwidth scheduling of multiple links and direct hardware forwarding of hot flows, significantly improving the forwarding performance and resource utilization of the leased gateway.

[0058] In one embodiment, receiving the global bandwidth allocation policy issued by the control component based on the configuration information may specifically include the following steps: receiving the approval result of the control component for the hardware direct forwarding channel through a first channel, wherein the first channel adopts a low-latency transmission protocol; receiving the complete parameters of the global bandwidth allocation policy issued by the control component through a second channel, wherein the second channel adopts a reliable transmission protocol; and initiating a resynchronization request to the control component when it is detected that the version of the bandwidth allocation policy stored locally is inconsistent with the version of the policy of the control component.

[0059] The first channel refers to the dedicated low-latency communication link established between the smart network card and the control components, used to transmit critical instructions or approval results that require rapid response.

[0060] Low-latency transmission protocols refer to communication protocols such as UDP (User Datagram Protocol) or QUIC (Quick UDP Internet Connections) designed to reduce transmission latency.

[0061] Approval Result: This refers to the control component's review conclusion on the hardware direct connection forwarding channel creation request reported by the smart network interface card (NIC). Its core content is approval or rejection. If approved, the result will include specific constraints for this approval, such as: a whitelist of allowed traffic types for direct connection; the maximum allowed direct connection duration; and the minimum link health threshold.

[0062] The second channel refers to the highly reliable communication link established between the smart network card and the control components, used to transmit policy and configuration data that need to be guaranteed to be complete and consistent.

[0063] Reliable transport protocols refer to communication protocols that provide reliability guarantees, such as HTTP / 2 (Hypertext Transfer Protocol version 2) or gRPC (Google Remote Procedure Call).

[0064] Complete parameters of the global bandwidth allocation policy: refers to all configuration information of the bandwidth pool allocation, tenant quotas, priority rules and other policies defined by the control plane.

[0065] Policy version: refers to the version number used to identify the update status of the global bandwidth allocation policy. It is usually assigned and managed by the control component to maintain the consistency of policies among multiple nodes.

[0066] Resynchronization request: This refers to the request initiated by the smart network interface card (NIC) to resynchronize the policy with the control component when it detects that the local policy version is inconsistent with the control component policy version.

[0067] In this embodiment, firstly, the smart network interface card (NIC) receives the control component's rapid approval result for the reported hardware direct forwarding channel configuration via a first channel (using low-latency transmission protocols such as UDP or QUIC). Secondly, it receives the complete parameter set of the global bandwidth allocation policy issued by the control component via a second channel (using reliable transmission protocols such as gRPC). Finally, after receiving the policy, the smart NIC compares the local and server-side policy version numbers. When a version inconsistency is detected, it automatically initiates a resynchronization request to the control component to ensure the consistency between the local and global policies. This scheme, through a dual-channel collaborative policy issuance and version synchronization mechanism, achieves low-latency response to critical instructions while ensuring reliable transmission and consistency maintenance of batch policy data. This improves system response speed while ensuring the accuracy and reliability of global resource scheduling.

[0068] Figure 2 A flowchart illustrating an embodiment of another bandwidth allocation method provided in this application. Figure 2 The process shown is in Figure 1 Based on the illustrated process, the following steps are included: Step 201: Virtualize the physical bandwidth resources of multiple leased links into a unified global bandwidth pool, wherein the real-time total capacity of the global bandwidth pool is dynamically adjusted based on the bandwidth utilization of each link in the network status indicators.

[0069] Step 202: Based on the tenant quota and service priority parameters defined in the global bandwidth allocation strategy, determine the bandwidth token allocation quota for the hot flow from the global bandwidth pool. The bandwidth token allocation quota is positively correlated with the real-time remaining bandwidth of the target link where the hot flow is located.

[0070] Step 203: Configure the token bucket parameters in the flow table entry corresponding to the hardware direct forwarding channel according to the bandwidth token allocation quota.

[0071] Step 204: Allocate a dedicated bandwidth token to the hot flow based on the token bucket parameters through the hardware direct forwarding channel and implement token rate limiting forwarding.

[0072] For ease of understanding, steps 201-204 will be explained uniformly below: Global bandwidth pool: refers to a unified logical bandwidth resource pool formed by integrating the physical bandwidth resources of multiple leased links through virtualization technology. Its total capacity is dynamically calculated based on the real-time bandwidth utilization of each link, rather than a simple fixed summation.

[0073] Tenant quota: refers to the basic bandwidth guarantee value predefined in the global bandwidth allocation policy and allocated to a specific tenant or service.

[0074] Service priority parameter: refers to the weight or level indicator defined in the policy to distinguish the importance of services. High-priority services can be allocated bandwidth resources first.

[0075] Bandwidth token allocation limit: refers to the upper limit of allocable bandwidth calculated for hot flow based on global policy and real-time link status, expressed in the number of tokens. This limit is positively correlated with the current remaining bandwidth of the target link.

[0076] Token bucket parameters: These are the set of parameters configured in a flow table entry to control traffic, typically including the token generation rate and the bucket capacity.

[0077] Token-based rate limiting forwarding: This refers to generating tokens based on token bucket parameters. Data packets can only be forwarded after obtaining a token, thereby achieving precise bandwidth control.

[0078] In this embodiment, firstly, the smart NIC periodically collects bandwidth utilization data for each leased link and dynamically calculates the real-time total capacity of the global bandwidth pool using a weighted algorithm (e.g., a weighted summation based on the actual remaining bandwidth of the link). This capacity value adjusts according to changes in link status. Then, the local scheduling module on the smart NIC queries the pre-issued global policy to obtain the quota and service priority of the tenant to which the hot flow belongs. Combining this with the real-time remaining bandwidth of the target link (obtained by reading hardware registers), a weighted allocation algorithm (e.g., allocation quota = tenant basic quota × priority weight × (current link remaining bandwidth / total link bandwidth)) is used to calculate the precise bandwidth token allocation quota. Next, the smart NIC driver converts the calculated bandwidth token allocation quota into token bucket parameters (e.g., token generation rate = allocation quota, bucket capacity = allocation quota × buffer coefficient), and configures these parameters into the flow table entries corresponding to the hardware direct forwarding channels by calling the NIC hardware programming interface (e.g., NIC Firmware API). Finally, the hardware token bucket counter on the smart network card continuously generates tokens based on the parameters configured in the flow table entries. When a data packet arrives, the hardware looks up its corresponding flow table entry and attempts to acquire the token. Only data packets that successfully acquire the token will be forwarded immediately; otherwise, they will be cached or dropped, thus achieving line-rate token-based rate limiting forwarding.

[0079] This solution achieves refined management and fair allocation of bandwidth resources through the aforementioned hardware-based dynamic resource virtualization and token bucket rate limiting mechanism. It not only ensures the bandwidth requirements of high-priority hot flows but also avoids excessive resource consumption by a single flow, significantly improving the bandwidth utilization of multiple links while ensuring the quality and fairness of network services.

[0080] In another embodiment, after step 105, the following steps may be included: extracting the remaining available bandwidth of each leased link from the network status indicators; when the remaining available bandwidth is lower than a preset threshold, recalculating the bandwidth sharing weight of each service flow according to the service priority level defined in the global bandwidth allocation strategy, and adjusting the flow table output port configuration of the hardware direct forwarding channel according to the recalculated bandwidth sharing weight.

[0081] Remaining Available Bandwidth: Refers to the bandwidth resources of a leased link that are not currently allocated. It is usually calculated by subtracting the currently allocated bandwidth from the total link bandwidth, and is expressed in Mbps or Gbps. Programmable Module: Refers to the hardware component in the smart NIC that supports logical definition via P4, eBPF, or other programming languages, used to implement flexible traffic processing strategies. Service Priority Level: Refers to the classification of service importance explicitly defined in the global bandwidth allocation strategy, usually represented by a numerical value (e.g., 1-10), with higher values ​​indicating higher priority. Bandwidth Sharing Weight: Refers to the proportional coefficient for allocating bandwidth to different flows based on service priority, used to determine the bandwidth share available to each flow during resource contention. Flow Table Output Port Configuration: Refers to the action parameters in the smart NIC's flow table used to specify the packet forwarding port. Modifying this configuration can change the output link of a flow.

[0082] In this embodiment, firstly, the remaining available bandwidth of each leased link is monitored in real time. When the remaining available bandwidth of a link is detected to be lower than a preset threshold (e.g., 10% of the total bandwidth of the link), a dynamic adjustment mechanism is triggered. Next, based on the service priority level defined in the global bandwidth allocation strategy, a weighted allocation algorithm (e.g., weight = base weight × priority coefficient) is used to recalculate the bandwidth sharing weight of each service flow. Finally, based on the recalculated weight, the traffic is dynamically redistributed to links with more remaining bandwidth by modifying the output port action parameters of relevant flow table entries in the smart network card hardware flow table (e.g., adjusting hash weight or directly specifying the output port), thereby achieving optimized allocation of bandwidth resources.

[0083] This solution introduces a dynamic weight adjustment mechanism based on real-time bandwidth availability and service priority, which can automatically and quickly schedule traffic when bandwidth resources are scarce. This not only ensures the service quality of high-priority services, but also maximizes the utilization efficiency of multi-link bandwidth resources and enhances the adaptive capability of the leased gateway in sudden scenarios.

[0084] In another embodiment, the method may further include the following steps: when it is detected that the remaining available bandwidth of the target link is continuously lower than the fault threshold for a preset duration, terminating the transmission of the hot flow through the hardware direct forwarding channel, and reselecting a backup link from multiple leased links to establish a new hardware direct forwarding channel, and reporting the channel switching event to the control component.

[0085] Fault Threshold: A pre-set bandwidth threshold used to determine whether a link has failed (e.g., remaining available bandwidth is less than 5% of the total link capacity). This threshold is typically lower than the regular load adjustment threshold. Preset Duration: A time window used to confirm persistent link anomalies (e.g., three consecutive detection cycles) to avoid erroneous switching due to momentary fluctuations. Backup Link: An alternative path pre-planned or dynamically selected from multiple leased links to take over traffic from a failed link. Channel Switching Event: A notification message that records details of a link switching, including the original link identifier, the new link identifier, the switching timestamp, and the identifier of the affected flow.

[0086] In this embodiment, the smart network interface card (NIC) continuously monitors the remaining available bandwidth of the target link. When it detects that the value is continuously lower than the fault threshold for a preset time (e.g., lower than 5% for three consecutive sampling periods), it determines that the link has failed or is severely congested. Subsequently, the smart NIC immediately terminates the transmission of hot traffic through the original hardware direct connection forwarding channel. At the same time, it reselects the optimal backup link from other leased links based on the real-time network status (selection criteria include remaining bandwidth, latency, and priority matching degree), and quickly establishes a new hardware direct connection forwarding channel based on the backup link. Finally, the smart NIC reports the channel switching event to the control component through a reliable channel (e.g., gRPC) for updating the global status and performing audit analysis.

[0087] This solution introduces a hardware-based link fault rapid detection and automatic switching mechanism, which can complete fault perception and traffic rerouting within milliseconds, greatly improving the reliability and business continuity of the leased line gateway. At the same time, it ensures the accuracy of the global state of the control plane by timely reporting of switching events, and achieves high availability assurance in fault scenarios.

[0088] In another embodiment, the method may further include the following steps: when all backup links fail to meet bandwidth requirements, the hardware direct forwarding channel binding of the hot flow is released, and the encapsulation and forwarding operation of the hot flow is performed by the host central processing unit.

[0089] Backup Links: These refer to other available leased links besides the currently used target link. These links must meet basic connectivity requirements and be permitted by policy for service transmission. Bandwidth Requirement: This refers to the minimum bandwidth required to ensure the normal transmission of a specific hot flow. This value is usually preset based on service type or quality of service requirements. Hardware Direct Forwarding Channel Bonding: This refers to a hardware flow table entry established and activated on the smart network interface card (NIC) for forwarding a specific hot flow. This bonding allows traffic to bypass the host CPU. Host Central Processing Unit (CPU): This refers to the main CPU of the server running a general-purpose operating system, responsible for executing software protocol stack processing, encapsulation, and forwarding operations. Encapsulation and Forwarding Operations: This refers to the operation of processing data packets through software methods, such as tunnel encapsulation (e.g., VXLAN, IPsec), route lookup, and policy checks, before sending them to the next hop.

[0090] In this embodiment, when the smart NIC detects that the remaining available bandwidth of all backup links cannot meet the minimum bandwidth requirements of the hot flow, the disaster recovery rollback process is triggered: the smart NIC first unbinds the hot flow from the hardware direct forwarding channel (i.e., deletes or deactivates the corresponding hardware flow table entry), and then notifies the host CPU through an interrupt or message; the host CPU takes over the processing task of the hot flow, and performs packet tunneling, routing lookup and forwarding operations through the kernel network protocol stack or user-space forwarding framework to ensure that the traffic continues to be transmitted.

[0091] This solution introduces an intelligent disaster recovery rollback mechanism, which can still ensure the connectivity of critical businesses in extreme resource shortage scenarios. It achieves a flexible processing architecture of "hardware acceleration as the main method and software forwarding as the auxiliary method", effectively improving the system's disaster recovery capabilities and business continuity.

[0092] Figure 3 This is a bandwidth allocation system architecture diagram provided for an embodiment of this application. Figure 3 As shown, the architecture includes the following components: 1. VPC (Virtual Private Cloud) Function: Used to host cloud-based business instances, including virtual machines and containers, and to provide a private Layer 2 or Layer 3 network environment.

[0093] Key features: Communication between internal instances does not require traversing the public network; when access to an IDC or other VPC is required, traffic must be routed and processed via a transit gateway (TGW).

[0094] Connection with SmartNIC: Each cloud host's physical network card can be a SmartNIC, which enables traffic detection, acceleration, and direct forwarding to be performed locally on the host side; when connecting to TGW, outbound traffic can be processed by SmartNIC before being sent out.

[0095] 2. IDC (Internet Data Center) Function: To host the enterprise's local business systems and databases, typically interconnected with the cloud via dedicated lines.

[0096] Key features: Provides low-latency, high-bandwidth dedicated line channels; access to cloud VPCs requires routing and policy control via TGW.

[0097] Connection with SmartNIC: SmartNICs can be deployed in IDC border network devices or cloud access devices to achieve fast path selection and traffic acceleration.

[0098] 3. TGW (Transit Gateway) Function: As the core hub for communication between VPC and IDC, it is responsible for cross-network Layer 3 forwarding, Network Address Translation (NAT), Access Control List (ACL) filtering, route aggregation and other processing.

[0099] Key capabilities: NAT functionality: Supports local source address translation (SNAT, which translates VPC private network addresses to IDC mixed addresses) and peer destination address translation (DNAT, which maps IDC addresses to VPCs); ACL control: Supports access control policies based on four-layer granularity (source / destination IP, port number, etc.); High availability architecture: Supports primary / backup or multi-active deployment to ensure service reliability.

[0100] Connection with SmartNIC: SmartNICs can be mounted inside TGW, allowing some forwarding logic, hot-flow direct connection processing, and acceleration channels to be executed in the network card hardware; for the data path between VPC and IDC, the "control plane direct connection path" mode can be adopted, with SmartNICs directly completing packet forwarding.

[0101] 4. SmartNIC (Smart Network Interface Card) Function: Directly executes packet processing functions on the network card side, reducing the involvement of the central processing unit (CPU) and achieving microsecond-level traffic forwarding and policy execution.

[0102] Main functional modules: Traffic access and parsing module: Receives traffic from VPC or IDC, parses its Layer 2, Layer 3, and Layer 4 header information, and performs flow table matching; Hot flow detection module: Uses data structures such as LRU (Least Recently Used), Sketch, or small hash tables to record the byte count and packet rate of active flows, and determines whether it is a hot flow within a sliding time window (e.g., 5 seconds). Flow); Local bandwidth splicing and allocation module: Maintains real-time metrics (including utilization and remaining bandwidth) for each available link, and assigns tokens to flows according to weight or priority to achieve millisecond-level response; Direct connection cache table: When a flow meets the direct connection conditions (identified as a hot flow, link health meets the standards, and policy allows it), a direct connection flow table entry is established, and subsequent matching packets are forwarded or tunneled directly at the SmartNIC layer without reporting to the CPU; Fallback and failure handling: When a direct connection fails or the policy is revoked, traffic is automatically fallback to the CPU or a normal path for processing; Control plane interaction module: Reports hot flow events through a low-latency channel (such as UDP or QUIC protocol), receives policy and flow table distributions in batches through a reliable channel (such as gRPC protocol), and supports policy version number comparison to avoid race conditions.

[0103] 5. Control Plane Function: Responsible for unified management strategies, traffic scheduling, and event handling.

[0104] Core Functions: Global Policy Management: Includes Bandwidth Pool Allocation (BWP allocation), priority model definition, and tenant quota management; Event Approval and Automated Processing: Automatically or manually approves hot flow events reported by SmartNICs and issues direct connection or rate limiting policies; Policy Synchronization Mechanism: Supports rapid response to sudden hot flow events via low-latency links and periodically synchronizes all policies to all SmartNICs via the gRPC protocol; Version Control Mechanism: Assigns version number fields to all policies and flow table entries, and can execute rollback or resynchronization requests when SmartNICs detect version inconsistencies; Link Health Monitoring: Summarizes link utilization, packet loss rate, and other indicators reported by each SmartNIC, providing a basis for bandwidth splicing and traffic scheduling decisions.

[0105] 6. Key Algorithms and Processes A. Heat flow detection Objective: To quickly identify sessions with high traffic share or sudden increases in frequency within a short period of time (i.e., "hot flows") and convert them to direct connection mode or prioritize the allocation of local tokens.

[0106] Method (implemented in SmartNIC): Maintain an LRU cache, a space-saving Sketch or small hash table structure, and increment its count with each flow update; within a sliding time window W (e.g., 5 seconds), if the number of bytes (byte_count) of a flow is greater than the threshold THRESH_BYTE, or the packet rate (packet_rate) is greater than the threshold THRESH_PKT, then mark it as a hot flow; when a flow is marked as a hot flow, a local request is triggered, and a "hot event" is reported to the control plane.

[0107] B. Local high-speed bandwidth splicing and allocation Objective: To achieve millisecond-level response by locally aggregating bandwidth for a set of candidate links and assigning tokens to flows on the SmartNIC.

[0108] Design scheme: SmartNIC maintains the metrics of the N currently visible links (LinkMetric for each link); SmartNIC allocates tokens to flows according to priority queues, and the allocation strategy can adopt Weighted FairShare (based on tenant or flow weight) or Strict Priority (high-priority flows are allocated first); for hot flows, SmartNIC attempts to allocate them with a fast token rate (token_rate), which is the minimum value between the request rate and the share of available link capacity; Local algorithm (simplified process): Collect the utilization (link_i.utilization) and capacity (capacity_i) of each link; calculate the total remaining bandwidth: total_free = Σ[capacity_i × (1 - utilization_i)]; if the total remaining bandwidth is greater than or equal to the requested rate (total_free ≥ required_rate), then allocate the required bandwidth; otherwise, allocate bandwidth proportionally according to priority.

[0109] C. Direct Path Cache Table Creation and Stream Forwarding Conditions for determination (example): The flow is identified as a hot flow; the control plane policy allows the flow to be directly connected locally (e.g., without intermediate translation, auditing, or specific ACL checks); the local link and the target path meet latency and bandwidth constraints.

[0110] Table creation process: The SmartNIC generates a flow entry (FlowEntry, action DIRECT) and broadcasts or distributes it to the cloud edge SmartNIC (required in multi-point scenarios); subsequent matched packets are directly forwarded or tunneled on the network card according to the action defined by the FlowEntry, and no longer reported to the CPU; rollback mechanism: if the flow entry expires, the network is abnormal, or a control plane revocation instruction is received, the entry is immediately deleted, and subsequent traffic is rolled back to the CPU path for processing.

[0111] D. Control plane coordination and policy deployment Control plane responsibilities: Responsible for long-term policy management, including bandwidth pool allocation, priority models and tenant quotas; approving or approving sudden events (such as "hot flow") (automatic threshold policies can be configured to reduce manual intervention).

[0112] Distribution Mechanism: Low-latency channel: SmartNIC reports hot flow events to the control plane via UDP or QUIC protocol, and the control plane can quickly return an approval or rejection result; Reliable channel: Full or batch synchronization of policies is transmitted using the gRPC protocol to ensure consistency; Policy versioning: All policies and flow assignments carry a version number field. When SmartNIC receives a policy with an inconsistent version, it executes a rollback or resynchronization request to avoid race conditions.

[0113] 7. Example A. Scene Setup (Example Values) Three bearer links are deployed on the IDC side to the cloud edge: Link-A (10 Gbps), Link-B (5 Gbps), and Link-C (1 Gbps); the total capacity of the global bandwidth pool (BWP) is set to 12 Gbps by the control plane (which can be oversold to 14 Gbps) and allocated to tenants, such as TenantX's basic allocation of 300 Mbps priority quota; the default minimum rate (min_rate) of the SmartNIC local token bucket is 100 Mbps, and the burst rate (burst) is 200 Mbps; the hot flow judgment threshold is triggered when the traffic is ≥50 MB or the number of packets is ≥2000 within 5 seconds.

[0114] B. Operation Flow (Timeline) System startup and synchronization: The control plane distributes bandwidth pool allocation, tenant priority, and initial policies to IDCSmartNIC and cloud-edge SmartNIC (full synchronization); SmartNICs establish initial token buckets and link monitoring tasks locally.

[0115] Normal traffic distribution (non-hotspot flow): After ordinary flow enters the IDC SmartNIC, it is matched as a regular flow and distributed to multiple links according to the hash or ECMP algorithm, or encapsulated and sent to the cloud central gateway; the CPU only processes traffic that needs to be checked by policies.

[0116] A sudden hot flow occurs: A database backup stream transmits 120 MB of data within 5 seconds. The SmartNIC hot flow detection module marks this as a hot flow and creates a flow table entry locally (the default action is DIRECT, and the token rate request is 400 Mbps). The SmartNIC calculates the current total remaining bandwidth locally (e.g., 2 Gbps remaining on Link-A, 1 Gbps remaining on Link-B, and 0.2 Gbps remaining on Link-C, totaling 3.2 Gbps), which can meet the request. The SmartNIC immediately locks the flow into direct connection mode locally and sends subsequent traffic fragments proportionally on Link-A / B / C (or prioritizes Link-A and B). At the same time, the SmartNIC reports the hot flow event to the control plane (including the flow identifier, observed rate, and requested rate). The control plane automatically approves according to the global policy (or adjusts the temporary bandwidth pool quota if necessary). If approved, the metadata database is updated and the version number is returned to the SmartNIC (if a higher quota is required, it may trigger a network-wide resource rebalancing, which usually takes seconds).

[0117] Traffic continuity and rollback: If a link (such as Link-B) fails, SmartNIC immediately recalculates and reallocates the flow fragments to the remaining links; if the remaining capacity is insufficient, SmartNIC reduces the token rate and temporarily reports the excess traffic to the cloud central gateway (CPU) for degradation processing; when a hot flow is idle for more than the validity period (such as 30 seconds), SmartNIC automatically reclaims the flow table entry and reports the statistical information to the control plane for auditing and billing.

[0118] This invention deeply integrates smart network interface cards (NICs) into the dedicated line gateway architecture, constructing an innovative architecture of "hardware acceleration + control plane collaboration + local decision-making." This enables millisecond-level dynamic scheduling of multi-link bandwidth resources and direct hardware forwarding of hot-flow services. This method effectively solves problems such as high response latency, prominent CPU forwarding bottlenecks, and lack of service awareness in traditional software solutions. It significantly improves the forwarding performance, resource utilization, and service experience of dedicated line gateways in hybrid cloud scenarios, providing enterprises with a high-performance, highly reliable cloud-network interconnection solution.

[0119] Figure 4 This is a block diagram illustrating an embodiment of a bandwidth allocation device provided in this application. Figure 4 As shown, the device includes: Monitoring module 41 is used to monitor the network status indicators of multiple leased links in real time; The identification module 42 is used to perform heat analysis on the service flows transmitted on multiple leased links based on the network status indicators, and identify the hot flows that meet the preset conditions. Selection module 43 is used to select a target link from multiple leased links based on the flow characteristics of the heat flow and the network status indicators; Establishment module 44 is used to establish a hardware direct forwarding channel for the heat flow on the target link and synchronize the configuration information of the hardware direct forwarding channel to the control component; The scheduling module 45 is used to receive the global bandwidth allocation policy issued by the control component based on the configuration information, and, according to the global bandwidth allocation policy and the network status indicators, call the hardware direct forwarding channel to perform local traffic scheduling for the hot flow.

[0120] In one possible implementation, the identification module is specifically used for: Extract bandwidth utilization data and transmission latency data for each dedicated line link from the network status indicators; Within the sliding time window, the number of bytes for each service stream is calculated based on the bandwidth utilization data, and the packet rate for each service stream is calculated based on the transmission delay data. When the number of bytes in any service flow within the window exceeds a first threshold, or the packet rate exceeds a second threshold, the service flow is determined to be a hot flow.

[0121] In one possible implementation, the selection module is specifically used for: Extract the remaining bandwidth and current latency of each dedicated line link from the network status indicators; If the remaining bandwidth of any leased link is greater than or equal to the bandwidth of the heat flow, the leased link is identified as a candidate link, and a candidate link set is obtained. The candidate link with the lowest current latency in the candidate link set is determined as the target link.

[0122] In one possible implementation, the device further includes an adjustment module for: Extract the remaining available bandwidth of each leased link from the network status indicators; When the remaining available bandwidth is lower than a preset threshold, the bandwidth sharing weight of each service flow is recalculated according to the service priority level defined in the global bandwidth allocation strategy, and the flow table output port configuration of the hardware direct forwarding channel is adjusted according to the recalculated bandwidth sharing weight.

[0123] In one possible implementation, the scheduling module is configured to: The control component receives the approval result of the hardware direct forwarding channel through the first channel, and the first channel adopts a low-latency transmission protocol. The system receives the complete parameters of the global bandwidth allocation strategy issued by the control component through a second channel, which employs a reliable transmission protocol. When a discrepancy is detected between the bandwidth allocation policy version of the local storage and the policy version of the control component, a resynchronization request is initiated to the control component.

[0124] In one possible implementation, the device further includes a reselection module for: When the remaining available bandwidth of the target link is detected to be continuously lower than the fault threshold for a preset time, the transmission of the hot flow through the hardware direct forwarding channel is terminated, and a new hardware direct forwarding channel is established by reselecting a backup link from multiple leased links, and the channel switching event is reported to the control component.

[0125] In one possible implementation, the apparatus further includes an execution module for: When all backup links fail to meet bandwidth requirements, the hardware direct-connection forwarding channel binding of the hot flow is released, and the encapsulation and forwarding operation of the hot flow is performed by the host central processing unit.

[0126] In one possible implementation, the scheduling module is specifically used for: The physical bandwidth resources of multiple dedicated line links are virtualized into a unified global bandwidth pool, wherein the real-time total capacity of the global bandwidth pool is dynamically adjusted based on the bandwidth utilization of each link in the network status indicators. Based on the tenant quota and service priority parameters defined in the global bandwidth allocation strategy, the bandwidth token allocation quota for the hot flow is determined from the global bandwidth pool. The bandwidth token allocation quota is positively correlated with the real-time remaining bandwidth of the target link where the hot flow is located. Configure the token bucket parameters in the flow table entry corresponding to the hardware direct forwarding channel according to the bandwidth token allocation quota; The hardware direct forwarding channel allocates dedicated bandwidth tokens to the hot flow based on the token bucket parameters and implements token rate limiting forwarding.

[0127] like Figure 5 As shown in the figure, this application provides a device including a processor 111, a communication interface 112, a memory 113, and a communication bus 114, wherein the processor 111, the communication interface 112, and the memory 113 communicate with each other through the communication bus 114. Memory 113 is used to store computer programs; In one embodiment of this application, when the processor 111 executes a program stored in the memory 113, it implements the bandwidth allocation method provided in any of the foregoing method embodiments, including: Real-time monitoring of network status indicators for multiple dedicated line links; Based on the network status indicators, the heat analysis of service flows transmitted on multiple leased links is performed to identify hot flows that meet preset conditions. Based on the flow characteristics of the heat flow and the network status indicators, a target link is selected from multiple leased links; A hardware direct forwarding channel is established for the heat flow on the target link, and the configuration information of the hardware direct forwarding channel is synchronized to the control component; The receiving control component sends a global bandwidth allocation policy based on the configuration information, and according to the global bandwidth allocation policy and the network status indicators, calls the hardware direct forwarding channel to perform local traffic scheduling for the hot flow.

[0128] This application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the bandwidth allocation method provided in any of the foregoing method embodiments.

[0129] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0130] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented using software plus a general-purpose hardware platform, or of course, using hardware. Based on this understanding, the above technical solutions, in essence or the parts that contribute to the related technology, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0131] It should be understood that the terminology used herein is for the purpose of describing particular exemplary embodiments only and is not intended to be limiting. Unless the context clearly indicates otherwise, the singular forms “a,” “an,” and “described” as used herein may also include the plural forms. The terms “comprising,” “including,” “containing,” and “having” are inclusive and therefore indicate the presence of the stated features, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, elements, components, and / or combinations thereof. The method steps, processes, and operations described herein are not construed as requiring them to be performed in a particular order described or illustrated unless the order of performance is explicitly indicated. It should also be understood that additional or alternative steps may be used.

[0132] The above description is merely a specific embodiment of this application, enabling those skilled in the art to understand or implement this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features claimed herein.

Claims

1. A bandwidth allocation method, characterized in that, Applied to smart network interface cards, the method includes: Real-time monitoring of network status indicators for multiple dedicated line links; Based on the network status indicators, the heat analysis of service flows transmitted on multiple leased links is performed to identify hot flows that meet preset conditions. Based on the flow characteristics of the heat flow and the network status indicators, a target link is selected from multiple leased links; A hardware direct forwarding channel is established for the heat flow on the target link, and the configuration information of the hardware direct forwarding channel is synchronized to the control component; The receiving control component sends a global bandwidth allocation policy based on the configuration information, and according to the global bandwidth allocation policy and the network status indicators, calls the hardware direct forwarding channel to perform local traffic scheduling for the hot flow; The step of performing heat analysis on service flows transmitted on multiple leased links based on the network status indicators to identify hot flows that meet preset conditions includes: Extract bandwidth utilization data and transmission latency data for each dedicated line link from the network status indicators; Within the sliding time window, the number of bytes for each service stream is calculated based on the bandwidth utilization data, and the packet rate for each service stream is calculated based on the transmission delay data. When the number of bytes in any service flow within the window exceeds a first threshold, or the packet rate exceeds a second threshold, the service flow is determined to be a hot flow.

2. The method according to claim 1, characterized in that, The step of selecting a target link from multiple leased links based on the flow characteristics of the heat flow and the network status indicators includes: Extract the remaining bandwidth and current latency of each dedicated line link from the network status indicators; If the remaining bandwidth of any leased link is greater than or equal to the bandwidth of the heat flow, the leased link is identified as a candidate link, and a candidate link set is obtained. The candidate link with the lowest current latency in the candidate link set is determined as the target link.

3. The method according to claim 1, characterized in that, After invoking the hardware direct forwarding channel to perform local traffic scheduling for the hot flow based on the global bandwidth allocation strategy and the network status indicators, the method further includes: Extract the remaining available bandwidth of each leased link from the network status indicators; When the remaining available bandwidth is lower than a preset threshold, the bandwidth sharing weight of each service flow is recalculated according to the service priority level defined in the global bandwidth allocation strategy, and the flow table output port configuration of the hardware direct forwarding channel is adjusted according to the recalculated bandwidth sharing weight.

4. The method according to claim 1, characterized in that, The global bandwidth allocation strategy issued by the receiving control component based on the configuration information includes: The control component receives the approval result of the hardware direct forwarding channel through the first channel, and the first channel adopts a low-latency transmission protocol. The system receives the complete parameters of the global bandwidth allocation strategy issued by the control component through a second channel, which employs a reliable transmission protocol. When a discrepancy is detected between the bandwidth allocation policy version of the local storage and the policy version of the control component, a resynchronization request is initiated to the control component.

5. The method according to claim 1, characterized in that, The method further includes: When the remaining available bandwidth of the target link is detected to be continuously lower than the fault threshold for a preset time, the transmission of the hot flow through the hardware direct forwarding channel is terminated, and a new hardware direct forwarding channel is established by reselecting a backup link from multiple leased links, and the channel switching event is reported to the control component.

6. The method according to claim 5, characterized in that, The method further includes: When all backup links fail to meet bandwidth requirements, the hardware direct-connection forwarding channel binding of the hot flow is released, and the encapsulation and forwarding operation of the hot flow is performed by the host central processing unit.

7. The method according to claim 1, characterized in that, The step of invoking the hardware direct forwarding channel to perform local traffic scheduling for the hot flow based on the global bandwidth allocation strategy and the network status indicators includes: The physical bandwidth resources of multiple dedicated line links are virtualized into a unified global bandwidth pool, wherein the real-time total capacity of the global bandwidth pool is dynamically adjusted based on the bandwidth utilization of each link in the network status indicators. Based on the tenant quota and service priority parameters defined in the global bandwidth allocation strategy, the bandwidth token allocation quota for the hot flow is determined from the global bandwidth pool. The bandwidth token allocation quota is positively correlated with the real-time remaining bandwidth of the target link where the hot flow is located. Configure the token bucket parameters in the flow table entry corresponding to the hardware direct forwarding channel according to the bandwidth token allocation quota; The hardware direct forwarding channel allocates dedicated bandwidth tokens to the hot flow based on the token bucket parameters and implements token rate limiting forwarding.

8. A bandwidth allocation device, characterized in that, The device, applied to a smart network interface card, includes: The monitoring module is used to monitor the network status indicators of multiple leased links in real time. The identification module is used to perform heat analysis on the service flows transmitted on multiple leased links based on the network status indicators, and identify the hot flows that meet the preset conditions. The selection module is used to select a target link from multiple leased links based on the flow characteristics of the heat flow and the network status indicators. A module is established to create a hardware direct forwarding channel for the heat flow on the target link and to synchronize the configuration information of the hardware direct forwarding channel to the control component. The scheduling module is used to receive the global bandwidth allocation policy issued by the control component based on the configuration information, and, according to the global bandwidth allocation policy and the network status indicators, call the hardware direct forwarding channel to perform local traffic scheduling for the hot flow. Specifically, the identification module is used for: Extract bandwidth utilization data and transmission latency data for each dedicated line link from the network status indicators; Within the sliding time window, the number of bytes for each service stream is calculated based on the bandwidth utilization data, and the packet rate for each service stream is calculated based on the transmission delay data. When the number of bytes in any service flow within the window exceeds a first threshold, or the packet rate exceeds a second threshold, the service flow is determined to be a hot flow.

9. An electronic device, characterized in that, include: A processor and a memory, the processor being configured to execute a bandwidth allocation program stored in the memory to implement the bandwidth allocation method according to any one of claims 1-7.

10. A storage medium, characterized in that, The storage medium stores one or more programs, which can be executed by one or more processors to implement the bandwidth allocation method according to any one of claims 1-7.