Gating Scheduling Method and Device for Time-Sensitive Network
By dividing keyframes and non-keyframes into different queues in a time-sensitive network and scheduling according to the gated list, the problem of uncertainty over traditional Ethernet transmission is solved, real-time transmission of keyframes is achieved.
Patent Information
- Application Number
- CN202211562311.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-07
- Publication Date
- 2025-07-29
- Estimated Expiration
- 2042-12-07
AI Technical Summary
During traditional Ethernet transmission, CSMA/CD policies lead to uncertainty in data transmission, which is difficult to meet the real-time requirements of key traffic. The existing TSN protocol lacks specific guidance on data frame scheduling.
By determining the type of network frames, keyframes and non-keyframes are divided into different queues respectively, and network frames are scheduled for transmission according to the switching status and execution parameters of the gated list, so as to achieve the separation of keyframes and non-keyframes.
Real-time transmission of keyframes is realized, avoiding the impact of non-keyframes on keyframes, and ensuring the time certainty of key traffic.
Smart Images

Figure CN116192770B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer networks, and in particular, to a gating scheduling method and device for a time-sensitive network. Background Art
[0002] Currently, Ethernet has become the most widely used communication standard in the world, and a large amount of information is transmitted through Ethernet at every moment. The CSMA / CD strategy adopted in the traditional Ethernet transmission process causes uncertainty in data transmission. However, some critical traffic has very high requirements for transmission real-time performance and requires deterministic network transmission, making it necessary for traditional Ethernet to make corresponding improvements to be applied to new usage scenarios. Currently, some manufacturers use different network transmissions for critical traffic and non-critical traffic respectively, or use a transmission method with a higher bandwidth than the actual network bandwidth to adapt to new scenarios. However, the former increases the complexity of the network, and the latter causes unnecessary bandwidth waste.
[0003] With the development of the time-sensitive network TSN, a new solution to the above problems has emerged. The 802.1AS protocol in the TSN protocol family realizes the time synchronization of the network system, and the 802.1Qbv protocol selects transmissions through a precise gating mechanism based on time synchronization, realizing the separation of critical traffic and non-critical traffic and ensuring the real-time performance of critical traffic transmission. However, the definition of technical methods in the above standard protocols is relatively broad, lacking guiding significance for the data frame scheduling process in the actual application process. Summary of the Invention
[0004] To overcome at least one deficiency in the prior art, an embodiment of this application provides a gating scheduling method and device for a time-sensitive network.
[0005] In a first aspect, a gating scheduling method for a time-sensitive network is provided, including:
[0006] Determine the type of network frame; the types of network frames include critical frames and non-critical frames;
[0007] Divide network frames into multiple queues according to the type of network frame. Critical frames and non-critical frames are divided into different queues respectively, and each queue is correspondingly provided with a gate;
[0008] Determine the on / off state of the gate according to the gate list. The gate list includes gate on / off state parameters and the execution time interval of the gate list; the gate on / off state parameters represent the on / off state of the gate of each queue; the execution time interval of the gate list represents the duration of the on / off state of the gate of each queue in the gate list;
[0009] Schedule the network frames in multiple queues for transmission according to the on / off state of the gate and the types of network frames in the multiple queues.
[0010] In one embodiment, determining the on / off state of gating according to a gating list includes:
[0011] Executing the gating list according to the execution parameters of the gating to determine the on / off state of the gating. The execution parameters of the gating include: gating list length, gating switching time, gating list execution cycle period, and gating configuration parameters.
[0012] In one embodiment, executing the gating list according to the execution parameters of the gating to determine the on / off state of the gating includes:
[0013] Determining whether to configure gating according to the gating configuration parameters;
[0014] After determining to configure gating, when the system time reaches the gating switching time, obtain and execute the first gating list, and open or close the gating of multiple queues according to the gating on / off state parameters in the first gating list;
[0015] If the current gating list execution time reaches the gating list execution time interval of the current gating list, determine whether the list execution length reaches the set length of the gating list length;
[0016] If the list execution length does not reach the set length of the gating list length, obtain and execute the next gating list;
[0017] If the list execution length reaches the set length of the gating list length, wait until the system time reaches the gating list execution cycle period, re-obtain the first gating list, and execute the first gating list.
[0018] In one embodiment, the execution parameters of the gating further include: gating list switching extension time, indicating the extension time from the current gating list to the next gating list.
[0019] In one embodiment, scheduling network frames in multiple queues for transmission according to the on / off state of the gating and the types of network frames in the multiple queues includes:
[0020] Select network frames for transmission from the queues where the on / off state of the gating is open; when there are multiple queues where the on / off state of the gating is open, preferentially select network frames in the queue storing key frames for transmission.
[0021] In one embodiment, different types of key frames are divided into different queues.
[0022] In a second aspect, a gating scheduling device for a time-sensitive network is provided, including:
[0023] A network frame type determination module, configured to determine the type of network frames; the types of network frames include key frames and non-key frames;
[0024] A queue division module, which is used to divide network frames into multiple queues according to the type of network frames. Key frames and non-key frames are divided into different queues respectively, and a gating is set for each queue.
[0025] A gating switch state determination module, which is used to determine the switch state of the gating according to a gating list. The gating list includes gating switch state parameters and a gating list execution time interval. The gating switch state parameters represent the switch states of the gatings of each queue. The gating list execution time interval represents the duration of the switch states of the gatings of each queue in the gating list.
[0026] A network frame scheduling module, which is used to schedule the network frames in multiple queues for transmission according to the switch state of the gating and the types of network frames in the multiple queues.
[0027] In one embodiment, the gating switch state determination module is further used for:
[0028] Execute the gating list according to the execution parameters of the gating to determine the switch state of the gating. The execution parameters of the gating include: the gating list length, the gating switching time, the gating list execution cycle period, and the gating configuration parameters.
[0029] In one embodiment, the gating switch state determination module is further used for:
[0030] Determine whether there is a new gating configuration according to the gating configuration parameters;
[0031] If there is a new gating configuration, when the system time reaches the gating switching time, obtain and execute the first gating list, and open or close the gatings of multiple queues according to the gating switch state parameters in the first gating list;
[0032] If the current gating list execution time reaches the gating list execution time interval of the current gating list, determine whether the list execution length reaches the set length of the gating list length;
[0033] If the list execution length does not reach the set length of the gating list length, obtain the next gating list and execute the next gating list;
[0034] If the list execution length reaches the set length of the gating list length, wait until the system time reaches the gating list execution cycle period, re-obtain the first gating list, and execute the first gating list.
[0035] In one embodiment, the network frame scheduling module is used for:
[0036] Select network frames for transmission from the queues where the gating switch state is open; when there are multiple queues with the gating switch state open, preferentially select the network frames in the queue storing key frames for transmission.
[0037] Compared with the prior art, the present application has the following beneficial effects: In the gating scheduling method and device of the present application, network frames are divided into multiple queues according to the type of network frames. In practical applications, the influence of non-key frames on key frames can be completely avoided; the gating list is executed according to the execution parameters of gating to determine the switch state of gating. According to the switch state of gating and the types of network frames in multiple queues, the network frames in multiple queues are scheduled for transmission, realizing the separation of key frames and non-key frames and ensuring the real-time transmission of key frames. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] The present application can be better understood by referring to the description given below in conjunction with the accompanying drawings. The drawings, together with the following detailed description, are included in this specification and form a part of this specification. In the drawings:
[0039] Figure 1 Shows a flowchart of the gating scheduling method for a time-sensitive network according to an embodiment of the present application;
[0040] Figure 2 Shows the format of a standard network frame according to an embodiment of the present application;
[0041] Figure 3 Shows the structure diagram of a gating list according to an embodiment of the present application;
[0042] Figure 4 Shows a schematic diagram of a gating selection scheduling model according to an embodiment of the present application;
[0043] Figure 5 Shows a flowchart of executing the gating list according to the execution parameters of gating according to an embodiment of the present application;
[0044] Figure 6 Shows a block diagram of the gating scheduling device for a time-sensitive network according to an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0045] Hereinafter, exemplary embodiments of the present application will be described in conjunction with the accompanying drawings. For clarity and conciseness, not all features of the actual embodiments are described in the specification. However, it should be understood that many embodiment-specific decisions may be made during the development of any such actual embodiment to achieve the specific goals of the developer, and these decisions may vary with different embodiments.
[0046] Here, it should also be noted that in order to avoid obscuring the present application with unnecessary details, only the device structures closely related to the solution according to the present application are shown in the drawings, while other details less related to the present application are omitted.
[0047] It should be understood that the present application is not limited to the described embodiments only due to the following description with reference to the drawings. In this document, where feasible, embodiments can be combined with each other, features can be replaced or borrowed between different embodiments, and one or more features can be omitted in one embodiment.
[0048] Figure 1 The flowchart of the gating scheduling method for a time-sensitive network according to an embodiment of the present application is shown. The method includes:
[0049] Step S110, determining the type of network frame; the types of network frames include key frames and non-key frames; here, the key frame can be a data frame with requirements for scheduling time; Figure 2 The format of a standard network frame according to an embodiment of the present application is shown. Gating scheduling can perform gate control on network frames. It should be noted that gating scheduling can perform gate control on all network frames undergoing layer 2 switching (such as VLAN frames), not limited to standard network frames only.
[0050] Step S120, dividing network frames into multiple queues according to the type of network frame. Key frames and non-key frames are respectively divided into different queues, and each queue is correspondingly provided with a gate; here, the network frames in each queue are controlled for transmission through an output selection algorithm, and the selection process of the output selection algorithm is associated with the on-off state of the gate. Only when the gate of the queue is open can the output selection algorithm select and output the network frames of the queue.
[0051] Step S130, determining the on-off state of the gate according to the gating list, Figure 3 The structural diagram of the gating list according to an embodiment of the present application is shown, Figure 4 The schematic diagram of the gating selection scheduling model according to an embodiment of the present application is shown, Figure 4 T00, T01, …, T99 in it all represent a gating list. The gating list includes the gating switch state parameter gate_status[m:0] and the gating list execution time interval time_interval; the gating switch state parameter gate_status[m:0] represents the on-off state of the gate of each queue, and the bit width of the parameter is related to the number of queues set in actual applications. For example, Figure 4Eight queues are set in [context], and the value of m is 7; each bit represents the switch state of a queue, where o represents that the queue door is open and C represents that the queue door is closed. The execution time interval time_interval of the gating list represents the duration of the switch state of the gating of each queue in the gating list; here, the switch state of the gating is obtained through the gating list. During operation, the gating list is executed item by item as the system time progresses. The switch states of the queues in different gating lists are different. Therefore, as the system time progresses, the output selection algorithm will select network frames of different queues for transmission.
[0052] Step S140, according to the switch state of the gating and the types of network frames in multiple queues, schedule the network frames in multiple queues for transmission. Here, if the gating states of multiple queues in a gating list are all open and there are network frames waiting to be transmitted in the corresponding queues at the same time, the output selection algorithm will select the network frame of one of the queues for transmission. Which queue is specifically selected varies according to different applications. For example, preferentially select the network frame in the queue storing the key frames for transmission.
[0053] The gating scheduling method of this application divides network frames into multiple queues according to the types of network frames. In practical applications, the influence of non-key frames on key frames can be completely avoided; according to the switch state of the gating and the types of network frames in multiple queues, schedule the network frames in multiple queues for transmission, realizing the separation of key frames and non-key frames and ensuring the real-time performance of key frame transmission.
[0054] In one embodiment, determining the switch state of the gating according to the gating list may include:
[0055] Execute the gating list according to the execution parameters of the gating to determine the switch state of the gating. The execution parameters of the gating include: the gating list length list_length, the gating switching time list_base_time, the gating list execution cycle list_cycle_time, and the gating configuration parameter gate_change_en. The functions of each gating execution parameter are introduced below:
[0056] list_length represents the length of the gating list configured this time. The length of the gating list configured each time can be different, with a minimum of 1 that can be configured, and the maximum is set according to the actual situation;
[0057] list_base_time represents the start time of the gating configured this time. When there is a new gating list configuration, it represents the switching time of the new gating list;
[0058] list_cycle_time represents the interval time from the execution of this gating list to the execution of the next gating list, that is, the gating list execution cycle;
[0059] gate_change_en indicates whether there is a new gating configuration. It is set to 1 when preparing to configure the new gating, otherwise set to 0.
[0060] In other embodiments, the execution parameters of the gating further include: the gating list switching extension time list_time_extension, which represents the extension time from the current gating list to the next gating list and is only used during gating switching.
[0061] The relevant registers used during the gating execution are shown in Table 1:
[0062] Table 1 Relevant Registers Used during Gating Execution
[0063]
[0064] In one embodiment, Figure 5 A flowchart showing the execution of the gating list according to the execution parameters of the gating according to an embodiment of the present application is shown. In this embodiment, the gating list is executed according to the execution parameters of the gating to determine the on / off state of the gating, including:
[0065] Step S510, determining whether to configure the gating according to the gating configuration parameter gate_change_en; in this step, when the system is initialized without gating configuration, all gates are in the open state, allowing all network frames to pass; when the gating configuration parameter gate_change_en is 1, the gating is configured.
[0066] Step S520, after determining to configure the gating, when the system time reaches the gating switching time list_base_time, obtain and execute the first gating list, and open or close the gates of multiple queues according to the gating on / off state parameter gate_status[m:0] in the first gating list;
[0067] Step S530, when the execution time of the current gating list reaches the gating list execution time interval time_interval of the current gating list, determine whether the list execution length reaches the set length of the gating list length list_length; here, the list execution length refers to how many gating lists have been executed currently.
[0068] Step S540, if the list execution length does not reach the set length of the gating list length list_length, obtain and execute the next gating list;
[0069] Step S550: If the execution length of the list reaches the set length of the gating list length list_length, wait until the system time reaches the gating list execution cycle list_cycle_time, then re-obtain the first gating list and execute the first gating list.
[0070] In one embodiment, the gating scheduling method of the time-sensitive network further includes dividing different types of key frames into different queues. Here, there can be multiple types of key frames, such as video frames, audio frames, etc.; by setting the bit width of the gating switch status parameter gate status, different key frames can be divided into different queues to separate their transmissions, avoiding the mutual influence between critical traffic, increasing the flexibility in applications, and at the same time ensuring the time-deterministic transmission of critical traffic. In this embodiment, if the gating of multiple queues containing key frames is all open, the network frames divided into the higher queues can be scheduled for transmission.
[0071] Based on the same inventive concept as the gating scheduling method of the time-sensitive network in the embodiments of the present application, the embodiments of the present application also provide a gating scheduling device for a time-sensitive network. Figure 6 The structural block diagram of the gating scheduling device for the time-sensitive network according to the embodiments of the present application is shown. The device includes:
[0072] A network frame type determination module 610, configured to determine the type of the network frame; the type of the network frame includes key frames and non-key frames;
[0073] A queue division module 620, configured to divide the network frames into multiple queues according to the type of the network frame, with key frames and non-key frames being divided into different queues respectively, and each queue is correspondingly provided with a gating;
[0074] A gating switch status determination module 630, configured to determine the switch status of the gating according to the gating list, where the gating list includes a gating switch status parameter and a gating list execution time interval; the gating switch status parameter represents the switch status of the gating of each queue; the gating list execution time interval represents the duration of the switch status of the gating of each queue in the gating list;
[0075] A network frame scheduling module 640, configured to schedule the network frames in multiple queues for transmission according to the switch status of the gating and the type of the network frames in the multiple queues.
[0076] The gating scheduling device of the embodiments of the present application divides the network frames into multiple queues according to the type of the network frame, and can completely avoid the influence of non-key frames on key frames in practical applications; according to the switch status of the gating and the type of the network frames in the multiple queues, it schedules the network frames in the multiple queues for transmission, realizing the separation of key frames and non-key frames and ensuring the real-time performance of key frame transmission.
[0077] In one embodiment, the gating switch state determination module is further configured to:
[0078] Execute a gating list according to the execution parameters of gating to determine the on / off state of gating. The execution parameters of gating include: gating list length, gating switching time, gating list execution cycle period, and gating configuration parameters.
[0079] In one embodiment, the gating switch state determination module 630 is further configured to:
[0080] Determine whether there is a new gating configuration according to the gating configuration parameters;
[0081] If there is a new gating configuration, when the system time reaches the gating switching time, obtain and execute the first gating list, and open or close the gating of multiple queues according to the gating switch state parameters in the first gating list;
[0082] If the current gating list execution time reaches the gating list execution time interval of the current gating list, determine whether the list execution length reaches the set length of the gating list length;
[0083] If the list execution length does not reach the set length of the gating list length, obtain the next gating list and execute the next gating list;
[0084] If the list execution length reaches the set length of the gating list length, wait until the system time reaches the gating list execution cycle period, re-obtain the first gating list, and execute the first gating list.
[0085] In one embodiment, the network frame scheduling module 640 is configured to:
[0086] Select network frames for transmission from the queues with the gating switch state being open; when there are multiple queues with the gating switch state being open, preferentially select the network frames in the queue storing key frames for transmission.
[0087] In other embodiments, the implementation functions of the various modules in the gating scheduling device are consistent with the corresponding steps of the gating scheduling method in the foregoing embodiments, and will not be specifically described herein.
[0088] The above are only various implementation manners of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present application, and all should be covered by the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claimed rights.
Claims
1. A gated scheduling method for a time-sensitive network, characterized in that: including: determining the type of network frame; the types of the network frames include key frames and non-key frames; dividing the network frames into multiple queues according to the types of the network frames, where the key frames and the non-key frames are respectively divided into different queues, and each of the queues is correspondingly provided with a gating; determining the on / off state of the gating according to a gating list, where the gating list includes gating on / off state parameters and a gating list execution time interval; the gating on / off state parameters indicate the on / off state of the gating of each of the queues; the gating list execution time interval indicates the duration of the on / off state of the gating of each of the queues in the gating list; scheduling the network frames in the multiple queues for transmission according to the on / off state of the gating and the types of the network frames in the multiple queues; wherein, determining the on / off state of the gating according to the gating list includes: executing the gating list according to the execution parameters of the gating to determine the on / off state of the gating, where the execution parameters of the gating include: gating list length, gating switching time, gating list execution cycle period, and gating configuration parameters; wherein, executing the gating list according to the execution parameters of the gating to determine the on / off state of the gating includes: determining whether to configure the gating according to the gating configuration parameters; if it is determined to configure the gating, when the system time reaches the gating switching time, obtaining and executing the first gating list, and opening or closing the gating of the multiple queues according to the gating on / off state parameters in the first gating list; if the current gating list execution time reaches the gating list execution time interval of the current gating list, determining whether the list execution length reaches the set length of the gating list length; if the list execution length does not reach the set length of the gating list length, obtaining and executing the next gating list; if the list execution length reaches the set length of the gating list length, waiting for the system time to reach the gating list execution cycle period, re-obtaining the first gating list, and executing the first gating list.
2. The method according to claim 1, wherein the execution parameters of the gating further include: gating list switching extension time, indicating the extension time from the current gating list to the next gating list.
3. The method according to claim 1, wherein wherein, scheduling the network frames in the multiple queues for transmission according to the on / off state of the gating and the types of the network frames in the multiple queues includes: selecting network frames for transmission from the queues where the on / off state of the gating is open; when there are multiple queues where the on / off state of the gating is open, preferentially selecting the network frames in the queues storing key frames for transmission.
4. The method according to claim 1, wherein different types of key frames are divided into different queues.
5. A gating scheduling device for a time-sensitive network, characterized in that, including: a network frame type determination module, configured to determine the type of network frame; the types of the network frames include key frames and non-key frames; a queue division module, configured to divide the network frames into multiple queues according to the types of the network frames, where the key frames and the non-key frames are respectively divided into different queues, and each of the queues is correspondingly provided with a gating; A gating switch state determination module, configured to determine the switch state of the gating according to a gating list, where the gating list includes gating switch state parameters and a gating list execution time interval; the gating switch state parameters represent the switch states of the gatings of each of the queues; the gating list execution time interval represents the duration of the switch states of the gatings of each of the queues in the gating list; A network frame scheduling module, configured to schedule the transmission of network frames in the multiple queues according to the switch state of the gating and the types of network frames in the multiple queues; The gating switch state determination module is further configured to: Execute the gating list according to the execution parameters of the gating to determine the switch state of the gating, where the execution parameters of the gating include: the gating list length, the gating switching time, the gating list execution cycle period, and the gating configuration parameters; The gating switch state determination module is further configured to: Determine whether there is a new gating configuration according to the gating configuration parameters; If there is a new gating configuration, when the system time reaches the gating switching time, obtain and execute the first gating list, and open or close the gatings of the multiple queues according to the gating switch state parameters in the first gating list; If the current gating list execution time reaches the gating list execution time interval of the current gating list, determine whether the list execution length reaches the set length of the gating list length; If the list execution length does not reach the set length of the gating list length, obtain the next gating list and execute the next gating list; If the list execution length reaches the set length of the gating list length, wait until the system time reaches the gating list execution cycle period, re-obtain the first gating list, and execute the first gating list.
6. The device according to claim 5, wherein Wherein, The network frame scheduling module is configured to: Select network frames for transmission from the queues in which the switch state of the gating is open; when there are multiple queues in which the switch state of the gating is open, preferentially select the network frames in the queue storing the key frames for transmission.
Citation Information
Patent Citations
Time-sensitive network gating mechanism traffic shaping and route planning scheduling method
CN111740924A
Control method for door state in a time-sensitive network and related equipment
CN113542157A