A credit value optimization method for credit-based shapers in time-sensitive networks
Through real-time monitoring and dynamic adjustment of CBS credit recovery rate, combined with heuristic algorithm optimization idleSlope, the transmission determinism problem caused by improper bandwidth allocation in TSN is solved, and the credit value optimization effect of low latency and high bandwidth utilization is achieved.
Patent Information
- Application Number
- CN202411919388.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-25
- Publication Date
- 2025-03-21
- Estimated Expiration
- 2044-12-25
AI Technical Summary
In time-sensitive networks (TSNs), the prior art is difficult to effectively allocate bandwidth, resulting in the deterministic transmission of traffic reservations being affected, especially when bandwidth allocation is incorrect, which may weaken the transmission certainty of safety-critical systems.
By monitoring the load, frame latency and traffic priority information of time-sensitive network links in real time, the recovery rate of credit-based shaper (CBS) credit values is dynamically adjusted, and the idle slope is optimized using heuristics to accelerate the recovery of credit values and improve bandwidth utilization.
It realizes that while meeting deterministic transmission requirements and fixed bandwidth allocation, it optimizes credit value replies, significantly reduces the transmission delay of AVB streams and improves bandwidth utilization. Compared with the traditional linear credit value replies mechanism, the performance improvement is significantly improved.
Smart Images

Figure CN119363672B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communications, and in particular to a credit value optimization method for a credit-based shaper in a time-sensitive network. Background Art
[0002] The rapid development of time-critical systems such as smart cars, aerospace, and industrial automation control has put forward high-bandwidth and low-latency requirements for communication networks. However, due to the existence of non-deterministic factors such as collisions, delays, and jitter in the network, the transmission of real-time data in traditional Ethernet is often limited and is not suitable for time-critical systems. Based on traditional Ethernet, time-sensitive networking (TSN) was developed by the IEEE 802.1 working group. By introducing a time synchronization mechanism, it ensures that each node in the network has the same time reference, thereby eliminating the problems caused by time asynchrony. In addition, TSN also introduces a time-aware traffic scheduling mechanism. By prioritizing different types of data streams, it ensures that the transmission of real-time data has minimal delay and jitter. Due to its high bandwidth and time determinism, it is used in time-critical systems.
[0003] In TSN, limited latency and low transmission loss can be maintained through traffic shaping and logical bandwidth reservation. For example, the credit-based shaper (CBS) defined in IEEE 802.1Qav is a rate-based shaper, and the goal of CBS is to ensure that the maximum bandwidth required is provided for stream-reserved traffic. According to CBS, each stream-reserved traffic class has an associated configuration parameter idleSlope to prevent continuous bursts of traffic. Despite the adoption of traffic shaping and bandwidth reservation, it is still unclear how to allocate bandwidth for traffic in TSN. The potential risk of improper bandwidth allocation may even weaken the deterministic transmission of stream-reserved traffic. In addition, the lack of transmission determinism in safety-critical systems due to improper bandwidth allocation strategies is unacceptable. Therefore, Ershuai Li et al. conducted a detailed analysis of the bandwidth allocation problem in the literature (Bandwidth allocation of stream-reservation traffic in TSN.). In their case, when the proportion of type A traffic is set to 70%, the sum of the end-to-end delay of all traffic in the comprehensive case can be minimized, that is, there is an optimal traffic proportion adaptation value in the TSN network. However, when bandwidth allocation is determined, linear credit value recovery still cannot achieve the optimal effect.
[0004] Existing research has made important contributions in analyzing and optimizing the performance of TSN and CBS, but most of the research still focuses on simulation and theoretical analysis, ignoring the applicability and performance in diverse application scenarios. Summary of the invention
[0005] In order to solve the above technical problems, the present invention provides a credit value optimization method for a credit-based shaper in a time-sensitive network with simple algorithm, high bandwidth utilization and low transmission delay.
[0006] The technical solution of the present invention to solve the above technical problem is: a credit value optimization method of a credit-based shaper in a time-sensitive network, comprising the following steps:
[0007] S1: Real-time monitoring of time-sensitive network links to obtain link load, frame waiting time and traffic priority information;
[0008] S2: Determine whether the link load reaches a preset threshold. If yes, proceed to step S3. If no, restore to the default linear credit value recovery mode to ensure maximum bandwidth utilization.
[0009] S3: Dynamically adjust the recovery rate of the credit value of the credit-based shaper CBS, and accelerate the recovery of the credit value by adjusting the idle slope idleSlope;
[0010] S4: Use a heuristic algorithm to perform adaptive optimization calculation of idleSlope in combination with the dynamic changes of link load and frame waiting time;
[0011] S5: Priority management is performed on the video and audio stream, namely the AVB stream, to ensure that high-priority traffic is transmitted first and to reduce the waiting time of the AVB stream by accelerating credit value recovery.
[0012] In the above-mentioned credit value optimization method of a credit-based shaper in a time-sensitive network, in step S1, a time-sensitive network, namely, TSN, includes a switch SW, three terminal devices and a physical link, the three terminal devices are ES1, ES2 and ES3, wherein the switch and the terminal devices support the TSN protocol, and the physical link is used to connect the switch and the terminal devices;
[0013] The switch has an input port SW ES1 in and two output ports SW ES2 out , SW ES3 out , where SW ES1 in represents the input port of the switch SW connected to the terminal device ES1 for communication via a physical link, SW ES2 out and SW ES3 out Indicates the output port connected to the terminal devices ES2 and ES3 for communication through a physical link.
[0014] In the above-mentioned credit value optimization method of the credit-based shaper in the time-sensitive network, in the step S3, the object of the credit-based shaper CBS is the video and audio stream, that is, the AVB stream; when the time window of the time-triggered stream, that is, the TT stream transmission is opened, the credit amount of the AVB stream will be frozen unchanged, so the preemption mechanism of the TT stream will not affect the recovery of the credit value of the AVB stream, and therefore, the influence of the TT stream on the credit value of the AVB stream is not considered, and only the transmission of the AVB stream is analyzed, wherein the AVB stream includes the SR_A stream and the SR_B stream, the priority of the SR_A stream is higher than the SR_B stream, and both represent data sent from the sending end to the destination end;
[0015] Let F A ={F 1 A , F 2 A , ..., F n A} represents the SR_A flow set, F n A Denotes the nth SR_A stream, let F B ={F 1 B , F 2 B , ..., F n B} indicates SR_B flow set, F n B represents the nth SR_B flow; all data flows in the time-sensitive network are represented by F all ={F A ∪F B}, F all The included attributes are represented by f i ={P i , DT i , AT i , D i}, P i Represents the flow f i The transmission period, DT i Represents the flow f i Size, AT i Represents the flow f i The arrival time, D i Represents the flow f i deadline; if the traffic is schedulable, the time difference between the arrival time and departure time of the traffic at the switch exit does not exceed the deadline of the traffic, expressed as:
[0016] D≥ST-AT+DT
[0017] Among them, ST represents the sending time of the traffic, that is, the time when the traffic is sent out from the switch; AT represents the arrival time of the traffic, that is, the time when the traffic enters the switch; DT represents the size of the traffic; and D represents the cut-off time of the traffic.
[0018] In the credit value optimization method of the credit-based shaper in the time-sensitive network, in step S3, considering the data transmission in a single-hop case, the internal behavior of the switch is analyzed:
[0019] In the CBS architecture model of the node output port, each AVB flow corresponds to a first-in-first-out FIFO queue and has a CBS credit value, which is used to control the transmission of AVB frames; for each SR class flow, CBS has a credit value operated by two different parameters, namely idleSlope and sendSlope; for SR class flow, idleSlope determines the maximum bandwidth reservation of SR class flow, where the minimum bandwidth reservation is set according to the actual bandwidth usage of SR class flow; IEEE802.1Qav specifies that when transmitting SR_A flow and SR_B flow, SR_A flow and SR_B flow will only be sent when their credit values are non-negative, and the credit value of SR_A flow depends on idleSlopeA and sendSlopeA, and the credit value of SR_B flow depends on idleSlopeB and sendSlopeB, and idleSlopeA / B is related to bandwidth. This relationship is expressed as:
[0020] idleSlopeA=sendSlopeA-portTransmitRate
[0021] idleSlopeB=sendSlopeB-portTransmitRate
[0022] Where idleSlopeA is the idle slope of the SR_A stream, idleSlopeB is the idle slope of the SR_B stream; sendSlopeA is the send slope of the SR_A stream, sendSlopeB is the send slope of the SR_B stream, and portTransmitRate is the maximum transmission rate supported by the port.
[0023] In the credit value optimization method of the credit-based shaper in the time-sensitive network, in step S3, the credit value change rule is as follows:
[0024] The initial credit value is 0, and data transmission starts when the credit value is not negative;
[0025] When a message is sent, the credit value decreases as sendSlope increases over time;
[0026] When the credit value is negative and there is no data waiting to be transmitted in the queue, the credit value increases over time according to idleSlope;
[0027] When the credit value is positive and there is no data in the queue waiting to be transmitted, the credit value is reset to 0.
[0028] In the credit value optimization method of the credit-based shaper in the time-sensitive network, in step S4, when the credit value is negative, it is necessary to wait until the credit value returns to 0 before starting transmission. In this case, the credit value recovery is accelerated to allow SR traffic to return to a transmittable state as soon as possible instead of directly returning to a transmittable state; therefore, a parameter is added on the basis of the logical bandwidth, that is, the frame waiting time affects the idleSlope, so that the credit value credit can be recovered faster, as shown in the following formula:
[0029] idleSlope i =α BD i +β WT i
[0030] Among them, idleSlope i represents the idle slope of flow i, BD i represents the logical bandwidth of flow i, WT i represents the waiting time of the frame in stream i, α and β are BD i and WT i The weight of .
[0031] In the above-mentioned credit value optimization method of the credit-based shaper in the time-sensitive network, in step S4, the heuristic algorithm optimizes the credit value recovery rate according to the following parameters:
[0032] Link load: adjust the credit value recovery rate in real time based on the change of link load;
[0033] The waiting time of the frame, giving priority to accelerating the credit value recovery of the frame with long waiting time;
[0034] Logical bandwidth allocation optimizes credit value recovery by adjusting the bandwidth allocation ratio of different traffic.
[0035] The credit value optimization method of the credit-based shaper in the above-mentioned time-sensitive network also includes the operation of TT flow preempting AVB flow: when the TT flow arrives, the credit value of the AVB flow will be frozen, and after the TT flow transmission is completed, the credit value of the low-priority flow will be restored; when the credit value is negative, the AVB flow will enter a waiting state until the credit value is restored to non-negative.
[0036] The credit value optimization method of the credit-based shaper in the time-sensitive network is implemented based on an AVB traffic transmission optimization device, and the AVB traffic transmission optimization device includes:
[0037] A monitoring module for real-time monitoring of link loads in TSN networks, collecting link load, frame waiting time, and traffic priority information in real time;
[0038] A calculation module for dynamically calculating the idleSlope parameter, using a heuristic algorithm to dynamically calculate the idleSlope parameter weight according to the link load and frame waiting time;
[0039] A control module for adjusting the credit value recovery rate, which adjusts the credit value recovery rate in real time according to the calculated idleSlope parameter;
[0040] The scheduling module is used to execute the CBS mechanism and control the priority scheduling of the SR_A flow and the SR_B flow.
[0041] In the above-mentioned credit value optimization method of the credit-based shaper in the time-sensitive network, the monitoring module includes a sensor for monitoring the real-time traffic status and bandwidth usage of the link and a signal generator for triggering dynamic adjustment of the idleSlope parameter according to the monitored link traffic status; the calculation module includes a heuristic algorithm processing unit and a dynamic parameter adjustment unit, the heuristic algorithm processing unit calculates the idleSlope adjustment weight in real time according to the current link load, frame waiting time and logical bandwidth, and the dynamic parameter adjustment unit is used to adjust the credit value recovery parameter according to the calculation result.
[0042] The beneficial effects of the present invention are:
[0043] 1. The present invention analyzes how to better set the credit value response on the parameter idleSlope while meeting the deterministic transmission requirements and fixed bandwidth allocation, and proposes an improved credit value behavior to achieve lower latency and higher bandwidth utilization.
[0044] 2. The present invention introduces parameters such as frame waiting time on the basis of logical bandwidth allocation. The new credit value recovery mechanism significantly reduces the AVB stream transmission delay and increases bandwidth utilization. Experimental results show that the present invention can maintain low transmission delay and high bandwidth utilization under different load conditions, and has significantly improved performance compared to the traditional linear credit value recovery mechanism. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 It is the overall flow chart of the present invention.
[0046] Figure 2 This is a diagram of the full-duplex network architecture model of TSN.
[0047] Figure 3 This is the internal structure diagram of the TSN switch.
[0048] Figure 4 This is a diagram of the CBS traffic transmission model.
[0049] Figure 5 This is a diagram of the traditional credit value model.
[0050] Figure 6 This is a credit value model diagram of the present invention.
[0051] Figure 7 This is a comparison chart of response time analysis between the present invention and the traditional method. DETAILED DESCRIPTION
[0052] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0053] like Figure 1 As shown, a credit value optimization method of a credit-based shaper in a time-sensitive network includes the following steps:
[0054] S1: Real-time monitoring of time-sensitive network links to obtain link load, frame waiting time and traffic priority information.
[0055] Time-sensitive networking, or TSN, Figure 2 As shown, Figure 2 The full-duplex network architecture model of TSN includes a switch SW, three terminal devices and physical links. The three terminal devices are ES1, ES2 and ES3. The switch and the terminal devices support the TSN protocol, and the physical link is used to connect the switch and the terminal devices. The physical link connecting the terminal device and the switch is represented by a solid line with double arrows and is full-duplex.
[0056] The switch has an input port SW ES1 in and two output ports SW ES2 out , SW ES3 out , where SW ES1 in represents the input port of the switch SW connected to the terminal device ES1 for communication via a physical link, SW ES2 out and SW ES3 outIt represents the output port connected to the terminal devices ES2 and ES3 for communication through a physical link. The dotted line with an arrow represents the path (i.e., r1 and r2) that the traffic passes through during transmission. Routing is the directional path that transmits traffic from the sending device to the destination device. For example, r1 = (ES1-SW, SW-ES2). Table 1 lists the relevant symbols of the TSN network architecture.
[0057]
[0058] S2: Determine whether the link load reaches a preset threshold. If so, proceed to step S3. If not, restore to the default linear credit value recovery mode to ensure maximum bandwidth utilization.
[0059] S3: Dynamically adjust the recovery rate of the credit value of the credit-based shaper CBS, and accelerate the recovery of the credit value by adjusting the idle slope idleSlope.
[0060] The present invention mainly focuses on the credit value behavior of CBS, and the object of CBS is video and audio stream, that is, AVB stream, which is a shaper to prevent traffic bursts. According to the frame preemption mechanism proposed in the IEEE802.1Qbu protocol, it is used for time-triggered stream, that is, when the time window of TT stream transmission is opened, the credit amount of AVB stream will be frozen unchanged, so the preemption mechanism of TT stream will not affect the recovery of AVB stream credit value. Therefore, the influence of TT stream on AVB stream credit value is not considered, and only the transmission of AVB stream is analyzed, wherein AVB stream includes SR_A stream and SR_B stream, SR_A stream has a higher priority than SR_B stream, and both represent data sent from the sending end to the destination end.
[0061] Let F A ={F 1 A , F 2 A , ..., F n A} represents the SR_A flow set, F n A Denotes the nth SR_A stream, let F B ={F 1 B , F 2 B , ..., F n B} indicates SR_B flow set, F n B represents the nth SR_B flow; all data flows in the time-sensitive network are represented by F all ={F A ∪F B}, Fall The included attributes are represented by f i ={P i , DT i , AT i , D i}, P i Represents the flow f i The transmission period, DT i Represents the flow f i Size, AT i Represents the flow f i The arrival time, D i Represents the flow f i In addition, for simplicity, the process in the present invention only contains one frame. If the traffic is schedulable, the time difference between the arrival time and the departure time of the traffic at the switch exit does not exceed the deadline of the traffic, which is expressed as:
[0062] D ≥ ST-AT+DT
[0063] Among them, ST represents the sending time of the traffic, that is, the time when the traffic is sent out from the switch; AT represents the arrival time of the traffic, that is, the time when the traffic enters the switch; DT represents the size of the traffic; and D represents the cut-off time of the traffic.
[0064] Since we are only focusing on AVB traffic, we only need to consider data transmission in a single-hop situation, so we only analyze the internal behavior of the switch:
[0065] like Figure 3 As shown in the figure, in the CBS architecture model of the node output port, each AVB flow corresponds to a first-in-first-out FIFO queue and has a CBS credit value, which is used to control the transmission of AVB frames (for the gated list, all gates are set to open because the interference of TT flow is not considered and the calculation is more convenient); for each SR class flow, CBS has a credit value operated by two different parameters, namely idleSlope and sendSlope; for SR class flow, idleSlope determines the maximum bandwidth reservation of SR class flow, where the minimum bandwidth reservation is set according to the actual bandwidth usage of SR class flow; IEEE802.1Qav specifies that when transmitting SR_A flow and SR_B flow, SR_A flow and SR_B flow will only be sent when their credit values are non-negative, and the credit value of SR_A flow depends on idleSlopeA and sendSlopeA, and the credit value of SR_B flow depends on idleSlopeB and sendSlopeB, and idleSlopeA / B is related to bandwidth. This relationship is expressed as:
[0066] idleSlopeA=sendSlopeA-portTransmitRate
[0067] idleSlopeB=sendSlopeB-portTransmitRate
[0068] Where idleSlopeA is the idle slope of the SR_A stream, idleSlopeB is the idle slope of the SR_B stream; sendSlopeA is the send slope of the SR_A stream, sendSlopeB is the send slope of the SR_B stream, and portTransmitRate is the maximum transmission rate supported by the port.
[0069] The credit value change rules are as follows:
[0070] The initial credit value is 0, and data transmission starts when the credit value is not negative;
[0071] When a message is sent, the credit value decreases as sendSlope increases over time;
[0072] When the credit value is negative and there is no data waiting to be transmitted in the queue, the credit value increases over time according to idleSlope;
[0073] When the credit value is positive and there is no data in the queue waiting to be transmitted, the credit value is reset to 0.
[0074] exist Figure 4 In the flow BE Arriving at time t0, f BE Transmit at this time; flow f 1 A Arrives at time t1, when BE is transmitting, so f 1 A Entering the waiting queue, the credit value creditA of the SR_A class flow increases with time according to the idle slope idleSlopeA of the SR_A class flow. B Arrives at time t2 and enters the waiting queue. The credit value creditB of the SR_B class flow increases with the idle slope idleSlopeB of the SR_B flow, f BE The transmission is completed at time t3. At this time, the higher priority f is selected from the waiting queue. 1 A At this time, creditA starts to decrease with the sending slope sendSlopeA of SR_A stream, and stream f 2 A Arrives at time t4 and enters the waiting queue, f 1 AThe transmission is completed at time t5. However, creditA is negative at this time, so flow f is selected. B creditB decreases with the send slope sendSlopeB of SR_B stream, and creditA starts to increase with idleSlopeA until f B The transmission is completed at time t6. At this time, creditA is non-negative, so the transmission f 2 A , until the transfer is complete.
[0075] S4: Use a heuristic algorithm to perform adaptive optimization calculation of idleSlope in combination with the dynamic changes of link load and frame waiting time.
[0076] The above is the working principle of CBS and the changing trend of credit value, but there is a problem, such as Figure 5 As shown in the figure, after the transmission of stream f1 is completed, stream f2 arrives at time t3, but the credit value is negative at this time, and it is necessary to wait until the credit value returns to 0 before starting to transmit, which will cause additional delay of f2. This will cause the delay Di of the subsequent streams to become higher and higher. Although f2 can be transmitted during the waiting process, BE However, in this case, the credit value can be restored faster, so that the SR traffic can return to the transmittable state as soon as possible instead of directly returning to the transmittable state, which can ensure the flow f BE The transmission of SR traffic can also ensure the timely transmission of SR traffic; Figure 6 As shown, a parameter is added based on the logical bandwidth, that is, the frame waiting time to affect the idleSlope, so that the credit value credit can be recovered faster, as shown in the following formula:
[0077] idleSlope i =α BD i +β WT i
[0078] Among them, idleSlope i represents the idle slope of flow i, BD i represents the logical bandwidth of flow i, WT i represents the waiting time of the frame in stream i, α and β are BD i and WT i The weight of .
[0079] The heuristic algorithm optimizes the credit recovery rate based on the following parameters:
[0080] Link load: adjust the credit value recovery rate in real time based on the change of link load;
[0081] The waiting time of the frame, giving priority to accelerating the credit value recovery of the frame with long waiting time;
[0082] Logical bandwidth allocation optimizes credit value recovery by adjusting the bandwidth allocation ratio of different traffic.
[0083] S5: Priority management is performed on the video and audio stream, namely the AVB stream, to ensure that high-priority traffic is transmitted first and to reduce the waiting time of the AVB stream by accelerating credit value recovery.
[0084] The credit value optimization method of the credit-based shaper in the above-mentioned time-sensitive network also includes the operation of TT flow preempting AVB flow: when the TT flow arrives, the credit value of the AVB flow will be frozen, and after the TT flow transmission is completed, the credit value of the low-priority flow will be restored; when the credit value is negative, the AVB flow will enter a waiting state until the credit value is restored to non-negative.
[0085] The credit value optimization method of the credit-based shaper in the time-sensitive network is implemented based on an AVB traffic transmission optimization device, and the AVB traffic transmission optimization device includes:
[0086] A monitoring module for real-time monitoring of link loads in TSN networks, collecting link load, frame waiting time, and traffic priority information in real time;
[0087] A calculation module for dynamically calculating the idleSlope parameter, using a heuristic algorithm to dynamically calculate the idleSlope parameter weight according to the link load and frame waiting time;
[0088] A control module for adjusting the credit value recovery rate, which adjusts the credit value recovery rate in real time according to the calculated idleSlope parameter;
[0089] The scheduling module is used to execute the CBS mechanism and control the priority scheduling of the SR_A flow and the SR_B flow.
[0090] The monitoring module includes a sensor for monitoring the real-time traffic status and bandwidth usage of the link and a signal generator for triggering dynamic adjustment of the idleSlope parameter according to the monitored link traffic status; the calculation module includes a heuristic algorithm processing unit and a dynamic parameter adjustment unit, the heuristic algorithm processing unit calculates the idleSlope adjustment weight in real time according to the current link load, frame waiting time and logical bandwidth, and the dynamic parameter adjustment unit is used to adjust the credit value recovery parameter according to the calculation result.
[0091] In order to verify the effectiveness of the present invention, a series of experiments were designed and implemented, focusing on evaluating the performance of the present invention under different load conditions. The experiments simulated various network scenarios and compared the delay performance of the traditional CBS method and the method proposed in the present invention under SR_A flow (i.e., Class A flow) and SR_B flow (i.e., Class B flow).
[0092] First, the model of the present invention and the new credit algorithm are verified by comparing the real-time performance of a single node. For the real-time improvement of the credit value of the present invention, in the case of a single node, it is necessary to compare the delay evaluation results of the A and B class flows in the method of the present invention and the traditional CBS method. Since the TT flow is not involved in this scenario, only the relevant settings of the A and B class flows need to be considered. The parameter settings are shown in Table 2:
[0093]
[0094] The experiment includes the following steps:
[0095] 1. Initialize the network environment: Initialize the network simulation environment according to the above parameter settings, including traffic generation, link configuration, and node settings.
[0096] 2. Simulate traffic transmission: Generate Class A and Class B flows according to the preset arrival time and frame length, and perform single-hop transmission in the TSN network.
[0097] 3. Calculate the credit value and delay: Use the traditional CBS method and the adaptive nonlinear credit value recovery model proposed in the present invention to calculate the credit value and transmission delay of each flow.
[0098] 4. Comparative analysis: Compare the transmission delays of Class A and Class B flows under different load conditions under the two methods, and analyze the performance advantages of the new model.
[0099] The experimental results are as follows Figure 7 As shown, Figure 7 The comparison of the response time of the traditional CBS method and the method proposed in this invention for class A and class B flows under different load conditions is shown. The experimental data shows that the method of this invention exhibits excellent delay control capability under various load conditions and significantly reduces the transmission delay of class A and class B flows. Compared with the traditional method, the response time is reduced by 10%-30%.
[0100] The present invention proposes a credit value optimization method for a credit-based shaper in a time-sensitive network to improve the real-time transmission performance of AVB streams in TSN networks. By introducing parameters such as frame waiting time on the basis of logical bandwidth allocation, the new credit value recovery mechanism significantly reduces the AVB stream transmission delay and increases bandwidth utilization. Experimental results show that the method proposed in the present invention can maintain low transmission delay and high bandwidth utilization under different load conditions, and has significantly improved performance compared to the traditional linear credit value recovery mechanism. This verifies the applicability of the new model in practical applications.
Claims
1. A credit value optimization method for a credit-based shaper in a time-sensitive network, characterized in that: The following steps are involved: S1: Real-time monitoring of time-sensitive network links to obtain link load, frame waiting time and traffic priority information; S2: Determine whether the link load reaches a preset threshold. If yes, proceed to step S3. If no, restore to the default linear credit value recovery mode to ensure maximum bandwidth utilization. S3: Dynamically adjust the recovery rate of the credit value of the credit-based shaper CBS, and accelerate the recovery of the credit value by adjusting the idle slope idleSlope; In the step S3, the object of the credit-based shaper CBS is the video and audio stream, that is, the AVB stream; when the time window of the time-triggered stream, that is, the TT stream transmission, is opened, the credit of the AVB stream will be frozen and unchanged, so the preemption mechanism of the TT stream will not affect the recovery of the credit value of the AVB stream, and therefore the influence of the TT stream on the credit value of the AVB stream is not considered, and only the transmission of the AVB stream is analyzed, wherein the AVB stream includes the SR_A stream and the SR_B stream, the priority of the SR_A stream is higher than the SR_B stream, and both represent data sent from the sending end to the destination end; Let F A ={F 1 A , F 2 A , ..., F n A } represents the SR_A flow set, F n A Denotes the nth SR_A stream, let F B ={F 1 B , F 2 B , ..., F n B } represents the SR_B flow set, F n B represents the nth SR_B flow; all data flows in the time-sensitive network are represented by F all ={F A ∪F B }, F all The included attributes are represented by f i = {P i , DT i , AT i , D i }, P i Represents the flow f i The transmission period, DT i Represents the flow f i Size, AT i Represents the flow f i The arrival time, D i Represents the flow f i Deadline: If the flow is schedulable, the time difference between the arrival time and departure time of the flow at the switch exit does not exceed the deadline of the flow, expressed as: D≥ST-AT+DT Among them, ST represents the sending time of the traffic, that is, the time when the traffic is sent out from the switch; AT represents the arrival time of the traffic, that is, the time when the traffic enters the switch; DT represents the size of the traffic; D represents the cut-off time of the traffic; S4: Use a heuristic algorithm to perform adaptive optimization calculation of idleSlope in combination with the dynamic changes of link load and frame waiting time; S5: Priority management is performed on the video and audio stream, namely the AVB stream, to ensure that high-priority traffic is transmitted first and to reduce the waiting time of the AVB stream by accelerating credit value recovery.
2. The credit value optimization method of a credit-based shaper in a time-sensitive network according to claim 1, characterized in that: In step S1, a time-sensitive network, i.e., TSN, includes a switch SW, three terminal devices, and a physical link. The three terminal devices are ES1, ES2, and ES3, respectively. The switch and the terminal devices support the TSN protocol, and the physical link is used to connect the switch and the terminal devices. The switch has an input port SW ES1 in and two output ports SW ES2 out , SW ES3 out , where SW ES1 in represents the input port of the switch SW connected to the terminal device ES1 for communication via a physical link, SW ES2 out and SW ES3 out Indicates the output port connected to the terminal devices ES2 and ES3 for communication through a physical link.
3. The credit value optimization method of a credit-based shaper in a time-sensitive network according to claim 1, characterized in that: In step S3, considering the data transmission in a single-hop case, the internal behavior of the switch is analyzed: In the CBS architecture model of the node output port, each AVB flow corresponds to a first-in-first-out FIFO queue and has a CBS credit value, which is used to control the transmission of AVB frames; for each SR class flow, CBS has a credit value operated by two different parameters, namely idleSlope and sendSlope; for SR class flow, idleSlope determines the maximum bandwidth reservation of SR class flow, where the minimum bandwidth reservation is set according to the actual bandwidth usage of SR class flow; IEEE802.1Qav specifies that when transmitting SR_A stream and SR_B stream, the credit values of SR_A stream and SR_B stream are non-negative values, and the credit value of SR_A stream depends on idleSlopeA and sendSlopeA, and the credit value of SR_B stream depends on idleSlopeB and sendSlopeB. The idleSlopeA / B is related to the bandwidth. This relationship is expressed as: idleSlopeA=sendSlopeA-portTransmitRate idleSlopeB=sendSlopeB-portTransmitRate Where idleSlopeA is the idle slope of the SR_A stream, idleSlopeB is the idle slope of the SR_B stream; sendSlopeA is the send slope of the SR_A stream, sendSlopeB is the send slope of the SR_B stream, and portTransmitRate is the maximum transmission rate supported by the port.
4. The credit value optimization method of a credit-based shaper in a time-sensitive network according to claim 3, characterized in that: In step S3, the credit value change rule is as follows: The initial credit value is 0, and data transmission starts when the credit value is not negative; When a message is sent, the credit value decreases as sendSlope increases over time; When the credit value is negative and there is no data waiting to be transmitted in the queue, the credit value increases over time according to idleSlope; When the credit value is positive and there is no data in the queue waiting to be transmitted, the credit value is reset to 0.
5. The credit value optimization method of a credit-based shaper in a time-sensitive network according to claim 4, characterized in that: In step S4, when the credit value is negative, it is necessary to wait until the credit value returns to 0 before starting transmission. In this case, the credit value recovery is accelerated so that the SR traffic can return to the transmittable state as soon as possible instead of directly returning to the transmittable state. Therefore, a parameter is added based on the logical bandwidth, that is, the frame waiting time affects the idleSlope, so that the credit value credit can be recovered faster, as shown in the following formula: idleSlope i =αBD i +βWT i Among them, idleSlope i represents the idle slope of flow i, BD i represents the logical bandwidth of flow i, WT i represents the waiting time of the frame in stream i, α and β are BD i and WT i The weight of .
6. The credit value optimization method of a credit-based shaper in a time-sensitive network according to claim 5, characterized in that: In step S4, the heuristic algorithm optimizes the credit value recovery rate according to the following parameters: Link load: adjust the credit value recovery rate in real time based on the change of link load; The waiting time of the frame, giving priority to accelerating the credit value recovery of the frame with long waiting time; Logical bandwidth allocation optimizes credit value recovery by adjusting the bandwidth allocation ratio of different traffic.
7. The credit value optimization method of a credit-based shaper in a time-sensitive network according to claim 6, characterized in that: It also includes the operation of TT stream preempting AVB stream: when TT stream arrives, the credit value of AVB stream will be frozen. After the TT stream transmission is completed, the credit value of low priority traffic will be restored; When the credit value is negative, the AVB stream will enter a waiting state until the credit value returns to non-negative.
8. The credit value optimization method of a credit-based shaper in a time-sensitive network according to claim 7, characterized in that: It is implemented based on the AVB traffic transmission optimization device, which includes: A monitoring module for real-time monitoring of link loads in TSN networks, collecting link load, frame waiting time, and traffic priority information in real time; A calculation module for dynamically calculating the idleSlope parameter, using a heuristic algorithm to dynamically calculate the idleSlope parameter weight according to the link load and frame waiting time; A control module for adjusting the credit value recovery rate, which adjusts the credit value recovery rate in real time according to the calculated idleSlope parameter; The scheduling module is used to execute the CBS mechanism and control the priority scheduling of the SR_A flow and the SR_B flow.
9. The credit value optimization method of a credit-based shaper in a time-sensitive network according to claim 8, characterized in that: The monitoring module includes a sensor for monitoring the real-time traffic status and bandwidth usage of the link and a signal generator for triggering dynamic adjustment of the idleSlope parameter according to the monitored link traffic status; the calculation module includes a heuristic algorithm processing unit and a dynamic parameter adjustment unit, the heuristic algorithm processing unit calculates the idleSlope adjustment weight in real time according to the current link load, frame waiting time and logical bandwidth, and the dynamic parameter adjustment unit is used to adjust the credit value recovery parameter according to the calculation result.
Citation Information
Patent Citations
Predictable deterministic scheduling method and device suitable for quasi-dynamic link
CN113206724A
TSN traffic scheduling method based on enqueue shaping and related equipment
CN114390000A