A time-sensitive network routing and scheduling method based on a genetic algorithm

By using a time-sensitive network routing and scheduling method based on genetic algorithms, the limitations of traffic scheduling in complex network models are solved, achieving high efficiency and reliability of traffic transmission in smart hydropower stations, meeting the transmission constraints of different traffic flows, and optimizing communication efficiency and system interoperability.

CN119383140BActive Publication Date: 2026-04-17CHONGQING UNIV OF POSTS & TELECOMM
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHONGQING UNIV OF POSTS & TELECOMM
Filing Date
2024-11-15
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

Existing technologies have limitations in routing and scheduling for time-sensitive networks, especially in complex network models where they cannot fully consider dynamic network changes and real-time requirements, leading to link overload and affecting the real-time performance and reliability of data transmission. Furthermore, when combined with the IEC 61850 standard, it is difficult to efficiently achieve transmission scheduling for different traffic volumes.

Method used

A time-sensitive network routing and scheduling method based on genetic algorithms is adopted. By optimizing traffic paths and scheduling through depth-first search, no-wait scheduling algorithm and genetic algorithm, the efficient transmission of traffic is ensured under the constraints, and the optimal traffic transmission path and scheduling scheme is generated.

Benefits of technology

This technology reduces latency in flow transmission in smart hydropower stations, meets transmission constraints for different flow rates, improves network real-time performance and reliability, and optimizes communication efficiency and interoperability between systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119383140B_ABST
    Figure CN119383140B_ABST
Patent Text Reader

Abstract

This invention relates to a time-sensitive network (TSN) routing and scheduling method based on a genetic algorithm, belonging to the field of TSN technology. The method includes: reading TSN network topology, node processing delay, and flow constraint information; calculating the least common multiple of the periods of all traffic flows; sorting each flow according to its transmission period, maximum cutoff delay, source-destination node ratio, and frame size; using a depth-first search approach to find all possible paths from the source node to the destination node for each flow; initializing population chromosomes, with each chromosome representing a potential traffic scheduling scheme; planning a suitable start time for each flow using a wait-free scheduling algorithm; evaluating the performance or fitness of each chromosome using a fitness function; iteratively improving the scheduling scheme in the population using a genetic algorithm; and finally generating and printing a routing table and a gating list for each switch node.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of time-sensitive network technology, and relates to the intelligentization, automation and informatization of smart hydropower stations, and in particular to a time-sensitive network routing and scheduling method based on genetic algorithms. Background Technology

[0002] In the field of Time-Sensitive Networking (TSN), meeting the time-sensitive communication needs of industrial automation and smart manufacturing is crucial. With the rapid development of Industry 4.0, the demand for technologies capable of data exchange under strict time control is increasing. TSN, as a technology designed to improve the determinism and real-time performance of Ethernet communication, plays a key role in enabling efficient and reliable operation in areas such as factory automation, robot control, emergency services, and critical infrastructure.

[0003] However, existing technologies still have some problems in the routing and scheduling of TSNs. Especially in complex network models, such as the large ring networks used in smart hydropower stations, traditional solvers such as Integer Linear Programming (ILP) and Satisfactionability Modular Theory (SMT) have limitations. These methods, which solve traffic scheduling under deterministic path conditions, often fail to fully consider the dynamic changes and real-time requirements of the network, which can easily lead to overload of certain links, thereby affecting the real-time performance and reliability of data transmission.

[0004] Furthermore, while TSN technology offers low-latency data transmission capabilities, meeting the real-time and reliable transmission requirements of electrical and non-electrical data (such as flow rate, speed, and temperature) for hydropower stations, efficient routing and traffic scheduling remain a challenge in practical applications. Especially when multiple traffic flows with different priorities and constraints exist in the network, ensuring that all traffic flows are scheduled while meeting their transmission constraints is a complex problem requiring optimization.

[0005] The IEC 61850 standard provides standardized data models, communication services, and system configurations for hydropower stations, supporting various key message types such as GOOSE and SV. However, existing technologies still face some technical challenges when combining TSN with IEC 61850. For example, how to design an efficient scheduling algorithm to fully utilize the communication scheduling information mechanisms of TSN (such as the gated lists proposed in IEEE 802.1Qbv) to meet the transmission requirements of different traffic volumes, while improving communication efficiency and interoperability between systems. Summary of the Invention

[0006] In view of this, the purpose of this invention is to provide a time-sensitive network routing and scheduling method based on genetic algorithms, which finds an optimal traffic transmission path and scheduling scheme to meet different traffic transmission constraints, such as maximum latency and periodicity requirements.

[0007] To achieve the above objectives, the present invention provides the following technical solution:

[0008] A time-sensitive network routing and scheduling method based on genetic algorithms, the method comprising:

[0009] S1. Read the TSN network topology, node processing delay, and flow constraint information; calculate the least common multiple of the periods of all traffic; sort each traffic according to the traffic transmission period, maximum cutoff delay, source node-destination node, and frame size; where the traffic transmission period refers to the time interval of traffic transmission.

[0010] S2. Use a depth-first search approach to find all possible paths from the source node to the destination node for each traffic flow;

[0011] S3. Initialize the population chromosomes, where each chromosome represents a potential solution for flow scheduling;

[0012] S4. Plan a suitable start time for each traffic flow using a no-wait scheduling algorithm, and ensure that the traffic constraints are met during the planning process;

[0013] S5. Evaluate the performance or fitness of each chromosome using a fitness function;

[0014] S6. Execute the genetic algorithm to iteratively improve the scheduling scheme in the population, repeatedly perform traffic scheduling and fitness function calculations until the optimal solution or the maximum number of iterations is reached, and finally generate and print the routing table and the gating list of each switch node.

[0015] Furthermore, in step S1, sorting each traffic according to the traffic transmission period, maximum cutoff delay, source node-destination node, and frame size includes taking the traffic with the longer transmission period as the highest priority, and then the priorities of the maximum cutoff delay, source node-destination node, and frame size decrease in sequence. The traffic is sorted according to this priority setting to ensure that traffic with higher priority is scheduled first during the scheduling process.

[0016] Furthermore, in step S2, during the process of finding all possible paths from the source node to the destination node for each flow, a loop constraint must be satisfied, that is, no loops can be formed in the flow's transmission path, expressed as: a≠b, and the next target node l a+1,b+1In this context, a+1 ≠ b+1. Here, L represents the set of links in the network, l a,b Let F represent the link in L from node a to node b. j This represents the j-th flow.

[0017] Furthermore, in step S4, the wait-free scheduling algorithm includes:

[0018] 1) Receive the path and ID of the stream, and initialize time variables for the transmission of the stream in the network;

[0019] 2) Iterate through each node on the flow path; if the node being processed is the first node on the path, set the initial arrival time; if it is not the first node, calculate the arrival time based on the scheduling result of the previous node.

[0020] 3) At each node, traverse each potential scheduling phase of the node, consider link capacity and the scheduling of other flows to determine whether the current phase allows the transmission of the flow; if the transmission is allowed, calculate the start and end times of the flow at the current node.

[0021] The start time of the stream transmission is calculated using the following formula:

[0022]

[0023] S3≤min(S1,S2)

[0024]

[0025] In the formula, S3 represents the start time of traffic transmission, i represents the node, and T... j T represents the transmission period of the j-th stream. max Indicates the maximum transmission period. This indicates the start time of transmission of stream j at node i in stage m. V represents the size of the data frame in stream j. p The switch port transmit speed is represented by δ, the processing delay of the j-th flow is represented by S1, and the maximum end-to-end delay requirement at the receiver is represented by ete. j This represents the end-to-end delay of the j-th stream. S1 represents the longest link in stream j; S2 represents the minimum transmission time requirement within a period.

[0026] 4) Verify that the calculated start and end times meet the flow constraints to avoid conflicts with already scheduled flows;

[0027] The constraint is that the transmission time slots of n traffic flows through a certain link must be less than or equal to the link's timeout, as shown in the following formula:

[0028]

[0029] In the formula, LCM represents the time-period of all flows passing through a certain link, and T j This represents the period of the j-th flow;

[0030] 5) Update scheduling information: If the scheduling conditions are met, update the port scheduling information of the current node and record the transmission time of the stream; otherwise, try to adjust the scheduling of the stream on the previous node and select the transmission time of the stream; if there is no available start transmission time, return scheduling failure.

[0031] 6) After completing the scheduling of the current stage, move to the next stage to continue trying; if scheduling cannot be performed within the current timeout period, consider scheduling within the next timeout period.

[0032] 7) Once all nodes in the path have been iterated, the scheduling of the current flow is complete; if all flows are successfully scheduled, return success; if any flow fails to be scheduled, return failure and record the reason for failure.

[0033] 8) Update the status of nodes and links in the network based on the new scheduling results, and record the scheduling time of each flow on each node.

[0034] Furthermore, the optimization objectives of the no-wait scheduling algorithm include: satisfying the deadline delay while maximizing link utilization; where the deadline delay is expressed as:

[0035] EtE delay ≥delay total

[0036]

[0037] In the formula, EtE delay Indicates the deadline delay. total This represents the end-to-end transmission time of a periodic TT stream. V represents the transmission and processing delay of stream j at node i. s Indicates the port transmission rate;

[0038] Maximizing link utilization is expressed as:

[0039] max(E total )

[0040]

[0041] In the formula, E total E represents link utilization. i This represents the link utilization rate on node i. This represents the idle time slot on node i. This indicates the total bandwidth occupied by node i in the time slots.

[0042] Furthermore, in step S6, performing the genetic algorithm includes performing selection, crossover, and mutation operations.

[0043] The selection operation involves choosing superior individuals as references for the next generation based on the fitness value calculated by the fitness function; the crossover operation involves using uniform crossover to apply route recombination; and the mutation operation involves increasing the mutation probability as the average time delay increases.

[0044] The beneficial effects of this invention are as follows: This invention proposes a time-sensitive network routing and scheduling calculation method based on genetic algorithm using the flow model and network topology of a hydropower station. This method can find an optimal flow transmission path and scheduling scheme for the time-sensitive network of a smart hydropower station to meet the transmission constraints of different flows and reduce the waiting delay of flow transmission.

[0045] Other advantages, objectives, and features of the invention will be set forth in part in the description which follows, and in part will be apparent to those skilled in the art from the following examination, or may be learned from practice of the invention. The objectives and other advantages of the invention can be realized and obtained through the following description. Attached Figure Description

[0046] To make the objectives, technical solutions, and advantages of the present invention clearer, the preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings, wherein:

[0047] Figure 1 This is a diagram illustrating the latency of the TSN network.

[0048] Figure 2 This is an indication of queuing delay.

[0049] Figure 3 This is a flowchart illustrating the method described in this invention;

[0050] Figure 4 This is the network topology under a scheduling instance;

[0051] Figure 5 This is a diagram illustrating chromosome initialization.

[0052] Figure 6 This is a schematic diagram of a no-wait scheduling plan;

[0053] Figure 7 This is a no-wait scheduling process;

[0054] Figure 8 This is a schematic diagram of chromosome structure after the scheduling phase;

[0055] Figure 9This is a diagram illustrating chromosome crossing over.

[0056] Figure 10 This is a diagram illustrating chromosomal variation.

[0057] Figure 11 This is a schematic diagram of the genetic algorithm execution process;

[0058] Figure 12 The network topology under a scheduling instance;

[0059] Figure 13 This is a diagram illustrating traffic scheduling.

[0060] Figure 14 This indicates the link occupancy status. Detailed Implementation

[0061] The following specific examples illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of the present invention. Unless otherwise specified, the following embodiments and features can be combined with each other.

[0062] Table 1 below shows the definitions of relevant terms in this invention:

[0063] Table 1

[0064]

[0065]

[0066] In time-sensitive networks, the latency that scheduling decision-makers can optimize primarily lies in the switching components. For example... Figure 1 As shown, the latency of data transmission in a time-sensitive network includes transmission latency, propagation latency, processing latency, and queuing latency.

[0067] In a local area network (LAN), the transmission length is generally short, and the propagation delay t is relatively short compared to the propagation speed of electromagnetic waves in the channel. prop It can be ignored.

[0068]

[0069] in, v represents the link length from switch i to switch i+1. prop This indicates the speed at which data propagates along the link.

[0070] The delays occurring inside the switch include: transmission delay. Processing delay δ, queuing delay T queue .in, V is the frame length. p For port speed.

[0071] The transmission delay is related to the message length and the transmission speed of the switch port. The processing delay δ is related to the switch performance and is generally considered a constant; the queuing delay T... queue The latency caused by data frames waiting in the switch's queuing buffer is caused by data frames queuing due to transmission conflicts between them. Queuing latency will increase end-to-end latency and is not fixed.

[0072] like Figure 2 As shown, when two frames arrive at the switch at the same time, it will inevitably result in one frame being sent first and the other later. In this case, the later-sent frame will experience queuing delay. Periodic flows can specify the transmission time of the flow, thereby reducing the queuing delay T. queue =0, reducing end-to-end latency.

[0073] Under the condition of no queuing delay, the end-to-end delay of each traffic flow is calculated using the following formula:

[0074]

[0075] in, This represents the transmission and processing delay of stream j at node i.

[0076] This invention proposes a time-sensitive network routing and scheduling calculation method based on a genetic algorithm, using a flow model and network topology of a hydropower station. Due to the complexity of the ring topology of a hydropower station, the algorithm aims to find an optimal flow transmission path and scheduling scheme to meet different flow transmission constraints, such as maximum delay and periodicity requirements. Figure 3 As shown, the method mainly includes:

[0077] S1. Initialize TSN network topology: Read information such as network topology, node processing latency, and traffic constraints. Calculate the least common multiple (LCM) of the periods of all traffic flows, i.e., the hyperperiod.

[0078] S2, Find all potential paths for each flow.

[0079] S3. Generate initial population: Create an initial population, where each chromosome represents a potential solution for traffic scheduling.

[0080] S4. Traffic Scheduling: For each traffic item, find a suitable start time for transmission within the network. This process involves allocating transmission time slots to the traffic and ensuring that the traffic's constraints are met.

[0081] S5. Fitness Calculation: Calculate the fitness value for each scheduling scheme to determine the quality of the scheme.

[0082] S6. Genetic Algorithm Execution: The pygad.GA class is used to execute the genetic algorithm, including operations such as selection, crossover, and mutation, to iteratively improve the scheduling scheme in the population. Finally, a routing table and a gating list for each switch node are generated.

[0083] Step S1 is as follows:

[0084] (1) Read the network topology L a,b Node processing delay Flow constraints. These constraints include the flow period T. j Frame length of traffic Source node destination node Maximum cutoff delay ete j Information such as...

[0085] (2) Calculate the least common multiple (LCM) of the periods of all traffic flows, i.e., the hyperperiod. The period of traffic flows refers to the time interval between traffic transmissions.

[0086] (3) In IEC 61850, GOOSE class messages typically have a longer period and higher priority than SV class messages. Therefore, the scheduling order of traffic in the network is based on the traffic transmission period as the highest priority (longer periods are scheduled first), followed by the maximum cutoff delay, source node-destination node, and frame size. Traffic is sorted in this order to ensure that traffic with higher priority is scheduled first during the scheduling process.

[0087] Figure 4 The network topology of a scheduling instance is shown, which includes four endpoints (ES) and four physical switches. Table 2 below shows one GOOSE flow and one SV flow, and defines the various attributes of each flow, including source node, destination node, period, and frame length.

[0088] Table 2

[0089]

[0090] Step S2 specifically includes:

[0091] (1) Find all possible paths from the source node to the destination node for each traffic flow using a depth-first search (DFS) method.

[0092] (2) Establish loop constraints to ensure that no loops are formed in the transmission path of the flow, i.e. a≠b, and the next target node l a+1,b+1 In this context, a+1 ≠ b+1. Here, a and b represent nodes.

[0093] against Figure 4 The network model shown represents the set of paths that flow j takes from the source node to the destination node. As shown in Table 3.

[0094] Table 3

[0095]

[0096] Step S3 specifically includes:

[0097] like Figure 5 As shown, in the initial population of the genetic algorithm, chromosomes are divided into two parts: path encoding and time encoding. Each chromosome will encode the j-th flow... All paths are encoded as real values, and a value is randomly selected. At this point, the start time of transmission has not yet been calculated, and the time part of the chromosome does not contain time information.

[0098] Step S4 specifically includes:

[0099] (1) For each traffic flow, a suitable start time for transmission is found in the network using a no-wait scheduling algorithm. This process involves allocating transmission time slots to the traffic flow and ensuring that the traffic flow's constraints are met.

[0100] The scheduling constraint of Time-Sensitive Networking (TSN) requires that, based on the transmission path and start time of each flow, the transmission time slots of each flow on each link should not conflict within a supercycle, thus achieving wait-free transmission. Therefore, the flow constraint is as follows:

[0101] Transmittable time slot condition for all traffic on a certain link i in a transmission path: The transmission time slots of n traffic flows passing through link i must be less than or equal to the link's timeout.

[0102]

[0103] Because GOOSE traffic has a high priority, and after sampling at the substation, the period and frame length of GOOSE traffic are higher than those of SV traffic. Therefore, the design maps high priority to a longer period, followed by the deadline, then frame length, and finally the number of nodes between the source and destination nodes. When the longer period is scheduled first, the above formula becomes the following formula:

[0104]

[0105] The start time of traffic transmission is calculated using the following formula:

[0106]

[0107] in, S1 represents the longest link of flow j, S2 represents the maximum end-to-end delay requirement of the receiver, S3 represents the minimum transmission time requirement within a period, and S3 represents the start transmission time of 0 when flow j is the first node and the period of flow j is the largest. For each flow j, the transmission end time at the output port of each hop switch is equal to the transmission time at the output port of the next hop switch.

[0108] In summary, the start time of the stream transmission is S3, and it must be less than min(S1,S2).

[0109] like Figure 6 The diagram illustrates a wait-free scheduling plan. In Node1, this invention focuses on planning flow f at time t. 11′ Transmission begins, so that when it reaches Node3 after passing through Node2, the T of stream f... queue =0, in time slot t 11 ~t 11′ Other streams can be transmitted within the system. This can be achieved by optimizing two objective functions: cutoff delay and maximizing link utilization.

[0110] The deadline is expressed as:

[0111] EtE delay ≥delay total

[0112]

[0113] Maximizing link utilization is expressed as:

[0114] max(E total )

[0115]

[0116] in, For the idle time slot on node i, Let be the total bandwidth time slot occupied by node i. Based on the above scheduling conditions, a genetic algorithm is used to search for the optimal values ​​of the two objective functions under different paths.

[0117] like Figure 7 The following is the flow chart of the no-wait scheduling algorithm:

[0118] Step 1: Initialization

[0119] Input parameters: the path to the receiving stream and the stream ID.

[0120] Initialize time variables: Initialize time variables, such as t0 (arrival time), for the transmission of the stream in the network.

[0121] Step 2: Traverse the path of the stream

[0122] Node iteration: Iterate through each node on the flow path.

[0123] Step 3: Process each node

[0124] Arrival time calculation: If it is the first node on the path, set the initial arrival time. If it is not the first node, calculate the arrival time based on the scheduling result of the previous node.

[0125] Step 4: Scheduling Attempt

[0126] Phase traversal: For each possible scheduling phase of each node (based on the transmission period and supercycle of the flow), check the scheduling feasibility, that is, determine whether the current phase allows the transmission of the flow, taking into account link capacity, scheduling of other flows, etc.

[0127] Calculate transmission time: If feasible, calculate the start time t1 and end time t2 of the transmission of the stream at the current node.

[0128] Step 5: Scheduling Decision

[0129] Scheduling condition evaluation: Verify whether the calculated t1 and t2 satisfy the flow constraints. Check for conflicts with already scheduled flows.

[0130] Step 6: Update scheduling information

[0131] Scheduling successful: If the scheduling conditions are met, update the port scheduling information of the current node and record the transmission time of the stream.

[0132] Scheduling failed: Attempt to adjust the scheduling of the flow on the previous node, selecting the transmission time for the flow. If no start transmission time is available, return scheduling failure.

[0133] Step 7: Proceed to the next stage

[0134] Phase iteration: After completing the scheduling of the current phase, move to the next phase to continue trying.

[0135] Overcycle handling: If scheduling is not possible within the current overcycle, consider scheduling within the next overcycle.

[0136] Step 8: Complete node scheduling

[0137] Node iteration complete: After completing the scheduling of the current node, move to the next node on the path.

[0138] Path iteration complete: After scheduling all nodes, the scheduling of the entire flow is completed.

[0139] Step 9: Return the scheduling result

[0140] Successful scheduling: Returns success if all streams are successfully scheduled.

[0141] Failure handling: If any stream cannot be scheduled, return a failure and log the reason for the failure.

[0142] Step 10: Post-scheduling processing

[0143] Update network status: Update the status of nodes and links in the network based on the new scheduling results.

[0144] Record scheduling information: Record the scheduling time of each flow on each node for subsequent analysis and optimization.

[0145] After the scheduling phase, the chromosome structure is as follows: Figure 7 As shown: At this point, the chromosome already contains information about the path and the start time of transmission.

[0146] Step S5 specifically includes:

[0147] Evaluate the performance or fitness of each chromosome. In genetic algorithms, the fitness function evaluates the performance or fitness of each chromosome (in this case, a flow scheduling scheme). The fitness function is a core part of genetic algorithms because it determines which chromosomes are more likely to be selected to generate the next generation, thus affecting the efficiency of the entire search process and the quality of the final solution.

[0148]

[0149] Wherein, fitness_delay is the fitness value of average end-to-end delay, fitness_gap is the fitness value of link utilization, delay_mean is the average end-to-end delay, cnt_ph is the number of periods with idle time slots, and count is the sum of all unused time slots. τ1 and τ2 are correction factors used to balance the impact of delay and time slots in fitness calculation. These values ​​are selected based on the magnitude of delay and time slots to ensure comparability between the two in fitness calculation.

[0150] The `fitness` function, described above, calculates two fitness values ​​for all paths of each flow, based on the quality of the solutions represented by the chromosomes. The `fitness` function calculates fitness by considering factors such as end-to-end delay of traffic in the network, network bandwidth utilization, and unused time slots. As shown by the `fitness_delay` function, the smaller the end-to-end delay, the larger the value of `fitness_delay`. As shown by the `fitness_gap` function, the larger the value of `fitness_gap`, the higher the link utilization. However, when assuming no waiting for transmission, a higher average end-to-end delay indicates that the flow passes through more nodes, and the link utilization increases accordingly.

[0151] Step S6 specifically includes:

[0152] Execute genetic algorithms, such as Figure 11 As shown, operations such as selection, crossover, and mutation are used to iteratively improve the scheduling scheme in the population. S4 and S5 are executed repeatedly until the optimal solution or the maximum number of iterations is reached. Finally, a routing table and a gating list for each switch node are generated and printed. Selection, crossover, and mutation are as follows... Figure 9 , Figure 10 As shown.

[0153] In this context, selection refers to choosing superior individuals as references for the next generation based on their fitness values. These superior individuals are selected through an improved elite selection strategy: the parent P and offspring Q combine to form a new population, and NSAG-II non-dominance and crowding are calculated. Then, they are re-ranked and their fitness is calculated again to serve as the parent P' for the next generation.

[0154] Crossover refers to the application of crossover (route reorganization), which is achieved through uniform crossover.

[0155] Mutation refers to custom mutation operations (dynamic mutation). The mutation probability increases as the average latency increases. When the average latency is high or the system is trapped in a local optimum, there is a chance to reorganize the routes, thereby breaking the local optimum and reducing latency.

[0156] If the value of the fitness function remains unchanged after 1000 consecutive iterations, it means that the current execution has reached the optimal or local optimum, and the execution should be stopped.

[0157] like Figure 12 The network topology for a scheduling instance consists of 5 points and 4 TSN switches, with each switch port having a transmission speed of 1Gbps. The entire network contains 2 GOOSE flows and 1 SV flow. Table 4 defines the attributes of each flow, including the source node, destination node, maximum deadline, and frame length.

[0158] Table 4

[0159]

[0160] The set of paths obtained by DFS is shown in Table 5:

[0161] Table 5

[0162]

[0163] The wait-free traffic scheduling in this example is as follows: Figure 13 As shown, the link occupancy status is as follows: Figure 14 As shown in the diagram, on port 4 of switch, without no-wait scheduling, flow f2 will wait for flow f3 to complete its scheduling before starting its own. In this case, flow f2 will experience a queuing delay of 4.8 μs. If multiple flows are added, the queuing delay will increase significantly. Therefore, no-wait scheduling can reduce, and even lower, the queuing delay to zero.

[0164] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.

Claims

1. A genetic algorithm-based time-sensitive network routing and scheduling method, characterized in that, The method includes: Read the TSN network topology, node processing delay, and flow constraint information; calculate the least common multiple of the periods of all traffic; sort each traffic according to the traffic transmission period, maximum cutoff delay, source node-destination node, and frame size, and give the traffic with the largest transmission period the highest priority, and then the priorities of maximum cutoff delay, source node-destination node, and frame size decrease in order, and sort the traffic according to this priority setting. Use a depth-first search approach to find all possible paths from the source node to the destination node for each traffic flow; Initialize the population chromosomes, where each chromosome represents a potential solution for flow scheduling; A suitable start time for transmission is planned for each traffic using a wait-free scheduling algorithm, and the traffic constraints are ensured to be met during the planning process. The performance or fitness of each chromosome is evaluated using fitness functions; these fitness functions include: In the formula, The fitness value represents the average end-to-end delay. The fitness value represents the link utilization rate. For average end-to-end delay, The number of periods with idle time slots. The sum of all unused time slots. , As a correction factor; The genetic algorithm is executed to iteratively improve the scheduling scheme in the population. The flow scheduling and fitness function calculations are performed repeatedly until the optimal solution or the maximum number of iterations is reached. Finally, the routing table and the gating list of each switch node are generated and printed. The execution of the genetic algorithm includes performing mutation operations, which increase the mutation probability as the average latency increases. No-wait scheduling algorithms include: 1) Receive the path and ID of the stream, and initialize time variables for the transmission of the stream in the network; 2) Iteratively process each node on the flow path; if the node being processed is the first node on the path, set the initial arrival time; if it is not the first node, calculate the arrival time based on the scheduling result of the previous node. 3) At each node, traverse each potential scheduling phase of the node, consider link capacity and the scheduling of other flows to determine whether the current phase allows the transmission of the flow; if the transmission is allowed, calculate the start and end times of the flow at the current node. The start time of the stream transmission is calculated using the following formula: In the formula, Indicates the start time of traffic transmission. i Represents a node. Indicates the first j The transmission period of a stream Indicates the maximum transmission period. Represents a stream j At the node i Place m The start time of transmission for the phase, Represents a stream j Data frame size, Indicates the transmission speed of the switch port. Indicates the first j Processing latency of the stream; This indicates the maximum end-to-end latency requirement at the receiving end. Indicates the first j End-to-end delay of the stream Represents a stream j The longest link; Indicates the minimum transmission time requirement within the minimum period; 4) Verify that the calculated start and end times meet the flow constraints to avoid conflicts with already scheduled flows; The constraint condition is that, after passing through a certain link... n The transmission time slot for each traffic segment must be less than or equal to the link's timeout, as shown in the following formula: wherein denotes the hyper-period of all flows through a certain link, denotes the period of the i j th flow. 5) Update scheduling information: If the scheduling conditions are met, update the port scheduling information of the current node and record the transmission time of the stream; otherwise, try to adjust the scheduling of the stream on the previous node and select the transmission time of the stream; if there is no available start transmission time, return scheduling failure. 6) After completing the scheduling of the current stage, move to the next stage to continue trying; if scheduling cannot be performed within the current timeout period, consider scheduling within the next timeout period. 7) Once all nodes in the path have been iterated, the scheduling of the current flow is complete; if all flows are successfully scheduled, return success; if any flow fails to be scheduled, return failure and record the reason for failure. 8) Update the status of nodes and links in the network based on the new scheduling results, and record the scheduling time of each flow on each node; The optimization objectives of the no-wait scheduling algorithm include: satisfying the deadline delay while maximizing link utilization; where the deadline delay is expressed as: In the formula, Indicates the deadline delay. This represents the end-to-end transmission time of a periodic TT stream. Represents a stream j At the node i Transmission and processing latency, Indicates the port transmission rate; Maximizing link utilization is expressed as: In the formula, Indicates link utilization. This represents the link utilization rate on node i. Represents a node i Idle time slots on Represents a node i Total bandwidth occupied time slots.

2. The method of claim 1, wherein, In the process of finding all possible paths from the source node to the destination node for each flow, a loop constraint must be satisfied, that is, no loops can be formed in the transmission path of the flow, as shown in the following equation: , And the next target node middle, ;in, L Represents the set of links in a network. express L The link from node a to node b in the middle. Indicates the first j A stream.

3. The method of claim 1, wherein, The execution of the genetic algorithm also includes performing selection and crossover operations; The selection operation involves selecting superior individuals as references for the next generation based on the fitness value calculated using the fitness function; the crossover operation involves using uniform crossover to apply route reorganization.

Citation Information

Patent Citations

  • Non-latency sensitive network traffic hybrid scheduling method

    CN116389277A