AVB Flow Bandwidth Allocation Method, Device and Medium Based on Time Slot Pre-Allocation

By adopting a time slot pre-allocation method in AVB stream bandwidth allocation, the problems of complex computing and low bandwidth utilization in the prior art are solved, and more efficient bandwidth allocation and utilization are achieved.

CN116389269BActive Publication Date: 2025-06-24SOUTH CHINA UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310317053.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-28
Publication Date
2025-06-24
Estimated Expiration
2043-03-28

AI Technical Summary

Technical Problem

In the prior art, the AVB stream bandwidth allocation method either solves the complex calculations, affecting the bandwidth allocation results of the AVB stream, or leads to low bandwidth utilization due to the failure to consider the AVB stream scheduling sequence.

Method used

By using a time slot pre-allocation method, by obtaining the traffic data to be transmitted, the time slot is pre-allocated for the AVB stream according to the traffic scheduling mechanism, and the bandwidth parameter IdleSlopeA/B that meets the minimum transmission requirements of the AVB stream in each cycle is calculated based on the AVB queue credit value of each protection band time slot.

Benefits of technology

This method simplifies bandwidth allocation calculation, takes into account the transmission scheduling sequence of AVB streams, improves bandwidth utilization, and maximizes the bandwidth utilization of the network while ensuring the AVB stream transmission performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116389269B_ABST
    Figure CN116389269B_ABST
Patent Text Reader

Abstract

The present invention discloses an AVB stream bandwidth allocation method, device and medium based on time slot pre-allocation. The method includes: obtaining traffic data to be transmitted, including the period, transmission time, transmission deadline, and arrival time at the network node of the traffic, determining the number of periods for which time slot allocation is required, and pre-allocating time slots for the AVB streams to be transmitted according to the traffic scheduling mechanism; obtaining the credit values of class A and class B streams in the guard band time slots in each period according to the result of time slot allocation; obtaining the bandwidth parameters that meet the minimum transmission requirements of the AVB streams in each period according to the AVB queue credit values of each guard band time slot; and determining the final bandwidth parameters with reference to the type of the last stream transmitted before the guard band time slot in the first period. The present invention takes into account the transmission scheduling order of AVB streams, obtains the bandwidth allocation result based on the minimum credit value requirement of the AVB queue traffic in each scheduling period, and has a simple calculation method. The present invention can be widely applied to the field of network communication technology.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the fields of network communication technology and industrial Internet, and particularly to a method, device and medium for AVB flow bandwidth allocation based on time slot pre-allocation. Background Art

[0002] As a new generation of Ethernet technology, Time Sensitive Network (TSN) plays an increasingly important role in fields such as industrial control and vehicle networks because it can ensure low-latency and low-jitter transmission of time-sensitive traffic. The IEEE Time Sensitive Network Working Group has developed a series of protocols to ensure deterministic transmission of time-sensitive traffic. For example, IEEE 802.1AS proposes the general precise time protocol (gPTP) to ensure clock synchronization of the global network. On this basis, the time-aware shaper (TAS) defined by IEEE 802.1Qbv is used to precisely schedule time-triggered (TT) flows, and the Credit-Based Shaper (CBS) mechanism defined by IEEE 802.1Qav is used to transmit audio video bridging (AVB) flows. In TSN, AVB flows are mainly transmitted based on CBS. Only when the credit value of the AVB queue is non-negative can the traffic in this queue be transmitted, and the change of the queue credit value is controlled by the logical bandwidth parameter IdleSlope. If IdleSlope is too small, the traffic will queue in the queue waiting for the credit value to recover, resulting in excessive delay; if IdleSlope is too large, it will lead to excessive accumulation of traffic, affecting the transmission of subsequent nodes. Therefore, in order to maximize the guarantee of AVB traffic transmission performance and improve bandwidth utilization under limited bandwidth resources, it is very meaningful to reasonably configure the logical bandwidth IdleSlope of the port.

[0003] However, there are mainly two ways to configure the bandwidth parameters IdleSlopeA / B in CBS: 1. Conduct the worst-case delay analysis of AVB flows based on network calculus, and then use a heuristic algorithm to solve for the bandwidth; 2. Calculate the bandwidth parameters based on the data rate ratio. The following is a brief introduction:

[0004] Prior Art One: Conduct the worst-case delay analysis of AVB flows based on network calculus, and then use a heuristic algorithm to solve for the bandwidth.

[0005] Principle: Analyze the worst-case transmission delay of AVB flows based on network calculus, then set the objective function and relevant constraint conditions, and use a heuristic algorithm to solve for the bandwidth value that satisfies the constraints.

[0006] Disadvantages: Network calculus always analyzes the transmission situation of AVB streams from the worst-case scenario. However, in the actual transmission process, the probability of the worst-case scenario occurring is relatively low. Therefore, its pessimism is relatively large, and its objective function and constraints are relatively complex, and there may not be an optimal solution, which affects the transmission scheduling of AVB streams.

[0007] Prior art two: Calculating bandwidth parameters based on the data rate ratio.

[0008] Principle: Considering the soft real-time characteristics of AVB streams, even if the AVB stream transmission exceeds its deadline, it will not cause system failures. Therefore, the existing method calculates the bandwidth parameters IdleSlopeA / B according to the data rate ratio (load / cycle) of the AVB stream.

[0009] Disadvantages: This method calculates the required reserved bandwidth parameters according to the traffic characteristics transmitted in the network. Since it only focuses on the traffic characteristics and ignores the scheduling order of AVB streams, the obtained bandwidth results in low bandwidth utilization in the network.

[0010] In summary, the existing methods for AVB stream bandwidth allocation either have complex bandwidth solutions, which affect the bandwidth allocation results of AVB streams, or have low bandwidth utilization due to not considering the AVB stream scheduling order. Summary of the Invention

[0011] To at least partially solve one of the technical problems existing in the prior art, the object of the present invention is to provide a method, device, and medium for AVB stream bandwidth allocation based on time slot pre-allocation.

[0012] The technical solution adopted by the present invention is as follows:

[0013] A method for AVB stream bandwidth allocation based on time slot pre-allocation includes the following steps:

[0014] Obtain the traffic data to be transmitted, including the period, transmission time, transmission deadline, and arrival time at the network node of the traffic, and determine the number of periods N for which time slot allocation needs to be performed t , and pre-allocate time slots for the AVB streams to be transmitted according to the traffic scheduling mechanism;

[0015] Obtain the credit values of the guard band time slots for class A and class B streams in each period according to the time slot allocation result;

[0016] Obtain the bandwidth parameters IdleSlopeA / B that meet the minimum transmission requirements of AVB streams in each period according to the AVB queue credit values of each guard band time slot;

[0017] Determine the final bandwidth parameters IdleSlopeA / B with reference to the type of the last stream transmitted before the guard band time slot in the first cycle.

[0018] Further, the cycle is based on the scheduling cycle T of the gating list TAS as the unit;

[0019] The number of cycles where P i represents the cycle of the i-th AVB stream, and lcm(P i ) represents the least common multiple of all AVB traffic cycles, and the maximum value of the number of cycles N t is default set to 10;

[0020] The credit value of the AVB queue remains unchanged during the guard band time slot.

[0021] Further, the method for obtaining the traffic data to be transmitted and determining the number of cycles N for which time slot allocation is required t , and pre-allocating time slots for the AVB streams to be transmitted according to the traffic scheduling mechanism, includes:

[0022] If neither queue A nor queue B is empty during the time slot allocation process, select the streams in queues A and B crosswise according to the FIFO (First In First Out) principle to allocate transmission time slots for the AVB streams until there are no remaining allocable time slots in this cycle; during this process, the recovery time of the class A credit value is the transmission time of the class B stream at the next moment, and the recovery time of the class B credit value is the transmission time of the class A stream at the next moment; at the start of the transmissible time slot, preferentially select the class A stream for time slot allocation;

[0023] If either queue A or queue B is empty during the time slot allocation process, set the credit value recovery time to the AVB stream with the minimum transmission time, that is, if queue B is empty after a certain class A stream completes transmission, the credit value recovery time of the class A stream is the minimum transmission time of the class B stream, and if queue A is empty after a certain class B stream completes transmission, the credit value recovery time of the class B stream is the minimum transmission time of the class A stream.

[0024] Further, the credit values of the traffic in queues A and B in the guard band of the j-th cycle are expressed as the credit values of queues A and B before the end of the (j - 1)-th cycle plus the change in the credit value in the j-th cycle, and are represented by the formula:

[0025]

[0026] where j ∈ (1, N t ), SendSlopeA / B = IdleSlopeA / B - C, and C represents the maximum transmission rate of the port, Indicates the total time for the reduction of the credit value of Class A traffic in the j-th period, Indicates the total time for the increase of the credit value of Class A traffic in the j-th period, Indicates the total time for the reduction of the credit value of Class B traffic in the j-th period, Indicates the total time for the increase of the credit value of Class B traffic in the j-th period, starting from the minimum credit value requirement for queue transmission, so

[0027] Furthermore, obtaining the bandwidth parameter IdleSlopeA / B that meets the minimum transmission requirement of the AVB traffic in each period according to the AVB queue credit value of each guard band time slot includes:

[0028] If the last traffic transmitted before the GB time slot in the j-th period is Class B traffic, then let Obtain the minimum value of IdleSlopeA and the maximum value of IdleSlopeB in the j-th period, that is:

[0029]

[0030]

[0031] If the last traffic transmitted before the GB time slot in the j-th period is Class A traffic, then let Obtain the maximum value of IdleSlopeA and the minimum value of IdleSlopeB in the j-th period, that is:

[0032]

[0033]

[0034] Among them, γ is the bandwidth coefficient, and C represents the maximum transmission rate of the port, Indicates the total time for the reduction of the credit value of Class A traffic in the j-th period, Indicates the total time for the increase of the credit value of Class A traffic in the j-th period, Indicates the total time for the reduction of the credit value of Class B traffic in the j-th period, Indicates the total time for the increase of the credit value of Class B traffic in the j-th period.

[0035] Furthermore, using the type of the last traffic transmitted before the guard band time slot in the first period as a reference to determine the final bandwidth parameter IdleSlopeA / B includes:

[0036] If the transmission type of the last traffic before the GB time slot in the first period is Class B traffic, then IdleSlopeA is the maximum value of all IdleSlopeA in the previous N t cycles, and IdleSlopeB is the maximum value of all IdleSlopeB in the previous N min cycles,t The minimum value of all IdleSlopeB in one cycle, i.e.: max

[0037]

[0038]

[0039] If the transmission type of the last stream before the GB time slot in the first cycle is type A stream, then IdleSlopeA is the minimum value of all IdleSlopeA in the previous N t cycles, and IdleSlopeB is the maximum value of all IdleSlopeB in the previous N max cycles, i.e.: t cycles, and IdleSlopeB is the maximum value of all IdleSlopeB in the previous N min cycles, i.e.:

[0040]

[0041]

[0042] Another technical solution adopted by the present invention is:

[0043] An AVB stream bandwidth allocation device based on time slot pre-allocation, comprising:

[0044] At least one processor;

[0045] At least one memory for storing at least one program;

[0046] When the at least one program is executed by the at least one processor, the at least one processor implements the above method.

[0047] Another technical solution adopted by the present invention is:

[0048] A computer-readable storage medium, in which a processor-executable program is stored, and the processor-executable program is used to execute the above method when executed by a processor.

[0049] The beneficial effects of the present invention are as follows: Starting from the AVB traffic characteristics itself, the present invention considers the transmission scheduling order of AVB streams, obtains the bandwidth allocation result based on the minimum credit value requirement of the AVB queue traffic in each scheduling cycle, the calculation method is simple, and while ensuring the transmission performance of AVB streams as much as possible, the bandwidth utilization rate of the network is maximized. Description of the Drawings

[0050] ​To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following introduces the accompanying drawings of the relevant technical solutions in the embodiments of the present invention or the prior art. It should be understood that the accompanying drawings in the following introduction are only for conveniently and clearly presenting some embodiments of the technical solutions of the present invention. For those skilled in the art, without creative efforts, other accompanying drawings can be obtained based on these drawings.

[0051] Figure 1 It is a schematic diagram of the steps of a method for allocating AVB stream bandwidth based on time slot pre-allocation in an embodiment of the present invention;

[0052] Figure 2 It is a schematic diagram of credit-based shaping (CBS) in an embodiment of the present invention;

[0053] Figure 3 It is a flowchart of a bandwidth allocation algorithm in an embodiment of the present invention. Detailed implementation manners

[0054] The embodiments of the present invention are described in detail below. The examples of the embodiments are shown in the accompanying drawings, where the same or similar reference numerals represent the same or similar elements or elements with the same or similar functions throughout. The embodiments described by referring to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as a limitation to the present invention. For the step numbers in the following embodiments, they are only set for the convenience of elaboration and explanation, and no limitation is imposed on the order between the steps. The execution order of each step in the embodiments can be adaptively adjusted according to the understanding of those skilled in the art.

[0055] In the description of the present invention, it should be understood that for the orientation description, such as the orientation or positional relationship indicated by up, down, front, back, left, right, etc., is based on the orientation or positional relationship shown in the accompanying drawings. It is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be construed as a limitation to the present invention.

[0056] In the description of the present invention, the meaning of several is one or more, the meaning of multiple is two or more, greater than, less than, exceeding, etc. are understood as not including the present number, and above, below, within, etc. are understood as including the present number. If there is a description of first and second, it is only for the purpose of distinguishing technical features and should not be understood as indicating or implying relative importance or implicitly indicating the quantity of the indicated technical features or implicitly indicating the sequence of the indicated technical features.

[0057] In the description of the present invention, unless otherwise clearly defined, terms such as "set", "install", "connect", etc. should be understood in a broad sense, and those skilled in the art can reasonably determine the specific meanings of the above terms in the present invention in combination with the specific content of the technical solution.

[0058] Term Explanation:

[0059] GB time slot: To ensure the deterministic transmission of the TT stream, the TSN introduces a guard band mechanism, and a guard band time slot (GB time slot) is added before the start of the TT stream transmission time slot, so as to prevent interference from other traffic to the TT stream transmission.

[0060] Queue A: Usually, traffic with the same priority will enter the same forwarding queue of the switch. Queue A refers to the switch forwarding queue where Class A traffic is located.

[0061] Queue B: Queue B refers to the switch forwarding queue where Class B traffic is located.

[0062] Class A traffic: The AVB traffic is mainly divided into two categories (Class A traffic and Class B traffic), and Class A traffic has a higher priority.

[0063] Class B traffic: Class B traffic has a lower priority.

[0064] As Figure 1 described above, this embodiment provides a method for allocating the bandwidth of AVB traffic based on time slot pre-allocation in TSN, which is used to solve the problem that the bandwidth allocation in the existing TSN is either computationally complex or has a low bandwidth utilization rate due to improper bandwidth allocation although the calculation is simple, and can improve the traffic schedulability while improving the bandwidth utilization rate. The method specifically includes the following steps:

[0065] S101: Obtain the traffic data to be transmitted, including the period, transmission time, transmission deadline, and arrival time at the network node of the traffic, and determine the number of periods N for which time slot allocation is required t , and pre-allocate transmission time slots for the AVB traffic to be transmitted according to the traffic scheduling mechanism;

[0066] S102: Obtain the credit values of the guard band time slot Class A traffic and Class B traffic in the first N t periods according to the result of the time slot allocation;

[0067] S103: Obtain the bandwidth parameters IdleSlopeA / B that meet the minimum transmission requirements of the AVB traffic in each period according to the credit value of the AVB queue in each guard band time slot;

[0068] S104: Determine the final bandwidth parameters IdleSlopeA / B with reference to the type of the last traffic transmitted before the guard band time slot in the first period.

[0069] AsFigure 2 The figure shows a schematic diagram of CBS shaping. The TT stream is transmitted during the specified time slots in the gating list, and the AVB stream is transmitted during non-TT transmission time slots. When a certain type of AVB stream is transmitted, the credit value of this type of traffic decreases at the rate of IdleSlope. After the transmission is completed, the credit value of this type of traffic increases at the rate of SendSlope. The credit value of the AVB queue remains unchanged during the guard band GB time slots and TT time slots.

[0070] As Figure 3 shown, Figure 3 This is a flowchart of the bandwidth allocation algorithm in an embodiment of the present invention, including the following steps:

[0071] S301: Obtain the traffic data to be transmitted.

[0072] S302: Assign the iterator j to 1.

[0073] S303: Obtain the AVB queue queued for transmission in the j-th cycle and

[0074] S304: If both queue A and queue B are not empty, go to step 305; otherwise, go to step 306.

[0075] S305: Cross-select the flows in queue A and queue B according to the FIFO principle to allocate transmission time slots for them until there are no remaining allocable time slots in this cycle. During this process, the recovery time of the credit value of type A is the transmission time of type B flow at the next moment, and the recovery time of the credit value of type B is the transmission time of type A flow at the next moment. At the beginning of the allocable time slot, preferentially select type A flow for time slot allocation;

[0076] The cycle is based on the scheduling cycle T TAS of the gating list. The number of cycles where P i represents the cycle of the i-th AVB flow, and lcm(P i ) represents the least common multiple of the cycles of all AVB traffic, and the maximum value of N t is default set to 10. The credit value of the AVB queue remains unchanged during the guard band time slots.

[0077] S306: Set the credit value recovery time to the AVB flow with the minimum transmission time, that is, if queue B is empty after a certain type A flow completes transmission, the credit value recovery time of type A flow is the minimum transmission time of type B flow; if queue A is empty after a certain type B flow completes transmission, the credit value recovery time of type B flow is the minimum transmission time of type A flow.

[0078] S307: Calculate the credit values of queues A and B in the GB time slots. The credit values of queues A and B before the end of the j-th cycle can be expressed as the credit values of the traffic in queues A and B before the end of the (j - 1)-th cycle plus the change in the credit value in the j-th cycle. Expressed by the formula as:

[0079]

[0080] where j ∈ (1, N t ), SendSlopeA / B = IdleSlopeA / B - C, where C represents the maximum transmission rate of the port, represents the total time during which the credit value of class A traffic decreases in the j-th cycle, represents the total time during which the credit value of class A traffic increases in the j-th cycle, represents the total time during which the credit value of class B traffic decreases in the j-th cycle, represents the total time during which the credit value of class B traffic increases in the j-th cycle. Starting from the minimum requirement of the credit value transmitted by the queue, so

[0081] S308: If the last flow transmitted before the GB time slot in the j-th cycle is class B traffic, then go to step 309; otherwise, go to step 310.

[0082] S309: Let obtain the minimum value of IdleSlopeA and the maximum value of IdleSlopeB in the j-th cycle, that is:

[0083]

[0084]

[0085] S310: Let obtain the maximum value of IdleSlopeA and the minimum value of IdleSlopeB in the j-th cycle, that is:

[0086]

[0087]

[0088] where γ is the bandwidth coefficient.

[0089] S311: Increment the iterator j by 1.

[0090] S312: Determine whether the iterator j is greater than N t , if so, then go to step S313; otherwise, go to S303.

[0091] S313: If the transmission type of the last stream before the GB time slot in the first cycle is Class B stream, go to step S314; otherwise, go to S315.

[0092] S314: IdleSlopeA is the maximum value of all IdleSlopeA in the previous N t cycles, and IdleSlopeB is the minimum value of all IdleSlopeB in the previous N min cycles, that is: t cycles, that is: max Obtain the final values of IdleSlopeA / B, and the process ends.

[0093]

[0094]

[0095] Obtain the final values of IdleSlopeA / B, and the process ends.

[0096] S315: IdleSlopeA is the minimum value of all IdleSlopeA in the previous N t cycles, and IdleSlopeB is the maximum value of all IdleSlopeB in the previous N max cycles, that is: t cycles, that is: min Obtain the final values of IdleSlopeA / B, and the process ends.

[0097]

[0098]

[0099] Obtain the final values of IdleSlopeA / B, and the process ends.

[0100] This embodiment also provides an AVB stream bandwidth allocation device based on time slot pre-allocation, including:

[0101] At least one processor;

[0102] At least one memory for storing at least one program;

[0103] When the at least one program is executed by the at least one processor, the at least one processor implements Figure 1 the method shown.

[0104] An AVB stream bandwidth allocation device based on time slot pre-allocation in this embodiment can execute an AVB stream bandwidth allocation method provided by an embodiment of the present invention, can execute any combination of implementation steps of the method embodiment, and has corresponding functions and beneficial effects of the method.

[0105] Embodiments of the present application also disclose a computer program product or a computer program. The computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the computer device may read the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, causing the computer device to execute Figure 1 the method shown.

[0106] This embodiment also provides a storage medium storing instructions or programs executable for a method for allocating AVB stream bandwidth based on time slot pre-allocation provided by the method embodiment of the present invention. When the instructions or programs are run, any combination of implementation steps of the method embodiment can be executed, and the corresponding functions and beneficial effects of the method are provided.

[0107] In some alternative embodiments, the functions / operations mentioned in the block diagrams may not occur in the order mentioned in the operating diagrams. For example, depending on the functions / operations involved, two consecutive blocks shown may actually be executed substantially simultaneously or the blocks can sometimes be executed in the reverse order. In addition, the embodiments presented and described in the flowcharts of the present invention are provided by way of example for the purpose of providing a more comprehensive understanding of the technology. The disclosed methods are not limited to the operations and logical flows presented herein. Alternative embodiments are contemplated in which the order of various operations is changed and sub-operations described as part of a larger operation are performed independently.

[0108] Furthermore, although the present invention has been described in the context of functional modules, it should be understood that, unless otherwise stated to the contrary, one or more of the functions and / or features may be integrated in a single physical device and / or software module, or one or more functions and / or features may be implemented in separate physical devices or software modules. It should also be understood that a detailed discussion of the actual implementation of each module is not necessary for understanding the present invention. Rather, given the attributes, functions, and internal relationships of the various functional modules in the devices disclosed herein, the actual implementation of the modules will be understood within the ordinary skills of an engineer. Thus, those skilled in the art can implement the present invention as set forth in the claims without undue experimentation. It should also be understood that the specific concepts disclosed are illustrative only and are not intended to limit the scope of the present invention, which is determined by the full scope of the appended claims and their equivalents.

[0109] If the above-mentioned functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on such understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The foregoing storage medium includes: USB flash drives, mobile hard disks, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical discs, etc., which can store program codes of various kinds.

[0110] The logic and / or steps represented in the flowchart or described in other ways herein, for example, can be considered as a definite sequence list of executable instructions for implementing logical functions, and can be specifically implemented in any computer-readable medium for use by an instruction execution system, apparatus, or device (such as a computer-based system, a system including a processor, or other systems that can fetch and execute instructions from the instruction execution system, apparatus, or device), or in combination with these instruction execution systems, apparatus, or devices. For the purposes of this specification, a "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.

[0111] More specific examples (non-exhaustive list) of computer-readable media include the following: electrical connection parts (electronic devices) having one or more wirings, portable computer disk cartridges (magnetic devices), random access memories (RAMs), read-only memories (ROMs), erasable programmable read-only memories (EPROMs or flash memories), optical fiber devices, and portable compact disc read-only memories (CDROMs). Additionally, the computer-readable medium can even be paper or other suitable media on which the program can be printed, because the program can be obtained electronically, for example, by optically scanning the paper or other media, then editing, interpreting, or processing it in other suitable ways as necessary, and then storing it in a computer memory.

[0112] It should be understood that various parts of the present invention can be implemented by hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, any one or a combination of the following techniques well known in the art can be used: discrete logic circuits with logic gate circuits for implementing logic functions on data signals, application specific integrated circuits with appropriate combinational logic gate circuits, programmable gate arrays (PGAs), field programmable gate arrays (FPGAs), etc.

[0113] In the above description of this specification, the descriptions referring to the terms "one embodiment / example", "another embodiment / example", or "certain embodiments / examples", etc. mean that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.

[0114] Although the embodiments of the present invention have been shown and described, those of ordinary skill in the art can understand that various changes, modifications, substitutions, and variations can be made to these embodiments without departing from the principles and spirit of the present invention, and the scope of the present invention is defined by the claims and their equivalents.

[0115] The above has specifically described the preferred embodiments of the present invention, but the present invention is not limited to the above embodiments. Those skilled in the art can also make various equivalent deformations or substitutions without departing from the spirit of the present invention, and these equivalent deformations or substitutions are all included within the scope defined by the claims of this application.

Claims

1. An AVB stream bandwidth allocation method based on time slot pre-allocation, characterized in that including the following steps: Obtain the traffic data to be transmitted, including the period of the traffic, the transmission time, the transmission deadline, the time of arrival at the network node, and determine the number of periods N for which time slot allocation is required. t , and pre-allocate time slots for the AVB streams to be transmitted according to the traffic scheduling mechanism; Obtain the credit values of Class A and Class B flows in the guard band time slots in each cycle according to the result of time slot allocation; Obtain the bandwidth parameters IdleSlopeA / B that meet the minimum transmission requirements of AVB flows in each cycle according to the AVB queue credit values of each guard band time slot; Determine the final bandwidth parameters IdleSlopeA / B with reference to the type of the last flow transmitted before the guard band time slot in the first cycle.

2. The AVB stream bandwidth allocation method based on time slot pre-allocation according to claim 1, characterized in that The period is based on the scheduling period T of the gating list TAS as the unit; The number of periods where P i represents the period of the i-th AVB stream, and lcm(P i ) represents the least common multiple of all AVB traffic periods, and the maximum value of the number of periods N t is default set to 10.

3. The AVB stream bandwidth allocation method based on time slot pre-allocation according to claim 1, wherein Obtain the traffic data to be transmitted and determine the number of cycles N for which time slot allocation is required t , and pre-allocate time slots for the AVB streams to be transmitted according to the traffic scheduling mechanism, including: If neither the A queue nor the B queue is empty during the time slot allocation process, cross-select the flows in the A and B queues according to the FIFO principle to allocate transmission time slots for the AVB flows until there are no remaining allocable time slots in this cycle; during this process, the recovery time of the Class A credit value is the transmission time of the Class B flow at the next moment, and the recovery time of the Class B credit value is the transmission time of the Class A flow at the next moment; If either the A queue or the B queue is empty during the time slot allocation process, set the credit value recovery time to the AVB flow with the minimum transmission time.

4. A method for allocating the bandwidth of an AVB stream based on time slot pre-allocation according to claim 1, characterized in that, The credit values of the A and B traffic in the guard band of the j-th cycle are expressed as the credit values of the A and B queues before the end of the (j - 1)-th cycle plus the change in the credit value in the j-th cycle, which is expressed by the formula: where j ∈ (1, N t ), SendSlopeA / B = IdleSlopeA / B - C, where C represents the maximum transmission rate of the port, represents the total time for the credit value of Class A traffic to decrease in the j-th period, represents the total time for the credit value of Class A traffic to increase in the j-th period, represents the total time for the credit value of Class B traffic to decrease in the j-th period, represents the total time for the credit value of Class B traffic to increase in the j-th period. Starting from the minimum credit value requirement for queue transmission, so 5. A method for AVB stream bandwidth allocation based on time slot pre-allocation according to claim 1, characterized in that, The obtaining of the bandwidth parameters IdleSlopeA / B that meet the minimum transmission requirements of AVB flows in each cycle according to the AVB queue credit values of each guard band time slot includes: If the last stream transmitted before the GB time slot in the j-th period is a Class B stream, then let Obtain the minimum value of IdleSlopeA and the maximum value of IdleSlopeB in the j-th period, that is: If the last stream transmitted before the GB time slot in the j-th cycle is a Class A stream, then let Obtain the maximum value of IdleSlopeA and the minimum value of IdleSlopeB in the j-th cycle, that is: where γ is the bandwidth coefficient, and C represents the maximum transmission rate of the port. represents the total time for the credit value of Class A traffic to decrease in the j-th period. represents the total time for the credit value of Class A traffic to increase in the j-th period. represents the total time for the credit value of Class B traffic to decrease in the j-th period. represents the total time for the credit value of Class B traffic to increase in the j-th period.

6. The AVB stream bandwidth allocation method based on time slot pre - allocation according to claim 1, characterized in that, The determining of the final bandwidth parameters IdleSlopeA / B with reference to the type of the last flow transmitted before the guard band time slot in the first cycle includes: If the transmission type of the last stream before the GB time slot in the first period is type B stream, then IdleSlopeA is the maximum value of all IdleSlopeA in the previous N t cycles, and IdleSlopeB is the minimum value of all IdleSlopeB in the previous N min cycles, that is: t cycles, and IdleSlopeB is the minimum value of all IdleSlopeB in the previous N max cycles, that is: If the transmission type of the last stream before the GB time slot in the first cycle is Class A stream, then IdleSlopeA is the minimum value of all IdleSlopeA in the previous N t cycles, and IdleSlopeB is the maximum value of all IdleSlopeB in the previous N max cycles, that is: t cycles, namely: min the maximum value, that is:

7. An AVB stream bandwidth allocation device based on time slot pre-allocation, characterized in that, including: at least one processor; at least one memory for storing at least one program; When the at least one program is executed by the at least one processor, the at least one processor implements the method according to any one of claims 1-6.

8. A computer-readable storage medium storing a program executable by a processor, characterized in that, The program executable by the processor is used to execute the method according to any one of claims 1-6 when executed by the processor.