Fine-grained Data Flow Real-time Scheduling Method and System in Wireless Networks

The decomposition of the mass factor method shortens the time-triggered flow cycle, and combines the earliest cutoff time priority scheduling and channel frequency hopping technology, the scheduling problems of time-triggered flow and event-triggered flow in wireless sensor networks are solved, efficient fine-grained scheduling is achieved, and system real-time and resource utilization are improved.

CN120239064BActive Publication Date: 2025-08-01ZHEJIANG SCI-TECH UNIV
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

In the existing wireless sensor and actuator networks, the scheduling of time-triggered streams and event-triggered streams has bandwidth competition and network blockage, and the existing scheduling algorithms are difficult to meet the needs of different periods of each node, resulting in waste of network resources and increased delays.

Method used

The decomposition 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 to achieve fine-grained scheduling.

Benefits of technology

It reduces network latency, improves slot utilization and system real-time performance, adapts to the scheduling needs of large-scale networks, and reduces memory usage and sending delay.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120239064B_ABST
    Figure CN120239064B_ABST
Patent Text Reader

Abstract

The present invention belongs to the technical field of wireless network scheduling, and particularly relates to a fine-grained data stream real-time scheduling method and system in a wireless network. The scheduling method specifically includes: decomposing a reference period based on the prime factor decomposition method to obtain a reference prime factor decomposition formula; respectively reducing the original periods of the remaining time-triggered flows based on the reference prime factor decomposition formula to obtain target reduced periods; judging whether the schedulable condition is satisfied based on the reference period and the target reduced periods; if so, performing priority sorting on the time-triggered flows and allocating them to the time slots of a superframe, and performing real-time scheduling on the time-triggered flows by using the earliest deadline first scheduling algorithm; using the idle time slots of the superframe as reserved time slots for scheduling event-triggered flows. The present invention compresses the periods of each time-triggered flow by using the prime factor decomposition method, thereby reducing the length of the superframe and the memory occupancy of network nodes. The corresponding real-time scheduling method has a finer time granularity and can significantly reduce the transmission 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 wireless sensor and actuator network (WSAN) applications, two common data flows are time-triggered and event-triggered. With the advancement of industrial automation, automated equipment is placing increasingly stringent demands on real-time and deterministic control systems. In some critical applications, even slight control delays can significantly degrade system performance. For example, nuclear power facilities require periodic control to ensure system stability. If critical safety monitoring systems are unable to respond promptly due to delays in periodic data, serious environmental pollution could result. To meet these stringent requirements, the concept of time-triggered flows has been introduced. Time-triggered flows are data flows formed by packets sent at a fixed interval. Since wireless transmission is susceptible to external interference, resulting in a certain degree of jitter in transmission time, setting equal intervals for packet transmission ensures that both senders and receivers ignore the uncertainty of wireless transmission time and transmit data according to the sender's own sampling time, minimizing the impact of delays on system performance. Time-triggered flows require the system to send data periodically. However, not all data needs to be sent periodically. Periodically sending useless data wastes network bandwidth and processing resources. For example, in a temperature monitoring system, sensors continuously collect temperature data. However, most of the time, the temperature is stable and within the threshold, so periodic data transmission is unnecessary. Data transmission is only required when the temperature exceeds the threshold. Therefore, event-triggered streaming is essential. This refers to the data stream generated by data packets generated by sudden events. The interaction between time-triggered and event-triggered streaming 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 contention 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 for the industrial field network, the scheduling of time-triggered flows using a time-sensitive network has been relatively mature. However, using a wireless network for industrial network control is vulnerable to packet collisions and external interferences. 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 the 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 precision 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 vary 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 and mutually 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, and the number of available periods for time-triggered flows is small. Summary of the Invention

[0006] Based on the above-mentioned disadvantages 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-mentioned problems existing in the prior art. In other words, one of the objectives of the present invention is to provide a method and system for real-time scheduling of fine-grained data flows 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:

[0008] A method for real-time scheduling of fine-grained data flows in a wireless network, comprising the following steps:

[0009] S1. Collect the original periods of the time-triggered flows of each network node, and use the minimum period as the reference period;

[0010] 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;

[0011] S3. Decompose the reference period processed in step S2 based on the method of decomposing into prime factors to obtain the reference prime factor decomposition formula;

[0012] S4. Reduce the original periods of the remaining time-triggered flows respectively based on the reference prime factor decomposition formula; 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;

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

[0014] As a preferred solution, in step S3, the reference prime factorization formula is:

[0015] ;

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

[0017] As a preferred solution, in step S4, the target reduction period after reducing the time-triggered flow is:

[0018] ;

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

[0020] As a preferred solution, in step S5, the schedulable condition is:

[0021] ;

[0022] wherein, is the least common multiple of the reference period and the target reduction period.

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

[0024] As a preferred solution, the step of dividing the network nodes into different groups includes the following steps:

[0025] S51. Sort the network nodes in ascending order according to their original periods. After sorting, two consecutive network nodes are divided into two different groups respectively, and then steps S1 to S5 are executed for each group respectively; if there are still nodes that do not satisfy the schedulable condition, then go to step S52;

[0026] S52. Sort the original periods of the network nodes from smallest to largest. After sorting, the consecutive three 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 those that do not meet the schedulable conditions, go to step S53;

[0027] 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 those that do not meet the schedulable conditions, and so on, until all groups meet the schedulable conditions.

[0028] As a preferred solution, in the step S5, the idle time slots of the superframe are evenly distributed among all the time slots of the superframe.

[0029] As a preferred solution, the event-triggered flow can preempt the time slots of the time-triggered flow.

[0030] 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:

[0031] 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;

[0032] A judgment module, configured to judge whether the reference period is an even number;

[0033] A decomposition module, configured to decompose the reference period based on the prime factor decomposition method to obtain a reference prime factor decomposition formula;

[0034] 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;

[0035] The judgment module is further configured to judge whether the schedulable conditions are met based on the reference period and the target reduced periods;

[0036] An execution module, configured to execute corresponding processes according to the judgment results of the judgment module.

[0037] Compared with the prior art, the beneficial effects of the present invention are:

[0038] (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 occupation 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;

[0039] (2) The present invention optimizes the real-time scheduling performance through a dual mechanism. It reserves sufficient time slots for event-triggered flows and allows emergency event-triggered flows to preempt the time slots of time-triggered flows, thereby synchronously improving the system real-time performance and time slot utilization rate.

[0040] (3) When the network does not meet the schedulable conditions, the present invention performs grouped scheduling on time-triggered flows based on their periodic characteristics. Each group is assigned an independent channel, which not only ensures the schedulability of the traffic within the group but also eliminates interference between groups, thus effectively solving the scheduling problem of large-scale networks. Description of the Drawings

[0041] Figure 1 It is a flowchart of the real-time scheduling method for fine-grained data flows in the wireless network according to Embodiment 1 of the present invention.

[0042] Figure 2 It is a schematic diagram of the process of reducing the period of time-triggered flows for four nodes according to Embodiment 1 of the present invention.

[0043] Figure 3 It is a schematic diagram of the distribution of time-triggered flows for four nodes in a superframe according to Embodiment 1 of the present invention.

[0044] Figure 4 It is a schematic diagram of the distribution of time slots reserved for time-triggered flows and event-triggered flows for four nodes in a superframe according to Embodiment 1 of the present invention.

[0045] Figure 5 It is a schematic diagram of an event-triggered flow preempting the time slot of a time-triggered flow according to Embodiment 1 of the present invention.

[0046] Figure 6 It is a schematic diagram of the process of reducing the period of time-triggered flows for eight nodes according to Embodiment 1 of the present invention.

[0047] Figure 7 It is a schematic diagram of the grouping process for eight nodes according to Embodiment 1 of the present invention.

[0048] Figure 8 It is a schematic diagram of the process of reducing the period of time-triggered flows for eight nodes divided into two groups according to Embodiment 1 of the present invention.

[0049] Figure 9 It is a schematic diagram of the distribution of time-triggered flows for eight nodes in a superframe with two channels according to Embodiment 1 of the present invention.

[0050] Figure 10 It is a module architecture diagram of the real-time scheduling system for fine-grained data flows in the wireless network according to Embodiment 1 of the present invention.

[0051] Figure 11Schematic diagram of the variation 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 in the wireless network of Embodiment 1 of the present invention are applied to a network with a period in [5, 50];

[0052] Figure 12 Schematic diagram of the variation 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 in the wireless network of Embodiment 1 of the present invention are applied to a network with a period in [5, 100];

[0053] Figure 13 Schematic diagram of the variation 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 in the wireless network of Embodiment 1 of the present invention are applied to a network with a period in [5, 50];

[0054] Figure 14 Schematic diagram of the variation 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 in the wireless network of Embodiment 1 of the present invention are applied to a network with a period in [5, 100];

[0055] Figure 15 Schematic diagram of the variation of the slot utilization rate with the number of nodes when the fine-grained data stream real-time scheduling method in the wireless network of Embodiment 1 of the present invention and the existing algorithm are applied to a network with a period in [5, 100];

[0056] Figure 16 Schematic diagram of the variation of the transmission delay with the number of nodes when the fine-grained data stream real-time scheduling method in the wireless network of Embodiment 1 of the present invention and the existing algorithm are applied to a network with a period in [5, 100];

[0057] Figure 17 Schematic diagram of the variation of the packet delivery rate of each node tested by the fine-grained data stream real-time scheduling method in the wireless network of Embodiment 1 of the present invention;

[0058] Figure 18 Variation diagram of the unbiased standard deviation of the superframe length of each channel under simulation of different network scales in the fine-grained data stream real-time scheduling method of Embodiment 1 of the present invention;

[0059] Figure 19 Variation diagram of the unbiased standard deviation of the average period of each channel under simulation of different network scales in the fine-grained data stream real-time scheduling method of Embodiment 1 of the present invention;

[0060] Figure 20 Schematic diagram of the variation of the slot utilization rate with the number of nodes tested by the fine-grained data stream real-time scheduling method in the wireless network of Embodiment 1 of the present invention;

[0061] Figure 21This is the curve of the transmission delay variation of each channel when the 100-node network in Embodiment 1 of the present invention is scheduled on 4 channels. Detailed implementation manners

[0062] 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 according to these drawings, and other implementation manners can also be obtained.

[0063] The present invention uses the principle of prime factor decomposition method to shorten the period of the time-triggered flow, 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 the event-triggered flow, which not only reserves appropriate time slots for the event-triggered flow but also allows preemption of the time slots of the time-triggered flow in case of emergency. 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.

[0064] To reduce the scheduling granularity, the present invention does not require the period of the time-triggered flow to have a specific characteristic value (i.e., in the form of a power of 2), but forms a shorter superframe by shortening the period of each time-triggered flow. The specific method is to find the reference period in the network (i.e., the smallest period length among all time-triggered flows), and perform prime factor decomposition on the reference period. For example, when there are five nodes to be scheduled in the network, the periods of each node are p1 = 35, p2 = 41, p3 = 136, p4 = 182, p5 = 241; according to the principle of prime factor decomposition, 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 factor decomposition may cause the period of the time-triggered flow to be over-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:

[0065] The above reference period can be expressed as: ;

[0066] 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. Usually, the value is 1;

[0067] The periods of the time - triggered flows of other nodes are reduced to:

[0068] ;

[0069] Among them, is the target reduced period after the reduction of the i - th time - triggered flow, is to satisfy when taking the maximum value; among them, satisfying ensures that the time - triggered flows of each node will not miss the deadline. Through the above reduction method, the period of the time - triggered flow of the node can be moderately shortened on the premise of maintaining the network schedulability, so as to achieve efficient resource utilization and improve the scheduling performance.

[0070] Compared with the existing scheduling method that can only schedule time - triggered flows with fixed periods (i.e., in the form of powers of 2), the present invention can schedule time - triggered flows with arbitrary periods 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 super - frame 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 fixed periods, but the existing scheduling method will not modify the original periods, and finally forms a super - frame length of 176; while the present invention adjusts the periods to 10, 40, and 160 respectively through period reduction, thus shortening the super - frame 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 the 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 time - triggered flow periods are: 11×2 0 , 11×22 , 11×2 4 ; At this time, the least common multiple of the periods is 176. And 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 available periods of the time-triggered flows 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.

[0071] In industrial applications, reducing the period of the time-triggered flow of any node usually does not affect 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 make the data sampling period in the grid shorter; 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.

[0072] 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, so small that it is lower than the resolution of the sensor, resulting in the inability to obtain more useful information. In addition, the actuator itself has a 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, resulting in 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.

[0073] 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. The common heuristic algorithm is the First-In-First-Out (FIFO) scheduling algorithm. However, this algorithm treats all data flows equally and does not distinguish their importance and urgency. This may result in large data packets at the front of the queue being processed first, blocking all subsequent smaller data packets and causing delays for all subsequent 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, and preferentially processes the data packets with the earliest deadline, thereby ensuring that the most critical data packets are transmitted first, minimizing the risk of deadline violation to the greatest extent, and guaranteeing 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 time-triggered flows with the same period, the present invention further schedules according to the priority of the node device number, and the device with a smaller number is preferentially scheduled. For time-triggered flows with the same period as the reference period after reduction, the time-triggered flow with the reference period has the highest priority, and then the priority of each time-triggered flow is determined according to the device number.

[0074] In addition, scheduling only time-triggered flows in network nodes cannot meet the requirements of industrial applications because there will be unpredictable events in the network that do not follow a fixed period. 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 the utilization rate of time slots is 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 a time-triggered flow transmission are relatively minor.

[0075] Although the above design can meet the system's requirement for simultaneous scheduling of time-triggered flows and event-triggered flows, in a large-scale network, the schedulability will drop significantly. This is because for a group of nodes in the network to be schedulable, the following conditions need to be met:

[0076] 1. Real-time guarantee: The data flow of each node can reach the destination before the deadline;

[0077] 2. Conflict Avoidance: Under the same channel and the same time slot, there will not be two or more nodes (such as sensor / actuator devices) transmitting data to the gateway.

[0078] When the network scale expands, the traffic demand increases accordingly. Each data stream 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 streams can only be arranged in the later time slots of the superframe or cannot be arranged into the superframe at all, resulting in these data streams 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 guarantee real-time performance.

[0079] To improve the schedulability of the algorithm in a large-scale network, the present invention considers physically grouping. In this way, 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 frequency reuse grouping method, that is, each group uses a different frequency channel to schedule data streams. When a certain channel becomes congested due to excessive data streams, the data streams 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.

[0080] Embodiment 1:

[0081] As Figure 1 shown, the fine-grained data stream real-time scheduling method in the wireless network of this embodiment, according to the scheduling requirements, including time-triggered flows and event-triggered flows, performs period reduction based on the original period of the time-triggered flows, and then performs scheduling feasibility analysis; if schedulable, performs EDF scheduling, if not schedulable, based on channel hopping technology, performs grouping, and after grouping, performs period reduction and scheduling feasibility analysis again until all groups are schedulable and perform EDF scheduling, finally meeting the scheduling requirements.

[0082] Specifically, the fine-grained data stream real-time scheduling method in the wireless network of this embodiment includes the following steps:

[0083] (1) Collect the original periods of the time-triggered flows of each network node, and use the minimum period as the reference period;

[0084] Specifically, in this embodiment, a network model consisting of a gateway and multiple network nodes is taken as an example. The gateway is equipped with multiple full-duplex transceivers and can perform data reception and transmission operations simultaneously within one time slot. A network node is equipped with a half-duplex transceiver and can only perform reception or transmission operations separately within one time slot.

[0085] As an example, as Figure 2 shown, assume that four nodes n1, n2, n3, and n4 need to communicate with the gateway, that is, there are four time-triggered flows , and their corresponding periods are 5, 9, 7, and 8 respectively;

[0086] (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;

[0087] As an example, as Figure 2 shown, the reference period is 5. Since it is an odd number, subtract one to convert it into an even number, and the reduced period obtained is 4;

[0088] (3) Decompose the reference period processed in step (2) based on the prime factor decomposition method to obtain the reference prime factor decomposition formula:

[0089] ;

[0090] 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;

[0091] (4) Reduce the original periods of the remaining time-triggered flows respectively based on the reference prime factor decomposition formula; among them, 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 reduction of the time-triggered flow;

[0092] Specifically, the target reduced period after reduction of the time-triggered flow is:

[0093] ;

[0094] 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;

[0095] As an example, as Figure 2As shown, the target reduced periods obtained by reducing the periods of the time-triggered flows of the four nodes n1, n2, n3, and n4 are 4, 8, 4, and 8 respectively.

[0096] (5) Determine 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.

[0097] Specifically, the above schedulable condition is:

[0098] ;

[0099] Among them, is the least common multiple of the reference period and the target reduced period, that is, the superframe length;

[0100] As an example, the above reference period and target reduced period are 4, 8, 4, and 8 respectively, and the least common multiple is 8, which satisfies the above schedulable condition, so 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, because , so the priority order of the time-triggered flows is , and the 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 Figure 3 shown, The time-triggered flows are respectively allocated to the time slots TS0, TS1, TS2, and TS3 of the superframe, and the time slots TS4 and TS5 are allocated to , and the time slots TS6 and TS7 are idle time slots.

[0101] Under normal circumstances, make full use of the idle time slots to schedule event-triggered flows, and use the idle time slots as the reserved time slots for event-triggered flows. In order to ensure the real-time performance of event-triggered flows, the reserved time slots for event-triggered flows should be evenly distributed throughout the superframe as much as possible, rather than concentrated in the last two time slots as Figure 3 shown. Therefore, a virtual period is assigned to the event-triggered flow, and 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 flow in the superframe and rounded down, as Figure 3In the example shown, the virtual period of the event-triggered flow is 8 / (8 - 6) = 4. Then, the time-triggered flow and the event-triggered flow are re-sorted and scheduled according to their respective deadlines, as Figure 4 shown. When the event-triggered flow needs to be scheduled, it will be arranged in time slots TS3 and TS7. Additionally, in case of emergency, the event-triggered flow is allowed to preempt the time slots allocated to the time-triggered flow. For example, at time 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 Figure 5 shown. It should be noted that this adjustment only applies to the current superframe. In subsequent superframes, the scheduling will continue according to Figure 4 the method in.

[0102] 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 Figure 6 shown, assume that eight nodes n1, n2, …, n8 want to communicate with the gateway, that is, there are eight time-triggered flows , and 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, and the adjusted periods of each node are 4, 8, 4, 8, 4, 8, 4, 8 respectively.

[0103] Since the reduced time-triggered flow does not meet the schedulability condition, 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 period of the time-triggered flow, eight nodes are evenly divided into two groups to ensure that the average periods of the two groups are as close as possible; subsequently, each group of nodes is scheduled on an independent channel. If each group meets the schedulability condition after being divided into two groups, then the network scheduling is carried out separately for these two groups. If there are still groups that do not meet the schedulability condition after division, the same strategy is continued 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 condition. 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 condition.

[0104] As Figure 7 shown, according to the original periods 5, 11, 6, 9, 7, 8, 7, 8 of each node, grouping is carried out. Specifically, the original periods of the nodes are sorted from small to large, and two consecutive network nodes after sorting 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 the grouping is completed, the first group is scheduled using channel CH1, and the second group is scheduled using channel CH2. The periods of the time-triggered flows for 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.

[0105] After processing the periods of the time-triggered flows for each group, the schedulability condition is re-evaluated. Since both the first group and the second group meet the schedulability condition, the scheduling stage 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 the event-triggered flow in each superframe.

[0106] Based on the above-mentioned fine-grained data flow real-time scheduling method in a wireless network, as Figure 10 shown, this embodiment also provides a fine-grained data flow real-time scheduling system 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.

[0107] The acquisition module of this embodiment is used to acquire the original period of the time-triggered flow 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 schedulable condition is satisfied based on the reference period and the target reduced periods; the execution module of this embodiment is used to execute corresponding processes according to the judgment results of the judgment module. The specific processing processes of the above functional modules can refer to the detailed description in the above-mentioned fine-grained data flow real-time scheduling method in a wireless network, which will not be elaborated here.

[0108] The following conducts an effect comparison and analysis of the fine-grained data flow real-time scheduling method in a wireless network of this embodiment:

[0109] I. Comparison of superframe lengths;

[0110] This embodiment applies the prime factor decomposition principle to shorten the period of the time-triggered flow, thereby reducing the memory space occupied by each node's superframe. To verify the performance of the period reduction, simulation experiments were conducted on time-triggered flows with periods in the intervals [5, 50] and [5, 100] respectively, and the change 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 the actual application scenario. As Figure 11 and Figure 12 shown, the simulation results show that after using the fine-grained data flow real-time scheduling method in a wireless network of this embodiment (abbreviated as the algorithm in this paper) to shorten the period of the time-triggered flow, the superframe length basically remains unchanged as the number of nodes increases; however, after using the traditional least common multiple scheduling to shorten the period of the time-triggered flow, the superframe length increases significantly as the number of nodes increases; thus, it shows that the algorithm in this paper can effectively reduce the superframe length compared with the least common multiple scheduling.

[0111] II. Scheduling performance analysis;

[0112] 1. Schedulability;

[0113] 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 schedulable. As Figure 13 shown, it shows the trend of the schedulable rate varying with the number of nodes in a network where the time-triggered flow period is in the range of [5, 50]. As Figure 14 shown, it presents the trend of the schedulable rate varying with the number of nodes in a network where the time-triggered flow period is in the range of [5, 100]. The results show that, compared with the least common multiple scheduling, the schedulable rate of the proposed algorithm in this paper is higher. When the service demand is low, that is, when the number of nodes is no more than 10, the schedulable rate of the proposed algorithm in this paper exceeds 80%.

[0114] 2. Slot utilization rate;

[0115] The time-triggered flow periods of each node are set in the range of [5, 100], and the change of slot utilization rate is observed by changing the number of nodes. The results Figure 15 shown. The simulation results show that the slot utilization rate generally increases with the increase of the number of nodes. This is because the increase of nodes will lead to the growth of network traffic and scheduling requirements. However, there are fluctuations in the curve. This is because only the periods of each time-triggered flow are constrained in the range of [5, 100], and the specific period values are not strictly specified. These period values will significantly affect the slot utilization rate. Therefore, the utilization rate does not increase strictly monotonically with the number of nodes. In a typical scenario of a single-channel network with 14 nodes, the average slot utilization rate of the proposed algorithm in this paper 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 proposed algorithm in this paper actively allocates available slots when scheduling is needed, thus improving the slot utilization rate.

[0116] Among them, RECCE is a scheduling method based on the existing proximal policy optimization PPO algorithm, and HM is a scheduling method based on the existing intelligent optimization ant colony algorithm.

[0117] 3. Transmission delay;

[0118] 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 time for the data packet to travel 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 time for the data to be processed 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.

[0119] 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: First, the proposed algorithm can adaptively compress the time-triggered flow period in the initial processing stage, thus effectively reducing the queuing delay. Second, 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 choosing an idle time slot even when there are pending requests.

[0120] 4. Packet delivery ratio;

[0121] 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, a single-hop star topology (1 gateway node as the aggregation node and 20 nodes as the sending end) is adopted in the experiment. 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 broad 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.

[0122] III. Analysis of Adaptation to Large-Scale Networks;

[0123] 1. Grouping;

[0124] 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 deviations of the superframe lengths of each channel under average grouping are all lower than 14; as Figure 19 shown, the unbiased standard deviations of the average periods of each channel are all lower 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.

[0125] 2. Slot utilization rate:

[0126] To evaluate the slot utilization rate in large-scale networks, simulation experiments were carried out within the parameter range of [5, 50] for the cycle of time-triggered flows at 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.

[0127] 3. Transmission delay;

[0128] To evaluate the transmission delay in large-scale networks, simulations were carried out in a network with a scale of 100 nodes using a 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 because they have shorter time delays; this phenomenon is related to the randomly generated cycles of the time-triggered flows: under random conditions, the superframe lengths of Channel 2 and 4 are exactly shorter, and the cycles 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 demonstrates excellent performance by reducing the transmission delay between sensors / actuators and the gateway, thereby reducing the end-to-end delay and better ensuring the real-time performance of the entire network.

[0129] Table 1 Information of each channel

[0130] .

[0131] 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 factorization to ensure that time-triggered flows with any cycle length can be scheduled and the network superframe remains short; for event-triggered flows, time slots are reserved for them under normal circumstances, and in case of emergencies, they are allowed to preempt the time slots of time-triggered flows; this not only guarantees the network real-time performance but also improves the system operation efficiency.

[0132] 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 fine-grained data stream real-time scheduling method 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. Determine whether the schedulability 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; 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.

2. The real-time scheduling method for fine-grained data streams in a wireless network according to claim 1, 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 is triggered at the i-th time, is the maximum value taken when satisfying and is the original period of the flow triggered at the i-th time.

3. 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 schedulability condition is: ; Among them, is the least common multiple of the reference period and the target reduction period.

4. The real-time scheduling method for fine-grained data streams in a wireless network according to claim 1 or 3, characterized in that, In step S5, if the schedulability 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.

5. The real-time scheduling method for fine-grained data streams in a wireless network according to claim 4, characterized in that The division of the network nodes into different groups includes the following steps: S51. Sort the network nodes according to their original periods in ascending order. 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 schedulability conditions, go to step S52; S52. Sort the network nodes according to their original periods in ascending order. 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 schedulability conditions, go to step S53; S53. Sort the network nodes according to their original periods in ascending order. 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 schedulability conditions, and so on, until all groups satisfy the schedulability conditions.

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

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

8. A fine-grained data flow real-time scheduling system in a wireless network, which applies the real-time scheduling method according to any one of claims 1-7, characterized in that, The real-time scheduling system includes: A collection module, which is 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, which is used to judge whether the reference period is even; A decomposition module, which is used to decompose the reference period based on the prime factorization method to obtain the reference prime factorization formula; A reduction module, which is 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

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

    CN117835417A

  • Method of fast-retransmitting uplink data in wireless communication system and apparatus therefor

    US20180049234A1