A Multi-Objective Optimization Scheduling Method for Hybrid Transmission in Time-Sensitive Networks
By adopting multi-objective optimization methods with joint routing encoding and genetic algorithms in time-sensitive networks, the problem of single optimization dimensions and slow solution speed in hybrid transmission scheduling is solved, and the comprehensive optimal scheduling of TT streams and AVB streams is achieved, which is suitable for large network topology.
Patent Information
- Application Number
- CN202310319014.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-28
- Publication Date
- 2025-07-04
- Estimated Expiration
- 2043-03-28
AI Technical Summary
The scheduling method of hybrid transmission in a time-sensitive network has a single optimization dimension, the optimization results are one-sided, and the solution speed is slow, so it is impossible to optimize the transmission efficiency of time-sensitive and non-time-sensitive streams at the same time.
The TT stream sorting vector, TT stream routing selection vector, and TT stream gap slack are combined to encode it. Multi-objective optimization is performed through genetic algorithms to obtain the Pareto optimal solution of the minimum TT stream and the minimum AVB stream transmission delay, and combine greedy strategies and non-dominant sorting to realize joint routing scheduling.
The scheduling efficiency of hybrid transmission is improved, the optimization scheduling solution space is expanded, the solution speed is improved, and the Pareto optimal solution with better comprehensiveness is obtained. It is suitable for large network topology, and solves the problems of single optimization dimensions and slow solution speed in the existing technology.
Smart Images

Figure CN116389289B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of network data streams, and particularly relates to a multi-objective optimization scheduling method for hybrid transmission in a time-sensitive network. Background Art
[0002] Time-Sensitive Network (TSN) is a series of additional protocols for 802.1 bridging networks proposed by IEEE, which is used to achieve deterministic transmission of data with high reliability, low latency, and low jitter. It can not only ensure the determinacy of critical in-vehicle control information or industrial control data, but also be compatible with traditional Ethernet to achieve hybrid transmission of different traffic flows. The flows in TSN can be divided into time-sensitive flows and non-time-sensitive flows. Time-sensitive flows (TT flows) are mainly applied to the industrial Internet and are used to represent industrial control flows with strict real-time and determinacy requirements in the network. Among non-time-sensitive flows (AVB flows, BE flows), AVB flows are mainly applied to some audio and video flows that occupy a large bandwidth and some services with certain latency requirements, and their priority is lower than that of TT flows; BE flows are mainly applied to service flows with no strong latency requirements and are at the lowest priority.
[0003] Flow scheduling is the core of TSN to achieve low latency, low jitter, and deterministic transmission of time-sensitive flows. A key mechanism in TT flow scheduling is the gating mechanism (TAS mechanism) proposed by 802.1Qbv. TAS is a control mechanism that can dynamically open and close the transmission gates of the output queues of each switch. Its implementation depends on the clock synchronization of all nodes in the whole network. It jointly ensures that each frame can smoothly pass through all output ports on the transmission route through a certain scheduling algorithm and meets the respective delay and bandwidth requirements of the flows, enabling different types of traffic flows to coexist on the same network.
[0004] The scheduling methods for non-time-sensitive flows in the prior art and their defects are as follows:
[0005] (1) A scheduling method based on SMT with an additional beneficial constraint for BE flows. When establishing constraints, a new constraint is proposed, that is, after each TT flow transmission is completed, a transmission time slot slack is vacated specifically for transmitting BE flows to ensure that the transmission quality of BE flows is not severely affected. The lower bound of slack is 0, and it is necessary to ensure that after adding slack, the scheduling on the link does not exceed the period. Then, the maximum total slack is used as the scheduling target to solve through SMT. However, using only the maximum total slack as the scheduling target belongs to single-objective optimization, which only optimizes the dimension of BE flows and cannot make both BE flows and TT flows optimal. Moreover, the speed of SMT / OMT solving is relatively slow and is not applicable to large network topologies.
[0006] (2) The multi-objective scheduling method for minimizing the TT flow usage queue and improving AVB routing aims to minimize the number of queues occupied by TT flows as the scheduling objective, so as to leave as many queues as possible for AVB and BE flows, attempt to minimize the end-to-end delay of AVB flows and maximize the network bandwidth utilization rate, construct an objective function composed of the weighted sum of three metrics, and also use GRASP to select routes for AVB flows; however, using the linear weighting method to linearly combine multiple objectives according to weights into a single objective, it is difficult to set an accurate weight vector to obtain the Pareto optimal solution. This method only highlights the optimization objective of the shortest TT flow queue, sets a large negative weight for other objectives, and when problems occur in other objective functions, the negative weight will amplify the problem and affect the final result. And traditional multi-objective optimization techniques generally can only obtain one solution from the Pareto solution set each time;
[0007] (3) The heuristic scheduling method that combines routing and takes the schedulability of AVB flows as the objective function proposes to take the maximum schedulability of AVB flows as the scheduling objective and adopts the combined routing and scheduling method to optimize AVB flows; however, only single-objective optimization is carried out. Although the schedulability of AVB flows is maximized, the metrics of its TT flows are not optimal, that is, the solution obtained is not Pareto optimal, the optimization dimension is single, and the optimization result is one-sided. Summary of the Invention
[0008] In order to overcome one or more defects and deficiencies existing in the prior art, the present invention provides a multi-objective optimization scheduling method for hybrid transmission in a time-sensitive network. By using the method of combining routing and coding, the TT flow sorting vector, the TT flow routing selection vector, and the TT flow gap slack are combined and encoded, and a set of encodings represents a complete scheduling result after decoding. Under the condition of meeting the general constraints of TSN, multi-objective optimization is carried out with the minimum TT flow and the minimum transmission delay of AVB flows as the objectives, and a set of Pareto optimal solution sets is obtained.
[0009] To achieve the above object, the present invention adopts the following technical solutions.
[0010] A multi-objective optimization scheduling method for hybrid transmission in a time-sensitive network includes the following steps:
[0011] S1. Obtain the topological information of the entire network and the information of all traffic in the network, and generate all flow sets and routing sets;
[0012] S2. According to the operation rules of the genetic algorithm, design the encoding and decoding of the routing set of TT flows;
[0013] S3. Perform basic settings of the genetic algorithm on the TT flow set;
[0014] S4. Iterate the population using the genetic algorithm, perform non-dominated sorting and crowding degree calculation with the minimum TT flow delay and the minimum AVB flow delay as the optimization objectives, and then select the individuals after sorting to form a new parental generation. Iterate repeatedly to obtain a set of Pareto optimal solutions;
[0015] S5. Perform joint routing scheduling for the corresponding traffic according to the obtained set of Pareto optimal solutions.
[0016] Preferably, the traffic includes time-sensitive TT flows, non-time-sensitive AVB flows, and non-time-sensitive BE flows.
[0017] Furthermore, it is characterized in that encoding and decoding designs are carried out for the routing set of TT flows. The specific process includes:
[0018] S21. Set the encoding structure of each TT flow set as [flow sorting vector, routing selection vector, slack gene] as an individual;
[0019] Among them, the slack gene represents the reserved time slot of a segment of TT flow sets, the flow sorting vector represents the serial number of TT flow sorting, and the routing selection vector represents the route corresponding to the TT flow;
[0020] S22. Decode the encoding structure in step S21. First, schedule and arrange the TT flows for the individual with the encoding structure of [flow sorting vector, routing selection vector, slack gene], and then insert the AVB flows into the positions where the TT flows are not arranged in turn, and convert it into the form of [TT flow transmission delay, AVB flow transmission delay].
[0021] Furthermore, it is characterized in that the specific process of decoding includes:
[0022] S221. Calculate the number of times n that the TT flow needs to be arranged under the hyper period hyper_period;
[0023] S222. After obtaining the number of times n that needs to be arranged, start scheduling from the first period. Let i represent the period, and initialize i = 0 to represent that the first period is being scheduled;
[0024] S223. Judge whether i is greater than 0; if not, it means that the current first period needs to be scheduled, and then execute step S224; if so, it means that the first period has been scheduled, and the current next period needs to be scheduled, and then execute step S225;
[0025] S224. Find the corresponding routing set according to the serial number of the TT flow set, traverse the routing set, and under the premise of meeting the scheduling constraint conditions, adopt a greedy strategy in the first cycle, and try to insert the TT flow set with the current serial number into the position with the possible minimum start time. For each hop in the route after each step, add a section of slack gene to the individual until the current cycle of this TT flow set is completely scheduled, and then execute step S226;
[0026] S225. Based on the TT flow set scheduled in the first cycle and the length of each cycle, determine the layout of the TT flow set in the current cycle, and check one by one whether it meets the scheduling constraint conditions; if so, execute step S226; if not, execute step S407;
[0027] S226. After the first cycle or the i-th cycle is arranged, then increment the current cycle i by 1 to enter the next cycle, and then execute step S228;
[0028] S227. Reset i = 0, add the scheduling constraint conditions that do not meet in step S225 to the greedy strategy in step S224, and then execute step S228;
[0029] S228. Judge whether the current number of arrangements i is less than the number of times n to be arranged in; if so, return to execute step S223; if not, execute step S3.
[0030] Furthermore, perform basic settings for the genetic algorithm on the TT flow set, and the specific process includes:
[0031] Set the population and individuals; randomly sort the TT flows to be scheduled according to their serial numbers, and generate a flow sorting vector as a chromosome of an individual; number each routing set of each TT flow, and select a number from the corresponding routing set as the route of the corresponding flow, and combine the selected numbers in each routing set in order to form a routing selection vector as another chromosome of the individual; according to the coding structure in step S21, insert slack genes into each individual correspondingly.
[0032] Furthermore, the specific process of iterating the population includes:
[0033] S41. Set the population size and the maximum number of iterations, encode each individual, and then randomly generate an initial population. For the flow sorting and routing selection of each individual in the initial population, use random numbers given by the random number algorithm;
[0034] S42. Decode each individual in the initial population and convert it into the form of [TT flow transmission delay, AVB flow transmission delay]. After decoding, use the TT flow transmission delay and the AVB flow transmission delay as evaluation indicators for non-dominated sorting;
[0035] S43. Select high-quality individuals from the population, and select from the population sorted by non-dominated sorting in step S42. Give priority to selecting individuals with a lower sorting level. When the individuals to be selected are at the same sorting level, give priority to selecting individuals with a larger crowding distance;
[0036] S44. Use the selected high-quality individuals as offspring to perform crossover and mutation to generate new offspring, where the slack gene does not participate in crossover and mutation;
[0037] S45. Merge the newly generated offspring with the original parent generation to generate a new population;
[0038] S46. Decode the new population in the same way as in step S42 and perform non-dominated sorting;
[0039] S47. Calculate the crowding degree of individuals in the new population. Define the crowding distance as the perimeter of the quadrilateral formed by the adjacent solutions i - 1 and i + 1 of the corresponding individual. When the crowding distance of a solution is larger, this solution will be preferentially selected when selecting solutions at the same level;
[0040] S48. According to the population number set in step S41, select individuals from the new population sorted by non-dominated sorting to form a new parent generation, and continue to perform iteration according to step S44 until the set maximum number of iterations is reached, obtaining a set of Pareto optimal solutions. At this time, both the TT flow delay and the AVB flow delay are optimal.
[0041] Furthermore, in the process of generating new offspring by crossover and mutation, the specific process of crossover includes:
[0042] First, according to the set crossover probability, determine whether the corresponding individual needs to perform crossover;
[0043] If crossover is required, in order to prevent anomalies, cross two segments of chromosomes in the individual respectively;
[0044] For the crossover method of the flow sorting chromosome, it is order crossover OX, that is, randomly select the start and end positions of genes in a pair of parent chromosomes, copy the gene segment of one parent chromosome to one offspring, and then fill in the genes missing in this offspring in order on the other parent chromosome. The same applies to the other offspring;
[0045] For the routing selection chromosome, use the uniform crossover method. Traverse the two chromosomes at the same time, and swap the i-th gene of the chromosomes according to the crossover probability, ensuring that the flows that undergo crossover must be the same and have the same routing set.
[0046] Furthermore, in the process of generating new offspring by crossover and mutation, the specific process of mutation includes:
[0047] First, according to the set mutation probability, it is determined whether the corresponding individual needs to mutate;
[0048] If mutation is required, the two chromosomes are mutated separately;
[0049] For the flow sorting chromosome, swap mutation is adopted, and two genes of the chromosome are randomly selected according to the mutation probability for exchange;
[0050] For the routing selection chromosome, site mutation is adopted, and multiple genes are randomly selected in the chromosome, and the corresponding gene values are changed within the set range according to the mutation probability.
[0051] Compared with the prior art, the technical solution of the present invention has the following beneficial effects:
[0052] By adopting the coding method of joint routing, the flow and routing are jointly encoded, which increases the schedulability of the flow, expands the optimization scheduling solution space, and avoids the situation of large multi-link load and unsatisfactory scheduling efficiency existing in fixed routing scheduling; in the scheduling solution, a heuristic genetic algorithm is adopted, and the solution speed is significantly better than that of the solver using the Z3 optimization model theory; in the process of population iteration, the TT flow transmission delay and the AVB flow transmission delay are non-dominated sorted, and the two objectives are jointly optimized. Finally, a set of Pareto optimal solutions are obtained. Compared with the weighted multi-objective optimization of the prior art, more solutions are obtained. Compared with the problem of single-objective method in the prior art with a single optimization dimension and unable to achieve optimal scheduling, the obtained solutions are more comprehensive and have stronger applicability to the existing network. Brief Description of the Drawings
[0053] Figure 1 It is a schematic flow chart of a multi-objective optimization scheduling method for hybrid transmission in a time-sensitive network of the present invention;
[0054] Figure 2 It is a schematic system framework diagram of a time-sensitive network control architecture;
[0055] Figure 3 It is a network topology model diagram processed by a time-sensitive network control architecture;
[0056] Figure 4 It is a schematic structural diagram for encoding a flow;
[0057] Figure 5 For Figure 4 It is a schematic flow chart for decoding the encoding structure in;
[0058] Figure 6 It is a schematic flow chart of the population iteration process. Detailed Embodiment
[0059] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention will be further described in detail below with reference to the accompanying drawings and their embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0060] Embodiment
[0061] The multi-objective optimization scheduling method for hybrid transmission in the time-sensitive network of this embodiment is implemented based on the time-sensitive network control architecture (TSSDN).
[0062] Combined with Figure 2 As shown, the time-sensitive network control architecture consists of a TSN controller, terminals, and TSN switches. The TSN controller includes a network resource management module and a scheduling engine. The network resource management module is used for the management of the hardware resources and topology of the entire network. The scheduling engine is connected to the network resource management module and is used to obtain the flow information and routing information of the network from the network resource management module, and then perform flow scheduling for the entire network, generate and issue a gating list. The terminals are connected to the network resource management module and are used to generate service requirements and report them to the network resource management module. The TSN switches are respectively connected to the network resource management module and the scheduling engine, and are used to report the network hardware resources and topology to the network resource management module, and receive the gating list routing information and flow scheduling information issued from the scheduling engine. It can be seen that the TSN controller can be used to execute the flow scheduling task.
[0063] The specific working process of the time-sensitive network control architecture is as follows: The terminals upload the end-to-end service requirements, that is, the delay, jitter requirements of the traffic packets, the period of the flow itself, the packet size, etc. to the TSN controller; the network resource management module obtains the overall topology of the current network and the bandwidth resources of the hardware in the network through the southbound protocol interface; the network resource management module performs resource management, topology management, and network element management, and calculates and generates the global routing set of the service flow; the generated set of flows to be scheduled and the global routing set of the service flow are transmitted to the scheduling engine for preparation of calculation; the scheduling engine performs scheduling calculations on both time-sensitive flows and non-time-sensitive flows according to the input set of flows, the global routing set, and its specific service requirements; after the calculation is completed, the flow scheduling result is obtained, the gating list is generated, and then the time slot graph of the flow is obtained; the gating list generated by the TSN controller is issued to the TSN switches through the southbound protocol interface to complete the actual flow scheduling configuration of the network.
[0064] Combined with Figure 3As shown, the network resource management module in the TSN controller mainly performs the following processing: modeling the collected network topology and flow information into an undirected graph G, where the vertices represent the devices (terminal systems ES, network switches SW) in the network; in this embodiment, the preferred network topology has three end systems ES1, ES2, ES3 and two switches SW1, SW2; the route r k (k represents the k-th route) is an aperiodic ordered data link sequence that connects a sending end system to one or more receiving end systems through switches; Figure 3 There are two routes represented by dashed lines with arrows: r1 = {ES1, SW1, ES3}, r2 = {ES2, SW2, ES3}; for the network of this embodiment or other embodiments, the set of all routes can be denoted as R, and the set of flows under the time-sensitive network control architecture is denoted as F = F tt ∪F avb ∪F be , F tt is a TT flow, F avb is an AVB flow, F be is a BE flow, and the attributes associated with each flow F i (i is a TT flow or an AVB flow or a BE flow) are (v s , v t , T, D, P, type), where v s represents the sending end system, v t represents the receiving end system, the flow is periodic with a period of T, and there is a relative deadline D, P represents the payload or data volume size of each flow F i , and type represents the flow type. Generally, when type is a BE flow, the period T is 0.
[0065] Combined Figures 1 to 6 As shown, the multi-objective optimization scheduling method for hybrid transmission in the time-sensitive network of this embodiment specifically runs on the TSN controller of the time-sensitive network control architecture, and uses the aforementioned flow set F and route set R as inputs, including the following steps:
[0066] S1. The TSN controller obtains the topology information of the entire network and the information of all traffic in the network, and generates all flow sets and route sets; the specific process includes:
[0067] S11. Upload the service requirements uploaded by the terminal, that is, the delay, jitter requirements, the period of the flow itself, and the packet size of the traffic packet, to the network resource management module of the TSN controller;
[0068] S12. The network resource management module obtains the current overall topology connection situation of the network, the bandwidth resources in the network, and the traffic transmission parameters from the TSN switch;
[0069] S13. According to the inputs of steps S11 and S12, the network resource management module performs resource management, topology management, and network element management, thereby classifying service flows into TT flows, AVB flows, and BE flows, and then calculating and generating the global routing set and flow set for each TT flow;
[0070] S14. The network resource management module transmits the generated set of TT flows to be scheduled, the set of AVB flows, and the global routing set of TT flows to the scheduling engine, and then proceeds to the next step;
[0071] S2. According to the operation rules of the genetic algorithm, perform encoding and decoding design for the routing sets of all current TT flows; in the genetic algorithm, each individual represents the result of a flow scheduling, and the attributes of each individual include the total transmission delay of TT flows and the total transmission delay of AVB flows, and the Pareto optimal solution of the total transmission time of TT flows and the total transmission delay of AVB flows is used as the objective of the multi-objective optimal scheduling of the time-sensitive network. The specific process includes:
[0072] S21. Set the encoding structure of each TT flow set as [flow sorting vector, routing selection vector, slack gene];
[0073] Among them, the slack gene represents the reserved time slot for a set of TT flows. This reserved time slot is used to set a certain time interval for transmitting non-time-sensitive AVB flows and BE flows after each time-sensitive TT flow is transmitted, avoiding the phenomenon of continuous transmission of TT flows that may occur because the priority of TT flows in the network is the highest and no time slot is reserved, and the problem of high delay of other flows caused by the need to wait until all TT flows are transmitted before other flows can be transmitted;
[0074] The flow sorting vector represents the serial number of the TT flow sorting; the routing selection vector represents the route corresponding to the scheduling of the TT flow;
[0075] Combined with Figure 4 A preferred encoding result of a certain TT flow shown in this embodiment; Figure 4 The leftmost side in is the flow sorting vector, the middle is the routing selection vector, and the rightmost side is the slack gene; Figure 4 The scheduling order in is Flow 2, Flow 4, Flow 5, Flow 3, Flow 1. For the entire network topology, each TT flow has at least one route, so each TT flow has its own routing set. The TT routing selection vector numbers each TT flow's respective routing set, and selects a number from the corresponding routing set as the route of this TT flow. The numbers selected from each routing set are combined into a vector according to the flow sorting as a chromosome. For example, for TT Flow 1, there are Routes 1, 2, 3, and 4 available in the entire network, Figure 4It indicates that its scheduling is route 2. For TT flow 3, there are two optional routes, route 1 and route 2, in the entire network, and then it is scheduled to route 1 correspondingly;
[0076] S22. Combine Figure 5 As shown, design the decoding method for the encoding structure in step S21 to convert the individual with the encoding structure of [flow sorting vector, routing selection vector, slack gene] into the form of [TT flow transmission delay, AVB flow transmission delay]; the decoding process is actually the process of scheduling and arranging the flows. The flows can be arranged one by one by traversing the flow sorting encoding. For example, for a TT flow with a flow sorting vector of [2, 4, 5, 3, 1], first arrange flow 2, then flow 4, until flow 1 is arranged to complete the scheduling of the TT flow. After all TT flows are arranged, insert the AVB flows into the positions where no TT flows are arranged in turn, and calculate the arrival times of the last frames of the TT flows and AVB flows respectively to obtain the total transmission delays of the TT flows and AVB flows. The specific process includes:
[0077] S221. Calculate the number of times n that the TT flow needs to be arranged in the supercycle. The formula for the supercycle hyper_period is as follows:
[0078] hyper_period = lcm(F0.T, F1.T, …, F n .T)
[0079] lcm() is the least common multiple function, that is, to find the least common multiple of the periods of all flows in the flow set. The number of times n that the current flow i needs to be repeated = hyper_period / F i .T, that is, the supercycle divided by the period of flow i is the number of times n to be repeated. For example, in the entire flow set, there are two types of flows with periods of 200 and 300 respectively, then the corresponding supercycle is 600, and the TT flow with a period of 200 needs to be arranged 3 times in the supercycle, n = 3;
[0080] S222. After obtaining the number of times n to be arranged, start scheduling from the first period. i represents the period, and initialize i = 0 to represent that the first period is being scheduled;
[0081] S223. Judge whether i is greater than 0; if not, it means that the current first period needs to be scheduled, and then execute step S224; if so, it means that the first period has been scheduled, and the current next period needs to be scheduled, and then execute step S225;
[0082] S224. Find the corresponding routing set according to the sequence number of the TT flow set, traverse the routing set, and under the premise of meeting the corresponding scheduling constraint conditions of the TSN controller, adopt a greedy strategy in the first cycle, try to insert the TT flow set with the current sequence number into the position with the earliest possible start time, and add a slack gene to the end of the individual after each hop in the route is scheduled. That is, the starting point of the TT flow of the next hop should be at least after the reserved time slot represented by this slack gene until the entire current cycle of this TT flow set is scheduled, and then execute step S226;
[0083] Among them, the scheduling constraint conditions include:
[0084] (1) Frame constraint: It is required that the transmission start time of any TT frame (a TT flow set is set as a TT frame) is non - negative and must be guaranteed to be transmitted within its cycle;
[0085] (2) Link constraint: There should be no temporal overlap when any two TT frames are transmitted on the link;
[0086] (3) Flow transmission constraint: Any TT frame should be transmitted orderly along its route;
[0087] (4) End - to - end constraint: The time when the last frame of any flow is transmitted minus the time when the first frame of this flow is transmitted cannot exceed its deadline;
[0088] (5) Frame isolation constraint: Only one flow's frame can be stored in a queue at the same time, otherwise frame interleaving may occur. If two frames go through different queues, frame isolation does not need to be considered;
[0089] Furthermore, the greedy strategy means that when arranging each TT frame, greedily place it as far forward as possible. For example, after judging through the scheduling constraint conditions, if the available placement area for this TT frame is [0, 200], then we will set its start time to 0, that is, as fast as possible;
[0090] S225. Based on the TT flow set scheduled in the first cycle and the length of each cycle, determine the arrangement of the TT flow set in the current cycle, and check one by one whether it meets the corresponding scheduling constraint conditions of the TSN controller; if so, execute step S226; if not, execute step S407;
[0091] S226. After the first cycle or the i - th cycle is arranged, then increment the current cycle i by 1 to enter the next cycle, and then execute step S228;
[0092] S227. Reset i = 0, add the scheduling constraint conditions that do not meet in step S225 to the greedy strategy in step S224, and then execute step S228;
[0093] S228. Determine whether the current arrangement count i is less than the required arrangement count n in ; if so, return to execute step S223; if not, execute step S3.
[0094] S3. After completing the encoding and decoding design for the routing sets of all current TT streams in step S2, the scheduling engine determines the basic settings of the genetic algorithm for the TT stream set; the specific process includes:
[0095] Set the population and individuals; randomly sort the TT streams to be scheduled according to the stream numbers to generate a stream sorting vector as one chromosome of an individual; number each routing set of each TT stream respectively, and select one number from the corresponding routing set as the routing of this stream, and combine the selected numbers in each routing set in the stream order to form a routing selection vector as another chromosome of the individual; according to the encoding structure in step S21, insert slack genes into each individual, the lower bound of the slack gene is 0, and at the same time ensure that after inserting the corresponding slack gene into the individual, the scheduling on the routing will not exceed the period T.
[0096] S4. Combine Figure 5 、 Figure 6 As shown, in the scheduling engine, the genetic algorithm is used to iterate the population, and non - dominated sorting and crowding degree calculation are performed with the minimum TT stream delay and the minimum AVB stream delay as the optimization objectives, and then the sorted individuals are selected to form a new parent generation, and the iteration is repeated to obtain a set of Pareto optimal solutions. The specific process includes:
[0097] S41. Set the population number and the maximum number of iterations; randomly generate an initial population and encode it according to step S21; for the stream sorting and routing selection of each individual in the initial population, random numbers given by the random number algorithm are used respectively. In this embodiment, the slack gene is preferably set to 0; in other embodiments, if the network scale is large, the slack gene can be set to the length of the largest TT stream set to speed up the solution.
[0098] S42. Decode each individual in the initial population according to step S22 and convert it into the form of [TT stream transmission delay, AVB stream transmission delay]. After the decoding is completed, non - dominated sorting is performed with the TT stream transmission delay and the AVB stream transmission delay as the evaluation indicators.
[0099] The content of non - dominated sorting is as follows: For an entire population, first select the current Pareto - optimal solutions, denoted as domination level 1. After excluding the solutions in domination level 1, then select another Pareto - optimal solution from the remaining population, denoted as domination level 2, and so on until the entire population is sorted. In each domination level, each solution does not dominate any other solution in the current level, and the solutions with a relatively earlier (smaller number) domination level dominate the solutions with a relatively later (larger number) domination level. That is, the smaller the TT - flow delay and AVB - flow delay, the smaller the level. The smallest level 1 is the non - dominated individuals of the entire population.
[0100] S43. Select high - quality individuals from the population; Select from the population sorted by non - dominated sorting in step S42. The individuals with a lower sorting level represent lower TT - flow transmission delay and AVB - flow transmission delay of the individuals. Therefore, preferentially select individuals with a lower sorting level. When the individuals to be selected are at the same sorting level, preferentially select individuals with a larger crowding distance to ensure the diversity of the population.
[0101] S44. After completing the selection in step S43, use the selected high - quality individuals as offspring for crossover and mutation to generate new offspring. Among them, the slack gene does not participate in crossover and mutation. The specific process includes:
[0102] S441. Crossover: First, according to the set crossover probability, determine whether the corresponding individual needs to perform crossover. If crossover is required, to prevent abnormalities, the two segments of chromosomes in the individual are respectively crossed. For the flow - sorting chromosome, the preferred crossover method in this embodiment is order crossover OX, that is, randomly select the start and end positions of the genes in a pair of parental chromosomes, copy the gene segment of one parental chromosome p1 to an offspring c1, and then fill in the genes missing in c1 in order on the other parent p2. The other offspring c2 is the same. For the routing - selection chromosome, the preferred method in this embodiment is uniform crossover: Traverse the two chromosomes simultaneously, and swap the i - th gene of the chromosome according to the crossover probability, ensuring that the streams involved in the crossover are the same and have the same routing set, and the swap will not cause abnormalities.
[0103] S442. Mutation: First, according to the set mutation probability, determine whether the corresponding individual needs to perform mutation. If mutation is required, the two segments of chromosomes are respectively mutated. For the flow - sorting chromosome, swap mutation is adopted: Randomly select two genes of the chromosome according to the mutation probability for exchange, that is, change the sending order of two streams. For the routing - selection chromosome, site mutation is adopted: Randomly select multiple genes in the chromosome, and change the corresponding gene values within the set range according to the mutation probability, that is, there is a certain probability that the routing of a certain stream will jump.
[0104] S45. Combine the newly generated offspring with the original parents to generate a new population;
[0105] S46. Decode the new population and perform non-dominated sorting in the same way as in step S42;
[0106] S47. Calculate the crowding degree of individuals in the new population; define the crowding distance as the perimeter of the quadrilateral formed by the adjacent solutions i - 1 and i + 1 of the corresponding individual; for a solution, the larger its crowding distance, the sparser the area around this solution. When selecting solutions at the same level, this solution will be preferentially selected, which is beneficial to the diversity of the population;
[0107] Among them, when i represents the i-th individual at this time, i + 1 represents the nearest adjacent individual on the right side of individual i when calculating the crowding distance, and i - 1 represents the nearest adjacent individual on the left side;
[0108] S48. According to the population number set in step S41, select individuals from the non-dominated sorted new population to form a new set of parents, and continue to perform iteration according to step S44 until the set maximum iteration number is reached, to obtain a set of Pareto optimal solutions, that is, to obtain a set of high-quality individuals, and the TT flow delay and AVB flow delay of this set of high-quality individuals are both optimal;
[0109] S5. The scheduling engine selects the most suitable routing scheduling scheme for the current scenario according to the network topology, generates a gating list, and then sends it to the TSN switch to perform joint routing scheduling on the corresponding traffic.
[0110] Compared with the prior art, the beneficial effects of this embodiment are as follows:
[0111] Adopt the coding method of joint routing, encode the flow and routing together, increase the schedulability of the flow, expand the optimization scheduling solution space, and avoid the situation where the fixed routing scheduling has large multi-link loads for traffic and unsatisfactory scheduling efficiency; adopt the heuristic genetic algorithm in the scheduling solution, and the solution speed is significantly better than that of the solver using the Z3 optimization model theory; during the population iteration process, perform non-dominated sorting on the TT flow transmission delay and AVB flow transmission delay, jointly optimize the two objectives, and finally obtain a set of Pareto optimal solutions. Compared with the weighted multi-objective optimization of the prior art, more solutions are obtained. Compared with the problem of single-objective method of the prior art with a single optimization dimension and unable to achieve optimal scheduling, the obtained solutions are more comprehensive and have stronger applicability to the existing network.
[0112] The above embodiments are the preferred embodiments of the present invention, but the embodiments of the present invention are not limited to the above embodiments. Any other changes, modifications, substitutions, combinations, and simplifications made without departing from the spirit and principle of the present invention shall be equivalent replacement methods and shall be included in the protection scope of the present invention.
Claims
1. A multi-objective optimization scheduling method for hybrid transmission in a time-sensitive network, characterized in that The steps are as follows: S1. Obtain the topology information of the entire network and the information of all traffic in the network, generate all flow sets and routing sets, where the traffic includes time-sensitive TT flows, non-time-sensitive AVB flows, and non-time-sensitive BE flows; S2. Design the encoding and decoding of the routing set of TT flows according to the operation rules of the genetic algorithm; S3. Perform basic settings of the genetic algorithm on the TT flow set; S4. Use the genetic algorithm to iterate the population, perform non-dominated sorting and crowding degree calculation with the minimum TT flow delay and the minimum AVB flow delay as the optimization objectives, and then select the individuals after sorting to form a new parent generation, and repeatedly iterate to obtain a set of Pareto optimal solutions; S5. Perform joint routing scheduling on the corresponding traffic according to the obtained set of Pareto optimal solutions; The specific process of designing the encoding and decoding of the routing set of TT flows includes: S21. Set the encoding structure of each TT flow set as [flow sorting vector, routing selection vector, slack gene] as an individual; Among them, the slack gene represents the reserved time slot of a TT flow set, the flow sorting vector represents the serial number of the TT flow sorting, and the routing selection vector represents the route corresponding to the TT flow; S22. Decode the encoding structure in step S21. First, arrange the TT flows through scheduling for the individual with the encoding structure of [flow sorting vector, routing selection vector, slack gene], and then insert the AVB flows into the positions where no TT flows are arranged in turn, and convert it into the form of [TT flow transmission delay, AVB flow transmission delay].
2. The multi-objective optimization scheduling method for hybrid transmission in a time-sensitive network according to claim 1, wherein The specific process of performing decoding includes: S221. Calculate the number of times n that the TT flow needs to be arranged under the hyper_period; S222. After obtaining the number of times n that needs to be arranged, start scheduling from the first cycle. i represents the cycle, and initialize i = 0 to represent that the first cycle is being scheduled; S223. Judge whether i is greater than 0; if not, it means that the first cycle needs to be scheduled currently, and then execute step S224; if so, it means that the first cycle has been scheduled, and the next cycle needs to be scheduled currently, and then execute step S225; S224. Find the corresponding routing set according to the serial number of the TT flow set, traverse the routing set, and under the premise of satisfying the scheduling constraint conditions, adopt a greedy strategy in the first cycle to try to insert the TT flow set of the current serial number into the position with the possible minimum start time. After arranging each hop in the route, add a section of slack gene to the individual until the current cycle of this TT flow set is completely arranged, and then execute step S226; S225. Based on the TT flow sets arranged in the first cycle and the length of each cycle, determine the arrangement of the TT flow sets in the current cycle, and check one by one whether it meets the scheduling constraint conditions; if so, execute step S226; if not, execute step S407; S226. After the first cycle or the i-th cycle is arranged, then increment the current cycle i by 1 to enter the next cycle, and then execute step S228; S227. Reset i = 0, add the scheduling constraint conditions that do not meet in step S225 to the greedy strategy in step S224, and then execute step S228; S228. Judge whether the current arrangement times i is less than the number of times n to be arranged in; if so, return to execute step S223; if not, execute step S3.
3. The multi-objective optimization scheduling method for hybrid transmission in a time-sensitive network according to claim 2, wherein The scheduling engine performs basic settings for the genetic algorithm on the TT flow set. The specific process includes: Set the population and individuals; randomly sort the TT flows to be scheduled according to their serial numbers to generate a flow sorting vector as a chromosome of an individual; number each routing set of each TT flow, and select a number from the corresponding routing set as the routing of the corresponding flow, and combine the selected numbers in each routing set in order to form a routing selection vector as another chromosome of the individual; according to the coding structure in step S21, insert slack genes into each individual.
4. The multi-objective optimization scheduling method for hybrid transmission in the time-sensitive network according to claim 3, wherein The specific process of iterating the population includes: S41. Set the population size and the maximum number of iterations, encode each individual, and then randomly generate an initial population. The flow sorting and routing selection of each individual in the initial population are given by random numbers using the random number algorithm; S42. Decode each individual in the initial population and convert it into the form of [TT flow transmission delay, AVB flow transmission delay]. After decoding, use the TT flow transmission delay and AVB flow transmission delay as evaluation indicators for non-dominated sorting; S43. Select high-quality individuals from the population, select the population after non-dominated sorting in step S42, and give priority to selecting individuals with a lower sorting level. When the individuals to be selected are at the same sorting level, give priority to selecting individuals with a larger crowding distance; S44. Use the selected high-quality individuals as offspring to perform crossover and mutation to generate new offspring, where the slack gene does not participate in crossover and mutation; S45. Combine the generated new offspring with the original parent generation to generate a new population; S46. Decode the new population in the same way as in step S42 and perform non-dominated sorting; S47. Calculate the crowding degree of the individuals in the new population. Define the crowding distance as the perimeter of the quadrilateral formed by the adjacent solutions i - 1 and i + 1 of the corresponding individual. When the crowding distance of a solution is larger, this solution will be preferentially selected when selecting solutions at the same level; S48. Select individuals from the new population after non-dominated sorting to form a new parent generation according to the population size set in step S41, and continue to iterate according to step S44 until the set maximum number of iterations is reached to obtain a set of Pareto optimal solutions. At this time, both the TT flow delay and the AVB flow delay are optimal.
5. The multi-objective optimization scheduling method for hybrid transmission in a time-sensitive network according to claim 4, wherein In the process of generating new offspring by crossover and mutation, the specific process of crossover includes: First, according to the set crossover probability, judge whether the corresponding individual needs to perform crossover; If crossover is required, in order to prevent anomalies, cross the two segments of chromosomes in the individual separately; For the flow-sorted chromosomes, the crossover method is order crossover (OX), that is, randomly select the start and end positions of genes in a pair of parental chromosomes, copy the gene segment of one parental chromosome to a child, and then sequentially fill in the genes missing in this child from the other parental chromosome. The same applies to the other child; For the routing-selection chromosomes, the uniform crossover method is adopted. Traverse the two chromosomes simultaneously, and swap the i-th genes of the chromosomes according to the crossover probability, ensuring that the genes undergoing crossover must be of the same flow and have the same routing set.
6. The multi-objective optimization scheduling method for hybrid transmission in a time-sensitive network according to claim 5, wherein In the new children generated by the above crossover and mutation, the specific process of mutation includes: First, according to the set mutation probability, determine whether the corresponding individual needs to mutate; If mutation is required, the two segments of the chromosome mutate separately; For the flow-sorted chromosomes, swap mutation is adopted, and two genes of the chromosome are randomly selected for exchange according to the mutation probability; For the routing-selection chromosomes, site mutation is adopted, and multiple genes are randomly selected in the chromosome, and the corresponding gene values are changed within the set range according to the mutation probability.