WO2022222693A1 - 报文处理方法和装置、电子设备、计算机可读存储介质 - Google Patents

报文处理方法和装置、电子设备、计算机可读存储介质 Download PDF

Info

Publication number
WO2022222693A1
WO2022222693A1 PCT/CN2022/083267 CN2022083267W WO2022222693A1 WO 2022222693 A1 WO2022222693 A1 WO 2022222693A1 CN 2022083267 W CN2022083267 W CN 2022083267W WO 2022222693 A1 WO2022222693 A1 WO 2022222693A1
Authority
WO
WIPO (PCT)
Prior art keywords
information
packet
message
application layer
timestamp information
Prior art date
Application number
PCT/CN2022/083267
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 WO2022222693A1 publication Critical patent/WO2022222693A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0852Delays
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/10Active monitoring, e.g. heartbeat, ping or trace-route
    • H04L43/106Active monitoring, e.g. heartbeat, ping or trace-route using time related information in packets, e.g. by adding timestamps

Definitions

  • the embodiments of the present disclosure relate to, but are not limited to, the field of communications, and in particular, to a message processing method and apparatus, an electronic device, and a computer-readable storage medium.
  • Data products provide data channels to provide Internet access services for client terminals, usually with low latency requirements.
  • some industry users regard the delay as a hard indicator and require the delay to be controlled within 80 milliseconds (ms), which affects the entire data path (including: Customer Premise Equipment (CPE), core network elements, The delay troubleshooting of base stations, etc.) puts forward higher requirements.
  • CPE Customer Premise Equipment
  • base stations etc.
  • Embodiments of the present disclosure provide a packet processing method and apparatus, an electronic device, and a computer-readable storage medium.
  • an embodiment of the present disclosure provides a packet processing method, which is applied to a first routing node.
  • the method includes: receiving a packet; and, in the case where first timestamp information needs to be added to the packet, processing the packet. adding the first time stamp information to the message; wherein the first time stamp information includes: the transmission time information of the message by the first routing node; 's message.
  • an embodiment of the present disclosure provides an electronic device, including: at least one processor; and a memory, where at least one program is stored, and when the at least one program is executed by the at least one processor, the above-mentioned at least one program is implemented. Any packet processing method.
  • an embodiment of the present disclosure provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, any one of the foregoing packet processing methods is implemented.
  • an embodiment of the present disclosure provides a message processing apparatus, including: a message receiving module configured to receive a message; a timestamp information adding module configured to add a first time to the message when needed In the case of timestamp information, add the first timestamp information to the packet; wherein the first timestamp information includes: the transmission time information of the packet by the first routing node; and the packet
  • the sending module is configured to send the message after adding the first timestamp information.
  • the first time stamp information is added to the packet in the first routing node on the data path, so that delay analysis can be performed according to the first time stamp information subsequently, so as to realize the processing of the data path. troubleshooting of the delay problem.
  • FIG. 1 is a schematic diagram of a data path provided by an embodiment of the present disclosure
  • FIG. 2 is a flowchart of a packet processing method provided by an embodiment of the present disclosure
  • FIG. 3 is a block diagram of a packet processing apparatus provided by another embodiment of the present disclosure.
  • the troubleshooting of delay problems refers to analyzing the delay of one or more routing nodes of a data channel and/or a certain segment of transmission links, so as to find routing nodes and/or routing nodes whose delay exceeds the standard.
  • the transmission link is used to further check and improve the routing nodes and/or transmission links whose delay exceeds the standard.
  • FIG. 1 is a schematic diagram of a data path provided by an embodiment of the present disclosure.
  • the data path between client terminal A and client terminal B includes: router R1, base station 1, core network element C, and router R2.
  • the scenario also includes base station 2 .
  • the data path between client terminal A and client terminal B includes: router R2, base station 2, core network element C, router R1, and in some scenarios, base station 1 .
  • the number of routers R1 may be one, or two or more, the number of core network elements C may be one, or two or more, and the number of routers R2 may be one, or two or more more than one.
  • the troubleshooting of the delay problem in the embodiment of the present disclosure refers to analyzing the delay of the above-mentioned routing node and/or the transmission link between two adjacent routing nodes, so as to find the routing node and/or the transmission link whose delay exceeds the standard link to further check and improve the routing nodes and/or transmission links whose delay exceeds the standard.
  • FIG. 2 is a flowchart of a packet processing method provided by an embodiment of the present disclosure.
  • an embodiment of the present disclosure provides a packet processing method, which is applied to a first routing node, and the method includes:
  • Step 200 Receive a message.
  • the received message may be sent by the first client terminal, or may be sent by the network element node on the network side.
  • the first client terminal is client terminal A as shown in FIG. 1
  • the network-side network element node is any one of router R1 , base station 1 , core network element C, base station 2 , router R2 , etc. as shown in FIG. 1 .
  • Step 201 Add the first timestamp information to the packet in the case where the first timestamp information needs to be added to the packet; wherein the first timestamp information includes: the first route The transmission time information of the message by the node.
  • the routing node may know whether the first timestamp information needs to be added to the packet according to the configuration information, wherein the configuration information is used to indicate whether the first timestamp information needs to be added to the packet.
  • the Transmission Control Protocol (TCP, Transmission Control Protocol) message does not need to add the first timestamp information to troubleshoot the delay due to the packet loss retransmission mechanism, while the User Datagram Protocol (UDP, User Datagram Protocol) message In this paper, the delay problem needs to be checked by adding the first timestamp information.
  • TCP Transmission Control Protocol
  • UDP User Datagram Protocol
  • Case 1 The received message is sent by the first client terminal.
  • adding the first timestamp information to the packet includes: intercepting the packet at the application layer; acquiring application layer information of the packet; Add the first time stamp information to .
  • the application layer information includes the transmitted data content.
  • the transmission time information includes at least one of the following: time information for receiving the packet, and time information for sending the packet. That is, the first timestamp information includes at least one of the following: time information when the first routing node receives the packet, and time information when the first routing node sends the packet.
  • the adding the first timestamp information to the application layer information includes: adding the first timestamp information to the front of the application layer information.
  • the adding the first timestamp information to the application layer information includes: adding the first timestamp information at a middle position of the application layer information.
  • the adding the first timestamp information to the application layer information includes: adding the first timestamp information at the end of the application layer information.
  • adding the first timestamp information to the front of the application layer information includes: adding the first timestamp information before the first field of the application layer information.
  • adding the first timestamp information at the end of the application layer information includes: adding the first timestamp information after the last field of the application layer information.
  • the adding the first timestamp information in the middle of the application layer information includes: adding the first timestamp information between any two fields of the application layer information ; or, add the first timestamp information between any two fields of the first N fields of the application layer information; wherein, N is an integer greater than or equal to 2.
  • the first timestamp information may be added in any position of the application layer information.
  • the application layer information behind the segment cannot be identified. Therefore, in the case of segmenting the packet, try to add the first timestamp information in front of the application layer information, so that the first timestamp information is still located in the first segment of the packet after segmentation.
  • N is the number of fields of application layer information in the first segment of the packet.
  • Case 2 The received packet is sent by the network element node on the network side.
  • the method further includes: the second timestamp information has been added to the packet, and the first timestamp information has been added to the packet.
  • a routing node is not a routing node directly connected to the second client terminal; wherein, the second timestamp information includes: transmission time information of the packet by the second routing node.
  • the transmission time information of the packet by the second routing node may refer to the transmission time information of the packet by one routing node, or may refer to the transmission time information of two or more routing nodes.
  • the transmission time information of the text may refer to the transmission time information of the packet by one routing node, or may refer to the transmission time information of two or more routing nodes.
  • judging whether the second timestamp information has been added to the packet includes: intercepting the packet at the application layer; acquiring application layer information of the packet; judging whether the application layer information has been The second time stamp information is added; if the second time stamp information has been added to the application layer information, it is determined that the second time stamp information has been added to the packet; the second time stamp information is not added to the application layer information In the case of information, it is determined that the second time stamp information is not added to the message.
  • the adding the first timestamp information to the packet includes: modifying the second timestamp information in the application layer information to the first timestamp information.
  • the adding the first timestamp information to the packet includes: adding the first timestamp information to the application layer information.
  • the second timestamp information in the application layer information can be modified to the first timestamp information. That is to say, the subsequent routing node does not need to use the second timestamp information carried in the packet received by the routing node, but only needs to use the first timestamp information added by the routing node when performing the delay analysis. Therefore, it is not necessary to keep the second timestamp information in the packet, and bandwidth resources are also saved.
  • the transmission time information of the packet by the second routing node only includes the transmission time information of the packet by one routing node.
  • the transmission time information of the packet by the second routing node may refer to the transmission time information of one routing node to the packet, or may refer to the transmission time information of two or more routing nodes to the packet.
  • the second timestamp information needs to be retained in the application layer information for the routing nodes that add the first timestamp information between two adjacent routing nodes that perform delay analysis. , that is, the first timestamp information needs to be added to a new field of the application layer information, so as to ensure that the routing node performing the delay analysis can know the delay situation of each routing node that adds the first timestamp information.
  • the transmission time information includes at least one of the following: time information for receiving the packet, and time information for sending the packet. That is, the second time stamp information includes at least one of the following: time information when the second routing node receives the packet, and time information when the second routing node sends the packet.
  • the adding the first timestamp information to the application layer information includes: adding the first timestamp information to the front of the application layer information.
  • the adding the first timestamp information to the application layer information includes: adding the first timestamp information at a middle position of the application layer information.
  • adding the first timestamp information at the end of the application layer information includes: adding the first timestamp information after the last field of the application layer information.
  • the adding the first timestamp information in the middle of the application layer information includes: adding the first timestamp information between any two fields of the application layer information ; or, add the first timestamp information between any two fields of the first N fields of the application layer information; wherein, N is an integer greater than or equal to 2.
  • Step 202 Send the message added with the first timestamp information.
  • the packet after adding the first timestamp information is sent to the next routing node, where the next routing node refers to a routing node that is closer to the second client terminal.
  • the method when the second time stamp information has been added to the packet, and the first routing node is a routing node directly connected to the second client terminal, the method further includes:
  • the reason for the excessive delay can be analyzed by checking the usage rate of the central processing unit (CPU, Center Processing Unit) and the size of free memory of the routing node. where, so as to be implemented into the code layer for improvement.
  • CPU Central Processing Unit
  • the size of free memory of the routing node where, so as to be implemented into the code layer for improvement.
  • the second time stamp information includes the time information when the second routing node receives the packet
  • each routing node performs delay analysis
  • the delay is the total transmission delay between the first routing node and the second routing node. Therefore, the delay is the difference between the first timestamp information and the second timestamp information.
  • the first time stamp information includes: time information when the first routing node receives the packet and time information when the first routing node sends the packet
  • the second time stamp information includes: time information when the second routing node receives the packet and the time information of the packet sent by the second routing node, and each routing node performs delay analysis, the delay includes at least one of the following:
  • the transmission delay of the packet on the transmission link between the first routing node and the second routing node is the transmission delay of the packet on the transmission link between the first routing node and the second routing node.
  • the processing delay of the first routing node to the packet is: the difference between the time information of the first routing node sending the packet and the time information of the first routing node receiving the packet.
  • the processing delay of the second routing node to the packet is: the difference between the time information of the second routing node sending the packet and the time information of the second routing node receiving the packet.
  • the transmission delay of the transmission link between the first routing node and the second routing node to the packet is: the difference between the time information of the first routing node receiving the packet and the time information of the second routing node sending the packet.
  • the total transmission delay between two adjacent second routing nodes to which the second time stamp information is added is the difference between the second time stamp information of the two adjacent second routing nodes to which the second time stamp information is added .
  • delays include:
  • the total transmission delay between two adjacent second routing nodes to which the second time stamp information is added is the difference between the second time stamp information of the two adjacent second routing nodes to which the second time stamp information is added .
  • the first time stamp information includes: time information when the first routing node receives the message and time information when the first routing node sends the message
  • the second time stamp information includes: time information when the second routing node receives the message and the time information of the packet sent by the second routing node, and only when some routing nodes perform delay analysis, the delay includes at least one of the following:
  • the transmission delay of the packet between two adjacent second routing nodes to which the second time stamp information is added is added.
  • the total transmission delay between the first routing node and the last second routing node to which the second timestamp information is added is:
  • the time information of the packet sent by the second routing node close to the second client terminal and the packet sent by the second routing node close to the first client terminal difference in time information.
  • the processing delay of the first routing node to the packet is: the difference between the time information of the first routing node sending the packet and the time information of the first routing node receiving the packet.
  • the processing delay of the second routing node to the packet is: the difference between the time information of the second routing node sending the packet and the time information of the second routing node receiving the packet.
  • the transmission delay of the transmission link between the first routing node and the last second routing node to which the second time stamp information is added is: the time information of the first routing node receiving the packet and the last added difference between the time information of the packet sent by the second routing node with the second time stamp information.
  • the transmission delay of the transmission link between the two adjacent second routing nodes to which the second time stamp information is added is: , the difference between the time information of the packet sent by the second routing node close to the second client terminal and the time information of the packet received by the second routing node close to the first client terminal.
  • the first time stamp information is added to the packet in the first routing node on the data path, so that delay analysis can be performed according to the first time stamp information subsequently, so as to realize the processing of the data path. troubleshooting of the delay problem.
  • both client terminal A and client terminal B are electrical equipment.
  • the frequency of sending packets of this kind of power equipment is very high (minimum 2000 packets per second), and there is a time module inside the equipment to detect the delay of the packets sent by the peer equipment and make statistics, if it exceeds 80 milliseconds (ms), the Alarm, this scene has never been encountered in the 4G network. Due to the extremely high requirements for delay indicators, it is difficult to troubleshoot and locate using traditional methods. Therefore, each routing node between client terminal A and client terminal B needs to support the addition of timestamp information.
  • client terminal A is connected to router R1 through a network cable
  • router R1 performs 5G or Long Term Evolution (LTE, Long Term Evolution) dialing
  • client terminal B is also connected to router R2 through a network cable
  • router R2 performs For 5G or LTE dial-up, base station 1, core network element C, and base station 2 exist between router R1 and router R2.
  • LTE Long Term Evolution
  • each routing node on the data path between client terminal A and client terminal B adds the time when the routing node receives the packet, and only adds the time when the routing node receives the packet. Latency analysis is performed on router R2.
  • client terminal A is connected to router R1 through a network cable
  • router R1 performs 5G or Long Term Evolution (LTE, Long Term Evolution) dialing
  • client terminal B is also connected to router R2 through a network cable
  • router R2 performs For 5G or LTE dial-up, base station 1, core network element C, and base station 2 exist between router R1 and router R2.
  • LTE Long Term Evolution
  • Router R2 calculates the total transmission delay between core network element C and base station 1, that is, the difference between t3 and t2; if the difference between t3 and t2 is greater than 10ms, an alarm message is issued; if the difference between t3 and t2 is less than 10ms, then This shows that the delay between the core network element C and the base station 1 is stable.
  • Router R2 calculates the total transmission delay between base station 2 and core network element C, that is, the difference between t4 and t3; if the difference between t4 and t3 is greater than 10ms, an alarm message is sent; if the difference between t4 and t3 is less than 10ms, then This shows that the time delay between the base station 2 and the core network element C is stable.
  • Router R2 calculates the total transmission delay between router R2 and base station 2, that is, the difference between t5 and t4, and t5 is the time when router R2 receives the message; if the difference between t5 and t4 is greater than 10ms, an alarm message will be sent; if t5 and t4 If the difference between t4 is less than 10ms, it means that the delay between router R2 and base station 2 is stable.
  • an electronic device including:
  • a memory where at least one program is stored, and when the at least one program is executed by at least one processor, any one of the foregoing message processing methods is implemented.
  • the processor is a device with data processing capability, which includes but is not limited to a central processing unit (CPU), etc.
  • the memory is a device with data storage capability, which includes but is not limited to random access memory (RAM, more specifically such as SDRAM) , DDR, etc.), read-only memory (ROM), charged erasable programmable read-only memory (EEPROM), flash memory (FLASH).
  • RAM random access memory
  • ROM read-only memory
  • EEPROM charged erasable programmable read-only memory
  • FLASH flash memory
  • an embodiment of the present disclosure provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, any one of the foregoing packet processing methods is implemented.
  • FIG. 3 is a block diagram of a packet processing apparatus provided by another embodiment of the present disclosure.
  • FIG. 3 another embodiment of the present disclosure provides a message processing apparatus, including:
  • the packet processing module 302 is configured to add the first timestamp information to the packet when the first timestamp information needs to be added to the packet; wherein the first timestamp information includes : the transmission time information of the message by the first routing node;
  • the message sending module 303 is configured to send the message after adding the first timestamp information.
  • the message receiving module 301 is specifically configured to: receive a message sent by the first client terminal;
  • the packet processing module 302 is specifically configured to implement adding the first timestamp information to the packet in the following manner: intercepting the packet at the application layer; acquiring application layer information of the packet; Add the first time stamp information to .
  • the message receiving module 301 is specifically configured to: receive the message sent by the network element node on the network side;
  • the need to add the first timestamp information to the packet includes: the second timestamp information has been added to the packet, and the first routing node is not a routing node directly connected to the second client terminal;
  • the second time stamp information includes: transmission time information of the packet by the second routing node.
  • the packet processing module 302 is further configured to: calculate a delay according to the first timestamp information and the second timestamp information; and when the delay is greater than a preset threshold down, an alarm message is issued.
  • the packet processing module 302 is further configured to: add second timestamp information to the packet, and the first routing node is a route directly connected to the second client terminal In the case of a node, the second timestamp information is deleted.
  • the message sending module 303 is further configured to send the message after deleting the second time stamp information to the second client terminal.
  • the packet processing module 302 is specifically configured to implement the adding first timestamp information to the packet in the following manner: modifying the second timestamp information to the first timestamp information .
  • the packet processing module 302 is specifically configured to implement adding the first timestamp information to the packet in the following manner: acquiring application layer information of the packet, in the application layer information Add the first timestamp information.
  • the packet processing module 302 is specifically configured to implement the adding the first timestamp information to the application layer information in the following manner: adding the first time in front of the application layer information stamp information.
  • the transmission time information includes at least one of the following: time information for receiving the packet, and time information for transmitting the packet.
  • the message receiving module 301 is specifically configured to: receive a message sent by the first client terminal;
  • the encapsulation or decapsulation module 304 is also configured to decapsulate the message.
  • the message processing module 302 is specifically configured to add the first time stamp information to the decapsulated message when the first time stamp information needs to be added to the decapsulated message.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Health & Medical Sciences (AREA)
  • Cardiology (AREA)
  • General Health & Medical Sciences (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

本公开的实施例提供了一种报文处理方法和装置、电子设备、计算机可读存储介质。该报文处理方法包括:接收报文;在需要为所述报文添加第一时间戳信息的情况下,为所述报文添加所述第一时间戳信息;其中,所述第一时间戳信息包括:所述第一路由节点对所述报文的传输时间信息;发送添加所述第一时间戳信息后的报文。摘图2

Description

报文处理方法和装置、电子设备、计算机可读存储介质
相关申请的交叉引用
本公开要求在2021年4月21日提交国家知识产权局、申请号为202110433524.X、发明名称为“报文处理方法和装置、电子设备、计算机可读存储介质”的中国专利申请的优先权,该申请的全部内容通过引用结合在本公开中。
技术领域
本公开实施例涉及但不限于通信领域,特别涉及报文处理方法和装置、电子设备、计算机可读存储介质。
背景技术
数据类产品提供数据通道为客户终端提供上网服务,通常对时延要求较低。但某些行业用户将时延作为硬指标且要求时延控制在80毫秒(ms)之内,这对整条数据通路(包括:客户前置设备(CPE,Customer Premise Equipment)、核心网网元、基站等)的时延问题排查提出了更高的要求。目前尚未有有效方案实现对数据通路的时延问题进行排查。
发明内容
本公开实施例提供一种报文处理方法和装置、电子设备、计算机可读存储介质。
第一方面,本公开实施例提供一种报文处理方法,应用于第一路由节点,该方法包括:接收报文;在需要为所述报文添加第一时间戳信息的情况下,为所述报文添加所述第一时间戳信息;其中,所述第一时间戳信息包括:所述第一路由节点对所述报文的传输时间信息;以及发送添加所述 第一时间戳信息后的报文。
第二方面,本公开实施例提供一种电子设备,包括:至少一个处理器;以及存储器,存储器上存储有至少一个程序,当所述至少一个程序被所述至少一个处理器执行时,实现上述任意一种报文处理方法。
第三方面,本公开实施例提供一种计算机可读存储介质,计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现上述任意一种报文处理方法。
第四方面,本公开实施例提供一种报文处理装置,包括:报文接收模块,被构造成接收报文;时间戳信息添加模块,被构造成在需要为所述报文添加第一时间戳信息的情况下,为所述报文添加所述第一时间戳信息;其中,所述第一时间戳信息包括:所述第一路由节点对所述报文的传输时间信息;以及报文发送模块,被构造成发送添加所述第一时间戳信息后的报文。
本公开实施例提供的报文处理方法,通过在数据通路上的第一路由节点中为报文添加第一时间戳信息,以便后续根据第一时间戳信息进行时延分析,从而实现对数据通路的时延问题的排查。
附图说明
图1为本公开实施例提供的数据通路的示意图;
图2为本公开一个实施例提供的报文处理方法的流程图;
图3为本公开另一个实施例提供的报文处理装置的组成框图。
具体实施方式
为使本领域的技术人员更好地理解本公开的技术方案,下面结合附图对本公开提供的报文处理方法和装置、电子设备、计算机可读存储介质进行详细描述。
在下文中将参考附图更充分地描述示例实施例,但是所述示例实施例 可以以不同形式来体现且不应当被解释为限于本文阐述的实施例。反之,提供这些实施例的目的在于使本公开透彻和完整,并将使本领域技术人员充分理解本公开的范围。
在不冲突的情况下,本公开各实施例及实施例中的各特征可相互组合。
如本文所使用的,术语“和/或”包括至少一个相关列举条目的任何和所有组合。
本文所使用的术语仅用于描述特定实施例,且不意欲限制本公开。如本文所使用的,单数形式“一个”和“该”也意欲包括复数形式,除非上下文另外清楚指出。还将理解的是,当本说明书中使用术语“包括”和/或“由……制成”时,指定存在所述特征、整体、步骤、操作、元件和/或组件,但不排除存在或添加至少一个其它特征、整体、步骤、操作、元件、组件和/或其群组。
除非另外限定,否则本文所用的所有术语(包括技术和科学术语)的含义与本领域普通技术人员通常理解的含义相同。还将理解,诸如那些在常用字典中限定的那些术语应当被解释为具有与其在相关技术以及本公开的背景下的含义一致的含义,且将不解释为具有理想化或过度形式上的含义,除非本文明确如此限定。
在本公开实施例中,时延问题排查是指对数据通道的某一个或一个以上路由节点,和/或某一段传输链路的时延进行分析,从而发现时延超标的路由节点和/或传输链路,以对出现时延超标的路由节点和/或传输链路进行进一步排查和改善。
例如,图1为本公开实施例提供的数据通路的示意图。如图1所示,客户终端A向客户终端B发送报文时,客户终端A和客户终端B之间的数据通路包括:路由器R1、基站1、核心网网元C、路由器R2,在某些场景下还包括基站2。
客户终端B向客户终端A发送报文时,客户终端A和客户终端B之间的数据通路包括:路由器R2、基站2、核心网网元C、路由器R1,在某些场景下还包括基站1。
其中,路由器R1可以是一个,也可以是两个或两个以上,核心网网元C可以是一个,也可以是两个或两个以上,路由器R2可以是一个,也可以是两个或两个以上。
其中,路由器R1、基站1、核心网网元C、路由器R2、基站2均为数据通路上的路由节点,并且,基站1、核心网网元C、基站2均为数据通路上的网络侧网元节点,与客户终端A直连的路由器R1和与客户终端B直连的路由器R2为数据通路上的客户前置设备(CPE,Customer Premise Equipment)。
本公开实施例中的时延问题排查即是指对上述路由节点和/或相邻两个路由节点之间的传输链路的时延进行分析,从而发现时延超标的路由节点和/或传输链路,以对出现时延超标的路由节点和/或传输链路进行进一步排查和改善。
图2为本公开一个实施例提供的报文处理方法的流程图。
第一方面,参照图2,本公开一个实施例提供一种报文处理方法,应用于第一路由节点,该方法包括:
步骤200、接收报文。
在本公开实施例中,接收的报文可以是第一客户终端发送的,也可以是网络侧网元节点发送的。其中,第一客户终端如图1中的客户终端A,网络侧网元节点如图1中的路由器R1、基站1、核心网网元C、基站2、路由器R2等中的任意一个。
本公开实施例对报文的具体类型不做限定,即报文可以是任何类型的报文。例如,可以是用于传输数据的数据报文,也可以是发送控制命令的控制报文,等等。
步骤201、在需要为所述报文添加第一时间戳信息的情况下,为所述报文添加所述第一时间戳信息;其中,所述第一时间戳信息包括:所述第一路由节点对所述报文的传输时间信息。
在本公开实施例中,是否需要为报文添加第一时间戳信息视具体的应用场景来定。在本公开实施例中,可以在第一客户终端和第二客户终端之 间的数据通路上的部分或全部路由节点接收到报文时,采用本公开实施例的报文处理方法对报文进行相应的处理,并依次从靠近第一客户终端一侧传递到第二客户终端一侧,从而实现对第一客户终端和第二客户终端之间的数据通路的时延问题的排查。具体是在哪些路由节点上执行本公开实施例的报文处理方法可以根据实际情况来确定,并配置相应的路由节点来实现。
在本实施例中,路由节点可以根据配置信息获知是否需要为报文添加第一时间戳信息;其中,配置信息用于指示是否需要为报文添加第一时间戳信息。
例如,传输控制协议(TCP,Transmission Control Protocol)报文由于存在丢包重传机制无需通过添加第一时间戳信息来进行时延问题的排查,而用户数据报协议(UDP,User Datagram Protocol)报文则需要通过添加第一时间戳信息来进行时延问题的排查。
下面分为两种情况分别描述为报文添加第一时间戳信息的具体实现过程。
情况一、接收的报文是第一客户终端发送的。
针对情况一,在一些示例性实施例中,所述为报文添加第一时间戳信息包括:在应用层截获所述报文;获取所述报文的应用层信息;在所述应用层信息中添加所述第一时间戳信息。
针对情况一,在一些示例性实施例中,应用层信息包括传输的数据内容。
针对情况一,在一些示例性实施例中,传输时间信息包括以下至少之一:接收所述报文的时间信息、发送所述报文的时间信息。也就是说,第一时间戳信息包括以下至少之一:第一路由节点接收报文的时间信息、第一路由节点发送报文的时间信息。
针对情况一,在一些示例性实施例中,所述在应用层信息中添加第一时间戳信息包括:在所述应用层信息的最前面添加所述第一时间戳信息。
针对情况一,在一些示例性实施例中,所述在应用层信息中添加第一 时间戳信息包括:在所述应用层信息的中间位置添加所述第一时间戳信息。
针对情况一,在一些示例性实施例中,所述在应用层信息中添加第一时间戳信息包括:在所述应用层信息的末尾添加所述第一时间戳信息。
针对情况一,在一些示例性实施例中,在应用层信息的最前面添加第一时间戳信息包括:在应用层信息的第一个字段之前添加第一时间戳信息。
针对情况一,在一些示例性实施例中,在应用层信息的末尾添加第一时间戳信息包括:在应用层信息的最后一个字段后面添加第一时间戳信息。
针对情况一,在一些示例性实施例中,所述在应用层信息的中间位置添加第一时间戳信息包括:在所述应用层信息的任意两个字段之间添加所述第一时间戳信息;或者,在所述应用层信息的前N个字段的任意两个字段之间添加所述第一时间戳信息;其中,N为大于或等于2的整数。
也就是说,第一时间戳信息可以是应用层信息的任意位置中添加。但是,在某些情况下,如果报文比较大,在传输过程中需要对报文进行分段,那么,由于分段后位于后面的应用层信息将无法识别。因此,针对对报文进行分段的情况,应尽量将第一时间戳信息添加在应用层信息的前面位置,使得分段后第一时间戳信息仍然位于报文的第一个分段内。
例如,上述N即为报文的第一个分段内的应用层信息的字段数。
针对情况一,在一些示例性实施例中,可以在应用层信息中添加例如格式为“tm=value”的信息,value即为添加的第一时间戳信息。
情况二、接收的报文是网络侧网元节点发送的。
针对情况二,在一些示例性实施例中,在需要为报文添加第一时间戳信息的情况下,该方法还包括:所述报文中已经添加了第二时间戳信息,且所述第一路由节点不是与第二客户终端直连的路由节点;其中,所述第二时间戳信息包括:第二路由节点对所述报文的传输时间信息。
针对情况二,在本公开实施例中,第二路由节点对报文的传输时间信息可以是指一个路由节点对报文的传输时间信息,也可以是指两个或两个以上路由节点对报文的传输时间信息。
针对情况二,在一些示例性实施例中,判断在报文中是否已经添加了第二时间戳信息包括:在应用层截获报文;获取报文的应用层信息;判断应用层信息中是否已经添加了第二时间戳信息;在应用层信息中已经添加了第二时间戳信息的情况下,确定在报文中已经添加了第二时间戳信息;在应用层信息中没有添加第二时间戳信息的情况下,确定在报文中没有添加第二时间戳信息。
针对情况二,在一些示例性实施例中,可以通过判断应用层信息中是否存在格式为“tm=value”的信息来判断应用层信息中是否已经添加了第二时间戳信息;在应用层信息中存在格式为“tm=value”的信息的情况下,确定应用层信息中已经添加了第二时间戳信息;在应用层信息中不存在格式为“tm=value”的信息的情况下,确定应用层信息中没有添加第二时间戳信息。
针对情况二,在一些示例性实施例中,所述为报文添加第一时间戳信息包括:将应用层信息中的所述第二时间戳信息修改为所述第一时间戳信息。
针对情况二,在一些示例性实施例中,所述为报文添加第一时间戳信息包括:在所述应用层信息中添加所述第一时间戳信息。
例如,如果在每一个路由节点上均进行时延分析,则可以将应用层信息中的第二时间戳信息修改为第一时间戳信息。也就是说,后面的路由节点进行时延分析时并不需要用到本路由节点接收的报文中携带的第二时间戳信息,而仅需要用到本路由节点添加的第一时间戳信息。因此可以不用保留第二时间戳信息在报文中,同时也节省了带宽资源。这种情况下,第二路由节点对报文的传输时间信息仅包括一个路由节点对报文的传输时间信息。当然,在应用层信息中保留第二时间戳信息的情况下添加第一时间戳信息也是可以实现的。这种情况下,第二路由节点对报文的传输时间信息可以是指一个路由节点对报文的传输时间信息,也可以是指两个或两个以上路由节点对报文的传输时间信息。
如果仅在部分路由节点上进行时延分析,则对于相邻两个进行时延分析的路由节点之间的添加第一时间戳信息的路由节点,需要在应用层信息 中保留第二时间戳信息,也就是需要在应用层信息的新的字段添加第一时间戳信息,保证进行时延分析的路由节点可以获知每一个添加第一时间戳信息的路由节点的时延情况。
针对情况二,在一些示例性实施例中,传输时间信息包括以下至少之一:接收所述报文的时间信息、发送所述报文的时间信息。也就是说,第二时间戳信息包括以下至少之一:第二路由节点接收报文的时间信息、第二路由节点发送报文的时间信息。
针对情况二,在一些示例性实施例中,所述在应用层信息中添加第一时间戳信息包括:在所述应用层信息的最前面添加所述第一时间戳信息。
针对情况二,在一些示例性实施例中,所述在应用层信息中添加第一时间戳信息包括:在所述应用层信息的中间位置添加所述第一时间戳信息。
针对情况二,在一些示例性实施例中,所述在应用层信息中添加第一时间戳信息包括:在所述应用层信息的末尾添加所述第一时间戳信息。
针对情况二,在一些示例性实施例中,在应用层信息的最前面添加第一时间戳信息包括:在应用层信息的第一个字段之前添加第一时间戳信息。
针对情况二,在一些示例性实施例总,在应用层信息的末尾添加第一时间戳信息包括:在应用层信息的最后一个字段后面添加第一时间戳信息。
针对情况二,在一些示例性实施例中,所述在应用层信息的中间位置添加第一时间戳信息包括:在所述应用层信息的任意两个字段之间添加所述第一时间戳信息;或者,在所述应用层信息的前N个字段的任意两个字段之间添加所述第一时间戳信息;其中,N为大于或等于2的整数。
也就是说,第一时间戳信息可以是应用层信息的任意位置中添加。但是,在某些情况下,如果报文比较大,在传输过程中需要对报文进行分段,那么,由于分段后位于后面的应用层信息将无法识别。因此,针对对报文进行分段的情况,应尽量将第一时间戳信息添加在应用层信息的前面位置,使得分段后第一时间戳信息仍然位于报文的第一个分段内。
例如,上述N即为报文的第一个分段内的应用层信息的字段数。
针对情况二,在一些示例性实施例中,可以在应用层信息中添加例如格式为“tm=value”的信息,value即为添加的第一时间戳信息。
步骤202、发送添加所述第一时间戳信息后的报文。
在本公开实施例中,将添加第一时间戳信息后的报文发送给下一路由节点,其中,下一路由节点是指更靠近第二客户终端的路由节点。
在一些示例性实施例中,在所述报文中已经添加了第二时间戳信息,且所述第一路由节点为与第二客户终端直连的路由节点的情况下,该方法还包括:
将所述第二时间戳信息删除;以及
将删除所述第二时间戳信息后的报文发送给所述第二客户终端。
在一些示例性实施例中,在接收的报文是网络侧网元节点发送的情况下,接收报文后,该方法还包括:
根据所述第一时间戳信息和所述第二时间戳信息计算时延;以及
在所述时延大于预设阈值的情况下,发出报警信息。
在本公开实施例中,得到时延大于预设阈值的路由节点后,可以通过检查路由节点的中央处理单元(CPU,Center Processing Unit)使用率、空闲内存大小等方面进行分析时延超标的原因所在,从而落实到代码层进行改善。
下面针对不同的情况分别说明时延的计算。
(一)针对第一时间戳信息包括第一路由节点接收报文的时间信息,第二时间戳信息包括第二路由节点接收报文的时间信息,且每一个路由节点均进行时延分析的情况,时延为第一路由节点和第二路由节点之间的总传输时延。因此,时延为第一时间戳信息和第二时间戳信息之差。
(二)针对第一时间戳信息包括第一路由节点发送报文的时间信息,第二时间戳信息包括第二路由节点发送报文的时间信息,且每一个路由节点均进行时延分析的情况,时延为第一路由节点和第二路由节点之间的总传输时延。因此,时延为第一时间戳信息和第二时间戳信息之差。
(三)针对第一时间戳信息包括:第一路由节点接收报文的时间信息和第一路由节点发送报文的时间信息,第二时间戳信息包括:第二路由节点接收报文的时间信息和第二路由节点发送报文的时间信息,且每一个路由节点均进行时延分析的情况,时延包括以下至少之一:
第一路由节点和第二路由节点之间的总传输时延;
第一路由节点对报文的处理时延;
第二路由节点对报文的处理时延;
第一路由节点和第二路由节点之间的传输链路对报文的传输时延。
其中,第一路由节点和第二路由节点之间的总传输时延为:
第一路由节点接收报文的时间信息和第二路由节点接收报文的时间信息之差;或者,第一路由节点发送报文的时间信息和第二路由节点发送报文的时间信息之差。
其中,第一路由节点对报文的处理时延为:第一路由节点发送报文的时间信息和第一路由节点接收报文的时间信息之差。
其中,第二路由节点对报文的处理时延为:第二路由节点发送报文的时间信息和第二路由节点接收报文的时间信息之差。
其中,第一路由节点和第二路由节点之间的传输链路对报文的传输时延为:第一路由节点接收报文的时间信息和第二路由节点发送报文的时间信息之差。
在本公开实施例中,不同的时延可以对应不同的报警信息,以及不同的预设阈值。
(四)针对第一时间戳信息包括第一路由节点接收报文的时间信息,第二时间戳信息包括第二路由节点接收报文的时间信息,且仅在部分路由节点均进行时延分析的情况,时延包括:
第一路由节点和最后一个添加了第二时间戳信息的第二路由节点之间的总传输时延;以及相邻两个添加了第二时间戳信息的第二路由节点之间的总传输时延。
其中,第一路由节点和最后一个添加了第二时间戳信息的第二路由节点之间的总传输时延为第一时间戳信息和第二时间戳信息之差。
其中,相邻两个添加了第二时间戳信息的第二路由节点之间的总传输时延为相邻两个添加了第二时间戳信息的第二路由节点的第二时间戳信息之差。
(五)针对第一时间戳信息包括第一路由节点发送报文的时间信息,第二时间戳信息包括第二路由节点发送报文的时间信息,且仅在部分路由节点均进行时延分析的情况,时延包括:
第一路由节点和最后一个添加了第二时间戳信息的第二路由节点之间的总传输时延;以及相邻两个添加了第二时间戳信息的第二路由节点之间的总传输时延。
其中,第一路由节点和最后一个添加了第二时间戳信息的第二路由节点之间的总传输时延为第一时间戳信息和第二时间戳信息之差。
其中,相邻两个添加了第二时间戳信息的第二路由节点之间的总传输时延为相邻两个添加了第二时间戳信息的第二路由节点的第二时间戳信息之差。
(六)针对第一时间戳信息包括:第一路由节点接收报文的时间信息和第一路由节点发送报文的时间信息,第二时间戳信息包括:第二路由节点接收报文的时间信息和第二路由节点发送报文的时间信息,且仅在部分路由节点均进行时延分析的情况,时延包括以下至少之一:
第一路由节点和最后一个添加了第二时间戳信息的第二路由节点之间的总传输时延;
相邻两个添加了第二时间戳信息的第二路由节点之间的总传输时延;
第一路由节点对报文的处理时延;
第二路由节点对报文的处理时延;
第一路由节点和最后一个添加了第二时间戳信息的第二路由节点之间的传输链路对报文的传输时延;
相邻两个添加了第二时间戳信息的第二路由节点之间的传输链路对报文的传输时延。
其中,第一路由节点和最后一个添加了第二时间戳信息的第二路由节点之间的总传输时延为:
第一路由节点接收报文的时间信息和第二路由节点接收报文的时间信息之差;或者,第一路由节点发送报文的时间信息和最后一个添加了第二时间戳信息的第二路由节点发送报文的时间信息之差。
其中,相邻两个添加了第二时间戳信息的第二路由节点之间的总传输时延为:
相邻两个添加了第二时间戳信息的第二路由节点中靠近第二客户终端的第二路由节点接收报文的时间信息和靠近第一客户终端的第二路由节点接收报文的时间信息之差;
或者,相邻两个添加了第二时间戳信息的第二路由节点中,靠近第二客户终端的第二路由节点发送报文的时间信息和靠近第一客户终端的第二路由节点发送报文的时间信息之差。
其中,第一路由节点对报文的处理时延为:第一路由节点发送报文的时间信息和第一路由节点接收报文的时间信息之差。
其中,第二路由节点对报文的处理时延为:第二路由节点发送报文的时间信息和第二路由节点接收报文的时间信息之差。
其中,第一路由节点和最后一个添加了第二时间戳信息的第二路由节点之间的传输链路对报文的传输时延为:第一路由节点接收报文的时间信息和最后一个添加了第二时间戳信息的第二路由节点发送报文的时间信息之差。
其中,相邻两个添加了第二时间戳信息的第二路由节点之间的传输链路对报文的传输时延为:相邻两个添加了第二时间戳信息的第二路由节点中,靠近第二客户终端的第二路由节点发送报文的时间信息和靠近第一客户终端的第二路由节点接收报文的时间信息之差。
在本公开实施例中,不同的时延可以对应不同的报警信息,以及不同的预设阈值。
本公开实施例提供的报文处理方法,通过在数据通路上的第一路由节点中为报文添加第一时间戳信息,以便后续根据第一时间戳信息进行时延分析,从而实现对数据通路的时延问题的排查。
上面的描述均针对单个执行主体来进行描述,为了更加清楚的描述时间戳信息的传递和分析过程,下面仍然以图1中的例子为例详细说明不同路由节点之间的时间戳信息的传递和分析,所列举的示例仅仅是为了说明方便,不用于限定本公开实施例的保护范围。
示例1
本示例中,客户终端A和客户终端B均为电力设备。这种电力设备发送报文的频率非常高(最低一秒2000报文),且设备内部均有时间模块检测对端设备发来的报文的时延进行统计,超过80毫秒(ms)就会报警,这个场景在4G网络中从来没有遇到过。由于对时延指标要求极高,用传统方法很难排查定位。因此需要在客户终端A和客户终端B之间的每一个路由节点均支持时间戳信息的添加。
本示例中,在客户终端A向客户终端B发送报文的过程中,客户终端A和客户终端B之间的数据通路上的每一个路由节点均添加本路由节点接收报文的时间,并进行时延分析。
本示例中,如图1所示,客户终端A通过网线连接到路由器R1,路由器R1进行5G或长期演进(LTE,Long Term Evolution)拨号,客户终端B同样通过网线连接到路由器R2,路由器R2进行5G或LTE拨号,路由器R1和路由器R2之间存在基站1、核心网网元C和基站2。
如图1所示,路由器R1上电后监听客户终端A发送的报文。如果接收到客户终端A发送的报文,在应用层截获报文,获取报文的应用层信息,在应用层信息的第一个字段前面添加格式为“tm=value”的信息;其中,value=t1,t1为路由器R1接收报文的时间;路由器R1将添加格式为“tm=value”的信息的报文发送给基站1。
基站1上电后监听路由器R1发送的报文。如果接收到路由器R1发送的报文,则在应用层截获报文,获取报文的应用层信息,判断应用层信息的第一个字段前面是否存在格式为“tm=value”的信息;如果应用层信息的第一个字段前面不存在格式为“tm=value”的信息,则将报文发送给核心网网元C;如果应用层信息的第一个字段前面存在格式为“tm=value”的信息,则由于基站1不是与客户终端B直连的路由节点,将应用层信息的第一个字段前面的格式为“tm=value”的信息中的value修改为t2,t2为基站1接收报文的时间;基站1将报文发送给核心网网元C;并且,基站1计算基站1和路由器R1之间的总传输时延,即t2和t1之差;如果t2和t1之差大于10毫秒(ms),则发出报警信息;如果t2和t1之差小于10ms,则说明基站1和路由器R1之间的时延稳定。
核心网网元C上电后监听基站1发送的报文。如果接收到基站1发送的报文,则在应用层截获报文,获取报文的应用层信息,判断应用层信息的第一个字段前面是否存在格式为“tm=value”的信息;如果应用层信息的第一个字段前面不存在格式为“tm=value”的信息,则将报文发送给基站2;如果应用层信息的第一个字段前面存在格式为“tm=value”的信息,则由于核心网网元C不是与客户终端B直连的路由节点,将应用层信息的第一个字段前面的格式为“tm=value”的信息中的value修改为t3,t3为核心网网元C接收报文的时间;核心网网元C将报文发送给基站2;并且,核心网网元C计算核心网网元C和基站1之间的总传输时延,即t3和t2之差;如果t3和t2之差大于10ms,则发出报警信息;如果t3和t2之差小于10ms,则说明核心网网元C和基站1之间的时延稳定。
基站2上电后监听核心网网元C发送的报文。如果接收到核心网网元C发送的报文,则在应用层截获报文,获取报文的应用层信息,判断应用层信息的第一个字段前面是否存在格式为“tm=value”的信息;如果应用层信息的第一个字段前面不存在格式为“tm=value”的信息,则将报文发送给路由器R2;如果应用层信息的第一个字段前面存在格式为“tm=value”的信息,则由于基站2不是与客户终端B直连的路由节点,将应用层信息的第一个字段前面的格式为“tm=value”的信息中的value修改为t4,t4 为基站2接收报文的时间;基站2将报文发送给路由器R2;并且,基站2计算基站2和核心网网元C之间的总传输时延,即t4和t3之差;如果t4和t3之差大于10ms,则发出报警信息;如果t4和t3之差小于10ms,则说明基站2和核心网网元C之间的时延稳定。
路由器R2上电后监听基站2发送的报文。如果接收到基站2发送的报文,则在应用层截获报文,获取报文的应用层信息,判断应用层信息的第一个字段前面是否存在格式为“tm=value”的信息;如果应用层信息的第一个字段前面不存在格式为“tm=value”的信息,则将报文发送给客户终端B;如果应用层信息的第一个字段前面存在格式为“tm=value”的信息,则由于路由器R2是与客户终端B直连的路由节点,将应用层信息的第一个字段前面的格式为“tm=value”的信息删除;路由器R2将报文发送给客户终端B;并且,路由器R2计算路由器R2和基站2之间的总传输时延,即t5和t4之差,t5为路由器R2接收报文的时间;如果t5和t4之差大于10ms,则发出报警信息;如果t5和t4之差小于10ms,则说明路由器R2和基站2之间的时延稳定。
示例2
本示例中,客户终端A和客户终端B均为电力设备。这种电力设备发送报文的频率非常高(最低一秒2000报文),且设备内部均有时间模块检测对端设备发来的报文的时延进行统计,超过80毫秒(ms)就会报警,这个场景在4G网络中从来没有遇到过。由于对时延指标要求极高,用传统方法很难排查定位,因此需要在客户终端A和客户终端B之间的每一个路由节点均支持时间戳信息的添加。
本示例中,在客户终端A向客户终端B发送报文的过程中,客户终端A和客户终端B之间的数据通路上的每一个路由节点均添加本路由节点接收报文的时间,并仅在路由器R2上进行时延分析。
本示例中,如图1所示,客户终端A通过网线连接到路由器R1,路由器R1进行5G或长期演进(LTE,Long Term Evolution)拨号,客户终端B同样通过网线连接到路由器R2,路由器R2进行5G或LTE拨号,路由器R1和路由器R2之间存在基站1、核心网网元C和基站2。
如图1所示,路由器R1上电后监听客户终端A发送的报文。如果接收到客户终端A发送的报文,则在应用层截获报文,获取报文的应用层信息,在应用层信息的第一个字段前面添加格式为“tm=value”的信息;其中,value=t1,t1为路由器R1接收报文的时间;路由器R1将添加格式为“tm=value”的信息的报文发送给基站1。
基站1上电后监听路由器R1发送的报文。如果接收到路由器R1发送的报文,则在应用层截获报文,获取报文的应用层信息,判断应用层信息的第一个字段前面是否存在格式为“tm=value”的信息;如果应用层信息的第一个字段前面不存在格式为“tm=value”的信息,则将报文发送给核心网网元C;如果应用层信息的第一个字段前面存在格式为“tm=value”的信息,则由于基站1不是与客户终端B直连的路由节点,在应用层信息的第一个字段前面添加格式为“tm=value”的信息;其中,value=t2,t2为基站1接收报文的时间;也就是说,应用层信息的第一个字段前面包括tm=t1的信息和tm=t2的信息;基站1将报文发送给核心网网元C。
核心网网元C上电后监听基站1发送的报文。如果接收到基站1发送的报文,则在应用层截获报文,获取报文的应用层信息,判断应用层信息的第一个字段前面是否存在格式为“tm=value”的信息;如果应用层信息的第一个字段前面不存在格式为“tm=value”的信息,则将报文发送给基站2;如果应用层信息的第一个字段前面存在格式为“tm=value”的信息,则由于核心网网元C不是与客户终端B直连的路由节点,在应用层信息的第一个字段前面添加格式为“tm=value”的信息;其中,value=t3,t3为核心网网元C接收报文的时间;也就是说,应用层信息的第一个字段前面包括tm=t1的信息、tm=t2的信息和tm=t3的信息;核心网网元C将报文发送给基站2。
基站2上电后监听核心网网元C发送的报文。如果接收到核心网网元C发送的报文,则在应用层截获报文,获取报文的应用层信息,判断应用层信息的第一个字段前面是否存在格式为“tm=value”的信息;如果应用层信息的第一个字段前面不存在格式为“tm=value”的信息,则将报文发送给路由器R2;如果应用层信息的第一个字段前面存在格式为“tm=value” 的信息,则由于基站2不是与客户终端B直连的路由节点,在应用层信息的第一个字段前面添加格式为“tm=value”的信息;其中,value=t4,t4为基站2接收报文的时间;也就是说,应用层信息的第一个字段前面包括tm=t1的信息、tm=t2的信息、tm=t3的信息和tm=t4的信息;基站2将报文发送给路由器R2。
路由器R2上电后监听基站2发送的报文。如果接收到基站2发送的报文,则在应用层截获报文,获取报文的应用层信息,判断应用层信息的第一个字段前面是否存在格式为“tm=value”的信息;如果应用层信息的第一个字段前面不存在格式为“tm=value”的信息,则将报文发送给客户终端B;如果应用层信息的第一个字段前面存在格式为“tm=value”的信息,则由于路由器R2是与客户终端B直连的路由节点,将应用层信息的第一个字段前面的格式为“tm=value”的信息删除;也就是说,删除应用层信息的第一个字段前面包括的tm=t1的信息、tm=t2的信息、tm=t3的信息和tm=t4的信息;路由器R2将报文发送给客户终端B。
并且,路由器R2计算基站1和路由器R1之间的总传输时延,即t2和t1之差;如果t2和t1之差大于10ms,则发出报警信息;如果t2和t1之差小于10ms,则说明基站1和路由器R1之间的时延稳定。
路由器R2计算核心网网元C和基站1之间的总传输时延,即t3和t2之差;如果t3和t2之差大于10ms,则发出报警信息;如果t3和t2之差小于10ms,则说明核心网网元C和基站1之间的时延稳定。
路由器R2计算基站2和核心网网元C之间的总传输时延,即t4和t3之差;如果t4和t3之差大于10ms,则发出报警信息;如果t4和t3之差小于10ms,则说明基站2和核心网网元C之间的时延稳定。
路由器R2计算路由器R2和基站2之间的总传输时延,即t5和t4之差,t5为路由器R2接收报文的时间;如果t5和t4之差大于10ms,则发出报警信息;如果t5和t4之差小于10ms,则说明路由器R2和基站2之间的时延稳定。
第二方面,本公开实施例提供一种电子设备,包括:
至少一个处理器;
存储器,存储器上存储有至少一个程序,当至少一个程序被至少一个处理器执行时,实现上述任意一种报文处理方法。
其中,处理器为具有数据处理能力的器件,其包括但不限于中央处理器(CPU)等;存储器为具有数据存储能力的器件,其包括但不限于随机存取存储器(RAM,更具体如SDRAM、DDR等)、只读存储器(ROM)、带电可擦可编程只读存储器(EEPROM)、闪存(FLASH)。
在一些实施例中,处理器、存储器通过总线相互连接,进而与计算设备的其它组件连接。
第三方面,本公开实施例提供一种计算机可读存储介质,计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现上述任意一种报文处理方法。
图3为本公开另一个实施例提供的报文处理装置的组成框图。
第四方面,参照图3,本公开另一个实施例提供一种报文处理装置,包括:
报文接收模块301,被构造成接收报文;
报文处理模块302,被构造成在需要为所述报文添加第一时间戳信息的情况下,为所述报文添加所述第一时间戳信息;其中,所述第一时间戳信息包括:所述第一路由节点对所述报文的传输时间信息;
报文发送模块303,被构造成发送添加所述第一时间戳信息后的报文。
在一些示例性实施例中,报文接收模块301具体被构造成:接收第一客户终端发送的报文;
报文处理模块302具体被构造成采用以下方式实现所述为报文添加第一时间戳信息:在应用层截获所述报文;获取所述报文的应用层信息;在所述应用层信息中添加所述第一时间戳信息。
在一些示例性实施例中,报文接收模块301具体被构造成:接收网络侧网元节点发送的报文;
所述需要为报文添加第一时间戳信息包括:所述报文中已经添加了第二时间戳信息,且所述第一路由节点不是与第二客户终端直连的路由节点;其中,所述第二时间戳信息包括:第二路由节点对所述报文的传输时间信息。
在一些示例性实施例中,报文处理模块302还被构造成:根据所述第一时间戳信息和所述第二时间戳信息计算时延;以及在所述时延大于预设阈值的情况下,发出报警信息。
在一些示例性实施例中,报文处理模块302还被构造成:在所述报文中已经添加了第二时间戳信息,且所述第一路由节点为与第二客户终端直连的路由节点的情况下,将所述第二时间戳信息删除。
报文发送模块303还被构造成:将删除所述第二时间戳信息后的报文发送给所述第二客户终端。
在一些示例性实施例中,报文处理模块302具体被构造成采用以下方式实现所述为报文添加第一时间戳信息:将所述第二时间戳信息修改为所述第一时间戳信息。
在一些示例性实施例中,报文处理模块302具体被构造成采用以下方式实现所述为报文添加第一时间戳信息:获取所述报文的应用层信息,在所述应用层信息中添加所述第一时间戳信息。
在一些示例性实施例中,报文处理模块302具体被构造成采用以下方式实现所述在应用层信息中添加第一时间戳信息:在所述应用层信息的最前面添加所述第一时间戳信息。
在一些示例性实施例中,报文处理模块302具体被构造成采用以下方式实现所述在应用层信息中添加第一时间戳信息:在所述应用层信息的中间位置添加所述第一时间戳信息。
在一些示例性实施例中,报文处理模块302具体被构造成采用以下方式实现所述在应用层信息中添加第一时间戳信息:在所述应用层信息的末尾添加所述第一时间戳信息。
在一些示例性实施例中,报文处理模块302具体被构造成采用以下方 式实现所述在应用层信息的中间位置添加第一时间戳信息:在所述应用层信息的任意两个字段之间添加所述第一时间戳信息。
在一些示例性实施例中,报文处理模块302具体被构造成采用以下方式实现所述在应用层信息的中间位置添加第一时间戳信息:在所述应用层信息的前N个字段的任意两个字段之间添加所述第一时间戳信息;其中,N为大于或等于2的整数。
在一些示例性实施例中,所述传输时间信息包括以下至少之一:接收所述报文的时间信息、发送所述报文的时间信息。
在一些示例性实施例中,报文接收模块301具体被构造成:接收第一客户终端发送的报文;
所述报文处理装置还包括:封包或解包模块304,被构造成对添加第一时间戳信息后的报文进行封装。
报文发送模块303具体被构造成:发送封装后的报文。
在一些示例性实施例中,报文接收模块301具体被构造成:接收网络侧网元节点发送的报文。
封包或解包模块304,还被构造成对报文进行解封装。
报文处理模块302具体被构造成:在需要为解封装后的报文添加第一时间戳信息的情况下,为解封装后的报文添加所述第一时间戳信息。
封包或解包模块304还被构造成:对添加第一时间戳信息后的报文进行封装。
报文发送模块303具体被构造成:发送封装后的报文。
上述报文处理装置的具体实现过程与前述实施例报文处理方法的具体实现过程相同,这里不再赘述。
本领域普通技术人员可以理解,上文中所公开方法中的全部或某些步骤、***、装置中的功能模块/单元可以被实施为软件、固件、硬件及其适当的组合。在硬件实施方式中,在以上描述中提及的功能模块/单元之间的划分不一定对应于物理组件的划分;例如,一个物理组件可以具有多个功 能,或者一个功能或步骤可以由若干物理组件合作执行。某些物理组件或所有物理组件可以被实施为由处理器,如中央处理器、数字信号处理器或微处理器执行的软件,或者被实施为硬件,或者被实施为集成电路,如专用集成电路。这样的软件可以分布在计算机可读介质上,计算机可读介质可以包括计算机存储介质(或非暂时性介质)和通信介质(或暂时性介质)。如本领域普通技术人员公知的,术语计算机存储介质包括在用于存储信息(诸如计算机可读指令、数据结构、程序模块或其它数据)的任何方法或技术中实施的易失性和非易失性、可移除和不可移除介质。计算机存储介质包括但不限于RAM、ROM、EEPROM、闪存或其它存储器技术、CD-ROM、数字多功能盘(DVD)或其它光盘存储、磁盒、磁带、磁盘存储或其它磁存储器、或者可以用于存储期望的信息并且可以被计算机访问的任何其它的介质。此外,本领域普通技术人员公知的是,通信介质通常包含计算机可读指令、数据结构、程序模块或者诸如载波或其它传输机制之类的调制数据信号中的其它数据,并且可包括任何信息递送介质。
本文已经公开了示例实施例,并且虽然采用了具体术语,但它们仅用于并仅应当被解释为一般说明性含义,并且不用于限制的目的。在一些实例中,对本领域技术人员显而易见的是,除非另外明确指出,否则可单独使用与特定实施例相结合描述的特征、特性和/或元素,或可与其它实施例相结合描述的特征、特性和/或元件组合使用。因此,本领域技术人员将理解,在不脱离由所附的权利要求阐明的本公开的范围的情况下,可进行各种形式和细节上的改变。

Claims (16)

  1. 一种报文处理方法,应用于第一路由节点,该方法包括:
    接收报文;
    在需要为所述报文添加第一时间戳信息的情况下,为所述报文添加所述第一时间戳信息;其中,所述第一时间戳信息包括:所述第一路由节点对所述报文的传输时间信息;
    发送添加所述第一时间戳信息后的报文。
  2. 根据权利要求1所述的报文处理方法,其中,
    所述接收报文包括:接收第一客户终端发送的报文;
    所述为报文添加第一时间戳信息包括:在应用层截获所述报文;获取所述报文的应用层信息;在所述应用层信息中添加所述第一时间戳信息。
  3. 根据权利要求1所述的报文处理方法,其中,
    所述接收报文包括:接收网络侧网元节点发送的报文;
    所述需要为报文添加第一时间戳信息包括:所述报文中已经添加了第二时间戳信息,且所述第一路由节点不是与第二客户终端直连的路由节点;其中,所述第二时间戳信息包括:第二路由节点对所述报文的传输时间信息。
  4. 根据权利要求3所述的报文处理方法,所述接收报文后,该方法还包括:
    根据所述第一时间戳信息和所述第二时间戳信息计算时延;
    在所述时延大于预设阈值的情况下,发出报警信息。
  5. 根据权利要求3所述的报文处理方法,在所述报文中已经添加了第二时间戳信息,且所述第一路由节点为与第二客户终端直连的路由节点的情况下,该方法还包括:
    将所述第二时间戳信息删除;
    将删除所述第二时间戳信息后的报文发送给所述第二客户终端。
  6. 根据权利要求3所述的报文处理方法,其中,所述为报文添加第一时间戳信息包括:
    将应用层信息中的所述第二时间戳信息修改为所述第一时间戳信息。
  7. 根据权利要求3所述的报文处理方法,其中,所述为报文添加第一时间戳信息包括:
    在所述应用层信息中添加所述第一时间戳信息。
  8. 根据权利要求2或7所述的报文处理方法,其中,所述在应用层信息中添加第一时间戳信息包括:
    在所述应用层信息的最前面添加所述第一时间戳信息。
  9. 根据权利要求2或7所述报文处理方法,其中,所述在应用信息中添加第一时间戳信息包括:
    在所述应用层信息的中间位置添加所述第一时间戳信息。
  10. 根据权利要求9所述的报文处理方法,其中,所述在应用层信息的中间位置添加第一时间戳信息包括:
    在所述应用层信息的任意两个字段之间添加所述第一时间戳信息。
  11. 根据权利要求9所述的报文处理方法,其中,所述在应用层信息的中间位置添加第一时间戳信息包括:
    在所述应用层信息的前N个字段的任意两个字段之间添加所述第一时间戳信息;其中,N为大于或等于2的整数。
  12. 根据权利要求2或7所述报文处理方法,其中,所述在应用信息中添加第一时间戳信息包括:
    在所述应用层信息的末尾添加所述第一时间戳信息。
  13. 根据权利要求1或3所述的报文处理方法,其中,所述传输时间信息包括以下至少之一:接收所述报文的时间信息、发送所述报文的时间信息。
  14. 一种电子设备,包括:
    至少一个处理器;
    存储器,所述存储器上存储有至少一个程序,当所述至少一个程序被所述至少一个处理器执行时,实现根据权利要求1-13任意一项所述的报文处理方法。
  15. 一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现根据权利要求1-13任意一项所述的报文处理方法。
  16. 一种报文处理装置,包括:
    报文接收模块,被构造成接收报文;
    时间戳信息添加模块,被构造成在需要为所述报文添加第一时间戳信 息的情况下,为所述报文添加所述第一时间戳信息;其中,所述第一时间戳信息包括:所述第一路由节点对所述报文的传输时间信息;
    报文发送模块,被构造成发送添加所述第一时间戳信息后的报文。
PCT/CN2022/083267 2021-04-21 2022-03-28 报文处理方法和装置、电子设备、计算机可读存储介质 WO2022222693A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110433524.XA CN115242682A (zh) 2021-04-21 2021-04-21 报文处理方法和装置、电子设备、计算机可读存储介质
CN202110433524.X 2021-04-21

Publications (1)

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

Family

ID=83665933

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/083267 WO2022222693A1 (zh) 2021-04-21 2022-03-28 报文处理方法和装置、电子设备、计算机可读存储介质

Country Status (2)

Country Link
CN (1) CN115242682A (zh)
WO (1) WO2022222693A1 (zh)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007056915A1 (en) * 2005-11-17 2007-05-24 Huawei Technologies Co., Ltd. A method for measuring mpls network performance parameter and device and system for transmitting packet
US20100125661A1 (en) * 2008-11-20 2010-05-20 Valtion Teknillinen Tutkimuskesku Arrangement for monitoring performance of network connection
CN101997774A (zh) * 2010-11-03 2011-03-30 华为数字技术有限公司 一种转发时延的记录方法及路由器
CN107508719A (zh) * 2017-02-15 2017-12-22 北京中航通用科技有限公司 测量网络时延的方法、装置及网络节点
CN108075935A (zh) * 2016-11-15 2018-05-25 华为技术有限公司 测量时延的方法及设备
CN111585834A (zh) * 2020-04-14 2020-08-25 中国联合网络通信集团有限公司 一种网络信息的存储方法和装置
WO2021047668A1 (zh) * 2019-09-12 2021-03-18 华为技术有限公司 路径探测方法、装置及计算机存储介质
CN112565017A (zh) * 2020-12-04 2021-03-26 盛科网络(苏州)有限公司 一种基于SRv6 SID的时延测量方法及装置

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007056915A1 (en) * 2005-11-17 2007-05-24 Huawei Technologies Co., Ltd. A method for measuring mpls network performance parameter and device and system for transmitting packet
US20100125661A1 (en) * 2008-11-20 2010-05-20 Valtion Teknillinen Tutkimuskesku Arrangement for monitoring performance of network connection
CN101997774A (zh) * 2010-11-03 2011-03-30 华为数字技术有限公司 一种转发时延的记录方法及路由器
CN108075935A (zh) * 2016-11-15 2018-05-25 华为技术有限公司 测量时延的方法及设备
CN107508719A (zh) * 2017-02-15 2017-12-22 北京中航通用科技有限公司 测量网络时延的方法、装置及网络节点
WO2021047668A1 (zh) * 2019-09-12 2021-03-18 华为技术有限公司 路径探测方法、装置及计算机存储介质
CN111585834A (zh) * 2020-04-14 2020-08-25 中国联合网络通信集团有限公司 一种网络信息的存储方法和装置
CN112565017A (zh) * 2020-12-04 2021-03-26 盛科网络(苏州)有限公司 一种基于SRv6 SID的时延测量方法及装置

Also Published As

Publication number Publication date
CN115242682A (zh) 2022-10-25

Similar Documents

Publication Publication Date Title
US20200358886A1 (en) Data Transmission Method, Apparatus, And System
CN109391560B (zh) 网络拥塞的通告方法、代理节点及计算机设备
US11533254B2 (en) Packet processing method, related device, and computer storage medium
EP3767890B1 (en) Method and apparatus for monitoring service quality
US11063817B2 (en) In-situ OAM trace type extension with cascade bitmap and segment in-situ OAM
US20200413299A1 (en) Multichannel data transmission method and apparatus
CN110022264B (zh) 控制网络拥塞的方法、接入设备和计算机可读存储介质
US10148573B2 (en) Packet processing method, node, and system
US7912911B2 (en) Method and system for increasing throughput rate by dynamically modifying connection parameters
US10284460B1 (en) Network packet tracing
US8599692B2 (en) System, apparatus and method for removing unwanted information from captured data packets
CN109120540B (zh) 传输报文的方法、代理服务器和计算机可读存储介质
CN109600248B (zh) 服务质量的确定方法、装置及存储介质
CN113055293A (zh) 软件定义广域网中的选路方法及装置、通信***
CN111490907B (zh) 一种确定vxlan网络性能参数的方法及装置
WO2020114083A1 (zh) 一种ioam信息的处理方法和装置
CN114363955A (zh) 报文转发方法、报文发送方法、设备和计算机可读介质
CN109995603B (zh) 一种Tag模型下丢包测量的方法、装置及电子设备
WO2022222693A1 (zh) 报文处理方法和装置、电子设备、计算机可读存储介质
WO2022174672A1 (zh) 时延测量方法、装置、设备和计算机可读存储介质
US20190140965A1 (en) Method for obtaining path information of data packet and device
WO2023185662A1 (zh) 实现网络底层资源感知的确定***方法、电子设备、计算机可读存储介质
CN112087778A (zh) 一种无线数传方法及***
WO2022021109A1 (en) Traffic class handling
WO2024021573A1 (zh) 基于网络切片的通信方法、电子设备和存储介质

Legal Events

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

Ref document number: 22790802

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 28.02.2024)