Method, system and routing device for scheduling control of multi-link devices
Patent Information
- Application Number
- CN202610830186.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-10
- Publication Date
- 2026-09-11
- Estimated Expiration
- 2046-06-10
AI Technical Summary
在链路调度处理时,缺乏有效的链路间仲裁机制,易出现某条链路因突发流量垄断路由设备的处理资源,从而造成另一链路的事件堆积过期;
[0015] Other features and advantages of the invention will be set forth in the following description, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention are realized and obtained through the structures particularly pointed out in the description and the drawings.
Smart Images

Figure CN122372491B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of routing equipment resource scheduling and control, and in particular to a multi-link equipment scheduling and control method, system, and routing equipment. Background Technology
[0002] The scheduling mechanism of existing WiFi 7 routers in multi-link device MLO (Multi-Link Operation) scenarios has the following technical defects: In the process of link scheduling, the lack of an effective inter-link arbitration mechanism can easily lead to a situation where a certain link monopolizes the processing resources of the routing equipment due to sudden traffic, thereby causing events to accumulate and expire on another link. The event scheduling process does not take into account the differences in event types (such as Beamforming feedback becoming invalid when it expires, while data frames can tolerate limited latency), which leads to frequent context switching between links when processing multiple events on the same link, affecting the resource processing efficiency of the routing device. Summary of the Invention
[0003] In view of this, the purpose of this invention is to provide a multi-link device scheduling control method, system, and routing device. In the link scheduling process, the method uses the virtual running time of each connection link and the resource scheduling value calculated by the number of ready events to obtain the target connection link, fully considers the resource scheduling situation of multiple link devices, and realizes effective arbitration between links. In the event scheduling process, the method uses the event deadline to perform batch scheduling processing of target events in the target connection link, which greatly reduces context switching and improves resource processing efficiency.
[0004] In a first aspect, embodiments of the present invention provide a multi-link device scheduling and control method, which is applied to a routing device and includes: The link feature value of each link is obtained based on the multiple connection links between the multi-link device and the routing device, and a global bitmap index of the multi-link device is generated based on the link feature value. The resource scheduling value of the multi-link device is calculated based on the virtual runtime and the number of ready events for each connection link, and the target connection link is obtained from multiple connection links using the resource scheduling value. After obtaining the target event with the same link characteristic value from the target connection link using the global bitmap index, the multi-link devices are controlled to perform resource scheduling on the target event based on the deadline of the target event.
[0005] Optionally, the link characteristic value of each connection link is obtained based on multiple connection links between the multi-link device and the routing device, including: Identify the multi-link devices connected to the routing device and determine the multiple connection links between the multi-link devices and the routing device; Business processing functions are constructed using business processing logic data between multiple connection links and routing devices; The business characteristic value of each connection link is calculated through the business processing function, and the link characteristic value of each connection link is obtained through the business characteristic value.
[0006] Optionally, a global bitmap index for multi-link devices is generated using link feature values, including: Identify the single-link devices connected to the routing device and determine the single connection link between the single-link device and the router; After merging a single connection link into multiple connection links using the resource management information of the routing device, the independent index value of the single link device is obtained based on the multiple connection links. The global index value corresponding to the link feature value is obtained based on multiple connection links; the global index value is different from the independent index value. A global bitmap index for multi-link devices is generated using global index values.
[0007] Optionally, the resource scheduling value for the multi-link device is calculated based on the virtual runtime and the number of ready events for each connection link, including: Obtain the computation time of the routing devices in each connection link, and obtain the virtual running time of each connection link based on the normalized calculation result of the computation time. The number of ready events for a multi-link device is obtained based on the number of slots configured for each connection link, and the load index for each connection link is obtained based on the ratio of the number of ready events to the number of slots configured. The load weight value of each connection link is obtained based on the load index, and the resource scheduling value of the multi-link device is obtained based on the ratio of virtual runtime to load weight value.
[0008] Optionally, the target connection link can be obtained from multiple connection links using resource scheduling values, including: The priority data, suspension duration, and remaining time before the deadline of each connection link are used to determine whether the connection link meets the emergency preemption conditions. The emergency preemption conditions are: the priority data is greater than the priority threshold and the suspension duration is greater than the window ratio threshold, or the remaining time before the deadline is less than the interval threshold. If none of the connection links meet the emergency preemption condition, then the resource scheduling value of each connection link is traversed according to the execution order of the multiple connection links, and the minimum resource scheduling value is obtained. Obtain the target connection link with the minimum resource scheduling value from multiple connection links.
[0009] Optionally, the method further includes: If a connection link is detected among multiple connection links that meets the emergency preemption condition, then that connection link is identified as the target connection link.
[0010] Optionally, after obtaining the target event with the same link characteristic value from the target connection link using the global bitmap index, the step of controlling the multi-link devices to perform resource scheduling on the target event based on the deadline of the target event includes: Obtain the event queue contained in the target connection link, and obtain the deadline and priority data for each event in the event queue; After updating the deadline using priority data, each event in the event queue is sorted and updated according to the priority data using the updated deadline. Retrieve target events with the same link feature value from the updated event queue using the global bitmap index; Based on the updated deadline, the number of executions and the execution duration of the target event under the link characteristic value are obtained, and the execution number and execution duration are used to control the resource scheduling of the target event execution by the multi-link device in the target connection link.
[0011] Optionally, the deadline can be updated using priority data, including: Based on priority data, obtain the first event under the highest priority and the second event under the second highest priority, and obtain the first deadline of the first event and the second deadline of the second event; The first deadline advance value of the first event is obtained based on the highest priority first priority feature value, and the second deadline update value of the second event is obtained based on the second highest priority second priority feature value; wherein, the first deadline advance value is greater than the second deadline update value; The first deadline is updated using the first deadline advance value, and the second deadline is updated using the second deadline update value.
[0012] Secondly, the present invention provides a multi-link device scheduling and control system, which is applied to routing devices, and the system includes: Global Bitmap Index Generation Module: This module is used to obtain the link feature value of each connection link based on multiple connection links between the multi-link device and the routing device, and generate a global bitmap index for the multi-link device using the link feature value. The first scheduling control module is used to calculate the resource scheduling value of the multi-link device based on the virtual running time and the number of ready events for each connection link, and to use the resource scheduling value to obtain the target connection link from multiple connection links. The second scheduling control module is used to control the multi-link devices to perform resource scheduling on the target event after obtaining the target event with the same link characteristic value from the target connection link using the global bitmap index.
[0013] Thirdly, embodiments of the present invention also provide a routing device, which includes a processor and a memory. The memory stores computer-executable instructions that can be executed by the processor, and the processor executes the computer-executable instructions to implement the steps of the multi-link device scheduling and control method provided in the first aspect.
[0014] This invention provides a multi-link device scheduling and control method, system, and routing device. In the process of MLO scenario scheduling of multi-link devices using a WiFi 7 routing device, the method first obtains the link feature value of each connection link based on multiple connection links between the multi-link device and the routing device, and generates a global bitmap index for the multi-link device using the link feature value. Then, it calculates the resource scheduling value of the multi-link device based on the virtual runtime and the number of ready events for each connection link, and uses the resource scheduling value to obtain the target connection link from multiple connection links. Finally, after obtaining the target event with the same link feature value from the target connection link using the global bitmap index, the method controls the multi-link device to perform resource scheduling on the target event based on the deadline of the target event. In the link scheduling process, this method uses the resource scheduling value calculated from the virtual runtime and the number of ready events for each connection link to obtain the target connection link, fully considering the resource scheduling situation of the multi-link device and achieving effective arbitration between links. In the event scheduling process, it uses the event deadline to perform batch scheduling processing of target events in the target connection link, significantly reducing context switching and improving resource processing efficiency.
[0015] Other features and advantages of the invention will be set forth in the following description, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention are realized and obtained through the structures particularly pointed out in the description and the drawings.
[0016] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0017] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in 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 the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0018] Figure 1 A flowchart of a multi-link device scheduling and control method provided in an embodiment of the present invention; Figure 2 A flowchart illustrating the link scheduling process in a multi-link device scheduling and control method provided in this embodiment of the invention; Figure 3 A flowchart illustrating the event scheduling process in a multi-link device scheduling and control method provided in this embodiment of the invention; Figure 4 This is a schematic diagram of the structure of a multi-link device scheduling and control system provided in an embodiment of the present invention; Figure 5 This is a schematic diagram of the structure of a routing device provided in an embodiment of the present invention.
[0019] icon: 100 - Global Bitmap Index Generation Module; 200 - First Scheduling Control Module; 300 - Second Scheduling Control Module; 101 - Processor; 102 - Memory; 103 - Bus; 104 - Communication interface. Detailed Implementation
[0020] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below in conjunction with the embodiments. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0021] To facilitate understanding of this embodiment, a multi-link device scheduling and control method disclosed in this invention will first be introduced. This method is applied to Wi-Fi 7 routing devices and is designed for MLO multi-link operation scenarios. Through link-level fair arbitration and event-level efficient scheduling, it solves problems such as link resource contention imbalance, frequent context switching, and inefficient event processing. The method is as follows... Figure 1 As shown, it includes: Step S101: Obtain the link feature value of each connection link based on the multiple connection links between the multi-link device and the routing device, and generate a global bitmap index of the multi-link device using the link feature value.
[0022] The routing device obtains the link characteristic values of the multiple connection links established between the multi-link device and itself, including the unique link ID, real-time load status, associated STA (site / device) type (MLD multi-link device / non-MLD single-link device), event queue capacity, and index usage, etc. Based on the above link characteristic values, it generates and maintains a global bitmap index dedicated to the multi-link device.
[0023] This global bitmap index is primarily used to mark two types of key information: first, to distinguish STA device types, clearly indicating whether each STA is an MLD device or a non-MLD device; and second, to bind devices and link affiliations, recording all connection links associated with MLD devices and the unique connection link corresponding to non-MLD devices, while simultaneously achieving index isolation. By allocating independent index space for each link to non-MLD devices and a globally unified index to MLD devices, cross-link addressing conflicts and index reuse chaos are avoided at the source, providing underlying identification support for subsequent link selection and accurate event filtering.
[0024] Step S102: Calculate the resource scheduling value of the multi-link device based on the virtual runtime and the number of ready events for each connection link, and use the resource scheduling value to obtain the target connection link from multiple connection links.
[0025] The routing device maintains an independent virtual runtime counter for each connection link, recording the cumulative service normalization time occupied by the routing device's processor for that link, thereby quantifying the historical resource allocation of the link; at the same time, it counts the number of currently ready events for each link, and calculates the link load index by combining the link event queue capacity (32 events / link).
[0026] By combining the virtual runtime and the number of ready events (load index) of each link, the resource scheduling value of the link is dynamically calculated. This value integrates the fairness weight of the virtual runtime, the real-time weight of the load index, and also incorporates correction factors such as the idle rate of non-MLD device indexes. The routing device sorts the links according to the resource scheduling value and selects the target connection link from multiple connection links.
[0027] In addition, the process incorporates a link arbitration and emergency preemption mechanism. Under this mechanism, resource scheduling values are prioritized for links with short virtual runtime and balanced load to avoid single-link traffic monopolizing resources. When a link has a highest priority Critical event or the event is about to expire, the computing resources of the routing device's CPU can be preempted directly, ignoring the regular resource scheduling values, thus balancing long-term fairness between links and the real-time nature of high-priority events.
[0028] Step S103: After obtaining the target event with the same link feature value from the target connection link using the global bitmap index, control the multi-link device to perform resource scheduling on the target event through the deadline of the target event.
[0029] The routing device calls the global bitmap index to match the link feature values of the target connection link, quickly filters out invalid cross-link events and non-associated STA events, and accurately selects target events within the target connection link that match the link features and device affiliation.
[0030] For the filtered target events, the routing device uses the event deadline as the core scheduling basis and adopts the earliest deadline first (EDF) strategy for sorting. It also simultaneously superimposes priority ceiling protection (high-priority events have earlier virtual deadlines) and starvation prevention mechanism (timeout events are forcibly promoted to higher priority). Furthermore, it sets up a batch processing window to continuously schedule and process multiple target events of the same target connection link until the batch processing time reaches the target or the event queue is cleared.
[0031] This approach significantly reduces the number of CPU context switches between links and events by batch processing events on the same link, thereby reducing cache invalidation overhead. At the same time, it combines event type differentiation management to balance the processing priority and latency tolerance of different events, ultimately improving the overall resource processing efficiency and event completion rate of the routing device.
[0032] Optionally, the link characteristic value of each connection link is obtained based on multiple connection links between the multi-link device and the routing device, including the following steps: Step S201: Obtain the multi-link devices connected to the routing device, and determine the multiple connection links between the multi-link devices and the routing device.
[0033] The routing device scans and identifies currently accessed multi-link devices (MLD STAs), distinguishing them from single-link devices (non-MLD STAs); it further determines the multiple physical connection links (such as dual links A / B) established between the MLD STA and the routing device, and synchronously collects the basic attributes of each link: unique link identifier, physical link status, associated STA type, event queue initialization status, and hardware buffer configuration information, thus completing the accurate locking of the target link and the collection of basic information.
[0034] Step S202: Construct a service processing function using the service processing logic data between multiple connection links and routing devices.
[0035] The routing device aggregates the business processing logic data of each connection link interacting with itself, covering core processes such as message sending and receiving, event parsing, resource allocation, and state management; based on the MLO link compatibility optimization requirements, it abstracts and integrates the scattered link-specific logic into a unified reentrant business processing function.
[0036] This function contains common core processing logic and also supports attaching unique business logic for each link through hooks / configuration tables. The function is bound to the unique ID of the link, uses thread-local storage (TLS) to isolate the link context, adapts to single-CPU lock-free concurrent data structures, and is compatible with hardware interrupt batch reporting, compressed message queues and other mechanisms, so as to realize the logic reuse of multiple links supported by a single function.
[0037] Step S203: Calculate the service characteristic value of each connection link through the service processing function, and obtain the link characteristic value of each connection link through the service characteristic value.
[0038] The unified business processing function is invoked to calculate the real-time running data of each connection link and output the link business characteristic values. The core values include: link virtual runtime (vruntime), number of ready events, link load index (number of ready events / 32), non-MLD STA index idle rate, event type ratio, and resource utilization rate, among other key operating indicators.
[0039] The above-mentioned business characteristic values are integrated with the unique link ID, link physical attributes, and associated STA Bitmap tagging information to generate the final link characteristic value. This characteristic value comprehensively reflects the link's operating status, resource consumption, and device association relationships, providing core input basis for subsequent global bitmap index construction and link resource scheduling value calculation.
[0040] The above steps are optional refinements for obtaining link feature values, adapted to Wi-Fi 7 MLO multi-link operation scenarios, focusing on the identification, business logic abstraction, and feature value calculation of the connection links between multi-link devices (MLD STA) and routing devices, providing accurate basic link data for subsequent global bitmap construction and link scheduling.
[0041] Optionally, a global bitmap index for multi-link devices is generated using link feature values, including the following steps: Step S301: Obtain the single-link device connected to the routing device, and determine the single connection link between the single-link device and the router.
[0042] The routing device scans all site devices connected to the network, accurately identifies non-MLD STA (single-link device) devices, and distinguishes them from MLD STA (multi-link device) devices; it further determines the only physical connection link that the single-link device establishes with the routing device, and synchronously collects the basic information of the link (link identifier, port status, associated device type, queue resource configuration, etc.) to complete the accurate location of single-link devices and dedicated links.
[0043] Step S302: After merging a single connection link into multiple connection links using the resource management information of the routing device, obtain the independent index value of the single link device based on the multiple connection links.
[0044] The routing device calls the internal resource management module to integrate the multiple connection link resources corresponding to the multi-link device, and merges the dedicated connection links of the single-link device into the link set to form a unified link resource pool. Following the index isolation principle, it assigns a dedicated independent index value to non-MLD STAs. This index value is only effective within the single link to which it belongs, and is not reused across links or shared with other link indexes, thus eliminating cross-link addressing conflicts of single-link devices from the bottom layer.
[0045] Step S303: Obtain the global index value corresponding to the link feature value based on multiple connection links; wherein, the global index value is different from the independent index value.
[0046] The routing device traverses all the connection links of the multi-link device and extracts the link feature value corresponding to each link. Based on the link feature value, a globally unified index value is assigned to the MLD STA. This index value is a unique identifier across links and is completely distinguishable from the independent index values of non-MLD STA links. At the same time, a mapping relationship between the global index and the feature values of each link is established to record all connection links associated with the MLD STA, providing index support for cross-link context collaboration and message routing.
[0047] Step S304: Generate a global bitmap index for the multi-link device using the global index value.
[0048] The routing device integrates the global index value of MLD STA and the independent index value of non-MLD STA to generate and maintain a global bitmap index for multi-link devices. This bitmap records three key types of information: first, STA device type marking (distinguishing between MLD and non-MLD); second, device-link affiliation mapping (MLD is associated with multiple links, non-MLD is bound to a single link); and third, index validity marking (filtering invalid indexes and idle resources). During subsequent scheduling and message routing, this bitmap can be used to quickly determine the legitimate links of devices and filter invalid cross-link events, thereby improving scheduling efficiency and resource utilization.
[0049] The above steps are optional refinements of the global bitmap index generation process, focusing on index isolation between MLD (Multi-Link Device) and non-MLDSTA (Single-Link Device), and constructing a global bitmap based on link feature values to avoid cross-link addressing conflicts and message routing errors from the root, adapting to device compatibility and efficient resource management in Wi-Fi 7 MLO scenarios.
[0050] Optionally, the resource scheduling value for the multi-link device is calculated based on the virtual runtime and the number of ready events for each connection link, including the following steps: Step S401: Obtain the computation processing time of the routing device in each connection link, and obtain the virtual running time of each connection link based on the normalized calculation result of the computation processing time.
[0051] The routing device calculates the actual processing time of each connection link on the routing device's CPU, covering the time consumed by services such as event parsing, message forwarding, and resource allocation. To eliminate time base deviations caused by hardware differences and different task types, the actual processing time is normalized to obtain the virtual runtime (vruntime) of each connection link.
[0052] This virtual runtime is a cumulative statistical value that accurately records the normalized total CPU service time of the routing device since the link was connected. It serves as a core indicator for measuring the fairness of historical resource allocation of the link and provides a basis for link priority ranking.
[0053] Step S402: Obtain the number of ready events for the multi-link device based on the number of slots configured for each connection link, and obtain the load index for each connection link based on the ratio of the number of ready events to the number of slots configured.
[0054] The routing device reads the number of lockless ring buffer slots configured for each connection link (the default is fixed at 32 slots / link). These slots are used to cache pending events. The device also counts the number of ready events written to the buffer but not yet scheduled in real time, which is the total number of valid events pending processing on the current link.
[0055] The load index (number of ready events / 32) for each connection link is calculated by comparing the number of ready events with the number of slots configured. The load index directly quantifies the real-time busyness of the link. The higher the value, the more severe the event backlog and the heavier the load, providing a real-time load basis for dynamically adjusting the scheduling weight.
[0056] Step S403: Obtain the load weight value of each connection link based on the load index, and obtain the resource scheduling value of the multi-link device based on the ratio of virtual running time to load weight value.
[0057] The routing device dynamically matches the corresponding load weight value based on the link load index, following the principle of low weight for high load and high weight for low load. The higher the load index, the smaller the assigned load weight value, to avoid high-load links continuously vying for resources and monopolizing the routing device's CPU. At the same time, the weight calculation can take into account the idle rate of non-MLD STA index, and appropriately increase the weight of links with low index resource utilization to further balance resource allocation.
[0058] The virtual runtime of each link is compared with its load weight value to obtain the resource scheduling value for that link. The resource scheduling value takes into account the fairness of the link's historical resource usage and the real-time load pressure. The smaller the value, the more reasonable the link's resource demand and the higher its priority. The routing device prioritizes the link with the smallest resource scheduling value as the target connection link, taking into account both scheduling fairness and real-time performance.
[0059] The above steps are optional refinements for calculating resource scheduling values. Based on the link-level scheduling logic of the Wi-Fi 7 MLO dual-layer coupled scheduling architecture, the link resource scheduling value is dynamically calculated through virtual runtime and load index to achieve fair arbitration and load balancing between links and avoid single-link resource monopoly.
[0060] Optionally, the target connection link can be obtained from multiple connection links using resource scheduling values, including the following steps: Step S501: Use the priority data, suspension duration and remaining time before the deadline of each connection link to determine whether the connection link meets the emergency preemption conditions; wherein, the emergency preemption conditions are: the priority data is greater than the priority threshold and the suspension duration is greater than the window ratio threshold, or the remaining time before the deadline is less than the elapsed interval threshold.
[0061] The routing device traverses each connection link, extracts the priority data, event pending duration, and remaining time before the deadline for the events to be processed within the link, and determines whether the link has triggered an emergency preemption condition by comparing it with a preset threshold.
[0062] Among them, priority data corresponds to event level (Critical level is the highest priority), and the priority threshold is set to Critical level; the window ratio threshold is set to 50%, that is, the event suspension time exceeds 50% of the time window; the expiration interval threshold is set to 100μs, that is, the event is less than 100μs away from expiration.
[0063] The specific conditions for emergency preemption are: the link has a Critical-level event with a priority higher than the threshold, and the event's pending duration exceeds 50% of the time window; or the remaining duration of the earliest deadline event within the link is less than 100μs. Once the conditions are met, the link can disregard regular resource scheduling rules and directly preempt the routing device's CPU resources to prioritize emergency event handling.
[0064] Step S502: If none of the connection links meet the emergency preemption condition, then traverse the resource scheduling value of each connection link according to the execution order of the multiple connection links, and obtain the minimum resource scheduling value among the resource scheduling values.
[0065] If no emergency preemption condition is triggered on any of the connection links, the normal link scheduling logic is executed. The routing device traverses all connection links in a preset order, reading the calculated resource scheduling value for each link one by one.
[0066] The resource scheduling value integrates the virtual runtime of the link with the real-time load weight. The smaller the value, the fairer the historical resource usage, the more reasonable the real-time load, and the higher the scheduling priority. During the traversal, the resource scheduling values of all links are compared, and the minimum resource scheduling value is selected and recorded to ensure that the link selection meets the principles of fairness and load balancing, and to avoid a single link monopolizing resources for a long time.
[0067] Step S503: Obtain the target connection link corresponding to the minimum resource scheduling value from multiple connection links.
[0068] The routing device matches the minimum resource scheduling value selected with each connection link, locates the connection link corresponding to that value, and identifies it as the target connection link. This target link is the optimal processing target within the current scheduling cycle. Subsequently, the routing device will focus on this link, perform event-level scheduling, and batch process the pending events within the link. This ensures the long-term fairness of resource allocation between links, reduces the frequency of cross-link scheduling, lowers context switching overhead, and improves overall scheduling efficiency.
[0069] The above steps are optional refinements for target connection link selection. They take into account the link resource scheduling value calculation results, integrate emergency preemption mechanism and regular fair scheduling, take into account the real-time nature of high-priority events and the fairness of resource allocation between links, and adapt to the efficient scheduling of routing device CPU resources in Wi-Fi 7 MLO scenarios.
[0070] The flowchart of the above link scheduling process is as follows: Figure 2 As shown, the specific steps include: I. Process start point: Triggered every 5ms scheduling cycle.
[0071] The scheduling process starts every 5ms, which is the core control rhythm of link-level arbitration. This avoids the CPU overhead of routing devices caused by frequent link switching, and can respond to load changes and emergencies in a timely manner, balancing fairness and real-time performance.
[0072] II. Link-level arbitration preparatory work (parallel execution).
[0073] The first step of the process includes three parallel computation tasks that provide core data support for subsequent link arbitration, specifically including: 1. Update vruntimeA / vruntimeB (virtual runtime). Record the normalized total time that links A and B have received CPU services since they were connected. vruntime is a core indicator for measuring the fairness of historical resource allocation for links. The larger the value, the more CPU time the link has accumulated, and its subsequent scheduling priority will be dynamically reduced to avoid long-term monopoly of resources by a single link from the root.
[0074] 2. Calculate load and dynamic weights wA / wB. First, count the number of ready events for links A and B, and calculate the load index (number of ready events / number of slots) based on the link slot configuration (e.g., 32 events / link). Then, dynamically generate load weights wA / wB based on the load index, following the principle of high load, low weight, and low load, high weight. The higher the link load, the smaller the weight value, and the subsequent resource scheduling value (vruntime / weight) will be amplified, naturally reducing the priority and preventing sudden traffic surges from continuously preempting resources.
[0075] III. Emergency Seizure Conditions Assessment (Real-time Guarantee).
[0076] The core judgment condition is: (Critical event + pending > 50%) || Remaining deadline < 100μs. Specifically, it includes the following two conditions.
[0077] Condition 1: Critical level event + suspension time exceeding 50% window: For high-priority events such as Beamforming feedback and beacon frames that will expire and become invalid, if their suspension time has exceeded half of the scheduling window, it means that they have been blocked for a long time and must be handled urgently. Condition 2: Remaining deadline < 100μs: For all events with absolute expiration risk, if the event is less than 100 microseconds away from expiration, preemption will be triggered directly to avoid data frames / management frames from expiring and becoming invalid.
[0078] If the above two conditions are met, the connection link is identified as the target connection link, and the matching link directly preempts the routing device's CPU, skipping the regular fair scheduling and prioritizing the real-time performance of emergency events; if the above two conditions are not met, the regular fair scheduling logic is entered.
[0079] IV. Fair scheduling of conventional links (comparison of resource scheduling values).
[0080] Calculate the resource scheduling values for links A and B: vruntimeA / wA and vruntimeB / wB; then select the link with the smallest resource scheduling value as the target link.
[0081] The resource scheduling value integrates two dimensions: historical fairness (vruntime) and real-time load (weight). The smaller the value, the more likely the link is not occupying the routing device's CPU for a long time or is not blocked by high load. It is the optimal choice within the current scheduling cycle, realizing dynamic load balancing and fair arbitration between links.
[0082] V. Target link output + second-level event-level EDF scheduling.
[0083] Whether through emergency preemption or regular scheduling, a target link will eventually be output, and then it will enter the second layer: event-level EDF (earliest deadline first) scheduling.
[0084] The above steps can reduce context switching, allowing focus on only one target link in a single scheduling cycle, batch processing multiple events within it, avoiding frequent context switching between different links, and significantly reducing CPU cache invalidation overhead. The above steps enable differentiated event processing, sorting and scheduling events by their deadlines within the target link, prioritizing the processing of events that are about to expire (such as Beamforming feedback), while allowing events with tolerable delays, such as data frames, to be queued, thus balancing the processing needs of different event types.
[0085] Optionally, step S103, after obtaining the target event with the same link characteristic value from the target connection link using the global bitmap index, and controlling the multi-link devices to perform resource scheduling on the target event based on the deadline of the target event, includes the following steps: Step S601: Obtain the event queue contained in the target connection link, and obtain the deadline and priority data of each event in the event queue.
[0086] The routing device reads the lockless circular event queue (default 32 slots, batch writing via hardware interrupt, reading by the scheduler) corresponding to the selected target connection link, traverses all pending events in the queue, and extracts the original deadline time (the preset latest completion time) and priority data (divided into Critical, High, and Normal levels) for each event. At the same time, it synchronizes and associates auxiliary information such as event type (control / management frame, Beamforming feedback frame, data frame) and pending time, providing complete basic event data for subsequent priority adjustment and sorting scheduling.
[0087] Step S602: After updating the deadline using priority data, use the updated deadline to sort and update each event in the event queue according to the priority data.
[0088] Based on event priority data, the routing device executes a priority ceiling protection mechanism to dynamically correct the original deadline: Critical level events are automatically deducted 500μs virtual advance, High level events are deducted 200μs virtual advance, and ordinary level events retain their original deadline; at the same time, a starvation prevention mechanism is superimposed, where events of the same priority are sorted in FIFO, and if the event waiting time exceeds 10ms, the priority is forcibly increased and the deadline is readjusted.
[0089] After the deadline is updated, the earliest deadline first (EDF) strategy is adopted. The revised deadline is used as the core sorting criterion to reorder all events in the event queue, ensuring that high-priority events that are close to expiration are placed at the forefront of scheduling, thus achieving coupled sorting of priority and deadline.
[0090] Step S603: Retrieve target events with the same link feature values from the updated event queue using the global bitmap index.
[0091] The routing device calls a pre-built global bitmap index to extract the unique link feature value (including link ID and associated STA affiliation identifier) of the target connection link; it quickly verifies the STA type of the event (distinguishing between MLD multi-link devices and non-MLD single-link devices) and the legality of the link affiliation through the bitmap, filters out invalid cross-link events, non-associated STA events, and index conflict events, and retains only the legal target events that completely match the feature value of the target connection link, avoiding invalid scheduling and improving the accuracy of event processing.
[0092] Step S604: Based on the updated deadline, obtain the execution count and execution duration of the target event under the link characteristic value, and control the multi-link device to perform resource scheduling for the target event in the target connection link through the execution count and execution duration.
[0093] Based on the revised deadline of the target event, combined with the link load status and event type differentiation strategy, the routing device dynamically determines the number of target events to be executed and the execution duration within the current scheduling cycle; following the batch processing window mechanism, the upper limit of the cumulative duration of a single batch processing is set to 50μs, or until the target event queue is cleared, and target events with the same link characteristic ID are processed continuously with priority.
[0094] During the scheduling process, resource scheduling is performed differently according to event type: expired or invalid Beamforming feedback frames are scheduled first, control / management frames are retransmitted upon expiration, and data frames are processed in batches and tolerated with limited latency. Batch scheduling reduces context switching between links and reduces CPU cache invalidation overhead of routing devices. At the same time, dynamic management based on deadlines maximizes the event completion rate within the time window and balances scheduling efficiency and event processing reliability.
[0095] The flowchart of the above event scheduling process is as follows: Figure 3 As shown, the core idea is to couple event priority with deadlines, achieving differentiated sorting by virtually advancing deadlines. This provides a corrected time basis for subsequent EDF (Earliest Deadline First) scheduling, solving the problem that different priority events cannot reflect priority differences in EDF scheduling. Optionally, the deadlines can be updated using priority data, including the following steps: Step S701: Based on the priority data, obtain the first event under the highest priority and the second event under the second highest priority, and obtain the first deadline of the first event and the second deadline of the second event.
[0096] Priority data directly corresponds to the service type of the event. Critical level events are typically control / management events such as Beamforming feedback frames and beacon frames, which become invalid upon expiration. High level events correspond to real-time data frames with QoS guarantees. Ordinary level events are non-real-time data frames. The original deadline D is the latest time to complete the processing of the event, defined by the protocol or service requirements, and serves as the benchmark for determining event expiration.
[0097] The routing device traverses the event queue of the target connection link and classifies and marks the events according to a preset priority level (such as Critical, High, and Normal). It extracts the first event with the highest priority (Critical level) and its original first deadline D1, as well as the second event with the second highest priority (High level) and its original second deadline D2.
[0098] Step S702: Obtain the first deadline advance value of the first event based on the first priority feature value with the highest priority, and obtain the second deadline update value of the second event based on the second priority feature value with the second highest priority; wherein, the first deadline advance value is greater than the second deadline update value.
[0099] The advance value is set according to the principle that the higher the priority, the greater the advance amount. In essence, it is to make high-priority events naturally rank higher in the subsequent EDF sorting by virtually advancing the deadline time, while avoiding directly changing the original deadline time and affecting the business logic. The advance value can be dynamically adjusted according to the link load and the event expiration risk. For example, when the link event backlog rate exceeds 80%, the advance value can be appropriately increased to strengthen the scheduling advantage of high-priority events.
[0100] The routing device assigns differentiated deadline advance values to events of different priorities based on the weighted feature values of the priority level: For the highest priority first event, obtain the first deadline advance value based on its first priority feature value (Critical level specific feature) (e.g., Figure 3 (set to 500μs). For the second event with the second highest priority, obtain the second deadline advance value based on its second priority feature value (High-level exclusive feature) (e.g., Figure 3 (set to 200μs). Core rule: The first deadline advance value is greater than the second deadline advance value, ensuring that the virtual deadline advance value of the highest priority event is greater.
[0101] Step S703: Update the first deadline using the first deadline advance value, and update the second deadline using the second deadline update value.
[0102] The routing device updates the original first deadline D1` of the first event using the first deadline advance value, resulting in the corrected first deadline D1` = D1 - 500μs; at the same time, it updates the original second deadline D2 of the second event using the second deadline advance value, resulting in the corrected second deadline D2` = D2 - 200μs.
[0103] In this way, priority ceiling protection is achieved, meaning that even if a high-priority event has a later original deadline, it can obtain a higher scheduling priority through virtual advance, while preventing low-priority events from being starved for a long time, thus balancing the real-time performance of high-priority events with scheduling fairness.
[0104] Specifically, Figure 3 The process also includes the following steps: Starvation prevention steps: For events of the same priority, FIFO (First-In, First-Out) sorting is used, with a waiting time threshold set: if an event is suspended for more than 10ms, it indicates that it has been blocked for an extended period, its priority is forcibly increased, and it is re-entered into the sorting queue. This step prevents low-priority events from being preempted by high-priority events for extended periods, avoiding starvation and balancing the real-time performance of high-priority events with scheduling fairness.
[0105] STA Bitmap filtering steps: The global bitmap index is invoked to verify the STA association information of events, eliminating two types of invalid events: cross-link events from non-MLD devices (events from single-link devices are incorrectly routed to other links) and STA events that do not belong to the current target link (index conflicts, events with invalid associations). This step accurately filters invalid scheduling requests, avoiding waste of routing device CPU resources, while ensuring index isolation between single-link devices (non-MLD) and multi-link devices (MLD), preventing cross-link addressing errors.
[0106] Batch processing window steps: Two core constraints are set for each scheduling cycle to control the scale of event processing. Cumulative processing time ≤ 2ms prevents a single link from occupying the CPU for extended periods, impacting the scheduling fairness of other links. Continuous processing of <2 events with the same Link characteristic ID prevents a single STA from monopolizing link processing resources, ensuring fairness among multiple STAs. This step, by focusing on batch processing of only the same target link per scheduling cycle, significantly reduces the number of context switches between links and events, lowers CPU cache invalidation overhead on routing devices, and improves overall processing efficiency.
[0107] CPU execution steps: The scheduler submits the sorted, filtered, and window-constrained target events to the CPU for execution in the corrected deadline order. In the subsequent process, the CPU processes events according to the batch window constraints until the time expires or the queue is cleared. At this point, the event-level scheduling ends, and the CPU waits for the next link-level scheduling cycle (triggered every 5ms).
[0108] As can be seen from the above multi-link device scheduling and control method, in the link scheduling process, the method uses the virtual running time of each connection link and the resource scheduling value calculated by the number of ready events to obtain the target connection link, fully considers the resource scheduling situation of multi-link devices, and realizes effective arbitration between links; in the event scheduling process, the method uses the event deadline to perform batch scheduling processing of target events in the target connection link, which greatly reduces context switching and improves resource processing efficiency.
[0109] Corresponding to the above embodiments of the multi-link device scheduling and control method, this embodiment of the invention also provides a multi-link device scheduling and control system, which is applied to routing devices, such as... Figure 4 As shown, the system includes: Global bitmap index generation module 100: used to obtain the link feature value of each connection link based on multiple connection links between the multi-link device and the routing device, and generate a global bitmap index of the multi-link device based on the link feature value; First scheduling control module 200: used to calculate the resource scheduling value of the multi-link device based on the virtual running time and the number of ready events of each connection link, and to use the resource scheduling value to obtain the target connection link from multiple connection links; The second scheduling control module 300 is used to control the multi-link devices to perform resource scheduling on the target event after obtaining the target event with the same link feature value from the target connection link using the global bitmap index.
[0110] As can be seen from the above multi-link device scheduling and control system, during the link scheduling process, the system uses the virtual running time and the number of ready events of each connection link to calculate the resource scheduling value to obtain the target connection link, fully considers the resource scheduling situation of multiple link devices, and realizes effective arbitration between links; during the event scheduling process, the system uses the event deadline to perform batch scheduling processing of target events in the target connection link, which greatly reduces context switching and improves resource processing efficiency.
[0111] The multi-link device scheduling and control system provided in this embodiment of the invention has the same implementation principle and technical effects as the aforementioned multi-link device scheduling and control method embodiment. For the sake of brevity, any parts not mentioned in the system embodiment can be referred to the corresponding content in the aforementioned multi-link device scheduling and control method embodiment.
[0112] This embodiment also provides a routing device, the structural schematic diagram of which is shown below. Figure 5 As shown, the device includes a processor 101 and a memory 102; wherein, the memory 102 is used to store one or more computer instructions, which are executed by the processor to implement the steps of the multi-link device scheduling and control method described above.
[0113] Figure 5 The routing device shown also includes a bus 103 and a communication interface 104. The processor 101, the communication interface 104, and the memory 102 are connected via the bus 103.
[0114] The memory 102 may include high-speed random access memory (RAM) and may also include non-volatile memory, such as at least one disk storage device. The bus 103 may be an ISA bus, PCI bus, or EISA bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 5 The symbol is represented by a single double-headed arrow, but this does not mean that there is only one bus or one type of bus.
[0115] The communication interface 104 is used to connect to at least one user terminal and other network units through a network interface, and to send encapsulated IPv4 packets or IPv4 packets to the user terminal through the network interface.
[0116] Processor 101 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of processor 101 or by instructions in software form. The processor 101 can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this disclosure. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this disclosure can be directly manifested as execution by a hardware decoding processor, or execution by a combination of hardware and software modules in the decoding processor. The software module can reside in a mature storage medium in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory 102. The processor 101 reads the information in memory 102 and, in conjunction with its hardware, completes the steps of the method described in the foregoing embodiments.
[0117] This invention also provides a storage medium storing a computer program, which, when executed by a processor, performs the steps of the multi-link device scheduling and control method described in the foregoing embodiments.
[0118] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, devices, and methods can be implemented in other ways. The system embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Additionally, the coupling or direct coupling or communication connection shown or discussed may be through some communication interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0119] 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 units can be selected to achieve the purpose of this embodiment according to actual needs.
[0120] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0121] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a processor-executable, non-volatile, computer-readable storage medium. Based on this understanding, the technical solution of this invention, essentially, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, a routing device, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0122] Finally, it should be noted that the above-described embodiments are merely specific implementations of the present invention, used to illustrate the technical solutions of the present invention, and not to limit it. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments within the technical scope disclosed in the present invention, or make equivalent substitutions for some of the technical features; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method of multi-link device scheduling control, the method comprising: The method is applied to a routing device; the method includes: Based on the multiple connection links between the multi-link device and the routing device, the link feature value of each connection link is obtained, and a global bitmap index of the multi-link device is generated using the link feature value; The resource scheduling value of the multi-link device is calculated based on the virtual runtime and the number of ready events for each connection link, and the target connection link is obtained from the multiple connection links using the resource scheduling value; wherein, the resource scheduling value is the ratio of the virtual runtime of each connection link to the load weight value of each connection link; the target connection link is the connection link corresponding to the minimum resource scheduling value among the multiple connection links; After reserving the target event that matches the link feature value from the target connection link using the global bitmap index, the multi-link device is controlled to perform resource scheduling on the target event by the deadline of the target event.
2. The multi-link device scheduling and control method according to claim 1, characterized in that, Based on multiple connection links between the multi-link device and the routing device, the link characteristic value of each connection link is obtained, including: The multi-link device connected to the routing device is identified, and multiple connection links between the multi-link device and the routing device are determined. A service processing function is constructed using the service processing logic data between the multiple connection links and the routing device; The service characteristic value of each connection link is calculated through the service processing function, and the link characteristic value of each connection link is obtained through the service characteristic value.
3. The multi-link device scheduling and control method according to claim 2, characterized in that, Generating a global bitmap index for the multi-link device using the link feature values includes: Obtain the single-link device connected to the routing device, and determine the single connection link between the single-link device and the routing device; After merging the single connection link into the multiple connection links using the resource management information of the routing device, the independent index value of the single link device is obtained based on the multiple connection links. A global index value corresponding to the link feature value is obtained based on the multiple connection links; wherein, the global index value is different from the independent index value; The global bitmap index of the multi-link device is generated using the global index value.
4. The multi-link device scheduling and control method according to claim 1, characterized in that, The resource scheduling value of the multi-link device is calculated based on the virtual runtime and the number of ready events for each connection link, including: The computation time of the routing device in each connection link is obtained, and the virtual running time of each connection link is obtained based on the normalized calculation result of the computation time. The number of ready events for the multi-link device is obtained based on the number of slots configured for each connection link, and the load index of each connection link is obtained based on the ratio of the number of ready events to the number of slots configured. The load weight value of each connection link is obtained based on the load index, and the resource scheduling value of the multi-link device is obtained based on the ratio of the virtual runtime to the load weight value.
5. The multi-link device scheduling and control method according to claim 1, characterized in that, Obtaining a target connection link from the plurality of connection links using the resource scheduling value includes: The priority data, suspension duration, and remaining time before the deadline of each connection link are used to determine whether the connection link meets the emergency preemption condition; wherein, the emergency preemption condition is: the priority data is greater than the priority threshold and the suspension duration is greater than the window ratio threshold, or the remaining time before the deadline is less than the interval threshold. If none of the connection links meet the emergency preemption condition, then the resource scheduling value of each connection link is traversed according to the execution order of the multiple connection links, and the minimum resource scheduling value among the resource scheduling values is obtained. Obtain the target connection link corresponding to the minimum resource scheduling value from the plurality of connection links.
6. The multi-link device scheduling and control method according to claim 5, characterized in that, The method further includes: If one of the multiple connection links is detected to meet the emergency preemption condition, then that connection link is determined as the target connection link.
7. The multi-link device scheduling and control method according to claim 1, characterized in that, After obtaining a target event with the same link feature value from the target connection link using the global bitmap index, the step of controlling the multi-link device to perform resource scheduling for the target event based on the deadline of the target event includes: Obtain the event queue contained in the target connection link, and obtain the deadline and priority data of each event in the event queue; After updating the deadline using the priority data, each event in the event queue is sorted and updated according to the priority data using the updated deadline. The target event with the same link feature value is obtained from the updated event queue using the global bitmap index; Based on the updated deadline, the number of executions and the execution duration of the target event under the link characteristic value are obtained, and the multi-link device is controlled to perform resource scheduling for the target event in the target connection link through the number of executions and the execution duration.
8. The multi-link device scheduling and control method according to claim 7, characterized in that, Updating the deadline using the priority data includes: Based on the priority data, obtain the first event with the highest priority and the second event with the second highest priority, and obtain the first deadline time of the first event and the second deadline time of the second event; The first deadline advance value of the first event is obtained based on the first priority feature value of the highest priority, and the second deadline update value of the second event is obtained based on the second priority feature value of the second highest priority; wherein, the first deadline advance value is greater than the second deadline update value; The first deadline is updated using the first deadline advance value, and the second deadline is updated using the second deadline update value.
9. A multi-link device scheduling and control system, characterized in that, The system is applied to a routing device, and the system includes: Global bitmap index generation module: used to obtain the link feature value of each connection link based on multiple connection links between the multi-link device and the routing device, and generate the global bitmap index of the multi-link device through the link feature value; The first scheduling control module is used to calculate the resource scheduling value of the multi-link device based on the virtual runtime and the number of ready events of each connection link, and to obtain the target connection link from the multiple connection links using the resource scheduling value; wherein, the resource scheduling value is the ratio of the virtual runtime of each connection link to the load weight value of each connection link; the target connection link is the connection link corresponding to the minimum resource scheduling value among the multiple connection links; The second scheduling control module is used to control the multi-link device to perform resource scheduling on the target event after retaining the target event that matches the link feature value from the target connection link using the global bitmap index.
10. A routing device, characterized in that, The routing device includes a processor and a memory, the memory storing computer-executable instructions that can be executed by the processor, the processor executing the computer-executable instructions to implement the steps of the multi-link device scheduling and control method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Network traffic scheduling method and device based on multiple links, equipment and storage medium
CN119854878A
Multi-service event cache dynamic scheduling and reporting method, medium and terminal
CN121750561A