Real-time scheduling method and system for fine-grained data flow in wireless network

The decomposition mass factor method shortens the time trigger flow cycle, and combines the earliest cutoff time priority scheduling and channel frequency hopping technology, the scheduling bandwidth competition and network blockage problems in wireless sensor networks are solved, achieving more efficient scheduling granularity and real-time.

CN120239064AActive Publication Date: 2025-07-01ZHEJIANG SCI-TECH UNIV

Patent Information

Application Number
CN202510705628.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-29
Publication Date
2025-07-01
Estimated Expiration
2045-05-29

AI Technical Summary

Technical Problem

In existing wireless sensor and actuator networks, the scheduling of time-triggered streams and event-triggered streams has bandwidth competition and network blockage. The existing scheduling algorithms are not ideal in large-scale networks and cannot meet the scheduling needs of different nodes. The long superframe length leads to excessive memory usage.

Method used

The decomposition mass factor method is used to shorten the time-triggered flow cycle, and combined with the earliest cut-off time priority scheduling algorithm and channel frequency hopping technology, the scheduling of event-triggered flow is optimized and packet independent channel scheduling is grouped to solve the interference problem of large-scale networks.

Benefits of technology

It realizes a finer scheduling granularity, reduces the memory usage and transmission delay of network nodes, improves system real-time and time slot utilization, and adapts to the scheduling needs of large-scale networks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120239064A_ABST
    Figure CN120239064A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of wireless network scheduling, and particularly relates to a fine-grained data flow real-time scheduling method and system in a wireless network, and the scheduling method specifically comprises the steps: decomposing a reference period based on a decomposition factor method, and obtaining a reference factor decomposition formula; respectively reducing the original periods of the other time trigger streams based on the reference factor decomposition formula to obtain a target reduced period; determining whether a schedulable condition is satisfied based on the reference period and the target reduction period; if yes, carrying out priority ranking on the time trigger flow, distributing the time trigger flow to a time slot of a superframe, and carrying out real-time scheduling on the time trigger flow by utilizing an earliest deadline priority scheduling algorithm; the free time slot of the superframe is used as a reserved time slot for scheduling the event trigger flow. According to the method, the period of each time trigger flow is compressed by adopting a decomposition factor method, so that the superframe length is reduced, the memory occupation of network nodes is reduced, and the corresponding real-time scheduling method has finer time granularity and can also remarkably reduce the sending delay.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of wireless network scheduling, and in particular relates to a method and system for real-time scheduling of fine-grained data streams in a wireless network. Background Art

[0002] In the application of wireless sensor and actuator networks (WSANs), two common data streams are time-triggered streams and event-triggered streams. With the development of industrial automation, automation equipment has higher and higher requirements for the real-time and deterministic control systems. In some critical applications, even a small control delay may lead to a significant decrease in system performance. For example, in nuclear power facilities, periodic control is required to ensure the stability of the system. If the critical safety monitoring system cannot respond in time due to the delay of periodic data, it will cause serious environmental pollution. In order to meet these strict requirements, the concept of time-triggered streams is introduced. Time-triggered streams refer to data streams formed by data packets sent at a fixed period. Since wireless transmission is easily interfered by external factors, there is a certain jitter in the transmission time. By setting the transmission time of data packets at equal intervals, it can be ensured that the sender and receiver ignore the uncertainty of the wireless transmission time and transmit data according to the limit of the sender's own sampling time, reducing the impact of delay on system performance. Time-triggered streams require the system to send data periodically. However, not all data needs to be sent periodically. Periodic transmission of useless data will lead to a waste of network bandwidth and processing resources. For example, in a temperature monitoring system, sensors continuously collect temperature data, but most of the time, the temperature is stable and does not exceed the threshold, so there is no need to transmit data periodically. Only when the temperature data exceeds the threshold, data transmission is required. For this reason, event-triggered streams are born, which refers to the data stream formed by data packets generated by emergencies. The coordination of time-triggered streams and event-triggered streams enables industrial control systems to better balance real-time performance and resource utilization, thereby improving overall efficiency and reliability.

[0003] The simultaneous scheduling of event-triggered flows and time-triggered flows may cause bandwidth competition and network congestion, thus affecting the real-time performance of the entire system. To effectively manage these two types of data flows and ensure the optimal utilization of system resources, a large number of scheduling algorithms have been proposed. Since centralized scheduling algorithms can utilize global information to optimize real-time performance, most current WSANs with strict real-time requirements adopt centralized scheduling algorithms. Centralized scheduling means that there is a central control entity (such as a scheduler or a controller) responsible for collecting all information inside and outside the system and making appropriate scheduling decisions based on this information. When using a wired network as the control network for industrial sites, the scheduling of time-triggered flows using time-sensitive networks has been relatively mature. However, using a wireless network for industrial network control is vulnerable to packet collisions and external interference. Therefore, the scheduling of time-triggered flows and event-triggered flows in WSANs still needs to be continuously improved. Existing technologies have proposed using reinforcement learning to handle the two types of data flows in WSANs, but in large-scale networks, the scheduling effect is not ideal. In addition, when using existing centralized scheduling algorithms to handle the two types of data flows in WSANs, only time-triggered flows with certain specific periods can be scheduled, and the available periods are limited and have a large gap, that is, the granularity of available periods is large.

[0004] In addition, to simplify the design of industrial automation systems, it is required that each sensor / actuator send data flows at the same time interval, that is, the periods of time-triggered flows of each node are consistent. However, not every node generates scheduling requirements at the same time interval. For example, for a robot performing precise operations on an automated assembly line, which has multiple sensors inside. The position sensor is responsible for real-time monitoring of the robot's position and needs to update data at a millisecond-level time interval to precisely control the robot's behavior; while the temperature sensor monitors the internal temperature of the robot and only needs to update data at a minute-level time interval to avoid affecting the robot's lifespan due to long-term operation at high temperatures. It can be seen that the periods of time-triggered flows of each node in the network should meet their own needs and be different from each other.

[0005] To meet the scheduling requirements of time-triggered flows with different periods, various methods have been proposed, such as Shortest Remaining Time First (SRTF) scheduling, Fixed Priority Scheduling (FPS), etc. Among them, the most representative method is the Least Common Multiple (LCM) scheduling method. This method provides a unified time framework, i.e., a superframe, for all periodic flows. Each periodic flow can be scheduled in a certain time slot of the superframe. Since multiple time-triggered flows with different periods need to be scheduled simultaneously, the length of the superframe needs to be set as the least common multiple of these periods. Therefore, this method is called the Least Common Multiple scheduling method. When there are a large number of time-triggered flows with different periods in the network, their least common multiple may be very large, resulting in an overly long superframe length. After the superframe is distributed to each node, it will occupy a large amount of memory space. To shorten the superframe length, the existing regulations require that the periods of each time-triggered flow be in the form of powers of 2. Although this greatly reduces the superframe length of the network, it poses a prerequisite constraint on the periods of the time-triggered flows to be scheduled, and the period granularity is relatively rough, with fewer available period options for the time-triggered flows. Summary of the Invention

[0006] Based on the above-mentioned drawbacks and deficiencies in the prior art, one of the objectives of the present invention is to at least solve one or more of the above problems existing in the prior art. In other words, one of the objectives of the present invention is to provide a fine-grained data flow real-time scheduling method and system in a wireless network that meet one or more of the foregoing requirements.

[0007] To achieve the above-mentioned invention objective, the present invention adopts the following technical solutions: A fine-grained data flow real-time scheduling method in a wireless network, comprising the following steps: S1. Collect the original periods of the time-triggered flows of each network node, and use the minimum period as the reference period; S2. Determine whether the reference period is an even number; if so, go to step S3; if not, subtract 1 from the reference period to convert it into an even number and then go to step S3; S3. Decompose the reference period processed in step S2 based on the prime factor decomposition method to obtain the reference prime factor decomposition formula; S4. Based on the reference prime factor decomposition formula, reduce the original periods of the remaining time-triggered flows respectively; wherein, by adjusting the power exponent of the smallest prime factor 2 in the reference prime factor decomposition formula to the maximum, and the obtained target composite number is not greater than the period of the time-triggered flow, the target composite number is used as the target reduced period after the reduction of the time-triggered flow; S5. Determine whether the schedulable condition is satisfied based on the reference period and the target reduction period; if so, based on the reference period and the target reduction period, sort the time-triggered flows in ascending order of priority and allocate them to the time slots of the superframe, and perform real-time scheduling on the time-triggered flows using the earliest deadline first scheduling algorithm; wherein, use the idle time slots of the superframe as the reserved time slots for scheduling event-triggered flows.

[0008] As a preferred solution, in step S3, the reference prime factorization formula is: ; wherein, is the reference period, are prime factors respectively, and n is the number of prime factors other than 2; are the power exponents of the prime factors respectively, and the values are non-negative positive integers.

[0009] As a preferred solution, in step S4, the target reduction period after reducing the time-triggered flow is: ; wherein, is the target reduction period after reducing the i-th time-triggered flow, is the maximum value taken when is satisfied, is the original period of the i-th time-triggered flow.

[0010] As a preferred solution, in step S5, the schedulable condition is: ; wherein, is the least common multiple of the reference period and the target reduction period.

[0011] As a preferred solution, in step S5, if the schedulable condition is not satisfied, then adopt the channel hopping technology, divide the network nodes into different groups, and each group performs scheduling on a separate channel.

[0012] As a preferred solution, the step of dividing the network nodes into different groups includes the following steps: S51. Sort the network nodes in ascending order of their original periods. After sorting, two consecutive network nodes are divided into two different groups respectively, and then steps S1 to S5 are respectively executed for each group; if there are still nodes that do not satisfy the schedulable condition, then go to step S52; S52. Sort the network nodes in ascending order of their original periods. After sorting, three consecutive network nodes are divided into three different groups respectively, and then steps S1 to S5 are respectively executed for each group; if there are still nodes that do not satisfy the schedulable condition, then go to step S53; S53. Sort the original periods of the network nodes from smallest to largest. After sorting, the consecutive four network nodes are respectively divided into four different groups, and then steps S1 to S5 are respectively executed for each group; if there are still conditions that do not meet the schedulable conditions, and so on, until all groups meet the schedulable conditions.

[0013] As an optimal solution, in step S5, the idle time slots of the superframe are evenly distributed among all the time slots of the superframe.

[0014] As an optimal solution, the event-triggered flow can preempt the time slots of the time-triggered flow.

[0015] The present invention also provides a real-time scheduling system for fine-grained data flows in a wireless network, which applies the real-time scheduling method described in any one of the above solutions. The real-time scheduling system includes: An acquisition module, configured to acquire the original periods of the time-triggered flows of each network node, and use the minimum period as the reference period; A judgment module, configured to judge whether the reference period is an even number; A decomposition module, configured to decompose the reference period based on the prime factor decomposition method to obtain the reference prime factor decomposition formula; A reduction module, configured to respectively reduce the original periods of the remaining time-triggered flows based on the reference prime factor decomposition formula to obtain the target reduced periods of the time-triggered flows after reduction; The judgment module is further configured to judge whether the schedulable conditions are met based on the reference period and the target reduced periods; An execution module, configured to execute corresponding processes according to the judgment results of the judgment module.

[0016] Compared with the prior art, the beneficial effects of the present invention are: (1) The present invention uses the prime factor decomposition method to compress the periods of the time-triggered flows of each network node, thereby reducing the superframe length and the memory occupancy of the network nodes. The generated real-time scheduling method has a finer time granularity, can provide higher-precision time control for industrial networks, and can significantly reduce the transmission delay; (2) The present invention optimizes the real-time scheduling performance through a dual mechanism, reserves sufficient time slots for the event-triggered flow, and allows the emergency event-triggered flow to preempt the time slots of the time-triggered flow, thereby synchronously improving the real-time performance and time slot utilization rate of the system; (3) When the network does not meet the schedulable conditions, the present invention performs grouped scheduling on the time-triggered flows based on the period characteristics, and each group is assigned an independent channel, which not only ensures the schedulability of the traffic within the group but also eliminates the interference between groups, thereby effectively solving the scheduling problem of large-scale networks. Description of the Drawings

[0017] Figure 1Flow chart of the fine-grained data stream real-time scheduling method in the wireless network of Embodiment 1 of the present invention; Figure 2 Schematic diagram of the time-triggered flow cycle reduction process of four nodes in Embodiment 1 of the present invention; Figure 3 Schematic diagram of the distribution of time-triggered flows of four nodes in a superframe in Embodiment 1 of the present invention; Figure 4 Schematic diagram of the distribution of time slots reserved for time-triggered flows and event-triggered flows of four nodes in a superframe in Embodiment 1 of the present invention; Figure 5 Schematic diagram of the event-triggered flow preempting the time slot of the time-triggered flow in Embodiment 1 of the present invention; Figure 6 Schematic diagram of the time-triggered flow cycle reduction process of eight nodes in Embodiment 1 of the present invention; Figure 7 Schematic diagram of the grouping process of eight nodes in Embodiment 1 of the present invention; Figure 8 Schematic diagram of the time-triggered flow cycle reduction process after eight nodes are divided into two groups in Embodiment 1 of the present invention; Figure 9 Schematic diagram of the distribution of time-triggered flows of eight nodes in a superframe of two channels in Embodiment 1 of the present invention; Figure 10 Module architecture diagram of the fine-grained data stream real-time scheduling system in the wireless network of Embodiment 1 of the present invention; Figure 11 Schematic diagram of the change of the superframe length with the number of nodes when the fine-grained data stream real-time scheduling method and the least common multiple scheduling method of Embodiment 1 of the present invention are applied to a network with a period in [5, 50]; Figure 12 Schematic diagram of the change of the superframe length with the number of nodes when the fine-grained data stream real-time scheduling method and the least common multiple scheduling method of Embodiment 1 of the present invention are applied to a network with a period in [5, 100]; Figure 13 Schematic diagram of the change of the schedulable rate with the number of nodes when the fine-grained data stream real-time scheduling method and the least common multiple scheduling method of Embodiment 1 of the present invention are applied to a network with a period in [5, 50]; Figure 14 Schematic diagram of the change of the schedulable rate with the number of nodes when the fine-grained data stream real-time scheduling method and the least common multiple scheduling method of Embodiment 1 of the present invention are applied to a network with a period in [5, 100]; Figure 15Schematic diagram of the slot utilization rate varying with the number of nodes when the fine-grained data flow real-time scheduling method in the wireless network of Embodiment 1 of the present invention and existing algorithms are applied to a network with a period in [5, 100]; Figure 16 Schematic diagram of the transmission delay varying with the number of nodes when the fine-grained data flow real-time scheduling method in the wireless network of Embodiment 1 of the present invention and existing algorithms are applied to a network with a period in [5, 100]; Figure 17 Schematic diagram of the change in the packet delivery rate of each node tested by the fine-grained data flow real-time scheduling method in the wireless network of Embodiment 1 of the present invention; Figure 18 Graph of the change in the unbiased standard deviation of the superframe length of each channel under simulation of different network scales in Embodiment 1 of the present invention; Figure 19 Graph of the change in the unbiased standard deviation of the average period of each channel under simulation of different network scales in Embodiment 1 of the present invention; Figure 20 Schematic diagram of the slot utilization rate varying with the number of nodes tested by the fine-grained data flow real-time scheduling method in the wireless network of Embodiment 1 of the present invention; Figure 21 Curve of the transmission delay change of each channel when the 100-node network in Embodiment 1 of the present invention is scheduled on 4 channels. Detailed implementation manner

[0018] To more clearly illustrate the embodiments of the present invention, the specific implementation manners of the present invention will be described below with reference to the accompanying drawings. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings, and other implementation manners can also be obtained.

[0019] The present invention uses the principle of prime factorization method to shorten the period of time-triggered flows, thereby reducing the superframe length of the network, refining the scheduling granularity, and reducing the transmission delay. In addition, a method combining reservation and preemption is adopted to schedule event-triggered flows, which not only reserves appropriate time slots for event-triggered flows but also allows preemption of the time slots of time-triggered flows in case of emergencies. To improve the adaptability in large-scale networks, the present invention also introduces a method of independent group scheduling to avoid interference between different groups.

[0020] To reduce the scheduling granularity, the present invention does not require the periods of time-triggered flows to have specific characteristic values (i.e., in the form of powers of 2), but forms shorter superframes by shortening the periods of each time-triggered flow. The specific method is to find the reference period in the network (i.e., the minimum period length among all time-triggered flows), and perform prime factorization on the reference period. For example, when there are five nodes in the network to be scheduled, the periods of each node are p1 = 35, p2 = 41, p3 = 136, p4 = 182, p5 = 241; according to the principle of prime factorization, p1 = 5×7, then the periods of each node will be shortened to: 35 (5×7), 35 (5×7), 175 (5 2 ×7), 175 (5 2 ×7). It can be seen that p3 = 136 is shortened by 101 time slots, and p5 = 241 is shortened by 66 time slots; however, directly shortening the period according to the principle of prime factorization may cause the periods of time-triggered flows to be overly compressed, resulting in overly frequent scheduling requests and network congestion problems; especially when there are a large number of time-triggered flows in the network, if the shortened period is too short, it may cause a significant decline in the overall scheduling performance of the network. Based on this, the present invention takes into account that among any pair of adjacent integers, one is odd and the other is even; first, the reference period is reduced to an even number to ensure that the period always contains the smallest prime factor 2; then, other nodes in the network will reduce their periods according to the prime factor 2 in the reference period; specifically as follows: The above reference period can be expressed as: ; wherein, is the reference period, are prime factors respectively, and n is the number of prime factors other than 2; are the power exponents of prime factors respectively, taking non-negative positive integers, and usually taking 1; The periods of time-triggered flows of other nodes are reduced to: ; wherein, is the target reduced period after reduction of the i-th time-triggered flow, is the maximum value taken when satisfying ; among them, satisfying ensures that the time-triggered flows of each node will not miss the deadline. Through the above reduction method, the periods of time-triggered flows of nodes can be moderately shortened on the premise of maintaining network schedulability, so as to achieve efficient resource utilization and improve scheduling performance.

[0021] Compared with the existing scheduling method that can only schedule time-triggered flows with a fixed period (i.e., in the form of a power of 2), the present invention can schedule time-triggered flows with any period through period reduction. For time-triggered flows with periods of 7, 13, 14, 24, and 27 respectively, the existing scheduling method cannot schedule them; while the present invention adjusts the periods of each time-triggered flow to 6, 12, 12, 24, and 24 respectively through period reduction, thus successfully achieving schedulability. In addition, the present invention can also bring finer scheduling granularity and shorter superframe length. For example, for time-triggered flows with periods of 11, 44, and 176 respectively, where 44 = 11×2 2 and 176 = 11×2 4 ; it meets the requirements of the existing scheduling method for a fixed period, but the existing scheduling method does not modify the original period, and finally forms a superframe length of 176; while the present invention reduces the periods to 10, 40, and 160 respectively through period reduction, thus shortening the superframe length to 160. The specific reasons are as follows: In the existing scheduling method, the period of each time-triggered flow must satisfy the product of the reference period and a power of 2; for a time-triggered flow with a period of 11, its optional periods are: 11 (11×2 0 ), 22 (11×2 1 ), 44 (11×2 2 ), 88 (11×2 3 ), 176 (11×2 4 ), and its granularity is relatively coarse. If there are 3 nodes in the network, the corresponding periods of the time-triggered flows are: 11×2 0 , 11×2 2 , 11×2 4 ; at this time, the least common multiple of the periods is 176. While the present invention first collects the periods of the time-triggered flows in the network: 11×2 0 , 11×2 2 , 11×2 4 , and then reduces the reference period to an even number, that is, 10 (5 1 ×2 1 ); after reduction, the optional periods of the time-triggered flow become: 5 (5×2 0 ), 10 (5×2 1 ), 20 (5×2 2 ), 40 (5×2 3 ), 80 (5×2 4 ), 160 (5×2 5 ), making the granularity more detailed; finally, the periods of the time-triggered flows of each node are reduced to: 10, 40, 160, and the least common multiple of the periods of each node is 160, reducing 16 time slots and successfully shortening the superframe length.

[0022] In industrial applications, reducing the period of the time-triggered flow of any node usually has no impact on the control loop of the system, and sometimes can even improve the efficiency and stability of the system. For example, in a smart grid, the system automatically adjusts the power generation and power flow according to the real-time load conditions to ensure the stable operation of the grid; shortening the period of the time-triggered flow will shorten the data sampling period in the grid; since the control loop of the grid is usually based on the proportional-integral-derivative (PID) control algorithm, by optimizing the parameters of the control loop, it can adapt to a shorter data sampling period, thereby improving the sensitivity of the grid system.

[0023] However, the period of the time-triggered flow cannot be shortened arbitrarily. According to the Nyquist sampling theorem, in order to be able to reconstruct the original signal from the sampled signal without distortion, the sampling frequency must be at least twice the highest frequency component of the signal. If the sampling period is too short, the difference between sampling points may become very small, smaller than the resolution of the sensor, so that no more useful information can be obtained. In addition, the actuator itself has response time and physical limitations. If the sampling period is too short, the actuator may not be able to complete the required actions within such a short time. At the same time, too short a sampling period will also lead to frequent data transmission, thus causing problems such as network congestion and data delay. To avoid the above problems, the present invention allows setting a limit for the sampling period (i.e., the period of the time-triggered flow), that is, the period of the time-triggered flow after reduction is not less than the set limit period.

[0024] After shortening the period of the time-triggered flow, how to reasonably arrange each time-triggered flow into the time slots of the superframe becomes a key issue. A common heuristic algorithm is the first-in-first-out (FIFO) scheduling algorithm, but this algorithm treats all data flows equally and does not distinguish their importance and urgency. This may lead to the large data packets at the front of the queue being processed first, thereby blocking all subsequent smaller data packets and causing delays for all subsequent data packets. To achieve balance among various data flows, the present invention adopts the earliest deadline first (EDF) scheduling algorithm. This algorithm first schedules according to the urgency of the data flow, sorts the time-triggered flows in ascending order of period for priority, and gives priority to processing the data packets with the earliest deadline, so as to ensure that the most critical data packets are transmitted first, minimizing the risk of deadline violation to the greatest extent and ensuring the real-time performance of the network. However, due to the reduction of the time-triggered flow period, in the case of a large network scale and a large number of time-triggered flows, there may be a large number of time-triggered flows with the same period in the network. Therefore, for the time-triggered flows with the same period, the present invention further schedules according to the priority of the node device numbers, and the devices with smaller numbers are scheduled first. For the time-triggered flows with the same period as the reference period after reduction, the time-triggered flow of the reference period has the highest priority, and then the priority of each time-triggered flow is determined according to the device number.

[0025] In addition, scheduling time-triggered flows only in network nodes cannot meet the requirements of industrial applications because unpredictable events that do not follow a fixed period may occur in the network, and these events are usually scheduled in the form of event-triggered flows. The present invention adopts a reservation mechanism to schedule event-triggered flows because after shortening the periods of each time-triggered flow, some time-triggered flows may have the same period length; when using the EDF algorithm for scheduling, there may still be idle time slots in the superframe. By using these idle time slots to schedule event-triggered flows, not only is the utilization rate of time slots improved, but also the scheduling requirements of event-triggered flows are met. To further ensure the real-time performance of event-triggered flows, the reserved time slots are arranged as evenly as possible without affecting the normal scheduling of time-triggered flows. In case of emergency, event-triggered flows are allowed to preempt the time slots of time-triggered flows. This is because the present invention has moderately shortened the period of time-triggered flows, and the consequences of abandoning the transmission of a time-triggered flow once are relatively minor.

[0026] Although the above design can meet the system's requirement for simultaneously scheduling time-triggered flows and event-triggered flows, in a large-scale network, the schedulability will decrease significantly. This is because for a group of nodes in the network to be schedulable, the following conditions need to be met: 1. Real-time guarantee: The data flow of each node can reach the destination before the deadline; 2. Conflict avoidance: There will be no two or more nodes (such as sensor / actuator devices) transmitting data to the gateway on the same channel and in the same time slot; When the network scale expands, the traffic demand increases accordingly, and each data flow needs a time slot to transmit data. However, the time slots are limited, and the limited time slots are not enough to meet the relatively large traffic demand. Therefore, some data flows can only be arranged in the later time slots of the superframe or cannot be arranged in the superframe at all, resulting in these data flows being unable to reach the destination before the deadline or not being able to reach the destination at all, which means that the network cannot achieve real-time guarantee.

[0027] To improve the schedulability of the algorithm in a large-scale network, the present invention considers physically grouping, so that the traffic demand within each group is reduced. If each group meets the schedulable conditions, the entire network is schedulable. The present invention considers a grouping method of frequency reuse, that is, each group uses different frequency channels to schedule data streams. When a certain channel becomes congested due to excessive data streams, the data stream can use channel hopping technology to dynamically avoid these congested channels and select a more idle channel for communication. Since there are 16 channels available for selection in the network under time-slotted channel hopping (TSCH), the schedulability can be greatly improved by dividing the channels into groups. Among them, it is necessary to ensure that the resources of each channel are fully utilized, that is, on the basis that each channel meets the schedulable conditions, the processed traffic is roughly the same; and the traffic that each channel needs to process depends on the period of the time-triggered flow. Therefore, the present invention performs uniform grouping according to the period sizes of the time-triggered flows of each node to ensure that the average period of each group is as close as possible to maximize the schedulability of each group. After grouping, the data streams of each group are scheduled separately.

[0028] Embodiment 1: As Figure 1 shown, the fine-grained data stream real-time scheduling method in the wireless network of this embodiment includes time-triggered flows and event-triggered flows according to scheduling requirements. Based on the original period of the time-triggered flow, the period is reduced, and then scheduling feasibility analysis is performed; if it is schedulable, EDF scheduling is performed, if it is not schedulable, based on channel hopping technology, grouping is performed, and after grouping, the period is reduced and scheduling feasibility analysis is performed again until all groups are schedulable and EDF scheduling is performed, finally meeting the scheduling requirements.

[0029] Specifically, the fine-grained data stream real-time scheduling method in the wireless network of this embodiment includes the following steps: (1) Collect the original periods of the time-triggered flows of each network node, and use the minimum period as the reference period; Specifically, this embodiment takes a network model composed of a gateway and multiple network nodes as an example. The gateway is equipped with multiple full-duplex transceivers and can simultaneously receive and send data operations within one time slot; a network node is equipped with a half-duplex transceiver and can only perform receiving or sending operations separately within one time slot; As an example, as Figure 2 shown, assume that four nodes n1, n2, n3, n4 need to communicate with the gateway, that is, there are four time-triggered flows , and their corresponding periods are 5, 9, 7, 8 respectively; (2) Determine whether the reference period is an even number; if so, go to step S3; if not, subtract one from the reference period to convert it into an even number and then go to step S3; As an example, asFigure 2 As shown, the reference period is 5. Since it is odd, subtracting 1 converts it to an even number, and the reduced period is 4; (3) Decompose the reference period processed in step (2) based on the prime factorization method to obtain the reference prime factorization formula as: ; Among them, is the reference period, are prime factors respectively, and n is the number of prime factors other than 2; are the power exponents of prime factors respectively, taking non - negative positive integers, usually taking 1; (4) Reduce the original periods of the remaining time - triggered flows respectively based on the reference prime factorization formula; among them, by adjusting the power exponent of the smallest prime factor 2 in the reference prime factorization formula to the maximum, and the obtained target composite number is not greater than the period of the time - triggered flow, the target composite number is used as the target reduced period after reduction of the time - triggered flow. Specifically, the target reduced period after reduction of the time - triggered flow is: ; Among them, is the target reduced period after reduction of the i - th time - triggered flow, is the maximum value taken when is satisfied, is the original period of the i - th time - triggered flow; As an example, as Figure 2 shown, the target reduced periods obtained by reducing the periods of the time - triggered flows of four nodes n1, n2, n3, and n4 are 4, 8, 4, and 8 respectively.

[0030] (5) Judge whether the schedulable condition is satisfied based on the reference period and the target reduced period; if so, based on the reference period and the target reduced period, sort the time - triggered flows in ascending order of priority and allocate them to the time slots of the superframe, and use the earliest deadline first scheduling algorithm to perform real - time scheduling on the time - triggered flows; among them, use the idle time slots of the superframe as the reserved time slots for scheduling event - triggered flows.

[0031] Specifically, the above - mentioned schedulable condition is: ; Among them, is the least common multiple of the reference period and the target reduced period, that is, the length of the superframe; As an example, the above-mentioned reference period and target reduction period are 4, 8, 4, 8 respectively, and the least common multiple is 8, which meets the above schedulable conditions. Then, time-triggered flow scheduling can be performed, and each time-triggered flow is scheduled according to the EDF scheduling algorithm. Among them, the total number of time slots, that is, the superframe length, is the least common multiple 8; as time goes by, the superframe will repeat continuously; the relative deadline of each time-triggered flow is equal to its period. Since therefore, the priority order of the time-triggered flows is Time slots are preferentially allocated to the high-priority time-triggered flows with shorter deadlines. In addition, since the device numbers are 1 < 2 < 3 < 4, the final priority order is and the scheduling result is as shown in Figure 3 That is, the time-triggered flows are respectively allocated to the time slots TS0, TS1, TS2, TS3 of the superframe, and the time slots TS4, TS5 are allocated to and the time slots TS6, TS7 are idle time slots.

[0032] Under normal circumstances, the idle time slots are fully utilized to schedule the event-triggered flows, and the idle time slots are used as the reserved time slots for the event-triggered flows. To ensure the real-time performance of the event-triggered flows, the time slots reserved for the event-triggered flows should be evenly distributed throughout the superframe, rather than concentrated in the last two time slots as shown in Figure 3 . Therefore, a virtual period is assigned to the event-triggered flows. The virtual period is the superframe length divided by the difference between the superframe length and the number of time slots occupied by the time-triggered flows in the superframe and then rounded down. As shown in the example in Figure 3 , the virtual period of the event-triggered flow is 8 / (8 - 6) = 4. Then, the time-triggered flows and the event-triggered flows are re-sorted and scheduled according to their respective deadlines. As shown in Figure 4 , when the event-triggered flow needs to be scheduled, it will be arranged in the time slots TS3 and TS7. In addition, in case of emergency, the event-triggered flow is allowed to preempt the time slot allocated to the time-triggered flow. For example, at the moment of TS1, an emergency occurs at node n4 and needs to be scheduled immediately; node n4 is allowed to preempt the time slot originally allocated to node n3 for data transmission, as shown in Figure 5 . It should be noted that this adjustment only applies to the current superframe. In subsequent superframes, the scheduling will continue in the manner in Figure 4 .

[0033] In addition, in the network model where the above four nodes communicate with the gateway, the scheduling can be completed within a single channel. However, not all data flows in the network can always be scheduled within a single channel, and only through grouping can the scheduling requirements be met. To better illustrate the concept of grouping, as shown in Figure 6 , assume that eight nodes n1, n2, …, n8 want to communicate with the gateway, that is, there are eight time-triggered flows , the original periods of the time-triggered flows of each node are 5, 11, 6, 9, 7, 8, 7, 8 respectively; based on the above information, the gateway schedules each node. To shorten the superframe length of the network, first, the periods of the time-triggered flows of each node are reduced and adjusted. The reduction process is as Figure 6 shown. After adjustment, the periods of each node are 4, 8, 4, 8, 4, 8, 4, 8 respectively.

[0034] Since the reduced time-triggered flows do not meet the schedulability conditions, the channel hopping technology is adopted to divide the nodes into different groups, and each group is scheduled on a separate channel. To better divide the nodes into different groups and make full use of the channel resources of each group, according to the periods of the time-triggered flows, the eight nodes are evenly divided into two groups to ensure that the average periods of the two groups are as close as possible; then, each group of nodes is scheduled on an independent channel. If after dividing into two groups, each group meets the schedulability conditions, then the network scheduling is carried out separately according to these two groups. If there are still groups that do not meet the schedulability conditions after division, then continue to use the same strategy to further divide them into more small groups, successively divided into three groups, four groups, five groups, and so on, until each group meets the schedulability conditions. Among them, during the grouping process, the original periods of the network nodes can be sorted from small to large. If the grouping is into two groups, then the two consecutive nodes after sorting are respectively divided into two different groups; if the grouping is into three groups, then the three consecutive nodes after sorting are respectively divided into three different groups; if the grouping is into four groups, then the four consecutive nodes after sorting are respectively divided into four different groups; and so on, until each group meets the schedulability conditions.

[0035] As Figure 7 shown, according to the original periods 5, 11, 6, 9, 7, 8, 7, 8 of each node for grouping, specifically sorted from small to large according to the original periods of the nodes. After sorting, two consecutive network nodes are respectively divided into two different groups, that is, nodes n1, n4, n5, n8 are divided into the first group, and nodes n2, n3, n6, n7 are divided into the second group; after grouping, the first group is scheduled using channel CH1, and the second group is scheduled using channel CH2. The periods of the time-triggered flows of each group are respectively reduced. The specific process is as Figure 8 shown. For the first group, the periods of the time-triggered flows are 5, 9, 7, 8, and the reference period is 5. It is reduced to an even number 4, and the other periods are respectively reduced to 8, 4, 8 based on the reference period 4; for the second group, the periods of the time-triggered flows are 11, 6, 8, 7, and the reference period is 6. Since the reference period itself is an even number, the other periods are respectively reduced to 6, 6, 6 based on the reference period 6.

[0036] After processing the period of each group of time-triggered flows, the schedulability condition is re-evaluated. Since both the first group and the second group meet the schedulability condition, the scheduling phase is entered. As Figure 9 shown, the first group is scheduled using channel CH1, and the second group is scheduled using channel CH2. There is no interference between CH1 and CH2. The slot utilization rate of the first group is 75%, and the slot utilization rate of the second group is 67%. Both groups reserve two slots for event-triggered flows in each superframe.

[0037] Based on the above real-time scheduling method for fine-grained data flows in a wireless network, as Figure 10 shown, this embodiment also provides a real-time scheduling system for fine-grained data flows in a wireless network, including the following functional modules: an acquisition module, a judgment module, a decomposition module, a reduction module, and an execution module.

[0038] The acquisition module of this embodiment is used to acquire the original periods of the time-triggered flows of each network node and use the minimum period as the reference period; the judgment module of this embodiment is used to judge whether the reference period is an even number; the decomposition module of this embodiment is used to decompose the reference period based on the prime factor decomposition method to obtain the reference prime factor decomposition formula; the reduction module of this embodiment is used to reduce the original periods of the remaining time-triggered flows respectively based on the reference prime factor decomposition formula to obtain the target reduced periods of the time-triggered flows after reduction; in addition, the judgment module of this embodiment is also used to judge whether the schedulability condition is met based on the reference period and the target reduced periods; the execution module of this embodiment is used to execute the corresponding process according to the judgment result of the judgment module. The specific processing procedures of the above functional modules can refer to the detailed description in the above real-time scheduling method for fine-grained data flows in a wireless network and will not be elaborated here.

[0039] The following conducts an effect comparison and analysis of the real-time scheduling method for fine-grained data flows in a wireless network of this embodiment: I. Comparison of superframe lengths; This embodiment applies the prime factor decomposition principle to shorten the periods of time-triggered flows, thereby reducing the memory space occupied by each node's superframe. To verify the performance of period reduction, simulation experiments were conducted on time-triggered flows with periods in the ranges of [5, 50] and [5, 100] respectively, and the variation of the superframe length with the number of nodes was observed. During the simulation, the specific period values of the time-triggered flows of each node were randomly generated to simulate the diversity of node traffic demands in actual application scenarios. As Figure 11 and Figure 12As shown, the simulation results indicate that after shortening the period of the time-triggered flow using the fine-grained data stream real-time scheduling method (hereinafter referred to as the algorithm in this article) in the wireless network of this embodiment, the superframe length remains basically unchanged as the number of nodes increases; however, after shortening the period of the time-triggered flow using the traditional least common multiple scheduling, the superframe length increases significantly as the number of nodes increases; thus, it shows that the algorithm in this article can effectively reduce the superframe length compared with the least common multiple scheduling.

[0040] II. Scheduling performance analysis; 1. Schedulability; Considering the actual storage capacity of each node in the network, it is assumed that when the superframe length is less than 500, the network is schedulable, otherwise it is not; as Figure 13 shown, it shows the trend of the schedulable rate changing with the number of nodes in the network where the period of the time-triggered flow is in [5, 50]; as Figure 14 shown, it presents the trend of the schedulable rate changing with the number of nodes in the network where the period of the time-triggered flow is in [5, 100]; the results show that the algorithm in this article has a higher schedulable rate compared with the least common multiple scheduling; when the service demand is not high, that is, when the number of nodes is no more than 10, the schedulable rate of the algorithm in this article exceeds 80%.

[0041] 2. Slot utilization rate; Set the period of the time-triggered flow of each node in the range of [5, 100], and observe the change of the slot utilization rate by changing the number of nodes. The results Figure 15 shown, the simulation results indicate that the slot utilization rate generally rises as the number of nodes increases, because the increase in nodes will lead to the growth of network traffic and scheduling requirements; but there are fluctuations in the curve, which is because only the period of each time-triggered flow is restricted in the range of [5, 100], and the specific period values are not strictly specified, and these period values will significantly affect the slot utilization rate, so the utilization rate does not increase strictly monotonically with the number of nodes; in the typical scenario of a single-channel network with 14 nodes, the average slot utilization rate of the algorithm in this article reaches 83.3%, which is significantly better than RECCE (50%), HM (67.85%) and random scheduling (41.1%). This improvement is due to the fact that other methods may ignore the scheduling requirements resulting in idle slots, while the algorithm in this article actively allocates available slots when scheduling is needed, thus improving the slot utilization rate.

[0042] Among them, RECCE is an existing scheduling method using the proximal policy optimization PPO algorithm, and HM is an existing scheduling method using the intelligent optimization ant colony algorithm.

[0043] 3. Transmission delay; The end-to-end delay in WSAN refers to the total time required for data to be transmitted from the source to the destination, which consists of the following four parts: transmission delay, propagation delay, processing delay, and queuing delay. The transmission delay is the time taken by the sender to transmit the data packet, which is determined by the packet length and the transmission rate. The propagation delay refers to the transmission time of the data packet from the sender to the receiver, which is related to the physical distance and the propagation speed of the medium. The processing delay is the processing time of the data in network devices such as routers or switches, which is related to the processing capacity. The queuing delay is the time that the current data packet waits in the transmission queue, which depends on the network congestion level and the data traffic. Once the network topology is determined, the transmission delay, propagation delay, and processing delay are all determined. Therefore, shortening the queuing delay to minimize the end-to-end delay is crucial.

[0044] Ensuring the real-time performance of each data flow is the scheduling objective of the present invention, and reducing the end-to-end delay is the key factor to improve the real-time performance. Since the queuing delay is the core variable affecting the end-to-end delay, a simulation analysis of the queuing delay is carried out. The queuing delay is characterized by the number of time slots: under the setting of the time-triggered flow period [5, 100], the variation of the queuing delay with the number of nodes is studied, as Figure 16 shown. Compared with RECCE, HM, and random scheduling, the queuing delay of the proposed algorithm is always the lowest under different numbers of nodes. This advantage stems from two mechanisms: firstly, the proposed algorithm can adaptively compress the time-triggered flow period in the initial processing stage, thus effectively reducing the queuing delay; secondly, based on the deterministic scheduling mechanism, available time slots can be immediately allocated when a scheduling request appears. While for the random scheduling strategy, there is still a 50% probability of selecting an idle time slot even when there are pending requests.

[0045] 4. Packet Delivery Ratio; To verify the effectiveness of the proposed algorithm in an actual network, a test platform TelosB is built based on the open-source cross-platform Contiki-NG operating system and wireless sensor nodes, with the Packet Delivery Ratio (PDR) as the evaluation metric. To simplify the algorithm performance evaluation process, the experiment adopts a single-hop star topology (1 gateway node as the aggregation node and 20 nodes as the sending end). The test results are as Figure 17 shown. When the proposed algorithm is adopted, the PDR of all nodes is higher than 95%, and the PDR of 4 nodes reaches 100%. The average PDR is 98%. This indicates that the proposed algorithm can still maintain excellent performance in a real environment and has wide application value. At the same time, it can be observed that there are differences in the PDR of different nodes, which is due to the existence of signal interference such as WiFi in the actual test environment and the different anti-interference capabilities of each node.

[0046] III. Analysis of Adaptability to Large-Scale Networks; 1. Grouping; To verify whether the algorithm in this paper meets the grouping principle that the average periods are as close as possible, simulations were carried out for different network scales. The results are as Figure 18 shown. The unbiased standard deviation of the superframe lengths of each channel under average grouping is less than 14; as Figure 19 shown, the unbiased standard deviation of the average periods of each channel is less than 3. Therefore, in the case of a large number of channels, the algorithm in this paper can still make the average periods of each channel as close as possible.

[0047] 2. Slot utilization rate: To evaluate the slot utilization rate in large-scale networks, simulation experiments were carried out within the parameter range of [5, 50] for the time-triggered flow periods of each node. The results are as Figure 20 shown. As the number of nodes increases, the slot utilization rate of the algorithm in this paper always remains stable above 80%; this is because when the number of nodes increases, the number of available channels also increases accordingly; although the total number of nodes is different, the number of nodes allocated to each channel is basically similar. Therefore, the overall slot utilization rate remains relatively stable.

[0048] 3. Transmission delay; To evaluate the transmission delay of large-scale networks, simulations were carried out in a network with a scale of 100 nodes within the cycle range of [5, 100]; the time-triggered flows and event-triggered flows of each node were randomly generated. After grouping, this 100-node network needs to be scheduled on 4 channels, and the superframe lengths of the corresponding scheduling tables are 96, 64, 96, and 64 respectively. The specific situations of each channel are shown in Table 1 below, and the specific time delays are as Figure 21 shown. Among them, Channel 2 and Channel 4 perform better due to shorter time delays; this phenomenon is related to the randomly generated periods of the time-triggered flows: under random conditions, the superframe lengths of Channel 2 and 4 are exactly shorter, and the periods of each time-triggered flow are also shorter. This makes the scheduling requirements more frequent, thus making full use of idle slots, and finally achieving higher slot utilization rates and shorter transmission delays. The algorithm in this paper shows excellent performance, reduces the transmission delay between sensors / actuators and the gateway, and then reduces the end-to-end delay, better ensuring the real-time performance of the entire network.

[0049] Table 1 Information of each channel .

[0050] In summary, the present invention conducts research on the real-time scheduling of time-triggered flows and event-triggered flows. For time-triggered flows, the cycle length is shortened through prime factor decomposition to ensure that time-triggered flows with any cycle length can be scheduled, and the network superframe remains short; for event-triggered flows, slots are reserved for them under normal circumstances, and in emergency situations, they are allowed to preempt the slots of time-triggered flows; this not only ensures the real-time performance of the network but also improves the system operation efficiency.

[0051] The above description only elaborates in detail on the preferred embodiments and principles of the present invention. For those of ordinary skill in the art, according to the idea provided by the present invention, there will be changes in the specific implementation manners, and these changes should also be regarded as the protection scope of the present invention.

Claims

1. A real-time scheduling method for fine-grained data streams in a wireless network, characterized in that, It includes the following steps: S1. Collect the original periods of the time-triggered flows of each network node, and use the minimum period as the reference period; S2. Determine whether the reference period is even; if so, go to step S3; if not, subtract one from the reference period to convert it to an even number and then go to step S3; S3. Decompose the reference period processed in step S2 based on the prime factorization method to obtain the reference prime factorization formula; S4. Based on the reference prime factorization formula, reduce the original periods of the remaining time-triggered flows respectively; among them, by adjusting the power exponent of the smallest prime factor 2 in the reference prime factorization formula to the maximum, and the obtained target composite number is not greater than the period of the time-triggered flow, use the target composite number as the target reduced period after reducing the time-triggered flow; S5. Based on the reference period and the target reduced period, determine whether the schedulable condition is satisfied; if so, based on the reference period and the target reduced period, sort the time-triggered flows in ascending order and allocate them to the time slots of the superframe, and use the earliest deadline first scheduling algorithm to perform real-time scheduling on the time-triggered flows; among them, use the idle time slots of the superframe as the reserved time slots for scheduling event-triggered flows.

2. The real-time scheduling method for fine-grained data streams in a wireless network according to claim 1, wherein In step S3, the reference prime factorization formula is: ; Among them, is the reference period, are prime factors respectively, and n is the number of prime factors other than 2; are the power exponents of prime factors respectively, and the values are non - negative positive integers.

3. The real-time scheduling method for fine-grained data streams in a wireless network according to claim 2, wherein, In step S4, the target reduced period after reducing the time-triggered flow is: ; Among them, is the target reduction period after the flow reduction triggered at the i-th time, is the maximum value taken when satisfying , is the original period of the flow triggered at the i-th time.

4. The real-time scheduling method for fine-grained data streams in a wireless network according to claim 1, characterized in that, In step S5, the schedulable condition is: ; wherein, is the least common multiple of the reference period and the target reduction period.

5. The real-time scheduling method for fine-grained data streams in a wireless network according to claim 1 or 4, characterized in that In step S5, if the schedulable condition is not satisfied, adopt the channel hopping technology, divide the network nodes into different groups, and each group is scheduled on a separate channel.

6. The real-time scheduling method for fine-grained data streams in a wireless network according to claim 5, characterized in that The division of the network nodes into different groups includes the following steps: S51. Sort the network nodes in ascending order according to their original periods. After sorting, two consecutive network nodes are respectively divided into two different groups, and then steps S1 to S5 are respectively executed for each group; if there are still non-satisfying schedulable conditions, go to step S52; S52. Sort the network nodes in ascending order according to their original periods. After sorting, three consecutive network nodes are respectively divided into three different groups, and then steps S1 to S5 are respectively executed for each group; if there are still non-satisfying schedulable conditions, go to step S53; S53. Sort the network nodes in ascending order according to their original periods. After sorting, four consecutive network nodes are respectively divided into four different groups, and then steps S1 to S5 are respectively executed for each group; if there are still non-satisfying schedulable conditions, and so on, until all groups satisfy the schedulable conditions.

7. The real-time scheduling method for fine-grained data streams in a wireless network according to claim 1, characterized in that In step S5, the idle time slots of the superframe are evenly distributed among all the time slots of the superframe.

8. The real-time scheduling method for fine-grained data streams in a wireless network according to claim 1, characterized in that, The event-triggered flow can preempt the time slots of the time-triggered flow.

9. A fine-grained data stream real-time scheduling system in a wireless network, which applies the real-time scheduling method according to any one of claims 1-8, characterized in that The real-time scheduling system includes: A collection module, used to collect the original periods of the time-triggered flows of each network node, and use the minimum period as the reference period; A judgment module, used to judge whether the reference period is even; A decomposition module, used to decompose the reference period based on the prime factorization method to obtain the reference prime factorization formula; A reduction module, used to reduce the original periods of the remaining time-triggered flows respectively based on the reference prime factorization formula to obtain the target reduced period after reducing the time-triggered flow; The determination module is further configured to determine whether the schedulable condition is satisfied based on the reference period and the target reduction period; An execution module, configured to execute a corresponding process according to the determination result of the determination module.

Citation Information

Patent Citations

  • Periodic message scheduling method and device and computer readable storage medium

    CN110209482A

  • Time slot allocation scheduling method based on exchange type time-triggered network

    CN110661589A

  • Method for configuring processing stream set of time-sensitive network and time-sensitive network system

    CN116250217A

  • Online extensible configuration method and system for dynamic change of time-sensitive network

    CN117792893A

  • Industrial wireless network data flow scheduling method based on multi-dimensional conflict graph

    CN117835417A

Cited By

  • Data intelligent optimization system and method based on artificial intelligence

    CN120880914A