A method for generating time-triggered traffic gating list
By using harmonious search ideas and iterative optimization to generate a gating list for time-triggered traffic, the problems of high scheduling complexity, low bandwidth utilization and poor adaptability in time-sensitive networks are solved, and efficient traffic scheduling and sorting and fast convergence are achieved.
Patent Information
- Application Number
- CN202411977833.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-09-26
- Estimated Expiration
- 2044-12-31
AI Technical Summary
In time-sensitive networks, existing technologies have problems such as exponentially increasing scheduling planning complexity with network scale and load, low network bandwidth utilization, poor adaptability, complex global search and iterative operations, and slow convergence rate.
Adopting the harmonious search idea, the traffic scheduling sequence is generated by initializing the harmonious memory matrix, iterative optimization and dynamic probability adjustment. Combined with the traffic period grouping and the new harmonious solution vector generation mechanism, the gating list of time-triggered traffic is generated.
It significantly reduces the complexity of time-triggered traffic scheduling, improves the network's adaptability and global search capabilities, enhances the convergence rate of iterative operations, and improves network bandwidth utilization.
Smart Images

Figure CN119766748B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of communication networks, and in particular relates to a method for generating a time-triggered traffic gating list. Background Art
[0002] With the rapid development of emerging communication technologies, their application scenarios are becoming increasingly diverse. Communication network systems are placing increasingly stringent demands on the real-time, deterministic, and reliable performance of data traffic. Time-Sensitive Networking (TSN) has become a leading choice for demanding hard real-time scenarios such as advanced driver assistance systems, aerospace, and the Industrial Internet. In TSN, time-triggered TT traffic is used in hard real-time scenarios with stringent requirements for latency, jitter, and real-time performance, and is given the highest scheduling priority within TSN. After establishing a unified time reference across all network devices, time-triggered TT traffic is transmitted according to the gated list (GCL). This rigorous time-triggered scheduling mechanism effectively ensures the deterministic end-to-end latency and ultra-low jitter characteristics of time-triggered TT flows.
[0003] Time-Sensitive Network (TSN) traffic scheduling technology directly impacts the Quality of Service (QoS) of various network services, playing a decisive role in the real-time and deterministic nature of data transmission. It is a key technology and a key research direction in time-sensitive networking. Time-triggered TT flows rely on gated lists (GCLs). The essence of time-triggered TT traffic scheduling is the generation of GCLs. GCL generation involves finding feasible solutions based on traffic characteristics under constraints such as time slots, delays, routing, and collision avoidance. The complexity of this solution is closely related to the scale of the scheduling problem and the number of constraints. The more complex the network and the greater the volume of traffic, the more difficult it is to solve the GCLs.
[0004] The existing technology currently has the following shortcomings:
[0005] First, there is a problem in scheduling planning where the complexity of solution increases exponentially with the increase of network scale and network load.
[0006] Second, using only fixed rules for traffic sorting and scheduling results in low network bandwidth utilization and poor adaptability to network scenarios.
[0007] Third, in complex topologies and traffic scenarios, there are problems such as poor global search performance, complex iterative operations, and slow convergence rate. Summary of the Invention
[0008] The technical problems to be solved by the present invention are:
[0009] In order to avoid the deficiencies of the prior art, the present invention provides a method for generating a gating list for time-triggered traffic, which is used to solve the problem of generating a gating list for time-triggered traffic in large-scale and high-load time-sensitive networks.
[0010] In order to solve the above technical problems, the technical solution adopted by the present invention is:
[0011] A method for generating a time-triggered traffic gating list, comprising:
[0012] Obtaining the periods of all time-triggered flows to be scheduled, and grouping all time-triggered flows to be scheduled based on the periods of all time-triggered flows to be scheduled;
[0013] Initialize the harmony memory matrix of each group, arrange the harmony memory matrices of each group from small to large according to the flow period, and form the initial total harmony memory matrix;
[0014] Calculate the harmonious fitness of each harmonious solution vector in the initial total harmonious memory matrix, sort the harmonious solution vectors from best to worst according to their harmonious fitness, and take the first HMS harmonious solution vectors to form the initial generation total harmonious memory matrix; where HMS is the size of the initial harmonious memory matrix;
[0015] Iterate based on the initial total harmonious memory matrix and output the solution vector corresponding to the optimal fitness of the total harmonious memory matrix at the end of the iteration, which is the optimized traffic scheduling order;
[0016] Determine the start transmission time for each flow based on the traffic scheduling order, assign all traffic instances to corresponding links within the super cycle based on the start transmission time, and generate the scheduling result;
[0017] Based on the scheduling results, a sending schedule for each end system and a gating list for each port of the switch are generated.
[0018] A further technical solution of the present invention is as follows: the initialization of the harmonious memory matrix of each group includes:
[0019] Calculate the number of flows n in the current group;
[0020] Use the Fisher-Yates shuffle algorithm to generate random permutations from 0 to n-1;
[0021] Execute the shuffling algorithm 2·HMS times, and use the random permutation generated each time as the row vector to initialize the harmony memory matrix of the current group.
[0022] A further technical solution of the present invention is: the quality criterion of the harmonious adaptability is:
[0023] Compare the number of scheduling failure flows. The smaller the number of scheduling failure flows, the better the harmony fitness.
[0024] When the number of scheduling failure flows is the same, the smaller the maximum flow completion time, the better the harmony fitness;
[0025] When the maximum flow completion time is the same, the harmonious fitness quality is the same, and the order is determined according to the original order of the harmonious memory matrix.
[0026] A further technical solution of the present invention is as follows: performing iteration based on the initial total harmonious memory matrix and outputting a solution vector corresponding to the optimal fitness of the total harmonious memory matrix when the iteration terminates, including:
[0027] Determine the harmonious memory consideration rate and adjustment rate for the current iteration number;
[0028] Based on the harmonious memory consideration rate and adjustment rate of the current number of iterations, new solution vectors of the harmonious memory matrix of each group are composed according to the consideration rules and fine-tuning rules respectively. The new solution vectors of each group are combined into a new solution vector of the total harmonious memory matrix, and the fitness of the solution vector is calculated according to the harmonious fitness criterion.
[0029] A further technical solution of the present invention is as follows: the determination of the harmonious memory consideration rate and adjustment rate of the current number of iterations is specifically as follows:
[0030] Let the current number of iterations be i, then
[0031] Among them, HMCR is the harmonious memory consideration rate of the current iteration number, AR is the adjustment rate, and MaxIter is the maximum number of iterations.
[0032] A further technical solution of the present invention is that the new solution vectors of each group are combined into a new solution vector of the total harmonious memory matrix, including:
[0033] (3b-1) Initialize the new solution vector list of the total harmonious memory matrix to be empty, and take out the harmonious memory matrix of the first traffic group in the total harmonious memory matrix;
[0034] (3b-2) Calculate the number of flows n of the traffic group corresponding to the current harmonious memory matrix and generate a list list from 0 to n-1;
[0035] (3b-3) Initialize the current group solution vector list to be empty; initialize the solution vector interception interval, which is a left-closed and right-open interval, with the left endpoint being 0 and the right endpoint being a random integer between the left endpoint plus 1 and n;
[0036] (3b-4) Generate a random floating point number in the range [0,1) and determine whether the floating point number is less than or equal to the harmonious memory consideration rate. If it is less than or equal to the harmonious memory consideration rate, execute (3b-5); otherwise, execute (3b-7);
[0037] (3b-5) randomly selecting a solution vector of the current harmonious memory matrix, intercepting the current solution vector according to the solution vector interception interval to generate a new solution vector, and judging one by one whether the elements in the current new solution vector exist in the list generated in (3b-2), if so, deleting the element from the list; if not, randomly selecting an element from the list to replace the element of the current new solution vector, and deleting the element from the list;
[0038] (3b-6) Generate a random floating-point number in the range [0,1) and determine whether the floating-point number is less than or equal to the adjustment rate. If it is, randomly swap the positions of two elements in the current new solution vector; otherwise, do nothing and execute (3b-8).
[0039] (3b-7) Randomly select an element from the list generated in (3b-2), generate a new solution vector of the intercept interval size, and delete the selected element from the list;
[0040] (3b-8) Add the new solution vector to the current group solution vector list and determine whether the size of the current group solution vector list is less than n. If it is less than n, update the left endpoint of the solution vector interception interval to the right endpoint, and update the right endpoint to a random integer between the left endpoint plus 1 and the list length, and continue to execute (3b-4); otherwise, the new solution vector of the harmonious memory matrix of the current traffic group is generated;
[0041] (3b-9) Add the new solution vector of the harmonious memory matrix of the current traffic group to the new solution vector list of the total harmonious memory matrix, and determine whether the harmonious memory matrix of the current traffic group is the last traffic group. If not, take out the harmonious memory matrix of the next traffic group from the total harmonious memory matrix and execute (3b-2); otherwise, output the new solution vector list of the total harmonious memory matrix as the new total harmonious memory matrix solution vector.
[0042] A further technical solution of the present invention is as follows: determining the start transmission time for each flow based on the traffic scheduling order, and allocating all traffic instances to corresponding links within a supercycle period based on the start transmission time, including:
[0043] (5a) Schedule the first flow according to the determined flow scheduling order, and initialize the starting sending time to 0;
[0044] (5b) Determine whether the start sending time of the current flow meets the flow period constraint condition. If not, execute (5h);
[0045] (5c) Try to schedule the traffic to be transmitted on the first hop link of the current traffic according to the start sending time. If a conflict occurs, it means that there is a conflict with the previously scheduled traffic, and execute (5e); if there is no conflict, turn to the next hop link;
[0046] (5d) Schedule the traffic on the current link. If a conflict occurs, it means that there is a conflict with the previously scheduled traffic. Execute (5e); otherwise, execute (5f);
[0047] (5e) Calculate the new start sending time of the current traffic according to the minimum cost conflict resolution criterion and execute (5b);
[0048] (5f) Determine whether the current link is the last hop link of the flow. If so, execute (5g); otherwise, turn to the next hop link and execute (5d);
[0049] (5g) Based on the start sending time of the current flow, all instances of the current flow within the super cycle are scheduled to the corresponding links according to the flow period;
[0050] (5h) Determine whether the traffic scheduling sequence is traversed. If so, end (5); otherwise, set the starting sending time to 0, traverse the next traffic, and execute (5b).
[0051] A further technical solution of the present invention: Step (5g) also includes, during scheduling, if it is found that the time slot interval occupied by the current flow in the link and the time slot interval occupied by the previously scheduled flow in the link can be merged, then merging the intervals.
[0052] A further technical solution of the present invention is that the generation of a transmission schedule for each end system and a gating list for each port of the switch based on the scheduling result includes:
[0053] According to the currently traversed sending link, initialize the gating list of the sending port corresponding to the sending link to be empty, select the first time slot interval of the current sending link, and determine whether the left endpoint of the time slot interval is 0. If the left endpoint of the time slot interval is 0, set the gating duration to the length of the time slot interval, and add the gating record "OCCCCCC" and the gating duration to the gating list; if not, first set the gating duration to the left endpoint of the time slot interval, add the gating record "COOOOOOO" and the gating duration to the gating list, set the gating duration to the length of the time slot interval, and add the gating record "OCCCCCC" and the gating duration to the gating list;
[0054] Set the gate duration to the difference between the left endpoint of the current time slot interval and the right endpoint of the previous time slot interval, add the gate record "COOOOOOO" and the gate duration to the gate list; set the gate duration to the length of the time slot interval, add the gate record "OCCCCCC" and the gate duration to the gate list;
[0055] Calculate the difference between the super period and the current time slot interval. If the difference is not 0, first set the gating duration to the difference, add the gating record "COOOOOOO" and the gating duration to the gating list; until the time slot interval is the last time slot interval of the current sending link.
[0056] The beneficial effects of the present invention are:
[0057] The present invention provides a method for generating a time-triggered traffic gating list. This method adopts the concept of harmonious search and uses a global search and iterative optimization mechanism to obtain high-quality traffic scheduling and sorting. It has a fast solution speed and avoids the limitations of using only fixed rules for traffic sorting and scheduling. It also designs a first-generation harmonious memory matrix optimization generation mechanism, a dynamic probability adjustment mechanism, and a new harmonious solution vector efficient generation mechanism, which improves the problems of poor global search performance, complex iterative operations, and slow convergence speed. The details are as follows:
[0058] First, the present invention is based on the idea of meta-heuristic algorithm, which can significantly reduce the time complexity of scheduling and planning time-triggered TT traffic in large-scale and high-load time-sensitive networks.
[0059] Secondly, the present invention adopts the idea based on harmonious search to determine the traffic scheduling order, thereby improving the limitation of using only fixed rules to determine the traffic scheduling order.
[0060] Third, due to the preprocessing mechanism of traffic period grouping, the optimal generation mechanism of the initial total harmonious memory matrix, the dynamic probability adjustment mechanism and the efficient new harmonious solution vector generation strategy, the present invention enhances the global search ability of the algorithm, reduces the complexity introduced by iterative operations and improves the convergence rate of the algorithm. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] The accompanying drawings are only for the purpose of illustrating particular embodiments and are not to be considered limiting of the present invention. Like reference symbols denote like parts throughout the drawings.
[0062] Figure 1 It is a flow chart for implementing the present invention.
[0063] Figure 2 This is a schematic diagram of network topology modeling in step (1a) of the present invention.
[0064] Figure 3This is a schematic diagram of generating the initial total harmonic memory matrix in step (2) of the present invention (HMS is 2).
[0065] Figure 4 This is a schematic diagram of generating a new solution vector of the harmonious memory matrix in step (3b) of the present invention. DETAILED DESCRIPTION
[0066] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only intended to illustrate the present invention and are not intended to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below may be combined with each other as long as they do not conflict with each other.
[0067] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the terms used in this way are interchangeable where appropriate so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0068] The overall implementation concept of the present invention is to decompose the process of solving the time-triggered traffic gating list in a time-sensitive network into two main stages: the stage of determining the traffic scheduling sequence and the stage of determining the starting transmission time for each flow according to the determined sequence. The stage of determining the traffic scheduling sequence is based on the idea of harmonious search, and obtains a high-quality traffic scheduling order by utilizing and fine-tuning the rules in the solution space; the stage of determining the starting transmission time for each flow according to the determined sequence is based on the ideas of earliest flow transmission and minimum cost conflict decomposition, and obtains a scheduling result with high bandwidth utilization by arranging traffic transmission as early as possible and allowing multiple flows to be aggregated and transmitted as much as possible; finally, the sending schedule of each end system and the gating list of each switch port are generated based on the scheduling results.
[0069] In order to enable those skilled in the art to better understand the present invention, the present invention is described in detail below with reference to specific embodiments.
[0070] The flow chart for realizing the present invention is shown in the attached diagram. Figure 1 As shown, steps (2) to (4) are the stage of determining the traffic scheduling sequence, and step (5) is the stage of determining the starting transmission time for each flow according to the determined sequence.
[0071] (1) Building a Time-Sensitive Network (TSN) Scheduling Model:
[0072] (1a) Define the network topology as a directed graph and number all nodes and links in the network. The numbering method is as shown in the attached figure. Figure 2 As shown;
[0073] (1b) Initialization network switch processing delay d proc , link propagation delay d prop , link bandwidth bw;
[0074] (1c) Initialize the routing parameters of all time-triggered TT flows to be scheduled, and define the routes of all time-triggered TT flows according to the link numbers in (1a);
[0075] (1d) Obtain the period parameters of all time-triggered TT flows to be scheduled, and calculate the lowest common multiple of the periods of all time-triggered TT flows, which is recorded as the super cycle period HC;
[0076] (2) Harmony memory matrix initialization:
[0077] (2a) Initialize the size of the harmonious memory matrix HMS, the maximum number of iterations MaxIter and set the current number of iterations to 0;
[0078] (2b) grouping all the time-triggered flows to be scheduled according to their periods to form a group set;
[0079] (2c) Initialize the harmony memory matrix of each group according to the grouping situation, with a size twice the size of the harmony memory matrix HMS, and arrange the harmony memory matrices of each group from small to large according to the flow period to form the initial total harmony memory matrix;
[0080] Specifically, the implementation process of initializing the harmonious memory matrix of each group is as follows:
[0081] (2c-1) Traverse the group set and calculate the number of flows n of the current group;
[0082] (2c-2) Use the Fisher-Yates shuffling algorithm to generate random permutations from 0 to n-1;
[0083] (2c-3) Execute (2c-2) 2·HMS times, and use the random permutation generated each time as the row vector to initialize the harmony memory matrix of the current group, denoted as H T , the subscript T represents the period of the current group.
[0084] (2c-4) After the group traversal is completed, the harmony memory matrices of each group are arranged from small to large according to the flow period to form the initial total harmony memory matrix, which is recorded as H init ,Right now And T1<T2<…<T N , where N is the grouping set size.
[0085] (2d) calculating the harmony fitness of each harmony solution vector in the initial total harmony memory matrix according to the harmony fitness criterion;
[0086] Specifically, the calculation method of the harmonious fitness of each harmonious solution vector in the initial total harmonious memory matrix is:
[0087] (2d-1) Initialize the maximum flow completion time to 0 and the number of scheduling failure flows to 0;
[0088] (2d-2) The harmonious solution vector is the row vector of the initial total harmonious memory matrix, and the first element of the harmonious solution vector is taken out;
[0089] (2d-3) Determine which periodic group the current element belongs to, then select the stream of the periodic group according to the value of the element as the index, and initialize the start sending time sendTime of the stream to 0;
[0090] (2d-4) Determine whether the start sending time of the current stream meets the stream period constraint, that is,
[0091]
[0092] Where hop is the number of routing hops of the current flow, FrameLength is the frame length of the current flow, and T represents the period of the current flow. If it is not satisfied, the number of scheduling failure flows is increased by one, and (2d-10) is executed.
[0093] (2d-5) Try to schedule the flow transmission at the first hop link of the current flow according to the start sending time. If a conflict occurs, execute (2d-7); if there is no conflict, update the sendTime to Turn to the next hop link;
[0094] (2d-6) Schedule the traffic on the current link according to sendTime. If a conflict occurs, execute (2d-7); otherwise, execute (2d-8);
[0095] (2d-7) Subtract the right endpoint of the previously scheduled traffic time slot from the left endpoint of the currently scheduled traffic time slot, denoted as Δ, and update the start sending time of the current traffic to sendTime + Δ. Execute (2d-4).
[0096] (2d-8) Determine whether the current link is the last hop link of the flow. If so, execute (2d-9); otherwise, turn to the next hop link and execute (2d-5);
[0097] (2d-9) According to the start sending time of the current flow, all instances of the current flow in the super cycle period are scheduled to the corresponding link. During scheduling, if it is found that the time slot interval occupied by the current flow in the link and the time slot interval occupied by the previously scheduled flow in the link can be merged, then the intervals are merged; the maximum completion time of the current flow is calculated as follows: If the value is greater than the current maximum flow completion time, the maximum flow completion time is updated to this value; otherwise, no operation is performed;
[0098] (2d-10) Determine whether the traversal of the harmonious solution vector elements is complete. If so, output the maximum flow completion time and the number of scheduling failure flows; otherwise, take out the next element of the harmonious solution vector and execute (2d-3).
[0099] (2e) Sort the harmonious solution vectors in the initial total harmonious memory matrix from best to worst according to their harmonious fitness, and take the first HMS harmonious solution vectors to form the initial generation total harmonious memory matrix;
[0100] Specifically, the criteria for harmonious adaptability are:
[0101] (2e-1) Compare the number of scheduling failure flows. The smaller the number of scheduling failure flows, the better the harmonious fitness.
[0102] (2e-2) When the number of scheduling failure flows is the same, the smaller the maximum flow completion time, the better the harmony fitness;
[0103] (2e-3) When the maximum flow completion time is the same, the harmonious fitness quality is the same, and the order is determined according to the original order of the harmonious memory matrix.
[0104] (3) Iterative optimization of the total harmonious memory matrix:
[0105] (3a) Determine the harmonious memory consideration rate HMCR and adjustment rate AR of the current iteration number;
[0106] Specifically, the method for determining the harmonious memory consideration rate HMCR and the adjustment rate AR of the current iteration number is as follows:
[0107] Let the current number of iterations be i, then
[0108] (3b) forming new solution vectors of the harmonious memory matrix of each group according to the consideration rule and the fine-tuning rule, forming a new solution vector of the total harmonious memory matrix with the new solution vectors of each group, and calculating the fitness of the solution vector according to the good or bad criterion of harmonious fitness;
[0109] Specifically, the method for generating the new solution vector of each group harmonious memory matrix and the new solution vector of the total harmonious memory matrix is:
[0110] (3b-1) Initialize the new solution vector list of the total harmonious memory matrix to be empty, and take out the harmonious memory matrix of the first traffic group in the total harmonious memory matrix;
[0111] (3b-2) Calculate the number of flows n of the traffic group corresponding to the current harmonious memory matrix and generate a list list from 0 to n-1;
[0112] (3b-3) Initialize the current group solution vector list to be empty; initialize the solution vector interception interval, which is a left-closed and right-open interval, with the left endpoint being 0 and the right endpoint being a random integer between the left endpoint plus 1 and n;
[0113] (3b-4) Generate a random floating-point number in the range [0,1) and determine whether the floating-point number is less than or equal to HMCR. If it is less than or equal to HMCR, execute (3b-5); otherwise, execute (3b-7);
[0114] (3b-5) randomly selecting a solution vector of the current harmonious memory matrix, intercepting the current solution vector according to the solution vector interception interval to generate a new solution vector, and judging one by one whether the elements in the current new solution vector exist in the list generated in (3b-2), if so, deleting the element from the list; if not, randomly selecting an element from the list to replace the element of the current new solution vector, and deleting the element from the list;
[0115] (3b-6) Generate a random floating-point number in the range [0,1) and determine whether the floating-point number is less than or equal to AR. If it is less than or equal to AR, randomly swap the positions of the two elements in the current new solution vector; otherwise, do nothing and execute (3b-8).
[0116] (3b-7) Randomly select an element from the list generated in (3b-2), generate a new solution vector of the intercept interval size, and delete the selected element from the list;
[0117] (3b-8) Add the new solution vector to the current group solution vector list and determine whether the size of the current group solution vector list is less than n. If it is less than n, update the left endpoint of the solution vector interception interval to the right endpoint, and update the right endpoint to a random integer between the left endpoint plus 1 and the list length, and continue to execute (3b-4); otherwise, the new solution vector of the harmonious memory matrix of the current traffic group is generated;
[0118] (3b-9) Add the new solution vector of the harmonious memory matrix of the current traffic group to the new solution vector list of the total harmonious memory matrix, and determine whether the harmonious memory matrix of the current traffic group is the last traffic group. If not, take out the harmonious memory matrix of the next traffic group from the total harmonious memory matrix and execute (3b-2); otherwise, output the new solution vector list of the total harmonious memory matrix as the new total harmonious memory matrix solution vector.
[0119] (3c) updating the total harmonious memory matrix. If the fitness of the solution vector is better than the worst fitness of the current total harmonious memory matrix, the solution vector is used to replace the solution vector corresponding to the worst fitness of the current harmonious memory matrix; otherwise, the total harmonious memory matrix is not updated.
[0120] (3d) Determine whether the current number of iterations has reached the maximum number of iterations MaxIter or whether the iteration stop condition has been reached. If not, increase the current number of iterations by one and execute (3a); otherwise, end the iterative optimization of the total harmonious memory matrix.
[0121] Specifically, the iteration stopping condition is:
[0122] If the total harmonious memory matrix has the optimal harmonious fitness after iterating When there is still no change, the iteration stopping condition is reached.
[0123] (4) Output the solution vector corresponding to the optimal fitness of the current total harmonious memory matrix, which is the optimized traffic scheduling order;
[0124] (5) Determine the start transmission time for each stream in the determined order:
[0125] (5a) Schedule the first flow according to the determined flow scheduling order, and initialize the starting sending time to 0;
[0126] (5b) Determine whether the start sending time of the current flow meets the flow period constraint condition. If not, execute (5h);
[0127] Specifically, the flow period constraint is the same as that in (2b-4).
[0128] (5c) Try to schedule the traffic to be transmitted on the first hop link of the current traffic according to the start sending time. If a conflict occurs, it means that there is a conflict with the previously scheduled traffic, and execute (5e); if there is no conflict, turn to the next hop link;
[0129] (5d) Schedule the traffic on the current link. If a conflict occurs, it means that there is a conflict with the previously scheduled traffic. Execute (5e); otherwise, execute (5f);
[0130] (5e) Calculate the new start sending time of the current traffic according to the minimum cost conflict resolution criterion and execute (5b);
[0131] Specifically, the method for calculating the new start sending time of the current traffic is the same as (2b-7).
[0132] (5f) Determine whether the current link is the last hop link of the flow. If so, execute (5g); otherwise, turn to the next hop link and execute (5d);
[0133] (5g) Based on the start transmission time of the current flow, all instances of the current flow within the super cycle period HC are scheduled to the corresponding link according to the flow period. During scheduling, if it is found that the time slot interval occupied by the current flow on the link can be merged with the time slot interval occupied by the previously scheduled flow on the link, the interval is merged;
[0134] (5h) Determine whether the traffic scheduling sequence is traversed. If so, end (5); otherwise, set the starting sending time to 0, traverse the next traffic, and execute (5b).
[0135] (6) Generate the sending schedule of each end system and the gating list of each port of the switch based on the scheduling results.
[0136] Specifically, the method for generating the sending schedule of each end system and the gating list of each switch port based on the scheduling results is as follows:
[0137] (6a) Traverse the sending links of all end system ports and the sending links of all switch ports;
[0138] (6b) According to the currently traversed sending link, initialize the gating list of the sending port corresponding to the sending link to be empty, select the first time slot interval of the current sending link, and determine whether the left endpoint of the time slot interval is 0. If the left endpoint of the time slot interval is 0, set the gating duration to the length of the time slot interval, and add the gating record "OCCCCCC" (O means that the sending port queue is allowed to transmit, C means that the sending port queue is allowed to transmit, and from left to right, it represents the queues of sending ports numbered 7 to 0) and the gating duration to the gating list; if not, first set the gating duration to the left endpoint of the time slot interval, add the gating record "COOOOOOO" and the gating duration to the gating list, then set the gating duration to the length of the time slot interval, and add the gating record "OCCCCCC" and the gating duration to the gating list;
[0139] (6c) Determine whether the time slot interval is the last time slot interval of the current transmission link. If not, select the next time slot interval and execute 4); otherwise, execute 5);
[0140] (6d) First, set the gate duration to the difference between the left endpoint of the current time slot interval and the right endpoint of the previous time slot interval, add the gate record "COOOOOOO" and the gate duration to the gate list, then set the gate duration to the length of the time slot interval, add the gate record "OCCCCCC" and the gate duration to the gate list, and execute 3);
[0141] (6e) Calculate the difference between the super period HC and the current time slot interval. If the difference is not 0, first set the gate duration to the difference, and add the gate record "COOOOOOO" and the gate duration to the gate list;
[0142] (6f) The gating list of the current sending port is generated.
[0143] The above description is only a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any technician familiar with this technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present invention, and these modifications or replacements should all be included in the scope of protection of the present invention.
Claims
1. A method for generating a time-triggered traffic gating list, characterized in that: include: Obtaining the periods of all time-triggered flows to be scheduled, and grouping all time-triggered flows to be scheduled based on the periods of all time-triggered flows to be scheduled; Initialize the harmony memory matrix of each group, arrange the harmony memory matrices of each group from small to large according to the flow period, and form the initial total harmony memory matrix; Calculate the harmonious fitness of each harmonious solution vector in the initial total harmonious memory matrix, sort the harmonious solution vectors from best to worst according to their harmonious fitness, and take the first HMS harmonious solution vectors to form the initial generation total harmonious memory matrix; where HMS is the size of the initial harmonious memory matrix; Iterate based on the initial total harmonious memory matrix and output the solution vector corresponding to the optimal fitness of the total harmonious memory matrix at the end of the iteration, which is the optimized traffic scheduling order; Determine the start transmission time for each flow based on the traffic scheduling order, assign all traffic instances to corresponding links within the super cycle based on the start transmission time, and generate the scheduling result; Based on the scheduling results, a sending schedule for each end system and a gating list for each port of the switch are generated.
2. The method for generating a time-triggered traffic gating list according to claim 1, wherein: Initializing the harmonious memory matrix of each group includes: Calculate the number of flows n in the current group; Use the Fisher-Yates shuffle algorithm to generate random permutations from 0 to n-1; Execute the shuffling algorithm 2·HMS times, and use the random permutation generated each time as the row vector to initialize the harmony memory matrix of the current group.
3. The method for generating a time-triggered traffic gating list according to claim 1, wherein: The quality criteria of the harmonious adaptability are: Compare the number of scheduling failure flows. The smaller the number of scheduling failure flows, the better the harmony fitness. When the number of scheduling failure flows is the same, the smaller the maximum flow completion time, the better the harmony fitness; When the maximum flow completion time is the same, the harmonious fitness quality is the same, and the order is determined according to the original order of the harmonious memory matrix.
4. The method for generating a time-triggered traffic gating list according to claim 1, wherein: The iteration based on the initial total harmonious memory matrix and outputting the solution vector corresponding to the optimal fitness of the total harmonious memory matrix when the iteration is terminated include: Determine the harmonious memory consideration rate and adjustment rate for the current iteration number; Based on the harmonious memory consideration rate and adjustment rate of the current number of iterations, new solution vectors of the harmonious memory matrix of each group are composed according to the consideration rules and fine-tuning rules respectively. The new solution vectors of each group are combined into a new solution vector of the total harmonious memory matrix, and the fitness of the solution vector is calculated according to the harmonious fitness criterion.
5. The method for generating a time-triggered traffic gating list according to claim 4, wherein: The determination of the harmonious memory consideration rate and adjustment rate of the current number of iterations is specifically as follows: Let the current number of iterations be i, then Among them, HMCR is the harmonious memory consideration rate of the current iteration number, AR is the adjustment rate, and MaxIter is the maximum number of iterations.
6. A method for generating a time-triggered traffic gating list according to claim 4, characterized in that: The new solution vectors of each group are combined into a new solution vector of the total harmonious memory matrix, including: (3b-1) Initialize the new solution vector list of the total harmonious memory matrix to be empty, and take out the harmonious memory matrix of the first traffic group in the total harmonious memory matrix; (3b-2) Calculate the number of flows n of the traffic group corresponding to the current harmonious memory matrix and generate a list list from 0 to n-1; (3b-3) Initialize the current group solution vector list to be empty; initialize the solution vector interception interval, which is a left-closed and right-open interval, with the left endpoint being 0 and the right endpoint being a random integer between the left endpoint plus 1 and n; (3b-4) Generate a random floating point number in the range [0,1) and determine whether the floating point number is less than or equal to the harmonious memory consideration rate. If it is less than or equal to the harmonious memory consideration rate, execute (3b-5); otherwise, execute (3b-7); (3b-5) randomly selecting a solution vector of the current harmonious memory matrix, intercepting the current solution vector according to the solution vector interception interval to generate a new solution vector, and judging one by one whether the elements in the current new solution vector exist in the list generated in (3b-2), if so, deleting the element from the list; if not, randomly selecting an element from the list to replace the element of the current new solution vector, and deleting the element from the list; (3b-6) Generate a random floating-point number in the range [0,1) and determine whether the floating-point number is less than or equal to the adjustment rate. If it is, randomly swap the positions of two elements in the current new solution vector; otherwise, do nothing and execute (3b-8). (3b-7) Randomly select an element from the list generated in (3b-2), generate a new solution vector of the intercept interval size, and delete the selected element from the list; (3b-8) Add the new solution vector to the current group solution vector list and determine whether the size of the current group solution vector list is less than n. If it is less than n, update the left endpoint of the solution vector interception interval to the right endpoint, and update the right endpoint to a random integer between the left endpoint plus 1 and the list length, and continue to execute (3b-4); otherwise, the new solution vector of the harmonious memory matrix of the current traffic group is generated; (3b-9) Add the new solution vector of the harmonious memory matrix of the current traffic group to the new solution vector list of the total harmonious memory matrix, and determine whether the harmonious memory matrix of the current traffic group is the last traffic group. If not, take out the harmonious memory matrix of the next traffic group from the total harmonious memory matrix and execute (3b-2); otherwise, output the new solution vector list of the total harmonious memory matrix as the new total harmonious memory matrix solution vector.
7. The method for generating a time-triggered traffic gating list according to claim 1, wherein: The method of determining the start transmission time for each flow based on the traffic scheduling order, and allocating all traffic instances to corresponding links within the super cycle based on the start transmission time, includes: (5a) Schedule the first flow according to the determined flow scheduling order, and initialize the starting sending time to 0; (5b) Determine whether the start sending time of the current flow meets the flow period constraint condition. If not, execute (5h); (5c) Try to schedule the traffic to be transmitted on the first hop link of the current traffic according to the start sending time. If a conflict occurs, it means that there is a conflict with the previously scheduled traffic, and execute (5e); if there is no conflict, turn to the next hop link; (5d) Schedule the traffic on the current link. If a conflict occurs, it means that there is a conflict with the previously scheduled traffic. Execute (5e); otherwise, execute (5f); (5e) Calculate the new start sending time of the current traffic according to the minimum cost conflict resolution criterion and execute (5b); (5f) Determine whether the current link is the last hop link of the flow. If so, execute (5g); otherwise, turn to the next hop link and execute (5d); (5g) Based on the start sending time of the current flow, all instances of the current flow within the super cycle are scheduled to the corresponding links according to the flow period; (5h) Determine whether the traffic scheduling sequence is traversed. If so, end (5); otherwise, set the starting sending time to 0, traverse the next traffic, and execute (5b).
8. The method for generating a time-triggered traffic gating list according to claim 7, wherein: Step (5g) also includes, during scheduling, if it is found that the time slot interval occupied by the current flow in the link and the time slot interval occupied by the previously scheduled flow in the link can be merged, merging the intervals.
9. The method for generating a time-triggered traffic gating list according to claim 1, wherein: The method of generating a transmission schedule for each end system and a gating list for each port of the switch based on the scheduling result includes: According to the currently traversed transmission link, initialize the gating list of the transmission port corresponding to the transmission link to be empty, select the first time slot interval of the current transmission link, determine whether the left endpoint of the time slot interval is 0, if the left endpoint of the time slot interval is 0, set the gating duration to the length of the time slot interval, and add the gating record "OCCCCCC" and the gating duration to the gating list; if not, first set the gating duration to the left endpoint of the time slot interval, add the gating record "COOOOOOO" and the gating duration to the gating list, set the gating duration to the length of the time slot interval, and add the gating record "OCCCCCC" and the gating duration to the gating list; Set the gate duration to the difference between the left endpoint of the current time slot interval and the right endpoint of the previous time slot interval, add the gate record "COOOOOOO" and the gate duration to the gate list; set the gate duration to the length of the time slot interval, add the gate record "OCCCCCC" and the gate duration to the gate list; Calculate the difference between the super period and the current time slot interval. If the difference is not zero, first set the gate duration to the difference, add the gate record "COOOOOOO" and the gate duration to the gate list; until the time slot interval is the last time slot interval of the current transmission link.
Citation Information
Patent Citations
Time-sensitive network gating mechanism traffic shaping and route planning scheduling method
CN111740924A
Time-sensitive network gating list entry generation method
CN114500392A