Adaptive bandwidth equalization method and apparatus, device, storage medium and program product
By using real-time monitoring and generating traffic tokens, the problem of resource imbalance caused by bandwidth contention in SoC systems is solved, achieving adaptive bandwidth balancing and system stability.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- WUXI STARS MICRO SYSTEM TECHNOLOGIES CO LTD
- Filing Date
- 2025-10-15
- Publication Date
- 2026-04-23
AI Technical Summary
Bandwidth contention issues exist in SoC systems, leading to uneven resource allocation and affecting system stability and performance.
By monitoring the service status of secondary nodes of each bandwidth-competing node in real time, a request cache queue is generated, and traffic tokens are generated based on the response data offloading rate. The request cache queue is polled and continuously marked to achieve adaptive bandwidth balancing.
This achieves a balanced allocation of bandwidth across all secondary nodes, ensuring the orderliness of business requests and the stability of the dynamically operating system.
Smart Images

Figure CN2025127820_23042026_PF_FP_ABST
Abstract
Description
Bandwidth adaptive equalization methods, devices, equipment, storage media, and software products
[0001] Cross-references to related applications
[0002] This application claims priority to Chinese Patent Application No. 202411452705.7, filed on October 17, 2024, entitled "Bandwidth Adaptive Equalization Method, Apparatus, Device, Storage Medium and Program Product", the entire contents of which are incorporated herein by reference. Technical Field
[0003] This application relates to the field of integrated circuit technology, specifically to bandwidth adaptive equalization methods, apparatus, devices, storage media, and program products. Background Technology
[0004] A System-on-Chip (SoC) is a complex integrated circuit that integrates a processor, memory, input / output ports, and other components within a limited space. With technological advancements, the demand for high bandwidth, low latency, and balanced bandwidth is becoming increasingly urgent, leading to bandwidth contention issues for SoC systems. Specifically, bus bandwidth contention occurs in computer networks or multiprocessor systems when multiple nodes simultaneously access a limited target bandwidth resource. This results in uneven resource allocation and performance degradation, potentially causing decreased overall SoC system throughput, increased transmission latency, sudden surges in requests at certain nodes consuming most of the bandwidth and leaving other nodes with insufficient bandwidth, and imbalances in bandwidth distribution between nodes and between secondary nodes under each node, all of which affect system stability.
[0005] Therefore, there is an urgent need for a bandwidth adaptive balancing method to evenly allocate bandwidth resources among the nodes in a SoC system and ensure system stability. Summary of the Invention
[0006] In view of this, the purpose of this application is to provide a bandwidth adaptive balancing method, apparatus, device, storage medium and program product to solve the problem of uneven bandwidth resource allocation among various bandwidth-competing nodes.
[0007] Firstly, this application provides a bandwidth adaptive equalization method, the method comprising:
[0008] Real-time monitoring of the service status of each secondary node under each bandwidth contention node, and classification and caching of the service requests sent by each secondary node according to the response data offloading rate, generating a request cache queue corresponding to each secondary node;
[0009] Every first unit of time, based on the unloading rate of the response data of each secondary node, a target number of traffic tokens corresponding to each secondary node are generated;
[0010] Every second unit of time, the request cache queue and traffic token quantity of each secondary node under each bandwidth competition node are polled. When the traffic token quantity of the target secondary node is sufficient, each service request in the request cache queue corresponding to the target secondary node is read out and marked as consecutive, and a node consecutively marked request cache queue corresponding to each bandwidth competition node is generated.
[0011] Poll the continuous marked request cache queues of each bandwidth contention node, read out the service requests marked as continuous in the continuous marked request cache queues of each node, and continuously schedule them to the target side so that the target side can respond to and execute each service request continuously scheduled to the target side.
[0012] In one optional implementation, the step of polling the request cache queues and traffic token counts corresponding to each secondary node under each bandwidth contention node every second unit of time includes:
[0013] Determine the order of each secondary node under each bandwidth contention node;
[0014] The polling order of each secondary node under each bandwidth contention node is determined based on the order of the secondary nodes under each bandwidth contention node.
[0015] According to the polling order of each secondary node under each bandwidth contention node, the request cache queue and traffic token quantity corresponding to each secondary node under each bandwidth contention node are polled every second unit of time.
[0016] In one optional implementation, when the number of traffic tokens at the target secondary node is sufficient, reading out each service request from the request cache queue corresponding to the target secondary node, marking each read service request as consecutive, and generating a node consecutive marking request cache queue corresponding to each bandwidth-competing node, includes:
[0017] Get the number of traffic tokens in the request cache queue corresponding to the target second-level node;
[0018] Based on the number of traffic tokens corresponding to the target secondary node, allow business requests in the request cache queue corresponding to the target secondary node to proceed;
[0019] The service requests released in the request cache queues of each secondary node under the bandwidth contention node where the target secondary node is located are marked continuously in the order of release, and a node-marked request cache queue corresponding to the bandwidth contention node where the target secondary node is located is generated.
[0020] In an optional implementation, the method further includes:
[0021] Identify the bandwidth-competing node that will acquire the current arbitration right;
[0022] The service requests marked as consecutive in the continuous request cache queue of the node corresponding to the bandwidth competition node that has obtained the current arbitration right will be continuously scheduled to the target side.
[0023] In one optional implementation, when the target secondary node's service is suspended or malfunctions, the request cache queue corresponding to the target secondary node is empty.
[0024] In one optional implementation, the step of polling the request cache queues and traffic token counts corresponding to each secondary node under each bandwidth contention node every second unit of time includes:
[0025] When the polling reaches the request cache queue corresponding to the target second-level node, and the request cache queue corresponding to the target second-level node is empty, jump to the request cache queue corresponding to the next second-level node in the next order of the target second-level node.
[0026] Secondly, this application provides a bandwidth adaptive equalization device, the device comprising:
[0027] The business monitoring module is used to monitor the business status of each secondary node under each bandwidth competition node in real time, and classify and cache the business requests sent by each secondary node according to the response data offloading rate, and generate a request cache queue corresponding to each secondary node.
[0028] The traffic token generation module is used to generate a target number of traffic tokens corresponding to each secondary node based on the response data offloading rate of each secondary node every first unit of time.
[0029] The request continuation marking module is used to poll the request cache queues and traffic token counts of each secondary node under each bandwidth contention node every second unit of time. When the number of traffic tokens of the target secondary node is sufficient, it reads out each service request from the request cache queue corresponding to the target secondary node and marks each read service request as continuation, generating a node continuation marking request cache queue corresponding to each bandwidth contention node. The scheduling module is used to poll the node continuation marking request cache queue corresponding to each bandwidth contention node, read out the service requests marked as continuation from each node continuation marking request cache queue, and continuously schedule them to the target side so that the target side can respond to and execute each service request continuously scheduled to the target side.
[0030] Thirdly, this application provides a computer device, including: a memory and a processor, which are communicatively connected to each other. The memory stores computer instructions, and the processor executes the computer instructions to perform the bandwidth adaptive equalization method of the first aspect or any corresponding embodiment described above.
[0031] Fourthly, this application provides a computer-readable storage medium storing computer instructions for causing a computer to execute the bandwidth adaptive equalization method of the first aspect or any corresponding embodiment described above.
[0032] Fifthly, this application provides a computer program product, including computer instructions for causing a computer to execute the bandwidth adaptive equalization method of the first aspect or any corresponding embodiment described above.
[0033] The technical solution provided in this application may include the following beneficial effects:
[0034] This application classifies and caches the service requests of each secondary node obtained from real-time monitoring according to the response data offloading rate, generating a request cache queue corresponding to each secondary node. Based on the response data offloading rate of each secondary node, a target number of traffic tokens are generated for each secondary node. When the number of traffic tokens for the target secondary node is sufficient, each service request in the request cache queue corresponding to the target secondary node is read and continuously marked, generating a node-continuously marked request cache queue corresponding to each bandwidth-competing node. This ensures that the service request sending rate of the secondary node matches the response data offloading rate. Finally, the node-continuously marked request cache queue corresponding to each bandwidth-competing node is polled, and the service requests marked as continuous in the node-continuously marked request cache queue are continuously scheduled to the target side for response and execution. This achieves a balanced allocation of bandwidth among the secondary nodes, ensuring the orderliness and balance of executing service requests from each secondary node, thereby guaranteeing the constant stability of the dynamically operating system. Attached Figure Description
[0035] To more clearly illustrate the technical solutions in the specific embodiments of this application or the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0036] Figure 1 is a flowchart illustrating the bandwidth adaptive equalization control strategy in related technologies;
[0037] Figure 2 is a flowchart illustrating the bandwidth adaptive equalization method according to an embodiment of this application;
[0038] Figure 3 is a flowchart illustrating another bandwidth adaptive equalization method according to an embodiment of this application;
[0039] Figure 4 is a schematic diagram of the bandwidth adaptive equalization system according to an embodiment of this application;
[0040] Figure 5 is a schematic diagram of the structure of the bandwidth adaptive equalization system according to an embodiment of this application when a fault occurs;
[0041] Figure 6 is a structural block diagram of a bandwidth adaptive equalization device according to an embodiment of this application;
[0042] Figure 7 is a schematic diagram of the hardware structure of a computer device according to an embodiment of this application. Detailed Implementation
[0043] 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.
[0044] A System-on-a-Chip (SoC) is a complex integrated circuit that integrates multiple functions, including a processor, memory, and input / output ports, within a limited space. With technological advancements, the demand for high bandwidth, low latency, and balanced bandwidth has become more urgent, leading to bandwidth competition challenges for SoC systems. This bandwidth competition primarily manifests as the struggle among multiple processing units, storage units, and peripherals within the SoC for limited bus bandwidth and memory resources.
[0045] Specifically, bus bandwidth contention occurs in computer networks or multiprocessor systems when multiple nodes simultaneously access a limited target bandwidth resource, leading to uneven resource allocation and performance degradation. A related technology, multi-node traffic bandwidth control based on on-chip interconnect routing, is shown in Figure 1. When executing a read target request, the node directly accesses the bus and initiates control; the target side responds and returns response data. The process for writing to the target is similar. However, this method cannot identify the different response data offloading rates of each node. It's possible that when the target side returns response data at a high bandwidth and fast rate, the node's response data offloading rate is insufficient, failing to offload in time, thus slowing down the target side's bandwidth. Furthermore, this method can only provide quasi-static bandwidth resources to each node based on the SoC system's service allocation ratio, and cannot dynamically adjust the node's bandwidth allocation ratio according to changes in the actual service situation of each node and the target bandwidth status. The response data offloading rate refers to the speed at which data is read from or written to storage devices (such as hard drives, solid-state drives, etc.) in a computer system. Therefore, this method leads to the following problems:
[0046] (1) When data is read back from the target side, a certain secondary node in the node may occupy the target bus and the node bus due to the low response data unloading rate and long data transmission time, resulting in a reduction in the bandwidth utilization of the SoC system.
[0047] (2) When writing data to the target, a secondary node with low data transmission capability in the node transmits data at a slower rate, resulting in the node bus and target bus being occupied for too long.
[0048] (3) When a secondary node in a node suspends its service or fails, the bandwidth of that secondary node will be occupied by other secondary nodes in the node. This shows that the secondary node in the node with suspended or failed service has a larger bandwidth than other secondary nodes in the node with the same response data offloading rate, resulting in an unbalanced bandwidth distribution.
[0049] (4) When the target experiences temporary back pressure, there are many requests that have been sent by the nodes and converged in the flow control bandwidth allocation unit. All nodes compete for the opportunity to send requests, and the bandwidth ratio of secondary nodes cannot be guaranteed, resulting in uneven bandwidth allocation.
[0050] (5) Long-term bandwidth competition may lead to unstable resource allocation in the SoC system, affecting system stability.
[0051] Therefore, this application provides a bandwidth adaptive balancing method that executes a corresponding proportion of service requests based on the response data offloading rate of each secondary node, so as to achieve balanced allocation of bandwidth among the secondary nodes and ensure system stability.
[0052] According to an embodiment of this application, a bandwidth adaptive equalization method embodiment is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0053] This embodiment provides a bandwidth adaptive balancing method, which can be used in desktop computers, laptops, servers, etc. Figure 2 is a flowchart of the bandwidth adaptive balancing method according to an embodiment of this application. As shown in Figure 2, the process includes the following steps:
[0054] Step S201: Monitor the service status of each secondary node under each bandwidth competition node in real time, and classify and cache the service requests sent by each secondary node according to the response data offloading rate, and generate a request cache queue corresponding to each secondary node.
[0055] In bus bandwidth contention scenarios, a node (i.e., a bandwidth contention node) refers to different devices or components connected to the same bus, such as a CPU, memory, graphics card, storage device, expansion card, etc. Secondary nodes refer to devices or components connected to the primary node (i.e., the bandwidth contention node), typically acting as intermediaries between the primary node and the external devices that actually perform data processing and transmission, such as the southbridge, northbridge, and bus controller. Each bandwidth contention node corresponds to multiple secondary nodes with different response data offload rates. The number of secondary nodes corresponding to each bandwidth contention node and the response data offload rate of each secondary node are set according to actual needs. For example, a bandwidth contention node may correspond to four secondary nodes, and the response data offload rate ratio of these four secondary nodes is 1:2:3:4.
[0056] When monitoring the service status of each secondary node, a unified monitoring module can be set up to monitor each secondary node, or a monitoring module can be set up for each bandwidth contention node. The monitoring of each module may not be synchronized. The working status of each monitoring module can be configured separately according to requirements to monitor the service status of each secondary node under each bandwidth contention node. When caching service requests for each secondary node, each secondary node's service requests are cached independently, with each secondary node corresponding to a different response data offloading rate. When generating request cache queues, they can be arranged according to the arrival time of service requests. The generated request cache queues contain the response data offloading rate information of the corresponding secondary node. Alternatively, request cache queues can be generated for each secondary node under each bandwidth contention node, meaning the request cache queues also contain information about the bandwidth contention node to which the corresponding secondary node belongs. The process of generating request cache queues for each bandwidth contention node may not be synchronized; specific configurations can be made according to requirements.
[0057] Step S202: Every first unit of time, generate a target number of traffic tokens corresponding to each secondary node based on the unloading rate of the response data of each secondary node.
[0058] Traffic token generation for each secondary node is performed independently. That is, for the target secondary node, a target number of traffic tokens corresponding to the response data offloading rate of the target secondary node are generated every first unit of time. Alternatively, traffic tokens can be generated on a per-bandwidth-contention node basis, with a target number of traffic tokens corresponding to each secondary node generated every first unit of time based on the response data offloading rate ratio of each secondary node under the target bandwidth-contention node. The first unit of time can be set according to actual needs.
[0059] The traffic token generation rate is related to a preset setting, such as 3 traffic tokens per second. The target number of traffic tokens generated by each secondary node every first unit of time is also related to the response data offloading rate. For example, if the response data offloading rate ratio of the four secondary nodes is 1:2:3:4, then the target number ratio of traffic tokens generated by the four secondary nodes every first unit of time is also 1:2:3:4.
[0060] Step S203: Every second unit of time, poll the request cache queue and traffic token quantity corresponding to each secondary node under each bandwidth competition node. When the traffic token quantity of the target secondary node is sufficient, read out each service request in the request cache queue corresponding to the target secondary node, mark each read service request as consecutive, and generate a node consecutively marked request cache queue corresponding to each bandwidth competition node.
[0061] Polling and continuous marking are performed on a per-bandwidth-competing-node basis. Polling of various bandwidth-competing nodes can occur simultaneously. Every second time unit, the request cache queues and traffic token counts of each secondary node under the target bandwidth-competing node are polled sequentially according to a preset order to allow service requests matching the number of traffic tokens. This polling continues until all secondary nodes under the target bandwidth-competing node have been polled. During reading, service requests are read sequentially from the request cache queues of each secondary node under the target bandwidth-competing node in a preset order. After reading all allowed service requests from one secondary node, all allowed service requests from the next secondary node are read, until all allowed service requests from all secondary nodes under the target bandwidth-competing node have been read. During continuous marking, all read service requests are marked as continuous according to the reading order, and a continuous marking request cache queue corresponding to the target bandwidth-competing node is generated according to the reading order. This process is repeated for each bandwidth-competing node to generate a continuous marking request cache queue. The second unit time can be set according to actual needs. The target bandwidth contention node is any one of the bandwidth contention nodes, and the target secondary node under the target bandwidth contention node is any one of the secondary nodes under the target bandwidth contention node.
[0062] Step S204: Poll the continuous marking request cache queue of each bandwidth contention node, read out the service requests marked as continuous in the continuous marking request cache queue of each node, and continuously schedule them to the target side so that the target side can respond to and execute each service request continuously scheduled to the target side.
[0063] The priority of each bandwidth-competing node can be pre-set according to requirements, and services can be scheduled according to the priority order of the consecutively marked request cache queues corresponding to each bandwidth-competing node. Service requests marked as consecutive in the consecutively marked request cache queues are scheduled sequentially to the target side. During service request scheduling, the consecutively marked request cache queues corresponding to one bandwidth-competing node are scheduled before scheduling the next. The target side responds to service requests according to the scheduling order and executes the corresponding services.
[0064] The bandwidth adaptive balancing method provided in this embodiment classifies and caches the service requests of each secondary node obtained from real-time monitoring according to the response data offloading rate, generating a request cache queue corresponding to each secondary node. Based on the response data offloading rate of each secondary node, a target number of traffic tokens corresponding to each secondary node are generated. When the number of traffic tokens for the target secondary node is sufficient, each service request in the request cache queue corresponding to the target secondary node is read out and continuously marked, generating a node-continuously marked request cache queue corresponding to each bandwidth-competing node. This ensures that the service request sending rate of the secondary node matches the response data offloading rate. Finally, the node-continuously marked request cache queue corresponding to each bandwidth-competing node is polled, and the service requests marked as continuous in the node-continuously marked request cache queue are continuously scheduled to the target side for response and execution. This achieves balanced allocation of bandwidth among the secondary nodes, ensuring the orderliness and balance of executing service requests from each secondary node, thereby guaranteeing the constant stability of the dynamically operating system.
[0065] This embodiment provides a bandwidth adaptive balancing method, which can be used in desktop computers, laptops, servers, etc. Figure 3 is a flowchart of the bandwidth adaptive balancing method according to an embodiment of this application. As shown in Figure 3, the process includes the following steps:
[0066] Step S301: Monitor the service status of each secondary node under each bandwidth competition node in real time, and classify and cache the service requests sent by each secondary node according to the response data offloading rate, and generate a request cache queue corresponding to each secondary node.
[0067] For details, please refer to step S201 of the embodiment shown in Figure 2, which will not be repeated here.
[0068] Step S302: Every first unit of time, generate a target number of traffic tokens corresponding to each secondary node based on the unloading rate of the response data of each secondary node.
[0069] For details, please refer to step S202 of the embodiment shown in Figure 2, which will not be repeated here.
[0070] Step S303: Every second unit of time, poll the request cache queue and the number of traffic tokens corresponding to each secondary node under each bandwidth competition node.
[0071] Specifically, step S303 includes:
[0072] Step S3031: Determine the order of each secondary node under each bandwidth contention node.
[0073] For example, when determining the order of each secondary node under the target bandwidth competition node, the secondary nodes can be numbered according to their response data offloading rate, for example, numbered in ascending order of response data offloading rate, and the order of each secondary node can be determined according to the numbering order of each secondary node.
[0074] Step S3032: Determine the polling order of each secondary node under each bandwidth contention node according to the order of each secondary node under each bandwidth contention node.
[0075] For example, polling of each bandwidth-contending node can be performed simultaneously. When polling each secondary node under the target bandwidth-contending node, the polling proceeds in the order of the secondary nodes under the target bandwidth-contending node, polling one secondary node after polling the next in sequence. This process is repeated to determine the polling order of each secondary node.
[0076] Step S3033: According to the polling order of each secondary node under each bandwidth competition node, poll the request cache queue and traffic token quantity corresponding to each secondary node under each bandwidth competition node every second unit of time.
[0077] According to the polling order of each secondary node determined in step S3032, all secondary nodes under the target bandwidth competition node are polled once every second unit of time. After polling the request cache queue and traffic token quantity corresponding to a secondary competition node, the request cache queue and traffic token quantity corresponding to the next secondary node in the sequence are polled.
[0078] Step S304: When the number of traffic tokens of the target secondary node is sufficient, read out each service request in the request cache queue corresponding to the target secondary node, mark each read service request as consecutive, and generate a node consecutive marked request cache queue corresponding to each bandwidth competing node.
[0079] Specifically, step S304 includes:
[0080] Step S3041: Obtain the number of traffic tokens in the request cache queue corresponding to the target secondary node.
[0081] Read each business request in the request cache queue corresponding to the target secondary node, and read the number of traffic tokens in the traffic token bucket corresponding to the target secondary node.
[0082] Step S3042: Allow business requests in the request cache queue corresponding to the target secondary node to pass according to the number of traffic tokens corresponding to the target secondary node.
[0083] The number of traffic tokens determines the number of business requests that can be allowed. The correspondence between the number of traffic tokens and the number of business requests allowed can be set according to actual needs, for example, one traffic token allows one business request. Once the traffic tokens are exhausted, no more business requests can be allowed. In other words, each round of allowing requests may not be able to allow all existing business requests in the request cache queue.
[0084] Step S3043: Mark the released business requests in the request cache queues of each secondary node under the bandwidth competition node where the target secondary node is located in the order of release, and generate a node continuously marked request cache queue corresponding to the bandwidth competition node where the target secondary node is located.
[0085] After each round of release is completed, each business request can be continuously marked according to the release order, and each business request can be marked as continuous. Alternatively, a mark can be made once for each business request released, thereby generating a node continuous mark request cache queue corresponding to the bandwidth competition node where the target secondary node is located. In other words, the business requests released by each secondary node under a bandwidth competition node are stored in the same node continuous mark request cache queue after being continuously marked.
[0086] Step S305: Poll the continuous marking request cache queue of each bandwidth contention node, read out the service requests marked as continuous in the continuous marking request cache queue of each node, and continuously schedule them to the target side so that the target side can respond to and execute each service request continuously scheduled to the target side.
[0087] For details, please refer to step S204 of the embodiment shown in Figure 2, which will not be repeated here.
[0088] Optionally, an arbitration right is set during scheduling. During round-robin scheduling, a fair RR (Round Robin) arbitration is performed on the non-empty node's consecutive marked request cache queue to determine the bandwidth contention node that obtains the current arbitration right. Only the bandwidth contention node that obtains the arbitration right can schedule service requests. Then, the consecutively marked service requests in the consecutive marked request queue of the node corresponding to the current bandwidth contention node are read out, and the consecutively marked service requests are consecutively scheduled to the target side.
[0089] In practical applications, secondary nodes may experience service interruptions or malfunctions. When a target secondary node experiences service interruptions or malfunctions, its service status is still monitored in real time, and a corresponding request cache queue is generated, albeit empty. Then, every second unit of time, the request cache queues and traffic token counts of each secondary node under each bandwidth-competing node are polled. If the request cache queue corresponding to the target secondary node is found to be empty, the process jumps to the request cache queue of the next secondary node in the order following the target secondary node. In other words, secondary nodes experiencing service interruptions or malfunctions also participate in the polling every second unit of time, but are skipped when an empty request cache queue corresponding to a secondary node is encountered. It should be noted that this embodiment operates in a dynamic system. During the operation of a dynamic system, topology changes of the target secondary node (e.g., secondary node malfunction or temporary service interruption) do not affect the bandwidth of other secondary nodes.
[0090] Based on the above scheme, this application generates a corresponding request cache queue and a corresponding target number of traffic tokens according to the response data offloading rate of each secondary node. The traffic tokens are used to allow business requests in the request cache queue to pass through, thereby achieving a balanced match between the business request sending and response data offloading rates of each secondary node. When a secondary node suddenly receives a large number of business requests, the business requests of that secondary node are allowed to pass through at a rate corresponding to the bandwidth allocation ratio. This ensures that the total traffic required to pass through the business requests of that secondary node matches the bandwidth allocated to that secondary node. This avoids the situation where too much data is returned after the target side processes the business requests of that secondary node, but the response data offloading rate of the secondary node is insufficient, resulting in the returned data occupying the target bus for a long time and wasting the bandwidth of the target side. This application also continuously marks the service requests released by each secondary node under each bandwidth contention node and uniformly participates in request scheduling, so as to realize the sharing of service status among secondary nodes under different bandwidth contention nodes. This ensures that under dynamic actual service status of nodes and complex link conditions, such as when some secondary nodes' services are suspended or fail, after the temporary backpressure of the target bus is withdrawn, or when some secondary nodes suddenly receive a large number of requests, each secondary node can send the service requests to the destination side according to the response data offloading rate, thus ensuring the adaptive and balanced sharing of bandwidth among secondary nodes.
[0091] The bandwidth adaptive balancing method provided in this embodiment classifies and caches the service requests of each secondary node obtained from real-time monitoring according to the response data offloading rate, generating a request cache queue corresponding to each secondary node. Based on the response data offloading rate of each secondary node, a target number of traffic tokens corresponding to each secondary node are generated. When the number of traffic tokens for the target secondary node is sufficient, each service request in the request cache queue corresponding to the target secondary node is read out and continuously marked, generating a node-continuously marked request cache queue corresponding to each bandwidth-competing node. This ensures that the service request sending rate of the secondary node matches the response data offloading rate. Finally, the node-continuously marked request cache queue corresponding to each bandwidth-competing node is polled, and the service requests marked as continuous in the node-continuously marked request cache queue are continuously scheduled to the target side for response and execution. This achieves balanced allocation of bandwidth among the secondary nodes, ensuring the orderliness and balance of executing service requests from each secondary node, thereby guaranteeing the constant stability of the dynamically operating system.
[0092] As one or more specific application embodiments of this application, the optimal implementation scheme or the scheme that the inventors most want to embody is described below in conjunction with specific application scenarios.
[0093] Figure 4 is a schematic diagram of the bandwidth adaptive balancing system according to an embodiment of this application. As shown in Figure 4, in this bandwidth adaptive balancing system, there are three nodes (corresponding to the aforementioned bandwidth contention nodes): node 0, node 1, and node 2. Each node has four secondary nodes, and the four secondary nodes under each node are numbered x1, x2, x3, and x4. The larger the number, the faster the response data offloading rate. The response data offloading rate ratio of the four secondary nodes is 1:2:3:4. Each node corresponds to a node real-time service monitoring unit, a request rate control unit, and a request continuity marking unit. The node real-time service monitoring unit is used to monitor the service status of each secondary node under the corresponding bandwidth contention node in real time, and classifies and caches the service requests sent by each secondary node according to the response data offloading rate, generating a request cache queue corresponding to each secondary node. The request rate control unit generates a target number of traffic tokens corresponding to each secondary node every first unit time, based on the response data unloading rate of each secondary node. This ensures that the business request sending rate of the secondary node matches its response data unloading rate. The proportion of traffic tokens generated by the secondary node every first unit time is the same as the proportion of the response data unloading rate. For example, if the traffic token bucket of secondary node x1 generates A traffic tokens in the first unit time, the traffic token bucket of secondary node x2 generates 2A traffic tokens in the first unit time, the traffic token bucket of secondary node x3 generates 3A traffic tokens in the first unit time, and the traffic token bucket of secondary node x4 generates 4A traffic tokens in the first unit time. The continuous marking unit is used to poll the request cache queues and traffic token counts of each secondary node under the corresponding bandwidth contention node in order of number every second unit of time. When the number of traffic tokens of a secondary node is sufficient, it reads each service request from the request cache queue of that secondary node. After reading all the allowed service requests of a secondary node, it reads all the allowed service requests of the next secondary node in the order. This process continues until all the allowed service requests of all secondary nodes under the target bandwidth contention node have been read. When performing continuous marking, all read service requests are marked in the order of reading, and a continuous marking request cache queue corresponding to the corresponding bandwidth contention node is generated in the order of reading. For example, the continuous marking starts with the first approved business request of the first secondary node being 1 and continues to be 1 until the last approved business request of the last secondary node is 0. Specifically, starting from the request cache queue of the first secondary node, the first approved business request is marked as 1. When polling the request cache queue of the last secondary node, the last business request allowed by the traffic token is marked as 0. After reading the request from the secondary node, it is marked as continuous and cached in the continuous request cache queue of the node corresponding to the bandwidth competition node where the secondary node is located.
[0094] In this bandwidth adaptive load balancing system, a multi-node request continuity marking arbitration unit is also set up to determine the bandwidth contention node that acquires the current arbitration right, and to continuously schedule the requests marked as continuous in the continuous request cache queue corresponding to the bandwidth contention node to the target side. For example, based on the continuity marking of the bandwidth contention node that acquires the current arbitration right, the scheduling of each service request in the continuous marking request cache queue is performed. The continuity marking starts from 1 and ends at 0. When the continuity marking is 0, the scheduling of the bandwidth contention node that acquires the current arbitration right ends.
[0095] Figure 5 is a schematic diagram of the bandwidth adaptive balancing system according to an embodiment of this application when a fault occurs. As shown in Figure 5, the services of secondary nodes x3 of node 0 and x4 of node 2 are suspended or fail. At this time, the service status of secondary nodes x3 of node 0 and x4 of node 2 is still monitored in real time, and request cache queues corresponding to secondary nodes x3 of node 0 and x4 of node 2 are generated. However, the request cache queues corresponding to secondary nodes x3 of node 0 and x4 of node 2 are empty. Then, when polling the request cache queues and traffic token counts of each secondary node every second unit of time, when the request cache queues corresponding to secondary nodes x3 of node 0 and x4 of node 2 are polled, the process jumps to the request cache queues of the next secondary node in the order. That is to say, secondary nodes x3 of node 0 and x4 of node 2 also participate in the polling, but when they are polled, they are skipped.
[0096] This embodiment also provides a bandwidth adaptive equalization device for implementing the above embodiments and optional implementations; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in hardware and software, hardware or software implementation is also possible and contemplated.
[0097] This embodiment provides a bandwidth adaptive equalization device, as shown in Figure 6, including:
[0098] The business monitoring module 601 is used to monitor the business status of each secondary node under each bandwidth competition node in real time, and classify and cache the business requests sent by each secondary node according to the response data offloading rate, and generate a request cache queue corresponding to each secondary node.
[0099] The traffic token generation module 602 is used to generate a target number of traffic tokens corresponding to each secondary node based on the response data unloading rate of each secondary node every first unit of time.
[0100] The continuous marking module 603 is used to poll the request cache queue and traffic token quantity of each secondary node under each bandwidth competition node every second unit of time. When the traffic token quantity of the target secondary node is sufficient, it reads out each service request in the request cache queue corresponding to the target secondary node and marks each read service request as continuous, generating a continuous marking request cache queue corresponding to each bandwidth competition node.
[0101] The scheduling module 604 is used to poll the continuous marked request cache queues of each bandwidth contention node, read out the service requests marked as continuous in the continuous marked request cache queues of each node, and continuously schedule them to the target side so that the target side can respond to and execute each service request continuously scheduled to the target side.
[0102] In an optional implementation, the request continuation marking module is further configured to: determine the order of each secondary node under each bandwidth contention node; determine the polling order of each secondary node under each bandwidth contention node according to the order of each secondary node under each bandwidth contention node; and poll the request cache queue and traffic token quantity corresponding to each secondary node under each bandwidth contention node every second unit of time according to the polling order of each secondary node under each bandwidth contention node.
[0103] In an optional implementation, the request continuous marking module is further configured to: obtain the number of traffic tokens in the request cache queue corresponding to the target secondary node; allow service requests in the request cache queue corresponding to the target secondary node according to the number of traffic tokens corresponding to the target secondary node; continuously mark the allowed service requests in the request cache queues of each secondary node under the bandwidth competition node where the target secondary node is located according to the order of release, and generate a node continuous marking request cache queue corresponding to the bandwidth competition node where the target secondary node is located.
[0104] In an optional implementation, the scheduling module is further configured to: determine the bandwidth contention node that acquires the current arbitration right; and continuously schedule the service requests marked as consecutive in the continuous marking request cache queue of the node corresponding to the bandwidth contention node that acquires the current arbitration right to the target side.
[0105] In one optional implementation, when the target secondary node's service is suspended or malfunctions, the request cache queue corresponding to the target secondary node is empty.
[0106] In an optional implementation, the request continuation marking module is further configured to: when polling the request cache queue corresponding to the target secondary node and the request cache queue corresponding to the target secondary node is empty, jump to the request cache queue corresponding to the next sequential secondary node of the target secondary node.
[0107] The optional functional descriptions of the above modules and units are the same as those in the corresponding embodiments described above, and will not be repeated here.
[0108] In this embodiment, the bandwidth adaptive equalization device is presented in the form of a functional unit. Here, a unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that execute one or more software or fixed programs, and / or other devices that can provide the above functions.
[0109] This application also provides a computer device having the bandwidth adaptive equalization device shown in FIG6 above.
[0110] Please refer to Figure 7, which is a schematic diagram of the structure of a computer device provided in an optional embodiment of this application. As shown in Figure 7, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting the various components, including high-speed interfaces and low-speed interfaces. The various components communicate with each other using different buses and can be installed on a common motherboard or otherwise as needed. The processor can process instructions executed within the computer device, including instructions stored in or on memory to display graphical information of a GUI on an external input / output device (such as a display device coupled to the interface). In some optional embodiments, multiple processors and / or multiple buses can be used with multiple memories and multiple memory modules, if desired. Similarly, multiple computer devices can be connected, each providing some of the necessary operations (e.g., as a server array, a group of blade servers, or a multiprocessor system). Figure 7 uses one processor 10 as an example.
[0111] Processor 10 may be a central processing unit, a network processor, or a combination thereof. Optionally, processor 10 may also include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The programmable logic device may be a complex programmable logic device (CAMP), a field-programmable gate array (FPGA), a general-purpose array logic (GDA), or any combination thereof.
[0112] The memory 20 stores instructions executable by at least one processor 10 to cause the at least one processor 10 to perform the method shown in the above embodiments.
[0113] The memory 20 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the computer device. Furthermore, the memory 20 may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some alternative embodiments, the memory 20 may optionally include memory remotely located relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0114] The memory 20 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk or solid-state drive; the memory 20 may also include a combination of the above types of memory.
[0115] The computer device also includes an input device 30 and an output device 40. The processor 10, memory 20, input device 30, and output device 40 can be connected via a bus or other means; Figure 7 shows an example of a connection via a bus.
[0116] Input device 30 can receive input numerical or character information, and generate key signal inputs related to user settings and function control of the computer device, such as a touchscreen, keypad, mouse, trackpad, touchpad, joystick, one or more mouse buttons, trackball, joystick, etc. Output device 40 may include display devices, auxiliary lighting devices (e.g., LEDs), and haptic feedback devices (e.g., vibration motors). The aforementioned display devices include, but are not limited to, liquid crystal displays, light-emitting diodes, displays, and plasma displays. In some alternative embodiments, the display device may be a touchscreen.
[0117] This application also provides a computer-readable storage medium. The methods described in this application can be implemented in hardware or firmware, or implemented as recordable on a storage medium, or implemented as computer code downloaded over a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and subsequently stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; optionally, the storage medium may also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code, which, when accessed and executed by the computer, processor, or hardware, implements the methods shown in the above embodiments.
[0118] A portion of this application can be applied as a computer program product, such as computer program instructions, which, when executed by a computer, can invoke or provide the methods and / or technical solutions according to this application through the operation of the computer. Those skilled in the art will understand that the forms in which computer program instructions exist in a computer-readable medium include, but are not limited to, source files, executable files, installation package files, etc. Correspondingly, the ways in which computer program instructions are executed by a computer include, but are not limited to: the computer directly executing the instructions, or the computer compiling the instructions and then executing the corresponding compiled program, or the computer reading and executing the instructions, or the computer reading and installing the instructions and then executing the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to a computer.
[0119] Although embodiments of this application have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of this application, and such modifications and variations all fall within the scope defined by this application.
Claims
1. A bandwidth-adaptive equalization method, characterized by, The method includes: Real-time monitoring of the service status of each secondary node under each bandwidth contention node, and classification and caching of the service requests sent by each secondary node according to the response data offloading rate, generating a request cache queue corresponding to each secondary node; Every first unit of time, based on the unloading rate of the response data of each secondary node, a target number of traffic tokens corresponding to each secondary node are generated; Every second unit of time, the request cache queue and traffic token quantity of each secondary node under each bandwidth competition node are polled. When the traffic token quantity of the target secondary node is sufficient, each service request in the request cache queue corresponding to the target secondary node is read out and marked as consecutive, and a node consecutively marked request cache queue corresponding to each bandwidth competition node is generated. Poll the continuous marked request cache queues of each bandwidth contention node, read out the service requests marked as continuous in the continuous marked request cache queues of each node, and continuously schedule them to the target side so that the target side can respond to and execute each service request continuously scheduled to the target side.
2. The method of claim 1, wherein, The step of polling the request cache queues and traffic token counts of each secondary node under each bandwidth contention node every second unit of time includes: Determine the order of each secondary node under each bandwidth contention node; The polling order of each secondary node under each bandwidth contention node is determined based on the order of the secondary nodes under each bandwidth contention node. According to the polling order of each secondary node under each bandwidth contention node, the request cache queue and traffic token quantity corresponding to each secondary node under each bandwidth contention node are polled every second unit of time.
3. The method of claim 2, wherein, When the number of traffic tokens at the target secondary node is sufficient, each service request in the request cache queue corresponding to the target secondary node is read out, and each read service request is marked as consecutive, generating a node consecutive marked request cache queue corresponding to each bandwidth-competing node, including: Get the number of traffic tokens in the request cache queue corresponding to the target second-level node; Based on the number of traffic tokens corresponding to the target secondary node, allow business requests in the request cache queue corresponding to the target secondary node to proceed; The service requests released in the request cache queues of each secondary node under the bandwidth contention node where the target secondary node is located are marked continuously in the order of release, and a node continuously marked request cache queue corresponding to the bandwidth contention node where the target secondary node is located is generated.
4. The method of claim 1, wherein, The method further includes: Identify the bandwidth-competing node that will acquire the current arbitration right; The service requests marked as consecutive in the continuous request cache queue of the node corresponding to the bandwidth competition node that has obtained the current arbitration right will be continuously scheduled to the target side.
5. The method according to any one of claims 2 to 4, characterized in that, When the target secondary node's service is suspended or malfunctions, the request cache queue corresponding to the target secondary node is empty.
6. The method of claim 5, wherein, The step of polling the request cache queues and traffic token counts of each secondary node under each bandwidth contention node every second unit of time includes: When the request cache queue corresponding to the target second-level node is polled and the request cache queue corresponding to the target second-level node is empty, jump to the request cache queue corresponding to the next second-level node in the next order of the target second-level node.
7. A bandwidth adaptive equalization apparatus, characterized by, The device includes: The business monitoring module is used to monitor the business status of each secondary node under each bandwidth competition node in real time, and classify and cache the business requests sent by each secondary node according to the response data offloading rate, and generate a request cache queue corresponding to each secondary node. The traffic token generation module is used to generate a target number of traffic tokens corresponding to each secondary node based on the response data offloading rate of each secondary node every first unit of time. The request continuous marking module is used to poll the request cache queue and traffic token quantity of each secondary node under each bandwidth competition node every second unit of time. When the traffic token quantity of the target secondary node is sufficient, it reads out each service request in the request cache queue corresponding to the target secondary node and marks each read service request as continuous, generating a node continuous marking request cache queue corresponding to each bandwidth competition node. The scheduling module is used to poll the continuous marked request cache queues of each bandwidth contention node, read out the service requests marked as continuous in each node's continuous marked request cache queue, and continuously schedule them to the target side so that the target side can respond to and execute each service request continuously scheduled to the target side.
8. A computer device, comprising: include: A memory and a processor are communicatively connected, the memory stores computer instructions, and the processor executes the bandwidth adaptive equalization method according to any one of claims 1 to 6 by executing the computer instructions.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing the computer to perform the bandwidth adaptive equalization method according to any one of claims 1 to 6.
10. A computer program product, characterised in that, Includes computer instructions for causing a computer to perform the bandwidth adaptive equalization method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Intelligent bandwidth allocation method and system based on token bucket
CN113489655A
Multi-path flow scheduling system and method based on FPGA (Field Programmable Gate Array) and token bucket algorithm
CN117579564A
Traffic scheduling method and device for DPU, equipment and storage medium
CN118660011A
Bandwidth adaptive equalization method and device, equipment, storage medium and program product
CN119341916A
System and method for network bandwidth, buffers and timing management using hybrid scheduling of traffic with different priorities and guarantees
US20160294721A1