Time-sensitive network routing and scheduling method based on genetic algorithm
By applying the routing and scheduling methods based on genetic algorithms in the time -sensitive network of smart water and power stations, it solves the problem that the traditional method is difficult to meet the real -time needs in complex networks, and realizes the optimal flow transmission path and scheduling solution to reduce waiting delay delay. And improve the real -time and reliability of data transmission.
Patent Information
- Application Number
- CN202411633751.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-15
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2044-11-15
AI Technical Summary
The prior art has limitations in routing and scheduling of time-sensitive networks (TSNs), especially in complex network models, such as large ring networks of intelligent hydropower stations. Traditional methods are difficult to fully consider the dynamic changes and real-time requirements of the network, resulting in Link overload affects the real-time and reliability of data transmission.
Adopt a time -sensitive network routing and scheduling method based on genetic algorithms. By reading network topology and constraint condition information, calculate the minimum public multiple of the cycle of traffic, sorting flow, use depth of priority search to find all possible paths, initialize species population chromosomes, through no waiting scheduling to schedule The algorithm planning transmission time and iteratively improved the scheduling scheme through the genetic algorithm to generate the routing table and door control list.
实现了在智能水电站中找到最优的流量传输路径和调度方案,满足不同流量的传输约束,降低流量传输的等待时延,提高数据传输的实时性和可靠性。
Smart Images

Figure CN119383140A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of time-sensitive networks, relates to the intelligence, automation and informatization of smart hydropower stations, and particularly to a time-sensitive network routing and scheduling method based on genetic algorithms. Background Art
[0002] In the research field of Time-Sensitive Networking (TSN), it is crucial to meet the time-sensitive communication needs of industrial automation and intelligent manufacturing. With the rapid development of Industry 4.0, there is a growing demand for technologies that can exchange data under the premise of strict time control. As a technology designed to improve the determinism and real-time performance of Ethernet communications, TSN plays a key role in achieving efficient and reliable operation in fields such as factory automation, robot control, emergency services and critical infrastructure.
[0003] However, existing technologies still have some problems in TSN routing and scheduling. Especially in complex network models, such as the large ring network used by smart hydropower stations, traditional solvers such as integer linear programming (ILP) and satisfiability modulo theory (SMT) have limitations. These methods solve traffic scheduling under certain path conditions, but often fail to fully consider the dynamic changes and real-time requirements of the network, which can easily lead to overload of a link, thus affecting the real-time and reliability of data transmission.
[0004] In addition, although TSN technology has the characteristics of low-latency data transmission and can meet the real-time and reliable transmission requirements of hydropower stations for electrical and non-electrical data (such as flow, speed, and temperature), in practical applications, how to efficiently implement routing and traffic scheduling is still a challenge. Especially when there are multiple flows with different priorities and constraints in the network, how to ensure that all flows can be scheduled under the premise of meeting their transmission constraints is a complex problem that requires optimization.
[0005] The IEC 61850 standard provides standardized data models, communication services, and system configurations for hydropower stations, and supports a variety of key message types, such as GOOSE and SV. However, the existing technology still faces some technical challenges when combining TSN with IEC 61850. For example, how to design an efficient scheduling algorithm to make full use of TSN's communication scheduling information mechanism (such as the gating list proposed by IEEE 802.1Qbv) to meet the transmission requirements of different traffic flows, while improving communication efficiency and interoperability between systems. Summary of the invention
[0006] In view of this, the purpose of the present invention is to provide a time-sensitive network routing and scheduling method based on genetic algorithm, through which an optimal traffic transmission path and scheduling scheme are found to meet the transmission constraints of different traffic, such as maximum delay, periodicity requirements, etc.
[0007] In order to achieve the above object, the present invention provides the following technical solutions:
[0008] A time-sensitive network routing and scheduling method based on genetic algorithm, the method comprising:
[0009] S1. Read TSN network topology, node processing delay and flow constraint information; calculate the lowest common multiple of the cycles of all flows; sort each flow according to the flow transmission cycle, maximum cutoff delay, source node-destination node and frame size; where the flow transmission cycle refers to the time interval of flow transmission;
[0010] S2, use a depth-first search method to find all possible paths from the source node to the destination node for each flow;
[0011] S3, initialize the population chromosome, where each chromosome represents a potential solution for traffic scheduling;
[0012] S4, plan the appropriate start transmission time for each flow through the no-wait scheduling algorithm, and ensure that the flow constraints are met during the planning process;
[0013] S5, evaluating the performance or fitness of each chromosome through a fitness function;
[0014] S6. Execute the genetic algorithm to iteratively improve the scheduling scheme in the population, cyclically execute the calculation of traffic scheduling and fitness function 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, the sorting of each flow according to the flow transmission cycle, maximum cut-off delay, source node-destination node and frame size includes giving the flow with a large transmission cycle the highest priority, and then sorting the maximum cut-off delay, source node-destination node and frame size in descending order, and sorting the flow according to the priority setting to ensure that the flow with a higher priority will be scheduled first during the scheduling process.
[0016] Furthermore, in step S2, in the process of finding all possible paths from the source node to the destination node for each flow, the loop constraint needs to be satisfied, that is, no loop can be formed in the transmission path of the flow, which is expressed as: a≠b, and the next target node is l a+1,b+1In the above equation, a+1≠b+1. Where L represents the set of links in the network, l a,b represents the link from node a to node b in L, F j represents the jth stream.
[0017] Furthermore, in step S4, the no-wait scheduling algorithm includes:
[0018] 1) Receive the flow path and flow ID, and initialize the time variable for the flow transmission in the network;
[0019] 2) Iterate each node on the flow path; if the processed node is the first node of 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 stage of the node, consider the link capacity and the scheduling of other flows to determine whether the flow transmission is allowed in the current stage; if the transmission is allowed, calculate the start transmission time and end time of the flow at the current node;
[0021] The start transmission time of the stream is calculated by the following formula:
[0022]
[0023] S 3 ≤min(S 1 ,S 2 )
[0024]
[0025] In the formula, S 3 represents the start transmission time of the traffic, i represents the node, T j represents the transmission period of the jth stream, T max Indicates the maximum transmission period, represents the start time of transmission of stream j at stage m at node i, represents the data frame size of stream j, V p represents the transmission speed of the switch port, δ represents the processing delay of the jth flow; S 1 Indicates the maximum end-to-end delay requirement of the receiving end, ete j represents the end-to-end delay of the jth flow, represents the longest link of flow j; S 2 Indicates the sending time requirement within the minimum cycle;
[0026] 4) Verify that the calculated start and end times of transmission satisfy the constraints of the flow to avoid conflicts with scheduled flows;
[0027] The constraint condition is that the transmission time slot of n flows passing through a link must be less than or equal to the super period of the link, as shown in the following formula:
[0028]
[0029] Where LCM represents the super period of all flows passing through a link, T j represents the period of the jth 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 flow; otherwise, try to adjust the scheduling of the flow at the previous node and select the transmission time of the flow; 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 is not possible within the current super cycle, consider scheduling within the next super cycle;
[0032] 7) After all nodes in the path are iterated, the current flow is scheduled. If all flows are successfully scheduled, success is returned. If any flow fails to be scheduled, failure is returned and the reason for the failure is recorded.
[0033] 8) Update the status of nodes and links in the network according to the new scheduling results, and record the scheduling time of each flow on each node.
[0034] Furthermore, the optimization objectives of the wait-free scheduling algorithm include: meeting the deadline delay and maximizing the link utilization; where the deadline delay is expressed as:
[0035] E delay ≥delay total
[0036]
[0037] Where EtE delay Indicates the deadline delay, delay total represents the end-to-end transmission time of the periodic TT flow, represents the transmission and processing delay of flow j at node i, V s Indicates the port transmission rate;
[0038] Maximizing link utilization is expressed as:
[0039] max(E total )
[0040]
[0041] In the formula, E total Indicates link utilization, Ei represents the link utilization on node i, represents the idle time slot on node i, Represents the total bandwidth occupied by node i in the time slot.
[0042] Furthermore, in step S6, executing the genetic algorithm includes performing selection, crossover and mutation operations.
[0043] The selection operation is to select excellent individuals as references for the next generation according to the fitness value calculated by the fitness function; the crossover operation is to use uniform crossover to apply routing reorganization; and the mutation operation is to increase the mutation probability as the average delay increases.
[0044] The beneficial effects of the present invention are as follows: the present invention uses the flow model and network topology of the hydropower station to propose a time-sensitive network routing and scheduling calculation method based on a genetic algorithm, which can find an optimal flow transmission path and scheduling scheme for the time-sensitive network of the 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 present invention will be described in the following description to some extent, and to some extent, will be obvious to those skilled in the art based on the following examination and study, or can be taught from the practice of the present invention. The objectives and other advantages of the present invention can be realized and obtained through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention will be described in detail below in conjunction with the accompanying drawings, wherein:
[0047] Figure 1 This is an indication of TSN network delay;
[0048] Figure 2 It indicates the queuing delay;
[0049] Figure 3 It is a schematic diagram of the process of the method of the present invention;
[0050] Figure 4 is the network topology structure under a scheduling instance;
[0051] Figure 5 This is a diagram for chromosome initialization;
[0052] Figure 6 This is a hint for no-wait scheduling;
[0053] Figure 7 To schedule the process without waiting;
[0054] Figure 8 This is a schematic diagram of the chromosome structure after the scheduling stage;
[0055] Fig. 9 This is a diagram for chromosome crossing over;
[0056] Fig.10 This is an illustration of chromosome mutation;
[0057] Fig.11 Schematic diagram of the genetic algorithm execution process;
[0058] Fig.12 is the network topology under a scheduling instance;
[0059] Fig.13 It is an indication of traffic scheduling;
[0060] Fig.14 Indicates the link occupancy status. DETAILED DESCRIPTION
[0061] The following describes the embodiments of the present invention by specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways 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 only illustrate the basic concept of the present invention in a schematic manner, and the following embodiments and features in the embodiments can be combined with each other without conflict.
[0062] Table 1 below shows the definitions of relevant terms in the present invention:
[0063] Table 1
[0064]
[0065]
[0066] In a time-sensitive network, the latency that can be optimized by the scheduling decision maker is mainly in the switch part. Figure 1 As shown in Figure 1, the delay of data transmission in a time-sensitive network includes sending delay, propagation delay, processing delay, and queuing delay.
[0067] In a local area network, the transmission length is generally small, and the propagation delay t is shorter than the propagation rate of electromagnetic waves in the channel. prop Can be ignored.
[0068]
[0069] in, represents the link length from switch i to switch i+1, v prop Indicates the speed at which data travels on a link.
[0070] The delays that occur inside the switch include: sending delay Processing delay δ, queuing delay T queue .in, is the frame length, V p The port rate.
[0071] The sending delay is related to the length of the message and the sending speed of the switch port. The processing delay δ is related to the performance of the switch and is generally considered a constant. The queuing delay T queue The delay caused by data frames waiting in the switch's queuing buffer queue is caused by data frames queuing due to transmission conflicts before each other. The queuing delay will increase the end-to-end delay and is not fixed.
[0072] like Figure 2 As shown in the figure, when two frames arrive at the switch at the same time, one frame will be sent first and the other frame will be sent later. At this time, the later frame will generate a queuing delay. The periodic flow can specify the sending time of the flow, thereby making the queuing delay T queue =0, reducing end-to-end delay.
[0073] In the absence of queuing delay, the end-to-end delay calculation formula for each flow is as follows:
[0074]
[0075] in, represents the transmission and processing delay of flow j at node i.
[0076] Based on the flow model and network topology of the hydropower station, this paper proposes a time-sensitive network routing and scheduling calculation method based on genetic algorithm. Due to the complex ring topology of the hydropower station, the goal of the algorithm is to find an optimal flow transmission path and scheduling scheme to meet the transmission constraints of different flows, such as maximum delay, periodicity requirements, etc. Figure 3 As shown, the method mainly includes:
[0077] S1. Initialize TSN network topology: read network topology, node processing delay, traffic constraints and other information. Calculate the least common multiple (LCM) of the periods of all traffic, 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 flow, find a suitable start transmission time for it in the network. This process involves allocating transmission time slots for the flow and ensuring that the constraints of the flow are met.
[0081] S5. Fitness calculation: Calculate the fitness value for each scheduling scheme to judge the pros and cons of the scheme.
[0082] S6. Genetic algorithm execution: Use the pygad.GA class to execute the genetic algorithm, including operations such as selection, crossover, and mutation, to iteratively improve the scheduling scheme in the population. Finally, the routing table and the gating list of each switch node are generated.
[0083] Step S1 is specifically as follows:
[0084] (1) Read the network topology L a,b , Node processing delay Flow constraints. The flow constraints include the flow period T j , the frame length of the traffic Source Node Destination Node Maximum cut-off delay j And other information.
[0085] (2) Calculate the least common multiple (LCM) of the periods of all flows, i.e., the hyperperiod. The period of a flow refers to the time interval between flow transmissions.
[0086] (3) In IEC61850, GOOSE messages usually have a longer period than SV messages and have a higher priority, so the scheduling order of traffic in the network is based on the traffic transmission period as the highest priority (the larger period is scheduled first), followed by the maximum deadline delay, source node-destination node, and frame size. Traffic is sorted in this order to ensure that traffic with a higher priority will be scheduled first during the scheduling process.
[0087] Figure 4 The network topology of a scheduling instance is shown, which includes four terminal ESs and four physical switches. Table 2 below shows one GOOSE flow and one SV flow, and defines the various attributes of each flow, including the source node, destination node, cycle, 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 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, that is, a≠b, and the next target node is l a+1,b+1 In the equation, a+1≠b+1. Where a and b represent nodes.
[0093] against Figure 4 The network model shown in the figure shows 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 figure, in the initial population of the genetic algorithm, the chromosome is divided into two parts, path coding and time coding. Each chromosome will convert the jth flow All paths in are encoded as real values, and a value is randomly selected. At this time, the start transmission time has not been calculated, and there is no time information in the time part of the chromosome.
[0098] Step S4 specifically includes:
[0099] (1) For each flow, a wait-free scheduling algorithm is used to find a suitable start transmission time for it in the network. This process involves allocating transmission time slots to the flow and ensuring that the constraints of the flow are met.
[0100] Among them, the scheduling constraint of the time-sensitive network requires that the transmission time slots of each flow do not conflict with each other within a super cycle according to the transmission path and start transmission time of each flow, and the no-queuing delay is calculated on each link. At this time, no-wait transmission is achieved. Therefore, the flow constraints are as follows:
[0101] The transmission time slot condition for all flows on a link i of the transmission path: the transmission time slot of n flows passing through a link i must be less than or equal to the super period of the link:
[0102]
[0103] Since GOOSE traffic has a high priority, after sampling at the substation, the period and frame length of GOOSE traffic are higher than those of SV traffic. Therefore, the high priority mapping is designed to be large period, followed by the deadline, and then the frame length and the number of nodes between the source node and the target node. When the large period is scheduled first, the above formula becomes the following formula:
[0104]
[0105] The start transmission time of the traffic is calculated by the following formula:
[0106]
[0107] in, is the longest link of flow j, S 1 is the maximum end-to-end delay requirement at the receiving end, S 2 S is the minimum transmission time requirement within the cycle. 3 It means that when flow j is the first node and the cycle of flow j is the largest, the start transmission time is 0. For each flow j, the transmission end time at the output port of each hop switch is equal to the sending time at the output port of the next hop switch.
[0108] In summary, the start transmission time of the stream is S 3 , and must be less than min(S 1 ,S 2 ).
[0109] like Figure 6 The figure shows a schematic diagram of a non-waiting scheduling plan, in which Node1, the present invention focuses on planning the flow f at t 11′ Start transmission, so that when it passes through Node2 and reaches Node3, the T of flow f queue =0, in time slot t 11 ~t 11′ Other flows can be transmitted within the time. This can be achieved by optimizing the deadline delay and maximizing the link utilization.
[0110] The deadline delay is expressed as:
[0111] E delay ≥delay total
[0112]
[0113] Maximizing link utilization is expressed as:
[0114] max(E total )
[0115]
[0116] in, is the idle time slot on node i, is the total bandwidth occupied time slot of 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 process of the no-wait scheduling algorithm, which is as follows:
[0118] Step 1: Initialization
[0119] Input parameters: the path to the receiving stream and the stream ID.
[0120] Initialize time variables: Initialize time variables for the transmission of flows in the network, such as t0 (arrival time).
[0121] Step 2: Traverse the flow path
[0122] Node iteration: Iterate each node on the flow path.
[0123] Step 3: Process each node
[0124] Arrival time calculation: If it is the first node of 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 flow’s transmission period and superperiod), check the scheduling feasibility, i.e., determine whether the flow’s transmission is allowed in the current phase, considering link capacity, scheduling of other flows, etc.
[0127] Calculate transmission time: If feasible, calculate the transmission start time t1 and end time t2 of the flow at the current node.
[0128] Step 5: Scheduling Decisions
[0129] Scheduling condition evaluation: Verify whether the calculated t1 and t2 meet the constraints of the flow. Check whether there is a conflict with the scheduled flow.
[0130] Step 6: Update scheduling information
[0131] Scheduling success: If the scheduling conditions are met, update the port scheduling information of the current node and record the transmission time of the flow.
[0132] Scheduling failure: Try to adjust the schedule of the flow at the previous node and select the transmission time of the flow. If there is no available start transmission time, the scheduling failure is returned.
[0133] Step 7: Processing the next stage
[0134] Phase iteration: After completing the scheduling of the current phase, move to the next phase and continue trying.
[0135] Supercycle processing: If scheduling is not possible within the current supercycle, consider scheduling within the next supercycle.
[0136] Step 8: Complete node scheduling
[0137] Node iteration completion: After completing the scheduling of the current node, move to the next node on the path.
[0138] Path iteration is complete: After all nodes are scheduled, the entire flow is scheduled.
[0139] Step 9: Return the scheduling result
[0140] Successful scheduling: If all flows are successfully scheduled, success is returned.
[0141] Failure handling: If any flow cannot be scheduled, a failure is returned and the reason for the failure is recorded.
[0142] Step 10: Post-scheduling
[0143] Update network status: Update the status of nodes and links in the network according to 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 stage, the chromosome structure is as follows Figure 7 As shown: At this point, the chromosome already carries information about the path and the time when transmission starts.
[0146] Step S5 specifically includes:
[0147] Evaluate the performance or fitness of each chromosome. In a genetic algorithm, the role of the fitness function is to evaluate the performance or fitness of each chromosome (in this case, representing a traffic scheduling solution). The fitness function is the core part of the genetic algorithm because it determines which chromosomes are more likely to be selected for generating the next generation, thus affecting the efficiency of the entire search process and the quality of the final solution.
[0148]
[0149] Where fitness_delay is the fitness value of the average end-to-end delay, fitness_gap is the fitness value of the link utilization, delay_mean is the average end-to-end delay, cnt_ph is the number of cycles with idle time slots, and count is the cumulative sum of all unused time slots. 1 , τ 2 It is a correction factor used to balance the impact of delay and time slot in fitness calculation. This value is selected based on the magnitude of delay and time slot to ensure that the two are comparable in fitness calculation.
[0150] The fitness function above calculates two fitness values for all paths of each flow, which are based on the quality of the solution represented by the chromosome. The fitness function calculates the fitness by considering factors such as the end-to-end delay of traffic in the network, the utilization of network bandwidth, and unused time slots. From the fitness_delay function, it can be seen that the smaller the end-to-end delay, the larger the value of fitness_delay. From the fitness_gap function, it can be seen that the greater the link utilization, the greater the value of fitness_gap. However, when the average end-to-end delay is larger on the basis of no-wait transmission, it means that the flow passes through more nodes, and the link utilization also increases accordingly.
[0151] Step S6 specifically includes:
[0152] Execute the genetic algorithm, such as Fig.11 As shown in Figure 1, operations such as selection, crossover, and mutation are included to iteratively improve the scheduling scheme in the population, and S4 and S5 are executed repeatedly until the optimal solution or the maximum number of iterations is reached. Finally, a printed routing table and a gating list of each switch node are generated. Fig. 9 , Fig.10 shown.
[0153] Among them, selection means that according to the fitness value, excellent individuals are selected as references for the next generation. Among them, excellent individuals are selected through an improved elite selection strategy, that is, the parent generation P and the offspring generation Q are combined to form a new population, and the non-dominated and crowded degree calculations of NSAG-II are performed, and then the ranking and fitness calculation are performed again as the parent generation P' of the next generation.
[0154] Crossover refers to application crossover (routing reorganization) and is achieved through uniform crossover.
[0155] Mutation refers to custom mutation operations (dynamic mutation). The mutation probability increases with the increase of average delay. When the average delay is large or falls into a local optimum, there is a chance to reorganize the routes, thereby breaking the local optimum and reducing the delay.
[0156] If the value of the fitness function remains unchanged after 1000 consecutive iterations, it means that the execution has reached the optimal or local optimal state and the execution is stopped.
[0157] like Fig.12 The network topology of a scheduling instance consists of 5 nodes and 4 TSN switches, where the port transmission speed of the switch is 1 Gbps. There are 2 GOOSE flows and 1 SV flow in the entire network. Table 4 defines the attributes of each flow, including the source node, destination node, cycle maximum deadline, and frame length.
[0158] Table 4
[0159]
[0160] The path set obtained by DFS is shown in Table 5:
[0161] Table 5
[0162]
[0163] The no-wait traffic scheduling in this instance is as follows Fig.13 As shown in Figure 2, the link occupancy is as follows: Fig.14 As shown. On the port of switch 4, if there is no wait-free scheduling, flow f 2 Will wait for 3 After the scheduling is completed, the scheduling starts. 2 There will be a 4.8μs queuing delay. If it is increased to multiple flows, the queuing delay will increase significantly. It can be seen that no-wait scheduling can reduce or even reduce the queuing delay to 0.
[0164] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the purpose and scope of the technical solution, which should be included in the scope of the claims of the present invention.
Claims
1. A time-sensitive network routing and scheduling method based on genetic algorithm, characterized in that: The method includes: Read TSN network topology, node processing delay, and flow constraint information; calculate the lowest common multiple of the cycles of all flows; sort each flow according to the flow transmission cycle, maximum cutoff delay, source node-destination node, and frame size; Use a depth-first search method to find all possible paths from the source node to the destination node for each flow; Initialize the population chromosomes, where each chromosome represents a potential solution for traffic scheduling; The no-wait scheduling algorithm is used to plan the appropriate start transmission time for each flow, and ensure that the flow constraints are met during the planning process; The performance or fitness of each chromosome is evaluated through a fitness function; Execute the genetic algorithm to iteratively improve the scheduling scheme in the population, loop the traffic scheduling and fitness function calculation 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.
2. The method according to claim 1, characterized in that The sorting of each flow according to the flow transmission cycle, maximum cut-off delay, source node-destination node and frame size includes giving the flow with a large transmission cycle the highest priority, and then sorting the maximum cut-off delay, source node-destination node and frame size in descending order, and sorting the flow according to the priority setting to ensure that the flow with a higher priority will be scheduled first during the scheduling process.
3. The method according to claim 1, characterized in that: In the process of finding all possible paths from the source node to the destination node for each flow, the loop constraint needs to be met, that is, no loop can be formed in the transmission path of the flow, as shown in the following formula: And the next target node l a+1,b+1 In the above equation, a+1≠b+1; where L represents the set of links in the network, l a,b represents the link from node a to node b in L, F j represents the jth stream.
4. The method according to claim 1, characterized in that: The no-wait scheduling algorithm includes: 1) Receive the flow path and flow ID, and initialize the time variable for the flow transmission in the network; 2) Iterate each node on the flow path; if the processed node is the first node of 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 stage of the node, consider the link capacity and the scheduling of other flows to determine whether the flow transmission is allowed in the current stage; if the transmission is allowed, calculate the start transmission time and end time of the flow at the current node; The start transmission time of the stream is calculated by the following formula: S3≤min(S1,S2) In the formula, S3 represents the start transmission time of the traffic, i represents the node, and T j represents the transmission period of the jth stream, T max Indicates the maximum transmission period, represents the start time of transmission of stream j at stage m at node i, represents the data frame size of stream j, V p represents the transmission speed of the switch port, δ represents the processing delay of the jth flow; S1 represents the maximum end-to-end delay requirement of the receiving end, ete j represents the end-to-end delay of the jth flow, represents the longest link of flow j; S2 represents the sending time requirement within the minimum period; 4) Verify that the calculated start and end times of transmission satisfy the constraints of the flow to avoid conflicts with scheduled flows; The constraint condition is that the transmission time slot of n flows passing through a link must be less than or equal to the super period of the link, as shown in the following formula: Where LCM represents the super period of all flows passing through a link, T j represents the period of the jth 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 flow; otherwise, try to adjust the scheduling of the flow at the previous node and select the transmission time of the flow; 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 is not possible within the current super cycle, consider scheduling within the next super cycle; 7) After all nodes in the path are iterated, the current flow is scheduled. If all flows are successfully scheduled, success is returned. If any flow fails to be scheduled, failure is returned and the reason for the failure is recorded. 8) Update the status of nodes and links in the network according to the new scheduling results, and record the scheduling time of each flow on each node.
5. The method according to claim 4, characterized in that The optimization objectives of the no-wait scheduling algorithm include: meeting the deadline delay and maximizing the link utilization; wherein the deadline delay is expressed as: EtE delay ≥delay total Where EtE delay Indicates the deadline delay, delay total represents the end-to-end transmission time of the periodic TT flow, represents the transmission and processing delay of flow j at node i, V s Indicates the port transmission rate; Maximizing link utilization is expressed as: max(E total ) In the formula, E total Indicates link utilization, E i represents the link utilization on node i, represents the idle time slot on node i, Represents the total bandwidth occupied by node i in the time slot.
6. The method according to claim 1, characterized in that: The execution of the genetic algorithm includes performing selection, crossover and mutation operations; The selection operation is to select excellent individuals as references for the next generation according to the fitness value calculated by the fitness function; the crossover operation is to use uniform crossover to apply routing reorganization; and the mutation operation is to increase the mutation probability as the average delay increases.
Citation Information
Patent Citations
Method and device for scheduling delay-sensitive traffic in line route
CN112235194A
Industrial wireless and TSN fusion-oriented network scheduling method
CN114553697A
Non-latency sensitive network traffic hybrid scheduling method
CN116389277A
Simulation optimization method for circulating pickup vehicle path and scheduling considering pickup and delivery queuing
CN117172640A
Route generation and flow scheduling method and system for time-sensitive network
CN117768373A
Cited By
Heuristic traffic scheduling method based on delay tolerance
CN120223620A