Routing and scheduling joint optimization method and system for TSN network mixed flow

By combining drift supervision and TAS and SPQ shaping mechanisms in time-sensitive networks, the reserved bandwidth and routing of AVB streams are optimized, and the scheduling and network stability problems in hybrid flow scheduling are solved, and efficient traffic management is achieved.

CN120434192APending Publication Date: 2025-08-05XIAN UNIV OF POSTS & TELECOMM
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510552255.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-29
Publication Date
2025-08-05

AI Technical Summary

Technical Problem

The current research on hybrid stream routing and scheduling in time-sensitive networks has failed to effectively consider the personalized transmission needs of audio and video bridge streams, resulting in limited scheduling of AVB streams and blocking the best-effort stream under large load conditions, affecting network stability.

Method used

The incoming skeletoning mechanism with drift supervision is combined with TAS and SPQ exit skeletoning to provide fine-grained services for each AVB stream, the maximum end-to-end delay is analyzed through network calculation theory, the TSN switch parameter model is established, and the simulated annealing algorithm is used to solve the routing and switch parameters, and the reserved bandwidth of the AVB stream is optimized.

Benefits of technology

It improves the scheduling ability of AVB streams, reduces mutual interference between traffic at the same priority level, improves network stability, and provides more transmission opportunities for BE streams.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120434192A_ABST
    Figure CN120434192A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of networks, and discloses a routing and scheduling joint optimization method and system oriented to TSN network mixed streams, a stream-by-stream supervision enqueue shaping mechanism is used and is combined with TAS and SPQ outlet shaping, the scheduling granularity is improved, fine-grained service is provided for each AVB stream, and the scheduling efficiency is improved. The mutual interference among the flows with the same priority is reduced, and the schedulability of the AVB flow is improved. Meanwhile, the maximum end-to-end time delay of the AVB flow is analyzed by using a network calculation theory, a TSN switch parameter model is established according to the maximum end-to-end time delay, and the reserved bandwidth of the AVB flow is optimized. And finally, routing and switch parameters are solved at the same time through a simulated annealing algorithm, and more transmission opportunities are provided for the BE flow on the premise of ensuring the schedulability of the AVB flow.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of network technology, and in particular relates to a routing and scheduling joint optimization method and system for TSN network hybrid flows. Background Art

[0002] Current research on hybrid flow routing and scheduling in time-sensitive networks does not consider the personalized transmission requirements of Audio Video Bridging (AVB) flows, resulting in limited schedulability of AVB flows and the problem that AVB flows may block Best Effort (BE) flows under heavy load, resulting in decreased network stability.

[0003] In current research on the joint optimization of routing and scheduling for hybrid flows, the TAS+CBS scheduling mechanism has been widely studied and applied due to its effectiveness in alleviating the transmission congestion of AVB flows on BE flows. However, when applied to TSN switches, this mechanism cannot provide fine-grained services for flows with the same priority class (such as AVB_A or AVB_B flows) but different latency requirements. When calculating reserved bandwidth based on the sending deadline, the impact of mutual interference between flows of the same priority on the maximum queuing delay is not considered. This limits the schedulability of AVB flows and fails to minimize the bandwidth reservation required for AVB flows and the congestion impact on BE flows.

[0004] Through the above analysis, the problems and defects of the existing technology are as follows:

[0005] When this mechanism is applied in TSN switches, it is impossible to provide more fine-grained services for flows with the same priority class (such as AVB_A flows or AVB_B flows) but different latency requirements. When calculating the reserved bandwidth based on the sending deadline as a constraint, the impact of mutual interference between flows of the same priority on the maximum queuing delay is not considered. This limits the schedulability of AVB flows and fails to minimize the bandwidth reservation required for AVB flows and the blocking impact on BE flow transmission. Summary of the Invention

[0006] In response to the problems existing in the prior art, the present invention provides a method and system for joint optimization of routing and scheduling for TSN network hybrid flows.

[0007] The present invention is implemented as follows: a routing and scheduling joint optimization method for TSN network hybrid flows includes:

[0008] Step 1: Use a per-flow enqueue shaping mechanism combined with TAS and SPQ egress shaping to provide fine-grained services for each AVB flow.

[0009] Step 2: Use network calculus theory to analyze the maximum end-to-end delay of the AVB flow, and based on this, establish a TSN switch parameter model to optimize the reserved bandwidth of the AVB flow;

[0010] In step 3, the routing and switch parameters are solved simultaneously by the simulated annealing algorithm, which provides more transmission opportunities for BE flows while ensuring the schedulability of AVB flows.

[0011] Furthermore, the switch parameter model:

[0012] The model minimizes the bandwidth reservation RB of AVB flow by adjusting the priority setting of each AVB flow in TSN switch and the queue shaping parameter r A,x 、r B,x , where x = 1, ..., N, in order to minimize the bandwidth occupied by the AVB stream while ensuring that the AVB stream delay requirements are met;

[0013]

[0014] Here, R is used to represent the bandwidth of the TSN switch output port, in Mbit / s; AVB stream f i Any message M i The delay increment in the TSN switch is denoted by Δd i Indicates that ddl i Indicates AVB stream f i Deadline;

[0015] The total cycle of the gate list is expressed as T GCL ;AVB queue in a T GCL The total door opening time is T AVB ; Each AVB queue is equipped with N queue buffers; the first constraint represents the AVB flow f i The sum of the delay increments passing through each hop switch on the corresponding transmission path cannot exceed the deadline of the flow; the second and third constraints represent the reserved bandwidth r A,x or r B,x The total bandwidth reserved for all AVB streams cannot exceed the upper limit of the remaining transmission bandwidth after being occupied by TT streams;

[0016] The delay increment Δd of the flow with internal priority AVB_A in the switch i It can be calculated using the following formula:

[0017]

[0018] Among them, d proc Indicates processing delay; Indicates message M i In the queue buffer area Ax The delay increment in ; Indicates message M i Delay increment in the AVB_A queue; Indicates the transmission delay, which is determined by the message size of the AVB stream;

[0019] Similarly, when the internal priority of the AVB stream in the TSN switch is AVB_B, Δd i The calculation formula is as follows:

[0020]

[0021] in, Indicates message M i In the queue buffer area B x The delay increment in ; Indicates message M i Delay increment in the AVB_B queue;

[0022] In calculation When, first Only the delay increment brought by the queue buffer of each hop is considered. It is a value affected only by the queue buffer. Therefore, when considering the time difference between the tail frame and the head frame entering the queue buffer, it can be calculated by the token bucket parameters of the previous hop. When the head frame enters the buffer, all frames of the message can be sent to the AVB_A queue. Therefore, n i A message consisting of data frames M i The last frame enters the queue buffer area A x The latest time when its first frame enters the queue buffer area A x Time difference At least:

[0023]

[0024] in, For flow f i Parameters of the switch at the previous hop, where X is its internal priority at the previous hop;

[0025] The delay increase caused by the queue buffer You can use the current switch to send n i The time it takes for data frames to enter the AVB_A queue minus Get, that is

[0026]

[0027] Inside the TSN switch, n i AVB_B message M composed of data frames i , in the queue buffer area Bx The delay increment in It can be calculated by the following expression:

[0028]

[0029] Since the AVB_A data frame is shaped based on TBE, the queue buffer area A x Arrival curve to the AVB_A queue It can be expressed as:

[0030]

[0031] The data frames received by the AVB_A queue come from more than one queue buffer, so the total arrival curve α A (t), we need to aggregate the arrival curves of a single flow:

[0032]

[0033] The number of AVB_A flows inside the switch is num A express;

[0034] The service curve of the AVB_A queue can be expressed as follows:

[0035]

[0036] Among them, T TT It represents the total gate opening time of TT flow in the entire gate cycle;

[0037] Message M with internal priority AVB_A i Delay increment in the AVB_A queue It can be expressed as:

[0038]

[0039] Among them, ΔH(α A (t),β A (t)) represents the maximum horizontal deviation between the service curve and the arrival curve; since the upper bound of the delay represented by the maximum horizontal deviation already includes the transmission delay, and the transmission delay has been calculated once in formula (2), in order to avoid repeated calculation, the transmission delay needs to be subtracted here;

[0040] Since the AVB_B data frame is also enqueued based on TBE, the enqueued buffer area B x Arrival curve to AVB_B queue Expressed as:

[0041]

[0042] Therefore, from the queue buffer B1 to B N The aggregate flow reaches the curve α B (t) can be expressed as:

[0043]

[0044] num B Indicates the number of message flows with internal priority AVB_B in the TSN switch;

[0045] The service curve β of the AVB_B queue B (t) can be expressed as follows:

[0046]

[0047] Combined with the above analysis, the message M with internal priority of AVB_B i Available service curve β B (t) and arrival curve α B (t) the maximum horizontal deviation ΔH(α B (t),β B (t)) represents the delay increment experienced in the AVB_B queue

[0048]

[0049] According to the optimization goal of the TSN switch parameter design model shown in formula (1), it can be concluded that minimizing the token bucket growth rate r A,x and r B,x The sum of (x=1,...,N) is equivalent to minimizing the reserved bandwidth RB of the AVB stream; the delay increment of the AVB_A class message in the AVB_A queue After the internal priority of the AVB stream in the TSN switch is determined, it can be calculated according to formula (10); After the value of , the queue buffer area A can be calculated by formula (5) x The token bucket's token growth rate r A,x After the internal priority of the AVB flow in the TSN switch is determined, the delay increment of the AVB_B class message in the AVB_B queue can be obtained by combining equations (8) and (14): The value of r A,x The delay increment decreases with the decrease of the sum; further deducing formula (3) and formula (6), we can get The smaller the enqueue shaping parameter r B,x The sum will also decrease accordingly; therefore, first use formula (5) to calculate the queue shaping parameter r A,x , and then substitute into formula (14) to obtain the delay increment Finally, the queue shaping parameter r can be obtained through formula (3) and formula (6) B,x The minimum value of the sum.

[0050] Furthermore, the routing and switch parameters are solved:

[0051] First, the objective function is set as follows:

[0052] minC(y)=O1(y)×W1+O2(y)×W2+O3(y)×W3+O4(y)×W4 (15)

[0053] Here, O1(y), O2(y), and O3(y) represent the total number of unschedulable AVB flows, the WCD of AVB flows, and the total number of network links traversed by AVB flows, respectively. The key point is O4(y), which is set to the average sum of the total bandwidth reserved for AVB flows at each switching node. To ensure that AVB flows are scheduled as successfully as possible in the network while reserving the minimum bandwidth resources for them, the reserved bandwidth for AVB flows is included in the optimization objective. Its specific definition is as follows:

[0054]

[0055] Where WCD(f i ) represents the flow f i The worst-case delay, if the condition is met, the sum is 1, otherwise it is 0;

[0056]

[0057] in Indicates that at the switching node s i , the total bandwidth RB reserved for AVB flow at this node is obtained using the TSN switch parameter design model of formula (1); N S Indicates the total number of switches in the network topology.

[0058] Another object of the present invention is to provide a routing and scheduling joint optimization system for TSN network hybrid flows, including:

[0059] A combination module for using per-flow policing for enqueue shaping combined with TAS and SPQ egress shaping; providing fine-grained services for each AVB flow;

[0060] The model building module uses network calculus theory to analyze the maximum end-to-end latency of AVB traffic and, based on this, establishes a TSN switch parameter model to optimize the reserved bandwidth of AVB traffic.

[0061] The solution module is used to simultaneously solve the routing and switch parameters through the simulated annealing algorithm, providing more transmission opportunities for BE flows while ensuring the schedulability of AVB flows.

[0062] Another object of the present invention is to provide a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the routing and scheduling joint optimization method for TSN network hybrid flows.

[0063] Another object of the present invention is to provide a computer-readable storage medium storing a computer program, which, when executed by a processor, enables the processor to perform the steps of the routing and scheduling joint optimization method for TSN network hybrid flows.

[0064] Another object of the present invention is to provide an information data processing terminal, which is used to implement the routing and scheduling joint optimization system for TSN network hybrid flows.

[0065] In combination with the above technical solutions and the technical problems solved, the advantages and positive effects of the technical solutions to be protected by the present invention are as follows:

[0066] First, the present invention proposes a joint optimization method for routing and scheduling for hybrid flows. This method proposes a hybrid flow routing and scheduling joint optimization algorithm (TBE-SPQ-TAS Integrated Hybrid Traffic Routing and Scheduling Joint Optimization Algorithm, TST-TRSO) that combines a flow-by-flow supervision mechanism based on the Token Bucket Emulation (TBE) algorithm with TAS and a strict priority queuing (SPQ) mechanism. This algorithm increases the scheduling granularity of AVB flows from priority-based to message-based, enabling each AVB flow to obtain fine-grained services of varying quality. Subsequently, the maximum end-to-end delay of the AVB flow is analyzed based on network calculus theory. On this basis, a TSN switch parameter optimization model is constructed to minimize the bandwidth reservation of the AVB flow while satisfying the delay constraint, thereby reducing its blocking of the BE flow. Finally, the path selection and switch parameters are used as optimization variables, and a simulated annealing algorithm is used for iterative optimization. The simulation results show that the proposed method can improve the schedulability of AVB flows while providing more transmission opportunities for BE flows.

[0067] This paper proposes a joint optimization method for routing and scheduling for hybrid flows. This method uses a per-flow regulated enqueue shaping mechanism, combined with TAS and SPQ egress shaping, to improve scheduling granularity. By providing fine-grained services for each AVB flow, it reduces mutual interference between flows of the same priority level and improves the schedulability of AVB flows. At the same time, network calculus theory is used to analyze the maximum end-to-end delay of AVB flows, and a TSN switch parameter model is established based on this, optimizing the reserved bandwidth of AVB flows. Finally, a simulated annealing algorithm is used to simultaneously solve routing and switch parameters, providing more transmission opportunities for BE flows while ensuring the schedulability of AVB flows.

[0068] Second, Time-Sensitive Networking (TSN) aims to provide predictable and deterministic data transmission for application scenarios with high real-time requirements. Its application areas include industrial automation, intelligent transportation, intelligent manufacturing, and edge computing, which have extremely high requirements for data transmission quality. In view of the fact that current research on hybrid flow routing and scheduling in time-sensitive networks does not consider the personalized transmission requirements of audio and video bridging (AVB) flows, resulting in limited schedulability of AVB flows and the problem that AVB flows block best effort (BE) flows under heavy load, resulting in decreased network stability, a routing and scheduling joint optimization method for hybrid flows is proposed. This paper proposes a hybrid flow routing and scheduling joint optimization algorithm (TBE-SPQ-TAS Integrated Hybrid Traffic Routing and Scheduling Joint Optimization Algorithm, TST-TRSO) that combines a flow-by-flow supervision mechanism based on the Token Bucket Emulation (TBE) algorithm with TAS and a strict priority queuing (SPQ) mechanism. The present invention can improve the schedulability of AVB flows while providing more transmission opportunities for BE flows.

[0069] The present invention can effectively reduce mixed traffic conflicts, improve real-time communication performance, and meet the network's strict requirements for low latency by proposing innovative scheduling algorithms and routing strategies. The scheduling granularity of AVB streams is increased from priority-based to message-based, so that each AVB stream can obtain fine-grained services of different quality. Afterwards, the maximum end-to-end delay of the AVB stream is analyzed based on network calculus theory, and a TSN switch parameter optimization model is constructed on this basis to minimize the bandwidth reservation of the AVB stream while satisfying the delay constraint, so as to reduce its blockage of the BE stream. Finally, the path selection and switch parameters are used as optimization variables, and the simulated annealing algorithm is used for iterative optimization. It aims to improve resource utilization efficiency and ensure fair resource allocation in network traffic competition. Therefore, the present invention establishes a model for the mixed traffic scheduling problem in TSN to achieve deterministic transmission of time-triggered streams, and ultimately achieve the goals of reducing mixed traffic conflicts and balancing network traffic load.

[0070] TSN provides data transmission services with deterministic latency, low jitter, and high reliability through mechanisms such as clock synchronization, traffic shaping and scheduling, path control, resource reservation, and fault tolerance. However, current research on routing and traffic scheduling in TSN primarily focuses on optimizing scheduling schemes under known routing conditions, failing to fully consider the impact of routing selection on scheduling feasibility and network resource utilization. Competition among different service flows for network resources can cause traffic scheduling conflicts, hindering the transmission of high-priority traffic and starving low-priority traffic. Existing research on the joint routing and scheduling of mixed flows primarily focuses on ensuring bounded low latency for AVB flows, but lacks consideration for the personalized needs of transmission utility, limiting the schedulability of AVB flows. Furthermore, prolonged blocking of low-priority traffic by high-priority traffic can result in excessive latency for the latter, impacting network stability and system management efficiency. To address these issues, this paper proposes a joint optimization method for routing and scheduling hybrid flows. This method employs an enqueue shaping mechanism that requires per-flow supervision and combines it with egress shaping using time-aware shaping and strict priority queuing (SPQ). This method increases the scheduling granularity from priority-based to message-flow-based, providing fine-grained services with varying quality for each AVB flow. Network calculus theory is then used to analyze the maximum end-to-end latency of AVB flows in the network. Based on this analysis, a TSN switch parameter design model is established to minimize the enqueue shaping parameter for AVB flows while meeting latency requirements, thereby reducing the degree of congestion for BE flows. Finally, a simulated annealing algorithm is used to solve the problem, taking path selection and switch parameters as variables. Extensive experimental results demonstrate that the proposed method improves the schedulability of AVB flows while providing more transmission opportunities for BE flows. BRIEF DESCRIPTION OF THE DRAWINGS

[0071] Figure 1 This is a flow chart of a method for joint optimization of routing and scheduling for TSN network hybrid flows provided by an embodiment of the present invention.

[0072] Figure 2 This is a structural block diagram of a routing and scheduling joint optimization system for TSN network hybrid flows provided by an embodiment of the present invention.

[0073] Figure 3 This is a diagram of the internal structure of a TSN switch provided by an embodiment of the present invention.

[0074] Figure 4 This is a scheduling flow chart provided by an embodiment of the present invention.

[0075] Figure 5 Graphs of service curves and arrival curves provided by embodiments of the present invention.

[0076] Figure 6 This is a grid topology diagram provided by an embodiment of the present invention.

[0077] Figure 7 This is an AVB flow schedulability diagram under different scheduling algorithms provided by an embodiment of the present invention.

[0078] Figure 8 This is an AVB flow schedulability diagram under different traffic scenarios provided by an embodiment of the present invention.

[0079] Figure 9 This is a comparison chart of AVB stream reserved bandwidth provided by an embodiment of the present invention.

[0080] Figure 10 This is a relationship diagram between the average end-to-end delay of BE flows and the number of BE flows provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0081] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0082] like Figure 1 As shown, an embodiment of the present invention provides a method for joint optimization of routing and scheduling for TSN network hybrid flows, including the following steps:

[0083] S101 uses a per-flow policing enqueue shaping mechanism, combined with TAS and SPQ egress shaping, to provide fine-grained services for each AVB flow.

[0084] S102: Analyze the maximum end-to-end delay of the AVB stream using network calculus theory, and establish a TSN switch parameter model based on this to optimize the reserved bandwidth of the AVB stream.

[0085] S103, using the simulated annealing algorithm to simultaneously solve the routing and switch parameters, while ensuring the schedulability of the AVB flow, provides more transmission opportunities for the BE flow.

[0086] like Figure 2 As shown, an embodiment of the present invention provides a routing and scheduling joint optimization system for TSN network hybrid flows, including:

[0087] A combination module for using per-flow policing for enqueue shaping combined with TAS and SPQ egress shaping; providing fine-grained services for each AVB flow;

[0088] The model building module uses network calculus theory to analyze the maximum end-to-end latency of AVB traffic and, based on this, establishes a TSN switch parameter model to optimize the reserved bandwidth of AVB traffic.

[0089] The solution module is used to simultaneously solve the routing and switch parameters through the simulated annealing algorithm, providing more transmission opportunities for BE flows while ensuring the schedulability of AVB flows.

[0090] Another object of the present invention is to provide a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the routing and scheduling joint optimization method for TSN network hybrid flows.

[0091] Another object of the present invention is to provide a computer-readable storage medium storing a computer program, which, when executed by a processor, enables the processor to perform the steps of the routing and scheduling joint optimization method for TSN network hybrid flows.

[0092] Another object of the present invention is to provide an information data processing terminal, which is used to implement the routing and scheduling joint optimization system for TSN network hybrid flows.

[0093] The present invention is specifically implemented:

[0094] 1 System Model

[0095] Assume that the end systems and switches in a TSN network comply with the IEEE 802.1AS standard. The entire network utilizes a centralized configuration model based on SDN. When a flow set is first added to the network, it sends a request to a central controller. The controller then processes the request using the algorithm proposed in this paper to calculate the routing path and switch configuration parameters for the AVB flow. After completing these calculations, the controller distributes the routing and parameter information to the TSN switches and associated end systems.

[0096] 1.1 Network Model

[0097] The time-sensitive network is abstractly modeled as a directed graph G = (V, E), where E represents a set of directed links consisting of two nodes, and V represents a set of terminal systems and TSN switches. V = S∪H, where S represents the time-sensitive switching node and H represents the two types of terminal nodes, sending and receiving. Since the network link adopts full-duplex operation mode, the node v i and v j The physical link of the connection contains two ordered tuples (v i ,v j ) and (v j ,v i ). Each physical link has two properties: propagation delay and transmission bandwidth. Each node port in the network can only be connected to one physical link, and each TSN switch or terminal system contains more than one output port. n The message flow f i The routing is defined as an ordered sequence of directed links, namely r fi ={(v1,v2),...,(v n-1 ,v n )}.

[0098] 1.2 Traffic Model

[0099] According to the actual application of TSN in the field of industrial control, combined with the division of traffic priorities in the IEEE802.1Q standard, this paper defines the set of all flows in the network as It includes three types of traffic: TT flow, AVB flow and BE flow. The specific definitions are as follows:

[0100] TT streams are mainly used to transmit time-sensitive real-time data, including control instructions and synchronization information. They have strict constraints and requirements on response delay and periodicity, and have the highest transmission priority and the highest quality of service guarantee in the network. The priority of AVB streams is lower than that of TT streams, and they are mainly used to transmit audio and video data in TSN networks. Compared with TT streams, AVB streams have lower latency requirements and larger data loads. The attributes of each TT stream, AVB_A stream, and AVB_B stream can be represented as a six-tuple f i=(src i ,dest i ,size i ,prd i ,ddl i ,pri i ), for AVB stream, the class A stream priority prd i Set to 6, class B flow priority prd i Set to 5.

[0101] BE flows usually do not have the QoS requirement of deterministic transmission, so the four-tuple f i =(src i ,dest i ,size i ,pri i ) indicates the priority of BE flow prd i Typically set between 0 and 4.

[0102] 1.3 Switch Model

[0103] In the switch model proposed in this paper, AVB flows are scheduled based on message flows. Compared with priority-based scheduling (such as AVB_A and AVB_B), this refines the scheduling granularity and reduces interference between flows of the same priority. The specific method is to combine TAS with the SPQ mechanism and the Token Bucket Emulation (TBE) algorithm, and add an enqueue buffer in front of the AVB queue to store data frames of different message flows. The switch model is as follows: Figure 3 As shown:

[0104] The TT queue is used to cache TT type data frames, while the BE queue is used to cache BE type data frames. AVB_A and AVB_B type data frames need to be enqueued and shaped before entering the AVB_A queue and AVB_B queue. The flow filter is used to prioritize the data frames. After the classification is completed, the data frames with internal priority AVB_B and flow identifier i are stored in buffer area B. i , store the data frame with internal priority AVB_A and stream identifier i into buffer A i , after enqueue shaping processing, it enters the corresponding queue from the enqueue buffer.

[0105] In a TSN switch, the transmission gate state of the egress queue is controlled by the TAS mechanism through the gate list. The transmission gates of the AVB_A, AVB_B, and BE queues will open when the transmission gate of the TT queue is closed and start transmitting data. The data frames are sent in descending order according to priority. When the TT queue gate is open, in order to ensure that the TT class data frames can be transmitted without interference within the predetermined time slot, the queue gates of other types of traffic will be closed. And in order to further prevent the AVB or BE class data frames from affecting the transmission of the TT class data frames,

[0106] Set the transmission gate closing time of the TT queue to the AVB or BE data frame transmission delay t AVB An integer multiple of .

[0107] 2 Joint Optimization Method for Mixed Flows

[0108] This paper proposes a TBE-SPQ-TAS Integrated Hybrid Traffic Routing and Scheduling Joint Optimization Algorithm (TST-TRSO) to provide as many transmission opportunities as possible for BE messages while ensuring network scheduling performance. This algorithm combines TAS, SPQ, and TBE, uses routing and switch parameters as optimization variables, and employs a simulated annealing algorithm for its solution. The following detailed description covers the traffic scheduling process within TSN switches, the design model for enqueue shaping parameters, and the specific design of the simulated annealing algorithm for solving the hybrid traffic routing and scheduling joint optimization problem.

[0109] 2.1 Traffic Scheduling Process within a Switch

[0110] When the TST-TRSO scheduling algorithm is used, the traffic scheduling process inside the TSN switch is as follows: Figure 4 As shown in the figure. In the TST-TRSO scheduling algorithm, a TBE-based queue shaping mechanism is adopted, and TAS and SPQ are combined before egress shaping. A,x The number of tokens in the queue is 0 bit as the starting value during the queue shaping process, and starts at r per second. A,x bit speed increases. The AVB_A queue will be in the queue buffer area A x The number of tokens grows to l AVB bit, a data frame is received. After using a token to obtain the permission to send the data frame, the token bucket TB A,x The number of tokens in the will also decrease accordingly. AVB bit. Cache B xIt also follows the same sending logic. Data frames are sent only when the token bucket TB B,x The number of tokens starts from 0 bit and increases by r per second. B,x bit speed increased to l AVB bit, a data frame can be sent to the AVB_B queue. A,x Same, TB B,x In the queue buffer area B x After sending a data frame to the AVB_B queue, the number of token buckets should also be reduced by l AVB In summary, with TBE-based enqueue shaping, the sending of data frames in the buffer is limited by the number of tokens in the token bucket.

[0111] The TST-TRSO scheduling algorithm differs from the TAS+CBS scheduling algorithm in that it refines the scheduling granularity of AVB flows, moving from priority-based scheduling to message-flow-based scheduling. The TST-TRSO scheduling algorithm controls the rate at which data frames enter the AVB_A and AVB_B queues from the enqueue buffer. By adjusting the token increment rate in the token bucket and combining it with egress shaping, bandwidth resources can be allocated to each AVB_A and AVB_B flow based on its latency requirements. This approach provides more refined service for each AVB_A and AVB_B flow, meeting different quality of service requirements.

[0112] The concept of "idle data frames" is introduced to improve the transmission performance of BE flows without affecting the AVB flow service quality. During the enqueue shaping process, if there are no data frames in the enqueue buffer that need to be sent to the queue, and the number of tokens in the buffer's token bucket has reached the required number of data frames to be sent, the system will allow "idle data frames" to enter the queue as substitutes. The output selector checks each data frame, and only confirmed data frames can be sent from the output port of the TSN switch. If the output selector finds an "idle data frame" during the inspection, the system will replace it with a BE-class data frame for transmission, and the idle frame will be discarded. This method allows BE flows to obtain more transmission opportunities, allocating excess AVB flow bandwidth resources to BE-class data frames, and effectively reducing the end-to-end latency of BE flows.

[0113] 2.2 Switch Parameter Design Model

[0114] In order to minimize the impact of AVB data frame transmission on BE data frame transmission, a TSN switch parameter design model is established, as shown in formula (1). This model minimizes the bandwidth reservation RB of AVB flow by adjusting the priority setting of each AVB flow in the TSN switch and the queue shaping parameter r A,x 、r B,x, where x = 1, ..., N, so as to minimize the bandwidth occupied by the AVB stream while ensuring that the AVB stream delay requirement is met.

[0115]

[0116] Here, R is used to represent the bandwidth of the TSN switch output port, in Mbit / s. i Any message M i The delay increment in the TSN switch is denoted by Δd i Indicates that ddl i Indicates AVB stream f i deadline.

[0117] The total cycle of the gate list is expressed as T GCL . AVB queue in a T GCL The total door opening time is T AVB Each AVB queue is equipped with N queue buffers. The first constraint indicates that the AVB stream f i The sum of the delay increments of each hop switch on the corresponding transmission path cannot exceed the deadline of the flow. The second and third constraints represent the reserved bandwidth r A,x or r B,x The total bandwidth reserved for all AVB streams must not exceed the upper limit of the remaining transmission bandwidth after being occupied by TT streams.

[0118] Since the TSN switch starts processing the message only after the header frame enters the switch, the AVB message M i The delay increment in the switch can be calculated by calculating the total time from the first frame entering the switch to the last frame being sent out, minus the total time it takes for all frames of the message to enter the switch. In other words, the delay increment of the AVB message M can be obtained by calculating the difference between the latest time the last frame leaves the switch and the latest time it enters the switch. i Delay increment within a TSN switch.

[0119] Therefore, the delay increment Δd of the flow with internal priority of AVB_A in the switch is i It can be calculated using the following formula:

[0120]

[0121] Among them, d proc Indicates processing delay; Indicates message M i In the queue buffer area A x The delay increment in ; Indicates message M i Delay increment in the AVB_A queue; Indicates the transmission delay, which is determined by the message size of the AVB stream.

[0122] Similarly, when the internal priority of the AVB stream in the TSN switch is AVB_B, Δd i The calculation formula is as follows:

[0123]

[0124] in, Indicates message M i In the queue buffer area B x The delay increment in ; Indicates message M i Delay increment in the AVB_B queue.

[0125] In calculation When, first The delay increment brought by the queue buffer of each hop is only considered. It is a value affected only by the queue buffer. Therefore, when considering the time difference between the tail frame and the head frame entering the queue buffer, it can be calculated by the token bucket parameters of the previous hop. When the head frame enters the buffer, all frames of the message can be sent to the AVB_A queue. Therefore, n i A message consisting of data frames M i The last frame enters the queue buffer area A x The latest time when its first frame enters the queue buffer area A x Time difference At least:

[0126]

[0127] in, For flow f i Parameters of the switch at the previous hop, where X is its internal priority at the previous hop.

[0128] The delay increase caused by the queue buffer You can use the current switch to send n i The time it takes for data frames to enter the AVB_A queue minus Get, that is

[0129]

[0130] Similarly, inside the TSN switch, n i AVB_B message M composed of data frames i , in the queue buffer area B x The delay increment in It can be calculated by the following expression:

[0131]

[0132] Since the AVB_A data frame is shaped based on TBE, the queue buffer area A x Arrival curve to the AVB_A queue It can be expressed as:

[0133]

[0134] The data frames received by the AVB_A queue come from more than one queue buffer, so the total arrival curve α A (t), we need to aggregate the arrival curves of a single flow:

[0135]

[0136] The number of AVB_A flows inside the switch is num A express.

[0137] Several factors need to be considered when depicting the service curve of the AVB_A queue: first, interference from low-priority (AVB_B and BE) data frames. When data frames in the BE and AVB queues are scheduled according to priority, due to the use of non-preemptive mode, if the low-priority data frames have not yet completed transmission, the high-priority queue gate cannot transmit data even if it is open; second, interference from high-priority data frames. TAS will reserve dedicated time slot resources for TT flows. During this time slice, the gates of other priority queues are closed and data transmission is not allowed; finally, interference from data frames of the same priority. In TSN switches, queues generally follow the "first in, first out" principle, and data frames that enter the queue later need to wait in line. Therefore, the service curve of the AVB_A queue can be expressed as follows:

[0138]

[0139] Among them, T TT It represents the total gate opening time of the TT flow in the entire gating cycle.

[0140] like Figure 5 As shown in Figure 1, the arrival curve α describes the upper envelope of traffic arrival behavior, i.e., the upper bound of traffic arrival behavior; the service curve β reflects the lower envelope of the device scheduler's service capacity, representing the lower limit of service capacity. The upper bound of latency can be determined by calculating the maximum horizontal deviation between the service curve and the arrival curve.

[0141] Therefore, the message M with internal priority AVB_A i Delay increment in the AVB_A queue It can be expressed as:

[0142]

[0143] Among them, ΔH(α A (t),β A (t) represents the maximum horizontal deviation between the service curve and the arrival curve. Since the upper bound of the delay represented by the maximum horizontal deviation already includes the transmission delay, and the transmission delay has been calculated once in Equation (2), to avoid repeated calculation, the transmission delay needs to be subtracted here.

[0144] Since the AVB_B data frame is also enqueued based on TBE, the enqueued buffer area B x Arrival curve to AVB_B queue Expressed as:

[0145]

[0146] Therefore, from the queue buffer B1 to B N The aggregate flow reaches the curve α B (t) can be expressed as:

[0147]

[0148] num B Indicates the number of message flows with internal priority AVB_B in the TSN switch.

[0149] When describing the service curve of the AVB_B queue, there are four factors to consider: (1) interference from low-priority BE data frames; (2) interference from TT data frames in the dedicated time slots reserved by TAS for TT flows; (3) interference from data frames of the same priority in the "first-in-first-out" queue; (4) interference from AVB_A data frames. In TSN switches, the priority of the AVB_A queue is higher than that of the AVB_B queue. The data frames in the AVB_B queue need to wait until the data frames in the AVB_A queue are transmitted before they can be served. Therefore, α A (t) will affect the service curve of the AVB_B queue.

[0150] In summary, the service curve β of the AVB_B queue B (t) can be expressed as follows:

[0151]

[0152] Combined with the above analysis, the message M with internal priority of AVB_B i Available service curve β B (t) and arrival curve α B (t) the maximum horizontal deviation ΔH(α B (t),β B(t)) represents the delay increment experienced in the AVB_B queue

[0153]

[0154] According to the optimization goal of the TSN switch parameter design model shown in formula (1), it can be concluded that minimizing the token bucket growth rate r A,x and r B,x The sum of (x=1,...,N) is equivalent to minimizing the reserved bandwidth RB of the AVB stream. The delay increment of AVB_A class messages in the AVB_A queue After the internal priority of the AVB stream in the TSN switch is determined, it can be calculated according to formula (10). After the value of , the queue buffer area A can be calculated by formula (5) x The token bucket's token growth rate r A,x After the internal priority of the AVB flow in the TSN switch is determined, the delay increment of the AVB_B class message in the AVB_B queue can be obtained by combining equations (8) and (14): The value of r A,x Further derivation of formula (3) and formula (6) shows that the delay increment is The smaller the enqueue shaping parameter r B,x Therefore, first use formula (5) to calculate the queue shaping parameter r A,x , and then substitute into formula (14) to obtain the delay increment Finally, the queue shaping parameter r can be obtained through formula (3) and formula (6) B,x The minimum value of the sum.

[0155] 2. Application Examples of the Invention: In order to demonstrate the creativity and technical value of the technical solution of the present invention, this section provides application examples of the claimed technical solution on specific products or related technologies.

[0156] The design method of the application embodiment of the present invention is as follows. As analyzed above, once the internal priority is determined, in order to minimize the reserved bandwidth of the AVB flow on the basis of meeting the delay requirements, the corresponding enqueue shaping parameters can be directly calculated through equations (2) to (14). Therefore, reasonably assigning internal priority to each AVB flow becomes the main goal of the TSN switch parameter design model described by equation (1). In addition, the separation of routing and scheduling may limit the solution space, thereby reducing the schedulability of the AVB flow and resulting in poor quality of the obtained solution. Therefore, in order to improve the schedulability of the AVB flow while further reducing its transmission interference with the BE flow, the present invention simultaneously uses routing and switch parameters as decision variables for joint optimization to expand the solution space.

[0157] While traditional greedy algorithms can achieve the desired optimization goal, they are prone to getting stuck in local optima, making it difficult to achieve a global optimal solution. To avoid this problem, this solution employs the concept of simulated annealing to find the optimal solution under constraints. By introducing a gradually decreasing probability jump mechanism, the simulated annealing algorithm effectively avoids local optimality and allows the optimization process to converge towards a global optimal solution.

[0158] First, the objective function is set as follows:

[0159] minC(y)=O1(y)×W1+O2(y)×W2+O3(y)×W3+O4(y)×W4 (15)

[0160] Here, O1(y), O2(y), and O3(y) represent the total number of unschedulable AVB flows, the WCD of AVB flows, and the total number of network links traversed by AVB flows, respectively. The key point is O4(y), which is set to the average sum of the total bandwidth reserved for AVB flows at each switching node. To ensure that AVB flows are scheduled as successfully as possible in the network while also reserving the minimum bandwidth resources for them, the reserved bandwidth for AVB flows is included in the optimization objective. The specific definition is as follows:

[0161]

[0162] Where WCD(f i ) represents the flow f i The worst-case delay, if the condition is met, the sum is 1, otherwise it is 0.

[0163]

[0164] in Indicates that at the switching node s i , the total bandwidth RB reserved for AVB flow at this node is obtained using the TSN switch parameter design model of formula (1). S Indicates the total number of switches in the network topology.

[0165] When using the simulated annealing algorithm to solve this problem, the present invention first uses a multi-topology routing optimization scheme to calculate the candidate routing set R for each AVB flow. i,AVB , so that the candidate routing set contains routes that are less affected by TT flows. Afterwards, randomly select each flow in its R i,AVB Select a route r i , and initialize the internal priority (AVB_A, AVB_B) of each switching node on the transmission path. Then, for each switching node, the TSN switch parameter design model solves its queue shaping parameter rA,x 、r B,x , where x=1,...,N. According to the route and internal priority, the switch parameters of the previous hop can be used to Combined with the end-to-end deadline of the flow, the minimum switch parameters in this hop are solved. Then the optimization process is started to update any flow f i Router i Or the internal priority of any flow at any hop. Repeat the above steps until the optimization termination condition is reached. Finally, the optimal solution is output, including the routing allocation of each AVB flow, the internal priority allocation in each hop, and the switch parameter r of each hop. A,x and r B,x .

[0166] The specific steps are shown in Table 1. First, randomly generate an initial solution and initialize the initial temperature T0, temperature attenuation coefficient α, and final temperature T final , and the maximum number of iterations at each temperature. At the same time, the initial optimal solution and objective function value are set. Next, at each temperature, the simulated annealing algorithm generates a neighborhood solution through multiple iterations, and uses the Metropolis criterion to decide whether to accept the neighborhood solution. If the objective function value of the neighborhood solution is better, the solution is accepted directly; if the objective function value of the neighborhood solution is worse, the worse solution is accepted with a certain probability, thereby avoiding falling into the local optimal solution. This acceptance probability is related to the objective function difference between the current solution and the neighborhood solution and the current temperature. With each iteration, the temperature gradually decays, the search range of the algorithm gradually narrows, and eventually converges to the optimal solution. When the temperature drops to the preset final temperature, the iterative process stops and returns the optimal solution at this time.

[0167] Table 1. Hybrid flow routing and scheduling joint optimization algorithm integrating TBE-SPQ-TAS

[0168]

[0169]

[0170] This application embodiment is based on a Windows computer with an Intel(R) Core(TM) i9-13900HX 2.20GHz CPU and 16GB RAM. The simulation experiment of the routing and scheduling joint optimization method of the hybrid flow proposed in this section was carried out on the simulation platform PyCharm 2022.2, and the experimental results were analyzed.

[0171] This application embodiment sets the link transmission rate in the TSN network to 1Gbps and assumes that all devices have completed global clock synchronization. The propagation delay of the data frames of the three types of traffic on the physical link is negligible, and the processing delay in the TSN switch is 1μs. The specific traffic parameters are set as follows: the BE flow data size is randomly selected between 64 and 4500 bytes, with the lowest priority, and the priority queues assigned to it are 0-4; the TT flow transmission cycle range is 100-300μs, the data size range is set between 64 and 1500 bytes, it has the highest priority, and it is assigned to the highest priority queue 7; the AVB flow transmission cycle range is 100-1000μs, the data size range is 1500-4500 bytes, and the priority queues assigned to the AVB flow are 5 and 6. The deadlines of the TT and AVB flows are both set to be less than their transmission cycles to ensure the effectiveness of scheduling verification.

[0172] This application example sets up the following with reference to a typical industrial network scenario: Figure 6 The network topology shown in Figure 1 simulates a mixed flow scheduling scenario in a TSN network. In this network, there are nine switches, each connected to three end node devices.

[0173] This application example compares the proposed method with a TAS+CBS scheduling algorithm for the shortest path and a combined TAS, SPQ, and TBE (CTST) scheduling algorithm for fixed routing. To prioritize the schedulability of AVB flows while reducing their reserved bandwidth, the weights W1, W2, W3, and W4 in the objective function C(y) are set to 10,000, 3, 1, and 100, respectively, severely penalizing unschedulable solutions.

[0174] 3. Evidence related to the technical effects obtained by the embodiments of the present invention. The embodiments of the present invention have achieved some positive effects during the development or use process, and indeed have great advantages over the existing technology. The following content describes them with the data, charts, etc. of the experimental process.

[0175] (1) Schedulability analysis

[0176] The proposed method combines TAS with strict priority queuing and a token bucket emulation algorithm. It also introduces an enqueue buffer before the AVB queue to store data frames from different message flows. This method schedules AVB flows based on message flows, providing finer-grained scheduling compared to priority-based scheduling. Furthermore, the method solves for path selection and switch parameters as adjustable variables, thereby enhancing the flexibility of AVB flow scheduling. When the transmission gate of the TT queue is open, this method closes the transmission gates of the AVB and BE queues, ensuring that the TT flow is scheduled on time and improving the success rate of AVB flow scheduling.

[0177] In the first part of the experiment, 20 TT streams and 20 to 100 AVB streams were selected for testing.

[0178] Figure 7 Experimental results show that the schedulability of AVB flows using three different scheduling methods, while all successfully scheduled by TT, decreases to varying degrees as the number of AVB flows increases. Specifically, the TAS+CBS method achieves 95% schedulability when there are 20 AVB flows, but this drops to 69% when the number of flows increases to 100. Because the CTST method also employs a per-flow policing enqueue shaping mechanism to provide differentiated services for flows with the same priority but different QoS requirements, its AVB flow schedulability is superior to that of TAS+CBS. However, the CTST method uses a shortest path algorithm when planning AVB flow routing, failing to fully consider the impact of routing on scheduling. This can lead to overloaded links as network traffic increases, thus affecting the schedulability of AVB flows. Therefore, the AVB flow schedulability of CTST is inferior to that of TST-TRSO. In contrast, the TST-TRSO method maintains a schedulability of 84% when the number of AVB flows reaches 100.

[0179] (2) Scenario Adaptability Analysis

[0180] In order to evaluate the processing capability of the proposed algorithm in different mixed flow scenarios, as shown in Table 2, this experiment designed four test scenarios P1 to P4 with different traffic ratios. The mixed flow set in each scenario contains 100 flows.

[0181] Table 2 Hybrid flow scenario settings

[0182]

[0183]

[0184] Table 2 shows the distribution of various types of traffic in the network under different scenarios. Since different applications have different requirements for traffic types, the traffic proportions in each scenario are different. For example, some scenarios may have high requirements for real-time performance, so the proportion of TT flows is larger; while in other scenarios, traffic types with higher bandwidth requirements (such as AVB flows) become more important, so the proportion of these flows will be higher. The total number of mixed flows in each scenario is 100. In order to analyze the robustness of the designed algorithm under different traffic scenarios, the simulation compares the scheduling success rate of AVB flows in different scenarios. The results are shown in Figure 2. Figure 8 shown.

[0185] Analysis of the simulation results shows that AVB flow scheduling performance degrades when the proportion of AVB flows is high. Taking into account the performance of the three scheduling schemes, the proposed scheme outperforms the other two compared methods in AVB flow scheduling performance. In scenario 4, where the proportion of AVB flows is high, the proposed scheme maintains a scheduling success rate of 94%. This demonstrates that the proposed scheme can effectively schedule AVB flows in scenarios with varying traffic proportions and exhibits good robustness, adapting to changing traffic scenarios.

[0186] (3) Reserved bandwidth analysis

[0187] Figure 9 The horizontal axis in represents the number of AVB flows in the network. As can be seen from the figure, as the network load increases, the average value of the total bandwidth reserved for AVB flows by each switching node increases.

[0188] In TSN switches, the TAS+CBS scheduling algorithm reserves bandwidth based on priority and provides coarse-grained service of equal quality for flows of the same priority. In contrast, the CTST scheduling algorithm reserves bandwidth resources for each AVB_A and AVB_B flow that matches its latency requirements, reducing the average bandwidth reservation for AVB flows by approximately 13%-23%. The TST-TRSO approach, by incorporating routing as a decision variable in the calculation of switch parameters, expands the solution space and thus finds more optimal scheduling solutions. Compared to the CTST approach, the total bandwidth reserved for AVB flows at each switching node is reduced by approximately 12% on average under varying network loads. However, because TST-TRSO imposes a significant penalty on unschedulable solutions, it may need to relax bandwidth reservations for some flows to ensure that all AVB flows can be scheduled. As a result, the reduction in average reserved bandwidth decreases from approximately 17% to 4% as load increases.

[0189] (4) Analysis of the maximum end-to-end delay of BE flows

[0190] like Figure 10As shown in the experiment, the number of TT flows was fixed at 10 and the number of AVB flows was fixed at 25. When both TT and AVB flows were successfully scheduled, the average end-to-end delay of BE messages increased under all three algorithms as the BE flow load gradually increased. The CTST scheduling algorithm, by optimizing bandwidth reservation for AVB flows and introducing the concept of idle frames, reduced the average end-to-end delay of BE messages by approximately 8%-25% compared to the TAS+CBS scheduling algorithm. The TST-TRSO scheduling algorithm, by fully accounting for routing diversity, made the routing of AVB flows more dispersed, thus preventing excessive delays for BE flows traversing certain links due to excessive load. Compared to the CTST scheduling algorithm, TST-TRSO further reduced the average end-to-end delay of BE flows under different BE flow load conditions, achieving an average reduction of approximately 16% across the five load conditions. Furthermore, as the number of BE flows in the network increases, TST-TRSO's advantage in reducing the end-to-end delay of BE messages becomes increasingly significant.

[0191] This paper proposes a joint optimization method for routing and scheduling of mixed flows, aiming to improve network scheduling performance while minimizing the maximum end-to-end latency of BE messages. Compared to the TAS+CBS scheduling algorithm, the proposed TST-TRSO scheduling algorithm can reserve bandwidth for each AVB flow based on its latency requirements, providing more refined, differentiated services for flows with the same priority but different latency requirements. This approach not only reduces the bandwidth occupied by AVB flows but also effectively mitigates their blocking impact on BE flows. Furthermore, this method comprehensively considers the impact of routing schemes on scheduling results when scheduling AVB flows, expanding the search space for AVB flow scheduling problems and further improving the schedulability of AVB flows. Experimental results show that compared with the CTST and TAS+CBS algorithms, this method exhibits stronger scheduling capabilities under different network loads and scenarios. Furthermore, experiments demonstrate that this scheme can significantly reduce bandwidth reservations for AVB flows and the worst-case end-to-end latency of BE flows.

[0192] It should be noted that the embodiments of the present invention can be implemented by hardware, software, or a combination of software and hardware. The hardware portion can be implemented using dedicated logic; the software portion can be stored in a memory and executed by an appropriate instruction execution system, such as a microprocessor or dedicated hardware.

[0193] 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 modifications, equivalent substitutions and improvements made by any technician familiar with this technical field within the technical scope disclosed by the present invention and within the spirit and principles of the present invention should be covered by the scope of protection of the present invention.

Claims

1. A joint optimization method for routing and scheduling of TSN hybrid flows, characterized in that: include: In TSN networks, a per-flow queuing shaping mechanism is used, combined with TAS (Time-Aware Scheduling) and SPQ (Strict Priority Queuing) egress shaping, to schedule AVB flows. A TSN switch parameter model based on network calculus theory is constructed. This model is used to evaluate the end-to-end worst-case latency of AVB-like flows and, based on this, determine the minimum reserved bandwidth for AVB-like flows at each switching node. Under the premise of meeting the scheduling constraints of AVB-like flows, a simulated annealing algorithm is used to simultaneously optimize the routing path selection of mixed flows and the shaping parameters and priority allocation inside the switch.

2. The method according to claim 1, wherein In the TSN switch parameter model, the incremental delay of AVB-type flows at each hop switching node includes the sum of processing delay, queue buffer delay increment, AVB queue delay increment, and transmission delay.

3. The method according to claim 1, wherein For AVB traffic at different internal priorities in the switch, the arrival curve of its enqueue buffer is constructed based on the TBE (Token Bucket Enforcer) shaping strategy. The minimum delay increment caused by the enqueue buffer is calculated based on the time difference between the message header frame and the tail frame and the frame length.

4. The method according to claim 1, wherein The service curves for AVB_A and AVB_B flows are calculated based on the total cycle of the gated list, the TT flow occupancy time, and the AVB queue gate opening time. The service capacity of the AVB queue is determined by the remaining bandwidth during its gate opening period.

5. The method according to claim 1, wherein The simulated annealing algorithm aims to minimize an objective function, which is a weighted sum of the total number of unschedulable AVB flows, the end-to-end worst-case delay of scheduled AVB flows, and the average reserved bandwidth.

6. The method according to claim 1, wherein The reserved bandwidth is calculated based on the bandwidth and shaping rate allocated to each AVB flow by each output port of the TSN switch during the gating period, and is obtained by optimizing the internal priority and token bucket parameters set for the AVB flow at each switching node.

7. A system for joint optimization of routing and scheduling for TSN network hybrid flows, which implements the method for joint optimization of routing and scheduling for TSN network hybrid flows as described in any one of claims 1 to 3, characterized in that: The routing and scheduling joint optimization system for TSN network hybrid flows includes: A combination module for using per-flow policing for enqueue shaping combined with TAS and SPQ egress shaping; providing fine-grained services for each AVB flow; The model building module uses network calculus theory to analyze the maximum end-to-end latency of AVB traffic and, based on this, establishes a TSN switch parameter model to optimize the reserved bandwidth of AVB traffic. The solution module is used to simultaneously solve the routing and switch parameters through the simulated annealing algorithm, providing more transmission opportunities for BE flows while ensuring the schedulability of AVB flows.

8. A computer device, characterized in that: The computer device includes a memory and a processor, the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the steps of the routing and scheduling joint optimization method for TSN network hybrid flows as described in any one of claims 1 to 6.

9. A computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the processor performs the steps of the method for joint optimization of routing and scheduling for hybrid flows in a TSN network as described in any one of claims 1 to 6.

10. An information data processing terminal, characterized in that: The information data processing terminal is used to implement the routing and scheduling joint optimization system for TSN network hybrid flows as described in claim 7.