Heuristic scheduling method for TT flow in TSN and computer device
By adopting a heuristic scheduling method in a time-sensitive network, scheduling is determined one by one from the target link, local optimal solution problem is solved, link resource optimization allocation and global consistent scheduling are realized, and scheduling efficiency and flexibility are improved.
Patent Information
- Application Number
- CN202510628582.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-15
- Publication Date
- 2025-07-29
AI Technical Summary
The existing time-sensitive network scheduling algorithms are prone to local optimal solutions when solving TT traffic, resulting in high computational complexity, long scheduling time and difficult to adapt to dynamic network reconfiguration.
Using a heuristic scheduling method, the scheduling is determined one by one from the target link. By determining the specific transmission scheduling for each frame in each link, and setting the time slot and offset in the hypercycle, it ensures that all frame instances meet the constraints and avoid local optimal solutions.
It realizes the optimized allocation of link resources and global consistent scheduling, improves scheduling efficiency and flexibility, and is suitable for complex and dynamically changing communication network scenarios.
Smart Images

Figure CN120389990A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of time-sensitive networks, and particularly relates to a heuristic scheduling method for TT flows in TSN and a computer device. Background Art
[0002] Building a new power system with new energy as the main body requires realizing the coordinated interaction of sources, grids, loads, and storages, which puts forward higher requirements for the research of power deterministic network technologies that ensure the deterministic bandwidth, delay, jitter, packet loss rate, etc. of important services. However, existing networks cannot provide unified deterministic communication services for different scenarios. For example, traditional Ethernet has long-tail delays, and various industrial field buses are incompatible with each other, which restricts the further development of the real-time domain. In this context, IEEE has proposed Time Sensitive Network (TSN), which is a promising emerging communication technology working at the data link layer and can ensure deterministic communication by implementing a series of standards.
[0003] In the TSN (Time Sensitive Network) protocol stack, IEEE 802.1Qbv stipulates the scheduling of time-triggered flows (Time Triggered, TT) and other traffic by the Time Aware Shaper (TAS). Each egress port of the switch supports up to 8 transmission queues at most, and uses a Gate Control List (GCL) to periodically open and close the gates to control the accurate transmission time of each queue's traffic. TT traffic is a type of hard real-time traffic that needs to be transmitted with deterministic low latency and jitter and is scheduled in the form of a flow. The core reason why TSN can achieve deterministic communication is that it can achieve deterministic scheduling of TT traffic. Therefore, the scheduling of TT traffic is a key issue faced by TSN.
[0004] Existing time-sensitive network scheduling solutions usually rely on integer linear programming or constraint programming. These methods define the entire solution space by constraint conditions and then obtain the theoretical optimal solution by traversing the solution space. Although they can provide deterministic scheduling plans, they have low scalability. As the network scale increases, the efficiency of their solution will drop sharply. Moreover, there are problems such as high computational complexity, long scheduling time, and difficulty in adapting to dynamic network reconfiguration.
[0005] The heuristic scheduling algorithm for time-triggered traffic can quickly obtain an approximate optimal solution through iterative optimization and local search, with simple calculations and a short scheduling period. However, existing heuristic scheduling algorithms for time-triggered flows usually start scheduling from the meta-link, which will lead to the problem of local optimal solutions. Summary of the Invention
[0006] The object of the present invention is to provide a heuristic scheduling method for TT flows in TSN and a computer device, so as to solve the technical problem of local optimal solutions occurring in the prior art.
[0007] To solve the above technical problem, the technical solution of a heuristic scheduling method for TT flows in TSN provided by the present invention is: A heuristic scheduling method for TT flows in TSN, the method includes:
[0008] S1. Assign each directed link in the TSN to different phases; each directed link is arranged in the order from the target link to the source link;
[0009] The condition for the l-th directed link to be assigned to the Φ-th phase is that the previous links of all frames passing through the l-th directed link have been assigned to the phases before the Φ-th phase;
[0010] S2. Execute the following parts in each phase in turn from the first phase to the last phase: within the supercycle of this phase, set time slots and offsets for all frame instances of this phase, and adjust the offset and / or queue so that the offsets of all frame instances meet the pre-set constraint conditions;
[0011] The supercycle is the least common multiple of all frame periods of this phase;
[0012] S3. Judge whether the scheduling scheme obtained in S2 is feasible, and output and execute the feasible scheduling.
[0013] The beneficial effects of the above technical solution are: The technical solution of a heuristic scheduling method for TT flows in TSN of the present invention belongs to an improved invention creation. The present invention starts from the target link, determines the scheduling link by link one by one, and then determines the specific transmission scheduling for each frame within each link. This not only optimizes the allocation of link resources preferentially, but also ensures the global consistency of link scheduling, thus avoiding the problem of local optimal solutions. The present invention solves the technical problem of local optimal solutions occurring in the prior art.
[0014] Further, the assignment of each directed link in the TSN to different phases includes:
[0015] Start the assignment from the first phase until all directed links are assigned;
[0016] When performing the assignment in any phase, traverse the first frame instance and the second frame instance among all frame instances. If the previous directed links of the first frame instance and the second frame instance have both been assigned, and there is no directed link such that the links of the first frame instance and the second frame instance are the same, then assign the unique directed link to the current phase.
[0017] Further, the constraint conditions include a conflict constraint for ensuring no conflict with the frame instances arranged in the previous stage and an order constraint for ensuring compliance with the order requirements for transmission in the switch.
[0018] Further, adjusting the offset and / or queue so that the offsets of all frame instances meet the preset constraint conditions includes:
[0019] If the offset of a frame instance does not meet the conflict constraint, adjust the offset of this frame instance until it meets the conflict constraint;
[0020] After all frame instances meet the conflict constraint, if the offset of a frame instance does not meet the order constraint, adjust the offset and / or queue of this frame instance.
[0021] Further, setting time slots for all frame instances in this stage in S2 includes: setting time slots for frame instances in ascending order of frame utilization rate;
[0022] The frame utilization rate is obtained according to the following formula:
[0023]
[0024] where f.u is the frame utilization rate; f.w is the frame length; f.d is the deadline of the frame; f.n is the number of links in the route.
[0025] Further, setting offsets for all frame instances in this stage in S2 includes:
[0026] For the first stage, set the offset to the value obtained by subtracting the frame length from the deadline of the frame;
[0027] For the Φ-th stage, set the offset to the value obtained by subtracting the frame length from the minimum value between the deadline of the frame and the release time of this frame in the (Φ - 1)-th stage, where Φ > 1.
[0028] Further, when a frame instance meets the following conditions, it is considered that this frame instance does not meet the conflict constraint:
[0029] The start time of this frame instance is earlier than the end time of the frame instance in the previous stage, and the end time of this frame instance is later than the start time of the frame instance in the previous stage.
[0030] Further, when a frame instance meets the first condition or the second condition, it is considered that this frame instance does not meet the order constraint;
[0031] The first condition is: the arrival time of this frame instance is earlier than the arrival time of the shared frame instance, and the transmission time of this frame instance is later than the transmission time of the shared frame instance;
[0032] The second condition is that the arrival time of this frame instance is later than that of the shared frame instance, and the transmission time of this frame instance is earlier than that of the shared frame instance;
[0033] The shared frame instance is the frame instance that shares a link with this frame instance in the previous link.
[0034] Further, the process of adjusting the offset of this frame instance until the conflict constraint is satisfied includes: subtracting 1 from the offset of this frame instance, and then re-determining whether the conflict constraint is satisfied until the conflict constraint is satisfied.
[0035] Further, the process of adjusting the offset of this frame instance and / or the queue includes: if this frame instance satisfies the first condition, the queue of this frame instance is incremented by 1; then, if the queue of this frame instance exceeds the maximum queue, the offset of this frame instance is decremented by 1;
[0036] The first condition is that the arrival time of this frame instance is later than that of the shared frame instance, and the transmission time of this frame instance is earlier than that of the shared frame instance; the shared frame instance is the frame instance that shares a link with this frame instance in the previous link.
[0037] Further, the process of adjusting the offset of this frame instance and / or the queue includes: if this frame instance satisfies the second condition and the queue of this frame instance is not the maximum queue, the queue of this frame instance is incremented by 1;
[0038] The second condition is that the arrival time of this frame instance is earlier than that of the shared frame instance, and the transmission time of this frame instance is later than that of the shared frame instance; the shared frame instance is the frame instance that shares a link with this frame instance in the previous link.
[0039] Further, if the offsets of the frame instances that satisfy the constraint conditions obtained in S2 are all non-negative, the time slots and offsets of all the frame instances obtained in S2 are a feasible schedule.
[0040] The present invention also provides a technical solution for a computer device: a computer device, including a processor, characterized in that the processor is used to execute a computer program to implement the steps of the heuristic scheduling method for TT flows in TSN as described above. Description of the Drawings
[0041] Figure 1 It is a flowchart for generating a frame scheduling scheme in the embodiment of the heuristic scheduling method for TT flows in TSN of the present invention. Detailed Embodiment
[0042] Starting from the target link, the present invention determines the scheduling for each link one by one, and then determines the specific transmission scheduling for each frame within each link. This not only optimizes the allocation of link resources preferentially, but also ensures the global consistency of link scheduling, thus avoiding the problem of local optimal solutions. The present invention solves the technical problem of local optimal solutions in the prior art.
[0043] Implementation manner of the heuristic scheduling method for TT flows in TSN:
[0044] A heuristic scheduling method for TT flows in TSN, the method comprising:
[0045] S1. Allocate each directed link in TSN to different phases; the directed links are arranged in the order from the target link to the source link; the condition for the l-th directed link to be allocated to the Φ-th phase is that the previous links of all frames passing through the l-th directed link have been allocated to the phases before the Φ-th phase.
[0046] Formalize the time-sensitive network traffic scheduling problem, abstract the TSN network topology as a network directed graph, and establish a network model. Allocate the links in the network to different scheduling phases. The links in each phase can be processed in parallel to achieve parallel scheduling. Ensure that when each link is allocated to a specific phase, all frames on it can be scheduled by the scheduling policy of this phase.
[0047] Model of the TSN network in this embodiment: For a given time-sensitive network topology, abstractly represent it as G(V, L), where V is the set of nodes in the network, including the set of terminal devices ES and the set of TSN switches SW, that is, V = ES ∪ SW; L is the link between nodes, and the transmission links in the network are full-duplex links, that is, there are two independent directed links between every two nodes, and each link l ∈ L is unidirectional. The algorithm in this embodiment is different from other heuristic algorithms for frame-by-frame scheduling. We start from the target link, determine the scheduling for each link one by one, and then determine the specific transmission scheduling for each frame within each link. This not only optimizes the allocation of link resources preferentially, but also ensures the global consistency of link scheduling, thus avoiding the problem of local optimal solutions. In addition, this link-by-link scheduling method can better adapt to the characteristics of different links, improve the overall scheduling efficiency of the system, and has better flexibility and scalability, especially suitable for complex and dynamically changing scheduling scenarios. Therefore, there is also an important set F in the communication network model TT Used to represent a set of TT frames. Some parameters of this embodiment are shown in Table 1 below
[0048] Explanation of some parameters in Table 1
[0049]
[0050] For each TT frame f ∈ F TT , it consists of seven elements: its period f.t, the length of the frame or the window size f.w required to transmit the frame, the deadline f.d, the queue f.q of the frame at all the output ports of the entire route, the frame utilization f.u, the number of links f.n in the route, and the set f.S containing the route and the scheduling information of each link in the route. We describe it as a seven-tuple: f = (f.t, f.w, f.d, f.q, f.u, f.n, f.S).
[0051] Each schedule s ∈ f.S includes three parameters, i.e., s = (s.ζ, s.t, s.o), where s.ζ represents the link of the route allocated in the reverse order, i.e., s1.ζ is the destination link, and s f.n .ζ is the source link; s.t represents the number of instances of the frame in the link; s.o represents the offset at which each instance starts according to the period of the instance.
[0052] The link allocation part allocates the links in the network to different phases, and all the frames in all the links allocated to this phase are scheduled uniformly. The condition for a link to be allocated to a specific phase is that all the previous links of all the frames passing through this link have been allocated to the previous phases. It specifically includes the following steps:
[0053] S11. Initialize the phase identifier of all the directed links to NULL; NULL indicates that the directed link l has not been allocated; initialize the value of the phase counter Φ to 1.
[0054] Obtain the network topology information G(V, L), the basic information of all the TT flows in the current network including the set of all the links and the set of all the TT frames F TT , and set the phase identifier l.Φ of all the directed links l ∈ L to empty (i.e., NULL). l.Φ = NULL indicates that the directed link l has not been allocated. Initialize the value of the phase counter Φ to 1, that is, allocate the first phase first.
[0055] S12. Determine whether there is a directed link with the phase identifier being NULL; if there is no directed link with the phase identifier being NULL, it means that all the directed links have been allocated to a certain phase, and the link allocation is completed; otherwise, execute S13.
[0056] S13. For the directed link l, if the phase identifiers of all the previous links of the directed link l are not NULL, then allocate the directed link l to the phase corresponding to the current value of the phase counter Φ.
[0057] Traverse all the instances f i .s j and f k .s x , and their set f.S. Determine fi .s j-1 and f k .s x-1 The phase identifiers of both are not equal to NULL, and there is no link f i .s j .ζ is equal to f k .s x If.ζ, then assign the phase Φ to f i .s j .ζ. That is, check each link of each frame to see if all previous links (i.e., links closer to the destination) have been assigned to previous phases.
[0058] f i .s j represents the instance on link j of the i-th frame; f k .s x represents the instance on link x of the k-th frame; The above process represents the complete scheduling information that the algorithm needs to traverse and check. Determine the previous link position f i .s j-1 and f k .s x-1 Whether they have been scheduled (i.e., non-empty) is to ensure that the scheduling on the current node has a reliable prerequisite, that is, the positions on the previous links must be determined in advance before the current node can schedule reasonably. It describes the checking steps of a link scheduling algorithm for confirming whether the scheduling of two frames or tasks on a network node is unique, determined, and in a reasonable order.
[0059] If the above conditions are met, then assign the current link to the current phase, that is, set the phase identifier l.Φ of the link to the value of the current phase counter Φ.
[0060] S14. After increasing the value of the phase counter Φ by 1, execute S12. After the current phase is assigned, assign the next phase.
[0061] S2. Execute the following parts in each phase in turn from the first phase to the last phase: within the supercycle of this phase, set time slots and offsets for all frame instances of this phase, and adjust the offset and / or queue so that the offsets of all frame instances meet the pre-set constraint conditions; the supercycle is the least common multiple of all frame periods of this phase.
[0062] The frame scheduling scheme generation part assigns specific scheduling times to each frame while ensuring that no conflict and order conditions are violated. By adjusting the offsets and queue numbers of the frames, a scheduling scheme that meets all constraint conditions is found. As Figure 1 shown, the specific implementation steps are as follows:
[0063] (1) Initialize the queue f.u for all frames, that is, assign queue 1 to all frames.
[0064] Execute the following parts in each phase in sequence from the first phase to the last phase:
[0065] (2) In each phase, calculate the hyperperiod (HP) of all links, that is, calculate the least common multiple of all frame periods in this phase.
[0066] (3) For each instance of each frame on each link, set the number of instances f.s.t to the hyperperiod HP divided by the frame period f.t.
[0067] (4) In each phase, sort each frame in descending order according to the frame utilization rate; and for each frame instance, arrange time slots one by one in the hyperperiod from the last instance f.s x .t to the first instance according to the frame utilization rate from high to low (that is, the opening time of the corresponding queue of the switch). The frame utilization rate is obtained according to the following formula:
[0068]
[0069] (5) For each instance of each frame, initialize the offset f.s x .o i :
[0070] For the first phase, set it to the deadline of the frame minus the frame length, that is:
[0071] f.s x .o i = f.d - f.w
[0072] For non-first phases (i.e., the Φ-th phase, Φ > 1), set it to the minimum value of the deadline of the frame and the release time of this frame in the previous phase minus the frame length, that is:
[0073] f.s x .o i = min(f.s x-1 .o, f.d) - f.w
[0074] where f.s x-1 .o is the release time of this frame in the previous phase.
[0075] (6) Check whether the offset f.s x .o i set for the frame instance will cause a conflict with the previously arranged instance (conflict constraint), or whether it meets the requirements of the receive and transmit order in the switch (i.e., order constraint).
[0076] (7) If a conflict occurs (i.e., the following formula is satisfied), the frame will be moved backward (i.e., rolled back to the previous stage) until an idle space is found (i.e., an idle time slot in the corresponding queue of the switch), that is, the offset of the instance f.s x .o i is decreased by 1, and then it is rejudged whether the conflict constraint is satisfied until the conflict constraint is satisfied. Once an idle space is found, the receive and transmit orders in the switch are checked.
[0077]
[0078] f m .s j .o n +f m .t·(n - 1) ≤ f i .s j .o k +f i .w + f i .t·(k - 1)
[0079] and f m .s j .o n +f m .w + f m .t·(n - 1) ≤ f i .s j .o k +f i .t·(k - 1)
[0080] where f i is the i-th frame; j is the link; k is the k-th instance of the currently scheduled frame f i on link j; f m is the m-th frame; n is the n-th instance of the currently scheduled frame f m on link j.
[0081] The above formula is used to determine whether there is a time overlap between the instances of the i-th and m-th frames on link j (i.e., whether the conflict constraint is not satisfied); the inequality in the second line above means that: the start time of this frame instance (i.e., f m .s j .o n ) is less than or equal to the end time of the frame instance in the previous stage (i.e., f i .s j .o k ); the inequality in the third line means that: the end time of this frame instance is greater than or equal to the start time of the frame instance in the previous stage.
[0082] (8) If the order requirement Order1 (i.e., the first condition) is violated as shown in the following formula, the frame instance arrives at the switch later than another frame instance sharing the transmission link (i.e., the shared frame instance), and the frame instance is also sent later than the frame instance scheduled in the shared transmission link. Then the queue needs to be changed, that is, the queue f.q of the frame is incremented by 1, and it is checked whether the queue f.q exceeds the queue number Q (i.e., the maximum queue). If so, the offset f.s x .o i is decremented by 1 so that it moves backward in the scheduling so that it arrives earlier than the frame instance to avoid order conflicts.
[0083] Violation
[0084] f m .s j-1 .ζ = f i .s j-1 .ζ
[0085] And f m .s j .o n + f m .t·(n - 1) < f i .s j .o k + f i .t·(k - 1)
[0086] And f m .s j-1 .o n ′ + f m .t·(n′ - 1) > f i .s j-1 .o k ′ + f i .t·(k′ - 1)
[0087] Where n′ is the n′-th instance of the currently scheduled frame f m on link j - 1; k′ is the k′-th instance of the currently scheduled frame f i on link j - 1; o n′ is the offset of the instance n′ of the frame f m on link j - 1; o k′ is the offset of the instance k′ of the frame i on link j - 1.
[0088] The above formula is used to determine whether there is a sorting overlap (i.e., violation of the order requirement) for the instances of the i-th and m-th frames on link j. The equation in the second line of the formula indicates that frames m and i are on a shared link in the previous link; the inequality in the third line is used to indicate that the frame instance (i.e., f m .s j.o n ) has an arrival time less than that of the shared frame instance (i.e., f i .s j .o k ) (i.e., the arrival time of the instance on link j of the m-th frame is less than the arrival time of the instance on link j of the i-th frame); the inequality in the 4th line is used to indicate that the transmission time of this frame instance is greater than the transmission time of the shared frame instance (i.e., the transmission time of the instance on link j - 1 of the m-th frame is greater than the transmission time of the instance on link j - 1 of the i-th frame).
[0089] (9) If the order requirement Order2 (i.e., the second condition) is violated as shown in the following formula, if this frame arrives at the switch earlier than another frame on the shared transmission link and is transmitted earlier than the frame being scheduled on the shared transmission link, then only the queue can be changed, that is, increase the queue f.q of the frame by 1, and check whether the queue f.q exceeds the queue number Q (i.e., the maximum queue). If so, return an infeasible schedule, that is, the network configuration cannot be scheduled for the used sorting method.
[0090] Violation
[0091] f m .s j-1 .ζ = f i .s j-1 .ζ
[0092] and f m .s j .o n + f m .t·(n - 1) > f i .s j .o k + f i .t·(k - 1)
[0093] and f m .s j-1 .o n ′ + f m .t·(n′ - 1) < f i .s j-1 .o k ′ + f i .t·(k′ - 1)
[0094] The above formula is used to determine whether there is a sorting overlap (i.e., a violation of the order requirement) between the instances of the i-th and m-th frames on link j. The equation in the 2nd line of the formula indicates that frames m and i are on a shared link in the previous link; the inequality in the 3rd line is used to indicate this frame instance (i.e., f m .s j .o n) has an arrival time greater than that of the shared frame instance (i.e., f i .s j .o k ) (i.e., the arrival time of the instance on link j of the m-th frame is less than the arrival time of the instance on link j of the i-th frame); the inequality in the fourth line is used to indicate that the transmission time of this frame instance is less than the transmission time of the shared frame instance (i.e., the transmission time of the instance on link j - 1 of the m-th frame is greater than the transmission time of the instance on link j - 1 of the i-th frame).
[0095] It should be noted that after the above adjustment is made when violating the order constraints (i.e., Order1 and Order2 in steps (8) and (9)), it is no longer rejudged whether the order constraints are satisfied after the adjustment, but it is defaulted that the order constraints can be satisfied after the adjustment.
[0096] S3. Determine whether the scheduling scheme obtained in S2 is feasible, and output and execute the feasible scheduling.
[0097] If the offsets of the frame instances that satisfy the constraint conditions obtained in S2 are all non-negative, then the time slots and offsets of all the frame instances obtained in S2 are a feasible scheduling.
[0098] Embodiment of the computer device:
[0099] A computer device includes a processor, characterized in that the processor is used to execute a computer program to implement the steps of the heuristic scheduling method for TT flows in TSN as described above. The specific heuristic scheduling method for TT flows in TSN has been introduced in sufficient detail in the above-mentioned embodiment of the heuristic scheduling method for TT flows in TSN, and will not be repeated here.
[0100] Specifically, the processor can be a CPU, or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor, etc. The processor can also be a processor that supports the advanced reduced instruction set machines (ARM) architecture.
[0101] Finally, it should be noted that the above description is only the preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still make modifications to the technical solutions described in the foregoing embodiments without creative efforts, or make equivalent replacements for some of the technical features. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A heuristic scheduling method for TT flows in TSN, characterized in that The method includes: S1. Assign each directed link in the TSN to different phases; the directed links are arranged in the order from the target link to the source link; The condition for the l-th directed link to be assigned to the Φ-th phase is that the previous links of all frames passing through the l-th directed link have been assigned to the phases before the Φ-th phase; S2. Execute the following parts in each phase in sequence from the first phase to the last phase: within the supercycle of this phase, set time slots and offsets for all frame instances of this phase, and adjust the offset and / or queue so that the offsets of all frame instances meet the pre-set constraint conditions; The supercycle is the least common multiple of all frame periods of this phase; S3. Judge whether the scheduling scheme obtained in S2 is feasible, and output and execute the feasible scheduling.
2. The heuristic scheduling method for TT flows in TSN according to claim 1, wherein The assignment of each directed link in the TSN to different phases includes: Start the assignment from the first phase until all directed links are assigned; When making an assignment in any phase, traverse the first frame instance and the second frame instance among all frame instances. If the previous directed links of the first frame instance and the second frame instance have both been assigned, and there is no directed link such that the links of the first frame instance and the second frame instance are the same, then assign the unique directed link to the current phase.
3. The heuristic scheduling method for TT flows in TSN according to claim 1, wherein The constraint conditions include a conflict constraint to ensure no conflict with the frame instances arranged in the previous phase and an order constraint to ensure compliance with the order requirements for transmission in the switch.
4. The heuristic scheduling method for TT flows in TSN according to claim 3, characterized in that, Adjusting the offset and / or queue so that the offsets of all frame instances meet the pre-set constraint conditions includes: If there is a frame instance whose offset does not meet the conflict constraint, adjust the offset of this frame instance until it meets the conflict constraint; After all frame instances meet the conflict constraint, if there is a frame instance whose offset does not meet the order constraint, adjust the offset and / or queue of this frame instance.
5. The heuristic scheduling method for TT flows in TSN according to claim 4, wherein Setting time slots for all frame instances of this phase in S2 includes: setting time slots for frame instances in ascending order of frame utilization rate; The frame utilization rate is obtained according to the following formula: where f.u is the frame utilization rate; f.w is the frame length; f.d is the deadline of the frame; f.n is the number of links in the route.
6. The heuristic scheduling method for TT flows in TSN according to claim 4, characterized in that, Setting offsets for all frame instances of this phase in S2 includes: For the first phase, set the offset to the value obtained by subtracting the frame length from the deadline of the frame; For the Φ-th phase, set the offset to the value obtained by subtracting the frame length from the minimum value between the deadline of the frame and the release time of this frame in the (Φ - 1)-th phase, where Φ > 1.
7. The heuristic scheduling method for TT flows in TSN according to claim 3, wherein When a frame instance meets the following conditions, it is considered that this frame instance does not meet the conflict constraint: The start time of this frame instance is earlier than the end time of the frame instance in the previous phase, and the end time of this frame instance is later than the start time of the frame instance in the previous phase.
8. The heuristic scheduling method for TT flows in TSN according to claim 3, wherein When a frame instance meets the first condition or the second condition, it is considered that this frame instance does not meet the order constraint; The first condition is: the arrival time of this frame instance is earlier than the arrival time of the shared frame instance, and the transmission time of this frame instance is later than the transmission time of the shared frame instance; The second condition is that the arrival time of this frame instance is later than the arrival time of the shared frame instance, and the transmission time of this frame instance is earlier than the transmission time of the shared frame instance; The shared frame instance is the frame instance that shares a link with this frame instance in the previous link.
9. The heuristic scheduling method for TT flows in TSN according to claim 4, characterized in that, The process of adjusting the offset of this frame instance until the conflict constraint is satisfied includes: subtracting 1 from the offset of this frame instance, and then re-determining whether the conflict constraint is satisfied until the conflict constraint is satisfied.
10. The heuristic scheduling method for TT flows in TSN according to claim 4, wherein The process of adjusting the offset of this frame instance and / or the queue includes: if this frame instance satisfies the first condition, the queue of this frame instance is incremented by 1; then, if the queue of this frame instance exceeds the maximum queue, the offset of this frame instance is decremented by 1; The first condition is that the arrival time of this frame instance is later than the arrival time of the shared frame instance, and the transmission time of this frame instance is earlier than the transmission time of the shared frame instance; the shared frame instance is the frame instance that shares a link with this frame instance in the previous link.
11. The heuristic scheduling method for TT flows in TSN according to claim 4, wherein, The process of adjusting the offset of this frame instance and / or the queue includes: if this frame instance satisfies the second condition and the queue of this frame instance is not the maximum queue, the queue of this frame instance is incremented by 1; The second condition is that the arrival time of this frame instance is earlier than the arrival time of the shared frame instance, and the transmission time of this frame instance is later than the transmission time of the shared frame instance; the shared frame instance is the frame instance that shares a link with this frame instance in the previous link.
12. The heuristic scheduling method for TT flows in TSN according to claim 1, characterized in that, If the offsets of the frame instances that satisfy the constraint conditions obtained in S2 are all non-negative, the time slots and offsets of all the frame instances obtained in S2 are a feasible schedule.
13. A computer device includes a processor, characterized in that, The processor is used to execute a computer program to implement the steps of the heuristic scheduling method for TT flows in TSN as described in any one of claims 1 to 12.