[go: up one dir, main page]

CN116017701A - Data processing method, network device, and computer-readable storage medium - Google Patents

Data processing method, network device, and computer-readable storage medium Download PDF

Info

Publication number
CN116017701A
CN116017701A CN202111215555.4A CN202111215555A CN116017701A CN 116017701 A CN116017701 A CN 116017701A CN 202111215555 A CN202111215555 A CN 202111215555A CN 116017701 A CN116017701 A CN 116017701A
Authority
CN
China
Prior art keywords
transmission
queue
event
data stream
time
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111215555.4A
Other languages
Chinese (zh)
Inventor
刘峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
ZTE Corp
Original Assignee
ZTE Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by ZTE Corp filed Critical ZTE Corp
Priority to CN202111215555.4A priority Critical patent/CN116017701A/en
Priority to PCT/CN2022/124181 priority patent/WO2023066056A1/en
Publication of CN116017701A publication Critical patent/CN116017701A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W72/00Local resource management
    • H04W72/04Wireless resource allocation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W72/00Local resource management
    • H04W72/04Wireless resource allocation
    • H04W72/044Wireless resource allocation based on the type of the allocated resource
    • H04W72/0446Resources in time domain, e.g. slots or frames
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W72/00Local resource management
    • H04W72/50Allocation or scheduling criteria for wireless resources
    • H04W72/54Allocation or scheduling criteria for wireless resources based on quality criteria
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W72/00Local resource management
    • H04W72/50Allocation or scheduling criteria for wireless resources
    • H04W72/54Allocation or scheduling criteria for wireless resources based on quality criteria
    • H04W72/541Allocation or scheduling criteria for wireless resources based on quality criteria using the level of interference

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Quality & Reliability (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本发明公开了一种数据处理方法、网络设备及计算机可读存储介质。其中,数据处理方法包括接收时间触发数据流信息;在第一时隙传输时间触发数据流;接收事件触发数据流信息;在第二时隙传输事件触发数据流;其中,第一时隙和第二时隙是在同一传输周期的不同时隙。根据本发明实施例的方案,能够减少时间敏感的事件触发数据流和时间触发数据流在传输上发生冲突的情况,实现事件触发数据流和时间触发数据流的共同传输。

Figure 202111215555

The invention discloses a data processing method, a network device and a computer-readable storage medium. Wherein, the data processing method includes receiving time-triggered data flow information; transmitting time-triggered data flow in the first time slot; receiving event-triggered data flow information; transmitting event-triggered data flow in the second time slot; wherein, the first time slot and the second time slot Two slots are different slots in the same transmission cycle. According to the solutions of the embodiments of the present invention, it is possible to reduce transmission conflicts between time-sensitive event-triggered data streams and time-triggered data streams, and realize common transmission of event-triggered data streams and time-triggered data streams.

Figure 202111215555

Description

数据处理方法、网络设备及计算机可读存储介质Data processing method, network device, and computer-readable storage medium

技术领域technical field

本发明涉及数据处理技术领域,尤其涉及一种数据处理方法、网络设备及计算机可读存储介质。The present invention relates to the technical field of data processing, in particular to a data processing method, network equipment and computer-readable storage medium.

背景技术Background technique

在工业的快速发展的背景下,越来越多的工业应用场景对网络承载信息的延迟提出了新的要求。首先,提出了确定性传输时延要求,例如在高级驾驶辅助系统中数据的端到端传输时延应小于250微秒,在动力和底盘控制方面不能超过10微秒。在电力系统中电闸控制信息的传递中除了要求信息传递时延的要求外,同时对时延的变动范围也提出要求。为了满足某些应用场景针对业务承载时延的敏感要求,IEEE TSN工作组制定了一个开放的、通用的标准协议——TSN技术(Time-Sensitive Networks,时间敏感网络)。In the context of rapid industrial development, more and more industrial application scenarios have put forward new requirements for the delay of information carried by the network. First of all, the deterministic transmission delay requirements are put forward. For example, the end-to-end transmission delay of data in the advanced driving assistance system should be less than 250 microseconds, and it should not exceed 10 microseconds in terms of power and chassis control. In the transmission of switch control information in the power system, in addition to the requirements for information transmission time delay, there are also requirements for the variation range of time delay. In order to meet the sensitive requirements for service bearer delay in some application scenarios, the IEEE TSN working group has developed an open and general standard protocol - TSN technology (Time-Sensitive Networks, time-sensitive network).

然而,目前的TSN技术中,由于事件消息的存在,如操作员命令、告警和状态更改等,导致了实时应用网络系统中会出现事件触发数据流。由于事件触发数据流具有动态性和不可预测性,当事件触发数据流也要求低延迟时,会使得事件触发数据流与时间触发数据流具有相同的优先级,在这种情况下,事件触发数据流将占用为时间触发数据流保留的传输时隙,从而使时间触发数据流传输延迟增大甚至变得不可调度。However, in the current TSN technology, due to the existence of event messages, such as operator commands, alarms, and status changes, etc., event-triggered data streams will appear in real-time application network systems. Due to the dynamic and unpredictable nature of the event-triggered data flow, when the event-triggered data flow also requires low latency, the event-triggered data flow will have the same priority as the time-triggered data flow. In this case, the event-triggered data flow The stream will occupy the transmission slots reserved for time-triggered data streams, making the transmission delay of time-triggered data streams increase or even become unschedulable.

发明内容Contents of the invention

以下是对本文详细描述的主题的概述。本概述并非是为了限制权利要求的保护范围。The following is an overview of the topics described in detail in this article. This summary is not intended to limit the scope of the claims.

本发明实施例提供了一种数据处理方法、网络设备及计算机可读存储介质,能够减少时间敏感的事件触发数据流和时间触发数据流在传输上发生冲突的情况,实现事件触发数据流和时间触发数据流的共同传输。Embodiments of the present invention provide a data processing method, network equipment, and computer-readable storage medium, which can reduce conflicts between time-sensitive event-triggered data streams and time-triggered data streams in transmission, and realize event-triggered data streams and time-triggered data streams. Triggers the co-transmission of data streams.

第一方面,本发明实施例提供了一种数据处理方法,包括:In a first aspect, an embodiment of the present invention provides a data processing method, including:

接收时间触发数据流;Receive time-triggered data streams;

在第一时隙传输所述时间触发数据流;transmitting the time-triggered data stream in a first time slot;

接收事件触发数据流;Receive events to trigger data flow;

在第二时隙传输所述事件触发数据流;其中,所述第一时隙和所述第二时隙是在同一传输周期的不同时隙。The event-triggered data stream is transmitted in a second time slot; wherein the first time slot and the second time slot are different time slots in the same transmission cycle.

第二方面,本发明实施例还提供了一种网络设备,包括至少一个控制处理器和用于与所述至少一个控制处理器通信连接的存储器;所述存储器存储有可被所述至少一个控制处理器执行的指令,所述指令被所述至少一个控制处理器执行,以使所述至少一个控制处理器能够执行如上第一方面所述的数据处理方法。In the second aspect, the embodiment of the present invention also provides a network device, including at least one control processor and a memory for communicating with the at least one control processor; the memory stores information that can be controlled by the at least one control processor. Instructions executed by a processor, the instructions are executed by the at least one control processor, so that the at least one control processor can execute the data processing method as described in the first aspect above.

第三方面,本发明实施例还提供了一种计算机可读存储介质,计算机可读存储介质存储有计算机可执行指令,计算机可执行指令用于使计算机执行第一方面所述的数据处理方法。In a third aspect, an embodiment of the present invention further provides a computer-readable storage medium, the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to make a computer execute the data processing method described in the first aspect.

本发明实施例包括:接收时间触发数据流,在第一时隙传输时间触发数据流;接收事件触发数据流,在第二时隙传输事件触发数据流;其中,第一时隙和第二时隙是在同一传输周期的不同时隙。根据本发明实施例的方案,接收时间触发数据流,在第一时隙传输时间触发数据流,接收事件触发数据流,在第二时隙传输事件触发数据流,其中,第一时隙和第二时隙是在同一传输周期的不同时隙,因此,时间触发数据流和事件触发数据流不会在同一传输周期的同一时隙进行传输,即是说,本发明实施例的方案能够减少时间敏感的事件触发数据流和时间触发数据流在传输上发生冲突的情况,实现事件触发数据流和时间触发数据流的共同传输。The embodiment of the present invention includes: receiving a time-triggered data stream, transmitting a time-triggered data stream in the first time slot; receiving an event-triggered data stream, and transmitting an event-triggered data stream in a second time slot; wherein, the first time slot and the second time slot Slots are different time slots in the same transmission cycle. According to the solution of the embodiment of the present invention, the time-triggered data flow is received, the time-triggered data flow is transmitted in the first time slot, the event-triggered data flow is received, and the event-triggered data flow is transmitted in the second time slot, wherein the first time slot and the second time slot The two time slots are different time slots in the same transmission period, therefore, the time-triggered data flow and the event-triggered data flow will not be transmitted in the same time slot of the same transmission period, that is to say, the solution of the embodiment of the present invention can reduce the time Sensitive event-triggered data streams and time-triggered data streams conflict in transmission, and the common transmission of event-triggered data streams and time-triggered data streams is realized.

本发明的其它特征和优点将在随后的说明书中阐述,并且,部分地从说明书中变得显而易见,或者通过实施本发明而了解。本发明的目的和其他优点可通过在说明书、权利要求书以及附图中所特别指出的结构来实现和获得。Additional features and advantages of the invention will be set forth in the description which follows, and in part will be apparent from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention may be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.

附图说明Description of drawings

附图用来提供对本发明技术方案的进一步理解,并且构成说明书的一部分,与本发明的实施例一起用于解释本发明的技术方案,并不构成对本发明技术方案的限制。The accompanying drawings are used to provide a further understanding of the technical solution of the present invention, and constitute a part of the description, and are used together with the embodiments of the present invention to explain the technical solution of the present invention, and do not constitute a limitation to the technical solution of the present invention.

图1是本发明一个实施例提供的数据处理方法的流程图;Fig. 1 is a flowchart of a data processing method provided by an embodiment of the present invention;

图2是图1中步骤S120的具体方法的流程图;Fig. 2 is the flowchart of the concrete method of step S120 in Fig. 1;

图3是图1中步骤S140的具体方法的流程图;Fig. 3 is the flowchart of the specific method of step S140 in Fig. 1;

图4是本发明一个实施例提供的数据处理方法的流程图;FIG. 4 is a flowchart of a data processing method provided by an embodiment of the present invention;

图5是图4中步骤S170的具体方法的流程图;Fig. 5 is the flowchart of the concrete method of step S170 in Fig. 4;

图6是图4中步骤S170的具体方法的流程图;Fig. 6 is the flowchart of the specific method of step S170 in Fig. 4;

图7是图6中步骤S1722的具体方法的流程图;FIG. 7 is a flowchart of a specific method of step S1722 in FIG. 6;

图8是本发明一个实施例提供的数据处理方法的流程图;FIG. 8 is a flowchart of a data processing method provided by an embodiment of the present invention;

图9是图8中步骤S810的具体方法的流程图;FIG. 9 is a flowchart of a specific method of step S810 in FIG. 8;

图10是图8中步骤S810的具体方法的流程图;FIG. 10 is a flowchart of a specific method of step S810 in FIG. 8;

图11是相关技术中数据流的传输示意图;FIG. 11 is a schematic diagram of data stream transmission in the related art;

图12是TSN技术的时间整形机制中数据流的传输示意图;FIG. 12 is a schematic diagram of data stream transmission in the time shaping mechanism of TSN technology;

图13是本发明另一个实施例提供的传输队列的传输示意图;Fig. 13 is a transmission schematic diagram of a transmission queue provided by another embodiment of the present invention;

图14是本发明另一个实施例提供的传输队列的传输示意图;Fig. 14 is a transmission schematic diagram of a transmission queue provided by another embodiment of the present invention;

图15是本发明另一个实施例提供的事件触发数据流的传输周期示意图;Fig. 15 is a schematic diagram of a transmission cycle of an event-triggered data stream provided by another embodiment of the present invention;

图16是本发明另一个实施例提供的数据流传输示意图。Fig. 16 is a schematic diagram of data stream transmission provided by another embodiment of the present invention.

具体实施方式Detailed ways

为了使本发明的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本发明进行进一步详细说明。应当理解,此处所描述的具体实施例仅用以解释本发明,并不用于限定本发明。In order to make the object, technical solution and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present invention, not to limit the present invention.

需要说明的是,虽然在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于流程图中的顺序执行所示出或描述的步骤。说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。It should be noted that although a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than in the flowchart. The terms "first", "second" and the like in the specification and claims and the above drawings are used to distinguish similar objects, and not necessarily used to describe a specific sequence or sequence.

本发明实施例提供一种数据处理方法、网络设备及计算机刻度存储介质,接收时间触发数据流,在第一时隙传输时间触发数据流,接收事件触发数据流,在第二时隙传输事件触发数据流,其中,第一时隙和第二时隙是在同一传输周期的不同时隙,因此,时间触发数据流和事件触发数据流不会在同一传输周期的同一时隙进行传输,即是说,本发明实施例的方案能够减少时间敏感的事件触发数据流和时间触发数据流在传输上发生冲突的情况,实现事件触发数据流和时间触发数据流的共同传输。An embodiment of the present invention provides a data processing method, network equipment, and a computer scale storage medium, receiving a time-triggered data stream, transmitting a time-triggered data stream in the first time slot, receiving an event-triggered data stream, and transmitting an event-triggered data stream in the second time slot Data flow, wherein the first time slot and the second time slot are different time slots in the same transmission period, therefore, the time-triggered data flow and the event-triggered data flow will not be transmitted in the same time slot of the same transmission period, that is In other words, the solutions of the embodiments of the present invention can reduce the conflicts between transmission of time-sensitive event-triggered data streams and time-triggered data streams, and realize common transmission of event-triggered data streams and time-triggered data streams.

下面结合附图,对本发明实施例作进一步阐述。The embodiments of the present invention will be further described below in conjunction with the accompanying drawings.

如图1所示,图1是本发明一个实施例提供的数据处理方法的流程图,该数据处理方法可以包括但不限于有步骤S110、步骤S120、步骤S130和步骤S140。As shown in FIG. 1 , FIG. 1 is a flowchart of a data processing method provided by an embodiment of the present invention. The data processing method may include but not limited to step S110 , step S120 , step S130 and step S140 .

步骤S110:接收时间触发数据流。Step S110: Receive a time-triggered data stream.

本步骤中,时间触发数据流指的是指时间敏感的数据流,时间触发数据流可以是周期性传输的数据流,时间触发数据流具有传输周期。In this step, the time-triggered data flow refers to a time-sensitive data flow. The time-triggered data flow may be a periodically transmitted data flow, and the time-triggered data flow has a transmission cycle.

在一个可选的实施方式中,在一种应用TSN技术的网络应用场景中,当某一个确定的业务需要在确定的时间内完成传输,该业务具有最大时延要求。例如,航空电子全双工交换式以太网必须要在几毫秒内完成关键数据的端到端传输并且对其时延抖动也具有严格的要求,还有很多工业控制应用的传输时延要保证在1毫秒甚至几微秒的有界范围内,此外在高级驾驶辅助系统中数据的端到端传输时延应小于250微秒,在动力和底盘控制方面不能超过10微秒等。该业务产生的数据流属于时间触发数据流。In an optional implementation manner, in a network application scenario using the TSN technology, when a certain service needs to be transmitted within a certain time, the service has a maximum delay requirement. For example, avionics full-duplex switched Ethernet must complete the end-to-end transmission of key data within a few milliseconds and has strict requirements on its delay jitter, and the transmission delay of many industrial control applications must be guaranteed within a few milliseconds. In addition, the end-to-end transmission delay of data in the advanced driver assistance system should be less than 250 microseconds, and it should not exceed 10 microseconds in terms of power and chassis control. The data flow generated by this service belongs to the time-triggered data flow.

需要说明的是,接收时间触发数据流可以是使用数组保存时间触发数据流接收,也可以是直接把时间触发数据流储存在相关技术中的任意形式的链表中,在本实施例不作具体限定,然后等待后续对时间触发数据流的传输。It should be noted that receiving the time-triggered data stream can be received by using an array to save the time-triggered data stream, or directly storing the time-triggered data stream in any form of linked list in related technologies, which is not specifically limited in this embodiment. It then waits for subsequent transmissions of time-triggered data streams.

步骤S120:在第一时隙传输时间触发数据流。Step S120: Trigger data flow at the transmission time of the first time slot.

本步骤中,由于在步骤S110中接收到了时间触发数据流,因此可以在第一时隙传输时间触发数据流。第一时隙可以是传输周期内的任意时隙,第一时隙可以是传输周期内的一个单独的时隙,也可以是任意数量个时隙,当存在多个第一时隙,第一时隙之间的间隔可以是任意间隔,只要能够满足时间触发数据流的时延要求即可,在本实施例不作具体限定。另外,第一时隙的数量可以根据时间触发数据流的数量进行预设。In this step, since the time-triggered data stream is received in step S110, the time-triggered data stream may be transmitted in the first time slot. The first time slot may be any time slot in the transmission cycle, the first time slot may be a single time slot in the transmission cycle, or any number of time slots, and when there are multiple first time slots, the first The interval between the time slots may be any interval, as long as it can meet the delay requirement of the time-triggered data stream, which is not specifically limited in this embodiment. In addition, the number of first time slots may be preset according to the number of time-triggered data streams.

需要说明的是,在第一时隙传输时间触发数据流,参照图11,时间触发数据流的传输可以是从客户端分别通过以太网设备进行传输,最终到达目标客户端;也可以是先将时间触发数据流存储在一个传输队列中,该传输队列可以是相关技术中的设置在系统中的任意位置的先进先出的传输队列,然后通过相关技术中的任意数据流传输方式对时间触发数据流进行传输,例如:通过周期性地在第一时隙打开门控以开启传输队列来传输时间触发数据流,或者在第一时隙直接开启传输队列来对时间触发数据流进行周期性的传输等。It should be noted that the time-triggered data flow is transmitted in the first time slot. Referring to FIG. 11 , the time-triggered data flow can be transmitted from the client through the Ethernet device and finally reach the target client; The time-triggered data stream is stored in a transmission queue, which can be a first-in-first-out transmission queue set anywhere in the system in the related art, and then transmits the time-triggered data through any data stream transmission method in the related art For example, by periodically opening the gate in the first time slot to open the transmission queue to transmit the time-triggered data flow, or directly opening the transmission queue in the first time slot to periodically transmit the time-triggered data flow wait.

步骤S130:接收事件触发数据流。Step S130: Receive event-triggered data stream.

本步骤中,事件触发数据流可以是在实时应用网络系统中,由于事件消息的存在,例如由于操作员命令、事故告警或状态更改等而出现的数据流,事件触发数据流可以是零星出现的数据流或者突然出现的的周期性数据流,事件触发数据流具有动态性和不可预测性。In this step, the event-triggered data flow may be in the real-time application network system, due to the existence of event messages, such as the data flow that occurs due to operator commands, accident alarms or state changes, etc., the event-triggered data flow may occur sporadically Data flow or sudden periodic data flow, event-triggered data flow is dynamic and unpredictable.

需要说明的是,接收事件触发数据流,可以是使用数组储存事件触发数据流,也可以是直接把事件触发数据流储存在相关技术中的任意形式的链表中,只要能够起到接收事件触发数据流的作用即可,在本实施例不作具体限定,等待后续对事件触发数据流的传输。It should be noted that receiving the event-triggered data stream can be done by using an array to store the event-triggered data stream, or by directly storing the event-triggered data stream in any form of linked list in related technologies, as long as it can receive event-triggered data The function of the stream is sufficient, and is not specifically limited in this embodiment, and it waits for subsequent transmission of event-triggered data streams.

步骤S140:在第二时隙传输事件触发数据流,其中,第一时隙和第二时隙是在同一传输周期的不同时隙。Step S140: Triggering a data stream on a second time slot transmission event, wherein the first time slot and the second time slot are different time slots in the same transmission period.

本步骤中,由于在步骤S130中接收到了事件触发数据流,因此可以在第二时隙传输事件触发数据流,第二时隙可以是传输周期内的任意时隙,第二时隙可以是传输周期内的一个单独的时隙,也可以是任意数量个时隙,当存在多个第二时隙,第二时隙之间的间隔可以是任意间隔,第二时隙的数量可以根据时间触发数据流的数量进行预设。In this step, since the event-triggered data stream is received in step S130, the event-triggered data stream can be transmitted in the second time slot, and the second time slot can be any time slot in the transmission cycle, and the second time slot can be a transmission A single time slot in a cycle can also be any number of time slots. When there are multiple second time slots, the interval between the second time slots can be any interval, and the number of second time slots can be triggered according to time The number of data streams is preset.

需要说明的是,在第二时隙传输事件触发数据流,参照图11,事件触发数据流的传输可以是从第一客户端分别通过第一以太网设备1110、第二以太网设备1120、第三以太网设备1130以及第四以太网设备1140进行传输,最终到达第二客户端;也可以是将事件触发数据流存储在队列中,然后通过相关技术中的任意数据流传输方式对事件触发数据流进行传输,例如:通过周期性地在第二时隙打开门控以传输事件触发数据流,或者在第二时隙打开队列来对事件触发数据流进行周期性的传输等。由于第一时隙和第二时隙是在同一传输周期的不同时隙,时间触发数据流和事件触发数据流在不同的时隙进行传输,互相之间不会存在影响,能够减少时间敏感的事件触发数据流和时间触发数据流在传输上发生冲突的情况,实现事件触发数据流和时间触发数据流的共同传输。It should be noted that the event-triggered data stream is transmitted in the second time slot. Referring to FIG. The three Ethernet devices 1130 and the fourth Ethernet device 1140 transmit, and finally reach the second client; it is also possible to store the event-triggered data stream in the queue, and then transmit the event-triggered data through any data stream transmission method in the related art For example, by periodically opening the gate in the second time slot to transmit the event-triggered data stream, or opening the queue in the second time slot to periodically transmit the event-triggered data stream, etc. Since the first time slot and the second time slot are in different time slots of the same transmission cycle, the time-triggered data flow and the event-triggered data flow are transmitted in different time slots, and there is no influence on each other, which can reduce time-sensitive When the event-triggered data flow and the time-triggered data flow conflict in transmission, the common transmission of the event-triggered data flow and the time-triggered data flow is realized.

在一个可选的实施方式中,在TSN技术中,同一时间片只允许一个队列的门控打开,当两个或多个不同优先级的门控开关同时打开,只有高优先级队列的数据流可以输出,低优先级队列的数据流不能输出。当系统中同时存在周期性的时间触发数据流和例如操作命令、系统警报等的事件触发数据流,若事件触发数据流也是时间敏感的,事件触发数据流队列的传输优先级高于或者等于时间触发数据流队列的传输优先级会导致时间触发数据流不可调度或者不能在最大允许延长时间范围内完成传输,事件触发数据流队列的传输优先级太低又会导致事件触发数据流不可调度或者不能在最大允许延长时间范围内完成传输。In an optional implementation, in the TSN technology, only the gate of one queue is allowed to be opened in the same time slice. When two or more gate switches with different priorities are opened at the same time, only the data flow of the high-priority queue It can be output, but the data flow of the low priority queue cannot be output. When there are periodic time-triggered data streams and event-triggered data streams such as operation commands and system alarms in the system, if the event-triggered data stream is also time-sensitive, the transmission priority of the event-triggered data stream queue is higher than or equal to time The transmission priority of the trigger data flow queue will cause the time-triggered data flow to be unschedulable or unable to complete the transmission within the maximum allowable extended time range, and the transmission priority of the event-triggered data flow queue is too low to cause the event-triggered data flow to be unschedulable or impossible Complete the transfer within the maximum allowed extended time frame.

需要说明的是,接收时间触发数据流,时间触发数据流指的是时间敏感的时间触发数据流,在第一时隙传输时间触发数据流,第一时隙指的是传输周期中的任意时隙,第一时隙可以是一个时隙,也可以是多个时隙。接收事件触发数据流,事件触发数据流指的是系统突发数据流,例如操作命令、系统警报等,事件触发数据流具有动态性和不可预测性。在第二时隙传输事件触发数据流,第二时隙指的是传输周期中的任意时隙,第二时隙可以是一个时隙,也可以是多个时隙。其中,第一时隙和第二时隙是在同一传输周期的不同时隙,时间触发数据流和事件触发数据流不会在同一传输周期的同一时隙进行传输,能够避免时间触发数据流和事件触发数据流在传输上的冲突,实现了事件触发数据流和时间触发数据流的共同传输。It should be noted that the time-triggered data stream is received, and the time-triggered data stream refers to a time-sensitive time-triggered data stream. The time-triggered data stream is transmitted in the first time slot, and the first time slot refers to any time in the transmission cycle. The first time slot may be one time slot or multiple time slots. Receive event-triggered data streams. Event-triggered data streams refer to system burst data streams, such as operation commands, system alarms, etc. Event-triggered data streams are dynamic and unpredictable. The data flow is triggered by the transmission event in the second time slot, where the second time slot refers to any time slot in the transmission cycle, and the second time slot may be one time slot or multiple time slots. Wherein, the first time slot and the second time slot are different time slots in the same transmission period, and the time-triggered data flow and the event-triggered data flow will not be transmitted in the same time slot of the same transmission period, which can avoid the time-triggered data flow and The collision of event-triggered data streams in transmission realizes the common transmission of event-triggered data streams and time-triggered data streams.

本实施例中,通过采用包括有上述步骤S110至步骤S140的数据处理方法,接收时间触发数据流,在第一时隙传输时间触发数据流;接收事件触发数据流,在第二时隙传输事件触发数据流;其中,第一时隙和第二时隙是在同一传输周期的不同时隙,因此,时间触发数据流和事件触发数据流不会在同一传输周期的同一时隙进行传输,本实施例能够减少时间敏感的事件触发数据流和时间触发数据流在传输上发生冲突的情况,实现事件触发数据流和时间触发数据流的共同传输。In this embodiment, by adopting the data processing method including the above steps S110 to S140, the time-triggered data stream is received, and the time-triggered data stream is transmitted in the first time slot; the event-triggered data stream is received, and the event is transmitted in the second time slot Triggered data flow; wherein, the first time slot and the second time slot are different time slots in the same transmission period, therefore, the time-triggered data flow and the event-triggered data flow will not be transmitted in the same time slot of the same transmission period. The embodiment can reduce the transmission conflict between the time-sensitive event-triggered data flow and the time-triggered data flow, and realize the common transmission of the event-triggered data flow and the time-triggered data flow.

值得注意的是,在TSN技术的时间感知整形机制下,时间感知整形机制要求严格的时间同步,系统终端设备所发送的数据流都是周期性的,对同步性和周期性的依赖性导致网络系统中不允许存在不可预测的数据流,如果在系统运行过程中出现流量调度之外的突发流,如操作命令、系统警报等事件触发数据流,这些突发流势必会影响到对原有流的调度,甚至造成系统的崩溃,而在本实施例中,由于设置时间触发数据流和事件触发数据流在同一传输周期的不同时隙进行传输,因此可以达到减少时间敏感的事件触发数据流和时间触发数据流在传输上发生冲突的情况、共同传输时间触发数据流和事件触发数据流的目的。It is worth noting that under the time-aware shaping mechanism of TSN technology, the time-aware shaping mechanism requires strict time synchronization. The data streams sent by the system terminal equipment are all periodic, and the dependence on synchronization and periodicity leads to network Unpredictable data flows are not allowed in the system. If unexpected flows other than traffic scheduling occur during system operation, such as operation commands, system alarms and other events triggering data flows, these bursts will inevitably affect the original The scheduling of the flow may even cause the system to crash. In this embodiment, since the time-triggered data flow and the event-triggered data flow are set to be transmitted in different time slots of the same transmission cycle, the time-sensitive event-triggered data flow can be reduced. Conflicts with time-triggered data streams in transmission, the purpose of co-transmitting time-triggered data streams and event-triggered data streams.

在一实施例中,如图2所示,对步骤S120进行进一步的说明,该步骤S120可以包括但不限于有步骤S121和步骤S122。In an embodiment, as shown in FIG. 2 , step S120 is further described, and step S120 may include but not limited to step S121 and step S122 .

步骤S121:将时间触发数据流缓存于第一传输队列。Step S121: Buffer the time-triggered data flow in the first transmission queue.

本步骤中,第一传输队列的数量可以是一个或者多个,第一传输队列可以是相关技术中的先进先出的传输队列。接收到时间触发数据流后,将时间触发数据流缓存于第一传输队列,等待队列打开后进行传输。In this step, the number of the first transmission queue may be one or more, and the first transmission queue may be a first-in-first-out transmission queue in the related art. After receiving the time-triggered data flow, the time-triggered data flow is cached in the first transmission queue, and the transmission is performed after the queue is opened.

需要说明的是,第一传输队列的设置可以是相关技术中的任意设置方式,例如,在一个可选的实施方式中,通过数组以及数组下标的方式设置第一传输队列,或者通过链表,例如单链表或者双链表等设置第一传输队列,只要能够起到缓存时间触发数据流即可,本实施例对此不作具体限定。It should be noted that the setting of the first transmission queue can be any setting method in related technologies. For example, in an optional implementation, the first transmission queue is set through an array and an array subscript, or through a linked list, such as The first transmission queue is set in a singly-linked list or a double-linked list, as long as it can trigger a data flow at a buffer time, which is not specifically limited in this embodiment.

步骤S122:根据预设的队列开关信息在第一时隙开启第一传输队列,使得时间触发数据流在第一时隙进行传输。Step S122: Open the first transmission queue in the first time slot according to the preset queue switch information, so that the time-triggered data flow is transmitted in the first time slot.

本步骤中,由于在步骤S121已经将时间触发数据流缓存于第一传输队列中,因此可以控制开启第一传输队列以传输时间触发数据流。In this step, since the time-triggered data flow has been buffered in the first transmission queue in step S121, the first transmission queue can be controlled to be opened to transmit the time-triggered data flow.

需要说明的是,根据预设的队列开关信息在第一时隙开启第一传输队列,预设的队列开关信息可以是在获取时间触发数据流之后,根据时间触发数据流的数量、时延要求以及传输路径集合等进行调度计算,得到第一传输队列的队列开关信息,参照图16,传输路径可以是根据时间触发数据流实际经过的路径,例如图16中的从设备1传输到设备5,分别经过设备2和设备6,设备1、设备2、设备6和设备5即是时间触发数据流的传输路径。It should be noted that, according to the preset queue switch information, the first transmission queue is opened in the first time slot. The preset queue switch information may be based on the number of time-triggered data streams and delay requirements after the time-triggered data streams are acquired. and the transmission path set etc. to perform scheduling calculations to obtain the queue switch information of the first transmission queue. Referring to FIG. 16, the transmission path can be the path that the data flow actually passes according to the time trigger, such as the transmission from device 1 to device 5 in FIG. 16, Device 1, Device 2, Device 6, and Device 5 respectively pass through Device 2 and Device 6, which are the transmission paths of the time-triggered data flow.

需要说明的是,根据队列开关信息开启第一传输队列,缓存时间触发数据流的第一传输队列均在第一时隙被开启。It should be noted that the first transmission queue is enabled according to the queue switch information, and the first transmission queues for caching the time-triggered data flow are all enabled in the first time slot.

另外,在一个可选的实施方式中,队列开关信息可以是缓存在一个缓存列表中,第一传输队列可以设置有门控,根据队列开关信息开启第一传输队列的门控,则可以开启第一传输队列以使得时间触发数据流在第一时隙进行传输。In addition, in an optional implementation manner, the queue switch information can be cached in a cache list, the first transmission queue can be set with gate control, and the gate control of the first transmission queue can be opened according to the queue switch information, then the second transmission queue can be opened. A transmit queue such that the time-triggered data flow is transmitted in the first time slot.

本实施例中,通过采用上述步骤S121至步骤S122,在获取到时间触发数据流之后,将时间触发数据流缓存于第一传输队列,根据预设的队列开关信息在第一时隙开启第一传输队列,使得时间触发数据流在第一时隙进行传输,从而可以达到在第一时隙传输时间触发数据流的目的。In this embodiment, by adopting the above steps S121 to S122, after the time-triggered data stream is acquired, the time-triggered data stream is cached in the first transmission queue, and the first transmission queue is opened in the first time slot according to the preset queue switch information. The transmission queue enables the time-triggered data flow to be transmitted in the first time slot, so that the purpose of transmitting the time-triggered data flow in the first time slot can be achieved.

在一实施例中,如图3所示,对步骤S140进行进一步的说明,该步骤S140可以包括但不限于有步骤S141和步骤S142。In an embodiment, as shown in FIG. 3 , step S140 is further described, and step S140 may include but not limited to step S141 and step S142 .

步骤S141:将事件触发数据流缓存于第二传输队列。Step S141: Buffer the event-triggered data stream in the second transmission queue.

本步骤中,第二传输队列的数量可以是一个或者多个,第二传输队列可以是相关技术中任意形式设置的传输队列。接收到事件触发数据流后,将事件触发数据流缓存于第二传输队列,等待队列打开后进行传输。In this step, the number of the second transmission queue may be one or more, and the second transmission queue may be a transmission queue set in any form in the related art. After receiving the event-triggered data flow, buffer the event-triggered data flow in the second transmission queue, and wait for the queue to be opened before transmitting.

需要说明的是,第二传输队列的设置可以是相关技术中的任意设置方式,例如,在一个可选的实施方式中,通过数组的方式设置第二传输队列,或者通过链表,例如单链表或者双链表等方式设置第二传输队列,第二传输队列只要能够起到缓存事件触发数据流的作用即可,本实施例对此不作具体限定。It should be noted that the setting of the second transmission queue can be any setting method in the related art. For example, in an optional implementation, the second transmission queue is set in the form of an array, or through a linked list, such as a singly linked list or The second transmission queue is set in a double-linked list, etc., as long as the second transmission queue can play a role in buffering event-triggered data streams, which is not specifically limited in this embodiment.

步骤S142:根据队列开关信息在第二时隙开启第二传输队列,使得事件触发数据流在第二时隙进行传输。Step S142: Open the second transmission queue in the second time slot according to the queue switch information, so that the event-triggered data flow is transmitted in the second time slot.

本步骤中,由于在步骤S141已经将事件触发数据流缓存于第二传输队列中,因此可以控制开启第二传输队列以传输事件触发数据流。In this step, since the event-triggered data flow has been buffered in the second transmission queue in step S141, the second transmission queue can be controlled to be opened to transmit the event-triggered data flow.

需要说明的是,根据队列开关信息在第二时隙开启第二传输队列,队列开关信息可以是在获取事件触发数据流之后,根据事件触发数据流的数量、时延要求进行调度计算,得到第二传输队列的队列开关信息。It should be noted that, according to the queue switch information, the second transmission queue is opened in the second time slot. The queue switch information can be obtained after the event-triggered data flow is obtained, and the scheduling calculation is performed according to the number of event-triggered data flows and delay requirements, and the second transmission queue is obtained. Second, the queue switch information of the transmission queue.

需要说明的是,根据队列开关信息开启第二传输队列,第二传输队列均在第二时隙被开启,同时,队列开关信息也用于控制在第一时隙开启第一传输队列,队列开关信息可以是根据传输队列的开启以及关闭的信息形成的列表信息,在第一时隙开启第一传输队列,在第二时隙开启第二传输队列。It should be noted that the second transmission queue is opened according to the queue switch information, and the second transmission queue is opened in the second time slot. At the same time, the queue switch information is also used to control the opening of the first transmission queue in the first time slot. The queue switch The information may be list information formed according to the opening and closing information of the transmission queue, the first transmission queue is opened in the first time slot, and the second transmission queue is opened in the second time slot.

另外,在一个可选的实施方式中,队列开关信息可以是缓存在一个缓存队列中,第二传输队列可以设置有门控,根据队列开关信息开启第二传输队列的门控,则可以开启第二传输队列以使得事件触发数据流在第二时隙进行传输。In addition, in an optional implementation manner, the queue switch information may be cached in a cache queue, and the second transmission queue may be provided with gate control. If the gate control of the second transmission queue is enabled according to the queue switch information, the second transmission queue may be enabled. A second transmission queue is used to enable the event-triggered data flow to be transmitted in the second time slot.

本实施例中,通过采用上述步骤S141至步骤S142,在获取到事件触发数据流之后,先将事件触发数据流缓存于第二传输队列,然后根据队列开关信息在第二时隙开启第二传输队列,使得事件触发数据流在第二时隙进行传输,从而可以达到在第二时隙传输事件触发数据流的目的。In this embodiment, by adopting the above steps S141 to S142, after the event-triggered data stream is acquired, the event-triggered data stream is first buffered in the second transmission queue, and then the second transmission is started in the second time slot according to the queue switch information The queue enables the event-triggered data flow to be transmitted in the second time slot, so that the purpose of transmitting the event-triggered data flow in the second time slot can be achieved.

值得注意的是,第一传输队列与第二传输队列是不相同种类的两种传输队列,第一传输队列与第二传输队列均可以是任意数量的传输队列,本实施例对此并不作具体限定,由于第一传输队列用于缓存时间触发数据流,第二传输队列用于缓存事件触发数据流,根据队列开关信息,第一传输队列在第一时隙开启,第二传输队列在第二时隙开启,第一时隙与第二时隙是同一传输周期的不同时隙,即是说,本实施例达到了时间触发数据流与事件触发数据流共同传输,并且时间触发数据流与事件触发数据流在传输时不会冲突的目的。It is worth noting that the first transmission queue and the second transmission queue are two types of transmission queues of different types, and both the first transmission queue and the second transmission queue may be any number of transmission queues, which is not specifically described in this embodiment. Restricted, since the first transmission queue is used for buffering time-triggered data flow, and the second transmission queue is used for buffering event-triggered data flow, according to the queue switch information, the first transmission queue is opened in the first time slot, and the second transmission queue is opened in the second time slot. The time slot is opened, the first time slot and the second time slot are different time slots in the same transmission cycle, that is to say, this embodiment achieves the joint transmission of time-triggered data flow and event-triggered data flow, and the time-triggered data flow and event The purpose of triggering data streams to transmit without conflicting.

在一实施例中,如图4所示,该数据处理方法还可以包括但不限于有步骤S150、步骤S160和步骤S170。In an embodiment, as shown in FIG. 4 , the data processing method may further include but not limited to step S150 , step S160 and step S170 .

步骤S150:接收普通数据流。Step S150: Receive a common data stream.

本步骤中,普通数据流可以是对时延没有严格要求的业务所产生的普通数据流,在一个可选的实施方式中,参照图12,在TSN技术的时间整形机制中,在设备一个出端口前有8个具有不同传输优先级的传输队列,根据对传输时延的要求,将客户业务最多分为8类级别,分别为类型0至类型7,不同类型的业务产生不同类型的数据流,不同级别的客户业务产生的数据流进入相应传输优先级的队列,T1至T4指的是类型1至类型4的传输队列对应的门控,通过门控列表信息依照传输周期Tcycle控制门控的开关,当门控开启,传输队列中的数据流可以经过传输选择算法后通过门控,再通过调度算法决定最终需要传输的数据流。在一个可选的实施方式中,时间触发数据流和事件触发数据流均属于时间敏感的数据流,具有严格的时延要求,缓存时间触发数据流的第一传输队列和缓存事件触发数据流第二传输队列可以均是具有最高优先级的传输队列,普通数据流可以是具有除了最高传输优先级的其他任意传输优先级的传输队列,在本实施例中不作具体限定。In this step, the ordinary data flow may be an ordinary data flow generated by a service that does not have strict requirements on time delay. In an optional implementation manner, referring to FIG. 12 , in the time shaping mechanism of the TSN technology, a There are 8 transmission queues with different transmission priorities in front of the port. According to the requirements for transmission delay, customer services can be divided into 8 categories at most, namely type 0 to type 7. Different types of services generate different types of data streams , the data flows generated by different levels of customer services enter the queues with corresponding transmission priorities. T1 to T4 refer to the gates corresponding to the transmission queues of type 1 to type 4. The gates are controlled according to the transmission cycle Tcycle through the gate list information Switch, when the gate control is turned on, the data stream in the transmission queue can pass through the gate control after the transmission selection algorithm, and then the final data stream to be transmitted is determined by the scheduling algorithm. In an optional implementation manner, both the time-triggered data flow and the event-triggered data flow are time-sensitive data flows with strict delay requirements. The two transmission queues may both be transmission queues with the highest priority, and the common data flow may be a transmission queue with any transmission priority except the highest transmission priority, which is not specifically limited in this embodiment.

步骤S160:将普通数据流缓存于第三传输队列,第三传输队列的传输优先级低于第一传输队列的传输优先级。Step S160: Buffer the common data flow in the third transmission queue, the transmission priority of the third transmission queue is lower than the transmission priority of the first transmission queue.

本步骤中,第三传输队列是与第一传输队列以及第二传输队列不同种类的传输队列,时间触发数据流、事件触发数据流以及普通数据流分开存储在不同的传输队列中。在一个可选的实施方式中,当第三传输队列与第一传输队列同时开启,由于第三传输队列的传输优先级低于第一传输队列的传输优先级,系统总会优先传输第一传输队列,本实施例能够起到避免普通数据流的传输对时间触发数据流的传输造成不利影响。In this step, the third transmission queue is a transmission queue of a different type from the first transmission queue and the second transmission queue, and the time-triggered data flow, event-triggered data flow and common data flow are stored in different transmission queues separately. In an optional implementation, when the third transmission queue and the first transmission queue are opened at the same time, since the transmission priority of the third transmission queue is lower than that of the first transmission queue, the system will always give priority to the transmission of the first transmission queue. For the queue, this embodiment can prevent the transmission of ordinary data streams from adversely affecting the transmission of time-triggered data streams.

需要说明的是,第一传输队列、第二传输队列以及第三传输队列均设置有传输优先级,该传输优先级主要用于限制两个不同的传输队列同时开启的情况,避免不同传输优先级的两个传输队列同时开启时低传输优先级的传输队列阻塞高传输优先级的传输队列。It should be noted that the first transmission queue, the second transmission queue, and the third transmission queue are all set with transmission priorities, which are mainly used to limit the simultaneous opening of two different transmission queues to avoid different transmission priorities. When two transmission queues are opened at the same time, the transmission queue with low transmission priority blocks the transmission queue with high transmission priority.

步骤S170:根据队列开关信息确定是否传输普通数据流。Step S170: Determine whether to transmit normal data flow according to the queue switch information.

本步骤中,由于在步骤S150中得到了普通数据流,在步骤S160中将普通数据流缓存于第三传输队列,因此,根据队列开关信息确定是否传输普通数据流。In this step, since the ordinary data flow is obtained in step S150, the ordinary data flow is buffered in the third transmission queue in step S160, so whether to transmit the ordinary data flow is determined according to the queue switch information.

需要说明的是,队列开关信息包括第一传输队列的开关信息、第二传输队列的开关信息,根据队列开关信息确定是否传输普通数据流,在一个可选的实施方式中,指的是根据队列开关信息确定是否开启缓存普通数据流的第三传输队列,并且,需要判断在同一时隙是否开启了其他高优先级传输队列,本实施例能够避免对普通数据流的传输阻塞其他高优先级数据流的传输,进一步实现了时间触发数据流、事件触发数据流以及普通数据流的共同传输。It should be noted that the queue switch information includes the switch information of the first transmission queue and the switch information of the second transmission queue, and it is determined whether to transmit ordinary data streams according to the queue switch information. The switch information determines whether to open the third transmission queue for buffering ordinary data streams, and it is necessary to determine whether other high-priority transmission queues are opened in the same time slot. This embodiment can avoid blocking other high-priority data for the transmission of ordinary data streams The transmission of streams further realizes the common transmission of time-triggered data streams, event-triggered data streams, and common data streams.

本实施例中,通过采用包括有上述步骤S140至步骤S170的数据处理方法,接收普通数据流,然后将普通数据流缓存于第三传输队列,第三传输队列的传输优先级低于缓存时间触发数据流的第一传输队列的传输优先级,之后根据队列开关信息确定是否传输普通数据流。因此,本实施例能够在实现时间触发数据流与事件触发数据流的共同传输的情况下,实现了时间触发数据流、事件触发数据流以及普通数据流的共同传输。In this embodiment, by adopting the data processing method including the above-mentioned steps S140 to S170, the ordinary data flow is received, and then the ordinary data flow is cached in the third transmission queue, and the transmission priority of the third transmission queue is lower than that triggered by the cache time The transmission priority of the first transmission queue of the data flow, and then determine whether to transmit the normal data flow according to the queue switch information. Therefore, this embodiment can realize the common transmission of the time-triggered data stream, the event-triggered data stream and the common data stream under the condition of realizing the common transmission of the time-triggered data stream and the event-triggered data stream.

在一实施例中,如图5所示,对步骤S170进行进一步的说明,该步骤S170可以包括但不限于有步骤S1711、步骤S1712、步骤S1713和步骤S1714。In an embodiment, as shown in FIG. 5 , step S170 is further described, and step S170 may include but not limited to step S1711 , step S1712 , step S1713 and step S1714 .

步骤S1711:当根据队列开关信息同时开启第一传输队列和第三传输队列,确定不传输普通数据流。Step S1711: When the first transmission queue and the third transmission queue are enabled simultaneously according to the queue switch information, it is determined not to transmit the normal data flow.

本步骤中,当根据队列开关信息同时开启第一传输队列和第三传输队列,由于第三传输队列的传输优先级低于第一传输队列的传输优先级,因此,确定不传输普通数据流,当第三传输队列存在时间触发数据流,则传输时间触发数据流。In this step, when the first transmission queue and the third transmission queue are simultaneously enabled according to the queue switch information, since the transmission priority of the third transmission queue is lower than that of the first transmission queue, it is determined not to transmit the normal data flow, When the time-triggered data flow exists in the third transmission queue, the time-triggered data flow is transmitted.

需要说明的是,由于第三传输队列在第一时隙开启,第二传输队列在第二时隙开启,第一时隙和第二时隙是同一传输周期的不同时隙,因此,当第一传输队列和第三传输队列同时开启,第二传输队列不开启。It should be noted that since the third transmission queue is started in the first time slot, and the second transmission queue is started in the second time slot, the first time slot and the second time slot are different time slots in the same transmission cycle, therefore, when the first time slot The first transmission queue and the third transmission queue are opened at the same time, and the second transmission queue is not opened.

步骤S1712:当根据队列开关信息开启第一传输队列但不开启第三传输队列,确定不传输普通数据流。Step S1712: When the first transmission queue is enabled but the third transmission queue is not enabled according to the queue switch information, it is determined not to transmit the normal data flow.

本步骤中,当根据队列开关信息开启第一传输队列但不开启第三传输队列,由于第三传输队列不开启,确定不传输普通数据流,当第三传输队列存在时间触发数据流,则传输时间触发数据流。In this step, when the first transmission queue is enabled but the third transmission queue is not enabled according to the queue switch information, since the third transmission queue is not enabled, it is determined not to transmit the normal data flow, and when the third transmission queue exists time to trigger the data flow, the transmission Time-triggered data flow.

需要说明的是,缓存时间触发数据流的第一传输队列开启,缓存事件触发数据流的第二传输队列关闭,因为第三传输队列在第一时隙开启,第二传输队列在第二时隙开启,第一时隙和第二时隙是同一传输周期的不同时隙。It should be noted that the buffer time triggers the first transmission queue of the data flow to be opened, and the buffer event triggers the second transmission queue of the data flow to be closed, because the third transmission queue is opened in the first time slot, and the second transmission queue is in the second time slot On, the first time slot and the second time slot are different time slots of the same transmission cycle.

步骤S1713:当根据队列开关信息不开启第一传输队列和第二传输队列,但开启第三传输队列,确定传输普通数据流,并对普通数据流进行传输处理。Step S1713: When the first transmission queue and the second transmission queue are not enabled according to the queue switch information, but the third transmission queue is enabled, determine to transmit the normal data flow, and perform transmission processing on the normal data flow.

本步骤中,当根据队列开关信息不开启第一传输队列和第二传输队列,但开启第三传输队列,在当前时隙只有第三传输队列开启,不需要判定传输优先级,确定传输普通数据流,并对普通数据流进行传输处理。In this step, when the first transmission queue and the second transmission queue are not enabled according to the queue switch information, but the third transmission queue is enabled, and only the third transmission queue is enabled in the current time slot, there is no need to determine the transmission priority, and determine the transmission of ordinary data stream, and perform transmission processing on ordinary data streams.

需要说明的是,在一个可选的实施方式中,在第一时隙开启第一传输队列,在第二时隙开启第二传输队列,当前时隙既不是第一时隙也不是第二时隙,则不开启第一传输队列和第二传输队列,但开启第三传输队列,即是说,普通数据流也可以是周期性传输流,在传输周期中既不是第一时隙也不是第二时隙的时隙进行传输,使得时间触发数据流、事件触发数据流以及普通数据流在传输时减少冲突,实现共同传输。It should be noted that, in an optional implementation manner, the first transmission queue is started at the first time slot, and the second transmission queue is started at the second time slot, and the current time slot is neither the first time slot nor the second time slot. slot, the first transmission queue and the second transmission queue are not opened, but the third transmission queue is opened, that is to say, the ordinary data flow can also be a periodic transmission flow, which is neither the first time slot nor the second time slot in the transmission cycle Transmission is performed in the time slots of the two time slots, so that time-triggered data streams, event-triggered data streams, and common data streams reduce conflicts during transmission and realize common transmission.

步骤S1714:当根据队列开关信息同时开启第二传输队列和第三传输队列,且第二传输队列缓存有事件触发数据流,确定不传输普通数据流。Step S1714: When the second transmission queue and the third transmission queue are enabled simultaneously according to the queue switch information, and the event-triggered data flow is buffered in the second transmission queue, it is determined not to transmit the normal data flow.

本步骤中,当根据队列开关信息同时开启第二传输队列和第三传输队列,且第二传输队列缓存有事件触发数据流,由于第二传输队列的事件触发数据流是时间敏感的数据流,缓存有事件触发数据流的第二传输队列的传输优先级高于缓存有普通数据流的第三传输队列,因此,确定不传输普通数据流。In this step, when the second transmission queue and the third transmission queue are simultaneously enabled according to the queue switch information, and the event-triggered data flow is buffered in the second transmission queue, since the event-triggered data flow of the second transmission queue is a time-sensitive data flow, The transmission priority of the second transmission queue buffered with the event-triggered data stream is higher than that of the third transmission queue buffered with the normal data stream, therefore, it is determined not to transmit the normal data stream.

需要说明的是,在一个可选的实施方式中,第二传输队列缓存有事件触发数据流,可以是在第二传输队列开启时,由于第二传输队列是先进先出结构,可以是在第二传输队列处设置有一个处理器,对第二传输队列的队列出口的第一个链表位置或者数组位置进行数据检测,即可判断第二传输队列是否缓存有事件触发数据流。It should be noted that, in an optional implementation manner, the event-triggered data stream is buffered in the second transmission queue, which may be when the second transmission queue is started, and since the second transmission queue has a first-in-first-out structure, it may be The second transmission queue is provided with a processor, which detects the first linked list position or array position of the queue exit of the second transmission queue to determine whether the second transmission queue has an event-triggered data flow cached.

本实施例中,通过采用上述步骤S1711至步骤S1714,根据队列开关信息确定是否传输普通数据流,即根据队列开关信息开启或者关闭第三传输队列,当缓存有普通数据流的第三传输队列关闭则确定不传输普通数据流,当只有第三传输队列开启则确定传输普通数据流;当第三传输队列开启,若第一传输队列开启,则确定不传输普通数据流;若第二传输队列开启,且第二传输队列存在事件触发数据流,则确定不传输普通数据流,从而可以达到根据队列开关信息确定是否传输普通数据流的目的。In this embodiment, by adopting the above steps S1711 to S1714, it is determined whether to transmit ordinary data streams according to the queue switch information, that is, the third transmission queue is opened or closed according to the queue switch information, when the third transmission queue with ordinary data streams buffered is closed Then it is determined not to transmit the normal data stream, and when only the third transmission queue is enabled, it is determined to transmit the normal data stream; when the third transmission queue is enabled, if the first transmission queue is enabled, then it is determined not to transmit the normal data stream; if the second transmission queue is enabled , and there is an event-triggered data flow in the second transmission queue, it is determined not to transmit the normal data flow, so that the purpose of determining whether to transmit the normal data flow according to the queue switch information can be achieved.

在一实施例中,如图6所示,对步骤S172进行进一步的说明,该步骤S172可以包括但不限于有步骤S1721和步骤S1722。In an embodiment, as shown in FIG. 6 , step S172 is further described, and step S172 may include but not limited to step S1721 and step S1722 .

步骤S1721:当根据队列开关信息同时开启第二传输队列和第三传输队列,且第二传输队列没有缓存事件触发数据流,确定传输普通数据流。Step S1721: When the second transmission queue and the third transmission queue are simultaneously enabled according to the queue switch information, and the second transmission queue does not buffer event-triggered data streams, determine to transmit normal data streams.

本步骤中,当根据队列开关信息同时开启第二传输队列和第三传输队列,且第二传输队列没有缓存事件触发数据流,说明当前开启第二传输队列的第二时隙没有需要传输的事件触发数据流,确定传输普通数据流。由于事件触发数据流一般是突发数据流,事件触发数据流在第二时隙传输,当不存在需要传输的事件触发数据流,则在第二时隙传输普通数据流,这种传输方式达到提高链路的带宽利用率的目的。In this step, when the second transmission queue and the third transmission queue are simultaneously enabled according to the queue switch information, and the second transmission queue does not have a cache event triggering data flow, it means that there is no event to be transmitted in the second time slot when the second transmission queue is currently enabled Trigger the data flow to confirm the transmission of ordinary data flow. Since the event-triggered data flow is generally a burst data flow, the event-triggered data flow is transmitted in the second time slot. When there is no event-triggered data flow to be transmitted, the normal data flow is transmitted in the second time slot. This transmission method achieves The purpose of improving link bandwidth utilization.

需要说明的是,在第二时隙传输事件触发数据流,所以当第二传输队列开启,则当前时隙为第二时隙。It should be noted that the data stream is triggered by a transmission event in the second time slot, so when the second transmission queue is enabled, the current time slot is the second time slot.

步骤S1722:对普通数据流进行传输处理。Step S1722: Perform transmission processing on the ordinary data stream.

本步骤中,由于在步骤S1721中确定对普通数据流进行传输,并且第二传输队列与第三传输队列同时开启,因此需要对普通数据流进行传输处理。由于第二传输队列的传输优先级高于缓存普通数据流的第三传输队列,需要对第二传输队列进行相应的处理,例如:降低第二传输队列的传输优先级,或者关闭第二传输队列等,以使得第三传输队列中的普通数据流能够被传输。In this step, since it is determined in step S1721 that the normal data flow is to be transmitted, and the second transmission queue and the third transmission queue are enabled at the same time, it is necessary to perform transmission processing on the normal data flow. Since the transmission priority of the second transmission queue is higher than that of the third transmission queue that caches ordinary data streams, it is necessary to perform corresponding processing on the second transmission queue, for example: lower the transmission priority of the second transmission queue, or close the second transmission queue etc., so that the normal data flow in the third transmission queue can be transmitted.

在一个可选的实施方式中,参照图13,图13是传输队列的传输示意图。当第二传输队列和第三传输队列同时开启,若状态信息是第二传输队列不存在事件触发数据流,则根据状态信息关闭门控,第二传输队列不开启,以使得第三传输队列中的普通数据流能够被传输。In an optional implementation manner, refer to FIG. 13 , which is a schematic transmission diagram of a transmission queue. When the second transmission queue and the third transmission queue are opened at the same time, if the state information is that there is no event-triggered data flow in the second transmission queue, the gate control is closed according to the state information, and the second transmission queue is not opened, so that the third transmission queue ordinary data streams can be transmitted.

本实施例中,通过采用上述步骤S1721至步骤S1722,根据队列开关信息同时开启第二传输队列和第三传输队列,若第二传输队列中不存在需要传输的事件触发数据流,则确定传输第三传输队列中的普通数据流,并对普通数据流进行传输处理,从而可以达到提高在第二时隙的链路的宽带利用率的目的。In this embodiment, by adopting the above steps S1721 to S1722, the second transmission queue and the third transmission queue are simultaneously opened according to the queue switch information, and if there is no event-triggered data stream to be transmitted in the second transmission queue, it is determined to transmit the second transmission queue. The common data streams in the three transmission queues are transmitted, and the common data streams are transmitted and processed, so as to achieve the purpose of improving the bandwidth utilization rate of the link in the second time slot.

在一实施例中,如图7所示,对步骤S1722进行进一步的说明,该步骤S1722可以包括但不限于有步骤S17221和步骤S17222。In an embodiment, as shown in FIG. 7 , step S1722 is further described, and this step S1722 may include but not limited to step S17221 and step S17222 .

步骤S17221:降低第二传输队列的传输优先级,使得第二传输队列的传输优先级小于第三传输队列的传输优先级。Step S17221: Lower the transmission priority of the second transmission queue, so that the transmission priority of the second transmission queue is lower than the transmission priority of the third transmission queue.

本步骤中,降低第二传输队列的传输优先级,例如,可以基于IEEE802.1Q中所提出的突发限制整形(Burst Limiting Shaper,BLS)和基于信用整形(Credit-based Shaper,CBS),设置第二传输队列的信用值,信用值最小值为零,以传输队列中数据等待时间乘以空闲斜率参数增大信用值,以传输时间乘以发送斜率减小信用值。利用信用值来控制传输优先级,在一个可选的实施方式中,可以选取一个大数值作为斜率参数以使得第二传输队列的传输优先级的快速降低。当第二传输队列中没有事件触发数据流时,其信用值减少,传输优先级降低,此时同为门控打开状态的第三传输队列中的数据可以被传输,即是说,当确定传输普通数据流,第二传输队列不存在事件触发数据流,使得第二传输队列的传输优先级小于第三传输队列的传输优先级。In this step, reduce the transmission priority of the second transmission queue, for example, can be based on Burst Limiting Shaper (BLS) proposed in IEEE802.1Q and based on credit shaping (Credit-based Shaper, CBS), set The credit value of the second transmission queue, the minimum credit value is zero, the credit value is increased by multiplying the data waiting time in the transmission queue by the idle slope parameter, and the credit value is decreased by multiplying the transmission time by the sending slope. The credit value is used to control the transmission priority. In an optional implementation manner, a large value may be selected as the slope parameter so as to rapidly reduce the transmission priority of the second transmission queue. When there is no event triggering data flow in the second transmission queue, its credit value decreases, and the transmission priority decreases. At this time, the data in the third transmission queue that is also in the gate open state can be transmitted, that is, when the transmission is confirmed For ordinary data flow, there is no event-triggered data flow in the second transmission queue, so that the transmission priority of the second transmission queue is lower than the transmission priority of the third transmission queue.

需要说明的是,降低第二传输队列的传输优先级,还可以是直接把第二传输队列的传输优先级降到最低,以使得第二传输队列的传输优先级小于第三传输队列的传输优先级。It should be noted that reducing the transmission priority of the second transmission queue can also directly reduce the transmission priority of the second transmission queue to the lowest, so that the transmission priority of the second transmission queue is lower than the transmission priority of the third transmission queue class.

在一个可选的实施方式中,参照图14,图14是传输队列的传输示意图。在第二传输队列的门控之前设置动态优先级,当第二传输队列与第三传输队列同时开启,并且第二传输队列中不存在事件触发数据流,降低第二传输队列的优先级。若降低第二传输队列的传输优先级至低于第三传输队列的传输优先级,则传输普通数据流。In an optional implementation manner, refer to FIG. 14 , which is a schematic transmission diagram of a transmission queue. Set the dynamic priority before the gating of the second transmission queue. When the second transmission queue and the third transmission queue are opened at the same time, and there is no event-triggered data flow in the second transmission queue, the priority of the second transmission queue is lowered. If the transmission priority of the second transmission queue is lowered to be lower than the transmission priority of the third transmission queue, normal data flow is transmitted.

步骤S17222:通过第二时隙传输普通数据流。Step S17222: Transmit ordinary data flow through the second time slot.

本步骤中,由于在步骤S17221中将第二传输队列的传输优先级降低至小于第三传输队列的传输优先级,并且用于缓存事件触发数据流的第二传输队列只在第二时隙开启,第一传输队列在第二时隙不开启因此第三传输队列可以在第二时隙进行传输,通过第二时隙传输普通数据流,达到提高链路的带宽利用率的目的。In this step, since the transmission priority of the second transmission queue is lowered to be lower than that of the third transmission queue in step S17221, and the second transmission queue for buffering the event-triggered data flow is only opened in the second time slot , the first transmission queue is not enabled in the second time slot, so the third transmission queue can transmit in the second time slot, and transmit ordinary data streams through the second time slot, so as to improve the bandwidth utilization rate of the link.

本实施例中,通过采用上述步骤S17221至步骤S17222,当对普通数据流进行传输处理,先降低第二传输队列的传输优先级,使得第二传输队列的传输优先级低于第三传输队列的传输优先级,然后通过第二时隙传输普通数据流,以达到对普通数据流进行传输处理的目的。In this embodiment, by adopting the above steps S17221 to S17222, when performing transmission processing on ordinary data streams, the transmission priority of the second transmission queue is lowered first, so that the transmission priority of the second transmission queue is lower than that of the third transmission queue. transmission priority, and then transmit the ordinary data flow through the second time slot, so as to achieve the purpose of performing transmission processing on the ordinary data flow.

值得注意的是,在TSN技术中,时间触发数据流是周期性流,当传输普通数据流的时隙是第一时隙,检测当前时隙所有开启的传输队列,根据传输优先级对高传输优先级的数据流进行传输。而在本实施例中,在同一个传输周期中,第一时隙传输时间触发数据流,第二时隙传输事件触发数据流,第一时隙和第二时隙不是同一时隙,当传输普通数据流的时隙是第二时隙,不仅检测当前时隙所有开启的传输队列,还检测第二传输队列中是否存在事件触发数据流,存在则根据传输优先级对高传输优先级的数据流进行传输,不存在则降低第二传输队列的优先级,或者关闭第二传输队列,以使得缓存普通数据流的第三传输队列能够进行传输,因此提高第二时隙的利用率,以达到提高链路的带宽利用率的目的。It is worth noting that in TSN technology, the time-triggered data stream is a periodic stream. When the time slot for transmitting ordinary data streams is the first time slot, all open transmission queues of the current time slot are detected, and high transmission queues are selected according to the transmission priority. prioritized data streams for transmission. However, in this embodiment, in the same transmission cycle, the first time slot transmits time-triggered data flow, and the second time slot transmits event-triggered data flow. The first time slot and the second time slot are not the same time slot. When the transmission The time slot of the ordinary data flow is the second time slot. It not only detects all the open transmission queues of the current time slot, but also detects whether there is an event-triggered data flow in the second transmission queue. flow, if it does not exist, reduce the priority of the second transmission queue, or close the second transmission queue, so that the third transmission queue that buffers the ordinary data flow can transmit, so the utilization rate of the second time slot is increased to achieve The purpose of improving link bandwidth utilization.

在一实施例中,如图8所示,在第二时隙传输事件触发数据流之前,该数据处理方法还可以包括但不限于有步骤S810和步骤S820。In an embodiment, as shown in FIG. 8 , before the data flow is triggered by the transmission event of the second time slot, the data processing method may further include but not limited to step S810 and step S820 .

步骤S810:设定事件触发数据流的传输周期。Step S810: Set the transmission period of the event-triggered data stream.

本步骤中,设定事件触发数据流的传输周期,事件触发数据流可以是突然出现的周期性流,事件触发数据流的传输周期可以与时间触发数据流的传输周期一致,事件触发数据流的传输周期的大小的设定需要能够保证周期性预留的资源能够保证在事件触数据流在可容忍最大时延内完成传输。In this step, set the transmission period of the event-triggered data flow. The event-triggered data flow can be a periodic flow that appears suddenly. The transmission period of the event-triggered data flow can be consistent with the transmission period of the time-triggered data flow. The event-triggered data flow The setting of the size of the transmission period needs to ensure that the periodically reserved resources can ensure that the transmission of the data flow is completed within the maximum tolerable delay when the event triggers.

需要说明的是,周期性的资源的预留可以是传输周期内的时隙的预留,也可以是根据事件触发数据流的传输路径确定的事件触发数据流的传输经过的终端,例如图16中的从第一设备传输到第五设备,分别经过第二设备和第六设备,第一设备、第二设备、第六设备和第五形成事件触发数据流的传输路径。在传输事件触发数据流的时隙为事件触发数据流对终端的端口的预留,避免端口被其他数据流占用以阻塞事件触发数据流的传输。It should be noted that the periodic resource reservation can be the reservation of time slots within the transmission period, or the terminal through which the event-triggered data stream is transmitted, determined according to the transmission path of the event-triggered data stream, as shown in Figure 16 The transmission from the first device to the fifth device passes through the second device and the sixth device respectively, and the first device, the second device, the sixth device and the fifth form a transmission path of an event-triggered data stream. The time slot for transmitting the event-triggered data stream is reserved for the event-triggered data stream to the port of the terminal, preventing the port from being occupied by other data streams to block the transmission of the event-triggered data stream.

步骤S820:在传输周期中确定第二时隙,其中,第二时隙在每个传输周期中的分布均相同。Step S820: Determine the second time slots in the transmission cycle, where the distribution of the second time slots in each transmission cycle is the same.

本步骤中,由于在步骤S810中设定了事件触发数据流的传输周期,因此在传输周期中确定第二时隙,当在任一时隙中出现事件触发数据流,保证任意时隙出现的事件触发数据流能够在第二时隙进行传输,并且,任意时隙与第二时隙之间的时间间隔不能够大于事件触发数据流的可容忍的最大时延。其中,第二时隙在每个传输周期中的分布均相同,保证任何时刻发送一个事件触发数据流,都能满足传输时间要求。在一个可选的实施方式中,参照图15,在TSN技术中,设置事件触发数据流的传输周期T,在一个传输周期T内,划分出10个传输时隙,每个时隙对应一个传输队列的门控的持续开启时间,允许对应传输队列中的数据流进行传输。事件触发数据流安排在时隙2、时隙5上输出,在时隙2、时隙5的时间片段上将缓存事件触发数据流的第二传输队列的门控打开,允许事件触发数据流进行传输。第二时隙在每个传输周期中的分布均相同,即是说,在所有传输周期内都将时隙2和时隙5预留、分配给事件触发数据流,保证所有事件触发数据流的第二时隙在所有传输周期内的分布都是相同的,无论事件触发数据流在任何时隙被接收,事件触发数据流在到达第二时隙进行传输时都能满足传输的时延要求。In this step, since the transmission period of the event-triggered data flow is set in step S810, the second time slot is determined in the transmission period. When an event-triggered data flow occurs in any time slot, it is guaranteed that the event-triggered data flow occurring in any time slot The data stream can be transmitted in the second time slot, and the time interval between any time slot and the second time slot cannot be greater than the tolerable maximum delay of the event-triggered data stream. Wherein, the distribution of the second time slot in each transmission period is the same, ensuring that sending an event-triggered data stream at any time can meet the transmission time requirement. In an optional implementation, referring to FIG. 15 , in the TSN technology, the transmission period T of the event-triggered data stream is set, and within one transmission period T, 10 transmission time slots are divided, and each time slot corresponds to a transmission The duration of the gate of the queue to allow the data flow in the corresponding transmission queue to be transmitted. The event-triggered data flow is arranged to be output on time slot 2 and time slot 5, and the gate of the second transmission queue for buffering the event-triggered data flow is opened in the time segment of time slot 2 and time slot 5, allowing the event-triggered data flow to proceed transmission. The distribution of the second time slot in each transmission cycle is the same, that is to say, time slot 2 and time slot 5 are reserved and allocated to event-triggered data streams in all transmission cycles, ensuring that all event-triggered data streams The distribution of the second time slots in all transmission periods is the same, no matter in which time slot the event-triggered data stream is received, the event-triggered data stream can meet the transmission delay requirement when it arrives at the second time slot for transmission.

需要说明的是,缓存事件触发数据流的第二传输队列只在第二时隙开启。It should be noted that the second transmission queue of the data flow triggered by the buffering event is only opened in the second time slot.

本实施例中,通过采用上述步骤S810至步骤S820,先设定事件触发数据流的传输周期,然后在传输周期确定第二时隙,其中,第二时隙在每个传输周期中的分布均相同,以达到时间敏感的事件触发数据流能够在可容忍的最大时延内完成传输的目的。In this embodiment, by adopting the above steps S810 to S820, the transmission period of the event-triggered data stream is set first, and then the second time slot is determined in the transmission period, wherein the distribution of the second time slot in each transmission period is uniform Similarly, in order to achieve the purpose that the time-sensitive event-triggered data flow can be transmitted within the maximum tolerable delay.

在一实施例中,如图9所示,对步骤S810进行进一步的说明,该步骤S810可以包括但不限于有步骤S8111和步骤S8112。In an embodiment, as shown in FIG. 9 , step S810 is further described, and step S810 may include but not limited to step S8111 and step S8112 .

步骤S8111:获取所有种类的事件触发数据流的可容忍时延值。Step S8111: Obtain the tolerable delay values of all types of event-triggered data streams.

本步骤中,获取所有种类的事件触发数据流的可容忍时延值,事件触发数据流包括突发的零星流或者周期性流,例如:系统警报、消息提醒等,不同种类的事件触发数据流的可容忍时延值可以是不相同的。可容忍时延值可以是可容忍的最大时延值,也可以是可容忍的时延范围内的任一时延值,在本实施例中不作限定。In this step, the tolerable delay values of all types of event-triggered data streams are obtained. Event-triggered data streams include sudden sporadic streams or periodic streams, such as system alarms, message reminders, etc. Different types of event-triggered data streams The tolerable delay values of can be different. The tolerable delay value may be the maximum tolerable delay value, or any delay value within the tolerable delay range, which is not limited in this embodiment.

步骤S8112:根据所有可容忍时延值中数值最大的一个设定事件触发数据流的传输周期。Step S8112: Trigger the transmission period of the data flow according to the one setting event with the largest value among all tolerable delay values.

本步骤中,由于在步骤S8111中已经获取所有种类的事件触发数据流的可容忍时延值,因此可以根据所有可容忍时延值中数值最大的一个设定事件触发数据流的传输周期。事件触发数据流的传输周期的大小的设定需要能够保证周期性预留的资源能够保证在事件触数据流在可容忍的最大时延内完成传输。In this step, since the tolerable delay values of all types of event-triggered data streams have been obtained in step S8111, the transmission period of the event-triggered data stream can be set according to the largest value among all tolerable delay values. The setting of the transmission cycle size of the event-triggered data stream needs to ensure that the periodically reserved resources can ensure that the event-triggered data stream is transmitted within the maximum tolerable delay.

需要说明的是,由于事件触发数据流也可以是时间敏感的数据流,所以事件触发数据流也需要在可容忍的最大时延内完成传输。事件触发数据流传输周期的大小可以是根据所有种类事件触发数据流可容忍最大时延来设置,例如,假设紧急度最高的事件触发数据流的可容忍最大时延为Dmax,要求事件触发数据流的传输周期T小于可容忍最大时延Dmax,可以设置传输周期T为最大时延的一半值,即T=1/2Dmax。其中,传输周期越小,网络对事件触发数据流的容忍能力会越高。It should be noted that since the event-triggered data stream may also be a time-sensitive data stream, the event-triggered data stream also needs to be transmitted within a tolerable maximum delay. The size of the event-triggered data stream transmission period can be set according to the maximum tolerable delay of all types of event-triggered data streams. If the transmission cycle T is less than the tolerable maximum time delay Dmax, the transmission cycle T can be set to half of the maximum time delay, that is, T=1/2Dmax. Wherein, the shorter the transmission period, the higher the tolerance of the network to event-triggered data flow.

本实施例中,通过采用上述步骤S810至步骤S820,先获取所有种类的事件触发数据流的可容忍时延值,然后根据所有可容忍时延值中数值最大的一个设定事件触发数据流的传输周期,以达到设定事件触发数据流的传输周期的目的。In this embodiment, by adopting the above steps S810 to S820, the tolerable delay values of all types of event-triggered data streams are obtained first, and then the value of the event-triggered data stream is set according to the largest value among all tolerable delay values. Transmission period, in order to achieve the purpose of setting the transmission period of the event-triggered data flow.

在一实施例中,如图10所示,对步骤S810进行进一步的说明,该步骤S810可以包括但不限于有步骤S8121和步骤S8122。In an embodiment, as shown in FIG. 10 , step S810 is further described, and step S810 may include but not limited to step S8121 and step S8122 .

步骤S8121:确定时间触发数据流和事件触发数据流的数量比例。Step S8121: Determine the quantity ratio of time-triggered data streams and event-triggered data streams.

本步骤中,传输周期的大小还可以根据网络中可能存在数据流的数量比例进行修改设置。先接收时间触发数据流以及事件触发数据流,然后确定时间触发数据流和事件触发数据流的数量比例,例如,可以是在接收时间触发数据流以及事件触发数据流的同时分别进行数量统计,然后根据数量得到数量比例,也可以是对已经缓存或者保存的数据流进行遍历,得到时间触发数据流的数量以及事件触发数据流的数量,然后确定时间触发数据流和事件触发数据流的数量比例,In this step, the size of the transmission period can also be modified and set according to the proportion of the number of data streams that may exist in the network. First receive the time-triggered data flow and the event-triggered data flow, and then determine the quantity ratio of the time-triggered data flow and the event-triggered data flow. Obtain the quantity ratio according to the quantity, or traverse the cached or saved data streams to obtain the number of time-triggered data streams and the number of event-triggered data streams, and then determine the proportion of time-triggered data streams and event-triggered data streams.

另外,在一个可选的实施方式中,确定时间触发数据流和事件触发数据流的数量比例,也可以是用户根据预设的数据流的数量比例进行设置,该预设的数据流的数量比例指的是用户根据应用场景确定的时间触发数据流以及事件触发数据流的数量比例。In addition, in an optional implementation manner, determining the ratio of time-triggered data streams and event-triggered data streams may also be set by the user according to a preset ratio of data streams, and the preset ratio of data streams Refers to the ratio of the number of time-triggered data streams and event-triggered data streams determined by the user according to the application scenario.

步骤S8122:根据数量比例设定事件触发数据流的传输周期。Step S8122: Set the transmission period of the event-triggered data stream according to the quantity ratio.

本步骤中,由于在步骤S8121中确定时间触发数据流和事件触发数据流的数量比例,因此可以根据数量比例设定事件触发数据流的传输周期。时间触发数据流以及事件触发数据流都是时间敏感的,因此,在保证时间触发数据流以及事件触发数据流共同传输的同时也要保证数据流的传输不能超出对应的可容忍的最大时延,在一个可选的实施方式中,时间触发数据流以及事件触发数据流缓存在不同的传输队列中,依照先进先出的规则排队进行传输,根据数量比例设定事件触发数据流的传输周期,保证预留的第二时隙不会过多而占用时间触发数据流的第一时隙的设置,避免时间触发数据流数量太多而超出时延要求。In this step, since the quantity ratio of the time-triggered data flow and the event-triggered data flow is determined in step S8121, the transmission period of the event-triggered data flow can be set according to the quantity ratio. Time-triggered data streams and event-triggered data streams are both time-sensitive. Therefore, while ensuring the joint transmission of time-triggered data streams and event-triggered data streams, it is also necessary to ensure that the transmission of data streams does not exceed the corresponding maximum tolerable delay. In an optional implementation, the time-triggered data flow and the event-triggered data flow are buffered in different transmission queues, queued for transmission according to the first-in-first-out rule, and the transmission cycle of the event-triggered data flow is set according to the quantity ratio to ensure The reserved second time slots will not occupy too many first time slots of the time-triggered data flow, so as to avoid too many time-triggered data flows exceeding the delay requirement.

需要说明的是,根据数据流的数量比例来设置传输周期,然后根据传输周期对应设置预留时隙的数量,这种方式能够达到提高链路的宽带利用率、避免数据流的传输超出时延要求的目的。It should be noted that the transmission cycle is set according to the proportion of the number of data streams, and then the number of reserved time slots is set according to the transmission cycle. This method can improve the bandwidth utilization of the link and avoid the transmission of data streams from exceeding the delay. the purpose of the request.

本实施例中,通过采用上述步骤S8121至步骤S8122,先确定时间触发数据流和事件触发数据流的数量比例,然后根据数量比例设定事件触发数据流的传输周期,事件触发数据流的传输周期越小,网络对事件触发数据流的容忍能力会越高,本实施例能够根据时间触发数据流和事件触发数据流的数量比例合理地设置传输周期,实现了时间触发数据流以及事件触发数据流的共同传输,并且,还达到了合理设置事件触发数据流的传输周期的目的。In this embodiment, by adopting the above steps S8121 to S8122, first determine the quantity ratio of the time-triggered data flow and the event-triggered data flow, and then set the transmission cycle of the event-triggered data flow according to the quantity ratio, and the transmission cycle of the event-triggered data flow The smaller the value, the higher the tolerance of the network to the event-triggered data flow. This embodiment can reasonably set the transmission cycle according to the ratio of the number of time-triggered data flows and event-triggered data flows, and realizes the time-triggered data flow and event-triggered data flow. common transmission, and also achieve the purpose of reasonably setting the transmission period of the event-triggered data stream.

另外,本发明的一个实施例还提供了一种网络设备,该网络设备包括:至少一个处理器和用于与至少一个处理器通信连接的存储器;存储器存储有可被至少一个处理器执行的指令,指令被至少一个处理器执行。In addition, an embodiment of the present invention also provides a network device, the network device includes: at least one processor and a memory for communicating with the at least one processor; the memory stores instructions that can be executed by the at least one processor , the instruction is executed by at least one processor.

处理器和存储器可以通过总线或者其他方式连接。The processor and memory can be connected by a bus or other means.

存储器作为一种非暂态计算机可读存储介质,可用于存储非暂态软件程序以及非暂态性计算机可执行程序。此外,存储器可以包括高速随机存取存储器,还可以包括非暂态存储器,例如至少一个磁盘存储器件、闪存器件、或其他非暂态固态存储器件。在一些实施方式中,存储器可选包括相对于处理器远程设置的存储器,这些远程存储器可以通过网络连接至该处理器。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。As a non-transitory computer-readable storage medium, memory can be used to store non-transitory software programs and non-transitory computer-executable programs. In addition, the memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid-state storage devices. In some embodiments, the memory optionally includes memory located remotely from the processor, and these remote memories may be connected to the processor via a network. Examples of the aforementioned networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

实现上述实施例的数据处理方法所需的非暂态软件程序以及指令存储在存储器中,当被处理器执行时,执行上述实施例中的数据处理方法,例如,执行以上描述的图1中的方法步骤S110至S140、图2中的方法步骤S121至S122、图3中的方法步骤S141至S142、图4中的方法步骤S150至S170、图5中的方法步骤S1711至S1714、图6中的方法步骤S1721至S1722、图7中的方法步骤S17221至S17222、图8中的方法步骤S810至S820、图9中的方法步骤S8111至S8112、图10中的方法步骤S8121至S8122。The non-transitory software programs and instructions required to realize the data processing method of the above-mentioned embodiment are stored in the memory, and when executed by the processor, the data processing method in the above-mentioned embodiment is executed, for example, the above-described execution in FIG. 1 Method steps S110 to S140, method steps S121 to S122 in FIG. 2, method steps S141 to S142 in FIG. 3, method steps S150 to S170 in FIG. 4, method steps S1711 to S1714 in FIG. Method steps S1721 to S1722, method steps S17221 to S17222 in FIG. 7 , method steps S810 to S820 in FIG. 8 , method steps S8111 to S8112 in FIG. 9 , method steps S8121 to S8122 in FIG. 10 .

此外,本发明的一个实施例还提供了一种计算机可读存储介质,该计算机可读存储介质存储有计算机可执行指令,该计算机可执行指令被一个处理器或控制器执行,例如,被上述实施例中的网络设备的一个处理器执行,可使得上述处理器执行上述实施例中的数据处理方法,例如,执行以上描述的图1中的方法步骤S110至S140、图2中的方法步骤S121至S122、图3中的方法步骤S141至S142、图4中的方法步骤S150至S170、图5中的方法步骤S1711至S1714、图6中的方法步骤S1721至S1722、图7中的方法步骤S17221至S17222、图8中的方法步骤S810至S820、图9中的方法步骤S8111至S8112、图10中的方法步骤S8121至S8122。In addition, an embodiment of the present invention also provides a computer-readable storage medium, the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are executed by a processor or a controller, for example, by the above-mentioned Execution by a processor of the network device in the embodiment can cause the processor to execute the data processing method in the above embodiment, for example, execute the method steps S110 to S140 in FIG. 1 and the method step S121 in FIG. 2 described above Method steps S141 to S142 in Fig. 3, method steps S150 to S170 in Fig. 4, method steps S1711 to S1714 in Fig. 5, method steps S1721 to S1722 in Fig. 6, method steps S17221 in Fig. 7 to S122, Fig. 3 to S17222, method steps S810 to S820 in FIG. 8 , method steps S8111 to S8112 in FIG. 9 , method steps S8121 to S8122 in FIG. 10 .

本领域普通技术人员可以理解,上文中所公开方法中的全部或某些步骤、系统可以被实施为软件、固件、硬件及其适当的组合。某些物理组件或所有物理组件可以被实施为由处理器,如中央处理器、数字信号处理器或微处理器执行的软件,或者被实施为硬件,或者被实施为集成电路,如专用集成电路。这样的软件可以分布在计算机可读介质上,计算机可读介质可以包括计算机存储介质(或非暂时性介质)和通信介质(或暂时性介质)。如本领域普通技术人员公知的,术语计算机存储介质包括在用于存储信息(诸如计算机可读指令、数据结构、程序模块或其他数据)的任何方法或技术中实施的易失性和非易失性、可移除和不可移除介质。计算机存储介质包括但不限于RAM、ROM、EEPROM、闪存或其他存储器技术、CD-ROM、数字多功能盘(DVD)或其他光盘存储、磁盒、磁带、磁盘存储或其他磁存储装置、或者可以用于存储期望的信息并且可以被计算机访问的任何其他的介质。此外,本领域普通技术人员公知的是,通信介质通常包含计算机可读指令、数据结构、程序模块或者诸如载波或其他传输机制之类的调制数据信号中的其他数据,并且可包括任何信息递送介质。Those skilled in the art can understand that all or some of the steps and systems in the methods disclosed above can be implemented as software, firmware, hardware and an appropriate combination thereof. Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit . Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media). As known to those of ordinary skill in the art, the term computer storage media includes both volatile and nonvolatile media implemented in any method or technology for storage of information, such as computer readable instructions, data structures, program modules, or other data. permanent, removable and non-removable media. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cartridges, tape, magnetic disk storage or other magnetic storage devices, or can Any other medium used to store desired information and which can be accessed by a computer. In addition, as is well known to those of ordinary skill in the art, communication media typically embodies computer readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media .

以上是对本发明的较佳实施进行了具体说明,但本发明并不局限于上述实施方式,熟悉本领域的技术人员在不违背本发明精神的前提下还可作出种种的等同变形或替换,这些等同的变形或替换均包含在本发明权利要求所限定的范围内。The above is a specific description of the preferred implementation of the present invention, but the present invention is not limited to the above-mentioned implementation, and those skilled in the art can also make various equivalent deformations or replacements without violating the spirit of the present invention. Equivalent modifications or replacements are all within the scope defined by the claims of the present invention.

Claims (12)

1. A data processing method, comprising:
receiving a time-triggered data stream;
transmitting the time-triggered data stream in a first time slot;
receiving an event-triggered data stream;
the event triggered data stream is transmitted in a second time slot, wherein the first time slot and the second time slot are different time slots in the same transmission period.
2. The data processing method according to claim 1, wherein the transmitting the time-triggered data stream in the first slot comprises:
caching the time-triggered data stream in a first transmission queue;
and starting the first transmission queue in a first time slot according to preset queue switch information, so that the time triggering data stream is transmitted in the first time slot.
3. The data processing method according to claim 2, wherein said transmitting said event-triggered data stream in the second time slot comprises:
Buffering the event-triggered data stream in a second transmission queue;
and opening the second transmission queue in a second time slot according to the queue switch information, so that the event-triggered data stream is transmitted in the second time slot, wherein the second transmission queue has the same transmission priority as the first transmission queue, and the second transmission queue is not opened at the same time as the first transmission queue.
4. A data processing method according to claim 3, characterized in that the data processing method further comprises:
receiving a normal data stream;
the common data stream is cached in a third transmission queue, and the transmission priority of the third transmission queue is lower than that of the first transmission queue;
and determining whether to transmit the common data stream according to the queue switch information.
5. The data processing method of claim 4, wherein said determining whether to transmit the normal data stream based on the queue switch information comprises:
when the first transmission queue and the third transmission queue are simultaneously started according to the queue switching information, determining that the common data stream is not transmitted;
or,
When the first transmission queue is started but the third transmission queue is not started according to the queue switch information, determining that the common data stream is not transmitted;
or,
when the first transmission queue and the second transmission queue are not started according to the queue switch information, but the third transmission queue is started, determining to transmit the common data stream, and performing transmission processing on the common data stream;
or,
and when the second transmission queue and the third transmission queue are simultaneously started according to the queue switch information, and the event trigger data stream is cached in the second transmission queue, determining that the common data stream is not transmitted.
6. The data processing method of claim 4, wherein said determining whether to transmit the normal data stream based on the queue switch information comprises:
and when the second transmission queue and the third transmission queue are simultaneously started according to the queue switch information and the event trigger data stream is not cached by the second transmission queue, determining to transmit the common data stream and performing transmission processing on the common data stream.
7. The data processing method according to claim 6, wherein said performing transmission processing on said normal data stream includes:
Reducing the transmission priority of the second transmission queue so that the transmission priority of the second transmission queue is smaller than the transmission priority of the third transmission queue;
and transmitting the common data stream through the second time slot.
8. The data processing method of claim 1, wherein the data processing method further comprises, prior to the transmission of the event triggered data stream in the second time slot:
setting a transmission period of the event-triggered data stream;
and determining the second time slot in the transmission period, wherein the distribution of the second time slot in each transmission period is the same.
9. The data processing method according to claim 8, wherein the setting the transmission period of the event-triggered data stream includes:
obtaining the tolerable delay values of all kinds of event trigger data streams;
and setting the transmission period of the event-triggered data stream according to the one with the largest value in all the tolerable delay values.
10. The data processing method according to claim 8, wherein the setting the transmission period of the event-triggered data stream includes:
determining a quantity ratio of the time triggered data stream and the event triggered data stream;
And setting the transmission period of the event-triggered data stream according to the quantity proportion.
11. A network device comprising at least one processor and a memory for communication connection with the at least one processor; the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the data processing method of any one of claims 1 to 10.
12. A computer-readable storage medium storing computer-executable instructions for causing a computer to perform the data processing method according to any one of claims 1 to 10.
CN202111215555.4A 2021-10-19 2021-10-19 Data processing method, network device, and computer-readable storage medium Pending CN116017701A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202111215555.4A CN116017701A (en) 2021-10-19 2021-10-19 Data processing method, network device, and computer-readable storage medium
PCT/CN2022/124181 WO2023066056A1 (en) 2021-10-19 2022-10-09 Data processing method, network device, and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111215555.4A CN116017701A (en) 2021-10-19 2021-10-19 Data processing method, network device, and computer-readable storage medium

Publications (1)

Publication Number Publication Date
CN116017701A true CN116017701A (en) 2023-04-25

Family

ID=86021598

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111215555.4A Pending CN116017701A (en) 2021-10-19 2021-10-19 Data processing method, network device, and computer-readable storage medium

Country Status (2)

Country Link
CN (1) CN116017701A (en)
WO (1) WO2023066056A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116614883A (en) * 2023-05-31 2023-08-18 联想(北京)有限公司 Data processing method of edge access node and edge access node

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN119276774B (en) * 2024-09-10 2025-10-17 国网电力科学研究院有限公司 TSN-based power time-sensitive data stream scheduling method and system

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103001722B (en) * 2012-11-23 2015-09-02 北京东土科技股份有限公司 A kind of data transmission method based on time triggered Ethernet and node device
CN108933717A (en) * 2017-05-25 2018-12-04 南京航空航天大学 A kind of AFDX end system dispatching method replacing triggering with event based on the time
CN111278049B (en) * 2019-01-11 2022-02-18 维沃移动通信有限公司 Method and communication device for supporting time-sensitive communication service quality
CN112166638B (en) * 2019-02-14 2024-02-09 捷开通讯(深圳)有限公司 Time-sensitive network support
US11323377B2 (en) * 2019-04-09 2022-05-03 Charter Communications Operating, Llc Dynamic prioritization of data flows
CN113556763B (en) * 2019-09-27 2023-05-16 腾讯科技(深圳)有限公司 Method, related equipment and medium for realizing data transmission of time-sensitive network

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116614883A (en) * 2023-05-31 2023-08-18 联想(北京)有限公司 Data processing method of edge access node and edge access node

Also Published As

Publication number Publication date
WO2023066056A1 (en) 2023-04-27

Similar Documents

Publication Publication Date Title
US7236481B2 (en) System and method for processing multimedia packets for a network
CN103823780B (en) A kind of Real-time Fieldbus controls dispatching method
Ashjaei et al. A novel frame preemption model in TSN networks
WO2020155185A1 (en) Message scheduling method, scheduler, network device and network system
JPH11506287A (en) Flow control method and apparatus for Ethernet packet switch hub
EP3961981A1 (en) Method and device for congestion control, communication network, and computer storage medium
CN110784418B (en) Data sending method and system based on time delay constraint
CN110267228A (en) A V2X vehicle terminal message self-adaptive scheduling management system and method
US10965492B2 (en) Method for transmitting data packets, controller and system having a controller
WO2023066056A1 (en) Data processing method, network device, and computer-readable storage medium
WO2022042282A1 (en) Lossless traffic congestion adaption method, system and network device
JP7733739B2 (en) Data transmission method, electronic device, and storage medium
JP2023169410A5 (en)
CN108235432B (en) BE data frame pre-scheduling method and device based on TTE protocol
WO2014075525A1 (en) Message forwarding method and device
CN107040440B (en) Method and apparatus for initiating triggering in a network in an Ethernet-based vehicle
WO2021083160A1 (en) Data transmission method and apparatus
US20150156134A1 (en) Method For Transmitting Data In A Packet-Oriented Communications Network And Correspondingly Configured User Terminal In Said Communications Network
CN113114578B (en) Traffic congestion isolation method, device and system
Kostrzewa et al. Towards safety in Automotive Ethernet-based networks with dynamic workloads
WO2022048407A1 (en) Method and apparatus for mixed scheduling of messages, and electronic device and storage medium
Wang et al. Design of TSN-based Ethernet driver working model for time-aware scheduling
CN109525315B (en) Optical fiber channel network end system based on time triggering
CN111404837B (en) Data transmission control method, network equipment and system
CN109729014B (en) A message storage method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination