WO2022134671A1 - 数据传输方法、电子设备和存储介质 - Google Patents

数据传输方法、电子设备和存储介质 Download PDF

Info

Publication number
WO2022134671A1
WO2022134671A1 PCT/CN2021/118536 CN2021118536W WO2022134671A1 WO 2022134671 A1 WO2022134671 A1 WO 2022134671A1 CN 2021118536 W CN2021118536 W CN 2021118536W WO 2022134671 A1 WO2022134671 A1 WO 2022134671A1
Authority
WO
WIPO (PCT)
Prior art keywords
period
label
forwarding
packet
information
Prior art date
Application number
PCT/CN2021/118536
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 中兴通讯股份有限公司
Priority to EP21908673.3A priority Critical patent/EP4250673A4/en
Priority to US18/257,924 priority patent/US20240048498A1/en
Publication of WO2022134671A1 publication Critical patent/WO2022134671A1/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/28Flow control; Congestion control in relation to timing considerations
    • 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/28Flow control; Congestion control in relation to timing considerations
    • H04L47/283Flow control; Congestion control in relation to timing considerations in response to processing delays, e.g. caused by jitter or round trip time [RTT]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • H04L47/56Queue scheduling implementing delay-aware scheduling

Definitions

  • the embodiments of the present application relate to the field of communications, and in particular, to a data transmission method, an electronic device, and a storage medium.
  • Deterministic Networking refers to the ability to provide deterministic service assurance for the carried services in a network domain. These deterministic service assurance capabilities include indicators such as delay, delay jitter, and packet loss rate.
  • the source device needs to add the time period label information of the upstream device to the packet, so that after receiving the packet, the forwarding device can
  • the time period label information of the upstream device and the outgoing interface number determined according to the address information carried in the packet look up the forwarding subperiod label information of the outgoing interface in the fixed mapping table of inbound interface labels and outgoing interface labels.
  • the time label information in the packet is replaced with the forwarding subperiod label information, and finally the replaced packet is forwarded from the corresponding outbound interface in the forwarding subperiod indicated by the forwarding subperiod label information.
  • the message in the original protocol does not contain time period label information. Therefore, adding time period label information to the message requires extending the protocol.
  • the message needs to be modified to replace the time label information in the original message with forwarding. Sub-period label information, the steps are more complicated and the resource consumption is more.
  • An embodiment of the present application provides a data transmission method, the method includes the following steps: receiving a packet sent by an upstream device, wherein the packet carries first information used to indicate an outgoing interface and a packet used to indicate the The second information of the period value; the receiving sub-period label is acquired according to the arrival time of the packet and the second information; the packet is sent according to the receiving sub-period label and the first information.
  • FIG. 1 is a flowchart of a data transmission method provided by a first embodiment of the present application
  • FIG. 5 is a flowchart of a data transmission method provided by a fourth embodiment of the present application.
  • FIG. 8 is a flowchart of a data transmission method provided by a sixth embodiment of the present application.
  • the main purpose of the embodiments of the present application is to provide a data transmission method, electronic device and storage medium, aiming at realizing data transmission in an asynchronous mode without extending the protocol or modifying the message.
  • the first embodiment of the present application relates to a data transmission method, which is applied to a forwarding device, as shown in FIG. 1 , and specifically includes:
  • Step 101 Receive a packet sent by an upstream device, where the packet carries first information for indicating an outbound interface and second information for indicating a period value.
  • the first information may also include other information included in the packets specified by the protocol that can be used to indicate the outgoing interface
  • the second information may also include other information that can be used The information included in the message specified by the protocol indicating the period value will not be repeated here.
  • Step 201 Determine the period value corresponding to the packet according to the second information.
  • T n is the period value obtained by executing step 201
  • x is the receiving sub-period label, which indicates the order of the receiving sub-periods used when receiving the message in the entire receiving period
  • the receiving period includes several receiving sub-periods
  • t start is The preset value can be the time corresponding to the local clock when the device is started
  • t arrive is the arrival time of the packet
  • m n is the number of receiving sub-cycles included in the receiving cycle determined according to T n
  • the square brackets in the formula are rounded symbol
  • the percent sign is the remainder symbol.
  • Step 103 Send a message according to the received sub-period label and the first information.
  • the forwarding subperiod label needs to be determined first according to the receiving subperiod label, then the forwarding subperiod is determined according to the forwarding subperiod label, and finally the packet is sent out from the outbound interface determined according to the first information in the forwarding subperiod.
  • the second embodiment of the present application relates to a data transmission method.
  • This embodiment is roughly the same as the first embodiment, except that a local period mapping table needs to be generated, as shown in FIG. 3 , which specifically includes:
  • Step 301 setting a period generation policy.
  • Step 304 in this embodiment is substantially the same as step 101 in the first embodiment, and details are not repeated here.
  • the second information in step 304 needs to be consistent with the second information used in the periodic generation strategy in step 301. If the periodic generation strategy is to obtain the periodic value according to the flow identification number, then in step 304, it is necessary to extract the information in the packet. The carried stream identification number is used as the second information.
  • Step 305 Acquire the receiving sub-period label according to the arrival time of the packet and the second information.
  • Step 305 in this embodiment is substantially the same as step 102 in the first embodiment, and details are not repeated here.
  • Step 306 Record the ingress interface used when the packet arrives.
  • Step 307 Determine the outgoing interface according to the first information.
  • Step 308 Search the forwarding subperiod label in the local period mapping table according to the forwarding subperiod label, the inbound interface, and the outbound interface.
  • steps 306 to 309 are further refinements of the step 103 in the first embodiment.
  • one or more period values can be generated according to the period generation policy, and correspondingly, more than one period value can be used, so that mapping and forwarding in a multi-period scenario can be supported. .
  • the third embodiment of the present application relates to a data transmission method. This embodiment is roughly the same as the first embodiment, except that simple calculation is used to obtain the forwarding sub-period label.
  • the specific process is shown in Figure 4:
  • Step 401 Receive a packet sent by an upstream device, where the packet carries first information for indicating an outbound interface and second information for indicating a period value.
  • Step 402 Acquire the receiving sub-period label according to the arrival time of the packet and the second information.
  • Step 402 in this embodiment is substantially the same as step 102 in the first embodiment, and details are not repeated here.
  • Step 403 Calculate the forwarding sub-period label according to the received sub-period label.
  • the forwarding subperiod label is calculated by the following formula:
  • router1 and router2 there are two forwarding devices in the network: router1 and router2; and four non-forwarding devices host1, host2, host3 and host4. And host1 and host3 are connected to interface 1 and interface 2 of router1 respectively, and host2 and host4 are connected to interface 2 and interface 3 of router2 respectively.
  • host1 is the source device of stream1
  • the priority is 2
  • host2 is the destination device of stream1.
  • the packet stream1 sent by host1 reaches host2 through router1 and router2.
  • Host3 acts as the source sender of stream2, and the priority is 3.
  • Host4 is the destination receiver of stream2.
  • the packet stream2 sent by host3 reaches host4 through router1 and router2.
  • Step 503 router1 and router2 respectively generate a local period mapping table according to the period value.
  • Step 504 router1 receives the packet sent by host1 and records the arrival time of the packet and the ingress interface used.
  • the priority carried by the packet is 2, the period used is 10us, the first information is the IP address of host2, and the outgoing interface is interface 3 of router1.
  • Step 506 router1 calculates the receiving sub-cycle label of router 1 according to the arrival time of the packet and the corresponding number of sub-cycles.
  • Step 507 router1 searches the forwarding subperiod in the local period mapping table of router1 according to the receiving subperiod label of router1 and the inbound interface and the outbound interface.
  • steps 504 to 506 it is determined that the subperiod label is 3, the inbound interface is interface 1 of router1, and the outbound interface is interface 3 of router1, then through the query of Table 1, it can be known that the forwarding subperiod label is 9.
  • router1 sends packets to router2 through interface 3 in the ninth forwarding subcycle.
  • router2 receives a packet sent by router1 from interface 3 and in the ninth subperiod of a period with a period value of 10us.
  • the recorded receiving time is 185us, and the inbound interface used is interface 1 of router2.
  • Step 510 router 2 determines the period value to be used according to the priority carried in the message and determines the outbound interface according to the first information carried in the message.
  • the priority carried by the packet is 2, the period used is 10us, the first information is the IP address of host2, and the outgoing interface is interface 2 of router2.
  • Step 511 router2 calculates the receiving subcycle label of router2 according to the arrival time of the packet and the corresponding number of subcycles.
  • the preset initial time of router2 startup is 0us
  • the receiving sub-period label of router2 is: Then, in this embodiment, the receiving cycle label of the packet reaching interface 1 of router 2 is 3.
  • Step 512 router2 searches the forwarding subperiod in the local period mapping table of router2 according to the received subperiod label, the inbound interface, and the outbound interface.
  • step 509-step 511 is executed to obtain that the receiving subperiod label is 7, the inbound interface is interface 1 of router2, and the outbound interface is interface 2 of router2, then through the query of Table 2, it can be known that the forwarding subperiod label is 10.
  • Step 513 router2 sends a packet to host2 according to the forwarding subperiod label of router2 and the outgoing interface.
  • router2 sends a packet to host2 through interface 2 in the 10th forwarding subcycle, so that host2 can receive and use the packet.
  • the received packet after receiving the packet sent by the upstream device without adding the time period label information of the upstream device, the received packet can be obtained according to the arrival time of the packet and the priority used to indicate the period value carried in the packet. Subperiod label, and finally send the packet directly according to the receiving subperiod label and the destination IP address used to indicate the outgoing interface carried in the packet. Since the packet does not carry the time label information of the upstream device, it is only necessary to extract the packet. The priority and the arrival time of the message in the text calculate the receiving sub-period of the device to replace the time stamp information of the upstream device. Further, it is not necessary to perform corresponding processing on the time stamp information due to the change of the upstream device before forwarding to the downstream device. Update, so that data transmission can be performed in asynchronous mode without extending the protocol or modifying the message. At the same time, two cycle values can be generated according to the actual situation, so that multi-cycle map forwarding can be supported.
  • the second information As shown in FIG. 7 , taking the second information as a hexatuple of data packets as an example, it specifically includes:
  • Step 701, router1 and router2 set the period generation policy to obtain the period value according to the six-tuple of the data packet.
  • Step 702 both router1 and router2 acquire two period values according to the period generation policy and determine the corresponding number of subperiods.
  • router1 and router2 there are two forwarding devices in the network: router1 and router2; and four non-forwarding devices host1, host2, host3 and host4. And host1 and host3 are connected to interface 1 and interface 2 of router1 respectively, and host2 and host4 are connected to interface 2 and interface 3 of router2 respectively.
  • host1 is the source device of stream1
  • the priority is 2
  • host2 is the destination device of stream1.
  • the packet stream1 sent by host1 reaches host2 through router1 and router2.
  • Host3 acts as the source sender of stream2, and the priority is 3.
  • Host4 is the destination receiver of stream2.
  • the packet stream2 sent by host3 reaches host4 through router1 and router2.
  • Step 704 router1 receives the packet sent by host3 and records the arrival time of the packet and the ingress interface used.
  • the period value used for determining the 6-tuple corresponding to the packet is 40us
  • the first information is the IP address of host4
  • the outgoing interface is router1 interface3.
  • steps 604 to 606 it is determined that the local subperiod label is 0, the inbound interface is interface 2 of router1, and the outbound interface is interface 3 of router1, then through the query of Table 3, it can be known that the forwarding subperiod label is is 1.
  • router1 sends a packet to router2 through interface 3 in the third forwarding subcycle.
  • Step 709 router2 receives the packet sent by router1 and records the arrival time of the packet and the ingress interface used.
  • Step 710 router 2 determines the period value to be used according to the six-tuple of the data packet corresponding to the message, and determines the outbound interface according to the first information carried in the message.
  • the used period value is 40us
  • the first information is the IP address of host4
  • the outgoing interface is interface 3 of router2.
  • Step 711 router2 calculates the receiving subcycle label of router2 according to the arrival time of the packet and the corresponding number of subcycles.
  • steps 709 to 11 it is determined that the local subperiod label is 0, the inbound interface is interface 1 of router2, and the outbound interface is interface 3 of router2, then through the query of Table 2, it can be known that the forwarding subperiod label is is 1.
  • Step 713 router2 sends a packet to host2 according to the forwarding subperiod label of router2 and the outgoing interface.
  • router2 sends a packet to host4 through outgoing interface 3 in the first forwarding sub-cycle for host4 to receive and use the packet.
  • the tuple after receiving a packet sent by an upstream device without adding the time period label information of the upstream device, it can be used according to the arrival time of the packet and the hexadecimal value of the data packet that is carried in the packet and used to indicate the period value.
  • the tuple obtains the receiving subperiod label, and finally sends the packet directly according to the receiving subperiod label and the destination IP address carried in the packet to indicate the outgoing interface. Since the packet does not carry the time label information of the upstream device, only It is necessary to calculate the receiving sub-period of the device by extracting the priority in the packet and the arrival time of the packet to replace the time label information of the upstream device.
  • the information is updated accordingly, so that data transmission can be performed in asynchronous mode without the need to extend the protocol or modify the message.
  • two cycle values can be generated according to the actual situation, so that multi-cycle map forwarding can be supported.
  • Step 801 Receive a packet sent by an upstream device, where the packet carries first information for indicating an outbound interface and a flow identification number for indicating a period value.
  • the flow identification number carried in the packet is 3.
  • Step 802 Determine the used period value, the number of forwarding subperiods, and the mapping strategy of the local period corresponding to the period value according to the flow ID.
  • the local cycle mapping policy is a mapping relationship pre-stored in the device.
  • the cycle value between the incoming interface 1 and the outgoing interface 2 is 25us and the cycle number is 8.
  • the mapping policy of the local period may also include other mapping relationships, which will not be repeated here.
  • Step 803 Acquire the receiving sub-period label according to the arrival time of the packet and the flow identification number.
  • the local sub-period label can be obtained according to the data obtained in the above steps:
  • the local period label of the packet reaching the inbound interface is 2.
  • Step 804 Acquire the forwarding sub-period label according to the mapping policy between the received sub-period label and the local period.
  • Step 805 Send a packet according to the forwarding subperiod label and the first information.
  • the packet is sent out through the outbound interface indicated by the first information in the third forwarding sub-period.
  • the seventh embodiment of the present application relates to an electronic device, as shown in FIG. 9 , comprising: at least one processor 901 ; and a memory 902 communicatively connected to the at least one processor 901 ; wherein the memory 902 stores data that can be accessed by Instructions executed by the at least one processor 901, the instructions are executed by the at least one processor 901, so that the at least one processor 901 can execute the data transmission method described in any of the above method embodiments.
  • the memory 902 and the processor 901 are connected by a bus, and the bus may include any number of interconnected buses and bridges, and the bus connects one or more processors 901 and various circuits of the memory 902 together.
  • the bus may also connect together various other circuits, such as peripherals, voltage regulators, and power management circuits, which are well known in the art and therefore will not be described further herein.
  • the bus interface provides the interface between the bus and the transceiver.
  • a transceiver may be a single element or multiple elements, such as multiple receivers and transmitters, providing a means for communicating with various other devices over a transmission medium.
  • the data processed by the processor 901 is transmitted on the wireless medium through the antenna, and further, the antenna also receives the data and transmits the data to the processor 901 .
  • Processor 901 is responsible for managing the bus and general processing, and may also provide various functions including timing, peripheral interface, voltage regulation, power management, and other control functions.
  • the memory 902 may be used to store data used by the processor 901 when performing operations.
  • the eighth embodiment of the present application relates to a computer-readable storage medium storing a computer program.
  • the above method embodiments are implemented when the computer program is executed by the processor.
  • the aforementioned storage medium includes: U disk, mobile hard disk, Read-Only Memory (ROM, Read-Only Memory), Random Access Memory (RAM, Random Access Memory), magnetic disk or optical disk and other media that can store program codes .

Landscapes

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

Abstract

本申请涉及通信领域,提出了一种数据传输方法、电子设备和存储介质,该方法包括:接收上游设备发送的报文,其中,所述报文携带用于指示出接口的第一信息和用于指示周期值的第二信息;根据所述报文的到达时间和所述第二信息获取接收子周期标签,其中,所述接收子周期标签用于指示接收所述报文时使用的接收子周期在整个接收周期中的次序,所述接收周期包含若干个所述接收子周期;根据所述接收子周期标签和所述第一信息发送所述报文。

Description

数据传输方法、电子设备和存储介质
交叉引用
本申请基于申请号为“202011550526.9”、申请日为2020年12月24日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此以引入方式并入本申请。
技术领域
本申请实施例涉及通信领域,特别涉及一种数据传输方法、电子设备和存储介质。
背景技术
确定性网络(Deterministic Networking,简称:DetNet)指在一个网络域内给承载的业务提供确定性业务保证的能力,这些确定性业务保证能力包括时延,时延抖动,丢包率等指标。为了保证异步模式中报文在端到端传输时的时延抖动,源设备需要在报文中添加上游设备的时间周期标签信息,从而转发设备在接收到报文后,能够根据报文携带的上游设备的时间周期标签信息和根据报文携带的地址信息确定的出接口号在入接口标签和出接口标签的固定映射关系表中查找出接口的转发子周期标签信息,接着转发设备在将原报文中的时间标签信息替换为转发子周期标签信息,最后再将替换后的报文在按照转发子周期标签信息指示的转发子周期从相应的出接口转发出去。
然而,原有的协议中报文不包含时间周期标签信息,因此在报文中添加时间周期标签信息就需要扩展协议,此外还需要修改报文,将原报文中的时间标签信息替换为转发子周期标签信息,步骤更加繁琐、资源消耗更多。
发明内容
本申请的实施例提供了一种数据传输方法,所述方法包括以下步骤:接收上游设备发送的报文,其中,所述报文携带用于指示出接口的第一信息和用于指示所述周期值的第二信息;根据所述报文的到达时间和所述第二信息获取接收子周期标签;根据所述接收子周期标签和所述第一信息发送所述报文。
本申请的实施例还提出了一种电子设备,所述设备包括:至少一个处理器;以及,与所述至少一个处理器通信连接的存储器;其中,所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行以上所述的数据传输方法。
本申请的实施例还提供了一种计算机可读存储介质,存储有计算机程序,所述计算机程序被处理器执行时实现以上所述的数据传输方法。
附图说明
图1是本申请第一实施例提供的数据传输方法的流程图;
图2是图1所示的本申请的第一实施例提供的数据传输方法中步骤102的流程图;
图3是本申请第二实施例提供的数据传输方法的流程图;
图4是本申请第三实施例提供的数据传输方法的流程图;
图5是本申请第四实施例提供的数据传输方法的流程图;
图6是本申请第四实施例提供的数据传输方法的应用场景;
图7是本申请第五实施例提供的数据传输方法的流程图;
图8是本申请第六实施例提供的数据传输方法的流程图;
图9是本申请第七实施例提供的电子设备的结构示意图。
具体实施方式
本申请的实施例的主要目的在于提出一种数据传输方法、电子设备和存储介质,旨在实现不需要扩展协议也不需要修改报文就能在异步模式中进行数据传输。
本申请的第一实施例涉及一种数据传输方法,应用在转发设备上,如图1所示,具体包括:
步骤101,接收上游设备发送的报文,其中,报文携带用于指示出接口的第一信息和用于指示周期值的第二信息。
在本实施例中,上游设备可以是发送报文的源设备,还可以是转发过程中的其他转发设备。第一信息包括目的IP地址、MAC等。第二信息包括流识别号、优先级或数据包的六元组等,其中,数据包的六元组中的元素可以包括源IP地址、目的IP地址、协议号、源端口、目的端口,服务类型和接口索引等,六元组是从上述元素中根据实际情况选择的六个元素组成的多元组。当然,以上仅为具体的举例说明,在实际的使用过程中第一信息还可以包括其他能够用于指示出接口的协议规定的报文所包括的信息,第二信息还可以包括其他的能够用于指示周期值的协议规定的报文所包括的信息,此处不一一赘述。
步骤102,根据报文的到达时间和第二信息获取接收子周期标签。
具体地说,如图2所示,步骤102具体包括以下步骤:
步骤201,根据第二信息确定报文对应的周期值。
步骤202,根据周期值和到达时间计算接收子周期标签。
在本实施例中,具体采用如下公式计算接收子周期标签:
Figure PCTCN2021118536-appb-000001
其中,T n为执行步骤201得到的周期值,x为接收子周期标签,表示接收报文时使用的接收子周期在整个接收周期中的次序,接收周期包含若干个接收子周期,t start为预设值,可以是设备启动时本地时钟对应的时刻,t arrive为报文的到达时间,m n为根据T n确定的接收周期包含的接收子周期的数量,公式中的中括号为取整符号,百分号为取余符号。
步骤103,根据接收子周期标签和第一信息发送报文。
在本实施例中,首先需要根据接收子周期标签确定转发子周期标签,然后根据转发子周期标签确定转发子周期,最后在转发子周期从根据第一信息确定的出接口将报文发送出去。
本申请的实施例,能够在接收到上游设备发送的未添加上游设备的时间周期标签信息的报文后,根据报文的到达时间和报文中携带的用于指示周期值的第二信息获取接收子周期标签,最后根据接收子周期标签和报文中携带的用于指示出接口的第一信息将报文直接发送出去,由于报文中不携带上游设备的时间标签信息,只需要通过提取报文中的第二信息和报文到达时间计算本设备的接收子周期以代替上游设备的时间标签信息,进一步地,不需要在转发给下游设备前由于上游设备的变化而对时间标签信息进行相应地更新,使得既不需要扩展 协议也不需要修改报文就能在异步模式下进行数据传输。
本申请的第二实施例涉及一种数据传输方法,本实施例与第一实施例大致相同,区别在于,还需要生成本地周期映射表,如图3所示,具体包括:
步骤301,设置周期生成策略。
在本实施例中,周期生成策略为根据第二信息获取周期值。由于第二信息可以是流识别号或数据包的六元组或优先级等,因此周期生成策略可以是根据流识别号获取周期值、根据数据包的六元组获取周期值或根据优先级获取周期值等。当然,以上仅为具体的举例说明,在实际的使用过程中周期生成策略还可以包括其他信息,此处不做一一赘述。
步骤302,根据周期生成策略获取至少一个周期值。
步骤303,根据周期值生成并保存本地周期映射表。
步骤304,接收上游设备发送的报文,其中,报文携带用于指示出接口的第一信息和用于指示周期值的第二信息。
本实施例中的步骤304与第一实施例中步骤101大致相同,此处就不一一赘述。
需要说明的是,步骤304中的第二信息需要和步骤301中周期生成策略使用的第二信息保持一致,如周期生成策略为根据流识别号获取周期值,那么步骤304中需要提取报文中携带的流识别号作为第二信息。
步骤305,根据报文的到达时间和第二信息获取接收子周期标签。
本实施例中的步骤305与第一实施例中步骤102大致相同,此处就不一一赘述。
步骤306,记录报文到达时使用的入接口。
步骤307,根据第一信息确定出接口。
步骤308,根据转发子周期标签、入接口、出接口在本地周期映射表中查找转发子周期标签。
步骤309,将报文在转发子周期标签指示的转发子周期中从出接口中发送出去。
需要说明的是,上述步骤306-步骤309是对第一实施例中的步骤103进一步的细化。
本实施例,由于能够在设置了周期生成策略的基础上,根据周期生成策略生成一个及以上的周期值,相应地可使用的周期值就可以超过一个,使得能够支持多周期场景下的映射转发。
本申请的第三实施例涉及一种数据传输方法,本实施例与第一实施例大致相同,区别在于,采用简单的计算获取转发子周期标签,具体流程如图4所示:
步骤401,接收上游设备发送的报文,其中,报文携带用于指示出接口的第一信息和用于指示周期值的第二信息。
本实施例中的步骤401与第一实施例中步骤101大致相同,此处就不一一赘述。
步骤402,根据报文的到达时间和第二信息获取接收子周期标签。
本实施例中的步骤402与第一实施例中步骤102大致相同,此处就不一一赘述。
步骤403,根据接收子周期标签计算转发子周期标签。
在本实施例中,转发子周期标签具体通过以下公式进行计算:
y=(x+i)%m n
其中,y为转发子周期标签,x执行步骤402得到的接收子周期标签,i为一个根据实际情况预设的自然数,m n为根据T n确定的接收周期包含的接收子周期的数量,T n是步骤402中 的周期信息确定的周期值。
步骤404,将报文在转发子周期标签指示的转发子周期中从第一信息指示的出接口中发送出去。
本实施例,由于只需要简单的计算就能够获取转发子周期标签并完成数据转发,而不需要获取本地周期映射表和查表,通过提供一种更加简单的方法获取转发子周期,提高了处理效率,还节约了存储空间。
为了使本领域技术人员能够更清楚地理解以上本申请第一至三实施例公开的数据传输方法整体流程,本申请第四至六实施例以具体的应用情景为例进行说明。
如图5所示,本申请的第四实施例提供的数据传输方法,应用在如图6所示的数据传输场景下,以第二信息为优先级为例进行说明,包括:
步骤501,router1和router2设置周期生成策略为根据优先级获取周期值。
步骤502,router1和router2都根据周期生成策略获取2个周期值并确定相应的子周期个数。
在本实施例中,由于如图6所示,网络中有两个转发设备:router1和router2;四个非转发的设备host1、host2、host3和host4。而且host1和host3分别与router1的接口1和接口2相连,host2和host4分别与router2的接口2和接口3相连。假设host1作为流stream1源设备,优先级为2,host2是流stream1目的设备,host1发出的报文stream1经过router1和router2到达host2。Host3作为流stream2源发送端,优先级为3,host4是流stream2目的接受端,host3发出的报文stream2经过router1和router2到达host4。因此为优先级2和3分别生成两个周期值:T1=10us和T2=20us,周期值10us对应的周期个数m1=12,周期值20us对应的周期个数m2=6。
步骤503,router1和router2根据周期值分别生成本地周期映射表。
在本实施例中,生成的router1和router2的本地周期映射表如下表所示:
表1 router1周期映射表
Figure PCTCN2021118536-appb-000002
Figure PCTCN2021118536-appb-000003
表2 router2周期映射表
Figure PCTCN2021118536-appb-000004
Figure PCTCN2021118536-appb-000005
步骤504,router1接收host1发送的报文并记录报文到达时刻、使用的入接口。
在本实施例中,host1发出的stream1源报文,router1接收报文并记录报文到达router1的接口1的时刻为145us。
步骤505,router1根据报文携带的优先级确定使用的周期值并根据报文携带的第一信息确定出接口。
在本实施例中,报文携带的优先级为2,则使用的周期值为10us,第一信息为host2的IP地址,则出接口为router1接口3。
步骤506,router1根据报文到达时间和相应的子周期个数计算router1的接收子周期标签。
在本实施例中,预先设置的router1启动的初始时刻为0us,那么router1的接收子周期标签为:
Figure PCTCN2021118536-appb-000006
那么本实施例中,报文达到入接口的接收子周期标签为3。
步骤507,router1根据router1的接收子周期标签和入接口和出接口在router1的本地周期映射表中查找转发子周期。
在本实施例中,根据步骤504-步骤506确定了子周期标签为3,入接口为router1的接口1,出接口为router1的接口3,那么通过对表1的查询可知,转发子周期标签为9。
步骤508,router1根据转发子周期标签和出接口向router2发送报文。
在本实施例中,router1通过接口3在第9个转发子周期向router2发送报文。
步骤509,router2接收router1发送的报文并记录报文到达时刻、使用的入接口。
在本实施例中,router2接收到router1从接口3且在周期值为10us的周期内的第9个子周期发送的报文,记录接收的时间为185us,使用的入接口是router2的接口1。
步骤510,router2根据报文携带的优先级确定使用的周期值并根据报文携带的第一信息确定出接口。
在本实施例中,报文携带的优先级为2,则使用的周期值为10us,第一信息为host2的IP地址,则出接口为router2的接口2。
步骤511,router2根据报文到达时间和相应的子周期个数计算router2的接收子周期标签。
在本实施例中,预先设置的router2启动的初始时刻为0us,那么router2的接收子周期标签为:
Figure PCTCN2021118536-appb-000007
那么本实施例中,报文达到router2的接口1的接收周期标签为3。
步骤512,router2根据接收子周期标签、入接口、和出接口在router2的本地周期映射 表中查找转发子周期。
在本实施例中,执行步骤509-步骤511得到接收子周期标签为7,入接口为router2的接口1,出接口为router2的接口2,那么通过对表2的查询可知,转发子周期标签为10。
步骤513,router2根据router2的转发子周期标签和出接口向host2发送报文。
在本实施例中,router2通过接口2在第10个转发子周期向host2发送报文,供host2接收并使用报文。
本申请的实施例,能够在接收到上游设备发送的未添加上游设备的时间周期标签信息的报文后,根据报文的到达时间和报文中携带的用于指示周期值的优先级获取接收子周期标签,最后根据接收子周期标签和报文中携带的用于指示出接口的目的IP地址将报文直接发送出去,由于报文中不携带上游设备的时间标签信息,只需要通过提取报文中的优先级和报文到达时间计算本设备的接收子周期以代替上游设备的时间标签信息,进一步地,不需要在转发给下游设备前由于上游设备的变化而对时间标签信息进行相应地更新,使得既不需要扩展协议也不需要修改报文就能在异步模式下进行数据传输。同时能够根据实际情况生成两个周期值,使得能够支持多周期映射转发。
本申请的第五实施例提供的数据传输方法,其应用场景参照图6,如图7所示,以第二信息为数据包的六元组为例,具体包括:
步骤701,router1和router2设置周期生成策略为根据数据包的六元组获取周期值。
步骤702,router1和router2都根据周期生成策略获取2个周期值并确定相应的子周期个数。
在本实施例中,由于如图6所示,网络中有两个转发设备:router1和router2;四个非转发的设备host1、host2、host3和host4。而且host1和host3分别与router1的接口1和接口2相连,host2和host4分别与router2的接口2和接口3相连。假设host1作为流stream1源设备,优先级为2,host2是流stream1目的设备,host1发出的报文stream1经过router1和router2到达host2。Host3作为流stream2源发送端,优先级为3,host4是流stream2目的接受端,host3发出的报文stream2经过router1和router2到达host4。因此为stream1六元组和stream2六元组分别生成对应周期为20us和40us,周期值20us对应的周期个数m1=4,周期值40us对应的周期个数m2=2。
步骤703,router1和router2根据周期值分别生成本地周期映射表。
在本实施例中,生成的router1和router2的本地周期映射表如下表所示:
表3 router1周期映射表
Figure PCTCN2021118536-appb-000008
Figure PCTCN2021118536-appb-000009
表4 router2周期映射表
Figure PCTCN2021118536-appb-000010
步骤704,router1接收host3发送的报文并记录报文到达时刻、使用的入接口。
在本实施例中,host3发出的stream2源报文,router1接收报文并记录报文到达router1的接口2的时刻为1045us。
步骤705,router1根据报文对应的数据包的六元组确定使用的周期值并根据报文携带的第一信息确定出接口。
在本实施例中,报文对应的六元组确定使用的周期值为40us,第一信息为host4的IP地址,则出接口为router1接口3。
步骤706,router1根据报文到达时间和相应的子周期个数计算router1的接收子周期标签。
在本实施例中,预先设置的router1的初始时刻为1000us,那么router1的接收子周期标签为:
Figure PCTCN2021118536-appb-000011
那么本实施例中,报文达到入接口的接收周期标签为3。
步骤707,router1根据router1的接收子周期标签、入接口和出接口在router1的本地周期映射表中查找转发子周期。
在本实施例中,根据步骤604-步骤606确定了本地子周期标签为0,入接口为router1的接口2,出接口为router1的接口3,那么通过对表3的查询可知,转发子周期标签为1。
步骤708,router1根据转发子周期标签和出接口向router2发送报文。
在本实施例中,router1通过接口3在第3个转发子周期向router2发送报文。
步骤709,router2接收router1发送的报文并记录报文到达时刻、使用的入接口。
在本实施例中,router2接收到router1从接口3且在周期值为10us的周期内的第3个子周期发送的报文,记录接收的时间为1125us,使用的入接口是router2的接口1。
步骤710,router2根据报文对应的数据包的六元组确定使用的周期值并根据报文携带的第一信息确定出接口。
在本实施例中,根据报文对应的数据包的六元组确定使用的周期值为40us,第一信息为host4的IP地址,则出接口为router2的接口3。
步骤711,router2根据报文到达时间和相应的子周期个数计算router2的接收子周期标签。
在本实施例中,预先设置的router2启动的初始时刻为1000us,那么router2的接收子周期标签为:
Figure PCTCN2021118536-appb-000012
那么本实施例中,报文达到入接口的接收周期标签为0。
步骤712,router2根据router2的接收子周期标签、入接口和出接口在router2的本地周期映射表中查找转发子周期。
在本实施例中,根据步骤709-步骤11确定了本地子周期标签为0,入接口为router2的接口1,出接口为router2的接口3,那么通过对表2的查询可知,转发子周期标签为1。
步骤713,router2根据router2的转发子周期标签和出接口向host2发送报文。
在本实施例中,router2通过出接口3在第1个转发子周期向host4发送报文,供host4接收并使用报文。
本申请的实施例,能够在接收到上游设备发送的未添加上游设备的时间周期标签信息的报文后,根据报文的到达时间和报文中携带的用于指示周期值的数据包的六元组获取接收子周期标签,最后根据接收子周期标签和报文中携带的用于指示出接口的目的IP地址将报文直接发送出去,由于报文中不携带上游设备的时间标签信息,只需要通过提取报文中的优先级和报文到达时间计算本设备的接收子周期以代替上游设备的时间标签信息,进一步地,不需要在转发给下游设备前由于上游设备的变化而对时间标签信息进行相应地更新,使得既不需要扩展协议也不需要修改报文就能在异步模式下进行数据传输。同时能够根据实际情况生成两个周期值,使得能够支持多周期映射转发。
如图8所示,本申请的第六实施例提供的数据传输方法,以第二信息为流识别号为例,包括:
步骤801,接收上游设备发送的报文,其中,报文携带用于指示出接口的第一信息和用于指示周期值的流识别号。
在本实施例中,报文携带的流标识号为3。
步骤802,根据流识别号确定使用的周期值、转发子周期的个数和周期值对应的本地周期的映射策略。
在本实施例中,执行步骤801得到的流识别号3对应的周期值为25us,转发子周期的个数为8,本地周期映射策略为y=(x+1)%8,其中,y为转发子周期标签,x为本地子周期标签。
需要说明的是,本地周期映射策略是预先存储在设备中的映射关系,例如入接口1到出接口2之间的周期值25us、周期号个数8的周期映射公式为y=(x+1)%8,入接口1到出接口3之间的周期值30us、周期号个数6的周期映射公式为y=(x+2)%6等,只需要根据确定的周期进一步获取对应的具体的映射关系。当然,以上仅为具体的举例说明,在实际的使用过程中本地周期的映射策略还可以包括其他映射关系,此处不做一一赘述。
步骤803,根据报文的到达时间和流识别号获取接收子周期标签。
在本实施例中,假设达到时间为98us,那么根据以上步骤获取的数据可以得到本地子周期标签为:
Figure PCTCN2021118536-appb-000013
报文达到入接口的本地周期标签为2。
步骤804,根据接收子周期标签和本地周期的映射策略获取转发子周期标签。
在本实施例中,转发子周期标签:y=(2+1)%8=3。
步骤805,根据转发子周期标签和第一信息发送报文。
在本实施例中,在第3个转发子周期内通过第一信息指示的出接口将报文发送出去。
本实施例,由于不需要获取本地周期映射表,只需要简单的计算就能够完成数据转发,节约了存储空间,方法更加简洁。
此外,应当理解的是,上面各种方法的步骤划分,只是为了描述清楚,实现时可以合并为一个步骤或者对某些步骤进行拆分,分解为多个步骤,只要包括相同的逻辑关系,都在本专利的保护范围内;对算法中或者流程中添加无关紧要的修改或者引入无关紧要的设计,但不改变其算法和流程的核心设计都在该专利的保护范围内。
本申请的第七实施例涉及一种电子设备,如图9所示,包括:包括至少一个处理器901;以及,与至少一个处理器901通信连接的存储器902;其中,存储器902存储有可被至少一个处理器901执行的指令,指令被至少一个处理器901执行,以使至少一个处理器901能够执行上述任一方法实施例所描述的数据传输方法。
其中,存储器902和处理器901采用总线方式连接,总线可以包括任意数量的互联的总线和桥,总线将一个或多个处理器901和存储器902的各种电路连接在一起。总线还可以将诸如外围设备、稳压器和功率管理电路等之类的各种其他电路连接在一起,这些都是本领域所公知的,因此,本文不再对其进行进一步描述。总线接口在总线和收发机之间提供接口。收发机可以是一个元件,也可以是多个元件,比如多个接收器和发送器,提供用于在传输介质上与各种其他装置通信的单元。经处理器901处理的数据通过天线在无线介质上进行传输,进一步,天线还接收数据并将数据传输给处理器901。
处理器901负责管理总线和通常的处理,还可以提供各种功能,包括定时,外围接口,电压调节、电源管理以及其他控制功能。而存储器902可以被用于存储处理器901在执行操作时所使用的数据。
本申请第八实施例涉及一种计算机可读存储介质,存储有计算机程序。计算机程序被处理器执行时实现上述方法实施例。
即,本领域技术人员可以理解,实现上述实施例方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序存储在一个存储介质中,包括若干指令用以使得一个设备(可以是单片机,芯片等)或处理器(processor)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。
本领域的普通技术人员可以理解,上述各实施例是实现本申请的具体实施例,而在实际应用中,可以在形式上和细节上对其作各种改变,而不偏离本申请的精神和范围。

Claims (10)

  1. 一种数据传输方法,包括:
    接收上游设备发送的报文,其中,所述报文携带用于指示出接口的第一信息和用于指示周期值的第二信息;
    根据所述报文的到达时间和所述第二信息获取接收子周期标签,其中,所述接收子周期标签用于指示接收所述报文时使用的接收子周期在整个接收周期中的次序,所述接收周期包含若干个所述接收子周期;
    根据所述接收子周期标签和所述第一信息发送所述报文。
  2. 根据权利要求1所述的数据传输方法,其中,所述接收上游设备发送的报文之前,还包括:
    设置周期生成策略;
    根据所述周期生成策略获取至少一个所述周期值;
    根据所述周期值生成并保存本地周期映射表。
  3. 根据权利要求1至2中任一项所述的数据传输方法,其中,所述根据所述接收子周期标签和所述第一信息发送所述报文,包括:
    记录所述报文到达时使用的入接口;
    根据所述第一信息确定出接口;
    根据所述转发子周期标签、所述入接口、所述出接口在所述本地周期映射表中查找转发子周期标签,其中,所述转发子周期标签用于指示转发所述报文时使用的转发子周期在整个转发周期中的次序,所述转发周期包含若干个所述转发子周期;
    将所述报文在所述转发子周期标签指示的所述转发子周期中从所述出接口中发送出去。
  4. 根据权利要求1至3中任一项所述的数据传输方法,其中,所述周期生成策略为根据所述第二信息获取所述周期值,所述第二信息为流识别号或数据包的六元组或优先级。
  5. 根据权利要求1至4中任一项所述的数据传输方法,其中,所述根据所述接收子周期标签和所述第一信息发送所述报文,包括:
    根据所述接收子周期标签计算所述转发子周期标签;
    将所述报文在所述转发子周期标签指示的所述转发子周期中从所述第一信息指示的所述出接口中发送出去。
  6. 根据权利要求5所述的方法,其中,所述根据所述接收子周期标签计算所述转发子周期标签,具体通过如下公式实现:
    y=(x+i)%m n
    其中,y为所述转发子周期标签,x为所述接收子周期标签,i为一个预设的自然数,m n为根据T n确定的所述转发周期包含的所述转发子周期的数量,所述T n是所述转发子周期对应的所述周期值,百分号为取余符号。
  7. 根据权利要求1至6中任一项所述的方法,其中,所述根据所述报文的到达时间和所 述第二信息获取接收子周期标签,包括:
    根据所述第二信息确定所述报文对应的所述周期值;
    根据所述周期值和所述到达时间计算所述接收子周期标签。
  8. 根据权利要求7所述的方法,其中,所述根据所述周期值和所述到达时间计算所述接收子周期标签,具体通过如下公式实现:
    Figure PCTCN2021118536-appb-100001
    其中,x为所述接收子周期标签,t start为预设值,t arrive为所述到达时间,T n为所述周期值,m n为根据T n确定的所述接收周期包含的所述接收子周期的数量,公式中的中括号为取整符号,百分号为取余符号。
  9. 一种电子设备,包括:
    至少一个处理器;以及,
    与所述至少一个处理器通信连接的存储器;其中,
    所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行如权利要求1至8中任意一项所述数据传输方法。
  10. 一种计算机可读存储介质,存储有计算机程序,所述计算机程序被处理器执行时实现权利要求1至8中任一项所述的数据传输方法。
PCT/CN2021/118536 2020-12-24 2021-09-15 数据传输方法、电子设备和存储介质 WO2022134671A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP21908673.3A EP4250673A4 (en) 2020-12-24 2021-09-15 DATA TRANSMISSION METHOD, ELECTRONIC DEVICE AND STORAGE MEDIUM
US18/257,924 US20240048498A1 (en) 2020-12-24 2021-09-15 Data transmission method, electronic device, and storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011550526.9 2020-12-24
CN202011550526.9A CN114679418A (zh) 2020-12-24 2020-12-24 数据传输方法、电子设备和存储介质

Publications (1)

Publication Number Publication Date
WO2022134671A1 true WO2022134671A1 (zh) 2022-06-30

Family

ID=82070205

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/118536 WO2022134671A1 (zh) 2020-12-24 2021-09-15 数据传输方法、电子设备和存储介质

Country Status (4)

Country Link
US (1) US20240048498A1 (zh)
EP (1) EP4250673A4 (zh)
CN (1) CN114679418A (zh)
WO (1) WO2022134671A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117768387A (zh) * 2022-09-16 2024-03-26 中兴通讯股份有限公司 报文处理方法、传递方法、通信设备、系统、介质及产品
CN117768386A (zh) * 2022-09-16 2024-03-26 中兴通讯股份有限公司 报文处理方法、传递方法、通信设备、系统、介质及产品

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160182215A1 (en) * 2014-12-18 2016-06-23 Cisco Technology, Inc. Jitter removal in deterministic networks
CN110545241A (zh) * 2018-05-28 2019-12-06 华为技术有限公司 一种报文处理方法和装置
CN110868363A (zh) * 2018-08-27 2020-03-06 华为技术有限公司 周期映射的方法及网络设备
CN111404840A (zh) * 2019-01-03 2020-07-10 华为技术有限公司 报文处理方法和装置

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160182215A1 (en) * 2014-12-18 2016-06-23 Cisco Technology, Inc. Jitter removal in deterministic networks
CN110545241A (zh) * 2018-05-28 2019-12-06 华为技术有限公司 一种报文处理方法和装置
CN110868363A (zh) * 2018-08-27 2020-03-06 华为技术有限公司 周期映射的方法及网络设备
CN111404840A (zh) * 2019-01-03 2020-07-10 华为技术有限公司 报文处理方法和装置

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP4250673A4 *

Also Published As

Publication number Publication date
US20240048498A1 (en) 2024-02-08
CN114679418A (zh) 2022-06-28
EP4250673A1 (en) 2023-09-27
EP4250673A4 (en) 2024-05-22

Similar Documents

Publication Publication Date Title
CN102104541B (zh) 报头处理引擎
WO2022134671A1 (zh) 数据传输方法、电子设备和存储介质
US9948557B2 (en) Methods and apparatuses for routing and forwarding, establishing routing table, and acquiring content
CN111934990B (zh) 消息传输方法及装置
CN109936640A (zh) 从节点设备的地址分配方法和装置
CN108259347B (zh) 一种报文传输方法和装置
CN110224935B (zh) 一种处理组播数据报文的方法及装置
WO2020073685A1 (zh) 转发路径确定方法、装置、系统、计算机设备及存储介质
CN107547346B (zh) 一种报文传输方法和装置
CN104219125A (zh) 信息为中心网络icn中转发报文的方法、装置及系统
WO2020042875A1 (zh) 周期映射的方法及网络设备
US20180176121A1 (en) Optimizing information related to a route and/or a next hop for multicast traffic
WO2019101118A1 (zh) 指定转发者选举
US10104002B2 (en) Method and system for network address re-use in network address translation
CN111585862A (zh) 一种EtherCAT与TSN网络互通的实现方法及装置
CN106533973A (zh) 分发业务消息的方法、设备和系统
WO2021238741A1 (zh) 报文转发方法、系统、设备、节点设备和存储介质
KR20220160639A (ko) 메시지 인터랙션 방법, 장치, 설비 및 저장 매체
EP4220427A1 (en) Data processing method and system, encapsulation node, and de-encapsulation node
CN102035738A (zh) 一种获取路由信息的方法及装置
CN111740922B (zh) 数据传输方法、装置、电子设备及介质
US9137158B2 (en) Communication apparatus and communication method
US9967178B1 (en) Flow record size reduction
US9270574B2 (en) Method and apparatus providing delayed path calculations based on service type
WO2020248662A1 (zh) 建立非以太网业务的方法和网络设备

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 18257924

Country of ref document: US

ENP Entry into the national phase

Ref document number: 2021908673

Country of ref document: EP

Effective date: 20230619

NENP Non-entry into the national phase

Ref country code: DE

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21908673

Country of ref document: EP

Kind code of ref document: A1