WO2022222242A1 - 一种时间敏感网络报文转发方法、装置、终端及存储介质 - Google Patents

一种时间敏感网络报文转发方法、装置、终端及存储介质 Download PDF

Info

Publication number
WO2022222242A1
WO2022222242A1 PCT/CN2021/099189 CN2021099189W WO2022222242A1 WO 2022222242 A1 WO2022222242 A1 WO 2022222242A1 CN 2021099189 W CN2021099189 W CN 2021099189W WO 2022222242 A1 WO2022222242 A1 WO 2022222242A1
Authority
WO
WIPO (PCT)
Prior art keywords
time
message
forwarded
queue
real
Prior art date
Application number
PCT/CN2021/099189
Other languages
English (en)
French (fr)
Inventor
黄勇
李伟超
成剑
詹双平
冯景斌
汪漪
Original Assignee
鹏城实验室
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 鹏城实验室 filed Critical 鹏城实验室
Publication of WO2022222242A1 publication Critical patent/WO2022222242A1/zh

Links

Images

Classifications

    • 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
    • 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/2416Real-time traffic

Definitions

  • the present invention relates to the technical field of time-sensitive networks, in particular to a time-sensitive network message forwarding method, device, terminal and storage medium.
  • TSN Time-Sensitive Networking, time-sensitive network
  • TAS time-aware shaping.
  • the TAS time-aware scheduler divides data traffic into different types, allocates specific time slots for time-sensitive critical data, and at a specified time node, all nodes in the network It is necessary to give priority to ensuring the passage of important data frames.
  • TAS realizes precise time scheduling through the gated queue GCL (Gate Control List). Based on the realization idea of GCL control, for a low-latency guaranteed service, it is necessary to target the service flow in advance.
  • GCL Gate Control List
  • the data transmission cycle and the size of the data stream to be sent determine the time and duration of the gate that needs to be opened for the business along the way. This can be planned by using a network-wide visible controller.
  • the controller needs a complex algorithm to ensure that all services generate GCL gating information at the exits of all network nodes along the way.
  • this kind of centralized calculation of the GCL of each network outlet needs to master the requirements of all service flows in advance, and then centrally calculate and solve. The effect of dynamically adding/removing streams is required.
  • the present invention provides a time-sensitive network message forwarding method, device, terminal and storage medium, aiming to solve the problem that the GCL-based control in the prior art cannot satisfy dynamic addition/deletion of flows.
  • a first aspect of the present invention provides a time-sensitive network packet forwarding method, the method comprising:
  • Receive the message to be forwarded determine the target service flow corresponding to the message to be forwarded, and obtain the number of bytes of the message sent by the target service flow and the committed service rate of the target service flow;
  • each round the messages in each real-time queue are sequentially read, and the reading time of each real-time queue does not exceed a preset time period. If the remaining read time of the real-time queue to which it belongs is greater than the sending time of the to-be-forwarded message and the number of sending rounds of the to-be-forwarded message is not greater than the current number of rounds, the to-be-forwarded message is sent.
  • Real-time queue including:
  • the first preset formula is:
  • the second preset formula is:
  • r is the number of the sending rounds
  • q is the sequence number of the real-time queue to which it belongs
  • R is the current round number
  • len is the number of bytes of the message sent by the target service flow
  • size is the message to be forwarded
  • u is the preset time period
  • v is the committed service rate of the target service flow
  • r 0 is the initial round number of the target service flow
  • N q is the number of real-time queues
  • q 0 is the initial queue sequence number of the target service flow
  • "/" represents the quotient of integer division
  • "%" represents the remainder of integer division.
  • the method for forwarding time-sensitive network packets wherein the number of sending rounds and the ownership of the packet to be forwarded are determined according to the number of bytes of the packet to be forwarded and the number of bytes of the packet that has been sent.
  • the live queue including:
  • the initial queue of the target service flow is determined according to the queue being read when the first packet of the target service flow is received.
  • the time-sensitive network packet forwarding method wherein adding the to-be-forwarded packet to the belonging real-time queue includes:
  • the message to be forwarded is discarded.
  • the method for forwarding time-sensitive network packets wherein after reading the to-be-forwarded packets in the real-time queue to which they belong, the method further includes:
  • the message to be forwarded is placed at the end of the real-time queue to which it belongs;
  • the packet in the next queue of the belonging real-time queue is read.
  • the time-sensitive network packet forwarding method wherein the placing the to-be-forwarded packet at the end of the real-time queue to which it belongs includes:
  • the to-be-forwarded packet is placed at the end of the belonging real-time queue.
  • the step of sequentially reading the packets in each real-time queue in each round includes:
  • the BE queue includes packets of BE service flows.
  • a second aspect of the present invention provides a time-sensitive network message forwarding device, comprising:
  • a receiving module configured to receive the message to be forwarded, determine the target service flow corresponding to the message to be forwarded, and obtain the number of bytes of the message sent by the target service flow and the commitment of the target service flow service rate;
  • a determination module configured to determine the number of sending rounds and the real-time queue to which the message to be forwarded belongs according to the number of bytes of the message to be forwarded and the number of bytes of the message to be sent, The message to be forwarded is added to the real-time queue to which it belongs;
  • a scheduling module which is used to sequentially read the messages in each real-time queue in each round, and the reading time of each real-time queue does not exceed a preset time period.
  • a third aspect of the present invention provides a terminal, the terminal includes a processor and a computer-readable storage medium communicatively connected to the processor, the computer-readable storage medium is suitable for storing a plurality of instructions, the processor is suitable for invoking the instructions in the computer-readable storage medium to execute the steps of implementing the time-sensitive network packet forwarding method described in any one of the above.
  • a fourth aspect of the present invention provides a computer-readable storage medium, where the computer-readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to achieve Steps of the time-sensitive network packet forwarding method described in any one of the above.
  • the present invention provides a time-sensitive network message forwarding method, device, terminal and storage medium.
  • a time-sensitive network message forwarding method a plurality of real-time queues are set up, and in each round Read the packets in each real-time queue, and after receiving the packets to be forwarded, determine the number of rounds and real-time of the packets to be forwarded according to the number of sent bytes and the committed service rate of the target service flow corresponding to the packets to be forwarded.
  • the to-be-forwarded message does not need to set gating information, and can support dynamic addition/deletion of service flows in the time-sensitive network.
  • FIG. 1 is a flowchart of an embodiment of a time-sensitive network packet forwarding method provided by the present invention
  • FIG. 2 is a schematic diagram of reading information of a target service flow in an embodiment of a time-sensitive network packet forwarding method provided by the present invention
  • FIG. 3 is a schematic diagram of the flow of a message in a network node in an embodiment of a time-sensitive network message forwarding method provided by the present invention
  • FIG. 4 is a logical block diagram when reading a message in a queue in an embodiment of a time-sensitive network message forwarding method provided by the present invention
  • FIG. 5 is a schematic structural diagram of an embodiment of a time-sensitive network message forwarding device provided by the present invention.
  • FIG. 6 is a schematic diagram of the principle of an embodiment of a terminal provided by the present invention.
  • the time-sensitive network message forwarding method provided by the present invention can be executed by any network node in the time-sensitive network.
  • an embodiment of the time-sensitive network packet forwarding method includes the steps:
  • S100 Receive a message to be forwarded, determine a target service flow corresponding to the message to be forwarded, and obtain the number of bytes of the message sent by the target service flow and a committed service rate of the target service flow.
  • the node After receiving the message to be forwarded, the node determines the target service flow corresponding to the message to be forwarded.
  • the target service flow is a real-time service flow, that is, a flow with forwarding delay requirements.
  • search for the number of bytes of the packets sent by the service flow of the to-be-forwarded packet and the committed service rate of the target service flow specifically, search for the number of bytes of the packets sent by the target service flow and all
  • the promised service rate of the target service flow can be achieved through the flow information table.
  • the flow information table records the information of all real-time flows in the current network, as shown in Figure 2, which can be established by using the 2-left hash algorithm. Index table, and then look up the flow information table from the index table.
  • the 2-left hash index table includes two equal-sized hash tables, which are called A table and B table respectively.
  • Each hash function hashes the f-key to the two index positions of table A and table B, and each index position establishes M hash buckets, and each hash bucket stores a compressed value ckey corresponding to the f-key and a pointer to The index index of the information table is reserved.
  • the two index positions are total, and the position that occupies less hash bucket is selected. If the two index positions occupy the same, the f-key is always stored in the A table.
  • the to-be-forwarded packet is not a real-time service flow packet, it indicates that the to-be-forwarded packet is a BE (Best Effort, best effort) service flow packet, and the to-be-forwarded packet is directly sent to the BE queue .
  • BE Best Effort, best effort
  • S200 Determine the number of sending rounds and the real-time queue to which the message to be forwarded belongs according to the number of bytes of the message to be forwarded and the number of bytes of the message to be sent, and add the message to be forwarded to all The real-time queue to which the description belongs.
  • multiple real-time queues (such as Q1, Q2, and Q3 in Figure 3) are set in the node, and the message of each real-time service flow will be added to one of the real-time queues, and the node periodically reads
  • the messages in each real-time queue are read in turn in each round and the number of rounds is recorded. After each round, the number of rounds is incremented by one, according to the number of sent rounds and the current round number of the read message. Determines whether the message currently needs to be sent.
  • the number of rounds of sending the message to be forwarded in this embodiment is not the number of rounds when the message to be forwarded is actually sent, but an expected value, which is related to the actual number of times the message to be forwarded is sent.
  • the number of rounds when sending may not be consistent, which will be explained in detail later.
  • determining the number of sending rounds and the real-time queue to which the message to be forwarded belongs according to the number of bytes of the message to be forwarded and the number of bytes of the sent message includes:
  • the first preset formula is:
  • the second preset formula is:
  • r is the number of the sending rounds
  • q is the sequence number of the real-time queue to which it belongs
  • R is the current round number
  • len is the number of bytes of the message sent by the target service flow
  • size is the message to be forwarded
  • u is the preset time period
  • v is the committed service rate of the target service flow
  • r 0 is the initial round number of the target service flow
  • N q is the number of real-time queues
  • q 0 is the initial queue sequence number of the target service flow
  • "/" represents the quotient of integer division
  • "%" represents the remainder of integer division.
  • the initial queue sequence number of the target service flow and the initial round number of the target service flow are the number of sending rounds and the real-time queue to which the first packet of the target service flow belongs.
  • the steps include:
  • the initial queue of the target service flow is determined according to the queue being read when the first packet of the target service flow is received.
  • the first message of the target service flow is the message of the target service flow received by the node for the first time.
  • the node receives the first message of the target service flow
  • the current round number is used as the target service.
  • the initial round number of the flow is r 0 .
  • the queue being read may be used as the initial queue of the target service flow.
  • based on the The initial queue of the target service flow is determined on the principle that the first packet of the target service flow can be forwarded as soon as possible, that is, the first packet of the target service flow is determined to be added when the first packet of the target service flow is received.
  • the queue being read can be sent in the current read cycle of the queue being read, specifically, according to the read time of the queue being read, the byte length of the first packet of the target service flow to determine, if so, add the first message of the target service flow to the queue currently being read, that is, the queue currently being read is used as the initial queue q 0 of the target service flow, if not, add the The first packet of the target service flow is added to the next queue of the reading queue, that is, the next queue of the reading queue is taken as the initial queue q 0 of the target service flow.
  • the message to be forwarded is added to the real-time queue to which it belongs.
  • adding the message to be forwarded to the real-time queue to which it belongs includes:
  • the message to be forwarded is discarded.
  • the preset threshold may be determined according to the size of the RAM space available for packet forwarding in the node, and may take a value between 3 and 8, for example.
  • the method for forwarding time-sensitive network packets further includes the steps:
  • sequence number of the step of sequentially reading the messages in each real-time queue in each round described in this description is after the step sequence number of the message to be forwarded is received, in the present invention, The step of sequentially reading the messages in each real-time queue in each round is not limited to be performed after receiving the to-be-forwarded message, but is repeated when the node starts to execute the time-sensitive network message provided by this embodiment. implement.
  • the node periodically reads the messages in each real-time queue in turn, as shown in Figure 3, assuming that three real-time queues Q1, Q2 and Q3 are set up in the node, then in each round, the queue Q1 is read first Then read the message in Q2 and the message in Q3, each time the reading time of each queue does not exceed the preset time period, complete one round, and then start a new round, each completion Add one to the number of rounds after a round.
  • the to-be-forwarded packet When reading the belonging real-time queue, when reading the to-be-forwarded packet, if the remaining reading time of the belonging real-time queue is greater than the sending time of the to-be-forwarded packet, then determine the to-be-forwarded packet Whether the number of rounds for sending the message is greater than the current number of rounds, if not, the message to be forwarded is sent. Obtaining the number of sending rounds of the message in the queue may be adding the number of sending rounds r of the message to the header of the message when adding the message to the queue, so that the sending round of the message can be obtained when the message is read. number.
  • the timing starts, and the total reading time of the real-time queue to which it belongs each time does not exceed a preset time period, that is, the remaining reading time of the real-time queue to which it belongs is:
  • the preset time period is subtracted from the reading time of the real-time queue to which it belongs this time. Assuming that the current time is t, the time when the real-time queue to be read in this round starts to be read is t0.
  • the preset time period is T, then the remaining reading time of the belonging real-time queue is T-(t0-t).
  • the time-sensitive network packet forwarding method provided in this embodiment can independently schedule each service flow, and the packet forwarding time of each flow is scheduled according to the promised rate of the flow. Yes, it can cover a wide range of flow rates, and for flows exceeding the promised rate, it can be shaped in time. And even if there is only one flow on the link, the packet forwarding will not exceed the maximum committed rate of the flow. In this way, the flow packets will not be transmitted faster on the link due to more sufficient bandwidth, thus squeezing the bandwidth. -working conserving (bandwidth protection during non-working hours).
  • the time-sensitive network packet forwarding method provided in this embodiment can be independently executed by each node in the time-sensitive network. In this way, each node determines the packet based on the committed rate of the service flow and the number of sent packet bytes. The sequence of message forwarding will prevent the continuous accumulation of jitter along the way.
  • the message to be forwarded is placed at the end of the real-time queue to which it belongs;
  • the packet in the next queue of the belonging real-time queue is read.
  • the packets in the queue whose number of sending rounds is greater than the current number of rounds are rewound to the end of the queue.
  • the reading of the packets in the queue is continuous. Therefore, when the packets wrap around to the end of the queue, if the corresponding settings are not performed, the packets will be read and judged repeatedly, wasting resources. , therefore, in this embodiment, an isolation label is set, and specifically, placing the to-be-forwarded packet at the end of the real-time queue to which it belongs includes:
  • the to-be-forwarded packet is placed at the end of the belonging real-time queue.
  • isolation tag there is only one isolation tag in a queue at most. As long as the isolation tag is read, it means that the packet behind the isolation tag has been read and it is judged that it does not need to be sent in this cycle. At this time, it can be read. Get the messages in the BE queue, specifically, read the messages in each real-time queue in turn in each round, including:
  • the BE queue includes packets of BE service flows.
  • the node For each real-time queue, if the queue is empty, that is, there are currently no packets to be sent in the queue.
  • the isolation tag When the isolation tag is read, the packets after the isolation tag are the ones that do not need to be sent in this cycle. Therefore, when the queue is empty or the isolation label is read from the queue, the node starts to read the packets in the BE queue.
  • this embodiment provides a time-sensitive network packet forwarding method. Multiple real-time queues are set up, and the packets in each real-time queue are sequentially read in each round. The number of sent bytes and the committed service rate of the target service flow corresponding to the message to be forwarded determine the number of rounds and the real-time queue to which the message to be forwarded belongs. If the remaining read time is greater than the sending time of the message to be forwarded and the number of sending rounds of the message to be forwarded is not greater than the current number of rounds, the message to be forwarded is sent without setting gating information, which can support time-sensitive networks Dynamic addition/deletion of business flows in .
  • Nonvolatile memory may include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
  • Volatile memory may include random access memory (RAM) or external cache memory.
  • RAM is available in various forms such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous chain Road (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
  • the present invention also provides a time-sensitive network packet forwarding device, as shown in FIG. 5 , the time-sensitive network packet forwarding device includes:
  • a receiving module configured to receive the message to be forwarded, determine the target service flow corresponding to the message to be forwarded, and obtain the number of bytes of the message sent by the target service flow and the commitment of the target service flow Service rate, as described in Embodiment 1;
  • a determination module configured to determine the number of sending rounds and the real-time queue to which the message to be forwarded belongs according to the number of bytes of the message to be forwarded and the number of bytes of the message to be sent, The message to be forwarded is added to the real-time queue to which it belongs, specifically as described in Embodiment 1;
  • a scheduling module which is used to sequentially read the messages in each real-time queue in each round, and the reading time of each real-time queue does not exceed a preset time period.
  • Sending the to-be-forwarded message is specifically as described in Embodiment 1.
  • the present invention also provides a terminal correspondingly.
  • the terminal includes a processor 10 and a memory 20 .
  • FIG. 6 only shows some components of the terminal, but it should be understood that it is not required to implement all the shown components, and more or less components may be implemented instead.
  • the memory 20 may be an internal storage unit of the terminal, such as a hard disk or a memory of the terminal. In other embodiments, the memory 20 may also be an external storage device of the terminal, such as a plug-in hard disk equipped on the terminal, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, flash memory card (Flash Card), etc. Further, the memory 20 may also include both an internal storage unit of the terminal and an external storage device. The memory 20 is used for storing application software and various types of data installed in the terminal. The memory 20 can also be used to temporarily store data that has been output or is to be output. In one embodiment, a time-sensitive network message forwarding program 30 is stored in the memory 20, and the time-sensitive network message forwarding program 30 can be executed by the processor 10, thereby implementing the time-sensitive network message forwarding method in the present application.
  • a time-sensitive network message forwarding program 30 is stored in the memory 20, and the time-sensitive network message forwarding program 30 can be executed by the processor
  • the processor 10 may be a central processing unit (Central Processing Unit, CPU), a microprocessor or other chips, for running the program code or processing data stored in the memory 20, such as executing all Describe the time-sensitive network packet forwarding method, etc.
  • CPU Central Processing Unit
  • microprocessor or other chips, for running the program code or processing data stored in the memory 20, such as executing all Describe the time-sensitive network packet forwarding method, etc.
  • Receive the message to be forwarded determine the target service flow corresponding to the message to be forwarded, and obtain the number of bytes of the message sent by the target service flow and the committed service rate of the target service flow;
  • each round the messages in each real-time queue are sequentially read, and the reading time of each real-time queue does not exceed a preset time period. If the remaining read time of the real-time queue to which it belongs is greater than the sending time of the to-be-forwarded message and the number of sending rounds of the to-be-forwarded message is not greater than the current number of rounds, the to-be-forwarded message is sent.
  • determining the number of sending rounds and the real-time queue to which the message to be forwarded belongs according to the number of bytes of the message to be forwarded and the number of bytes of the sent message, including:
  • the first preset formula is:
  • the second preset formula is:
  • r is the number of the sending rounds
  • q is the sequence number of the real-time queue to which it belongs
  • R is the current round number
  • len is the number of bytes of the message sent by the target service flow
  • size is the message to be forwarded
  • u is the preset time period
  • v is the committed service rate of the target service flow
  • r 0 is the initial round number of the target service flow
  • N q is the number of real-time queues
  • q 0 is the initial queue sequence number of the target service flow
  • "/" represents the quotient of integer division
  • "%" represents the remainder of integer division.
  • the steps include:
  • the initial queue of the target service flow is determined according to the queue being read when the first packet of the target service flow is received.
  • adding the to-be-forwarded message to the belonging real-time queue includes:
  • the message to be forwarded is discarded.
  • the method further includes:
  • the message to be forwarded is placed at the end of the real-time queue to which it belongs;
  • the packet in the next queue of the belonging real-time queue is read.
  • placing the to-be-forwarded message at the end of the real-time queue to which it belongs includes:
  • the to-be-forwarded packet is placed at the end of the belonging real-time queue.
  • the messages in each real-time queue are sequentially read, including:
  • the BE queue includes packets of BE service flows.
  • the present invention also provides a computer-readable storage medium, in which one or more programs are stored, and the one or more programs can be executed by one or more processors to implement the above-mentioned time-sensitive network message The steps of the forwarding method.

Landscapes

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

Abstract

本发明公开了一种时间敏感网络报文转发方法、装置、终端及存储介质,方法包括:接收待转发报文,确定待转发报文对应的目标业务流,获取目标业务流已发送报文的字节数和目标业务流的承诺服务速率;根据待转发报文的字节数和已发送报文的字节数确定待转发报文的发送轮数和所属实时队列,将待转发报文加入所属实时队列;在每一轮中依次读取各个实时队列中的报文,每次每个实时队列的读取时间不超过预设时间周期,当读取到所属实时队列中的待转发报文时,若所属实时队列的剩余读取时间大于待转发报文的发送时间且待转发报文的发送轮数不大于当前轮数,则发送待转发报文。本发明可以支持对时间敏感网络中的业务流的动态增加/删除。

Description

一种时间敏感网络报文转发方法、装置、终端及存储介质 技术领域
本发明涉及时间敏感网络技术领域,特别涉及一种时间敏感网络报文转发方法、装置、终端及存储介质。
背景技术
信息化技术带来工业自动化的深入变革,很多新的业务需要确定性的网络通信保证,如高质量音视频传输、远程医疗、无人机群控制等等,TSN(Time-Sensitive Networking,时间敏感网络)被广泛应用,实现TSN技术的关键是要保证业务数据流的低时延可靠传送。
TSN标准802.1Qbv提出TAS,即时间感知整形,TAS时间感知调度程序将数据流量划分为不同的类型,为时间敏感性关键数据分配特定的时间槽,并且在规定的时间节点,网络中的所有节点都必须优先确保重要数据帧的通过,TAS是通过门控队列GCL(Gate Control List)实现精确时间调度的,基于GCL控制的实现思想,针对一个低时延保证的业务,需要预先针对该业务流的数据发送周期与发送的数据流大小,为业务在沿途确定需要打开的门控时刻与时长。利用一个全网可视的控制器可以规划做到这一点,当有上千条以上的业务时,控制器需要一个复杂的算法来保证所有业务在沿途所有网络节点的出口产生GCL门控信息,但是这种集中计算各网络出口的GCL,需要预先掌握所有业务流的需求,然后集中计算求解,当需要新增一条业务流时,需要将所有业务流输入到算法中重新计算,不能满足现实中需要动态增加/删除流的效果。
因此,现有技术还有待改进和提高。
发明内容
针对现有技术的上述缺陷,本发明提供一种时间敏感网络报文转发方法、装置、终端及存储介质,旨在解决现有技术中基于GCL控制不能满足满足动态增加/删除流的问题。
为了解决上述技术问题,本发明所采用的技术方案如下:
本发明的第一方面,提供一种时间敏感网络报文转发方法,所述方法包括:
接收待转发报文,确定所述待转发报文对应的目标业务流,获取所述目标业务流已发送报文的字节数和所述目标业务流的承诺服务速率;
根据所述待转发报文的字节数和所述已发送报文的字节数确定所述待转发报文的发送轮数和所属实时队列,将所述待转发报文加入所述所属实时队列;
在每一轮中依次读取各个实时队列中的报文,每次每个实时队列的读取时间不超过预设时间周期,当读取到所述所属实时队列中的所述待转发报文时,若所述所属实时队列的剩余读取时间大于所述待转发报文的发送时间且所述待转发报文的发送轮数不大于当前轮数,则发送所述待转发报文。
所述的时间敏感网络报文转发方法,其中,所述根据所述待转发报文的字节数和所述已发送报文的字节数确定所述待转发报文的发送轮数和所属实时队列,包括:
当所述待转发报文不是所述目标业务流的首报文时,根据第一预设公式和第二预设公式确定所述发送轮数和所述所属实时队列;
其中,所述第一预设公式为:
Figure PCTCN2021099189-appb-000001
所述第二预设公式为:
Figure PCTCN2021099189-appb-000002
其中,r为所述发送轮数,q为所述所属实时队列的序号,R为当前轮数,len为所述目标业务流已发送报文的字节数,size为所述待转发报文的字节数,u为所述预设时间周期,v为所述目标业务流的承诺服务速率,r 0为所述目标业务流的初始轮数,N q为实时队列的个数,q 0为所述目标业务流的初始队列序号,“/”表示整除取商,“%”表示整除取余数。
所述的时间敏感网络报文转发方法,其中,所述根据所述待转发报文的字节数和所 述已发送报文的字节数确定所述待转发报文的发送轮数和所属实时队列之前,包括:
获取接收所述目标业务流的首报文时的轮数作为所述目标业务流的初始轮数;
根据接收所述目标业务流的首报文时正在读取的队列确定所述目标业务流的初始队列。
所述的时间敏感网络报文转发方法,其中,所述将所述待转发报文加入所述所属实时队列,包括:
当所述待转发报文的发送轮数与当前轮数的差值不大于于预设阈值时,将所述待转发报文加入所述所属实时队列;
当所述待转发报文的发送轮数与当前轮数的差值大于预设阈值时,丢弃所述待转发报文。
所述的时间敏感网络报文转发方法,其中,所述读取到所述所属实时队列中的所述待转发报文之后,还包括:
若所述待转发报文的发送轮数大于当前轮数,则将所述待转发报文置于所述所属实时队列的队尾;
若所述所属实时队列剩余的读取时间小于所述待转发报文的发送时间,则读取所述所属实时队列的下一个队列中的报文。
所述的时间敏感网络报文转发方法,其中,所述将所述待转发报文置于所述所属实时队列的队尾,包括:
当所述所属实时队列中存在隔离标签时,将所述待转发报文直接置于所述所属实时队列的队尾;
当所述所属实时队列中不存在隔离标签时,在所述所属实时队列插入隔离标签后再将所述待转发报文置于所述所属实时队列的队尾。
所述的时间敏感网络报文转发方法,其中,所述在每一轮中依次读取各个实时队列中的报文,包括:
在读取目标实时队列的报文时,若所述目标实时队列为空或读取到所述隔离标签,则读取BE队列中的报文;
当从所述BE队列中读取到的当前报文不能在所述目标实时队列剩余的读取时间内完成发送时,读取所述目标实时队列的下一个队列中的报文;
其中,所述BE队列中包括BE业务流的报文。
本发明的第二方面,提供一种时间敏感网络报文转发装置,包括:
接收模块,所述接收模块用于接收待转发报文,确定所述待转发报文对应的目标业务流,获取所述目标业务流已发送报文的字节数和所述目标业务流的承诺服务速率;
确定模块,所述确定模块用于根据所述待转发报文的字节数和所述已发送报文的字节数确定所述待转发报文的发送轮数和所属实时队列,将所述待转发报文加入所述所属实时队列;
调度模块,所述调度模块用于在每一轮中依次读取各个实时队列中的报文,每次每个实时队列的读取时间不超过预设时间周期,当读取到所述所属实时队列中的所述待转发报文时,若所述所属实时队列的剩余读取时间大于所述待转发报文的发送时间且所述待转发报文的发送轮数不大于当前轮数,则发送所述待转发报文。
本发明的第三方面,提供一种终端,所述终端包括处理器、与处理器通信连接的计算机可读存储介质,所述计算机可读存储介质适于存储多条指令,所述处理器适于调用所述计算机可读存储介质中的指令,以执行实现上述任一项所述的时间敏感网络报文转发方法的步骤。
本发明的第四方面,提供一种计算机可读存储介质,所述计算机可读存储介质存储有一个或者多个程序,所述一个或者多个程序可被一个或者多个处理器执行,以实现上述任一项所述的时间敏感网络报文转发方法的步骤。
与现有技术相比,本发明提供了一种时间敏感网络报文转发方法、装置、终端及存储介质,所述的时间敏感网络报文转发方法,设置多个实时队列,每一轮中依次读取各个实时队列中的报文,在接收到待转发报文后,根据待转发报文对应的目标业务流的已发送字节数和承诺服务速率确定待转发报文的轮数和所属实时队列,当读取到待转发报文时,若待转发报文所属实时队列的剩余读取时间大于待转发报文的发送时间且待转发报文的发送轮数不大于当前轮数,则发送所述待转发报文,不需要设置门控信息,可以 支持对时间敏感网络中的业务流的动态增加/删除。
附图说明
图1为本发明提供的时间敏感网络报文转发方法的实施例的流程图;
图2为本发明提供的时间敏感网络报文转发方法的实施例中读取目标业务流的信息的示意图;
图3为本发明提供的时间敏感网络报文转发方法的实施例中报文在网络节点内的流转示意图;
图4为本发明提供的时间敏感网络报文转发方法的实施例中读取队列中的报文时的逻辑框图;
图5为本发明提供的时间敏感网络报文转发装置的实施例的结构原理图;
图6为本发明提供的终端的实施例的原理示意图。
具体实施方式
为使本发明的目的、技术方案及效果更加清楚、明确,以下参照附图并举实施例对本发明进一步详细说明。应当理解,此处所描述的具体实施例仅用以解释本发明,并不用于限定本发明。
本发明提供的时间敏感网络报文转发方法,可以是由时间敏感网络中任一个网络节点执行。
实施例一
如图1所示,所述时间敏感网络报文转发方法的一个实施例中,包括步骤:
S100、接收待转发报文,确定所述待转发报文对应的目标业务流,获取所述目标业务流已发送报文的字节数和所述目标业务流的承诺服务速率。
当节点接收到待转发报文后,确定所述待转发报文对应的目标业务流,在本实施例中,目标业务流为实时业务流,即存在转发时延要求的流。随后查找所述待转发报文所述业务流已发送报文的字节数和所述目标业务流的承诺服务速率,具体地,查找所述目 标业务流已发送报文的字节数和所述目标业务流的承诺服务速率,可以是通过流信息表来实现,具体地,流信息表中记录当前网络中所有实时流的信息,如图2所示,可以采用2-left哈希算法建立索引表,从索引表再查找流信息表。2-left哈希索引表包括两个相等大小的哈希表,分别称为A表和B表,当接收到所述待转发报文后,提取报文的关键字即f-key,通过两个哈希函数分别将f-key哈希到表A和表B两个索引位置,每个索引位置建立M个哈希桶,每个哈希桶存放对应f-key的一个压缩值ckey及指向留信息表的索引index,当存贮一个f-key时,两个索引位置总,选择占用哈希桶少的位置,如果两个索引位置占用相同,则总是将f-key存在在A表,理论和经验表明,取哈希表大小A+B>1.5N,N为流的数量,即可得到很好的散列效果。考虑到仍可能出现两个索引位置完成占满的情况,设置一个很小的列表来应用极端的哈希冲突,一般这个小的列表大小可取N/20。对于需要单节点支持2K条业务流的情况,上述流信息表结构需要占用的空间大约为450B,每个报文只需要三次存贮访问,易于在硬件芯片中实现。当然,可以理解的是,这里只是举例说明了流信息表的实现方式,本领域技术人员可以选择其他的流信息表实现方式以使得在节点接收到待转发报文后能够查询到所述待转发报文对应的所述目标业务流的相关信息。
若所述待转发报文不是实时业务流的报文,说明所述待转发报文是BE(Best Effort,尽力而为)业务流的报文,直接将所述待转发报文送入BE队列。
S200、根据所述待转发报文的字节数和所述已发送报文的字节数确定所述待转发报文内的发送轮数和所属实时队列,将所述待转发报文加入所述所属实时队列。
在本实施例中,节点中设置多个实时队列(如图3中的Q1、Q2、Q3),每个实时业务流的报文会被加入至其中一个实时队列中,节点周期性地读取各个实时队列中的报文,每轮中依次读取各个实时队列中的报文并记录轮数,每轮结束后轮数加一,根据读取到的报文的发送轮数和当前轮数确定报文当前是否需要被发送。
值得说明的是,本实施例中所述待转发报文的发送轮数并不是所述待转发报文实际被发送时的轮数,而是一个期望值,与所述待转发报文的实际被发送时的轮数可能并不一致,这点将在后文被详细说明。
具体地,所述根据所述待转发报文的字节数和所述已发送报文的字节数确定所述待转发报文的发送轮数和所属实时队列,包括:
当所述待转发报文不是所述目标业务流的首报文时,根据第一预设公式和第二预设公式确定所述发送轮数和所述所属实时队列;
其中,所述第一预设公式为:
Figure PCTCN2021099189-appb-000003
所述第二预设公式为:
Figure PCTCN2021099189-appb-000004
其中,r为所述发送轮数,q为所述所属实时队列的序号,R为当前轮数,len为所述目标业务流已发送报文的字节数,size为所述待转发报文的字节数,u为所述预设时间周期,v为所述目标业务流的承诺服务速率,r 0为所述目标业务流的初始轮数,N q为实时队列的个数,q 0为所述目标业务流的初始队列序号,“/”表示整除取商,“%”表示整除取余数。
所述目标业务流的初始队列序号和所述目标业务流的初始轮数为所述目标业务流的首报文的发送轮数和所属实时队列。
所述根据所述待转发报文的字节数和所述已发送报文的字节数确定所述待转发报文的发送轮数和所属实时队列之前,包括:
获取接收所述目标业务流的首报文时的轮数作为所述目标业务流的初始轮数;
根据接收所述目标业务流的首报文时正在读取的队列确定所述目标业务流的初始队列。
所述目标业务流的首报文是节点第一次接收到的所述目标业务流的报文,当节点接收到所述目标业务流的首报文时,将当前轮数作为所述目标业务流的初始轮数即r 0,在确定所述目标业务流的初始队列时,可以是将正在读取的队列作为所述目标业务流的初始队列,在一种可能的实现方式中,基于所述目标业务流的首报文能够被尽快被转发的 原则确定所述目标业务流的初始队列,即,确定接收所述目标业务流的首报文时将所述目标业务流的首报文加入正在读取的队列是否可以实现在正在读取队列的当前读取周期中被发送,具体地,可以根据正在读取队列的已读取时间、所述目标业务流的首报文的字节长度来确定,若是,则将所述目标业务流的首报文加入当前正在读取的队列,即将当前正在读取的队列作为所述目标业务流的初始队列q 0,若否,则将所述目标业务流的首报文加入正在读取队列的下一个队列,即将正在读取的队列的下一个队列作为所述目标业务流的初始队列q 0
如图3所示,在确定了所述待转发报文的发送轮数和所属实时队列之后,将所述待转发报文加入所述所属实时队列。
在实际中,低时延的实时业务流的速率是波动的,存在突发,当所述目标业务流有超过容限的突发时,应丢弃突发的报文,因此,在本实施例中,所述将所述待转发报文加入所述所属实时队列,包括:
当所述待转发报文的发送轮数与当前轮数的差值不大于于预设阈值时,将所述待转发报文加入所述所属实时队列;
当所述待转发报文的发送轮数与当前轮数的差值大于预设阈值时,丢弃所述待转发报文。
即,在将所述待转发报文加入所述所属实时队列之前,计算所述待转发报文的发送轮数与当前轮数的差值:r-R,若差值大于预设阈值时,表明所述目标业务流存在超过容限的突发,丢弃所述待转发报文。所述预设阈值可以根据节点中可用于报文转发的RAM空间大小来决定,例如可以取3-8之间的值。
请再次参阅图1,本实施例提供的时间敏感网络报文转发方法还包括步骤:
S300、在每一轮中依次读取各个实时队列中的报文,每次每个实时队列的读取时间不超过预设时间周期,当读取到所述所属实时队列中的所述待转发报文时,若所述所属实时队列的剩余读取时间大于所述待转发报文的发送时间且所述待转发报文的发送轮数不大于当前轮数,则发送所述待转发报文。
值得说明的是,虽然在本说明中所述在每一轮中依次读取各个实时队列中的报文的 步骤的序号在接收到所述待转发报文的步骤序号之后,但是本发明中在每一轮中依次读取各个实时队列中的报文的步骤并不限定在接收到所述待转发报文之后进行,而是在节点开始执行本实施例提供的时间敏感网络报文时一直重复执行。
节点周期性地依次读取各个实时队列中的报文,如图3所示,假设节点中设置三个队列Q1、Q2和Q3三个实时队列,那么在每一轮中,先读取队列Q1中的报文,再读取Q2中的报文、Q3中的报文,每次每个队列的读取时间不超过预设时间周期,完成一轮,再开始新的一轮,每次完成一轮后轮数加一。所述预设时间周期基于时间敏感网络服务的最高速率业务选择或基于出口线路的链路带宽选择,比如,如果业务最高速率或出口线路带宽是10Gbps,考虑到每次读取队列时至少可以输出一个最长报文(1500字节),则所述预设时间周期为1500*8/10Gbps=1.2微秒。
在读取所述所属实时队列时,当读取到所述待转发报文时,若所述所属实时队列的剩余读取时间大于所述待转发报文的发送时间,那么确定所述待转发报文的发送轮数是否大于当前轮数,若不大于,那么发送所述待转发报文。获取队列中的报文的发送轮数可以是在将报文加入至队列时将报文的发送轮数r加入至报文的报头,从而可以在读取到报文时获取报文的发送轮数。当开始读取所述所属实时队列中的报文时开始计时,每次对所述所属实时队列的总读取时间不超过预设时间周期,即,所述所属实时队列的剩余读取时间为所述预设时间周期减去该次对所述所属实时队列已经进行了的读取时间,假设当前时刻为t,本轮中开始对所述所属实时队列进行读取的时刻为t0,所述预设时间周期为T,那么所述所属实时队列的剩余读取时间为T-(t0-t)。
在将所述待转发报文发送出去后,继续读取所述所属实时队列中的下一个报文,直至从所述所属实时队列中读取到的报文的发送时间大于所述所属实时队列的剩余读取时间或者所述所属实时队列的读取时间达到所述预设时间周期或者所述所属实时队列的报文为空或者读取到隔离标签,具体将在后文被说明。
从上面的说明不难看出,本实施例提供的时间敏感网络报文转发方法,可以做到对每个业务流的分别独立调度,并且每条流的报文转发时刻是根据流的承诺速率调度的,可以覆盖较广的流速范围,对于超出承诺速率的流,能够做到及时整形。并且即使链路 上只有一条流,报文转发也不会超过流最大承诺速率,这样,流报文不会因更充足的带宽而在链路上产生更快速传送从而挤压带宽,实现了non-working conserving(非工作时段带宽保护)。本实施例提供的时间敏感网络报文转发方法,可以由时间敏感网络中的各个节点分别独立执行,这样,每个节点均是根据业务流的承诺速率以及已发送的报文字节数确定报文转发的先后顺序,报文抓饭的沿路不会出现抖动的持续积累。
进一步地,在读取到所述待转发报文之后,还包括:
若所述待转发报文的发送轮数大于当前轮数,则将所述待转发报文置于所述所属实时队列的队尾;
若所述所属实时队列剩余的读取时间小于所述待转发报文的发送时间,则读取所述所属实时队列的下一个队列中的报文。
在本实施例中,为了增加对业务突发的适应,防止突发的业务报文被大量丢弃,将队列中发送轮数大于当前轮数的报文回绕到队列的队尾,而由于在不满足切换队列的情况下,对队列中的报文的读取是持续的,因此,当报文回绕到队尾后,如不进行相应设置,会导致报文被重复读取和判断,浪费资源,因此,在本实施例中,设置有隔离标签,具体地,所述将所述待转发报文置于所述所属实时队列的队尾,包括:
当所述所属实时队列中存在隔离标签时,将所述待转发报文直接置于所述所属实时队列的队尾;
当所述所属实时队列中不存在隔离标签时,在所述所属实时队列插入隔离标签后再将所述待转发报文置于所述所属实时队列的队尾。
在一个队列中最多只存在一个隔离标签,只要读取到隔离标签,说明隔离标签后的报文是已经被读取过并判断在本次周期内不需要被发送的报文,此时可以读取BE队列中的报文,具体地,所述在每一轮中依次读取各个实时队列中的报文,包括:
在读取目标实时队列的报文时,若所述目标实时队列为空或读取到所述隔离标签,则读取BE队列中的报文;
当从所述BE队列中读取到的当前报文不能在所述目标实时队列剩余的读取时间内完成发送时,读取所述目标实时队列的下一个队列中的报文;
其中,所述BE队列中包括BE业务流的报文。
对于每一个实时队列,若该队列为空,即当前该队列中没有待发送的报文,当读取到隔离标签时,隔离标签后的报文是在本次周期内不需要被发送的报文,因此当队列为空或从队列中读取到隔离标签时,则节点开始读取BE队列中的报文。
如图4所示,每次对队列中的报文进行读取的具体步骤可以总结如下:
1、当一个读取周期开始时,首先置插入标签允许标记F为1。插入标签允许标记F,用于控制在一个调度周期内,向一个队列只能插入1个隔离标签。每个队列都有一个对应的F标记。
2、从队列中读报文,同时获取报文的大小(size)及报文头的r值。
3、如果队列空,或者如果读到一个隔离标签,则执行4;否则执行5。
4、弹出隔离标签,并读取BE队列,转9。
5、判断当前报文是否可以在当前时间周期内发送完,是则执行6,否则执行9。
6、判断r是否大于R值,如果r不大于R,则发送报文,然后转2处理下一个报文;否则转7。
7、判断F是否=1,是则插入隔离标签到队尾,并置F=0,然后转8。如果F=0,则直接转8。
8、将报文回绕到队尾,然后转2处理下一个报文。
9、令Q=Q+1,如果Q是最后一个队列,则Q=0指向第1个队列。当完成一轮队列读取时,R=R+1。
10、等待本周期结束。本周期时间到后,会开始下一个队列的读取,重复上述1-10的流程。
综上所述,本实施例提供一种时间敏感网络报文转发方法,设置多个实时队列,每一轮中依次读取各个实时队列中的报文,在接收到待转发报文后,根据待转发报文对应的目标业务流的已发送字节数和承诺服务速率确定待转发报文的轮数和所属实时队列,当读取到待转发报文时,若待转发报文所属实时队列的剩余读取时间大于待转发报文的发送时间且待转发报文的发送轮数不大于当前轮数,则发送所述待转发报文,不需要设 置门控信息,可以支持对时间敏感网络中的业务流的动态增加/删除。
应该理解的是,虽然本发明说明书附图中给出的的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,流程图中的至少一部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些子步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一非易失性计算机可读取计算机可读存储介质中,该计算机程序在执行时,可包括如上述各方法的实施例的流程。其中,本发明所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。
实施例二
基于上述实施例,本发明还相应提供了一种时间敏感网络报文转发装置,如图5所示,所述时间敏感网络报文转发装置包括:
接收模块,所述接收模块用于接收待转发报文,确定所述待转发报文对应的目标业务流,获取所述目标业务流已发送报文的字节数和所述目标业务流的承诺服务速率,具体如实施例一中所述;
确定模块,所述确定模块用于根据所述待转发报文的字节数和所述已发送报文的字节数确定所述待转发报文的发送轮数和所属实时队列,将所述待转发报文加入所述所属实时队列,具体如实施例一中所述;
调度模块,所述调度模块用于在每一轮中依次读取各个实时队列中的报文,每次每个实时队列的读取时间不超过预设时间周期,当读取到所述所属实时队列中的所述待转发报文时,若所述所属实时队列的剩余读取时间大于所述待转发报文的发送时间且所述待转发报文的发送轮数不大于当前轮数,则发送所述待转发报文,具体如实施例一中所述。
实施例三
基于上述实施例,本发明还相应提供了一种终端,如图6所示,所述终端包括处理器10以及存储器20。图6仅示出了终端的部分组件,但是应理解的是,并不要求实施所有示出的组件,可以替代的实施更多或者更少的组件。
所述存储器20在一些实施例中可以是所述终端的内部存储单元,例如终端的硬盘或内存。所述存储器20在另一些实施例中也可以是所述终端的外部存储设备,例如所述终端上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。进一步地,所述存储器20还可以既包括所述终端的内部存储单元也包括外部存储设备。所述存储器20用于存储安装于所述终端的应用软件及各类数据。所述存储器20还可以用于暂时地存储已经输出或者将要输出的数据。在一实施例中,存储器20上存储有时间敏感网络报文转发程序30,该时间敏感网络报文转发程序30可被处理器10所执行,从而实现本申请中时间敏感网络报文转发方法。
所述处理器10在一些实施例中可以是一中央处理器(Central Processing Unit,CPU),微处理器或其他芯片,用于运行所述存储器20中存储的程序代码或处理数据,例如执行所述时间敏感网络报文转发方法等。
在一实施例中,当处理器10执行所述存储器20中时间敏感网络报文转发程序30时实现以下步骤:
接收待转发报文,确定所述待转发报文对应的目标业务流,获取所述目标业务流已发送报文的字节数和所述目标业务流的承诺服务速率;
根据所述待转发报文的字节数和所述已发送报文的字节数确定所述待转发报文的发送轮数和所属实时队列,将所述待转发报文加入所述所属实时队列;
在每一轮中依次读取各个实时队列中的报文,每次每个实时队列的读取时间不超过预设时间周期,当读取到所述所属实时队列中的所述待转发报文时,若所述所属实时队列的剩余读取时间大于所述待转发报文的发送时间且所述待转发报文的发送轮数不大于当前轮数,则发送所述待转发报文。
其中,所述根据所述待转发报文的字节数和所述已发送报文的字节数确定所述待转发报文的发送轮数和所属实时队列,包括:
当所述待转发报文不是所述目标业务流的首报文时,根据第一预设公式和第二预设公式确定所述发送轮数和所述所属实时队列;
其中,所述第一预设公式为:
Figure PCTCN2021099189-appb-000005
所述第二预设公式为:
Figure PCTCN2021099189-appb-000006
其中,r为所述发送轮数,q为所述所属实时队列的序号,R为当前轮数,len为所述目标业务流已发送报文的字节数,size为所述待转发报文的字节数,u为所述预设时间周期,v为所述目标业务流的承诺服务速率,r 0为所述目标业务流的初始轮数,N q为实时队列的个数,q 0为所述目标业务流的初始队列序号,“/”表示整除取商,“%”表示整除取余数。
其中,所述根据所述待转发报文的字节数和所述已发送报文的字节数确定所述待转发报文的发送轮数和所属实时队列之前,包括:
获取接收所述目标业务流的首报文时的轮数作为所述目标业务流的初始轮数;
根据接收所述目标业务流的首报文时正在读取的队列确定所述目标业务流的初始队列。
其中,所述将所述待转发报文加入所述所属实时队列,包括:
当所述待转发报文的发送轮数与当前轮数的差值不大于于预设阈值时,将所述待转发报文加入所述所属实时队列;
当所述待转发报文的发送轮数与当前轮数的差值大于预设阈值时,丢弃所述待转发报文。
其中,所述读取到所述所属实时队列中的所述待转发报文之后,还包括:
若所述待转发报文的发送轮数大于当前轮数,则将所述待转发报文置于所述所属实时队列的队尾;
若所述所属实时队列剩余的读取时间小于所述待转发报文的发送时间,则读取所述所属实时队列的下一个队列中的报文。
其中,所述将所述待转发报文置于所述所属实时队列的队尾,包括:
当所述所属实时队列中存在隔离标签时,将所述待转发报文直接置于所述所属实时队列的队尾;
当所述所属实时队列中不存在隔离标签时,在所述所属实时队列插入隔离标签后再将所述待转发报文置于所述所属实时队列的队尾。
其中,所述在每一轮中依次读取各个实时队列中的报文,包括:
在读取目标实时队列的报文时,若所述目标实时队列为空或读取到所述隔离标签,则读取BE队列中的报文;
当从所述BE队列中读取到的当前报文不能在所述目标实时队列剩余的读取时间内完成发送时,读取所述目标实时队列的下一个队列中的报文;
其中,所述BE队列中包括BE业务流的报文。
实施例四
本发明还提供一种计算机可读存储介质,其中,存储有一个或者多个程序,所述一个或者多个程序可被一个或者多个处理器执行,以实现如上所述的时间敏感网络报文转发方法的步骤。
最后应说明的是:以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围。

Claims (10)

  1. 一种时间敏感网络报文转发方法,其特征在于,所述方法包括:
    接收待转发报文,确定所述待转发报文对应的目标业务流,获取所述目标业务流已发送报文的字节数和所述目标业务流的承诺服务速率;
    根据所述待转发报文的字节数和所述已发送报文的字节数确定所述待转发报文的发送轮数和所属实时队列,将所述待转发报文加入所述所属实时队列;
    在每一轮中依次读取各个实时队列中的报文,每次每个实时队列的读取时间不超过预设时间周期,当读取到所述所属实时队列中的所述待转发报文时,若所述所属实时队列的剩余读取时间大于所述待转发报文的发送时间且所述待转发报文的发送轮数不大于当前轮数,则发送所述待转发报文。
  2. 根据权利要求1所述的时间敏感网络报文转发方法,其特征在于,所述根据所述待转发报文的字节数和所述已发送报文的字节数确定所述待转发报文的发送轮数和所属实时队列,包括:
    当所述待转发报文不是所述目标业务流的首报文时,根据第一预设公式和第二预设公式确定所述发送轮数和所述所属实时队列;
    其中,所述第一预设公式为:
    Figure PCTCN2021099189-appb-100001
    所述第二预设公式为:
    Figure PCTCN2021099189-appb-100002
    其中,r为所述发送轮数,q为所述所属实时队列的序号,R为当前轮数,len为所述目标业务流已发送报文的字节数,size为所述待转发报文的字节数,u为所述预设时间周期,v为所述目标业务流的承诺服务速率,r 0为所述目标业务流的初始轮数,N q为实时队列的个数,q 0为所述目标业务流的初始队列序号,“/”表示整除取商,“%”表示整除取余数。
  3. 根据权利要求2所述的时间敏感网络报文转发方法,其特征在于,所述根据所 述待转发报文的字节数和所述已发送报文的字节数确定所述待转发报文的发送轮数和所属实时队列之前,包括:
    获取接收所述目标业务流的首报文时的轮数作为所述目标业务流的初始轮数;
    根据接收所述目标业务流的首报文时正在读取的队列确定所述目标业务流的初始队列。
  4. 根据权利要求1所述的时间敏感网络报文转发方法,其特征在于,所述将所述待转发报文加入所述所属实时队列,包括:
    当所述待转发报文的发送轮数与当前轮数的差值不大于于预设阈值时,将所述待转发报文加入所述所属实时队列;
    当所述待转发报文的发送轮数与当前轮数的差值大于预设阈值时,丢弃所述待转发报文。
  5. 根据权利要求1所述的时间敏感网络报文转发方法,其特征在于,所述读取到所述所属实时队列中的所述待转发报文之后,还包括:
    若所述待转发报文的发送轮数大于当前轮数,则将所述待转发报文置于所述所属实时队列的队尾;
    若所述所属实时队列剩余的读取时间小于所述待转发报文的发送时间,则读取所述所属实时队列的下一个队列中的报文。
  6. 根据权利要求5所述的时间敏感网络报文转发方法,其特征在于,所述将所述待转发报文置于所述所属实时队列的队尾,包括:
    当所述所属实时队列中存在隔离标签时,将所述待转发报文直接置于所述所属实时队列的队尾;
    当所述所属实时队列中不存在隔离标签时,在所述所属实时队列插入隔离标签后再将所述待转发报文置于所述所属实时队列的队尾。
  7. 根据权利要求6所述的时间敏感网络报文转发方法,其特征在于,所述在每一轮中依次读取各个实时队列中的报文,包括:
    在读取目标实时队列的报文时,若所述目标实时队列为空或读取到所述隔离标签, 则读取BE队列中的报文;
    当从所述BE队列中读取到的当前报文不能在所述目标实时队列剩余的读取时间内完成发送时,读取所述目标实时队列的下一个队列中的报文;
    其中,所述BE队列中包括BE业务流的报文。
  8. 一种时间敏感网络报文转发装置,其特征在于,包括:
    接收模块,所述接收模块用于接收待转发报文,确定所述待转发报文对应的目标业务流,获取所述目标业务流已发送报文的字节数和所述目标业务流的承诺服务速率;
    确定模块,所述确定模块用于根据所述待转发报文的字节数和所述已发送报文的字节数确定所述待转发报文的发送轮数和所属实时队列,将所述待转发报文加入所述所属实时队列;
    调度模块,所述调度模块用于在每一轮中依次读取各个实时队列中的报文,每次每个实时队列的读取时间不超过预设时间周期,当读取到所述所属实时队列中的所述待转发报文时,若所述所属实时队列的剩余读取时间大于所述待转发报文的发送时间且所述待转发报文的发送轮数不大于当前轮数,则发送所述待转发报文。
  9. 一种终端,其特征在于,所述终端包括:处理器、与处理器通信连接的计算机可读存储介质,所述计算机可读存储介质适于存储多条指令,所述处理器适于调用所述计算机可读存储介质中的指令,以执行实现上述权利要求1-7任一项所述的时间敏感网络报文转发方法的步骤。
  10. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有一个或者多个程序,所述一个或者多个程序可被一个或者多个处理器执行,以实现如权利要求1-7任一项所述的时间敏感网络报文转发方法的步骤。
PCT/CN2021/099189 2021-04-21 2021-06-09 一种时间敏感网络报文转发方法、装置、终端及存储介质 WO2022222242A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110429224.4A CN112995064B (zh) 2021-04-21 2021-04-21 一种时间敏感网络报文转发方法、装置、终端及存储介质
CN202110429224.4 2021-04-21

Publications (1)

Publication Number Publication Date
WO2022222242A1 true WO2022222242A1 (zh) 2022-10-27

Family

ID=76341505

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/099189 WO2022222242A1 (zh) 2021-04-21 2021-06-09 一种时间敏感网络报文转发方法、装置、终端及存储介质

Country Status (2)

Country Link
CN (1) CN112995064B (zh)
WO (1) WO2022222242A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117579577A (zh) * 2024-01-17 2024-02-20 北京智芯微电子科技有限公司 基于时间敏感网络的数据帧转发方法、装置及计算机设备

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115550237A (zh) * 2021-06-30 2022-12-30 华为技术有限公司 一种数据处理方法以及相关装置
WO2023123104A1 (zh) * 2021-12-29 2023-07-06 新华三技术有限公司 一种报文传输方法及网络设备

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019084970A1 (zh) * 2017-11-06 2019-05-09 华为技术有限公司 报文转发方法、转发设备和网络设备
WO2019157978A1 (zh) * 2018-02-14 2019-08-22 华为技术有限公司 调度报文的方法、第一网络设备及计算机可读存储介质
CN112449366A (zh) * 2019-08-30 2021-03-05 腾讯科技(深圳)有限公司 报文转发方法、装置、无线ap设备及存储介质
CN112491493A (zh) * 2020-11-23 2021-03-12 鹏城实验室 一种时间敏感网络时隙分配方法及报文转发方法

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101964745B (zh) * 2010-06-12 2012-06-27 福建星网锐捷网络有限公司 一种网络转发设备及其进行报文转发的方法
CN101964758A (zh) * 2010-11-05 2011-02-02 南京邮电大学 一种基于区分服务的队列调度方法
US10754816B2 (en) * 2018-12-21 2020-08-25 Intel Corporation Time sensitive networking device
EP3935795A1 (en) * 2019-03-29 2022-01-12 Huawei Technologies Co., Ltd. Switch device, control device and corresponding methods for enhanced schedulability and throughput on a tsn network
CN111327540A (zh) * 2020-02-25 2020-06-23 重庆邮电大学 一种工业时间敏感网络数据确定性调度方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019084970A1 (zh) * 2017-11-06 2019-05-09 华为技术有限公司 报文转发方法、转发设备和网络设备
WO2019157978A1 (zh) * 2018-02-14 2019-08-22 华为技术有限公司 调度报文的方法、第一网络设备及计算机可读存储介质
CN112449366A (zh) * 2019-08-30 2021-03-05 腾讯科技(深圳)有限公司 报文转发方法、装置、无线ap设备及存储介质
CN112491493A (zh) * 2020-11-23 2021-03-12 鹏城实验室 一种时间敏感网络时隙分配方法及报文转发方法

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
CAO, ZHIPENG ET AL.: "Enhanced System Design and Scheduling Strategy for Switches in Time-Sensitive Networking", IEEE ACCESS, vol. 9, 21 February 2021 (2021-02-21), XP011845843, DOI: 10.1109/ACCESS.2021.3061969 *
QUAN WEI; YAN JINLI; JIANG XUYAN; SUN ZHIGANG: "On-line Traffic Scheduling optimization in IEEE 802.1Qch based Time-Sensitive Networks", 2020 IEEE 22ND INTERNATIONAL CONFERENCE ON HIGH PERFORMANCE COMPUTING AND COMMUNICATIONS; IEEE 18TH INTERNATIONAL CONFERENCE ON SMART CITY; IEEE 6TH INTERNATIONAL CONFERENCE ON DATA SCIENCE AND SYSTEMS (HPCC/SMARTCITY/DSS), IEEE, 14 December 2020 (2020-12-14), pages 369 - 376, XP033906664, DOI: 10.1109/HPCC-SmartCity-DSS50907.2020.00045 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117579577A (zh) * 2024-01-17 2024-02-20 北京智芯微电子科技有限公司 基于时间敏感网络的数据帧转发方法、装置及计算机设备
CN117579577B (zh) * 2024-01-17 2024-05-28 北京智芯微电子科技有限公司 基于时间敏感网络的数据帧转发方法、装置及计算机设备

Also Published As

Publication number Publication date
CN112995064A (zh) 2021-06-18
CN112995064B (zh) 2021-07-27

Similar Documents

Publication Publication Date Title
WO2022222242A1 (zh) 一种时间敏感网络报文转发方法、装置、终端及存储介质
KR102317523B1 (ko) 패킷 제어 방법 및 네트워크 기기
TWI601395B (zh) 對網路中之資料框進行流量整形的方法及用於該方法之裝置及電腦程式產品
WO2022109986A1 (zh) 报文转发方法、装置以及电子设备
US8306045B2 (en) Packet forwarding apparatus and method for discarding packets
JP5953998B2 (ja) パケット処理装置およびパケット処理方法
US10367743B2 (en) Method for traffic management at network node, and network node in packet-switched network
CN113068263A (zh) 一种时间敏感网络时隙调度方法、终端及存储介质
CN111163058B (zh) Dpdk数据加密处理方法、装置和网络设备
WO2017161967A1 (zh) 包每秒流量监管方法、装置和计算机存储介质
JP2020507245A (ja) 通信信号フレームを送信する方法、エンティティ及びプログラム
WO2022193860A1 (zh) 数据传输方法、装置、电子设备及存储介质
US8717891B2 (en) Shaping apparatus and method
JP2022518631A (ja) パケット交換ネットワークにおいて通信エンティティのコンピューター手段によって実施される方法、並びにそのコンピュータープログラム及びコンピューター可読非一時的記録媒体、並びにパケット交換ネットワークの通信エンティティ
US9166804B2 (en) Packet transmission control device, packet transmission control method, and program
WO2020168563A1 (zh) 一种存储器的管理方法及装置
KR20120055946A (ko) 공평한 대역 할당 기반 패킷 스케줄링 방법 및 장치
CN115065646B (zh) 一种基于软硬件协同的报文定时发送方法及装置
US8705552B1 (en) Controlling latency variations in a packet node
CN117155874A (zh) 数据包发送方法、转发节点、发送端及存储介质
EP3223478A1 (en) Packet processing method and device, and storage medium
CN114338545A (zh) 流量整形方法及装置
CN112217740B (zh) 一种基于边缘计算网络的请求处理方法及装置
KR20240056380A (ko) 서비스 순서 보존형 전역 완료시간 기반 네트워크 지연시간 보장 시스템 및 방법
Andrews et al. Minimizing end-to-end delay in high-speed networks with a simple coordinated schedule

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21937467

Country of ref document: EP

Kind code of ref document: A1