Deterministic traffic scheduling method, device, equipment, medium and program product

By designing a deterministic traffic scheduling method in the TSN network, the problem of low latency and low jitter guarantee for delay-sensitive services in the case of distributed new energy access is solved, and the end-to-end low latency and low jitter transmission is achieved, which improves the deterministic communication capabilities of the power communication network.

CN119766737APending Publication Date: 2025-04-04STATE GRID LIAONING ELECTRIC POWER CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411713399.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-27
Publication Date
2025-04-04

Smart Images

  • Figure CN119766737A_ABST
    Figure CN119766737A_ABST
Patent Text Reader

Abstract

The present invention provides a deterministic traffic scheduling method, device, equipment, medium and program product, the method comprising: obtaining a traffic set and network scheduling parameters under a TSN network; solving a target minimum scheduling time slot and a target queue shaping parameter based on the traffic set and the network scheduling parameters; increasing the sampling period of the ST flow based on the target minimum scheduling time slot to obtain a target sampling period of the ST flow; reducing the reserved bandwidth of the SR flow based on the target queue shaping parameter to obtain a target reserved bandwidth of the SR flow; and performing deterministic traffic scheduling based on the target sampling period and the target reserved bandwidth. The deterministic traffic scheduling method provided by the present invention, when adopting TSN technology, can reduce the end-to-end transmission delay of the BE flow as much as possible by maximizing the actual sampling period of the ST flow and minimizing the reserved bandwidth of the SR flow, thereby providing end-to-end low delay, low jitter and other guarantees for delay-sensitive services and improving the network deterministic capability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication network technology, and in particular to a deterministic traffic scheduling method, device, equipment, medium and program product. Background Art

[0002] In recent years, distributed renewable energy has been widely used in power systems. However, a large number of uncontrollable distributed energy sources such as wind power and photovoltaic power are greatly affected by nature, and the actual output has great randomness and volatility. If they are not guided and controlled in time, it will cause problems such as reduced power supply reliability. Secondly, due to the characteristics of large-scale storage of electric energy, high-penetration distributed energy needs to be used immediately after being connected to the power grid. If the power load of the corresponding capacity is not enabled in time, wind and solar power can only be abandoned, resulting in a large amount of renewable energy waste. Finally, there are many access points, different access distances, and complex access protocols in the access of distributed energy, resulting in low reliability of synchronous operation of the entire power system and poor clock credibility, which further affects the efficiency and quality of centralized control. Under this situation, the technical route of combining time-sensitive networking (TSN) technology with power-specific communication standards is the current research hotspot of power deterministic network communication. Therefore, it is of great significance to realize clock synchronization and end-to-end delay control of control tasks based on TSN in the power communication network for distributed energy control.

[0003] However, the existing deterministic network scheduling method mainly controls the sending time and transmission path of data packets to ensure that the data flow in the network meets specific delay and reliability requirements. However, the access of a large number of distributed renewable energy sources will bring challenges to the delay determinism of the power communication network, making it difficult to provide end-to-end low delay, low jitter and other guarantees for delay-sensitive services. Summary of the invention

[0004] The present invention provides a deterministic traffic scheduling method, device, equipment, medium and program product to solve the problem of difficulty in providing end-to-end low delay, low jitter and other guarantees for delay-sensitive services.

[0005] In a first aspect, the present invention provides a deterministic traffic scheduling method, comprising: Obtain a traffic set and network scheduling parameters in a TSN network; the traffic set includes at least a time-sensitive traffic ST flow and a large bandwidth periodic traffic SR flow; Based on the traffic set and the network scheduling parameters, solving the target minimum scheduling time slot and the target queue shaping parameters; Based on the target minimum scheduling time slot, increasing the sampling period of the ST flow to obtain a target sampling period of the ST flow; Based on the target enqueue shaping parameter, reducing the reserved bandwidth of the SR flow to obtain a target reserved bandwidth of the SR flow; Deterministic traffic scheduling is performed based on the target sampling period and the target reserved bandwidth.

[0006] In one embodiment, solving the target minimum scheduling time slot based on the traffic set and the network scheduling parameters includes: Determining an SR flow period based on the traffic set and the network scheduling parameter; Calculate the greatest common divisor of the SR flow period; Determining a set of factors of the greatest common divisor; Arrange the factors in the factor set in ascending order to obtain an arrangement result; Determine the first factor in the arrangement result as the minimum time scheduling unit; If the minimum time scheduling unit satisfies the minimum time slot constraint, determining the first factor as the target minimum scheduling time slot; If the minimum time scheduling unit does not meet the minimum time slot constraint, the next factor of the first factor is updated to the first factor, and the step of determining the first factor in the arrangement result as the minimum time scheduling unit is iteratively executed until the minimum time scheduling unit meets the minimum time slot constraint.

[0007] In one embodiment, increasing the sampling period of the ST stream based on the target minimum scheduling time slot to obtain the target sampling period of the ST stream includes: Based on the target minimum scheduling time slot, increasing the sampling period of the ST flow to obtain an initial sampling period of the ST flow; If the initial sampling period satisfies the gating constraint, determining the initial sampling period as the target sampling period; If the initial sampling period does not satisfy the gating constraint, the next factor of the first factor is updated to the first factor, and the step of determining the first factor in the arrangement result as the minimum time scheduling unit is iteratively performed until the initial sampling period satisfies the gating constraint.

[0008] In one embodiment, solving a target queue shaping parameter based on the traffic set and the network scheduling parameter includes: Determine the traffic set and the network scheduling parameters as model input data; A particle swarm optimization algorithm is used to solve the optimization problem in the traffic scheduling model based on the model input data to obtain the target enqueue shaping parameter; the optimization problem is used to solve how to minimize the reserved bandwidth by adjusting the enqueue shaping parameter of the SR flow; the SR flow includes an SR_A flow and an SR_B flow; the target enqueue shaping parameter includes a first enqueue shaping parameter of the SR_A flow and a second enqueue shaping parameter of the SR_B flow.

[0009] In one embodiment, the optimization problem is expressed as follows:

[0010] in, Indicates the total door opening time of the SR queue in a cycle. The SR queue includes the SR_A queue and the SR_B queue. Indicates the cycle period of the gate list; is the first enqueue shaping parameter, indicating the total number of data frames of the SR_A stream entering the SR_A queue from the Kth buffer, Indicates the total number of data frames of the SR_A stream entering the SR_A queue from all buffers at once; is the second enqueue shaping parameter, indicating the total number of data frames of the SR_B flow entering the SR_B queue from the Kth buffer, Indicates the total number of data frames of the SR_B flow that enter the SR_B queue from all buffers at one time.

[0011] In one embodiment, the traffic scheduling model is constructed in the following manner: Determine a minimum time slot constraint, a gating constraint, an ST flow constraint, and an SR flow constraint based on the traffic set and the network scheduling parameters; A traffic scheduling model is constructed based on the minimum time slot constraint, the gating constraint, the ST flow constraint and the SR flow constraint.

[0012] In a second aspect, the present invention further provides a deterministic traffic scheduling device, comprising: An acquisition module is used to acquire a traffic set and network scheduling parameters in a TSN network; the traffic set includes at least a time-sensitive traffic ST flow and a large bandwidth periodic traffic SR flow; A solution module, used for solving a target minimum scheduling time slot and a target queue shaping parameter based on the traffic set and the network scheduling parameter; A first adjustment module, configured to increase the sampling period of the ST flow based on the target minimum scheduling time slot to obtain a target sampling period of the ST flow; A second adjustment module, configured to reduce the reserved bandwidth of the SR flow based on the target enqueue shaping parameter to obtain a target reserved bandwidth of the SR flow; A deterministic traffic scheduling module is used to perform deterministic traffic scheduling based on the target sampling period and the target reserved bandwidth.

[0013] In a third aspect, the present invention provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of any of the above-described deterministic traffic scheduling methods are implemented.

[0014] In a fourth aspect, the present invention further provides a computer-readable storage medium, comprising a non-transitory computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps of the deterministic traffic scheduling method as described in any one of the above are implemented.

[0015] In a fifth aspect, the present invention also provides a computer program product, which includes a computer program, which can be stored on a non-transitory computer-readable storage medium, and when the computer program is executed by the processor, it implements the steps of any of the deterministic traffic scheduling methods described above.

[0016] The deterministic traffic scheduling method, device, equipment, medium and program product provided by the present invention, when adopting TSN technology, aims at the problem of ST flow blocking other flows in TAS mechanism, designs a minimum scheduling time slot calculation method, maximizes the actual sampling period of ST flow, so as to reduce its bandwidth occupancy. In addition, in view of the problem of insufficient scheduling granularity of CQF mechanism, designs an algorithm for solving queue shaping parameters, which provides finer-grained traffic shaping by controlling the number of data frames entering the CQF queue from the buffer in each time slot, thereby reducing the reserved bandwidth of SR flow and reducing the degree of blocking of SR flow on BE flow transmission. Therefore, by adjusting the actual sampling period of ST flow and the reserved bandwidth of SR flow, the end-to-end transmission delay of BE flow can be reduced as much as possible, thereby providing end-to-end low delay, low jitter and other guarantees for delay-sensitive services, and improving the deterministic capability of the network. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions in the present invention or the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0018] Figure 1It is a flow chart of the deterministic traffic scheduling method provided by the present invention.

[0019] Figure 2 This is a flow scheduling structure diagram of a TSN switch integrated with an enqueue cache provided by the present invention.

[0020] Figure 3 This is a diagram of the ST flow delay structure provided by the present invention.

[0021] Figure 4 This is a diagram of the SR flow delay structure provided by the present invention.

[0022] Figure 5 It is a flow chart of determining the minimum scheduling time slot and maximizing the ST flow sampling period provided by the present invention.

[0023] Figure 6 It is a structural schematic diagram of the deterministic flow scheduling device provided by the present invention.

[0024] Figure 7 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0025] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0026] The terms "first", "second", etc. in the present invention are used to distinguish similar objects, rather than to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention can be implemented in an order other than those illustrated or described herein.

[0027] Combine the following Figure 1-Figure 7 Describe the deterministic traffic scheduling method, device, equipment, medium and program product provided by the present invention.

[0028] It should be noted that the deterministic traffic scheduling method provided by the embodiment of the present invention is implemented based on a deterministic traffic scheduling device. The deterministic traffic scheduling method applies a TSN switch traffic scheduling structure that integrates queue cache. In the TSN network, three basic types of traffic are defined, including time-sensitive traffic ST flow (Scheduled Traffic), large bandwidth periodic traffic SR flow (Stream Reservation), and best effort BE flow (Best Effort). The data transmission with strict requirements for hard real-time performance adopts ST flow, while the data transmission with low real-time requirements and the need to reserve part of the bandwidth adopts RT flow, and BE is a general Ethernet traffic without any transmission requirements. The TSN switch traffic scheduling structure that integrates queue cache integrates the time-aware shaping (TAS) mechanism and the cyclic queuing and forwarding (CQF) mechanism, and designs a queue cache area based on weighted polling scheduling. By increasing the ST flow sampling period and reducing the SR flow reserved bandwidth, the delay and jitter requirements of the deterministic transmission of mixed traffic are better met, while the complexity of solving the scheduling scheme is reduced. On this basis, a traffic scheduling model considering the ST flow sampling period and SR flow queue cache is established, and a minimum scheduling time slot calculation method is proposed to increase the actual sampling period of the ST flow as much as possible to reduce its bandwidth occupancy and reserve more transmission resources for SR and BE flows; at the same time, a deterministic traffic scheduling algorithm based on particle swarm optimization is proposed. By controlling the number of data frames entering the CQF queue from different buffers in each time slot, the reserved bandwidth ratio of SR flows with the same priority but different delay requirements is adjusted to provide them with more fine-grained traffic shaping, thereby reducing the reserved bandwidth of SR flows and the degree of blocking of SR flows on BE flow transmission, and ultimately reducing the end-to-end transmission delay of BE flows as much as possible, thereby improving the deterministic communication capability of the power communication network. ‌‌

[0029] The embodiment of the present invention describes the deterministic traffic scheduling method by taking a deterministic traffic scheduling device as an example of an execution subject.

[0030] Combination Figure 1 , Figure 1 FIG. 1 is a flow chart of the deterministic traffic scheduling method provided by the present invention. Figure 1 As shown, the method includes the following: Step 101: Obtain a traffic set and network scheduling parameters in a TSN network; the traffic set includes at least a time-sensitive traffic ST flow and a large bandwidth periodic traffic SR flow; Step 102: based on the traffic set and the network scheduling parameters, solving the target minimum scheduling time slot and the target queue shaping parameters; Step 103: based on the target minimum scheduling time slot, increase the sampling period of the ST flow to obtain a target sampling period of the ST flow; Step 104: based on the target enqueue shaping parameter, reduce the reserved bandwidth of the SR flow to obtain a target reserved bandwidth of the SR flow; Step 105: Perform deterministic traffic scheduling based on the target sampling period and the target reserved bandwidth.

[0031] First, combine Figure 2 A detailed explanation of the TSN switch traffic scheduling structure diagram with integrated queue buffering is given. Figure 2 This is a flow scheduling structure diagram of a TSN switch integrated with an enqueue cache provided by the present invention.

[0032] In each TSN network domain, TSN switches have the following features: Figure 2 The structure shown. TSN switches support clock synchronization and TAS and CQF mechanisms. Each switch's outbound port has 8 priority queues from 0 to 7, of which ST flows are marked as the highest priority 7 and are scheduled using the TAS mechanism; SR flows include SR_A flows and SR_B flows, which are marked as priorities 6 and 5, respectively, and are scheduled using the CQF mechanism; BE flows are marked as the remaining low priority. The switching structure determines the output port based on the destination terminal address of the data frame. The gate list control is used on the queue egress side. When multiple gates are opened at the same time, the output selector forwards the data packet to the output port according to the queue priority from high to low.

[0033] There is a buffer area in front of the SR_A queue and the SR_B queue. After the data frame passes through the switching structure, the flow filter forwards the flow to the corresponding queue or buffer area according to the IP Payload Compression Protocol (PCP) field. Among them, ST type data frames are buffered in the ST queue, BE type data frames are buffered in the BE queue, and SR_X flow The data frames in are first cached in the buffer , and then enter the SR_X queue via weighted round-robin scheduling (X represents A or B, , n represents the number of buffers in front of the SR_X queue).

[0034] The specific process of SR flow queue buffer traffic scheduling is as follows: When the SR_X queue is empty, the queue immediately generates request frames numbered 1 to n and sends them to the buffer area X in sequence. 1 ~X n , n represents the number of buffers in front of the SR_X queue. Buffer X k After receiving the request frame, send it to the SR_X queue data frames.

[0035] Under the TSN switch traffic scheduling structure with integrated enqueue cache, when using TAS+CQF for traffic scheduling, since the ST queue has the highest priority, if multiple gates are opened at the same time, other queues will have transmission opportunities only when and only when the ST queue is empty. If the ST flow is always sampled according to the minimum sampling period, as the number of ST flows increases, most of the transmission bandwidth will be occupied by the ST flow. Therefore, the actual sampling period of the ST flow should be increased as much as possible to reduce its bandwidth occupancy and reserve more transmission resources for the SR flow and BE flow. Similarly, as the reserved bandwidth of the SR flow increases, the degree of blocking of the BE data frame transmission by the SR data frame transmission gradually increases. Therefore, in order to reduce the maximum end-to-end delay of the BE message, the reserved bandwidth should be reduced as much as possible while meeting the SR flow delay requirements.

[0036] In order to improve the service quality of BE flows without affecting the service quality of SR flows, the concept of idle data frames is introduced. In weighted round-robin scheduling, SR-class data frames in the buffer area are given priority to enter the SR queue. When the number of SR-class data frames is insufficient, idle data frames are replaced. The output selector determines whether the data frame from the egress queue is an idle data frame. If it is an idle data frame, it is discarded and BE-class data frames are sent instead. Scheduling BE-class data frames to replace idle data frames helps to allocate bandwidth resources reserved for a certain SR flow but not used by it to data frames in the BE queue first, thereby enhancing the delay determinism guarantee of BE-class messages.

[0037] Therefore, a deterministic traffic scheduling method is specifically as follows.

[0038] Obtain the traffic set under the TSN network, including ST flow, SR flow and BE flow, but the main purpose is to adjust the actual sampling period of the ST flow and the reserved bandwidth of the SR flow, so the traffic data of the ST flow and SR flow is mainly needed.

[0039] At the same time, the network scheduling parameters under the TSN network are also obtained, including various types of network parameters, which are used to solve the minimum scheduling time slot to maximize the sampling period of the ST flow as much as possible, and to solve the queue shaping parameters to minimize the reserved bandwidth of the SR flow as much as possible.

[0040] Therefore, based on the traffic set, especially the traffic data of ST flow and SR flow, and the network scheduling parameters, the target minimum scheduling time slot and the target enqueue shaping parameters are solved.

[0041] Further, based on the target minimum scheduling time slot, the sampling period of the ST flow is increased to obtain a target sampling period of the ST flow.

[0042] At the same time, based on the target enqueue shaping parameter, the reserved bandwidth of the SR flow is reduced to obtain the target reserved bandwidth of the SR flow.

[0043] Furthermore, deterministic traffic scheduling is performed based on the target sampling period and target reserved bandwidth. On the basis of meeting the latency and jitter requirements of ST flow and SR flow, the end-to-end average latency of BE flow is reduced as much as possible to improve the deterministic capability of the power communication network.

[0044] The deterministic traffic scheduling method provided by the present invention, when adopting the TSN technology, aims at the problem of ST flow blocking other flows in the TAS mechanism, and designs a minimum scheduling time slot calculation method to maximize the actual sampling period of the ST flow to reduce its bandwidth occupancy. In addition, in view of the problem of insufficient scheduling granularity of the CQF mechanism, an algorithm for solving queue shaping parameters is designed to provide finer-grained traffic shaping by controlling the number of data frames entering the CQF queue from the buffer in each time slot, thereby reducing the reserved bandwidth of the SR flow and reducing the degree of blocking of the SR flow on the BE flow transmission. Therefore, by adjusting the actual sampling period of the ST flow and the reserved bandwidth of the SR flow, the end-to-end transmission delay of the BE flow can be reduced as much as possible, thereby providing end-to-end low latency, low jitter and other guarantees for delay-sensitive services, and improving the deterministic capabilities of the network.

[0045] Before describing in detail how to maximize the ST flow sampling period and minimize the reserved bandwidth of the SR flow, a traffic scheduling model based on maximizing the ST flow sampling period and SR flow queue cache is first constructed. The model is constructed by multiple network constraints. Therefore, the traffic scheduling model can be applied later to maximize the ST flow sampling period and minimize the reserved bandwidth of the SR flow, which can meet the network constraints in the actual traffic scheduling structure.

[0046] The traffic scheduling model is constructed in the following way: Determine a minimum time slot constraint, a gating constraint, an ST flow constraint, and an SR flow constraint based on the traffic set and the network scheduling parameters; A traffic scheduling model is constructed based on the minimum time slot constraint, the gating constraint, the ST flow constraint and the SR flow constraint.

[0047] Specifically, based on the traffic set and network scheduling parameters, the minimum time slot constraint, the gating constraint, the ST flow constraint and the SR flow constraint are determined.

[0048] First, the minimum slot constraint is described below.

[0049] make is the minimum scheduling time slot, that is, the minimum time scheduling unit, so all flow cycles must be Integer multiples of is the greatest common divisor of all SR flow periods, then The maximum value must be less than ,and The value range is The factor set of ,Right now:

[0050] Since the sampling period of ST flow has upper and lower bounds, It must be greater than or equal to the maximum value of all ST flow sampling period minimum values, and less than or equal to the minimum value of all ST flow sampling period maximum values, that is:

[0051] To reduce the latency and jitter of key flows, all ST flow data packets sampled in a time slot must be transmitted within the time slot, that is:

[0052] in is the total length of the current ST flow data packet, and B is the link transmission rate.

[0053] For SR flows, due to the use of the CQF mechanism, in order to ensure that the latency is controllable, the data packets injected into the switch in the previous time slot must be forwarded in the next time slot, that is:

[0054] in, is the maximum buffer size of a single queue on the switch, B is the link transmission rate, It is the maximum delay caused by time synchronization accuracy and other issues in the network.

[0055] Then, the gating constraints are described below.

[0056] For SR queues, due to the CQF mechanism For the gate state switching cycle, the previous The queue closed in the next Therefore, the gating cycle of all SR queues Both ,Right now:

[0057] For the ST queue using the TAS mechanism, its gating cycle is the lowest common multiple of the actual sampling periods of all ST flows, that is:

[0058] The total cycle time of the gate list is the least common multiple of the gating cycle periods of the ST queue and the SR queue, that is:

[0059] Since the switch memory is limited, the switch can store at most gating event, so Cannot be greater than ,Right now:

[0060] Then, the ST flow constraints are described below.

[0061] Sampling period constraint. Let , we can know from the upper and lower bounds of the ST flow sampling period that ,therefore ;make , for any ST flow , its actual sampling period The value range is ,Right now:

[0062]

[0063] Bus occupancy constraint. To ensure that all flows in the network are schedulable, first we need to ensure that The bus occupancy rate of ST flow is no more than 1, that is:

[0064] Deadline constraint. Take ST flow The actual sampling period For its deadline, The total delay from the generation to the completion of the transmission of the data packet must be less than or equal to the deadline of the ST flow, that is:

[0065] in, for Delay lower bound, Indicates the maximum delay jitter of the ST flow.

[0066] For ST flows, since all ST flows have the same highest priority 7, in any time slot, if and only if the ST queue is empty, the other queues can send. In addition, under the above constraints, any All the data packets to be sent in the ST queue and the SR queue will be sent in this time slot, so there is no need to consider the interference caused by the data packets sent in the previous time slot to the next time slot. , whose delay includes The transmission time of the ST flow data packet that enters the queue first, The transmission time of its own data packet. The ST flow delay is composed of Figure 3 As shown, Figure 3 This is a diagram of the ST flow delay structure provided by the present invention.

[0067] ST Flow The delay is calculated as follows:

[0068] in, Refers to ST flow In the time slot sampling, B is the link transmission rate.

[0069] Then, the SR flow constraints are described as follows.

[0070] Forwarding delay. The forwarding delay experienced by a data packet in a switch consists of two parts: the first part is the buffer delay, and the second part is the transmission delay. The buffer delay includes the delay of the data packet in the buffer area and in the CQF queue. To ensure that the forwarding delay is controllable, the CQF mechanism requires that The packets entering the CQF queue buffer must be All are sent within 1 second. Because the gate switching cycle is , so the upper bounds of the queuing delay and transmission delay of the CQF queue are Transmission delay It is expressed as follows:

[0071] in, It represents the frame length of SR data frame, and B is the link transmission rate.

[0072] express Any packet in The maximum buffer delay of the tail frame in the switch is determined by the impact of traffic scheduling on data frame transmission during the closing and opening of the SR queue gate:

[0073] in, express The maximum queuing delay of the tail frame in the TSN switch caused by the SR queue gate closing, express The maximum queuing delay of the tail frame of the SR queue caused by traffic scheduling during the period when the gate of the SR queue is open. During the period when the gate of the SR queue is closed, the SR_A queue and the SR_B queue do not output data frames. Therefore, Equal to the message The maximum total gate-off time of the SR queue within the sending time limit.

[0074] information Depend on data frames. During the tail frame queuing period, any SR_X queue can output at most Data frames:

[0075]

[0076]

[0077] in, and is the intermediate quantity, Indicates that the SR_X stream is from the buffer i The number of data frames entering the SR_X queue.

[0078] therefore, It can be expressed as:

[0079] Similar to ST flow, SR flow The total delay from the generation of a data packet to the completion of its transmission must be less than or equal to the deadline of the flow, and at the same time meet the delay jitter constraint, that is:

[0080] in, for Delay lower bound, Indicates the maximum delay jitter of an SR flow.

[0081] For any SR flow Due to the CQF mechanism, the delay includes the following parts: the transmission delay of higher priority flows, including ST flows and flows with higher priority than Other SR flows of Same as the sending delay of other SR flows that enter the queue first; switch buffer delay ; Data packet transmission delay . Let hp(i) represent all priorities higher than The flow collection of sp(i) represents all priorities and The same flow collection. The SR flow delay is composed of Figure 4 As shown, Figure 4 This is a diagram of the SR flow delay structure provided by the present invention.

[0082] but The delay can be calculated by the following formula:

[0083] in, express In the The time slot is injected into the CQF queue, and the time slots to send.

[0084] After building a traffic scheduling model based on maximizing the ST flow sampling period and SR inflow queue buffer, it is necessary to maximize the ST flow sampling period and minimize the reserved bandwidth of the SR flow while satisfying four network constraints, namely, the minimum time slot constraint, the gating constraint, the ST flow constraint, and the SR flow constraint. The following will describe these two processes in detail.

[0085] In one embodiment, based on step 102, based on the traffic set and the network scheduling parameters, solving the target minimum scheduling time slot specifically includes the following steps: Determining an SR flow period based on the traffic set and the network scheduling parameter; Calculate the greatest common divisor of the SR flow period; Determining a set of factors of the greatest common divisor; Arrange the factors in the factor set in ascending order to obtain an arrangement result; Determine the first factor in the arrangement result as the minimum time scheduling unit; If the minimum time scheduling unit satisfies the minimum time slot constraint, determining the first factor as the target minimum scheduling time slot; If the minimum time scheduling unit does not meet the minimum time slot constraint, the next factor of the first factor is updated to the first factor, and the step of determining the first factor in the arrangement result as the minimum time scheduling unit is iteratively executed until the minimum time scheduling unit meets the minimum time slot constraint.

[0086] Combination Figure 5 , Figure 5 It is a flow chart of determining the minimum scheduling time slot and maximizing the ST flow sampling period provided by the present invention.

[0087] The following content is for Figure 5 Determine the minimum scheduling time slot in this part.

[0088] Specifically, based on the traffic set and network scheduling parameters, the SR flow period is determined, and the greatest common divisor of the SR flow period is further calculated. , and determine the greatest common divisor The factor set L can be calculated by referring to the formula of the minimum time slot constraint.

[0089] Furthermore, the greatest common divisor of the SR flow period The elements in the factor set L are arranged in ascending order to obtain the arrangement result, and the first factor in the arrangement result is further determined as the minimum time scheduling unit, that is, =L(x) , x=1.

[0090] Further, check the minimum time scheduling unit at this time Whether the minimum time slot constraints of the above formulas (1) to (4) are met, if they are met, the minimum time scheduling unit at this time is Determine the target minimum scheduling time slot. If it is not satisfied, update the next factor of the first factor to the first factor and determine it as the minimum time scheduling unit at this time, that is, x=x+1. =L(x), check again whether the minimum time slot constraint is met, and repeat the above steps until the latest minimum time scheduling unit can meet the minimum time slot constraint. Stop the iterative calculation and determine the latest minimum time scheduling unit as the target minimum scheduling time slot.

[0091] In view of the problem that the ST flow blocks other flows in the TAS mechanism, the embodiment of the present invention designs a minimum scheduling time slot calculation method, thereby maximizing the actual sampling period of the ST flow to reduce its bandwidth occupancy.

[0092] In one embodiment, based on step 103, based on the target minimum scheduling time slot, increasing the sampling period of the ST stream to obtain the target sampling period of the ST stream specifically includes the following steps: Based on the target minimum scheduling time slot, increasing the sampling period of the ST flow to obtain an initial sampling period of the ST flow; If the initial sampling period satisfies the gating constraint, determining the initial sampling period as the target sampling period; If the initial sampling period does not satisfy the gating constraint, the next factor of the first factor is updated to the first factor, and the step of determining the first factor in the arrangement result as the minimum time scheduling unit is iteratively performed until the initial sampling period satisfies the gating constraint.

[0093] Specifically, based on the target minimum scheduling time slot, the sampling period of the ST flow is increased to obtain the initial sampling period of the ST flow.

[0094] The specific adjustment of the ST flow sampling period is as follows: calculate , and take .

[0095] Furthermore, check whether the initial sampling period and the values ​​of each parameter satisfy the gating constraints of equations (5) to (8). If so, determine the initial sampling period as the target sampling period and end the process. If not, update the next factor of the first factor to the first factor, calculate the target minimum scheduling time slot again, calculate the initial sampling period based on the target minimum scheduling time slot, check again whether the initial sampling period and the values ​​of each parameter satisfy the gating constraints, repeat the above steps until the latest initial sampling period and the values ​​of each parameter satisfy the gating constraints, stop the iterative calculation, and determine the latest initial sampling period as the target sampling period.

[0096] In view of the problem that the ST flow blocks other flows in the TAS mechanism, the embodiment of the present invention designs a minimum scheduling time slot calculation method to maximize the actual sampling period of the ST flow to reduce its bandwidth occupancy.

[0097] In one embodiment, based on step 102, solving the target queue shaping parameter based on the traffic set and the network scheduling parameter includes: Determine the traffic set and the network scheduling parameters as model input data; A particle swarm optimization algorithm is used to solve the optimization problem in the traffic scheduling model based on the model input data to obtain the target enqueue shaping parameter; the optimization problem is used to solve how to minimize the reserved bandwidth by adjusting the enqueue shaping parameter of the SR flow; the SR flow includes an SR_A flow and an SR_B flow; the target enqueue shaping parameter includes a first enqueue shaping parameter of the SR_A flow and a second enqueue shaping parameter of the SR_B flow.

[0098] Specifically, in each TSN network domain, in order to minimize the blocking degree of SR data frame transmission on BE data frame transmission, a TSN switch parameter design model is established and solved. By adjusting the enqueue shaping parameters, the response time of each SR flow in the TSN switch is ensured to be within the delay-jitter constraint range, while minimizing the reserved bandwidth RB of the SR flow.

[0099] The flow set and network scheduling parameters are determined as model input data, specifically including at least: flow set , , , gate list cycle , minimum scheduling time slot , ST stream packet length , link bandwidth B, actual sampling period of ST flow , the upper bound of ST flow delay , the upper bound of ST flow delay , SR flow packet length , the upper bound of SR flow delay , SR flow jitter upper bound , number of caches n, cache size .

[0100] Furthermore, the particle swarm optimization algorithm is used to solve the optimization problem in the traffic scheduling model based on the above model input data, and the target enqueue shaping parameters are obtained. The optimization problem is used to solve how to minimize the reserved bandwidth by adjusting the enqueue shaping parameters of the SR flow.

[0101] The optimization problem is expressed as follows:

[0102] in, Indicates the total door opening time of the SR queue in a cycle. The SR queue includes the SR_A queue and the SR_B queue. Indicates the cycle period of the gate list; is the first enqueue shaping parameter, indicating the total number of data frames of the SR_A stream entering the SR_A queue from the Kth buffer, Indicates the total number of data frames of the SR_A stream entering the SR_A queue from all buffers at once; is the second enqueue shaping parameter, indicating the total number of data frames of the SR_B flow entering the SR_B queue from the Kth buffer, It represents the sum of data frames of the SR_B flow entering the SR_B queue from all buffers at one time. Wherein, formula (21) is a specific optimization problem, and formulas (22) to (24) are constraints that need to be satisfied when solving the optimization problem. At the same time, the minimum time slot constraint, gating constraint, ST flow constraint and SR flow constraint also need to be satisfied when solving the optimization problem.

[0103] The particle swarm optimization (PSO) algorithm is used to solve the optimization problem (21). The parameters to be optimized are , where the value range of each particle is .

[0104] The specific solution process of the particle swarm optimization algorithm is as follows: Step 1: Randomly initialize a group of particles, evaluate each particle and obtain the global optimum; Step 2: Update the velocity and position of each particle and evaluate the function fitness value of each particle; Step 3: Update the historical optimal position of each particle and the global optimal position of the group; Step 4: Repeat steps 2 and 3 until the optimization termination condition is reached.

[0105] In order to solve the problem of insufficient scheduling granularity of the CQF mechanism, an embodiment of the present invention designs an algorithm for solving queue shaping parameters. By controlling the number of data frames entering the CQF queue from the buffer in each time slot, finer-grained traffic shaping is provided, thereby reducing the SR flow reserved bandwidth and reducing the degree of blocking of the SR flow on the BE flow transmission.

[0106] The deterministic traffic scheduling device provided by the present invention is described below. The deterministic traffic scheduling device described below and the deterministic traffic scheduling method described above can be referred to each other.

[0107] Reference Figure 6 , Figure 6 It is a structural schematic diagram of the deterministic flow scheduling device provided by the present invention.

[0108] The deterministic traffic scheduling device comprises: The acquisition module 610 is used to acquire a traffic set and network scheduling parameters in the TSN network; the traffic set includes at least a time-sensitive traffic ST flow and a large bandwidth periodic traffic SR flow; A solution module 620, configured to solve a target minimum scheduling time slot and a target queue shaping parameter based on the traffic set and the network scheduling parameter; A first adjustment module 630, configured to increase the sampling period of the ST flow based on the target minimum scheduling time slot to obtain a target sampling period of the ST flow; A second adjustment module 640 is configured to reduce the reserved bandwidth of the SR flow based on the target enqueue shaping parameter to obtain a target reserved bandwidth of the SR flow; The deterministic traffic scheduling module 650 is configured to perform deterministic traffic scheduling based on the target sampling period and the target reserved bandwidth.

[0109] The deterministic traffic scheduling device provided by the present invention, when adopting the TSN technology, aims at the problem of ST flow blocking other flows in the TAS mechanism, and designs a minimum scheduling time slot calculation method to maximize the actual sampling period of the ST flow to reduce its bandwidth occupancy. In addition, in view of the problem of insufficient scheduling granularity of the CQF mechanism, an algorithm for solving queue shaping parameters is designed to provide finer-grained traffic shaping by controlling the number of data frames entering the CQF queue from the buffer in each time slot, thereby reducing the reserved bandwidth of the SR flow and reducing the degree of blocking of the SR flow on the BE flow transmission. Therefore, by adjusting the actual sampling period of the ST flow and the reserved bandwidth of the SR flow, the end-to-end transmission delay of the BE flow can be reduced as much as possible, thereby providing end-to-end low latency, low jitter and other guarantees for delay-sensitive services, and improving the deterministic capabilities of the network.

[0110] Furthermore, the solution module 620 is also used for: Determining an SR flow period based on the traffic set and the network scheduling parameter; Calculate the greatest common divisor of the SR flow period; Determining a set of factors of the greatest common divisor; Arrange the factors in the factor set in ascending order to obtain an arrangement result; Determine the first factor in the arrangement result as the minimum time scheduling unit; If the minimum time scheduling unit satisfies the minimum time slot constraint, determining the first factor as the target minimum scheduling time slot; If the minimum time scheduling unit does not meet the minimum time slot constraint, the next factor of the first factor is updated to the first factor, and the step of determining the first factor in the arrangement result as the minimum time scheduling unit is iteratively executed until the minimum time scheduling unit meets the minimum time slot constraint.

[0111] Furthermore, the solution module 620 is also used for: Determine the traffic set and the network scheduling parameters as model input data; A particle swarm optimization algorithm is used to solve the optimization problem in the traffic scheduling model based on the model input data to obtain the target enqueue shaping parameter; the optimization problem is used to solve how to minimize the reserved bandwidth by adjusting the enqueue shaping parameter of the SR flow; the SR flow includes an SR_A flow and an SR_B flow; the target enqueue shaping parameter includes a first enqueue shaping parameter of the SR_A flow and a second enqueue shaping parameter of the SR_B flow.

[0112] Furthermore, the first adjustment module 630 is further configured to: Based on the target minimum scheduling time slot, increasing the sampling period of the ST flow to obtain an initial sampling period of the ST flow; If the initial sampling period satisfies the gating constraint, determining the initial sampling period as the target sampling period; If the initial sampling period does not satisfy the gating constraint, the next factor of the first factor is updated to the first factor, and the step of determining the first factor in the arrangement result as the minimum time scheduling unit is iteratively performed until the initial sampling period satisfies the gating constraint.

[0113] Furthermore, the deterministic traffic scheduling device is also used for: Determine a minimum time slot constraint, a gating constraint, an ST flow constraint, and an SR flow constraint based on the traffic set and the network scheduling parameters; A traffic scheduling model is constructed based on the minimum time slot constraint, the gating constraint, the ST flow constraint and the SR flow constraint.

[0114] It should be noted that the deterministic traffic scheduling device provided by the present invention can execute the deterministic traffic scheduling method described in any of the above embodiments during specific operation, which will not be elaborated in this embodiment.

[0115] Figure 7 is a schematic diagram of the structure of the electronic device provided by the present invention, such as Figure 7 As shown, the electronic device may include: a processor 710, a communication interface 720, a memory 730 and a communication bus 740, wherein the processor 710, the communication interface 720 and the memory 730 complete mutual communication through the communication bus 740. The processor 710 may call the logic instructions in the memory 730 to execute a deterministic traffic scheduling method, which includes: obtaining a traffic set and a network scheduling parameter under a TSN network; the traffic set at least includes a time-sensitive traffic ST flow and a large bandwidth period traffic SR flow; based on the traffic set and the network scheduling parameter, solving a target minimum scheduling time slot and a target queue shaping parameter; based on the target minimum scheduling time slot, increasing the sampling period of the ST flow to obtain a target sampling period of the ST flow; based on the target queue shaping parameter, reducing the reserved bandwidth of the SR flow to obtain a target reserved bandwidth of the SR flow; and performing deterministic traffic scheduling based on the target sampling period and the target reserved bandwidth.

[0116] In addition, the logic instructions in the above-mentioned memory 730 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present invention can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0117] On the other hand, the present invention also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the deterministic traffic scheduling method provided in the above embodiments, the method including: obtaining a traffic set and network scheduling parameters under a TSN network; the traffic set includes at least a time-sensitive traffic ST flow and a large bandwidth period traffic SR flow; based on the traffic set and the network scheduling parameters, solving a target minimum scheduling time slot and a target enqueue shaping parameter; based on the target minimum scheduling time slot, increasing the sampling period of the ST flow to obtain a target sampling period of the ST flow; based on the target enqueue shaping parameter, reducing the reserved bandwidth of the SR flow to obtain a target reserved bandwidth of the SR flow; and performing deterministic traffic scheduling based on the target sampling period and the target reserved bandwidth.

[0118] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented when the processor executes the deterministic traffic scheduling method provided in the above-mentioned embodiments, the method comprising: obtaining a traffic set and network scheduling parameters under the TSN network; the traffic set at least includes a time-sensitive traffic ST flow and a large bandwidth period traffic SR flow; based on the traffic set and the network scheduling parameters, solving a target minimum scheduling time slot and a target enqueue shaping parameter; based on the target minimum scheduling time slot, increasing the sampling period of the ST flow to obtain a target sampling period of the ST flow; based on the target enqueue shaping parameter, reducing the reserved bandwidth of the SR flow to obtain a target reserved bandwidth of the SR flow; and performing deterministic traffic scheduling based on the target sampling period and the target reserved bandwidth.

[0119] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment. Those of ordinary skill in the art may understand and implement the present invention without creative effort.

[0120] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0121] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A deterministic traffic scheduling method, characterized in that: include: Get the traffic set and network scheduling parameters under the TSN network; The traffic set includes at least a time-sensitive traffic ST flow and a large bandwidth periodic traffic SR flow; Based on the traffic set and the network scheduling parameters, solving the target minimum scheduling time slot and the target queue shaping parameters; Based on the target minimum scheduling time slot, increasing the sampling period of the ST flow to obtain a target sampling period of the ST flow; Based on the target enqueue shaping parameter, reducing the reserved bandwidth of the SR flow to obtain a target reserved bandwidth of the SR flow; Deterministic traffic scheduling is performed based on the target sampling period and the target reserved bandwidth.

2. The deterministic traffic scheduling method according to claim 1, characterized in that: Solving a target minimum scheduling time slot based on the traffic set and the network scheduling parameters includes: Determining an SR flow period based on the traffic set and the network scheduling parameter; Calculate the greatest common divisor of the SR flow period; Determining a set of factors of the greatest common divisor; Arrange the factors in the factor set in ascending order to obtain an arrangement result; Determine the first factor in the arrangement result as the minimum time scheduling unit; If the minimum time scheduling unit satisfies the minimum time slot constraint, determining the first factor as the target minimum scheduling time slot; If the minimum time scheduling unit does not meet the minimum time slot constraint, the next factor of the first factor is updated to the first factor, and the step of determining the first factor in the arrangement result as the minimum time scheduling unit is iteratively executed until the minimum time scheduling unit meets the minimum time slot constraint.

3. The deterministic traffic scheduling method according to claim 2, characterized in that: The increasing the sampling period of the ST stream based on the target minimum scheduling time slot to obtain the target sampling period of the ST stream includes: Based on the target minimum scheduling time slot, increasing the sampling period of the ST flow to obtain an initial sampling period of the ST flow; If the initial sampling period satisfies the gating constraint, determining the initial sampling period as the target sampling period; If the initial sampling period does not satisfy the gating constraint, the next factor of the first factor is updated to the first factor, and the step of determining the first factor in the arrangement result as the minimum time scheduling unit is iteratively performed until the initial sampling period satisfies the gating constraint.

4. The deterministic traffic scheduling method according to claim 1, characterized in that: Based on the traffic set and the network scheduling parameter, solving a target queue shaping parameter includes: Determine the traffic set and the network scheduling parameters as model input data; A particle swarm optimization algorithm is used to solve the optimization problem in the traffic scheduling model based on the model input data to obtain the target enqueue shaping parameter; the optimization problem is used to solve how to minimize the reserved bandwidth by adjusting the enqueue shaping parameter of the SR flow; the SR flow includes an SR_A flow and an SR_B flow; the target enqueue shaping parameter includes a first enqueue shaping parameter of the SR_A flow and a second enqueue shaping parameter of the SR_B flow.

5. The deterministic traffic scheduling method according to claim 4, characterized in that: The expression formula of the optimization problem is as follows: in, Indicates the total door opening time of the SR queue in a cycle. The SR queue includes the SR_A queue and the SR_B queue. Indicates the cycle period of the gate list; is the first enqueue shaping parameter, indicating the total number of data frames of the SR_A stream entering the SR_A queue from the Kth buffer, Indicates the total number of data frames of the SR_A stream entering the SR_A queue from all buffers at once; is the second enqueue shaping parameter, indicating the total number of data frames of the SR_B flow entering the SR_B queue from the Kth buffer, Indicates the total number of data frames of the SR_B flow that enter the SR_B queue from all buffers at one time.

6. The deterministic traffic scheduling method according to claim 4, characterized in that: The traffic scheduling model is constructed in the following way: Determine a minimum time slot constraint, a gating constraint, an ST flow constraint, and an SR flow constraint based on the traffic set and the network scheduling parameters; A traffic scheduling model is constructed based on the minimum time slot constraint, the gating constraint, the ST flow constraint and the SR flow constraint.

7. A deterministic traffic scheduling device, characterized in that: include: The acquisition module is used to obtain the traffic set and network scheduling parameters under the TSN network; The traffic set includes at least a time-sensitive traffic ST flow and a large bandwidth periodic traffic SR flow; A solution module, used for solving a target minimum scheduling time slot and a target queue shaping parameter based on the traffic set and the network scheduling parameter; A first adjustment module, configured to increase the sampling period of the ST flow based on the target minimum scheduling time slot to obtain a target sampling period of the ST flow; A second adjustment module, configured to reduce the reserved bandwidth of the SR flow based on the target enqueue shaping parameter to obtain a target reserved bandwidth of the SR flow; A deterministic traffic scheduling module is used to perform deterministic traffic scheduling based on the target sampling period and the target reserved bandwidth.

8. An electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the deterministic traffic scheduling method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium, the computer-readable storage medium comprising a non-transitory computer-readable storage medium, having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the deterministic traffic scheduling method according to any one of claims 1 to 6 are implemented.

10. A computer program product, comprising a computer program, characterized in that: When the computer program is executed by a processor, the steps of the deterministic traffic scheduling method according to any one of claims 1 to 6 are implemented.