Method, apparatus and device for cooperative scheduling and execution of wireless communication tasks, and storage medium

By employing a priority queue sorted by target transmission timestamp and hardware resource conflict avoidance rules in the LoRaWAN Class B protocol, the scheduling latency and CPU load issues in high-concurrency scenarios are resolved, achieving efficient and accurate task scheduling and execution.

CN121833287BActive Publication Date: 2026-07-07XINGLI COMP PRODS ZHUHAI

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
XINGLI COMP PRODS ZHUHAI
Filing Date
2026-03-11
Publication Date
2026-07-07

AI Technical Summary

Technical Problem

In IoT applications using protocols such as LoRaWAN Class B, traditional task management solutions experience a surge in CPU usage under high-concurrency scenarios, failing to achieve microsecond-level timing, with scheduling delays reaching the second level. Furthermore, the lack of a hardware resource conflict arbitration mechanism leads to low downlink data transmission success rates, unpredictable task delays, and prolonged high CPU load.

Method used

By dynamically organizing task sets using priority queues sorted by target sending timestamps, and combining this with pre-defined hardware resource conflict avoidance rules for hardware resource arbitration, the scheduling planning and resource execution are decoupled and coordinated, ensuring conflict-free access.

Benefits of technology

This reduces downlink scheduling latency from seconds to milliseconds, improving data transmission success rate and reducing CPU utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121833287B_ABST
    Figure CN121833287B_ABST
Patent Text Reader

Abstract

The wireless communication task cooperative scheduling and execution method provided by the embodiment of the present application is applied to a wireless communication task cooperative scheduling and execution device, and comprises the following steps: based on a target sending timestamp of each to-be-executed communication task, a task set is dynamically organized through a priority queue, and a next task to be triggered is continuously determined; in response to triggering of the next task, the next task is converted into an execution request and submitted to an execution queue running asynchronously; in the execution queue, the execution request is sorted and arbitrated according to a preset hardware resource conflict avoidance rule, so as to ensure that the corresponding radio frequency operation is executed after non-conflict access to the shared radio frequency hardware resource. The decoupling cooperation of scheduling planning and resource execution is realized, so that the downlink scheduling delay is reduced from the second level to the millisecond level, the success rate is improved, and the CPU occupancy rate is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of wireless communication technology, and in particular relates to a method, apparatus, device and storage medium for the coordinated scheduling and execution of wireless communication tasks. Background Technology

[0002] In IoT applications using protocols such as LoRaWAN Class B, gateways need to manage downlink communication from a massive number of terminals, sending data to dedicated receiving windows (Ping Slots) at precise times, while simultaneously handling uplink reception, beacon broadcasting, and other tasks in parallel. With large-scale terminal deployment, traditional task management solutions face significant challenges.

[0003] On the one hand, existing solutions use linear lists to store tasks and traverse to find the next task in O(N) complexity. In high-concurrency scenarios (N>1000 tasks), CPU usage surges, making it impossible to achieve microsecond-level timing and resulting in scheduling delays of up to seconds. On the other hand, the scheduler is tightly coupled with hardware drivers such as the radio frequency module and scheduling bus, and lacks a conflict arbitration mechanism, leading to problems such as bus access conflicts, incorrect state switching of the radio frequency module, and blocking of high-priority beacon tasks.

[0004] The aforementioned problems directly result in a downlink data transmission success rate of less than 50%, unpredictable task latency (up to 1.9 seconds in actual testing), and prolonged high CPU load (>80%). Therefore, a systematic solution that can achieve efficient, accurate, and conflict-free task scheduling and execution is urgently needed. Summary of the Invention

[0005] In view of this, embodiments of this application provide a method, apparatus, device, and storage medium for the collaborative scheduling and execution of wireless communication tasks. By using the target transmission timestamp as the sorting method and a priority queue to efficiently determine the triggering task, and combining preset hardware resource conflict avoidance rules for hardware resource arbitration, the decoupled collaboration between scheduling planning and resource execution is achieved, thereby reducing downlink scheduling latency from the second level to the millisecond level, improving the success rate, and reducing CPU utilization.

[0006] The first aspect of this application provides a method for the coordinated scheduling and execution of wireless communication tasks, applied in a device for the coordinated scheduling and execution of wireless communication tasks, the method comprising:

[0007] Based on the target sending timestamp of each communication task to be executed, the task set is dynamically organized through a priority queue, and the next task to be triggered is continuously determined.

[0008] In response to the triggering of the next task, it is converted into an execution request and submitted to an asynchronous execution queue;

[0009] In the execution queue, the execution requests are sorted and arbitrated according to preset hardware resource conflict avoidance rules to ensure that the corresponding radio frequency operation is executed only after conflict-free access to the shared radio frequency hardware resources.

[0010] In one embodiment, the priority queue is a min-heap data structure sorted by the target sending timestamp;

[0011] The process of dynamically organizing the task set through a priority queue based on the target sending timestamp of each communication task to be executed, and continuously determining the next task to be triggered, includes:

[0012] The newly arrived task is inserted into the min-heap data structure with its target sending timestamp as the key.

[0013] The top element of the min-heap data structure is checked at fixed or configurable intervals, and if its timestamp has expired, it is popped as the next task.

[0014] In one embodiment, the method further includes:

[0015] Monitor absolute time period switching events;

[0016] When a cycle switch occurs, the min-heap data structure is traversed to identify the task nodes whose target sending timestamps are logically invalidated due to cycle flipping.

[0017] Remap the target sending timestamps of the failed task nodes;

[0018] After remapping, the min-heap data structure is reconstructed.

[0019] In one embodiment, the hardware resource conflict avoidance rules include: state machine management rules and mutual exclusion access rules; the state machine management rules include maintaining a centralized radio frequency hardware state machine, the state machine including defining an idle state, a transmit occupied state, a receive occupied state, and a beacon reserved state; the mutual exclusion access rules include: serializing and controlling access to the underlying bus of the radio frequency hardware through a global mutual exclusion lock.

[0020] In one embodiment, the beacon reservation state setting is strictly bound to the timing of periodic beacon broadcasts in the network device; the method further includes:

[0021] Within a preset protection time window before the planned beacon transmission, the state machine is proactively and in advance set to the beacon reserved state to prevent the execution queue from starting any ordinary data transmission task during this period, thus avoiding timing conflicts between beacon transmission and data transmission.

[0022] In one embodiment, the sorting and arbitration of execution requests includes:

[0023] When it is determined that the request cannot be executed at present, it is placed in the priority waiting sub-queue;

[0024] The sorting criteria for the priority waiting sub-queue are independent of the target sending timestamp of the scheduling phase, but are dynamically determined based on at least one of the following factors: the business priority of the task corresponding to the request, the waiting time, or the number of retries.

[0025] In one embodiment, the scheduling phase and the asynchronous coordination phase are executed on different hardware threads or processing cores and communicate through a lock-free circular buffer. The execution request is encapsulated as a message and stored in the buffer to efficiently pass physical-level decoupling and zero-copy transmission.

[0026] A second aspect of this application provides a network device with shared radio frequency hardware resources, including:

[0027] The determination module is used to dynamically organize the task set through a priority queue based on the target sending timestamp of each communication task to be executed, and to continuously determine the next task to be triggered.

[0028] The submission module is used to respond to the triggering of the next task, convert it into an execution request, and submit it to the asynchronous execution queue;

[0029] The sorting and arbitration module is used to sort and arbitrate the execution requests in the execution queue according to preset hardware resource conflict avoidance rules, so as to ensure that the corresponding radio frequency operation is executed only after the shared radio frequency hardware resources are accessed without conflict.

[0030] In one embodiment, the priority queue is a min-heap data structure sorted by the target sending timestamp;

[0031] The determining module includes:

[0032] An insertion unit is used to insert a newly arrived task into the min-heap data structure with its target sending timestamp as the key.

[0033] A pop unit is used to check the top element of the min-heap data structure at a fixed or configurable period, and pop it as the next task if its timestamp has expired.

[0034] In one embodiment, the device further includes:

[0035] The monitoring module is used to monitor period switching events in absolute time.

[0036] The identification module is used to traverse the min-heap data structure when a cycle switch occurs to identify the task node whose target sending timestamp has become logically invalid due to cycle flipping.

[0037] The mapping module is used to remap the target sending timestamps of the failed task nodes;

[0038] The reconstruction module is used to reconstruct the min-heap data structure after remapping.

[0039] In one embodiment, the hardware resource conflict avoidance rules include: state machine management rules and mutual exclusion access rules; the state machine management rules include maintaining a centralized radio frequency hardware state machine, the state machine including defining an idle state, a transmit occupied state, a receive occupied state, and a beacon reserved state; the mutual exclusion access rules include: serializing and controlling access to the underlying bus of the radio frequency hardware through a global mutual exclusion lock.

[0040] In one embodiment, the beacon reservation state setting is strictly bound to the timing of periodic beacon broadcasts in the network device; the apparatus further includes:

[0041] The preset module is used to proactively and in advance set the state machine to the beacon reserved state within a preset protection time window before the planned beacon transmission, so as to prevent the execution queue from starting any normal data transmission task during this period and avoid timing conflicts between beacon transmission and data transmission.

[0042] In one embodiment, the sorting and arbitration module includes:

[0043] The placement unit is used to place the request into a priority waiting sub-queue when it is determined that the request cannot be executed at present. The sorting basis of the priority waiting sub-queue is independent of the target sending timestamp of the scheduling phase, but is dynamically determined based on at least one of the following factors: the business priority of the task corresponding to the request, the waiting time, or the number of retries.

[0044] In one embodiment, the scheduling phase and the asynchronous coordination phase are executed on different hardware threads or processing cores and communicate through a lock-free circular buffer. The execution request is encapsulated as a message and stored in the buffer to efficiently pass physical-level decoupling and zero-copy transmission.

[0045] A third aspect of this application provides a device for the coordinated scheduling and execution of wireless communication tasks, comprising: a processor, a memory, and a computer program stored in the memory and executable on the processor; the processor executes the computer program to implement the steps of the method described in the first aspect above.

[0046] A fourth aspect of this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the method described in the first aspect above.

[0047] The method for collaborative scheduling and execution of wireless communication tasks provided in this application is applied to a device for collaborative scheduling and execution of wireless communication tasks. The method includes: dynamically organizing a task set through a priority queue based on the target transmission timestamp of each communication task to be executed, and continuously determining the next task to be triggered; in response to the triggering of the next task, converting it into an execution request and submitting it to an asynchronously running execution queue; in the execution queue, sorting and arbitrating the execution requests according to preset hardware resource conflict avoidance rules to ensure conflict-free access to the shared radio frequency hardware resources before executing the corresponding radio frequency operation. By using the target transmission timestamp as the sorting method, efficiently determining the triggering task through a priority queue, and combining preset hardware resource conflict avoidance rules for hardware resource arbitration, decoupling and collaboration between scheduling planning and resource execution are achieved, thereby reducing downlink scheduling latency from seconds to milliseconds, improving success rate, and reducing CPU utilization. Attached Figure Description

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

[0049] Figure 1 This is a flowchart illustrating a method for the coordinated scheduling and execution of wireless communication tasks according to an embodiment of this application.

[0050] Figure 2 This is a schematic diagram illustrating the implementation process of a collaborative scheduling and execution method for wireless communication tasks provided in another embodiment of this application.

[0051] Figure 3 This is a schematic diagram of a network device with shared radio frequency hardware resources provided in an embodiment of this application.

[0052] Figure 4 This is a schematic diagram of a wireless communication task collaborative scheduling and execution device provided in an embodiment of this application. Detailed Implementation

[0053] The embodiments of the technical solution of this application will now be described in detail with reference to the accompanying drawings. These embodiments are only used to more clearly illustrate the technical solution of this application and are therefore merely examples, and should not be used to limit the scope of protection of this application.

[0054] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains; the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the application; the terms “comprising” and “having”, and any variations thereof, in the specification, claims, and foregoing description of the drawings are intended to cover non-exclusive inclusion.

[0055] In the description of the embodiments of this application, technical terms such as "first" and "second" are used only to distinguish different objects and should not be construed as indicating or implying relative importance or implicitly specifying the number, specific order, or primary and secondary relationship of the indicated technical features. In the description of the embodiments of this application, "multiple" means two or more, unless otherwise explicitly defined.

[0056] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0057] In the description of the embodiments in this application, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this document generally indicates that the preceding and following related objects have an "or" relationship.

[0058] In the description of the embodiments of this application, the term "multiple frames" refers to two or more (including two).

[0059] In the description of the embodiments of this application, the technical terms "center," "longitudinal," "lateral," "length," "width," "thickness," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," "outer," "clockwise," "counterclockwise," "axial," "radial," and "circumferential" indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing the embodiments of this application and simplifying the description, and are not intended to indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the embodiments of this application.

[0060] This application provides a method for the coordinated scheduling and execution of wireless communication tasks. By using the target transmission timestamp as the sorting method and a priority queue to efficiently determine the triggering task, and combining preset hardware resource conflict avoidance rules for hardware resource arbitration, the method achieves decoupling and coordination between scheduling planning and resource execution. This reduces downlink scheduling latency from the second level to the millisecond level, improves the success rate, and reduces CPU utilization.

[0061] Please see Figure 1 As shown, Figure 1 This is a flowchart illustrating a method for the coordinated scheduling and execution of wireless communication tasks according to an embodiment of this application. It is applied in a device for the coordinated scheduling and execution of wireless communication tasks. Figure 1 As can be seen, the method for coordinated scheduling and execution of wireless communication tasks in this application includes steps S110 to S130. Details are as follows:

[0062] S110: Based on the target sending timestamp of each communication task to be executed, dynamically organize the task set through a priority queue, and continuously determine the next task to be triggered.

[0063] This step is the core of scheduling planning. It uses a priority queue to achieve efficient and orderly management of massive scheduled tasks, solving the problem of low efficiency in traditional linear search and quickly locating the next task to be triggered.

[0064] When a communication task to be executed (such as downstream data transmission) is created, the precise absolute time point is calculated by combining network protocol parameters (such as the Ping Slot parameter of LoRaWAN Class B) and the system's high-precision clock as the target transmission timestamp. The time unit is microseconds or milliseconds. The system arrival time serves as the sole time basis for task execution.

[0065] In one embodiment, the priority queue is a min-heap data structure sorted by the target sending timestamp.

[0066] Specifically, the step of dynamically organizing the task set through a priority queue based on the target sending timestamp of each communication task to be executed, and continuously determining the next task to be triggered, includes: inserting the newly arrived task into the min-heap data structure with its target sending timestamp as the key; checking the top element of the min-heap data structure at a fixed or configurable period, and popping it as the next task if its timestamp has expired.

[0067] The priority queue is implemented using a min-heap data structure. The target sending timestamp is used as the sorting key, and the tasks are abstracted as heap nodes. The top of the heap is always the task with the earliest target sending time, achieving O(1) complexity for accessing the next task. When a new task is inserted, the new task node is placed at the tail of the heap. The timestamp is compared with the parent node and adjusted through the "float" operation to restore the heap order, with an average time complexity of O(log N). When a triggered task is removed, the tail node is moved to the top of the heap. The timestamp is compared with the child node and adjusted through the "sink" operation to restore the heap order, with an average time complexity of O(log N), enabling the queue to support dynamic adjustment.

[0068] The task is periodically executed by an independent scheduling thread or a timed interrupt service routine to continuously determine the tasks to be triggered. The specific work cycle is as follows: access the top element of the heap at a fixed period (e.g., 1 millisecond) or an adaptive period to obtain the target sending timestamp; compare the target sending timestamp with the current system time; if the target sending timestamp is less than or equal to the current system time, the task is determined to have expired, and the top task of the heap is popped as the next task to be triggered.

[0069] As can be seen from the above analysis, this step uses min-heap sort based on the target transmission timestamp to ensure that the system can accurately and without omission find the next most urgent task in physical time among a massive number of timed tasks with an algorithm complexity of O(1). This is the cornerstone of the stringent downlink time window requirements of wireless communication protocols (such as LoRaWAN Class B / C).

[0070] S120: In response to the triggering of the next task, convert it into an execution request and submit it to the asynchronous execution queue.

[0071] In response to the triggering of the next task, the task is converted into a hardware-independent execution request. Specifically, the execution request includes at least: radio frequency parameters (such as center frequency, spreading factor, transmit power, etc.), data buffer pointer, and task identifier, realizing the abstract conversion from the scheduling layer "time task" to the execution layer "hardware operation command".

[0072] After the conversion is completed, the scheduling thread does not wait for the hardware to finish executing. Instead, it stores the execution request in the thread-safe execution queue and immediately returns to S110 to continue scheduling. It is preferable to use a lock-free ring buffer to achieve efficient communication between the scheduling thread and the execution thread. Memory transfer is achieved through concurrent access of head and tail pointers to reduce overhead. Alternatively, the scheduling thread and the execution thread can be bound to different CPU cores to achieve physical parallelism.

[0073] To achieve a balance between low latency and low power consumption, this application provides two implementations of execution thread wake-up mechanisms.

[0074] Example 1: When idle, the execution thread continuously polls the head and tail pointers of the circular buffer at very short intervals (e.g., 100 microseconds). When a new request is detected to be enqueued, the arbitration execution process is immediately initiated. This mode is suitable for scenarios that are extremely sensitive to response latency.

[0075] Example 2: After submitting a request, the scheduling thread notifies the execution thread by writing to an atomic variable or triggering a lightweight software interrupt / signal. The execution thread can normally be in a dormant state or executing low-priority background tasks, only being awakened and processing the request upon receiving the notification. This mode can significantly reduce CPU utilization and system power consumption under low task load, making it suitable for power-sensitive battery-powered devices.

[0076] It should be noted that, regardless of the wake-up mechanism used, data transfer between the scheduling thread and the execution thread is completed through a lock-free circular buffer, achieving zero-copy and physical decoupling.

[0077] S130: In the execution queue, the execution requests are sorted and arbitrated according to the preset hardware resource conflict avoidance rules to ensure that the corresponding radio frequency operation is executed only after the shared radio frequency hardware resources are accessed without conflict.

[0078] Centralized arbitration enables conflict-free access to shared radio frequency resources (RF modules, SPI bus), ensuring system stability.

[0079] In one embodiment, the hardware resource conflict avoidance rules include: state machine management rules and mutual exclusion access rules; the state machine management rules include maintaining a centralized RF hardware state machine (software variable), the state machine including defining idle state, transmit occupied state, receive occupied state, and beacon reserved state; the mutual exclusion access rules include: serializing and controlling access to the underlying bus of the RF hardware through a global mutex. Specifically, before request processing, the state machine must be queried, and SPI bus access must be protected through a global mutex to ensure that RF module configuration, data writing, and other operations are serialized, avoiding bus contention errors.

[0080] In one embodiment, the setting of the beacon reservation state is strictly bound to the timing of the periodic beacon broadcast in the network device. It should be noted that, for the periodic beacon broadcast (the highest priority task), a protection time window (such as 5 milliseconds in advance) is preset before the planned transmission, and the state machine is actively set to the beacon reservation state to prevent the execution queue from starting any ordinary data transmission task during this period, so as to avoid timing conflicts between beacon transmission and data transmission.

[0081] For example, the sorting and arbitration of execution requests includes: querying the state machine; if it is not in an idle state, proceed to the next step; if it is in another state, determine that the request cannot be executed at present and place it in the priority waiting sub-queue; request a mutex lock; if the request is successful, proceed to the next step; if it fails, store it in the waiting queue; confirm that the state machine is in an idle state again, then atomically set the state machine to a sending occupied state; call the underlying driver, configure the radio frequency module and start data transmission; after transmission is completed, release the mutex lock, restore the state machine to an idle state or a receiving occupied state, and process the next request in the waiting queue; the sorting basis of the priority waiting sub-queue is independent of the target transmission timestamp of the scheduling phase, but is dynamically determined based on at least one of the following factors: the business priority of the task corresponding to the request, the waiting time, or the number of retries. The arbitration basis of the priority waiting sub-queue takes effect when multiple tasks are forced to wait due to conflicts over shared hardware resources, and is used to determine who has priority to use the resource after it is released. It solves the system fairness and stability problem under instantaneous conflicts, but does not affect the triggering order of tasks on the global timeline.

[0082] In one embodiment, the scheduling phase and the asynchronous coordination phase are executed on different hardware threads or processing cores and communicate through a lock-free circular buffer. The execution request is encapsulated as a message and stored in the buffer to efficiently pass physical-level decoupling and zero-copy transmission.

[0083] It should be further noted that, in response to task scheduling errors caused by the cycle flipping of the embedded system's time counter, a cross-cycle processing mechanism can be added to ensure robustness during long-term operation.

[0084] Specifically, please refer to Figure 2 As shown, Figure 2 This is a schematic diagram illustrating the implementation flow of a collaborative scheduling and execution method for wireless communication tasks provided in another embodiment of this application. Figure 2 It can be seen that this embodiment is similar to... Figure 1 Compared to the illustrated embodiment, S250 to S270 are implemented in the same way as S120 to S130, except that S210 to S240 are included before S250. Details are as follows:

[0085] S210: Monitors absolute time period switching events.

[0086] Monitor the periodic switching of the system's absolute time counter through background tasks or hook functions.

[0087] S220: When a cycle switch occurs, traverse the min-heap data structure to identify the task node whose target sending timestamp has become logically invalid due to cycle flipping.

[0088] When a cycle switch occurs and the cycle is flipped, the min-heap data structure identifies tasks whose timestamp values ​​are less than the current time but actually belong to a future cycle due to the flip and marks them as logically invalid.

[0089] S230: Remap the target sending timestamp of the failed task node.

[0090] Add a full cycle duration to the original timestamp of the failed task and map it to the new cycle.

[0091] S240: Reconstruct the min-heap data structure after remapping.

[0092] After the mapping is completed, the preset algorithm is called to rebuild the min-heap and restore the heap order property.

[0093] S250: Based on the target sending timestamp of each communication task to be executed, dynamically organize the task set through a priority queue, and continuously determine the next task to be triggered.

[0094] S260: In response to the triggering of the next task, convert it into an execution request and submit it to the asynchronous execution queue.

[0095] S270: In the execution queue, the execution requests are sorted and arbitrated according to the preset hardware resource conflict avoidance rules to ensure that the corresponding radio frequency operation is executed only after the shared radio frequency hardware resources are accessed without conflict.

[0096] As can be seen from the above analysis, the collaborative scheduling and execution method for wireless communication tasks provided in this application dynamically organizes the task set through a priority queue based on the target transmission timestamp of each communication task to be executed, and continuously determines the next task to be triggered; in response to the triggering of the next task, it is converted into an execution request and submitted to an asynchronously running execution queue; in the execution queue, the execution requests are sorted and arbitrated according to preset hardware resource conflict avoidance rules to ensure that the corresponding radio frequency operation is executed only after conflict-free access to the shared radio frequency hardware resources. By using the target transmission timestamp as the sorting method, efficiently determining the triggering task through a priority queue, and combining preset hardware resource conflict avoidance rules for hardware resource arbitration, the decoupled collaboration between scheduling planning and resource execution is achieved, thereby reducing downlink scheduling latency from the second level to the millisecond level, improving the success rate, and reducing CPU utilization.

[0097] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included 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.

[0098] Please see Figure 3 , Figure 3 This is a schematic diagram of a network device with shared radio frequency hardware resources provided in an embodiment of this application. The network device with shared radio frequency hardware resources includes modules or units used for performing... Figure 1 The steps in the corresponding embodiments. Please refer to the details. Figure 1 The relevant descriptions in the corresponding embodiments are shown below. For ease of explanation, only the parts relevant to this embodiment are shown. See also... Figure 3 A network device 300 having shared radio frequency hardware resources includes:

[0099] The determination module 310 is used to dynamically organize the task set through a priority queue based on the target sending timestamp of each communication task to be executed, and to continuously determine the next task to be triggered.

[0100] The submission module 320 is used to respond to the triggering of the next task, convert it into an execution request, and submit it to the asynchronous execution queue;

[0101] The sorting and arbitration module 330 is used to sort and arbitrate the execution requests in the execution queue according to the preset hardware resource conflict avoidance rules, so as to ensure that the corresponding radio frequency operation is executed only after the shared radio frequency hardware resources are accessed without conflict.

[0102] In one embodiment, the priority queue is a min-heap data structure sorted by the target sending timestamp;

[0103] The determining module 310 includes:

[0104] An insertion unit is used to insert a newly arrived task into the min-heap data structure with its target sending timestamp as the key.

[0105] A pop unit is used to check the top element of the min-heap data structure at a fixed or configurable period, and pop it as the next task if its timestamp has expired.

[0106] In one embodiment, the device 300 further includes:

[0107] The monitoring module is used to monitor period switching events in absolute time.

[0108] The identification module is used to traverse the min-heap data structure when a cycle switch occurs to identify the task node whose target sending timestamp has become logically invalid due to cycle flipping.

[0109] The mapping module is used to remap the target sending timestamps of the failed task nodes;

[0110] The reconstruction module is used to reconstruct the min-heap data structure after remapping.

[0111] In one embodiment, the hardware resource conflict avoidance rules include: state machine management rules and mutual exclusion access rules; the state machine management rules include maintaining a centralized radio frequency hardware state machine, the state machine including defining an idle state, a transmit occupied state, a receive occupied state, and a beacon reserved state; the mutual exclusion access rules include: serializing and controlling access to the underlying bus of the radio frequency hardware through a global mutual exclusion lock.

[0112] In one embodiment, the beacon reservation state setting is strictly bound to the timing of periodic beacon broadcasts in the network device; the apparatus further includes:

[0113] The preset module is used to proactively and in advance set the state machine to the beacon reserved state within a preset protection time window before the planned beacon transmission, so as to prevent the execution queue from starting any normal data transmission task during this period and avoid timing conflicts between beacon transmission and data transmission.

[0114] In one embodiment, the sorting and arbitration module 330 includes:

[0115] The placement unit is used to place the request into a priority waiting sub-queue when it is determined that the request cannot be executed at present. The sorting basis of the priority waiting sub-queue is independent of the target sending timestamp of the scheduling phase, but is dynamically determined based on at least one of the following factors: the business priority of the task corresponding to the request, the waiting time, or the number of retries.

[0116] In one embodiment, the scheduling phase and the asynchronous coordination phase are executed on different hardware threads or processing cores and communicate through a lock-free circular buffer. The execution request is encapsulated as a message and stored in the buffer to efficiently pass physical-level decoupling and zero-copy transmission.

[0117] Please see Figure 4 , Figure 4 This is a schematic diagram of a wireless communication task collaborative scheduling and execution device provided in an embodiment of this application. Figure 4 It is understood that the wireless communication task collaborative scheduling and execution device 400 includes: a processor 410, a memory 420, and a computer program 430 stored in the memory 420 and executable on the processor 410; when the processor 410 executes the computer program 430, it implements the steps in the above-mentioned embodiments of the multi-dimensional fusion-based cell data analysis method, for example... Figure 1 The steps S110 to S130 are shown. Alternatively, when the processor 410 executes the computer program 430, it implements the functions of each module / unit in the above-described device embodiments, for example... Figure 3The functions of modules 310 to 330 are shown.

[0118] For example, computer program 430 may be divided into one or more modules / units, one or more of which are stored in memory 420 and executed by processor 410 to complete this application. One or more modules / units may be a series of computer program instruction segments capable of performing specific functions, which describe the execution process of computer program 430 in a wireless communication task coordination scheduling and execution device.

[0119] The wireless communication task collaborative scheduling and execution device 400 provided in this embodiment may include, but is not limited to, a processor and a memory. Those skilled in the art will understand that... Figure 4 This is merely an example of a wireless communication task coordination scheduling and execution device 400 and does not constitute a limitation on the wireless communication task coordination scheduling and execution device 400. It may include more or fewer components than shown, or combine certain components, or different components. For example, the wireless communication task coordination scheduling and execution device 400 may also include input / output devices, network access devices, buses, etc.

[0120] The processor 410 may be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.

[0121] The memory 420 can be an internal storage unit of the wireless communication task scheduling and execution device 400, such as a hard disk or RAM of the wireless communication task scheduling and execution device 400. The memory 420 can also be an external storage device of the wireless communication task scheduling and execution device 400, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the wireless communication task scheduling and execution device 400. Furthermore, the wireless communication task scheduling and execution device 400 can include both internal storage units and external storage devices. The memory 420 is used to store computer programs and other programs and data required by the wireless communication task scheduling and execution device 400. The memory 420 can also be used to temporarily store data that has been output or will be output.

[0122] It should be noted that the information interaction and execution process between the above-mentioned devices / units are based on the same concept as the method embodiments of this application. For details on their specific functions and technical effects, please refer to the method embodiments section, and they will not be repeated here.

[0123] This application also provides a network device, which includes: at least one processor, a memory, and a computer program stored in the memory and executable on the at least one processor, wherein the processor executes the computer program to implement the steps in any of the above method embodiments.

[0124] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps described in the various method embodiments above.

[0125] This application provides a computer program product that, when run on a mobile terminal, enables the mobile terminal to implement the steps described in the above-described method embodiments.

[0126] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of this application can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include at least: any entity or device capable of carrying computer program code to a photographing device / terminal device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium. Examples include USB flash drives, portable hard drives, magnetic disks, or optical disks. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electrical carrier signals or telecommunication signals.

[0127] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0128] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0129] In the embodiments provided in this application, it should be understood that the disclosed apparatus / network devices and methods can be implemented in other ways. For example, the apparatus / network device embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0130] 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.

[0131] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. These modifications 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 this application, and should all be included within the protection scope of this application.

Claims

1. A method for cooperative scheduling and execution of wireless communication tasks, characterized in that, In a device for the coordinated scheduling and execution of wireless communication tasks, the method includes: Scheduling phase: Based on the target sending timestamp of each communication task to be executed, a task set is dynamically organized through a priority queue, and the next task to be triggered is continuously determined; wherein, the priority queue is a min-heap data structure with the target sending timestamp as the sorting key; the process of dynamically organizing the task set through the priority queue based on the target sending timestamp of each communication task to be executed, and continuously determining the next task to be triggered, includes: inserting newly arrived tasks with their target sending timestamp as the key value into the min-heap data structure; checking the top element of the min-heap data structure at a fixed or configurable period, and if its timestamp has expired, popping it as the next task; In response to the triggering of the next task, it is converted into an execution request and submitted to an asynchronous execution queue; Execution phase: In the execution queue, the execution requests are sorted and arbitrated according to the preset hardware resource conflict avoidance rules to ensure that the corresponding radio frequency operation is executed only after the shared radio frequency hardware resources are accessed without conflict. The hardware resource conflict avoidance rules include state machine management rules, which include: maintaining a centralized radio frequency hardware state machine, wherein the state machine defines an idle state, a transmit occupied state, a receive occupied state, and a beacon reserved state that is strictly bound to the timing of periodic beacon broadcasts; and within a preset protection time window before the planned beacon transmission, the state machine is proactively and in advance set to the beacon reserved state to prevent the execution queue from starting any ordinary data transmission task during this period, thereby avoiding timing conflicts between beacon transmission and data transmission. The method also includes a cross-cycle processing mechanism: Monitor absolute time period switching events; When a cycle switch occurs, the min-heap data structure is traversed to identify the task nodes whose target sending timestamps are logically invalidated due to cycle flipping. Remap the target sending timestamps of the failed task nodes; After remapping, the min-heap data structure is reconstructed; The process of sorting and arbitrating the execution requests further includes: When it is determined that the execution request cannot be executed at present, it is placed in the priority waiting sub-queue; the sorting basis of the priority waiting sub-queue is independent of the target sending timestamp in the scheduling phase, and is dynamically determined based on at least one of the following factors: the business priority of the task corresponding to the execution request, the waiting time, or the number of retries.

2. The method according to claim 1, characterized in that, The hardware resource conflict avoidance rules also include: mutual exclusion access rules; the mutual exclusion access rules include: serializing and controlling access to the underlying bus of the radio frequency hardware through a global mutual exclusion lock.

3. The method according to claim 1, characterized in that, The scheduling phase and the asynchronous coordination phase are executed on different hardware threads or processing cores, and communicate through a lock-free circular buffer. The execution request is encapsulated as a message and stored in the buffer to achieve physical decoupling and zero-copy transfer.

4. A network device with shared radio frequency hardware resources, characterized in that, include: The determination module is used to dynamically organize a task set through a priority queue based on the target sending timestamp of each communication task to be executed, and to continuously determine the next task to be triggered; wherein, the priority queue is a min-heap data structure with the target sending timestamp as the sorting key; the determination module is specifically used to: insert the newly arrived task into the min-heap data structure with its target sending timestamp as the key; check the top element of the min-heap data structure at a fixed or configurable period, and if its timestamp has expired, pop it as the next task; The submission module is used to respond to the triggering of the next task, convert it into an execution request, and submit it to the asynchronous execution queue; The sorting and arbitration module is used to sort and arbitrate the execution requests in the execution queue according to preset hardware resource conflict avoidance rules, so as to ensure that the corresponding radio frequency operation is executed only after conflict-free access to the shared radio frequency hardware resources; wherein, the hardware resource conflict avoidance rules include state machine management rules, which include maintaining a centralized radio frequency hardware state machine, and the state machine defines an idle state, a transmit occupied state, a receive occupied state, and a beacon reservation state that is strictly bound to the periodic beacon broadcast timing; The preset module is used to actively and in advance set the state machine to the beacon reserved state within a preset protection time window before the planned beacon transmission, so as to prevent the execution queue from starting any normal data transmission task during this period and avoid timing conflicts between beacon transmission and data transmission. The monitoring module is used to monitor period switching events in absolute time. The identification module is used to traverse the min-heap data structure when a cycle switch occurs to identify the task node whose target sending timestamp has become logically invalid due to cycle flipping. The mapping module is used to remap the target sending timestamps of the failed task nodes; A reconstruction module is used to reconstruct the min-heap data structure after remapping. The sorting and arbitration module is further configured to: when it is determined that the request cannot be executed at present, place it into a priority waiting sub-queue; the sorting basis of the priority waiting sub-queue is independent of the target sending timestamp in the scheduling phase, but is dynamically determined based on at least one of the following factors: the business priority of the task corresponding to the request, the waiting time, or the number of retries.

5. A device for collaborative scheduling and execution of wireless communication tasks, characterized in that, It includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the method as described in any one of claims 1 to 3.

6. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1 to 3.