A time-sensitive network traffic processing and scheduling method based on round-robin queuing and forwarding mechanism
By building a TSN transmission model and load balancing strategy with a bad queue forwarding mechanism, the correlation of flow scheduling in time-sensitive networks and scheduling problems in complex environments are solved, and the success rate and stability of flow scheduling are improved.
Patent Information
- Application Number
- CN202410854800.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-28
- Publication Date
- 2025-09-02
- Estimated Expiration
- 2044-06-28
AI Technical Summary
The prior art lacks effective processing in time-sensitive networks in correlation between convection and complex traffic scheduling environments, resulting in insufficient success rate and stability of flow scheduling.
Build a TSN transmission model based on the queuing and forwarding mechanism, divide the data flow through the K-means algorithm, establish a weighted evaluation mechanism and load balancing strategy, and optimize the traffic scheduling process.
It improves the success rate and stability of flow scheduling, simplifies scheduling problems in complex traffic environments, and ensures the accuracy of scheduling results and the rational utilization of resources.
Smart Images

Figure CN118842761B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of electronic information technology, and in particular relates to a time-sensitive network traffic processing and scheduling method based on a cyclic queuing and forwarding mechanism. Background Art
[0002] In today's industrial landscape, the demand for real-time and reliability is increasing dramatically across many scenarios. For example, applications such as automotive control systems, avionics, industrial control, and smart grids all require the transmission of time-sensitive services that require both real-time and reliability. Traditional networking methods can only reduce the usage of non-time-sensitive services by increasing bandwidth, thereby enabling the transmission of time-sensitive services at a high cost. However, increasing bandwidth does not address the challenges posed by transmitting time-sensitive services and wastes valuable bandwidth resources.
[0003] To solve these problems, the IEEE 802.1 Time-Sensitive Networking (TSN) working group has developed a set of standards for TSN. The TSN standard is based on traditional Ethernet, acts on the data link layer, and inserts 4 bytes into the standard Ethernet data packet to define its characteristics. It can support real-time applications with limited end-to-end latency and zero packet loss capabilities. In TSN, messages are exchanged as data packet streams, transmitted from one source to one or more destinations, with specific paths, sizes, and priorities. TSN uses service levels to classify different types of flows while ensuring that time-sensitive flows and BE flows are transmitted on the same network. Cyclic Queuing Forwarding (CQF) is a scheduling mechanism in time-sensitive networks. In CQF networks, a periodic timer and two queues are maintained on each switch output port, and the two queues are converted according to timing. The specific operations are as follows: Figure 1 As shown in the figure: In odd-numbered time slots, the receive gate of queue Q1 is open and the transmit gate is closed. At this time, Q1 is in the data receiving state. At the same time, the receive gate of queue Q2 is closed and the transmit gate is open, and Q2 is in the data forwarding state. In even-numbered time slots, the receive gate of queue Q1 is closed and the transmit gate is open, and Q1 enters the data forwarding state. The receive gate of queue Q2 is open and the transmit gate is closed, and Q2 enters the data receiving state. Within the same time slot, the states of queues Q1 and Q2 are different and transition according to the time slot cycle. This is the basic method of CQF data transmission.
[0004] Due to TSN's characteristics, such as time synchronization and periodicity, global control of network transmission can be achieved through a single terminal, requiring relevant algorithms to handle this. Current algorithms lack the ability to leverage the correlations and characteristics of flows, and may not be sufficient to support the processing of large amounts of data in complex traffic scheduling environments.
[0005] Therefore, how to solve the correlation between flows and the scheduling problem of traffic in a complex environment, thereby improving the stability and accuracy of successful flow scheduling, is a technical problem that the present invention aims to solve. Summary of the Invention
[0006] The purpose of the present invention is to provide a time-sensitive network traffic processing and scheduling method based on a round-robin queuing and forwarding mechanism to solve the problems raised in the above background technology.
[0007] The object of the present invention is achieved by: a time-sensitive network traffic processing and scheduling method based on a cyclic queuing and forwarding mechanism, characterized in that the method comprises the following steps:
[0008] Step S1: Construct a TSN transmission model with CQF as the transmission mode to describe the traffic scheduling problem;
[0009] Step S2: Establish definitions and constraints, and transform the traffic scheduling problem into an optimization problem based on the constraints;
[0010] Step S3: Using the K-means algorithm to divide the data flow according to the correlation between the data flows, a number of flow subsets are obtained;
[0011] Step S4: For each flow subset, a weighted evaluation mechanism is established based on the flow size, hop count, frequency, and deadline characteristics, and the flows in each subset are ranked using the weighted evaluation mechanism;
[0012] Step S5: Select a traffic offset according to the load balancing strategy.
[0013] Preferably, in step S1, a TSN transmission model using CQF as the transmission mode is constructed to describe the traffic scheduling problem. The specific operations are:
[0014] Step S1-1: Represent the physical network topology as a directed graph G, where G = {V, E}, where V is a vertex set including hosts and switches, S represents a host vertex, H represents a switch vertex, and E represents a directed connection between vertices connected to each other for transmission.
[0015] Step S1-2: Use a 9-tuple to describe the characteristics of the time-triggered flow, as shown in the following formula:
[0016] f i ={src,dst,period,size,deadline,path,offset,frequency,score};
[0017] Where src is the source node, dst is the destination node, period is the period, size is the packet size, deadline is the routing path, path is the maximum delay limit, offset is the offset, frequency is the frequency, and score is the score;
[0018] Step S1-3: Use links to represent paths and define the path of the data flow as f i .path;
[0019] f i .path={L(S a ,S b ),L(S b ,S c ),...,L(S j ,S k )};
[0020] Among them, L(S a ,S b ) and L(S j ,S k ) are the first and last links in the TSN network, S a and S k They are f i The first and last switching vertices.
[0021] Preferably, the traffic scheduling problem is:
[0022]
[0023]
[0024] Among them, f i is the characteristic of the flow, j is switch j; k is switch k; t is the tth time slot; M is the resource block; L(S j ,S k ) is a segment in the path, represented by a link; μ is the number of times the current flow appears in the scheduling cycle, is the time slot position where it appears; sched cycle is the scheduling period; slot cycle is the time slot size; is an integer.
[0025] Preferably, the definitions and constraints established in step S2 are specifically:
[0026] Define the scheduling period: Since the time-triggered flow of the scheduling object is periodic, all flows in the flow set can be accurately mapped without wasting computing resources. The defined time length is the scheduling period.
[0027] The scheduling period is defined as the least common multiple of all flows:
[0028] sched cycle =LCM(F.periods);
[0029] Given a scheduling period, calculate f i .frequency, as shown in the following formula:
[0030]
[0031] Among them, sched cycle is the scheduling period; LCM (F.periods) is the least common multiple of LCM, F is the set composed of f., which is expressed as a flow set; f i .period is the period of stream i;
[0032] Define the time slot constraint: This refers to the granularity of the time offset, which describes the minimum time period in the resource space. The time slot must be divisible by the cycles of all flows. The upper bound of the time slot is expressed as the greatest common factor of all flow cycles, and the lower bound of the time slot is the time required for a queue to send and receive.
[0033]
[0034] Among them, d proc is the sum of the maximum delay caused by switch transmission, queuing and processing, d sync is the maximum delay for time synchronization;
[0035] Offset constraint: The offset should be smaller than its period, and the packet in the flow must be sent before the next packet arrives;
[0036] For the TSN transmission model that requires deterministic transmission, the following two results are unacceptable:
[0037]
[0038] Among them, i is a flow, and there are a total of |F| flows; is an integer; F is a flow set, corresponding to f i For a stream;
[0039] Deadline constraint: In the flow feature tuple, there is a deadline value, which means that the flow needs to be sent to the target vertex before this time. Setting this deadline limit is to avoid the situation where the process does not arrive on time:
[0040]
[0041] (f i.offset+|f i .path|+2)×slot cycle ≤f i .deadline;
[0042] Among them, (|f i .path|+2) represents the number of time slots required for streaming, |f i .path|Used to get the time slots spent in the transmission process;
[0043] Queue resource constraints: Design a resource block Q that describes the queue resources, representing the time slot T of switch j. (t) Queue resource at port k and design a mapping value To indicate whether the corresponding flow occupies the resource block;
[0044] The slot positions occupied by the computational flows and the resources they occupy should satisfy the following relationship:
[0045]
[0046] Preferably, in step S2, the traffic scheduling problem is converted into an optimization problem according to the constraints, and the optimization goal of the traffic scheduling problem is to maximize the number of successfully scheduled flows, that is, the scheduling success rate:
[0047]
[0048] Where Φ(i) represents f i Whether it is successfully scheduled, when f i If the scheduling is successful, the value of Φ(i) is 1, otherwise it is 0.
[0049] Preferably, in step S3, the K-means algorithm is used to divide the data flow into several flow subsets according to the correlation between the data flows. The specific operation is as follows:
[0050] Step S3-1: describing the correlation between data streams;
[0051] Divide the data stream into subsets, where the correlation within the subset is strong and the correlation between the subsets is small;
[0052] Flow a and flow b The correlation is ξ(f a ,f b ):
[0053] ξ(f a ,f b )=|f a .path∩f b.path|×(f a .size×f b .size)×(f a .frequency×f b .frequency);
[0054] Among them, f a .path is the path of flow a, a set of links; f b .path is the path of stream b; f a .size is the packet size of stream a; f b .size is the packet size of stream b; f a .frequency is the number of times flow a appears in the scheduling period; f b .frequency is the number of times flow b appears in the scheduling period;
[0055] Step S3-2: Represent the relationship between flows as an undirected graph G(S,W), where the set of S is represented by f a and f b Composition, W represents the weight value between any two vertices;
[0056] Step S3-3: Use the K-means algorithm to process it, set and adjust the K value, and complete the segmentation.
[0057] Preferably, a weighted evaluation mechanism is established in step S4, and the flows in each subset are sorted using the weighted evaluation mechanism, specifically:
[0058] Step S4-1: Determine the processing order of the segmented flow groups by calculating the sum of the normalized correlation coefficients of each flow group. i ) is expressed as:
[0059]
[0060] Among them, f a and f b Indicates flow group g i For any two different streams in |g i | for g i The number of flows in the flow group is based on the standardized correlation coefficient Ω(g i ) in reverse order;
[0061] Step S4-2: define the hop count as the number of links that a flow passes through:
[0062] f i .hop=|f i .path|+1;
[0063] Iterate over the tuples in the stream subset and use the following formula to calculate the parameters to perform the Min-Max normalization step:
[0064]
[0065] right The weighted sum of the data is taken as f i .score:
[0066]
[0067] Among them, α, β, and γ are the weight values of size, hop×frequency, and deadline, respectively, and are all positive numbers;
[0068] Step S4-3: divide the traffic subset into i .score is sorted in ascending order.
[0069] Preferably, in step S5, the flow offset is selected according to the load balancing strategy, specifically:
[0070] For each offset that meets the conditions, traverse all path nodes in the path, find the resource usage of the node with the largest space in the path, and select the offset that minimizes this value for resource mapping, as shown in the following formula:
[0071]
[0072] in, To successfully map the flow to the specific capacity occupied in the resource block, the scheduling resource increment caused by its corresponding offset is added to the existing resource occupancy In the , resource constraints are substituted for judgment, and the offsets that meet the resource constraints are filtered out;
[0073]
[0074] Where Φ(i) represents f i Whether it is successfully dispatched; is a resource block, defined by a time slot-link; f i .size is the packet size of fi.
[0075] Compared with the prior art, the present invention has the following improvements and advantages:
[0076] 1. By building a TSN transmission model with CQF as the transmission mode, it can well simulate the resource mapping in TSN, effectively reflect the traffic scheduling problem in complex traffic environments, ensure the effectiveness and rationality of flow scheduling, and increase the number of successfully scheduled flows; at the same time, a flow offset selection method based on the load balancing concept is used for resource mapping, thereby completing the flow scheduling process and improving the stability and accuracy of successful scheduling.
[0077] 2. The method of the present invention simplifies the problem by adopting a clustering algorithm to perform the flow segmentation step, so that flows with strong correlation are divided into a group, accurately describing the correlation between flows, simplifying the scheduling problem, and reducing time consumption; at the same time, ensuring the stability of the scheduling results and further improving the scheduling success rate. BRIEF DESCRIPTION OF THE DRAWINGS
[0078] Figure 1 1 is an overall flow chart of the method of the present invention.
[0079] Figure 2 This is the CQF transmission model diagram used in the present invention.
[0080] Figure 3 A diagram of the invented network model.
[0081] Figure 4 Performance results for scheduling 400 flows in a network topology with 7 switches.
[0082] Figure 5 Performance results for scheduling 800 flows in a network topology with 15 switches.
[0083] Figure 6 Performance results for scheduling 1500 flows in a network topology with 15 switches.
[0084] Figure 7 The time cost results for the randomly selected flow periods: 2, 3, 5 and 7.
[0085] Figure 8 A graph of the resulting time costs for the period of the flow, selected from integers greater than or equal to 3 and less than or equal to 10. DETAILED DESCRIPTION
[0086] The present invention is further summarized below with reference to the accompanying drawings.
[0087] like Figure 1 As shown, a time-sensitive network traffic processing and scheduling method based on a round-robin queuing and forwarding mechanism includes the following steps:
[0088] Step S1: Construct a TSN transmission model with CQF as the transmission mode to describe the traffic scheduling problem;
[0089] In step S1, a TSN transmission model using CQF as the transmission mode is constructed to describe the traffic scheduling problem. The specific operations are as follows:
[0090] like Figure 2 As shown, step S1-1: represent the physical network topology as a directed graph G, G = {V, E}, V is a vertex set including hosts and switches, S represents the vertex of the host, H represents the vertex of the switch; E represents the directed connection between the vertices connected to each other for transmission; the host is the source and destination of the data flow, generates time-triggered data flow, and controls when the data flow is sent.
[0091] Step S1-2: Use a 9-tuple to describe the characteristics of the time-triggered flow, as shown in the following formula:
[0092] f i ={src,dst,period,size,deadline,path,offset,frequency,score};
[0093] Where src is the source node, dst is the destination node, period is the period, size is the packet size, deadline is the routing path, path is the maximum delay limit, offset is the offset, frequency is the frequency, and score is the score;
[0094] Step S1-3: Use links to represent paths and define the path of the data flow as f i .path;
[0095] f i .path={L(S a ,S b ),L(S b ,S c ),...,L(S j ,S k )};
[0096] Among them, L(S a ,S b ) and L(S j ,S k ) are the first and last links in the TSN network, S a and S k They are f i The first and last switching vertices.
[0097] like Figure 3As shown in the figure, the TSN transmission model consists of 4 hosts {H1, H2, H3, H4}, 3 switches {S1, S2, S3} and multiple bidirectional links, with four flows: {f1, f2, f3, f4}. According to the above formula, their respective paths can be expressed as: {L(S2, S1)}, {L(S1, S2)}, {L(S1, S3)} and {L(S1, S3)}. Among these paths, only the paths of f3 and f4 overlap. This indicates that there may be a conflict between the two flows, which is a basic problem that flow scheduling needs to solve by adjusting the time slot offset.
[0098] The transmission in CQF involves two ports of the TSN switch, but using the path occupied by the ports is still not conducive to subsequent calculations and processing. Since the transmission in the actual link is single and linear, using the link to represent the path is conducive to subsequent calculations and representation.
[0099] Step S2: Establish definitions and constraints, and transform the traffic scheduling problem into an optimization problem based on the constraints;
[0100] The traffic scheduling problem is:
[0101]
[0102] Among them, f i is the characteristic of the flow, j is switch j; k is switch k; t is the tth time slot; M is the resource block; L(S j ,S k ) is a segment in the path, represented by a link; μ is the number of times the current flow appears in the scheduling cycle, is the time slot position where it appears; sched cycle is the scheduling period; slot cycle is the time slot size; is an integer;
[0103] To ensure the effectiveness and rationality of flow scheduling, we set the following definitions and constraints to ensure that the scheduling mapping here meets the transmission requirements of CQF. The definitions and constraints are as follows:
[0104] Define the scheduling period: Since the time-triggered flow of the scheduling object is periodic, all flows in the flow set can be accurately mapped without wasting computing resources. The defined time length is the scheduling period.
[0105] The scheduling period is defined as the least common multiple of all flows:
[0106] sched cycle =LCM(F.periods);
[0107] Given a scheduling period, calculate f i .frequency, as shown in the following formula:
[0108]
[0109] Among them, sched cycle is the scheduling period; LCM (F.periods) is the least common multiple of LCM, F is the set composed of f., which is expressed as a flow set; f i .period is the period of stream i;
[0110] Define the time slot constraint: This refers to the granularity of the time offset, which describes the minimum time period in the resource space. The time slot must be divisible by the cycles of all flows. The upper bound of the time slot is expressed as the greatest common factor of all flow cycles, and the lower bound of the time slot is the time required for a queue to send and receive.
[0111]
[0112] Among them, d proc is the sum of the maximum delay caused by switch transmission, queuing and processing, d sync is the maximum delay for time synchronization;
[0113] Offset constraint: The offset should be smaller than its period, and the packet in the flow must be sent before the next packet arrives;
[0114] For the TSN transmission model that requires deterministic transmission, the following two results are unacceptable:
[0115]
[0116] Among them, i is a flow, and there are a total of |F| flows; is an integer; F is a flow set, corresponding to f i For a stream;
[0117] Deadline constraint: In the flow feature tuple, there is a deadline value, which means that the flow needs to be sent to the target vertex before this time. Setting this deadline limit is to avoid the situation where the process does not arrive on time:
[0118]
[0119] Among them, (|f i .path|+2) represents the number of time slots required for streaming, |f i .path|Used to get the time slots spent in the transmission process;
[0120] Queue resource constraints: Design a resource block Q that describes the queue resources, representing the time slot T of switch j.(t) Queue resource at port k and design a mapping value To indicate whether the corresponding flow occupies the resource block;
[0121] The slot position occupied by the calculation flow should satisfy the following relationship:
[0122]
[0123]
[0124] Designing a Mapping Value To indicate whether the corresponding flow occupies the resource block. When the flow occupies the resource block, the corresponding is 1, otherwise 0;
[0125] about The shot value of a resource block is defined as:
[0126]
[0127] Where μ represents the μ-th data packet of the flow in the scheduling period, which is used to calculate the slot position occupied by the flow;
[0128] For the flow set that completes the scheduling step, the resources it occupies should satisfy the following relationship to prevent resource overflow:
[0129]
[0130] Here, we use Φ(i) to represent f i Whether it is successfully scheduled; for example, when f i If the scheduling is successful, the value of Φ(i) is 1, otherwise it is 0.
[0131] Based on the constraints, the traffic scheduling problem is transformed into an optimization problem. The optimization goal of the traffic scheduling problem is to maximize the number of successfully scheduled flows, which is the scheduling success rate:
[0132]
[0133] Where Φ(i) represents f i Whether it is successfully scheduled, when f i If the scheduling is successful, the value of Φ(i) is 1, otherwise it is 0.
[0134] Step S3: Using the K-means algorithm to divide the data flow according to the correlation between the data flows, a number of flow subsets are obtained;
[0135] Based on the correlation between data streams, the K-means algorithm is used to divide the data stream into several flow subsets. The specific operations are as follows:
[0136] Step S3-1: describing the correlation between data streams;
[0137] Divide the data stream into subsets, where the correlation within the subset is strong and the correlation between the subsets is small;
[0138] Flow a and flow b The correlation is ξ(f a ,f b ):
[0139] ξ(f a ,f b )=|f a .path∩f b .path|×(f a .size×f b .size)×(f a .frequency×f b .frequency);
[0140] Among them, f a .path is the path of flow a, a set of links; f b .path is the path of stream b; f a .size is the packet size of stream a; f b .size is the packet size of stream b; f a .frequency is the number of times flow a appears in the scheduling period; f b .frequency is the number of times flow b appears in the scheduling period;
[0141] Step S3-2: Represent the relationship between flows as an undirected graph G(S,W), where the set of S is represented by f a and f b Composition, W represents the weight value between any two vertices;
[0142] Step S3-3: Use K-means algorithm to process it, set and adjust the K value, and complete the segmentation;
[0143] The K-means algorithm is a commonly used clustering algorithm used to divide a data set into K clusters. Its basic principles and operation process are as follows:
[0144] The goal of the K-means algorithm is to divide the samples in the dataset into K clusters so that the sum of the distances between the data points in each cluster and the cluster centroid is minimized. The cluster centroid is usually the average value of all the data points in the cluster.
[0145] initialization:
[0146] Randomly select K initial cluster centers (centroids). These can be randomly selected data points or initialized using other methods such as K-means++.
[0147] Assign data points:
[0148] For each point in the dataset, calculate its distance to the center of each cluster (usually using Euclidean distance).
[0149] Assign each data point to the cluster corresponding to the cluster center that is closest to it.
[0150] Update cluster center:
[0151] Calculate the new center of each cluster, which is the average of all data points in the cluster.
[0152] Repeat steps 2 and 3:
[0153] The steps of assigning data points and updating cluster centers are repeated until the cluster centers no longer change significantly or the preset number of iterations is reached.
[0154] Step S4: For each flow subset, a weighted evaluation mechanism is established based on the flow size, hop count, frequency, and deadline characteristics, and the flows in each subset are ranked using the weighted evaluation mechanism;
[0155] Establish a weighted evaluation mechanism and use it to sort the flows in each subset. Specifically:
[0156] Step S4-1: Determine the processing order of the segmented flow groups by calculating the sum of the normalized correlation coefficients of each flow group. i ) is expressed as:
[0157]
[0158] Among them, f a and f b Indicates flow group g i For any two different streams in |g i | for g i The number of flows in the flow group is based on the standardized correlation coefficient Ω(g i ) in reverse order;
[0159] Step S4-2: define the hop count as the number of links that a flow passes through:
[0160] f i .hop=|f i .path|+1;
[0161] Iterate over the tuples in the stream subset and use the following formula to calculate the parameters to perform the Min-Max normalization step:
[0162]
[0163] right The weighted sum of the data is taken as f i .score:
[0164]
[0165] Among them, α, β, and γ are the weight values of size, hop×frequency, and deadline, respectively, and are all positive numbers;
[0166] Step S4-3: divide the traffic subset into i .score size ascending order
[0167] Step S5: Select a traffic offset according to the load balancing strategy.
[0168] Select the traffic offset based on the load balancing strategy, specifically:
[0169] For each offset that meets the conditions, traverse all path nodes in the path, find the resource usage of the node with the largest space in the path, and select the offset that minimizes this value for resource mapping, as shown in the following formula:
[0170]
[0171] in, To successfully map the flow to the specific capacity occupied in the resource block, the scheduling resource increment caused by its corresponding offset is added to the existing resource occupancy In the , resource constraints are substituted for judgment, and the offsets that meet the resource constraints are filtered out;
[0172]
[0173] Where Φ(i) represents f i Whether it is successfully dispatched; is a resource block, defined by a time slot-link; f i .size is the packet size of fi.
[0174] In order to verify the effect of the present invention, the method of the present invention was verified:
[0175] The system simulation was constructed using Python. Based on the distribution type of the industrial control network, we selected three network topologies: star, ring, and bus for subsequent experiments. Based on the aforementioned constraints, we set the queue size to 8000 bits, the link bandwidth to 1000 Mbps, and the time slot to 125 μs. Furthermore, in the flow generation step, we randomly generated time-triggered data flows based on the data flow characteristics described in the IEC / IEEE 60802 standard for industrial automation networks. We set two sets of periodicities to be adjusted, randomly selected from integers between 3 and 10. The packet size was selected from {200, 400, 500, 1000, 1500}. The flow deadline and period are typically measured in milliseconds (ms), so here we set the flow deadline to its period minus 0.5 ms.
[0176] Figures 3 to 6 A chart comparing the scheduling success rates of the six algorithms in different scenarios in the embodiments of the present invention is shown. Five algorithms, Naive, Greedy, Tabu, JTS-LB, and MSS, were selected for comparative experiments with the proposed algorithm. Both JRS-LB and Greedy algorithms involve a flow sorting step. The Greedy algorithm sorts the flow set in ascending order of size. The JRS-LB algorithm sorts the flow set in ascending order based on a scoring strategy and selects an offset using a load balancing algorithm. The MSS algorithm combines flow sorting and time slot selection for scheduling, balancing scheduling success rate and load balancing.
[0177] The experiment evaluated the scheduling success rates of different algorithms in four scenarios with different network sizes and numbers of flows, testing the performance of the algorithms under different flow loads and topologies:
[0178] Figure 4 ,Schedule 400 flows in a network topology of 7 switches;
[0179] Figure 5 ,Scheduling 800 flows in a network topology of 15 switches;
[0180] Figure 6 ,Schedule 1500 flows in a network topology of 15 switches;
[0181] exist Figure 4In both simulations, the proposed algorithm achieves a scheduling success rate that is at least 3-4% higher than traditional algorithms such as Greedy and Tabu, regardless of network topology. Compared to the JRS-LB algorithm, the proposed algorithm leads by an average of 0.658% and 1.953% in the 400 and 800 flow scenarios, respectively. Compared to the MSS algorithm, the proposed algorithm leads by an average of 0.058% and 0.253% in both scenarios, respectively. In both simulations, the proposed algorithm leads the proposed algorithm in all cases, except for the first case, where the MSS algorithm has a slightly higher scheduling success rate than the proposed algorithm in a star topology.
[0182] And in Figure 5 and Figure 6 In this case, the scheduling success rate advantage of the algorithm proposed in this invention is more obvious. Figure 5 In this case, the performance of the proposed algorithm is 0.9% and 0.65% higher than that of the JRS-LB algorithm and the MSS algorithm, respectively. Compared with the JRS-LB algorithm and the MSS algorithm, the performance is improved by 2.73% and 1.59%, respectively. It can be concluded that the proposed algorithm has a significant advantage in scheduling success rate in large models and multi-traffic scenarios.
[0183] Figures 7 and 8 This is a comparison chart of the time consumption of the six algorithms in the embodiment of the present invention under different conditions. Here, we choose to modify the size of the scheduling space by changing the cycle composition to test the time consumption of different algorithms under different traffic scheduling pressures. Therefore, we set up two cases to test the time consumption of different algorithms. Among them, the number of switches is the same, both are 15, and the topology is ring in both cases. The difference between the two cases is that in Figure 7 In this case, the period of the flow is randomly selected from 4 integers: 2, 3, 5 and 7, and in Figure 8 In this case, the period is selected from integers greater than or equal to 3 and less than or equal to 10.
[0184] exist Figure 7 In this case, the time overhead of all algorithms is relatively small. As the number of scheduled flows increases, the time overheads of the Naive, Greedy, and JRS-LB algorithms change very little, all within 0.4 seconds. As the number of flows increases, the time overhead of the proposed algorithm increases from 0.3027s to 3.3229s. The time overheads of the MSS and Tabu algorithms increase from 1.5041s and 2.9943s to 10.3219s and 5.7174s, respectively.
[0185] and Figure 8In this case, Naive, Greedy, and JTS-LB remain the top three with the lowest time consumption. The algorithm proposed in this patent also consumes very little time and remains stable, unlikely to increase significantly with increasing scheduling pressure. The MSS algorithm exhibits the greatest increase in time overhead as the number of scheduled flows increases, taking 198.2439 seconds when scheduling 2000 flows.
[0186] Based on the above time cost experiments, we believe that the performance of the proposed algorithm in terms of time consumption is relatively stable and does not cause too much computational pressure for larger and more complex scenarios.
[0187] The foregoing is merely an embodiment of the present invention and is not intended to limit the present invention. It will be apparent to those skilled in the art that various modifications and variations of the present invention are possible. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention are intended to be included within the scope of the claims of the present invention.
Claims
1. A method for processing and scheduling time-sensitive network traffic based on a round-robin queuing and forwarding mechanism, characterized by: The method comprises the following steps: Step S1: Construct a TSN transmission model with CQF as the transmission mode to describe the traffic scheduling problem; Step S2: Establish definitions and constraints, and transform the traffic scheduling problem into an optimization problem based on the constraints; Establish definitions and constraints, specifically: Define the scheduling period: Since the time-triggered flow of the scheduling object is periodic, all flows in the flow set can be accurately mapped without wasting computing resources. The defined time length is the scheduling period. The scheduling period is defined as the least common multiple of all flows: ; Given a scheduling period, calculate , as shown in the following formula: ; in, is the scheduling period; is the least common multiple of LCM, To represent the set composed of f., it is expressed as a flow set; is the period of flow i; Define the time slot constraint: This refers to the granularity of the time offset, which describes the minimum time period in the resource space. The time slot must be divisible by the cycles of all flows. The upper bound of the time slot is expressed as the greatest common factor of all flow cycles, and the lower bound of the time slot is the time required for a queue to send and receive. ; in, is the sum of the maximum delay caused by switch transmission, queuing, and processing, is the maximum delay for time synchronization; Offset constraint: The offset should be smaller than its period, and the packet in the flow must be sent before the next packet arrives; For the TSN transmission model that requires deterministic transmission, the following two results are unacceptable: ; in, For flow, there are individual streams; is an integer; is a flow set, corresponding to For a stream; Deadline constraint: In the flow feature tuple, there is a deadline value, which means that the flow needs to be sent to the target vertex before this time. Setting this deadline limit is to avoid the situation where the process does not arrive on time: ; ; in, Indicates the number of time slots required during streaming, Used to obtain the time slots spent in the transmission process; Queue resource constraints: Design a resource block Q that describes the queue resources, representing the time slot of switch j Queue resource at port k and design a mapping value To indicate whether the corresponding flow occupies the resource block; The slot positions occupied by the computational flows and the resources they occupy should satisfy the following relationship: ; ; ; Step S3: Using the K-means algorithm to divide the data flow according to the correlation between the data flows, a number of flow subsets are obtained; Step S4: For each flow subset, a weighted evaluation mechanism is established based on the flow size, hop count, frequency, and deadline characteristics, and the flows in each subset are ranked using the weighted evaluation mechanism; Step S5: Select a traffic offset according to the load balancing strategy.
2. The method for processing and scheduling time-sensitive network traffic based on a round-robin queuing and forwarding mechanism according to claim 1, characterized in that: In step S1, a TSN transmission model using CQF as the transmission mode is constructed to describe the traffic scheduling problem. The specific operations are as follows: Step S1-1: Represent the physical network topology as a directed graph G, where G = {V, E}, where V is a vertex set including hosts and switches, S represents host vertices, H represents switch vertices, and E represents directed connections between vertices that are connected to each other for transmission. Step S1-2: Use a 9-tuple to describe the characteristics of the time-triggered flow, as shown in the following formula: ; in, is the source node, For the destination node, For the cycle, is the packet size, is the routing path, is the maximum delay limit, is the offset, is the frequency, For rating; Step S1-3: Use links to represent paths and define the path of data flow as ; ; in, and are the first and last links in a TSN network, and They are The first and last switching vertices.
3. The method for processing and scheduling time-sensitive network traffic based on a round-robin queuing and forwarding mechanism according to claim 1, characterized in that: The traffic scheduling problem is: ; ; ; ; ; ; ; ; in, Characteristics of the flow is switch j; is switch k; is the tth time slot; is a resource block; is a segment of the path, represented by a link; is the number of times this flow appears in the scheduling cycle. is the time slot position where it appears; is the scheduling period; is the time slot size; is an integer.
4. The method for processing and scheduling time-sensitive network traffic based on a round-robin queuing and forwarding mechanism according to claim 1, characterized in that: In step S2, the traffic scheduling problem is transformed into an optimization problem based on the constraints, and the optimization goal of the traffic scheduling problem is to maximize the number of successfully scheduled flows, that is, the scheduling success rate: ; in, express Whether it is successfully scheduled, when When the scheduling is successful, The value is 1 if yes, otherwise it is 0.
5. The method for processing and scheduling time-sensitive network traffic based on a round-robin queuing and forwarding mechanism according to claim 1, characterized in that: In step S3, the K-means algorithm is used to divide the data flow according to the correlation between the data flows to obtain several flow subsets. The specific operation is as follows: Step S3-1: describing the correlation between data streams; Divide the data stream into subsets, where the correlation within the subset is strong and the correlation between the subsets is small; flow Heliu The correlation is : ; in, is the path and link set of flow a; is the path of flow b; is the packet size of stream a; is the packet size of stream b; is the number of times flow a appears in the scheduling period; is the number of occurrences of flow b in the scheduling period; Step S3-2: Represent the relationship between flows as an undirected graph G (S, W), where the set of S is represented by and Composition, W represents the weight value between any two vertices; Step S3-3: Use the K-means algorithm to process it, set and adjust the K value, and complete the segmentation.
6. The method for processing and scheduling time-sensitive network traffic based on a round-robin queuing and forwarding mechanism according to claim 1, characterized in that: In step S4, a weighted evaluation mechanism is established to sort the flows in each subset using the weighted evaluation mechanism, specifically: Step S4-1: Determine the processing order of the segmented flow groups by calculating the sum of the normalized correlation coefficients of each flow group. The standardized correlation coefficient is expressed as: ; in, and Indicates a flow group For any two different streams in for The number of flows in the group; the flow groups are based on the standardized correlation coefficient within each group Arrange in reverse order; Step S4-2: define the hop count as the number of links that a flow passes through: ; Iterate over the tuples in the stream subset and use the following formula to calculate the parameters to perform the Min-Max normalization step: ; right The data is weighted and summed as : ; in, 、 、 size, hop× , the weight values of deadline are all positive; Step S4-3: divide the traffic subset into Sort by size in ascending order.
7. The method for processing and scheduling time-sensitive network traffic based on a round-robin queuing and forwarding mechanism according to claim 1, characterized in that: In step S5, the flow offset is selected according to the load balancing strategy, specifically: For each offset that meets the conditions, traverse all path nodes in the path, find the resource occupancy of the node with the largest space in the path, and select the smallest offset for resource mapping, as shown in the following formula: ; in, To successfully map the flow to the specific capacity occupied in the resource block, the scheduling resource increment caused by its corresponding offset is added to the existing resource occupancy In the , resource constraints are substituted for judgment, and the offsets that meet the resource constraints are filtered out; ; in, express Whether it is successfully dispatched; is a resource block, defined by time slot-link; is the packet size of fi.
Citation Information
Patent Citations
Time-sensitive network traffic scheduling method based on sending time slot planning
CN117240783A
Intelligent substation network circular queue forwarding flow scheduling method, system and device and storage medium
CN117336254A