CN117596200B - A time-sensitive network routing scheduling method, electronic device, and medium - Google Patents

A time-sensitive network routing scheduling method, electronic device, and medium Download PDF

Info

Publication number
CN117596200B
CN117596200B CN202410050996.0A CN202410050996A CN117596200B CN 117596200 B CN117596200 B CN 117596200B CN 202410050996 A CN202410050996 A CN 202410050996A CN 117596200 B CN117596200 B CN 117596200B
Authority
CN
China
Prior art keywords
message
link
mth
path
tsn
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.)
Active
Application number
CN202410050996.0A
Other languages
Chinese (zh)
Other versions
CN117596200A (en
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.)
Zhejiang Lab
Original Assignee
Zhejiang Lab
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 Zhejiang Lab filed Critical Zhejiang Lab
Priority to CN202410050996.0A priority Critical patent/CN117596200B/en
Publication of CN117596200A publication Critical patent/CN117596200A/en
Application granted granted Critical
Publication of CN117596200B publication Critical patent/CN117596200B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/02Topology update or discovery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0638Clock or time synchronisation among nodes; Internode synchronisation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/14Routing performance; Theoretical aspects
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/24Traffic characterised by specific attributes, e.g. priority or QoS
    • H04L47/2425Traffic characterised by specific attributes, e.g. priority or QoS for supporting services specification, e.g. SLA
    • H04L47/2433Allocation of priorities to traffic types
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/30Peripheral units, e.g. input or output ports
    • H04L49/3009Header conversion, routing tables or routing tags
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks

Landscapes

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

Abstract

本发明公开了一种时间敏感网络路由调度方法、电子设备、介质,所述方法包括:控制器根据链路层发现协议获取TSN网络拓扑;对每一TSN交换机、发送终端和接收终端配置时钟,实现时间同步;控制器接收由发送终端发送的连接请求,所述连接请求中包含有TT流的描述信息;根据TT流的描述信息配置每一条消息的传输优先级,并基于TSN网络拓扑配置路由路径约束、路径链路约束、链路传输时隙约束、路径调度约束,以最小化TT流中延迟之和为目标,求解得到TT流中每一条消息的路由路径和路由路径上的传输时隙;控制器根据TT流中每一条消息的路由路径为TSN交换机配置流表,并根据TT流中每一条消息的传输时隙为TSN交换机配置门控列表,并为发送终端配置调度时间表。

The present invention discloses a time-sensitive network routing scheduling method, electronic device and medium. The method comprises: a controller obtains a TSN network topology according to a link layer discovery protocol; a clock is configured for each TSN switch, a sending terminal and a receiving terminal to realize time synchronization; the controller receives a connection request sent by the sending terminal, wherein the connection request contains description information of a TT stream; the transmission priority of each message is configured according to the description information of the TT stream, and routing path constraints, path link constraints, link transmission time slot constraints and path scheduling constraints are configured based on the TSN network topology, with the goal of minimizing the sum of delays in the TT stream, and the routing path of each message in the TT stream and the transmission time slot on the routing path are solved; the controller configures a flow table for the TSN switch according to the routing path of each message in the TT stream, configures a gating list for the TSN switch according to the transmission time slot of each message in the TT stream, and configures a scheduling time table for the sending terminal.

Description

一种时间敏感网络路由调度方法、电子设备、介质A time-sensitive network routing scheduling method, electronic device, and medium

技术领域Technical Field

本发明涉及时间敏感网络领域,尤其涉及一种时间敏感网络路由调度方法、电子设备、介质。The present invention relates to the field of time-sensitive networks, and in particular to a time-sensitive network routing scheduling method, electronic equipment, and medium.

背景技术Background technique

随着智能制造、工业互联网等技术的快速发展,保障端到端的低时延传输和低抖动要求成为时延敏感业务的重要需求,标准以太网虽有高带宽、兼容性强等优势,但是只能提供尽力而为的网络服务,很难满足时延敏感业务的确定性传输需求。基于以太网协议的时间敏感网络(Time-sensitive Networking,TSN)是由IEEE 802.1工作组提出的一系列流量调度标准,主要包括时间同步、流量调度、可靠传输、网络管理等协议标准,保障了时间敏感类数据低时延、低抖动、确定性、可靠性的传输,同时满足非时间敏感类数据的传输兼容。With the rapid development of technologies such as smart manufacturing and industrial Internet, ensuring end-to-end low-latency transmission and low jitter requirements has become an important requirement for delay-sensitive services. Although standard Ethernet has advantages such as high bandwidth and strong compatibility, it can only provide best-effort network services and it is difficult to meet the deterministic transmission requirements of delay-sensitive services. Time-sensitive Networking (TSN) based on Ethernet protocol is a series of traffic scheduling standards proposed by the IEEE 802.1 working group, mainly including time synchronization, traffic scheduling, reliable transmission, network management and other protocol standards, which ensures the low-latency, low-jitter, deterministic and reliable transmission of time-sensitive data, while meeting the transmission compatibility of non-time-sensitive data.

时间敏感网络标准发展至今,建立了以下四类协议为基础的核心机制:Since the development of time-sensitive network standards, the following four types of protocols have been established as the core mechanisms:

(1)时钟同步:用于支持各设备间的时间同步,包括IEEE 802.1AS;(1) Clock synchronization: used to support time synchronization between devices, including IEEE 802.1AS;

(2)数据流调度:在转发节点上支持对分组转发的控制,包括IEEE 802.1Qav(转发和排队)、IEEE 802.1Qbv(门控调度)、IEEE 802.1Qbu(帧抢占)、IEEE 802.1Qci(流过滤)、IEEE 802.1Qch(循环队列转发);(2) Data flow scheduling: Supports control of packet forwarding on forwarding nodes, including IEEE 802.1Qav (forwarding and queuing), IEEE 802.1Qbv (gated scheduling), IEEE 802.1Qbu (frame preemption), IEEE 802.1Qci (stream filtering), and IEEE 802.1Qch (round-robin queue forwarding);

(3)流可靠性:保障网络传输的可靠性以及数据流的完整性,包括:IEEE 802.1Qca(路径控制和流预留)、IEEE 802.1 CB(帧复制和帧消除);(3) Flow reliability: Ensure the reliability of network transmission and the integrity of data flows, including: IEEE 802.1Qca (path control and flow reservation), IEEE 802.1 CB (frame duplication and frame elimination);

(4)网络管理:时间敏感网络的控制面协议,包括:IEEE 802.1Qcp(YANG模型)、IEEE 802.1Qcc(网络管理架构)。(4) Network management: Control plane protocols for time-sensitive networks, including IEEE 802.1Qcp (YANG model) and IEEE 802.1Qcc (network management architecture).

IEEE的TSN任务组提出的时间敏感网络协议只给出了技术框架,对具体的实现尚未作出具体的规定。在时间敏感网络的时间触发(Time-triggered,TT)流确定性调度问题中,如果只考虑门控调度,不考虑路由影响,采用发送端到接收端的最短路径转发TT流,可能会造成不同周期的TT流之间或TT流与非TT流之间在链路上的拥塞,网络丢包率提高,无法计算门控调度表等问题。The time-sensitive network protocol proposed by the IEEE TSN task group only provides a technical framework, and has not yet made specific provisions for the specific implementation. In the deterministic scheduling problem of time-triggered (TT) flows in time-sensitive networks, if only gating scheduling is considered without considering the impact of routing, and the shortest path from the sender to the receiver is used to forward the TT flow, it may cause congestion on the link between TT flows of different periods or between TT flows and non-TT flows, increase the network packet loss rate, and fail to calculate the gating scheduling table.

发明内容Summary of the invention

针对现有技术不足,本发明提供了一种时间敏感网络路由调度方法、电子设备、介质。In view of the deficiencies in the prior art, the present invention provides a time-sensitive network routing scheduling method, electronic device, and medium.

第一方面,本发明实施例提供了一种时间敏感网络路由调度方法,所述方法依托于时间敏感网络路由调度网络架构,包括控制器,以及与控制器耦接的作为节点的若干TSN交换机、若干发送终端和若干接收终端;TSN交换机分别与发送终端、接收终端通讯;所述方法包括:In a first aspect, an embodiment of the present invention provides a time-sensitive network routing scheduling method, the method is based on a time-sensitive network routing scheduling network architecture, including a controller, and a plurality of TSN switches, a plurality of sending terminals and a plurality of receiving terminals coupled to the controller as nodes; the TSN switches communicate with the sending terminals and the receiving terminals respectively; the method includes:

控制器根据链路层发现协议获取TSN网络拓扑;The controller obtains the TSN network topology based on the link layer discovery protocol;

对每一TSN交换机、发送终端和接收终端配置时钟,实现时间同步;Configure clocks for each TSN switch, sending terminal, and receiving terminal to achieve time synchronization;

控制器接收由发送终端发送的连接请求,所述连接请求中包含有TT流的描述信息;根据TT流的描述信息配置每一条消息的传输优先级,并基于TSN网络拓扑配置路由路径约束、路径链路约束、链路传输时隙约束、路径调度约束,以最小化TT流中延迟之和为目标,求解得到TT流中每一条消息的路由路径和路由路径上的传输时隙;The controller receives a connection request sent by a sending terminal, wherein the connection request includes description information of the TT stream; configures the transmission priority of each message according to the description information of the TT stream, and configures routing path constraints, path link constraints, link transmission time slot constraints, and path scheduling constraints based on the TSN network topology, with the goal of minimizing the sum of delays in the TT stream, and solves the routing path and transmission time slot on the routing path for each message in the TT stream;

控制器根据TT流中每一条消息的路由路径为TSN交换机配置流表,并根据TT流中每一条消息的传输时隙为TSN交换机配置门控列表,并为发送终端配置调度时间表。The controller configures the flow table for the TSN switch according to the routing path of each message in the TT flow, configures the gating list for the TSN switch according to the transmission time slot of each message in the TT flow, and configures the scheduling schedule for the sending terminal.

第二方面,本发明实施例提供了一种电子设备,包括存储器和处理器,所述存储器与所述处理器耦接;其中,所述存储器用于存储程序数据,所述处理器用于执行所述程序数据以实现上述的时间敏感网络路由调度方法。In a second aspect, an embodiment of the present invention provides an electronic device, comprising a memory and a processor, wherein the memory is coupled to the processor; wherein the memory is used to store program data, and the processor is used to execute the program data to implement the above-mentioned time-sensitive network routing scheduling method.

第三方面,本发明实施例提供了一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述程序被处理器执行时实现上述的时间敏感网络路由调度方法。In a third aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, characterized in that when the program is executed by a processor, the above-mentioned time-sensitive network routing scheduling method is implemented.

与现有技术相比,本发明的有益效果为:本发明提供一种时间敏感网络路由调度方法,本发明针对时间敏感网络中的TT流特征,考虑流的帧周期、帧大小、优先级、最大延迟、最大抖动、传播延迟、处理延迟、发送延迟等特征,同时考虑TT流路的由路径问题和调度问题,避免单独针对路由或调度问题导致TT流不可调度。同时,控制器为TSN交换机下发流表并配置时隙,提高了网络灵活性。Compared with the prior art, the invention has the following beneficial effects: the invention provides a time-sensitive network routing scheduling method, which targets the TT flow characteristics in the time-sensitive network, considers the flow frame period, frame size, priority, maximum delay, maximum jitter, propagation delay, processing delay, transmission delay and other characteristics, and considers the path problem and scheduling problem of the TT flow path, so as to avoid the TT flow being unschedulable due to the routing or scheduling problem alone. At the same time, the controller sends the flow table to the TSN switch and configures the time slot, which improves the network flexibility.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

图1为本发明实施例提供的时间敏感网络路由调度方法的流程图;FIG1 is a flow chart of a time-sensitive network routing scheduling method provided by an embodiment of the present invention;

图2为本发明实施例提供的时间敏感网络路由调度结构的示意图;FIG2 is a schematic diagram of a time-sensitive network routing scheduling structure provided by an embodiment of the present invention;

图3为本发明实施例提供的求解TT流中每一条消息的路由路径和路由路径上的传输时隙的流程示意图;3 is a schematic diagram of a process of solving the routing path and the transmission time slot on the routing path of each message in the TT flow according to an embodiment of the present invention;

图4为本发明实施例提供的控制器与TSN交换机配参的示意图;FIG4 is a schematic diagram of configuration parameters of a controller and a TSN switch provided by an embodiment of the present invention;

图5为本发明实施例提供的一种电子设备的示意图。FIG. 5 is a schematic diagram of an electronic device provided by an embodiment of the present invention.

具体实施方式Detailed ways

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

需要说明的是,在不冲突的情况下,下述的实施例及实施方式中的特征可以相互组合。It should be noted that, in the absence of conflict, the features in the following embodiments and implementations may be combined with each other.

如图1和图2所示,本发明实施例提供了一种时间敏感网络路由调度方法,所述方法依托于时间敏感网络路由调度网络架构实现,所述时间敏感网络路由调度网络架构包括控制器、若干个TSN交换机、若干个发送终端和若干个接收终端,控制器通过控制链路连接所有TSN交换机、发送终端和接收终端,TSN交换机通过有线链路分别与发送终端、接收终端相连。As shown in Figures 1 and 2, an embodiment of the present invention provides a time-sensitive network routing scheduling method, which is implemented based on a time-sensitive network routing scheduling network architecture. The time-sensitive network routing scheduling network architecture includes a controller, several TSN switches, several sending terminals and several receiving terminals. The controller connects all TSN switches, sending terminals and receiving terminals through a control link, and the TSN switch is connected to the sending terminal and the receiving terminal respectively through a wired link.

进一步地,控制器选用ONOS控制器,所述ONOS控制器包括拓扑发现模块、流量监测模块、TSN配置模块、路由管理模块;所述拓扑发现模块用于维护全网统一视图;所述流量监测模块用于监测全网链路带宽、流量和网速信息;所述TSN配置模块用于为TSN交换机和发送终端下发配置;所述路由管理模块用于路由决策,通过下发流表,将TT流从发送终端路由至接收终端。Furthermore, the controller uses an ONOS controller, and the ONOS controller includes a topology discovery module, a traffic monitoring module, a TSN configuration module, and a routing management module; the topology discovery module is used to maintain a unified view of the entire network; the traffic monitoring module is used to monitor the link bandwidth, traffic and network speed information of the entire network; the TSN configuration module is used to issue configurations to TSN switches and sending terminals; the routing management module is used for routing decisions, and routes the TT flow from the sending terminal to the receiving terminal by issuing a flow table.

进一步地,所述TSN交换机选用支持IEEE 802.1AS、IEEE 802.1Qbv协议、IEEE802.1Qci协议、IEEE 802.1Qch协议、OpenFlow协议、LLDP协议,支持Netconf功能的交换机。Furthermore, the TSN switch is selected to support IEEE 802.1AS, IEEE 802.1Qbv protocol, IEEE802.1Qci protocol, IEEE 802.1Qch protocol, OpenFlow protocol, LLDP protocol, and supports Netconf function.

进一步地,所述发送终端和接收终端选用支持IEEE 802.1AS、IEEE 802.1Qbv协议、IEEE 802.1Qci协议、IEEE 802.1Qch协议的主机。Furthermore, the transmitting terminal and the receiving terminal are hosts that support IEEE 802.1AS, IEEE 802.1Qbv, IEEE 802.1Qci, and IEEE 802.1Qch protocols.

如图1所示,接下来详细阐述本发明实施例提供的时间敏感网络路由调度方法,所述方法具体包括以下步骤:As shown in FIG1 , the time-sensitive network routing scheduling method provided by an embodiment of the present invention is described in detail below. The method specifically includes the following steps:

步骤S1:控制器根据链路层发现协议(Link Layer Discovery Protocol,LLDP)获取TSN网络拓扑。Step S1: The controller obtains the TSN network topology according to the Link Layer Discovery Protocol (LLDP).

在步骤S1的具体实施过程中,包括以下子步骤:The specific implementation process of step S1 includes the following sub-steps:

步骤S101,控制器发送修改消息(flow-mod消息)给所有TSN交换机;TSN交换机设置流表项匹配LLDP报文,并将匹配到的LLDP报文发送给ONOS控制器。Step S101: The controller sends a modification message (flow-mod message) to all TSN switches; the TSN switches set flow table entries to match LLDP messages, and send the matched LLDP messages to the ONOS controller.

步骤S102,控制器构建一个包含第一TSN交换机的设备编号的探测帧,构造LLDP(Link Layer Discovery Protocol,链路层发现协议)报文发送下发消息(packet-out消息)给第一TSN交换机。In step S102, the controller constructs a detection frame including the device number of the first TSN switch, constructs an LLDP (Link Layer Discovery Protocol) message, and sends a packet-out message to the first TSN switch.

步骤S103,第一TSN交换机收到LLDP报文后广播LLDP报文。当第二TSN交换机收到LLDP报文时,将LLDP报文封装成上报数据包,并将上报数据包上传至控制器。Step S103, the first TSN switch broadcasts the LLDP message after receiving the LLDP message. When the second TSN switch receives the LLDP message, it encapsulates the LLDP message into a reporting data packet and uploads the reporting data packet to the controller.

步骤S104,控制器根据上传的上报数据包构建有向边,(第一TSN交换机,第二TSN交换机)。以此类推,控制器向所有交换机发送LLDP报文,根据获取的上报数据包构建TSN网络拓扑,该TSN网络拓扑为一TSN网络拓扑有向图。Step S104, the controller constructs a directed edge according to the uploaded report data packet, (first TSN switch, second TSN switch). Similarly, the controller sends LLDP messages to all switches, and constructs a TSN network topology according to the acquired report data packets, and the TSN network topology is a TSN network topology directed graph.

示例性地,ONOS控制器构建一个包含第一TSN交换机的设备编号的探测帧,构造LLDP(Link Layer Discovery Protocol,链路层发现协议)报文发送下发消息(packet-out消息)给第一TSN交换机。第一TSN交换机收到LLDP报文,在所有端口广播该LLDP报文。当邻居第二TSN交换机和第八TSN交换机收到LLDP报文后,将LLDP报文封装成上报数据包,并将上报数据包上传至ONOS控制器。控制器根据上传的上报数据包构建有向边,记为(V1,V8),(V1,V2)和(V1,VE1),其中,(V1,V2,V8,VE1)分别代表(第一TSN交换机,第二TSN交换机,第八TSN交换机,第一发送终端)。同理,ONOS控制器向所有TSN交换机发送LLDP报文,根据获取的上报数据包构建TSN网络拓扑有向图。Exemplarily, the ONOS controller constructs a detection frame including the device number of the first TSN switch, constructs an LLDP (Link Layer Discovery Protocol) message and sends a packet-out message to the first TSN switch. The first TSN switch receives the LLDP message and broadcasts the LLDP message on all ports. When the neighboring second TSN switch and the eighth TSN switch receive the LLDP message, they encapsulate the LLDP message into a reporting data packet and upload the reporting data packet to the ONOS controller. The controller constructs directed edges based on the uploaded reporting data packets, denoted as (V 1 ,V 8 ), (V 1 ,V 2 ) and (V 1 , VE1 ), where (V 1 ,V 2 ,V 8 , VE1 ) represent (first TSN switch, second TSN switch, eighth TSN switch, first sending terminal) respectively. Similarly, the ONOS controller sends LLDP messages to all TSN switches and constructs a TSN network topology directed graph based on the acquired reporting data packets.

步骤S2:对每一TSN交换机、发送终端和接收终端配置时钟,实现时间同步。Step S2: Configure the clock for each TSN switch, sending terminal and receiving terminal to achieve time synchronization.

需要说明的是,本实例提供的TSN交换机采用IEEE 802.1AS的通用精确时间配置协议(gPTP, generic precision time protocol)进行时间同步,gPTP使用BMCA算法建立主从结构并形成gPTP域,然后选出所有TSN交换机的时钟中最精确的时钟源作为主时钟,然后利用报文的收发方式发送同步(Sync)报文和跟随(Follow_Up)报文,计算得到时钟偏差和链路延时的第一对应关系,然后通过延时请求响应机制,发送延时请求(Delay_Req)报文和延时响应(Delay_Resp)报文,计算得到时钟偏差和链路延时的第二对应关系,通过第一对应关系和第二对应关系计算出时钟偏差值和链路延时,从时钟利用时钟偏差值修正本地时间,完成与主时钟的时间同步,要求时钟偏差小于1μs。It should be noted that the TSN switch provided in this example uses the generic precision time protocol (gPTP) of IEEE 802.1AS for time synchronization. gPTP uses the BMCA algorithm to establish a master-slave structure and form a gPTP domain. Then, the most accurate clock source among the clocks of all TSN switches is selected as the master clock. Then, the synchronization (Sync) message and the follow (Follow_Up) message are sent by using the message sending and receiving method. The first correspondence between the clock deviation and the link delay is calculated. Then, through the delay request response mechanism, the delay request (Delay_Req) message and the delay response (Delay_Resp) message are sent to calculate the second correspondence between the clock deviation and the link delay. The clock deviation value and the link delay are calculated by the first correspondence and the second correspondence. The slave clock uses the clock deviation value to correct the local time and complete the time synchronization with the master clock. The clock deviation is required to be less than 1μs.

步骤S3:控制器接收由发送终端发送的连接请求,所述连接请求中包含有TT流的描述信息;根据TT流的描述信息配置每一条消息的传输优先级,并基于TSN网络拓扑配置路由路径约束、路径链路约束、链路传输时隙约束、调度约束,以最小化TT流中延迟之和为目标,求解得到TT流中每一条消息的路由路径和路由路径上的传输时隙。Step S3: The controller receives a connection request sent by the sending terminal, wherein the connection request includes description information of the TT stream; the transmission priority of each message is configured according to the description information of the TT stream, and the routing path constraints, path link constraints, link transmission time slot constraints, and scheduling constraints are configured based on the TSN network topology, with the goal of minimizing the sum of delays in the TT stream, and the routing path of each message in the TT stream and the transmission time slot on the routing path are solved.

如图3所示,在步骤S3的具体实施过程中,包括以下子步骤:As shown in FIG3 , the specific implementation process of step S3 includes the following sub-steps:

步骤S301,控制器接收由发送终端发送的连接请求,所述连接请求中包含有TT流(Time-triggered,时间触发流)的描述信息。Step S301: The controller receives a connection request sent by a sending terminal, wherein the connection request includes description information of a TT flow (Time-triggered flow).

具体地,所述连接请求中为一系列消息组成的控制流F,F=(f1,f2,f3,……,fm,……,fN),m∈[1,N],N为消息的条数,其中,每一消息fm包含包括:发送终端sm,接收终端dm,消息fm的帧周期cm,消息fm的帧大小lm,消息fm的优先级spm、消息fm的最大延迟delm和消息fm能接受的最大抖动jm。其中,不同优先级的流量用不同VLAN ID标识,高于消息fm的最大延迟delm则被认为无法保证数据的可靠传输。Specifically, the connection request is a control flow F composed of a series of messages, F=(f 1 ,f 2 ,f 3 ,……,f m ,……,f N ), m∈[1,N], N is the number of messages, wherein each message f m includes: a sending terminal s m , a receiving terminal d m , a frame period c m of the message f m , a frame size l m of the message f m , a priority sp m of the message f m , a maximum delay del m of the message f m and a maximum jitter j m that the message f m can accept. Traffic of different priorities is identified by different VLAN IDs, and traffic with a maximum delay del m higher than the maximum delay del m of the message f m is considered to be unable to guarantee reliable data transmission.

同时,本发明提供的网络架构可被记为TSN网络模型N={F,V,E},其中,F代表网络中的TT流,V代表网络节点包括发送终端、接收终端和TSN交换机,E代表两个节点连接组成的网络链路,(Va,Vb)∈E,其中,Va,Vb分别为源、目的网络节点。TT流中的第m条消息fm∈F,fm=(sm,dm,cm,spm,lm,delm,jm),其中,sm代表发送终端节点,dm代表接收终端节点,cm代表数据帧的传输周期,spm代表fm的优先级大小,lm代表fm的数据帧大小,delm代表数据帧的最大延迟,jm代表fm能接受的最大抖动。对于(Va,Vb)∈E,有TT流fm的传播延迟,数据在(Va,Vb)的发送速率sendab,对于Va∈V,由TSN交换机Va决定在哪个端口转发数据包的处理延迟/>,TSN交换机Va在出端口将TT流fm序列化的传输延迟/>,TSN交换机Va处理TT流fm的抖动JamAt the same time, the network architecture provided by the present invention can be recorded as a TSN network model N={F, V, E}, where F represents the TT flow in the network, V represents the network nodes including the sending terminal, the receiving terminal and the TSN switch, and E represents the network link composed of two nodes, (V a , V b )∈E, where V a and V b are the source and destination network nodes respectively. The mth message f m ∈F in the TT flow, f m =(s m , d m , cm , sp m , l m , del m , j m ), where s m represents the sending terminal node, d m represents the receiving terminal node, cm represents the transmission period of the data frame, sp m represents the priority size of f m , l m represents the data frame size of f m , del m represents the maximum delay of the data frame, and j m represents the maximum jitter that f m can accept. For (V a , V b )∈E, there is a propagation delay of TT flow f m , the data sending rate send ab at (V a ,V b ), for V a ∈ V, the TSN switch V a decides which port to forward the data packet./> , the transmission delay of TSN switch V a serializing TT stream f m at the egress port/> , the TSN switch V a processes the jitter Jam of the TT flow fm .

步骤S302,根据连接请求中TT流的描述信息配置每一条消息fm∈F的传输优先级具体包括:Step S302, configuring the transmission priority of each message f m ∈ F according to the description information of the TT flow in the connection request specifically includes:

1)对于第m条消息和第n条消息 (fm,fn)∈F,如果第m条消息的优先级高于第n条消息的优先级spm>spn,则控制器将第m条消息fm排在第n条消息fn之前传输。1) For the mth message and the nth message (f m ,f n )∈F, if the priority of the mth message is higher than the priority of the nth message sp m > sp n , the controller transmits the mth message f m before the nth message f n .

2)对于第m条消息和第n条消息(fm,fn)∈F,如果第m条消息的优先级与第n条消息的优先级相同spm=spn,则根据第m条消息对应的数据帧的传输周期cm和第n条消息对应的数据帧的传输周期cn进行判断,如果第m条消息对应的数据帧的传输周期大于第n条消息对应的数据帧的传输周期cm>cn,则控制器将第m条消息fm排在第n条消息fn之前传输。2) For the mth message and the nth message (f m ,f n )∈F, if the priority of the m-th message is the same as the priority of the n-th message sp m =sp n , then a judgment is made according to the transmission period cm of the data frame corresponding to the m-th message and the transmission period c n of the data frame corresponding to the n-th message; if the transmission period of the data frame corresponding to the m-th message is greater than the transmission period c m >c n of the data frame corresponding to the n-th message, then the controller arranges the m-th message f m before the n-th message f n for transmission.

3)对于第m条消息和第n条消息 (fm,fn)∈F,如果第m条消息的优先级与第n条消息的优先级相同spm=spn且第m条消息对应的数据帧的传输周期与第n条消息对应的数据帧的传输周期相同cm=cn,则根据第m条消息对应的数据帧的最大延迟delm和第n条消息对应的数据帧的最大延迟deln进行判断,如果第m条消息对应的数据帧的最大延迟小于第n条消息对应的数据帧的最大延迟delm<deln,则控制器将第m条消息fm排在第n条消息fn之前传输。3) For the mth message and the nth message (f m ,f n )∈F, if the priority of the m-th message is the same as the priority of the n-th message sp m =sp n and the transmission period of the data frame corresponding to the m-th message is the same as the transmission period of the data frame corresponding to the n-th message c m =c n , then a judgment is made according to the maximum delay del m of the data frame corresponding to the m-th message and the maximum delay del n of the data frame corresponding to the n-th message. If the maximum delay of the data frame corresponding to the m-th message is less than the maximum delay del m <del n of the data frame corresponding to the n-th message, the controller arranges the m-th message f m before the n-th message f n for transmission.

4)对于第m条消息和第n条消息 (fm,fn)∈F,如果第m条消息的优先级与第n条消息的优先级相同spm=spn,第m条消息对应的数据帧的传输周期与第n条消息对应的数据帧的传输周期相同cm=cn,第m条消息对应的数据帧的最大延迟与第n条消息对应的数据帧的最大延迟delm=deln,则根据第m条消息能接受的最大抖动jm和第n条消息能接受的最大抖动jn进行判断,如果第m条消息能接受的最大抖动小于第n条消息能接受的最大抖动jm<jn,则控制器将流第m条消息fm排在第n条消息fn之前传输,如果第m条消息能接受的最大抖动与第n条消息能接受的最大抖动相同jm=jn,则控制器随机选取一条消息先传输。4) For the mth message and the nth message (f m ,f n )∈F, if the priority of the m-th message is the same as the priority of the n-th message sp m =sp n , the transmission period of the data frame corresponding to the m-th message is the same as the transmission period of the data frame corresponding to the n-th message c m =c n , the maximum delay of the data frame corresponding to the m-th message is the same as the maximum delay of the data frame corresponding to the n-th message del m =del n , then a judgment is made based on the maximum jitter j m acceptable to the m-th message and the maximum jitter j n acceptable to the n-th message. If the maximum jitter acceptable to the m-th message is less than the maximum jitter acceptable to the n-th message j m <j n , the controller will arrange the m-th message f m of the flow before the n-th message f n for transmission. If the maximum jitter acceptable to the m-th message is the same as the maximum jitter acceptable to the n-th message j m =j n , the controller randomly selects a message to transmit first.

步骤S303,根据TT流的描述信息、TSN网络拓扑配置路由路径约束。Step S303: configure routing path constraints according to the description information of the TT flow and the TSN network topology.

所述路径约束为:当第m条消息fm经过链路(源网络节点,目的网络节点),则将第m条消息fm对应当前链路的路由路径变量记为1;当第m条消息fm不经过链路(源网络节点,目的网络节点),则将第m条消息fm对应当前链路的路由路径变量记为0。The path constraint is: when the mth message f m passes through the link (source network node, destination network node), the routing path variable of the mth message f m corresponding to the current link is recorded as 1; when the mth message f m does not pass through the link (source network node, destination network node), the routing path variable of the mth message f m corresponding to the current link is recorded as 0.

进一步地,将路径约束变量记为,表达式如下:Furthermore, the path constraint variable is recorded as , the expression is as follows:

∈{0,1},/> (Va,Vb)∈E, />fm∈F ∈{0,1},/> (V a ,V b )∈E, /> f m ∈F

式中,当路径约束变量记为=1时,代表第m条消息fm经过链路(Va,Vb);当路径约束变量记为/>=0时,代表第m条消息fm不经过链路(Va,Vb)。In the formula, when the path constraint variable is recorded as =1, it means that the mth message f m passes through the link (V a ,V b ); when the path constraint variable is recorded as/> =0, it means that the mth message f m does not pass through the link (V a ,V b ).

步骤S404,根据TT流的描述信息、TSN网络拓扑配置链路约束。Step S404: configure link constraints according to the description information of the TT flow and the TSN network topology.

所述路径链路约束包括第一路径链路约束、第二路径链路约束和第三路径链路约束。The path link constraint includes a first path link constraint, a second path link constraint and a third path link constraint.

其中,所述第一路径链路约束为:当第m条消息fm对应的链路中存在作为路由流经节点的TSN交换机,则作为路由流经节点的TSN交换机的入端口链路数应等于出端口链路数;第一路径链路表达式如下:The first path link constraint is: when there is a TSN switch as a routing node in the link corresponding to the mth message f m , the number of inbound port links of the TSN switch as the routing node should be equal to the number of outbound port links; the first path link expression is as follows:

式中,Va表示作为路由流经节点的TSN交换机,表示第m条消息fm经过链路(Va,Vb),/>表示第m条消息fm经过链路(Vb, Va)。Where Va represents the TSN switch as the routing node. Indicates that the mth message f m passes through the link (V a ,V b ),/> Indicates that the mth message f m passes through the link (V b , V a ).

所述第二路径链路约束为:发送终端的出端口链路数应该与接收终端的入端口链路数相等且都为1,第二路径链路约束表达式如下:The second path link constraint is: the number of outbound port links of the sending terminal should be equal to the number of inbound port links of the receiving terminal and both are 1. The second path link constraint expression is as follows:

式中,表示第m条消息fm经过链路(sm,Va),/>表示第m条消息fm经过链路(Vb,dm)。In the formula, Indicates that the mth message f m passes through the link (s m ,V a ),/> It indicates that the mth message f m passes through the link (V b ,d m ).

所述第三路径链路约束为:为防止产生路由环路,需保证所选取的链路每条消息只经过一次,第三路径链路约束表达式定义如下:The third path link constraint is: to prevent routing loops, it is necessary to ensure that each message passes through the selected link only once. The third path link constraint expression is defined as follows:

步骤S305,根据TT流的描述信息、TSN网络拓扑配置链路传输时隙约束;所述链路传输时隙约束的表达式如下:Step S305: configure the link transmission time slot constraint according to the description information of the TT flow and the TSN network topology; the expression of the link transmission time slot constraint is as follows:

式中,为第m条消息fm在链路(Va,Vb)上传输的开始时隙,/>为第m条消息fm在链路(Va,Vb)上所经历的周期数时间,/>表示自然数集合。In the formula, is the starting time slot of the mth message f m transmitted on the link (V a ,V b ),/> is the number of cycles that the mth message f m takes on the link (V a ,V b ),/> Represents the set of natural numbers.

步骤S306,根据TT流的描述信息、TSN网络拓扑配置路径调度约束。在选择路由路径时,需确保所选路由路径满足路径调度约束。所述路径调度约束包括第一路径调度约束、Step S306, configure the path scheduling constraints according to the description information of the TT flow and the TSN network topology. When selecting a routing path, it is necessary to ensure that the selected routing path meets the path scheduling constraints. The path scheduling constraints include the first path scheduling constraints,

其中,第一路径调度约束的表达式如下:The expression of the first path scheduling constraint is as follows:

式中,为无穷大常数,当控制器选择链路(Va,Vb)时,第m条消息fm在链路(Va,Vb)上传输的开始时隙/>和第m条消息fm在链路(Va,Vb)上所经历的周期数时间/>为非负整数;当控制器不选择链路(Va,Vb)时,第m条消息fm在链路(Va,Vb)上传输的开始时隙/>和第m条消息fm在链路(Va,Vb)上所经历的周期数时间/>为0。In the formula, is an infinite constant. When the controller selects the link (V a , V b ), the starting time slot of the mth message f m transmitted on the link (V a , V b ) is / > and the number of cycles that the mth message f m takes on the link (V a ,V b )/> is a non-negative integer; when the controller does not select the link (V a ,V b ), the starting time slot of the mth message f m transmitted on the link (V a ,V b )/> and the number of cycles that the mth message f m takes on the link (V a ,V b )/> is 0.

第二路径调度约束考虑TT流第m条消息fm在某一TSN交换机Va处的处理延迟,传输延迟/>和抖动Jam,出端口链路的时隙和入端口链路的时隙之差必须大于等于第m条消息fm在某一TSN交换机处的处理时间,表达式如下:The second path scheduling constraint considers the processing delay of the mth message f m of the TT flow at a certain TSN switch V a , transmission delay/> The difference between the time slot of the outbound link and the time slot of the inbound link must be greater than or equal to the processing time of the mth message f m at a certain TSN switch, and the expression is as follows:

式中,表示第m条消息fm经过链路(Va,Vb)。In the formula, It indicates that the mth message f m passes through the link (V a ,V b ).

所述第三路径调度约束为:第m条消息fm在接收终端入端口的链路时隙与发送终端出端口的链路时隙之差小于第m条消息fm的最大延迟与第m条消息fm在链路(Va,Vb)上的传播延迟之差;表达式如下:The third path scheduling constraint is: the difference between the link time slot of the mth message f m at the receiving terminal input port and the link time slot of the sending terminal output port is less than the difference between the maximum delay of the mth message f m and the propagation delay of the mth message f m on the link (V a , V b ); the expression is as follows:

式中,表示第m条消息fm在链路(Vb,dm)上传输的开始时隙,/>表示第m条消息fm在链路(Vb, dm)上所经历的周期数时间,/>表示第m条消息fm在链路(sm,Va)上传输的开始时隙,/>表示第m条消息fm在链路(sm,Va)上所经历的周期数时间,/>表示第m条消息fm在链路(Va,Vb)上的传播延迟。In the formula, represents the starting time slot of the transmission of the mth message f m on the link (V b , d m ),/> represents the number of cycles that the mth message f m takes on the link (V b , d m ),/> represents the starting time slot of the transmission of the mth message f m on the link (s m ,V a ),/> represents the number of cycles that the mth message f m takes on the link (s m ,V a ),/> represents the propagation delay of the mth message f m on the link (V a ,V b ).

其中,第m条消息fm在链路(Va,Vb)∈E上的传播延迟的计算公式如下:The propagation delay of the mth message fm on the link ( Va , Vb )∈E is The calculation formula is as follows:

式中,sendab表示数据在链路(Va,Vb)上的发送速率。Where send ab represents the data sending rate on the link (V a ,V b ).

所述第四路径调度约束为:当第m条消息的优先级高于第n条消息的优先级,考虑消息在超周期内的传输次数,为了保证TT流的确定性传输,同一时刻不允许多个数据帧竞争相同信道,则需确保经过同一条链路传输时,第n条消息在第m条消息传输完成之后传输;所述第四路径调度约束的表达式如下:The fourth path scheduling constraint is: when the priority of the mth message is higher than the priority of the nth message, considering the number of message transmissions within the super period, in order to ensure the deterministic transmission of the TT flow, multiple data frames are not allowed to compete for the same channel at the same time, so it is necessary to ensure that when transmitting through the same link, the nth message is transmitted after the mth message is transmitted; the expression of the fourth path scheduling constraint is as follows:

式中,表示第n条消息fm在链路(Va,Vb)上传输的开始时隙,/>表示区间内的整数,cn表示第n条消息对应的数据帧的传输周期,/>表示第m条消息fm在链路(Va,Vb)上传输的开始时隙,μ表示区间/>内的整数,/>表示fm在/>的传输次数。In the formula, represents the starting time slot of the nth message f m transmitted on the link (V a ,V b ),/> Representation interval The integer in the range, c n represents the transmission period of the data frame corresponding to the nth message, /> represents the starting time slot of the mth message f m transmitted on the link (V a ,V b ), μ represents the interval/> Integer in the range, /> Indicates f m in/> The number of transmissions.

其中,第m条消息fm在超周期内的传输次数,表达式如下:Among them, the number of transmissions of the mth message f m within the super period is , the expression is as follows:

式中,TF表示超周期,其表达式如下:In the formula, TF represents the super period, and its expression is as follows:

TF= LCM(cm),fm∈FT F = LCM( cm ), f m ∈F

式中,LCM(·)表示所有消息传输周期的最小公倍数,cm表示第m条消息fm的传输周期。Where LCM(·) represents the least common multiple of all message transmission periods, and cm represents the transmission period of the mth message fm .

需要说明的是,本实例中,基于IEEE 802.1Qbv协议通过时隙划分对门控列表进行 精确控制,门控列表通过TT流量的传输周期进行驱动控制,由于TT流的传输周期不同,所以 控制器通过设置超周期来控制门控列表循环调度。 It should be noted that in this example, the gating list is precisely controlled by time slot division based on the IEEE 802.1Qbv protocol. The gating list is driven and controlled by the transmission cycle of the TT flow. Since the transmission cycle of the TT flow is different, the controller sets the super cycle. To control the gate list loop scheduling.

步骤S307,定义目标函数,目标函数为最小化TT流延迟之和,定义如下:Step S307, define an objective function, which is to minimize the sum of TT flow delays, and is defined as follows:

式中,表示第m条消息fm在链路(Vb,dm)上传输的开始时隙,/>表示第m条消息fm在链路(Vb,dm)上所经历的周期数时间,/>表示第m条消息fm在链路(sm,Va)上传输的开始时隙,/>表示第m条消息fm在链路(sm,Va)上所经历的周期数时间。In the formula, represents the starting time slot of the transmission of the mth message f m on the link (V b , d m ),/> represents the number of cycles that the mth message f m takes on the link (V b , d m ),/> represents the starting time slot of the transmission of the mth message f m on the link (s m ,V a ),/> It represents the number of cycles that the mth message f m takes on the link (s m ,V a ).

步骤S308,根据路由路径约束、路径链路约束、链路传输时隙约束、路径调度约束建模,通过整数线性规划(Integer Linear Programming, ILP)求解器求得目标函数解最小化TT流延迟之和,求解得到TT流中每一条消息的路由路径和路由路径上的传输时隙。Step S308, modeling is performed based on routing path constraints, path link constraints, link transmission time slot constraints, and path scheduling constraints, and an integer linear programming (ILP) solver is used to obtain the objective function solution that minimizes the sum of TT flow delays, and the routing path of each message in the TT flow and the transmission time slot on the routing path are obtained.

本实施例中,TT流根据图1的网络拓扑随机生成,随机选取两个不重复的终端作为发送终端和接收终端,帧周期选取100到500μs的随机数,帧大小为100到4000B的随机数,流优先级为1到7的随机数,最大延迟小于该流的帧周期,最大抖动小于最大延迟的1/8,链路发送速率1Gbit/s,处理延迟在1到5μs之间,传输延迟在1到20μs之间,交换机处理TT流的抖动小于5μs。使用IBM ILOG CPLEX Optimization Studio求解器求解上述整数线性规划模型,通过目标函数与约束条件,求解出:In this embodiment, the TT flow is randomly generated according to the network topology of Figure 1, two non-repeating terminals are randomly selected as the sending terminal and the receiving terminal, the frame period is a random number from 100 to 500μs, the frame size is a random number from 100 to 4000B, the flow priority is a random number from 1 to 7, the maximum delay is less than the frame period of the flow, the maximum jitter is less than 1/8 of the maximum delay, the link transmission rate is 1Gbit/s, the processing delay is between 1 and 5μs, the transmission delay is between 1 and 20μs, and the jitter of the switch processing the TT flow is less than 5μs. The IBM ILOG CPLEX Optimization Studio solver is used to solve the above integer linear programming model, and the objective function and constraints are used to solve:

,

,

的值。 The value of .

本发明提供的时间敏感网络路由调度方法,在步骤S3之后,步骤S4之前还可以包括:遍历查询是否还有未计算的发送终端和接收终端,当还有未计算的发送终端和接收终端则返回重复执行步骤S3,否则执行步骤S4。The time-sensitive network routing scheduling method provided by the present invention may further include, after step S3 and before step S4: traversing and querying whether there are any sending terminals and receiving terminals that have not been calculated, and if there are any sending terminals and receiving terminals that have not been calculated, returning to and repeating step S3, otherwise executing step S4.

步骤S4:控制器根据TT流中每一条消息的路由路径为TSN交换机配置流表,并根据TT流中每一条消息的传输时隙为TSN交换机配置门控列表,并为发送终端配置调度时间表。Step S4: The controller configures a flow table for the TSN switch according to the routing path of each message in the TT flow, configures a gating list for the TSN switch according to the transmission time slot of each message in the TT flow, and configures a scheduling schedule for the sending terminal.

如图4所示,所述步骤S4中根据TT流中每一条消息的传输时隙为TSN交换机配置门控列表,具体包括:As shown in FIG. 4 , in step S4, a gating list is configured for the TSN switch according to the transmission time slot of each message in the TT stream, specifically including:

S401:控制器的TSN配置模块调用客户端(Netconf Client端)触发Netconf会话建立,与TSN交换机的服务端(Server端)建立SSH连接,并进行认证和授权。S401: The TSN configuration module of the controller calls the client (Netconf Client) to trigger the establishment of a Netconf session, establishes an SSH connection with the server (Server) of the TSN switch, and performs authentication and authorization.

S402:控制器和TSN交换机完成Netconf会话建立和能力协商。S402: The controller and the TSN switch complete Netconf session establishment and capability negotiation.

S403:将路由路径通过REST请求(表述性状态传递,Representational StateTransfer)发送给控制器,控制器根据路由管理模块为TSN交换机下发转发流表。S403: Send the routing path to the controller through a REST request (Representational State Transfer), and the controller sends a forwarding flow table to the TSN switch according to the routing management module.

S404:将TT流传输时隙通过REST请求发送给控制器,控制器通过TSN配置模块调用Netconf RPC,为TSN交换机配置门控列表。S404: The TT stream transmission time slot is sent to the controller via a REST request. The controller calls Netconf RPC via the TSN configuration module to configure a gating list for the TSN switch.

S405:控制器的TSN配置模块调用客户端(Netconf Client端)触发关闭Netconf会话,与TSN交换机的服务端(Server端)关闭SSH连接。S405: The TSN configuration module of the controller calls the client (Netconf Client) to trigger the closing of the Netconf session, and closes the SSH connection with the server (Server) of the TSN switch.

进一步地,所述步骤S4中,为发送终端配置调度时间表的过程包括:所述控制器通过TSN配置模块将TT流中每一条消息的路由路径上的传输时隙转换为XML文件,通过REST请求发送给发送终端。Furthermore, in step S4, the process of configuring a scheduling schedule for the sending terminal includes: the controller converts the transmission time slot on the routing path of each message in the TT stream into an XML file through the TSN configuration module, and sends it to the sending terminal through a REST request.

相应的,本申请还提供一种电子设备,包括:一个或多个处理器;存储器,用于存储一个或多个程序;当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如上述的时间敏感网络路由调度方法。如图5所示,为本发明实施例提供的时间敏感网络路由调度方法所在任意具备数据处理能力的设备的一种硬件结构图,除了图5所示的处理器、内存以及网络接口之外,实施例中装置所在的任意具备数据处理能力的设备通常根据该任意具备数据处理能力的设备的实际功能,还可以包括其他硬件,对此不再赘述。Correspondingly, the present application also provides an electronic device, including: one or more processors; a memory for storing one or more programs; when the one or more programs are executed by the one or more processors, the one or more processors implement the time-sensitive network routing scheduling method as described above. As shown in FIG5, a hardware structure diagram of any device with data processing capability in which the time-sensitive network routing scheduling method provided in an embodiment of the present invention is located, in addition to the processor, memory and network interface shown in FIG5, any device with data processing capability in which the device in the embodiment is located can also include other hardware according to the actual function of the device with data processing capability, which will not be described in detail.

相应的,本申请还提供一种计算机可读存储介质,其上存储有计算机指令,该指令被处理器执行时实现如上述的时间敏感网络路由调度方法。所述计算机可读存储介质可以是前述任一实施例所述的任意具备数据处理能力的设备的内部存储单元,例如硬盘或内存。所述计算机可读存储介质也可以是外部存储设备,例如所述设备上配备的插接式硬盘、智能存储卡(Smart Media Card,SMC)、SD卡、闪存卡(Flash Card)等。进一步的,所述计算机可读存储介还可以既包括任意具备数据处理能力的设备的内部存储单元也包括外部存储设备。所述计算机可读存储介质用于存储所述计算机程序以及所述任意具备数据处理能力的设备所需的其他程序和数据,还可以用于暂时地存储已经输出或者将要输出的数据。Accordingly, the present application also provides a computer-readable storage medium on which computer instructions are stored, and when the instructions are executed by the processor, the time-sensitive network routing scheduling method as described above is implemented. The computer-readable storage medium can be an internal storage unit of any device with data processing capabilities described in any of the aforementioned embodiments, such as a hard disk or a memory. The computer-readable storage medium can also be an external storage device, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), an SD card, a flash card (Flash Card), etc. equipped on the device. Furthermore, the computer-readable storage medium can also include both an internal storage unit and an external storage device of any device with data processing capabilities. The computer-readable storage medium is used to store the computer program and other programs and data required by any device with data processing capabilities, and can also be used to temporarily store data that has been output or is to be output.

本领域技术人员在考虑说明书及实践这里公开的内容后,将容易想到本申请的其它实施方案。本申请旨在涵盖本申请的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本申请的一般性原理并包括本申请未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的。Those skilled in the art will readily appreciate other embodiments of the present application after considering the description and practicing the contents disclosed herein. The present application is intended to cover any variations, uses or adaptations of the present application, which follow the general principles of the present application and include common knowledge or customary technical means in the art that are not disclosed in the present application. The description and examples are intended to be exemplary only.

应当理解的是,本申请并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。It should be understood that the present application is not limited to the exact construction that has been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof.

Claims (9)

1. The time-sensitive network routing scheduling method is characterized by depending on a time-sensitive network routing scheduling network architecture and comprises a controller, a plurality of TSN switches, a plurality of transmitting terminals and a plurality of receiving terminals, wherein the TSN switches, the transmitting terminals and the receiving terminals are used as nodes and are coupled with the controller; the TSN exchanger is respectively communicated with the sending terminal and the receiving terminal; the method comprises the following steps:
The controller obtains TSN network topology according to a link layer discovery protocol;
Configuring clocks for each TSN exchanger, transmitting terminal and receiving terminal to realize time synchronization;
The controller receives a connection request sent by a sending terminal, wherein the connection request comprises description information of TT flow; configuring transmission priority of each message according to the description information of the TT flow, and configuring route path constraint, path link constraint, link transmission time slot constraint and path scheduling constraint based on TSN network topology, aiming at minimizing the sum of delays in the TT flow, and solving to obtain a route path of each message in the TT flow and a transmission time slot on the route path;
the path scheduling constraint comprises a first path scheduling constraint, a second path scheduling constraint, a third path scheduling constraint and a fourth path scheduling constraint;
The first path scheduling constraint is: when the controller selects the link (V a,Vb), the starting time slot of the transmission of the mth message f m on the link (V a,Vb) and the cycle number time of the mth message f m on the link (V a,Vb) are non-negative integers; when the controller does not select the link (V a,Vb), the starting time slot of the transmission of the mth message f m on the link (V a,Vb) and the cycle number time that the mth message f m has undergone on the link (V a,Vb) are 0;
The second path scheduling constraint is: the difference between the time slot of the exit port link and the time slot of the entry port link of the mth message f m at a certain TSN switch is greater than or equal to the processing time of the mth message f m at a certain TSN switch; wherein the processing time of the mth message f m at a certain TSN switch takes into account the processing delay, transmission delay, and jitter of the mth message f m at a certain TSN switch;
The third path scheduling constraint is: the difference between the link time slot of the m-th message f m at the receiving terminal ingress port and the link time slot of the transmitting terminal egress port is less than the difference between the maximum delay of the m-th message f m and the propagation delay of the m-th message f m on the link (V a,Vb);
The fourth path scheduling constraint is: when the priority of the mth message is higher than that of the nth message, considering the transmission times of the message in the overcycle, and ensuring that the nth message is transmitted after the transmission of the mth message is completed when the mth message is transmitted through the same link;
The controller configures a flow table for the TSN switch according to the route path of each message in the TT flow, configures a gating list for the TSN switch according to the transmission time slot of each message in the TT flow, and configures a scheduling time table for the sending terminal.
2. The method of claim 1, wherein the controller obtaining the TSN network topology according to a link layer discovery protocol comprises:
the controller sends a stream modification message to all TSN switches; the TSN switch sets a stream table item to match with the LLDP message and sends the matched LLDP message to the controller;
the controller constructs a detection frame containing the equipment number of the first TSN switch, constructs an LLDP message and sends the LLDP message to the first TSN switch;
Broadcasting the LLDP message after the first TSN switch receives the LLDP message; after the second TSN exchanger receives the LLDP message, the LLDP message is packaged into a report data packet, and the report data packet is uploaded to the controller;
The controller constructs a directed edge according to the uploaded report data packet, and marks the directed edge as a first TSN switch and a second TSN switch; and by analogy, the controller sends LLDP messages to all the switches, and builds TSN network topology according to the acquired report data packets.
3. The method for scheduling time-sensitive network routing according to claim 1, wherein the controller receives a TT stream transmitted by the transmitting terminal, denoted as f= (F 1,f2,f3,……,fm,……,fN), m e 1, N being the number of messages; each message f m includes: the sending terminal, the receiving terminal, the frame period of message f m, the frame size of message f m, the priority sp m of message f m, the maximum delay of message f m and the maximum jitter acceptable to message f m.
4. A time-sensitive network routing method according to claim 1 or 3, wherein configuring the transmission priority of each message according to the description information of the TT stream comprises:
when the priority of the m-th message is higher than that of the n-th message, the controller arranges the m-th message before the n-th message for transmission;
when the priority of the mth message is the same as that of the nth message, if the transmission period of the data frame corresponding to the mth message is greater than that of the data frame corresponding to the nth message, the controller arranges the mth message before the nth message for transmission;
When the priority of the mth message is the same as the priority of the nth message and the transmission period of the data frame corresponding to the mth message is the same as the transmission period of the data frame corresponding to the nth message, if the maximum delay of the data frame corresponding to the mth message is smaller than the maximum delay of the data frame corresponding to the nth message, the controller arranges the mth message before the nth message for transmission;
When the priority of the mth message is the same as that of the nth message, the transmission period of the data frame corresponding to the mth message is the same as that of the data frame corresponding to the nth message, the maximum delay of the data frame corresponding to the mth message is the maximum delay of the data frame corresponding to the nth message, and if the maximum jitter acceptable by the mth message is less than the maximum jitter acceptable by the nth message, the controller arranges the mth message in the stream before the nth message for transmission; if the maximum jitter acceptable by the mth message is the same as the maximum jitter acceptable by the nth message, the controller randomly selects a message to be transmitted first.
5. The method for scheduling time-sensitive network routing according to claim 1, wherein the routing path constraint is:
When the mth message f m passes through the link (source network node, destination network node), the routing path variable of the mth message f m corresponding to the current link is recorded as 1;
When the mth message f m does not pass through a link (source network node, destination network node), the routing path variable of the mth message f m corresponding to the current link is recorded as 0.
6. The method of claim 1, wherein the path link constraints include a first path link constraint, a second path link constraint, and a third path link constraint;
The first path link constraint is: when the TSN switch as the route flow node exists in the link corresponding to the mth message f m, the number of the incoming port links of the TSN switch as the route flow node should be equal to the number of the outgoing port links;
the second path link constraint is: the number of the outgoing port links of the sending terminal should be equal to the number of the incoming port links of the receiving terminal and be 1;
the third path link constraint is: the selected link passes each message only once.
7. The method for scheduling time-sensitive network routing of claim 1, wherein the link transmission slot constraint is expressed as follows:
In the method, in the process of the invention, For the beginning time slot of the transmission of the mth message f m over the link (V a,Vb)/>For the cycle number time experienced by the mth message f m on the link (V a,Vb)/>Representing a natural number set.
8. An electronic device comprising a memory and a processor, wherein the memory is coupled to the processor; wherein the memory is configured to store program data and the processor is configured to execute the program data to implement the time-sensitive network routing scheduling method of any one of the preceding claims 1-7.
9. A computer readable storage medium having stored thereon a computer program, wherein the program when executed by a processor implements a time-sensitive network routing scheduling method according to any of claims 1-7.
CN202410050996.0A 2024-01-15 2024-01-15 A time-sensitive network routing scheduling method, electronic device, and medium Active CN117596200B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410050996.0A CN117596200B (en) 2024-01-15 2024-01-15 A time-sensitive network routing scheduling method, electronic device, and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410050996.0A CN117596200B (en) 2024-01-15 2024-01-15 A time-sensitive network routing scheduling method, electronic device, and medium

Publications (2)

Publication Number Publication Date
CN117596200A CN117596200A (en) 2024-02-23
CN117596200B true CN117596200B (en) 2024-05-07

Family

ID=89918602

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410050996.0A Active CN117596200B (en) 2024-01-15 2024-01-15 A time-sensitive network routing scheduling method, electronic device, and medium

Country Status (1)

Country Link
CN (1) CN117596200B (en)

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105847151A (en) * 2016-05-25 2016-08-10 安徽大学 Multi-constraint QoS routing strategy design method for software defined network
CN111600754A (en) * 2020-05-11 2020-08-28 重庆邮电大学 Industrial heterogeneous network scheduling method for interconnection of TSN (transmission time network) and non-TSN (non-Transmission time network)
CN111740924A (en) * 2020-07-29 2020-10-02 上海交通大学 A Time-Sensitive Network Gating Mechanism Traffic Shaping and Routing Planning Scheduling Method
CN113285872A (en) * 2021-03-09 2021-08-20 清华大学 Time-sensitive network communication flow scheduling method based on deep reinforcement learning
CN113300960A (en) * 2021-07-27 2021-08-24 南京中网卫星通信股份有限公司 Delay deterministic transmission method based on routing scheduling and joint optimization
CN114172843A (en) * 2022-01-17 2022-03-11 重庆邮电大学 Joint optimization method for path selection and gating scheduling in time-sensitive network
CN114389946A (en) * 2022-02-14 2022-04-22 重庆邮电大学 Network configuration management method for TSN switch
CN115460130A (en) * 2022-09-20 2022-12-09 重庆邮电大学 A Multipath Joint Scheduling Method in Time Sensitive Network
CN115834511A (en) * 2022-11-28 2023-03-21 电子科技大学 Gating scheduling method for periodic messages of each priority in time-sensitive network
CN115883438A (en) * 2022-11-16 2023-03-31 重庆邮电大学 Routing and scheduling method and device of time trigger flow in time-sensitive network and readable storage medium
CN116192651A (en) * 2023-03-06 2023-05-30 重庆邮电大学 A Time Sensitive Network Scheduling Method Based on Bandwidth Reservation
CN116366550A (en) * 2023-03-03 2023-06-30 重庆邮电大学 End-to-end low-delay scheduling method for time trigger stream of time sensitive network
CN117278487A (en) * 2023-10-23 2023-12-22 北京航空航天大学 Traffic scheduling method for avionics system based on time-sensitive network Qbv protocol

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11228942B2 (en) * 2020-03-27 2022-01-18 Mitsubishi Electric Research Laboratories, Inc. Scheduling data traffic in wireless time sensitive networks

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105847151A (en) * 2016-05-25 2016-08-10 安徽大学 Multi-constraint QoS routing strategy design method for software defined network
CN111600754A (en) * 2020-05-11 2020-08-28 重庆邮电大学 Industrial heterogeneous network scheduling method for interconnection of TSN (transmission time network) and non-TSN (non-Transmission time network)
CN111740924A (en) * 2020-07-29 2020-10-02 上海交通大学 A Time-Sensitive Network Gating Mechanism Traffic Shaping and Routing Planning Scheduling Method
CN113285872A (en) * 2021-03-09 2021-08-20 清华大学 Time-sensitive network communication flow scheduling method based on deep reinforcement learning
CN113300960A (en) * 2021-07-27 2021-08-24 南京中网卫星通信股份有限公司 Delay deterministic transmission method based on routing scheduling and joint optimization
CN114172843A (en) * 2022-01-17 2022-03-11 重庆邮电大学 Joint optimization method for path selection and gating scheduling in time-sensitive network
CN114389946A (en) * 2022-02-14 2022-04-22 重庆邮电大学 Network configuration management method for TSN switch
CN115460130A (en) * 2022-09-20 2022-12-09 重庆邮电大学 A Multipath Joint Scheduling Method in Time Sensitive Network
CN115883438A (en) * 2022-11-16 2023-03-31 重庆邮电大学 Routing and scheduling method and device of time trigger flow in time-sensitive network and readable storage medium
CN115834511A (en) * 2022-11-28 2023-03-21 电子科技大学 Gating scheduling method for periodic messages of each priority in time-sensitive network
CN116366550A (en) * 2023-03-03 2023-06-30 重庆邮电大学 End-to-end low-delay scheduling method for time trigger stream of time sensitive network
CN116192651A (en) * 2023-03-06 2023-05-30 重庆邮电大学 A Time Sensitive Network Scheduling Method Based on Bandwidth Reservation
CN117278487A (en) * 2023-10-23 2023-12-22 北京航空航天大学 Traffic scheduling method for avionics system based on time-sensitive network Qbv protocol

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
Ying Wang ; Yufan Cheng ; Zhihan Zhuang ; Junye Zhang ; Peng Yu ; Shaoyong Guo ; Xuesong Qiu.Joint Routing and GCL Scheduling Algorithm Based on Tabu Search in TSN.《2023 19th International Conference on Network and Service Management (CNSM)》.2023,全文. *
基于时间敏感网络的芯片架构和应用;左卫松;;集成电路应用;20200609(第06期);全文 *
无线mesh网中时延约束抖动优化的多路径流量分配算法;陈志刚;曾锋;李庆华;;通信学报;20110125(第01期);全文 *

Also Published As

Publication number Publication date
CN117596200A (en) 2024-02-23

Similar Documents

Publication Publication Date Title
Ding Communication systems
JP6032824B2 (en) Scheduling method, end node and core network switch in packet switched communication network
JP7667879B2 (en) Packet transmission method and packet transmission device
CN110870285B (en) Method for high-performance data transmission in a data network with partial real-time requirements and device for executing the method
WO2019214561A1 (en) Packet sending method, network node, and system
CN115242728B (en) Message transmission method and device
Yang et al. Deterministic networking (detnet) vs time sensitive networking (tsn)
CN101466158B (en) Communication method in network including primary network and secondary network
US12267248B2 (en) Network infrastructure device, communication terminal and method for synchronizing control applications via a communication network for transferring time-critical data
WO2023015644A1 (en) Planning method and system architecture for scheduling of chained service flow
CN107070815B (en) Method and device for queuing delay control of synchronization message in SDN network
Liu et al. Design of an improved Ethernet AVB model for real-time communication in in-vehicle network
CN111698787B (en) Scheduling rule determining method and device
JP6152425B2 (en) Real-time message transmission method and computer network for transmitting real-time messages
CN117596200B (en) A time-sensitive network routing scheduling method, electronic device, and medium
CN114501544A (en) A data transmission method, device and storage medium
CN115396378B (en) Cross-domain collaborative delay sensitive network scheduling method and system based on time slot mapping
Cavalieri Modelling and analysing congestion in KNXnet/IP
CN106603364A (en) Ethernet communication method for real-time transmission
WO2023207628A1 (en) Packet transmission method and packet forwarding device
KR20070061199A (en) End-to-end Frame Forwarding Method Using Virtual Synchronization in Local Area Networks and Its Network Components
CN115208837A (en) Message scheduling method and system
US20120307834A1 (en) Synchronous Network Switch
Duque et al. On the features of Software Defined Networking for the QoS provision in data networks
CN115834508B (en) A method for determining a message period and a related device thereof

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
GR01 Patent grant
GR01 Patent grant