TSN network data transmission method and device

By introducing basic protocol cache queues in the TSN network and optimizing the data frame transmission sequence, the problem of transmission delay of ARP, IGMP and DNS protocol frames in the TSN network is solved, achieving faster data transmission scheduling rate and system stability.

CN115567457BActive Publication Date: 2024-10-29XIAN YUNWEI ZHILIAN TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211019399.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-24
Publication Date
2024-10-29
Estimated Expiration
2042-08-24

Smart Images

  • Figure CN115567457B_ABST
    Figure CN115567457B_ABST
Patent Text Reader

Abstract

The present application relates to a TSN network data transmission method, including: caching the data frames to be transmitted into the corresponding cache queue according to the type and priority tag of the data frames to be transmitted; the cache queue includes multiple regular cache queues and 1 basic protocol cache queue; for each regular cache queue, before each data frame transmission, the scheduling order of the data frames to be transmitted in the regular cache queue and the data frames to be transmitted in the basic protocol cache queue is determined according to the priority scheduling algorithm; each regular cache queue sends the data frames to be transmitted according to the scheduling order. The TSN network data transmission method of the present application has at least one of the following beneficial technical effects: making special processing for data frames of basic protocol types such as ARP, IGMP, DNS, etc., increasing their transmission priority, speeding up their transmission scheduling rate, realizing the scheduling optimization of the bottom layer of the TSN network without changing the upper-layer applications and protocols, and reducing the data transmission delay of the TSN end nodes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of network transmission, and in particular, to a TSN network data transmission method and device. Background Art

[0002] Time Sensitive Ethernet (TSN) is based on the existing Ethernet and implements a set of international standards, which enables ordinary Ethernet to have the characteristics of time synchronization and reliable data transmission (low packet loss rate, low latency, and low jitter). TSN is a standard technology under the IEEE802 standard. IEEE802.1Qbv (hereinafter referred to as 802.1Qbv) is a standard in TSN. 802.1Qbv implements queue priority gating based on 802.1Q and provides a time-sensitive shaper (TAS) algorithm to achieve the goal of reducing Ethernet data transmission delay and improving determinism.

[0003] 802.1Qbv divides different time slots, each of which allows data from different queues to pass through, so as to isolate the data transmission of different queues in time and achieve data transmission of different queues without affecting each other. However, the existence of the above queues and the division of bandwidth can easily lead to data delays during data transmission, especially when transmitting protocol frames such as Address Resolution Protocol (ARP), Internet Group Management Protocol (IGMP), and Domain Name System (DNS). If data delays occur, it will affect the entire system and cause a large number of services to be unable to proceed. Summary of the invention

[0004] In order to overcome at least one deficiency in the prior art, an embodiment of the present application provides a TSN network data transmission method and device.

[0005] In a first aspect, an embodiment of the present application provides a TSN network data transmission method, including:

[0006] According to the type and priority tag of the data frame to be transmitted, the data frame to be transmitted is cached in the corresponding cache queue; wherein the type of the data frame to be transmitted includes a conventional type and a basic protocol type; the cache queue includes a plurality of conventional cache queues and a basic protocol cache queue, the conventional cache queue is used to cache the conventional type data frame, and the basic protocol cache queue is used to cache the basic protocol type data frame;

[0007] For each regular cache queue, before transmitting each data frame, determine the scheduling order of the data frames to be transmitted in the regular cache queue and the data frames to be transmitted in the basic protocol cache queue according to the priority scheduling algorithm;

[0008] Each regular cache queue sends the data frames to be transmitted according to the scheduling order.

[0009] In one embodiment, for each regular cache queue, before transmitting each data frame, determining the scheduling order of the data frames to be transmitted in the regular cache queue and the data frames to be transmitted in the basic protocol cache queue according to the priority scheduling algorithm includes:

[0010] Step 1, for each regular cache queue Q i , i = 0, 1,..., N, where i is the priority mark of the regular cache queue and N is the maximum value of the priority marks, determine whether there are data frames to be transmitted in the basic protocol cache queue. If not, send the data frames to be transmitted in the regular cache queue Q i . If so, execute Step 2;

[0011] Step 2, if i = 0, preferentially send the data frames to be transmitted in the basic protocol cache queue; if 1 ≤ i ≤ N, then execute Step 3;

[0012] Step 3, determine the value of C i , where C i is the number of data frames to be transmitted that the regular cache queue Q i has already sent from its own cache queue, and the initial value of C i is 0; if C i < M, where M is a positive integer greater than 10, then send the data frames in the regular cache queue Q i , and at the same time increase the value of C i by 1; if C i ≥ M, then send the data frames in the basic protocol cache queue, and at the same time reset the value of C i to 0.

[0013] In one embodiment, the basic protocol types include ARP, IGMP, and DNS.

[0014] In a second aspect, an embodiment of the present application provides a TSN network data transmission device, which is characterized by including:

[0015] A data caching module, configured to cache the data frames to be transmitted into corresponding cache queues according to the types and priority tags of the data frames to be transmitted; wherein, the types of the data frames to be transmitted include regular types and basic protocol types; the cache queues include multiple regular cache queues and one basic protocol cache queue, the regular cache queues are used to cache regular-type data frames, and the basic protocol cache queue is used to cache basic protocol-type data frames;

[0016] A scheduling order determination module, configured to, for each regular cache queue, determine the scheduling order of the data frames to be transmitted in the regular cache queue and the data frames to be transmitted in the basic protocol cache queue according to the priority scheduling algorithm before each data frame transmission;

[0017] A data sending module, configured to send the data frames to be transmitted in each regular cache queue according to the scheduling order.

[0018] In one embodiment, the scheduling order determination module is further configured to implement:

[0019] Step 1, for each regular cache queue Q i , i = 0, 1,..., N, where i is the priority tag of the regular cache queue and N is the maximum value of the priority tags, determine whether there are data frames to be transmitted in the basic protocol cache queue. If not, send the data frames to be transmitted in the regular cache queue Q i . If so, execute Step 2;

[0020] Step 2, if i = 0, preferentially send the data frames to be transmitted in the basic protocol cache queue; if 1 ≤ i ≤ N, execute Step 3;

[0021] Step 3, determine the value of C i , where C i is the number of data frames to be transmitted that the regular cache queue Q i has already sent from its own cache queue, and the initial value of C i is 0; if C i < M, where M is a positive integer greater than 10, then send the data frames in the regular cache queue Q i , and at the same time the value of C i increases by 1; if C i ≥ M, then send the data frames in the basic protocol cache queue, and at the same time the value of C i is reset to 0.

[0022] In one embodiment, the basic protocol types include ARP, IGMP, and DNS.

[0023] In a third aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned TSN network data transmission method is implemented.

[0024] In a fourth aspect, an embodiment of the present application provides a computer program product, including a computer program / instruction, which implements the above-mentioned TSN network data transmission method when the computer program / instruction is executed by a processor.

[0025] Compared with the prior art, the present application has the following beneficial effects: making special processing for data frames of basic protocol types such as ARP, IGMP, DNS, etc., increasing their transmission priority, speeding up their transmission scheduling rate, and realizing scheduling optimization of the underlying TSN network without changing the upper-layer applications and protocols, thereby reducing the data transmission delay of TSN end nodes. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] The present application may be better understood by referring to the following description given in conjunction with the accompanying drawings, which together with the following detailed description are included in this specification and form a part of this specification. In the drawings:

[0027] Figure 1 A schematic diagram showing the principle of a TSN network data transmission method according to an embodiment of the present application is shown;

[0028] Figure 2 A flowchart of a TSN network data transmission method according to an embodiment of the present application is shown;

[0029] Figure 3 A flowchart of a priority scheduling algorithm according to an embodiment of the present application is shown;

[0030] Figure 4 A structural block diagram of a TSN network data transmission device according to an embodiment of the present application is shown. DETAILED DESCRIPTION

[0031] The exemplary embodiments of the present application will be described below in conjunction with the accompanying drawings. For the sake of clarity and conciseness, not all features of the actual embodiments are described in the specification. However, it should be understood that many implementation-specific decisions can be made in the process of developing any such actual embodiments in order to achieve the specific goals of the developer, and these decisions may vary from embodiment to embodiment.

[0032] It is also necessary to explain here that, in order to avoid obscuring the present application due to unnecessary details, only the device structure closely related to the scheme according to the present application is shown in the drawings, while other details that are not closely related to the present application are omitted.

[0033] It should be understood that the present application is not limited to the described implementation forms due to the following description with reference to the accompanying drawings. In this article, where feasible, the embodiments can be combined with each other, features between different embodiments can be replaced or borrowed, and one or more features can be omitted in one embodiment.

[0034] TSN is a standard technology under the IEEE802 standard. IEEE802.1Qbv (hereinafter referred to as 802.1Qbv) is a standard in TSN. 802.1Qbv implements queue priority gating based on 802.1Q. 802.1Qbv divides different time slots, and each time slot allows data from different queues to pass through, so as to isolate the data transmission of different queues in time, so that the data transmission of different queues does not affect each other. 802.1Qbv sets up a total of 8 different queues (Q0-Q7). A virtual local area network tag (VLAN Tag) is added to the network data frame to identify the corresponding queue. For example, a priority tag (priority) can be set in the VLANTag to identify the queue corresponding to the network data frame. In addition, devices such as switches can also schedule data through priority tags (priority).

[0035] In the end system, the upper layer application sets the priority tag of the socket to identify which queue the socket uses for transmission. In a system where a large number of applications using queue scheduling are deployed, data without priority tags are scheduled as data in the Q0 queue; because the overall transmission bandwidth is allocated to 8 queues, the bandwidth of the Q0 queue is greatly reduced. When the amount of data transmitted is large, the transmission delay is more serious. In particular, when transmitting data frames of basic protocol types such as the Address Resolution Protocol (ARP), the Internet Group Management Protocol (IGMP), and the Domain Name System (DNS), the above basic protocol frames are automatically managed by the operating system and are not marked with priority, so they are sent from the 0 queue. In addition, the above basic protocol frames are the prerequisite for the operation of system functions. If data delay occurs, it will affect the entire system and cause a large number of services to be unable to proceed.

[0036] Based on the above technical problems, the TSN network data transmission method provided in the embodiment of the present application makes special processing for data frames of basic protocol types such as ARP, IGMP, DNS, etc., increases their transmission priority, and speeds up their transmission scheduling rate at the bottom driver. On the basis of not changing the upper-layer applications and protocols, the scheduling optimization of the bottom layer of the TSN network is realized, and the data transmission delay of the TSN end nodes is reduced.

[0037] Figure 1 A schematic diagram 100 of the principle of a TSN network data transmission method according to an embodiment of the present application is shown. Figure 1 The workflow of the TSN network data transmission method is introduced in detail.

[0038] After passing through the protocol stack, the data frames of the upper-layer applications are transmitted to the TSN network card driver. The TSN network card driver includes 8 regular cache queues, namely Q0~Q7. The 8 regular cache queues are used to cache data, corresponding to 8 DMA transmission channels for transmitting data frames to the network card MAC. The embodiment of the present application adds a basic protocol cache queue Q8 in the TSN network card driver. Q8 is used to cache data frames belonging to basic protocol types such as ARP, IGMP and DNS.

[0039] After receiving the data frame passing through the protocol stack, the TSN network card driver first determines the type of the data frame. If the data frame is a data frame of a basic protocol type such as ARP, IGMP, and DNS, the data frame is cached to Q8. Otherwise, the data frame is cached to its corresponding regular cache queue according to the priority tag (priority). The corresponding regular cache queue here is one of Q0 to Q7, and the priority tags (priority) of the data frame are 0 to 7 respectively.

[0040] When transmitting data frames to the network card MAC, the regular cache queues Q0~Q7 send data frames through their corresponding DMA transmission channels respectively. The data frames here include the data frames in the regular cache queues Q0~Q7 and the data frames in the basic protocol cache queue Q8. Each regular cache queue Q i , i = 0, 1, ..., 7, before each data frame is sent, first determine the sending of its own regular cache queue Q according to the priority scheduling algorithm i The data frame in is still the data frame in the basic protocol buffer queue Q8.

[0041] Figure 2A flowchart 200 of a TSN network data transmission method according to an embodiment of the present application is shown. The TSN network data transmission method of the present application may start at step S210, and cache the data frame to be transmitted into the corresponding cache queue according to the type and priority tag of the data frame to be transmitted; wherein the type of the data frame to be transmitted includes a conventional type and a basic protocol type, where the basic protocol type may include basic protocol types such as ARP, IGMP, and DNS; the cache queue includes multiple conventional cache queues and 1 basic protocol cache queue, the conventional cache queue is used to cache conventional type data frames, and the basic protocol cache queue is used to cache basic protocol type data frames;

[0042] Then, in step S220, for each regular cache queue, before each data frame is transmitted, a scheduling order of the data frames to be transmitted in the regular cache queue and the data frames to be transmitted in the basic protocol cache queue is determined according to a priority scheduling algorithm;

[0043] Then, in step S230, each regular buffer queue sends the data frames to be transmitted according to the scheduling order.

[0044] The TSN network data transmission method provided in the embodiment of the present application performs special processing on data frames of basic protocol types such as ARP, IGMP, and DNS, increases their transmission priority, speeds up their transmission scheduling rate, and realizes scheduling optimization of the bottom layer of the TSN network without changing the upper-layer applications and protocols, thereby reducing the data transmission delay of the TSN end nodes.

[0045] In one embodiment, Figure 3 A flowchart 300 of a priority scheduling algorithm according to an embodiment of the present application is shown. For each regular cache queue, before each data frame is transmitted, a scheduling order of data frames to be transmitted in the regular cache queue and data frames to be transmitted in the basic protocol cache queue is determined according to the priority scheduling algorithm, including:

[0046] Step 1: For each regular cache queue Q i , i = 0, 1, ..., N, where i is the priority tag of the regular cache queue, and N is the maximum value of the priority tag. Here, N = 7. Determine whether there is a data frame to be transmitted in the basic protocol cache queue. If not, send the regular cache queue Q i If the data frame to be transmitted exists, execute step 2;

[0047] Step 2, if i = 0, then preferentially send the data frames to be transmitted in the basic protocol cache queue; since the regular cache queue Q0 itself is used to transmit data frames with a transmission priority tag (priority) of 0 and data frames without a priority tag (priority), therefore, as long as there is transmission bandwidth in the cache queue Q0, preferentially transmit the data frames in the basic protocol cache queue Q8; if 1 ≤ i ≤ N, here, N = 7, then execute Step 3;

[0048] Step 3, determine the value of C i , where C i is the number of data frames to be transmitted that have been sent from its own cache queue in the regular cache queue Q i , and the initial value of C i is 0; if C i < M, where M is an empirical value and can be set as a positive integer greater than 10, then send the data frames in the regular cache queue Q i , and at the same time the value of C i increases by 1; if C i ≥ M, then send the data frames in the basic protocol cache queue, and at the same time the value of C i is reset to 0.

[0049] Based on the same inventive concept as the TSN network data transmission method, this embodiment also provides a corresponding TSN network data transmission device, Figure 4 FIG. 400 shows a structural block diagram of a TSN network data transmission device according to an embodiment of the present application, including:

[0050] A data cache module 410, configured to cache data frames to be transmitted into corresponding cache queues according to the type and priority tag of the data frames to be transmitted; wherein, the type of the data frames to be transmitted includes a regular type and a basic protocol type; the cache queues include a plurality of regular cache queues and 1 basic protocol cache queue, the regular cache queues are used to cache regular type data frames, and the basic protocol cache queue is used to cache basic protocol type data frames;

[0051] A scheduling order determination module 420, configured to, for each regular cache queue, determine the scheduling order of the data frames to be transmitted in the regular cache queue and the data frames to be transmitted in the basic protocol cache queue according to a priority scheduling algorithm before each data frame transmission;

[0052] A data sending module 430, configured to send the data frames to be transmitted according to the scheduling order for each regular cache queue.

[0053] In one embodiment, the scheduling order determination module is further configured to implement:

[0054] Step 1, for each regular cache queue Q i, where \(i = 0, 1, \ldots, N\), \(i\) is the priority tag of the regular cache queue, and \(N\) is the maximum value of the priority tag. In this embodiment, \(N = 7\). Determine whether there is a data frame to be transmitted in the basic protocol cache queue. If not, send the data frame to be transmitted in the regular cache queue \(Q\). i If so, execute step 2.

[0055] Step 2, if \(i = 0\), preferentially send the data frame to be transmitted in the basic protocol cache queue; if \(1\leq i\leq N\), in this embodiment, \(N = 7\), go to step 3.

[0056] Step 3, determine the value of \(C\). i where \(C\) i is the number of data frames to be transmitted that the regular cache queue \(Q\) i has already sent from its own cache queue, and the initial value of \(C\) i is 0; if \(C\) i <M, where \(M\) is an empirical value and can be set as a positive integer greater than 10, then send the data frame in the regular cache queue \(Q\) i , and at the same time the value of \(C\) i increases by 1; if \(C\) i ≥M, then send the data frame in the basic protocol cache queue, and at the same time the value of \(C\) i is reset to 0.

[0057] An embodiment of the present application provides a computer-readable storage medium storing a computer program, which when executed by a processor, implements the above-mentioned TSN network data transmission method.

[0058] An embodiment of the present application provides a computer program product including computer programs / instructions, which when executed by a processor, implement the above-mentioned TSN network data transmission method.

[0059] In summary, based on the existing TSN network, this application is compatible with existing protocols. Without changing the upper-layer applications and protocols, it realizes the scheduling optimization of the TSN network bottom layer and reduces the data transmission delay of the TSN end nodes. It has the following technical effects: Modify the scheduling method in the bottom-layer driver without modifying the upper-layer applications and protocols; effectively reduce the transmission delay of data frames of basic protocol types such as ARP, IGMP, and DNS; have no impact on the transmission of other data in each queue. Through actual measurement, it is found that in some scenarios, the scheduling speed of data frames of basic protocol types such as ARP, IGMP, and DNS can be reduced from more than 20 us to within 10 us.

[0060] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to the multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or the flowchart, and the combination of boxes in the block diagram and / or the flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.

[0061] In addition, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.

[0062] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application 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 methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0063] The above are only various implementations of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A TSN network data transmission method, It is characterized in that include: According to the type and priority tag of the data frame to be transmitted, the data frame to be transmitted is cached in the corresponding cache queue; wherein the type of the data frame to be transmitted includes a conventional type and a basic protocol type; the cache queue includes a plurality of conventional cache queues and a basic protocol cache queue, the conventional cache queue is used to cache the conventional type data frame, and the basic protocol cache queue is used to cache the basic protocol type data frame; For each of the conventional cache queues, before each transmission of a data frame, a scheduling order of the data frames to be transmitted in the conventional cache queue and the data frames to be transmitted in the basic protocol cache queue is determined according to a priority scheduling algorithm; Each of the regular buffer queues sends the data frames to be transmitted according to the scheduling order.

2. The method according to claim 1, It is characterized in that For each of the conventional cache queues, before each transmission of a data frame, determining a scheduling order of the data frames to be transmitted in the conventional cache queue and the data frames to be transmitted in the basic protocol cache queue according to a priority scheduling algorithm, including: Step 1: For each regular cache queue Q i , i = 0, 1, ..., N, where i is the priority tag of the regular cache queue, and N is the maximum value of the priority tag. Determine whether there is a data frame to be transmitted in the basic protocol cache queue. If not, send the regular cache queue Q i If the data frame to be transmitted exists, execute step 2; Step 2: if i=0, the data frames to be transmitted in the basic protocol cache queue are sent preferentially; if 1≤i≤N, execute step 3; Step 3, determine the value of C i where C i is the number of data frames to be transmitted that the conventional cache queue Q i has already sent from its own cache queue, and the initial value of C i is 0; if C i < M, where M is a positive integer greater than 10, then send the data frames in the conventional cache queue Q i , and at the same time the value of C i is incremented by 1; if C i ≥ M, then send the data frames in the basic protocol cache queue, and at the same time the value of C i is reset to 0.

3. The method according to claim 1, It is characterized in that The basic protocol types include ARP, IGMP and DNS.

4. A TSN network data transmission device, It is characterized in that include: A data cache module is configured to cache the data frame to be transmitted into a corresponding cache queue according to the type and priority tag of the data frame to be transmitted; wherein the type of the data frame to be transmitted includes a conventional type and a basic protocol type; the cache queue includes a plurality of conventional cache queues and a basic protocol cache queue, the conventional cache queue is used to cache the conventional type data frame, and the basic protocol cache queue is used to cache the basic protocol type data frame; A scheduling order determination module is configured to determine, for each of the conventional cache queues, a scheduling order of the data frames to be transmitted in the conventional cache queue and the data frames to be transmitted in the basic protocol cache queue according to a priority scheduling algorithm before each transmission of the data frames; The data sending module is configured to send the to-be-transmitted data frames in each of the regular buffer queues according to the scheduling order.

5. The TSN network data transmission device according to claim 4, It is characterized in that The scheduling order determination module is further configured to implement: Step 1: For each regular cache queue Q i , i = 0, 1, ..., N, where i is the priority tag of the regular cache queue, and N is the maximum value of the priority tag. Determine whether there is a data frame to be transmitted in the basic protocol cache queue. If not, send the regular cache queue Q i If the data frame to be transmitted exists, execute step 2; Step 2: if i=0, the data frames to be transmitted in the basic protocol cache queue are sent preferentially; if 1≤i≤N, execute step 3; Step 3, determine the value of C i , where C i is the number of data frames to be transmitted that the conventional cache queue Q i has already sent from its own cache queue. The initial value of C i is 0. If C i < M, where M is a positive integer greater than 10, then send the data frames in the conventional cache queue Qi, and at the same time increment the value of Ci by 1. If Ci ≥ M, then send the data frames in the basic protocol cache queue, and at the same time reset the value of C i to 0.

6. The TSN network data transmission device according to claim 4, It is characterized in that The basic protocol types include ARP, IGMP and DNS.

7. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the TSN network data transmission method according to any one of claims 1 to 3 is implemented.

8. A computer program product, It is characterized in that It includes a computer program / instruction, which, when executed by a processor, implements the TSN network data transmission method according to any one of claims 1 to 3.

Citation Information

Patent Citations

  • Industrial time-sensitive network data deterministic scheduling method

    CN111327540A

  • Data transmission method, device and system

    CN112995068A