Time-sensing shaping method for high-bandwidth flow in time-sensitive network
By splitting high-bandwidth data streams into sub-streams, the problem of uneven resource allocation and scheduling conflicts in time-sensitive networks is solved, achieving higher resource utilization and network stability.
Patent Information
- Application Number
- CN202410795490.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-19
- Publication Date
- 2024-10-15
AI Technical Summary
In time-sensitive networks, long-term occupation of high-bandwidth data streams leads to uneven resource allocation, affecting the real-time and stability of the network. Moreover, existing scheduling algorithms cannot be scheduled when multiple data streams conflict, resulting in low resource utilization and scheduling problems. Low efficiency.
By splitting high-bandwidth data flows into multiple relatively small sub-flows, the monopoly of time slice resources by a single flow is reduced, and a time-aware shaping method is used to generate a gated list to ensure the schedulability and fairness of multiple data flows.
It effectively improves the schedulability rate of multiple data streams, reduces resource monopoly, improves the real-time performance and stability of the network, and ensures low-latency and low-jitter transmission.
Smart Images

Figure CN118784584A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a time-aware shaping method, in particular to a time-aware shaping method for high-bandwidth flows in a time-sensitive network, and belongs to the technical field of high-bandwidth data flow processing. Background Art
[0002] With the rapid development of autonomous vehicles in recent years, the industry has put forward higher requirements for the real-time performance of in-vehicle networks. In the in-vehicle network of autonomous vehicles, it is necessary to achieve low-latency and low-jitter deterministic transmission of time-sensitive data streams in the context of large-scale data streams. Since these requirements are difficult to be met by existing Ethernet technology, the IEEE802.1TSN working group has developed a series of protocol specifications, collectively referred to as Time-Sensitive Networking (TSN). TSN is an advanced industrial communication technology that is based on the standard Ethernet protocol stack and meets the application requirements with high real-time requirements by enhancing the determinism of data transmission, reducing latency and controlling jitter. Time-Aware Shaping (TAS), as one of the key technologies of TSN, ensures that data streams in the network are transmitted in an orderly manner according to the predetermined time window through a scheduling mechanism. TAS uses a gate control list (GCL) to periodically control the opening and closing time of each output queue, thereby accurately planning the timing of data packet transmission, thereby achieving extremely low latency and controllable jitter, and ensuring deterministic transmission of time-sensitive data.
[0003] Literature 1 An end-to-end scheduling method for time-triggered flows in a time-sensitive network (patent application number: CN202311232494.1) combines the store-and-forward mechanism used by TSN switches with the core TAS scheduling mechanism of TSN, develops a deterministic redundant time slot occupancy model when there is no conflict, and studies the time slot resource detection and offset scheduling algorithm for the port aggregation of data flows at the switch. On the basis of the TAS scheduling mechanism solving the conflict interference of non-real-time data on key business flows, it further avoids the interference problem between key TT type business flows, and achieves the minimum transmission delay with no queuing delay with the highest real-time performance. In addition, considering the non-translational relationship of the delay of the store-and-forward network and the problem of increased jitter of the data flow as the number of hops increases, the scheduling node position is selected and the scheduling rules are determined to achieve one-time scheduling success in the network and avoid conflict interference among global network nodes.
[0004] Document 2 A deterministic resource scheduling method for time-sensitive networks (patent application number: CN202111583763.X) is based on the time-aware shaping (TAS) scheduling algorithm and combines dynamic urgency to build a more flexible deterministic resource scheduling method. While ensuring low delay jitter, it can effectively solve the problem of time slot preemption, thereby improving resource utilization. At the same time, when multiple data streams are mixed and transmitted, the accuracy of the initialization delay sensitivity coefficient is not high enough, resulting in inaccurate urgency calculation and deviation in scheduling order. A genetic algorithm based on real number coding is further used to correct the delay sensitivity coefficient.
[0005] The above documents are all methods for directly scheduling TSN data streams in time slices, and none of them considers the situation when multiple data streams have scheduling conflicts during the scheduling process. When scheduling conflicts occur, the above methods all result in the result that multiple data streams cannot be scheduled. The present invention is a solution proposed for scheduling conflicts among multiple data streams, which can effectively improve the schedulability of multiple data streams and enable better fairness in the execution of multiple data streams.
[0006] In actual application scenarios, there are significant differences in the bandwidth requirements and transmission characteristics of data streams. In particular, the existence of high-bandwidth data streams poses a huge challenge to scheduling algorithms. In TSN, high-bandwidth data streams often require longer time slices for transmission due to their large data volume and high transmission frequency. When such data streams are scheduled, their queue gating may occupy network resources for a long time after being opened, resulting in other low-priority or low-bandwidth demand data streams being unable to obtain transmission opportunities in a timely manner. This imbalance in resource allocation not only violates the real-time and deterministic requirements of time-sensitive networks, but may also cause the gated list GCL to fail, thereby affecting the performance and stability of the entire network system.
[0007] High-bandwidth data flows may cause the following problems, which in turn affect the overall transmission performance of the network: (1) The long-term occupation of high-bandwidth data flows directly leads to conflicts in bandwidth resource allocation, making it impossible for other data flows to complete transmission within the scheduled time; (2) In traditional scheduling algorithms, high-priority data flows often obtain resources first, but this may cause low-priority data flows to be unserved for a long time, thus affecting the scheduling efficiency of the entire data flow set; (3) When the data flow cannot meet the established constraints, the calculation of GCL may fail, which not only affects the transmission efficiency of the data flow, but also threatens the stability of the network. Therefore, a new solution is urgently needed to solve this technical problem. Summary of the invention
[0008] The present invention is aimed at the technical problems existing in the prior art and provides a time-aware shaping method for high-bandwidth flows in time-sensitive networks. In the face of excessive occupation of network resources by high-bandwidth data flows, this technology may cause problems such as unmet real-time requirements, low resource utilization, and imbalance in priority data flow scheduling. A time-aware shaping method is proposed for multiple TSN high-bandwidth periodic data flows. Through a high-bandwidth flow splitting strategy, the originally huge high-bandwidth data flow is split into multiple relatively small sub-flows, effectively reducing the degree of exclusivity of a single flow on time slice resources and obtaining an available GCL list.
[0009] In order to achieve the above object, the technical solution of the present invention is as follows: a time-aware shaping method for high-bandwidth flows in a time-sensitive network, the method comprising the following steps:
[0010] Step 1: Get data stream F i Feature requirements. Get data flow F i The key information includes the cycle period T of the data flow i , priority, data stream length L i and deadlines, etc. All F i The set is represented by S, that is, a data flow set contains several data flows.
[0011] Step 2: Data flow scheduling conflict determination: According to the actual bandwidth occupancy of all data flows, analyze and determine whether the current data flow set has scheduling conflicts under the conditions of preliminary determination of schedulability.
[0012] Step 2.1: Calculate the scheduling period. According to the cycle period T of each data flow i , calculate the least common multiple of all cycle periods, which is a scheduling period T of the current data flow set.
[0013] Step 2.2: Preliminary schedulability analysis, calculate the sum of the bandwidth proportions of all data flows, the formula is ∑ i∈S t i / T i , bandwidth ratio is the ratio of data flow transmission time to its own cycle period. Among them, the transmission time t i The calculation depends on the length of the data stream L i and link bandwidth B, according to the formula t i =L i / B, the byte length L can be divided by the bandwidth B i Convert to time units.
[0014] If the sum of the bandwidth proportions is not greater than 1, it is preliminarily determined that the data flow set is schedulable; otherwise, the data flow set cannot be scheduled.
[0015] Step 2.3: Scheduling conflict determination. Scheduling conflict means that according to the data flow scheduling plan, each data flow obtains a corresponding transmission time interval, and the transmission time intervals of different data flows overlap on a certain link. For any two data flows, If you have when When U i Represents data flow F i The number of cycles in the scheduling period, that is, the two data streams have overlapping transmission time intervals in the scheduling period, and the determination (Φ x,μ ≥Φ y,λ +t y )∨(Φ y,λ ≥Φ x,μ +t x ) is true, where Φ i,μ Represents data flow F i The transmission start time of the μth cycle. If true, it means there is a scheduling conflict, otherwise, there is no scheduling conflict.
[0016] Step 3: Divide the data flows in the set of data flows that are initially schedulable but have scheduling conflicts into sub-flows.
[0017] Step 3.1: Based on the cycle period T of each data stream i , sort the data streams in the set S containing n data streams in ascending order, and label these data streams in the order from 1 to n. Get an ordered data stream set S = {F1, F2, F3..., F n}.
[0018] Step 3.2: Calculate the available time slice length A for each data stream i . For each data stream in S, calculate the length of the available time slice in its cycle. The length of the available time slice of the first data stream is equal to its entire cycle. For other data streams calculated subsequently, their available bandwidth is determined by subtracting the cumulative value of the bandwidth occupied by all previous data streams from the total bandwidth. The calculation formula is Among them A i Represents the time slice length available for the i-th data stream, t i is the transmission time of data stream i, T i is the cycle period of data stream i.
[0019] Step 3.3: Calculate the number of sub-streams N i After determining the average time slice length that data stream i needs to allocate during its cycle, the available time slice length A of data stream i is i Divide by the average available time slice length to be split, and get the number of sub-streams N that both meets the needs of data stream i and reasonably utilizes the available time slice resources.i The calculation formula is: Where N i is the number of substreams of the desired data stream i, t i is the transmission time of data stream i, and T1 is the cycle period of the first data stream.
[0020] Step 3.4: Calculate the transmission time of each sub-stream. According to the number of sub-streams of data stream i and their transmission time t i , using the formula Calculate the transmission time of each sub-flow, where a i,x It represents the transmission time of the jth substream of the i-th data stream. For the substreams of data stream i, except for the last substream, the transmission time of the remaining substreams is equal.
[0021] At this time, the data stream i can be expressed as: The scheduling set can be expressed as:
[0022] Step 4: Generate the gated list GCL. Input the data flow set S obtained in step 3 and all constraints, including the priority and deadline of the data flow, into the SMT solver to obtain the solution of S and generate the GCL list.
[0023] After the data stream is divided into sub-streams, the allocation object of the time slice is converted to the j-th sub-stream f of data stream i. i,j , through the SMT solver, each data flow F can be determined i The transmission start time Φ of the jth sub-flow in the μth cycle i,j,μ .
[0024] After obtaining the start transmission time of each sub-stream, the transmission duration a corresponding to the sub-stream is calculated. i,j , further determine the time slice allocation of each data flow in the scheduling cycle. The start time of each time slice is s i,j,μ and deadline i,j,μ It can be calculated as follows: i,j,μ =Φ i,j,μ and e i,j,μ =Φ i,j,μ +a i,j , where s i,j,μ represents the starting time of the time slice of the jth substream of data stream i in the μth cycle, and e i,j,μ Indicates the deadline of the time slice. According to the priority of the data flow, these time slices are allocated to the corresponding priority queues in the TSN switch to obtain the gated switching time, that is, the GCL list.
[0025] Compared with the prior art, the present invention has the following advantages: (1) the technical solution effectively reduces the degree of monopoly of a single stream on time slice resources and improves the fairness of multi-data stream processing; (2) the schedulability of multiple data streams is effectively improved, and the originally unschedulable data streams are converted into schedulable data streams as much as possible, and a GCL list is given. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 The figure is a flow chart of a TAS method for high-bandwidth flows in TSN. Specific implementation method:
[0027] In order to deepen the understanding of the present invention, the present embodiment is described in detail below with reference to the accompanying drawings.
[0028] Example 1: See Figure 1 , a time-aware shaping method for high-bandwidth flows in a time-sensitive network, the method comprising the following steps:
[0029] Step 1: Get data stream F i Feature requirements. Get data flow F i The key information includes the cycle period T of the data flow i , priority, data stream length L i and deadlines, etc. All F i The set is represented by S, that is, a data flow set contains several data flows.
[0030] Step 2: Data flow scheduling conflict determination: According to the actual bandwidth occupancy of all data flows, analyze and determine whether the current data flow set has scheduling conflicts under the conditions of preliminary determination of schedulability.
[0031] Step 2.1: Calculate the scheduling period. According to the cycle period T of each data flow i , calculate the least common multiple of all cycle periods, which is a scheduling period T of the current data flow set.
[0032] Step 2.2: Preliminary schedulability analysis. Calculate the sum of the bandwidth proportions of all data flows, the formula is ∑ i∈S t i / T i , bandwidth ratio is the ratio of data flow transmission time to its own cycle period. Among them, the transmission time t i The calculation depends on the length of the data stream L i and link bandwidth B. According to the formula t i =L i / B, the byte length L can be divided by the bandwidth B i Convert to time units.
[0033] If the sum of the bandwidth proportions is not greater than 1, it is preliminarily determined that the data flow set is schedulable; otherwise, the data flow set cannot be scheduled.
[0034] Step 2.3: Scheduling conflict determination. Scheduling conflict means that according to the data flow scheduling plan, each data flow obtains a corresponding transmission time interval, and the transmission time intervals of different data flows overlap on a certain link. For any two data flows, If you have when When U i Represents data flow F i The number of cycles in the scheduling period, that is, the two data streams have overlapping transmission time intervals in the scheduling period, and the determination (Φ x,μ ≥Φ y,λ +t y )∨(Φ y,λ ≥Φ x,μ +t x ) is true, where Φ i,μ Represents data flow F i The transmission start time of the μth cycle. If true, it means there is a scheduling conflict, otherwise, there is no scheduling conflict.
[0035] Step 3: Divide the data flows in the set of data flows that are initially schedulable but have scheduling conflicts into sub-flows.
[0036] Step 3.1: Based on the cycle period T of each data stream i , the data streams in the set S containing n data streams are arranged in ascending order, and these data streams are numbered from 1 to n. An ordered data stream set S = {F1, F2, F3..., F n}.
[0037] Step 3.2: Calculate the available time slice length A for each data stream i . For each data stream in S, calculate the length of the available time slice in its cycle. The length of the available time slice of the first data stream is equal to its entire cycle. For other data streams calculated subsequently, their available bandwidth is determined by subtracting the cumulative value of the bandwidth occupied by all previous data streams from the total bandwidth. The calculation formula is Among them A i Represents the time slice length available for the i-th data stream, t i is the transmission time of data stream i, T i is the cycle period of data stream i.
[0038] Step 3.3: Calculate the number of sub-streams N iAfter determining the average time slice length that data stream i needs to allocate during its cycle, the available time slice length A of data stream i is i Divide by the average available time slice length to be split, and get the number of sub-streams N that both meets the needs of data stream i and reasonably utilizes the available time slice resources. i The calculation formula is: Where N i is the number of substreams of the desired data stream i, t i is the transmission time of data stream i, and T1 is the cycle period of the first data stream.
[0039] Step 3.4: Calculate the transmission time of each sub-stream. According to the number of sub-streams of data stream i and their transmission time t i , using the formula Calculate the transmission time of each sub-flow, where a i,x It represents the transmission time of the jth substream of the i-th data stream. For the substreams of data stream i, except for the last substream, the transmission time of the remaining substreams is equal.
[0040] At this time, the data stream i can be expressed as: The scheduling set can be expressed as:
[0041] Step 4: Generate the gated list GCL. Input the data flow set S obtained in step 3 and all constraints, including the priority and deadline of the data flow, into the SMT solver to obtain the solution of S and generate the GCL list.
[0042] After the data stream is divided into sub-streams, the allocation object of the time slice is converted to the j-th sub-stream f of data stream i. i,j , through the SMT solver, each data flow F can be determined i The transmission start time Φ of the jth sub-flow in the μth cycle i,j,μ .
[0043] After obtaining the start transmission time of each sub-stream, the transmission duration a corresponding to the sub-stream is calculated. i,j , further determine the time slice allocation of each data flow in the scheduling cycle. The start time of each time slice is s i,j,μ and the deadline e_(i,j,μ) can be calculated as follows: i,j,μ =Φ i,j,μ and e i,j,μ =Φ i,j,μ +a i,j , where s i,j,μ represents the starting time of the time slice of the jth substream of data stream i in the μth cycle, and e i,j,μ Indicates the end time of the time slice.
[0044] According to the priority of the data flow, these time slices are allocated to the corresponding priority queues in the TSN switch to obtain the gated switching time, that is, the GCL list.
[0045] Embodiment 2: A terminal, characterized in that it comprises a processor, a memory, and a program of a time-aware shaping method for high-bandwidth flows in a time-sensitive network stored in the memory, wherein when the time-aware shaping method for high-bandwidth flows in a time-sensitive network is executed by the processor, the steps of the time-aware shaping method for high-bandwidth flows in a time-sensitive network are implemented.
[0046] Embodiment 3: A computer-readable storage medium having computer instructions stored thereon, characterized in that: when the computer instructions are executed by a processor, the steps of the time-aware shaping method for high-bandwidth flows in a time-sensitive network are implemented.
[0047] It should be noted that the above embodiments are not intended to limit the protection scope of the present invention, and equivalent changes or substitutions made on the basis of the above technical solutions all fall within the protection scope of the claims of the present invention.
Claims
1. A time-aware shaping method for high-bandwidth flows in a time-sensitive network, characterized in that: The method comprises the following steps: Step 1: Get data stream F i Feature requirements, Step 2: Data flow scheduling conflict determination, Step 3: Divide the data flows in the set of data flows that are initially schedulable and have scheduling conflicts into sub-flows. Step 4: Generate the gated list GCL.
2. The time-aware shaping method for high-bandwidth flows in a time-sensitive network according to claim 1, characterized in that: Step 1: Get data stream F i Feature requirements are as follows: Get data stream F i The key information includes the cycle period T of the data flow i , priority, data stream length L i and deadline, all F i The set is represented by S, that is, a data flow set contains several data flows.
3. The time-aware shaping method for high-bandwidth flows in a time-sensitive network according to claim 2, characterized in that: Step 2: Data flow scheduling conflict determination: According to the actual bandwidth occupancy of all data flows, analyze and determine whether the current data flow set has scheduling conflicts under the conditions of preliminary determination of schedulability, as follows: Step 2.1: Calculate the scheduling period according to the cycle period T of each data flow i , calculate the least common multiple of all cycle periods, which is a scheduling period T of the current data flow set, Step 2.2: Preliminary schedulability analysis, calculate the sum of the bandwidth proportions of all data flows, the formula is Bandwidth ratio is the ratio of data flow transmission time to its own cycle period, where the transmission time t i The calculation depends on the length of the data stream L i and link bandwidth B, according to the formula t i =L i / B, by dividing the byte length L by the bandwidth B i Converted into time units, if the sum of the bandwidth proportions is not greater than 1, it is preliminarily determined that the data flow set is schedulable; otherwise, the data flow set cannot be scheduled. Step 2.3: Scheduling conflict determination. Scheduling conflict means that according to the data flow scheduling plan, each data flow obtains a corresponding transmission time interval. On a certain link, there is a situation where the transmission time intervals of different data flows overlap. For any two data flows, If you have when When U i Represents data flow F i The number of cycles in the scheduling period, that is, the two data streams have overlapping transmission time intervals in the scheduling period, and the determination (Φ x,a ≥Φ y,λ +t y )∨(Φ y,λ ≥Φ x,μ +t x ) is true, where Φ i,μ Represents data flow F i The transmission start time of the μth cycle. If true, it means there is a scheduling conflict. Otherwise, there is no scheduling conflict.
4. The time-aware shaping method for high-bandwidth flows in a time-sensitive network according to claim 3, characterized in that Step 3: Divide the data flows in the set of data flows that are initially schedulable and have scheduling conflicts into sub-flows, as follows: Step 3.1: Based on the cycle period T of each data stream i , the data streams in the set S containing n data streams are arranged in ascending order, and these data streams are numbered in the order from 1 to n, and an ordered data stream set S = {F1, F2, F3..., F n }, Step 3.2: Calculate the available time slice length A for each data stream i , for each data stream in S, the length of the available time slice in its cycle is calculated. The length of the available time slice of the first data stream is equal to its entire cycle. For other data streams calculated subsequently, the available bandwidth is determined by subtracting the cumulative value of the bandwidth occupied by all previous data streams from the total bandwidth. The calculation formula is: Among them A i Represents the time slice length available for the i-th data stream, t i is the transmission time of data stream i, T i is the cycle period of data stream i, Step 3.3: Calculate the number of sub-streams N i After determining the average time slice length that data stream i needs to allocate in its cycle, the available time slice length A of data stream i is i Divide by the average available time slice length to be split, and get the number of sub-streams N that both meets the needs of data stream i and reasonably utilizes the available time slice resources. i , the calculation formula is: Where N i is the number of substreams of the desired data stream i, t i is the transmission time of data stream i, T i is the cycle period of the first data stream, Step 3.4: Calculate the transmission time of each sub-stream, based on the number of sub-streams of data stream i and their transmission time t i , using the formula Calculate the transmission time of each sub-flow, where a i,x represents the transmission time of the jth substream of the i-th data stream. For the substreams of data stream i, except for the last substream, the transmission time of the remaining substreams is equal. In this case, data stream i is expressed as: The scheduling set can be expressed as:
5. The method for time-aware shaping of high-bandwidth flows in a time-sensitive network according to claim 2, characterized in that: Step 4: Generate a gated list GCL. Input the data flow set S obtained in step 3 and all constraints, including the priority and deadline of the data flow, into the SMT solver to obtain the solution of S and generate a GCL list. After the data stream is divided into sub-streams, the allocation object of the time slice is converted to the j-th sub-stream f of data stream i. i,j , through the SMT solver, determine each data flow F i The transmission start time Φ of the jth sub-flow in the μth cycle i,j,μ , After obtaining the start transmission time of each sub-stream, the transmission duration a corresponding to the sub-stream is calculated. i,j , further determine the time slice allocation of each data flow in the scheduling cycle, the start time of each time slice s i,j,μ and deadline i,j,μ Calculated by: s i,j,μ =Φ i,j,μ and e i,j,μ =Φ i,j,μ +a i,j , where s i,j,μ represents the starting time of the time slice of the jth substream of data stream i in the μth cycle, and e i,j,μ It represents the deadline of the time slice. According to the priority of the data flow, these time slices are allocated to the corresponding priority queues in the TSN switch to obtain the gated switching time, that is, the GCL list.
6. A terminal, characterized in that: The invention comprises a processor, a memory and a program of a time-aware shaping method for high-bandwidth flows in a time-sensitive network stored in the memory. When the time-aware shaping method for high-bandwidth flows in a time-sensitive network is executed by the processor, the steps of the time-aware shaping method for high-bandwidth flows in a time-sensitive network as described in any one of claims 1 to 5 are implemented.
7. A computer-readable storage medium having computer instructions stored thereon, characterized in that: When the computer instructions are executed by a processor, the steps of the time-aware shaping method for high-bandwidth flows in a time-sensitive network as described in any one of claims 1 to 5 are implemented.
