WO2021128927A1 - 报文的处理方法及装置、存储介质和电子装置 - Google Patents

报文的处理方法及装置、存储介质和电子装置 Download PDF

Info

Publication number
WO2021128927A1
WO2021128927A1 PCT/CN2020/113079 CN2020113079W WO2021128927A1 WO 2021128927 A1 WO2021128927 A1 WO 2021128927A1 CN 2020113079 W CN2020113079 W CN 2020113079W WO 2021128927 A1 WO2021128927 A1 WO 2021128927A1
Authority
WO
WIPO (PCT)
Prior art keywords
message
same
packet
int
hash value
Prior art date
Application number
PCT/CN2020/113079
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 US17/789,224 priority Critical patent/US20230042747A1/en
Publication of WO2021128927A1 publication Critical patent/WO2021128927A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/30Peripheral units, e.g. input or output ports
    • H04L49/3036Shared queuing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/30Peripheral units, e.g. input or output ports
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers

Definitions

  • the present invention relates to the field of computers, and in particular, to a message processing method and device, storage medium and electronic device.
  • the embodiment of the present invention provides a message processing method and device, a storage medium, and an electronic device to solve the problem of large consumption of network bandwidth by realizing network status monitoring at the protocol layer in related technologies.
  • a message processing method including: acquiring a first message sent by a processing engine IPE in the inbound direction of the switch, and acquiring a second message sent by the processing engine EPE in the outbound direction of the switch; wherein ,
  • the first message header includes data collected by in-band network telemetry INT, and the first message is the same as the second message; the first message is Recognizing the same packet flow as the second packet; combining the first packet and the second packet identified as the same packet flow into an INT report and sending it to the target device.
  • a message processing device including: an acquisition module configured to acquire the first message sent by the processing engine IPE in the inbound direction of the switch, and acquire the message sent by the processing engine EPE in the outbound direction of the switch The second message; wherein, the first message header includes data collected by in-band network telemetry INT, and the first message is the same as the second message; the identification module is set to be based on the message header The key information of the part identifies the first message and the second message as the same message flow; the sending module is configured to identify the first message and the first message as the same message flow.
  • the two messages are merged and reorganized into an INT report and sent to the target device.
  • a storage medium in which a computer program is stored, wherein the computer program is configured to execute the steps in any one of the foregoing method embodiments when running.
  • an electronic device including a memory and a processor, the memory is stored with a computer program, and the processor is configured to run the computer program to execute any of the above Steps in the method embodiment.
  • the first message sent by the processing engine IPE of the switch inbound is acquired, and the second message sent by the processing engine EPE of the switch is acquired, and then the first message and the second message are combined according to the key information in the message header.
  • the message is identified as the same message flow, and finally the first message and the second message identified as the same message flow are combined and reorganized into an INT report and sent to the target device.
  • FIG. 1 is a block diagram of the hardware structure of a terminal of a method for processing a message according to an embodiment of the present invention
  • FIG. 2 is a flowchart of a message processing method according to an embodiment of the present invention.
  • Fig. 3 is a schematic diagram of a chip implementation method of an INT sink node according to an embodiment of the present invention
  • FIG. 4 is a schematic diagram of a bus structure for packet forwarding within a chip according to an embodiment of the present invention
  • Fig. 5 is a structural block diagram of a message processing device according to an embodiment of the present invention.
  • Inband Network Telemetry is a network architecture that does not require the intervention of the control layer to realize the function of collecting and reporting network status at the data layer.
  • the message contains the INT Header, which can be understood as a "telemetry command" issued by a network device. These instructions tell the online network device to insert the relevant information that INT needs to collect into the message passing the INT node.
  • One of the INT domains contains three types of node devices, which are source node, transmit node, and sink node.
  • the INT source node is a network device that inserts telemetry instructions into the data message.
  • the INT transmit node is a network device that is responsible for inserting relevant information of the node into the data message according to the telemetry instruction.
  • the INT sink node sends an INT report to the target. Device and decapsulate the network device of the INT packet. The INT report sent by the INT sink node needs to contain relevant information about the node.
  • FIG. 1 is a hardware structural block diagram of a terminal of a method for processing a message according to an embodiment of the present invention.
  • the terminal 10 may include one or more (only one is shown in FIG. 1) processor 102 (the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA) And the memory 104 for storing data.
  • the aforementioned terminal may also include a transmission device 106 and an input/output device 108 for communication functions.
  • FIG. 1 is only for illustration, and it does not limit the structure of the foregoing terminal.
  • the terminal 10 may also include more or fewer components than those shown in FIG. 1, or have a configuration different from that shown in FIG.
  • the memory 104 may be used to store computer programs, for example, software programs and modules of application software, such as the computer programs corresponding to the message processing method in the embodiment of the present invention.
  • the processor 102 runs the computer programs stored in the memory 104, thereby Execute various functional applications and data processing, that is, realize the above-mentioned methods.
  • the memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory.
  • the memory 104 may further include a memory remotely provided with respect to the processor 102, and these remote memories may be connected to the terminal 10 via a network. Examples of the aforementioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
  • the transmission device 106 is used to receive or send data via a network.
  • the above-mentioned specific examples of the network may include a wireless network provided by the communication provider of the terminal 10.
  • the transmission device 106 includes a network adapter (Network Interface Controller, NIC for short), which can be connected to other network devices through a base station so as to communicate with the Internet.
  • the transmission device 106 may be a radio frequency (Radio Frequency, referred to as RF) module, which is used to communicate with the Internet in a wireless manner.
  • RF Radio Frequency
  • FIG. 2 is a flowchart of a message processing method according to an embodiment of the present invention. As shown in FIG. 2, the process includes the following steps:
  • Step S202 Obtain the first packet sent by the Ingress Process Engine (IPE) of the switch, and obtain the second packet sent by the Egress Process Engine (EPE) of the switch; where, The header of the first message includes data collected by the in-band network telemetry INT, and the first message is the same as the second message;
  • IPE Ingress Process Engine
  • EPE Egress Process Engine
  • the INT collected data in this embodiment may be Source node and Transit node data in a specific application scenario, and the second message includes the collected sink node data in the chip Bridge Header.
  • Step S204 Identify the first message and the second message as the same message flow according to the key information in the message header;
  • Step S206 Combine the first message and the second message identified as the same message flow into an INT report and send it to the target device.
  • the first packet sent by the processing engine IPE in the inbound direction of the switch is obtained, and the second packet sent by the processing engine EPE in the outbound direction of the switch is obtained.
  • the message and the second message are identified as the same message flow.
  • the first message and the second message identified as the same message flow are combined and reorganized into an INT report and sent to the target device. It is visible that there is no need to change the current
  • the INT information of the switch is inserted into the message to realize the function of the INT sink node, which solves the problem of large consumption of network bandwidth by implementing network status monitoring at the protocol layer in related technologies, and reduces the consumption of network bandwidth.
  • the execution subject of the method steps in this embodiment may be a chip, such as an Application Specific Integrated Circuit (ASIC) chip, or a Field Programmable Gate Array (Field Programmable Gata Array, abbreviated as FPGA) chip, or NP, etc., can be adjusted accordingly according to the actual situation.
  • ASIC Application Specific Integrated Circuit
  • FPGA Field Programmable Gate Array
  • the method of obtaining the first packet sent by the switch inbound to the processing engine IPE involved in step S202 may further be: obtaining the first packet forwarded by the IPE to the switch queue buffer processing engine (Buffer Store and retrieve (referred to as BSR for short) the first message; among them, after receiving the first message, the BSR copies the first message and forwards the copied first message to the EPE;
  • BSR Buffer Store and retrieve
  • the manner of acquiring the second packet sent by the switch outbound processing engine EPE involved in step S202 it may further be: acquiring the second packet forwarded by the EPE to the BSR, where After receiving the second message, the BSR copies the second message and forwards the copied second message to the EPE.
  • step S202 the above method of obtaining the first message and the second message, in a specific application scenario, taking the execution subject as the chip as an example, since the first message will be forwarded to the chip by the BSR after being forwarded to the BSR Processor, and the BSR will copy the first message and forward it to the EPE.
  • the key information of the packet header in this embodiment includes: the ingress port, the time stamp in the ingress direction, and the quintuple.
  • the ingress port, ingress time stamp, and quintuple in the message information are carried in the Bridge Header.
  • the method of identifying the first message and the second message as the same message flow according to message information involved in step S204 may further include:
  • Step S204-11 Calculate the first hash value according to the ingress port, the ingress time stamp and the quintuple in the first message;
  • Step S204-12 Calculate the second hash value according to the ingress port, the ingress time stamp and the quintuple in the second message; among them, the message header carried in the first message information and the second message When the key information of the part is the same, the first hash value and the second hash value are the same;
  • Step S204-13 Identify the first message and the second message as the same message flow according to the first hash value and the second hash value.
  • the key information of the message header is the ingress port, the ingress time stamp and the hash value calculated from the quintuple to identify it as the same message flow.
  • the method of calculating the hash value can make it more accurate to identify whether the message is the same message flow.
  • the method of sending the first message and the second message identified as the same message flow to the target device involved in step S206 may further be: according to the in-band network telemetry INT message
  • the protocol combines the first message and the second message identified as the same message flow into an INT report and sends it to the target device.
  • a chip implementation method of an INT sink node is provided. As shown in FIG. 3, the steps of the method include:
  • Step S11 in the inbound direction of the switch, the chip forwards the message to the BSR;
  • this step S11 includes receiving the message and parsing the INT message, judging by the flow table whether INT sink processing is needed, and the message is sent to the CPU for information processing.
  • Step S12 the BSR copies a message to the CPU
  • step S12 may further include collecting the ingress port, the ingress time stamp, the hash value information calculated according to the quintuple, and forming the Bridge Header.
  • Step S13 the BSR forwards the message to the EPE
  • this step S13 further includes queue buffering and forwarding information processing.
  • Step S14 the EPE sends a message to the BSR, and at the same time forwards the message;
  • this step 4 further includes information processing of decapsulating the INT message and sending the message to the CPU.
  • Step S15 the BSR copies a packet to the CPU; the CPU recognizes the two packets as the same flow according to the inbound port, inbound direction timestamp and the hash value calculated by the 5-tuple in the Bridge Header, and then composes the Report according to the INT Report protocol The message is sent to the monitoring device.
  • this step S15 further includes collecting metadata of the current switch and forming a Bridge Header.
  • the bus structure of message forwarding within the chip is shown in Figure 4.
  • the chip realizes the decapsulation of the INT packet of the sink node, and the CPU sends two copies of the IPE and EPE according to the inbound port, inbound direction timestamp and the hash value calculated by the quintuple in the Bridge Header
  • the message is identified as the same flow, and the Report message is sent to the monitoring device according to the INT Report protocol, which can realize the function of the INT sink node.
  • the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, of course, it can also be implemented by hardware, but in many cases the former is Better implementation.
  • the technical solution of the present invention essentially or the part that contributes to the existing technology can be embodied in the form of a software product, and the computer software product is stored in a storage medium (such as ROM/RAM, magnetic disk, The optical disc) includes a number of instructions to enable a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the method described in each embodiment of the present invention.
  • a message processing device is also provided, which is used to implement the above-mentioned embodiments and preferred implementations, and the descriptions that have already been described will not be repeated.
  • the term "module” can implement a combination of software and/or hardware with predetermined functions.
  • the devices described in the following embodiments are preferably implemented by software, implementation by hardware or a combination of software and hardware is also possible and conceived.
  • Fig. 5 is a structural block diagram of a message processing device according to an embodiment of the present invention. As shown in Fig. 5, the device includes:
  • the obtaining module 52 is configured to obtain the first packet sent by the processing engine IPE of the switch in the inbound direction, and obtain the second packet sent by the processing engine EPE in the outbound direction of the switch; wherein, the header of the first packet includes the in-band network Telemetry data collected by INT, and the first message is the same as the second message;
  • the identification module 54 is configured to identify the first message and the second message as the same message flow according to the key information in the message header;
  • the sending module 56 is configured to reorganize the first message and the second message that are identified as the same message flow and reorganize the INT report and send it to the target device.
  • the acquiring module 52 in this embodiment may further include: a first acquiring unit configured to acquire the first packet forwarded by the IPE to the switch queue buffer processing engine BSR; wherein, the BSR receives the first packet Then, the first message is copied and the copied first message is forwarded to the EPE; the second acquiring unit is set to acquire the second message forwarded by the EPE to the BSR, where the BSR receives the first message After the second message, copy the second message and forward the copied second message to the EPE.
  • a first acquiring unit configured to acquire the first packet forwarded by the IPE to the switch queue buffer processing engine BSR; wherein, the BSR receives the first packet Then, the first message is copied and the copied first message is forwarded to the EPE
  • the second acquiring unit is set to acquire the second message forwarded by the EPE to the BSR, where the BSR receives the first message After the second message, copy the second message and forward the copied second message to the EPE.
  • the key information of the packet header in this embodiment further includes: an ingress port, an ingress time stamp, and a quintuple.
  • the identification module 54 in this embodiment may further include: a first calculation unit configured to calculate the first message according to the ingress port, ingress direction timestamp and quintuple in the first message A hash value; the second calculation unit is set to calculate the second hash value according to the ingress port, the inbound direction timestamp and the quintuple in the second message; among them, the information in the first message and the second message
  • the identification unit is set to divide the first hash value according to the first hash value and the second hash value. The first message and the second message are identified as the same message flow.
  • the sending module 56 in this embodiment is further configured to combine and reassemble the first message and the second message identified as the same message flow into an INT report according to the in-band network telemetry INT message protocol. To the target device.
  • each of the above modules can be implemented by software or hardware.
  • it can be implemented in the following manner, but not limited to this: the above modules are all located in the same processor; or, the above modules can be combined in any combination.
  • the forms are located in different processors.
  • the embodiment of the present invention also provides a storage medium in which a computer program is stored, wherein the computer program is configured to execute the steps in any one of the foregoing method embodiments when running.
  • the aforementioned storage medium may be configured to store a computer program for executing the following steps:
  • the foregoing storage medium may include, but is not limited to: U disk, Read-Only Memory (Read-Only Memory, ROM for short), Random Access Memory (Random Access Memory, RAM for short), Various media that can store computer programs, such as mobile hard disks, magnetic disks, or optical disks.
  • An embodiment of the present invention also provides an electronic device, including a memory and a processor, the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the foregoing method embodiments.
  • the aforementioned electronic device may further include a transmission device and an input-output device, wherein the transmission device is connected to the aforementioned processor, and the input-output device is connected to the aforementioned processor.
  • the foregoing processor may be configured to execute the following steps through a computer program:
  • modules or steps of the present invention can be implemented by a general computing device, and they can be concentrated on a single computing device or distributed in a network composed of multiple computing devices.
  • they can be implemented with program codes executable by the computing device, so that they can be stored in the storage device for execution by the computing device, and in some cases, can be executed in a different order than here.

Abstract

本发明提供了一种报文的处理方法及装置、存储介质和电子装置,其中,该方法包括:获取交换机入方向处理引擎IPE发送的第一报文,并获取交换机出方向处理引擎EPE发送的第二报文;其中,第一报文头部包括带内网络遥测INT收集的数据,且第一报文与第二报文相同;根据报文头部的关键信息将第一报文和第二报文识别为同一条报文流;将识别为同一条报文流的第一报文和第二报文合并重组为INT报告并发送给目标设备。通过本发明,解决了相关技术中在协议层实现网络状态监控对网络带宽消耗大的问题。

Description

报文的处理方法及装置、存储介质和电子装置 技术领域
本发明涉及计算机领域,具体而言,涉及一种报文的处理方法及装置、存储介质和电子装置。
背景技术
传统的网络状态监控,通常是在协议层实现的,即通过协议下发收集网络状态的指令给交换机,交换机再返回其状态给监控设备,这种方法不仅会消耗大量网络带宽,甚至会造成网络堵塞的风险。
针对相关技术中的上述问题,目前尚未存在有效的解决方案。
发明内容
本发明实施例提供了一种报文的处理方法及装置、存储介质和电子装置,以解决相关技术中在协议层实现网络状态监控对网络带宽消耗大的问题。
根据本发明的一个实施例,提供了一种报文的处理方法,包括:获取交换机入方向处理引擎IPE发送的第一报文,并获取交换机出方向处理引擎EPE发送的第二报文;其中,所述第一报文头部包括带内网络遥测INT收集的数据,且所述第一报文与所述第二报文相同;根据报文头部的关键信息将所述第一报文和所述第二报文识别为同一条报文流;将识别为同一条报文流的所述第一报文和所述第二报文合并重组为INT报告并发送给目标设备。
根据本发明的另一个实施例,提供了一种报文的处理装置,包括:获取模块,设置为获取交换机入方向处理引擎IPE发送的第一报文,并获取交换机出方向处理引擎EPE发送的第二报文;其中,所述第一报文头部包括带内网络遥测INT收集的数据,且所述第一报文与所述第二报文相同;识别模块,设置为根据报文头部的关键信息将所述第一报文和所述第二报 文识别为同一条报文流;发送模块,设置为将识别为同一条报文流的所述第一报文和所述第二报文合并重组为INT报告并发送给目标设备。
根据本发明的又一个实施例,还提供了一种存储介质,所述存储介质中存储有计算机程序,其中,所述计算机程序被设置为运行时执行上述任一项方法实施例中的步骤。
根据本发明的又一个实施例,还提供了一种电子装置,包括存储器和处理器,所述存储器中存储有计算机程序,所述处理器被设置为运行所述计算机程序以执行上述任一项方法实施例中的步骤。
通过本发明,获取交换机入方向处理引擎IPE发送的第一报文,并获取交换机出方向处理引擎EPE发送的第二报文,进而根据报文头部的关键信息将第一报文和第二报文识别为同一条报文流,最后将识别为同一条报文流的第一报文和第二报文合并重组为INT报告并发送给目标设备,可见,不需要将当前交换机的INT信息插入到报文中,就可以实现INT Sink节点的功能,从而解决了相关技术中在协议层实现网络状态监控对网络带宽消耗大的问题,降低了对网络带宽的消耗。
附图说明
此处所说明的附图用来提供对本发明的进一步理解,构成本申请的一部分,本发明的示意性实施例及其说明用于解释本发明,并不构成对本发明的不当限定。在附图中:
图1是本发明实施例的一种报文的处理方法的终端的硬件结构框图;
图2是根据本发明实施例的报文的处理方法的流程图;
图3是根据本发明实施例的INT Sink节点的芯片实现方法的示意图;
图4是根据本发明实施例的芯片内部报文转发的总线结构示意图;
图5是根据本发明实施例的报文的处理装置的结构框图。
具体实施方式
下文中将参考附图并结合实施例来详细说明本发明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。
需要说明的是,本发明的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。
需要说明的是,带内网络遥测(Inband Network Telemetry,简称为INT),是一种网络架构,不需要控制层的干涉,就可以实现数据层收集并报告网络状态的功能。在INT的架构模型中,报文包含INT Header,可以理解为网络设备发出的“遥测指令”。这些指令告诉线上的网络设备,给经过INT节点的报文插入INT需要搜集的相关信息。
其中一个INT域包含三种节点设备,分别是source节点、transmit节点和sink节点。INT source节点,是将遥测指令插入到数据报文的网络设备,INT transmit节点是负责根据遥测指令将本节点的相关信息插入到数据报文中的网络设备,INT sink节点是发送INT报告给目标设备并解封装INT报文的网络设备。INT sink节点发送的INT报告需要包含本节点的相关信息。
实施例1
本申请实施例一所提供的方法实施例可以在终端、计算机终端或者类似的运算装置中执行。以运行在终端上为例,图1是本发明实施例的一种报文的处理方法的终端的硬件结构框图。如图1所示,终端10可以包括一个或多个(图1中仅示出一个)处理器102(处理器102可以包括但不限于微处理器MCU或可编程逻辑器件FPGA等的处理装置)和用于存储数据的存储器104,可选地,上述终端还可以包括用于通信功能的传输设备106以及输入输出设备108。本领域普通技术人员可以理解,图1所示的结构仅为示意,其并不对上述终端的结构造成限定。例如,终端10还可包括比图1中所示更多或者更少的组件,或者具有与图1所示不同的配 置。
存储器104可用于存储计算机程序,例如,应用软件的软件程序以及模块,如本发明实施例中的报文的处理方法对应的计算机程序,处理器102通过运行存储在存储器104内的计算机程序,从而执行各种功能应用以及数据处理,即实现上述的方法。存储器104可包括高速随机存储器,还可包括非易失性存储器,如一个或者多个磁性存储装置、闪存、或者其他非易失性固态存储器。在一些实例中,存储器104可进一步包括相对于处理器102远程设置的存储器,这些远程存储器可以通过网络连接至终端10。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。
传输设备106用于经由一个网络接收或者发送数据。上述的网络具体实例可包括终端10的通信供应商提供的无线网络。在一个实例中,传输设备106包括一个网络适配器(Network Interface Controller,简称为NIC),其可通过基站与其他网络设备相连从而可与互联网进行通讯。在一个实例中,传输设备106可以为射频(Radio Frequency,简称为RF)模块,其用于通过无线方式与互联网进行通讯。
在本实施例中提供了一种运行于上述终端的报文的处理方法,图2是根据本发明实施例的报文的处理方法的流程图,如图2所示,该流程包括如下步骤:
步骤S202,获取交换机入方向处理引擎(Ingress Process Engine,简称为IPE)发送的第一报文,并获取交换机出方向处理引擎(Egress Process Engine,简称为EPE)发送的第二报文;其中,第一报文头部包括带内网络遥测INT收集的数据,且第一报文与第二报文相同;
需要说明的是,本实施例中的INT收集数据在具体应用场景中可以是的Source节点和Transit节点数据,而第二报文在芯片Bridge Header中包括收集的Sink节点数据。
步骤S204,根据报文头部的关键信息将第一报文和第二报文识别为 同一条报文流;
步骤S206,将识别为同一条报文流的第一报文和第二报文合并重组为INT报告并发送给目标设备。
通过上述步骤S202至步骤S206,获取交换机入方向处理引擎IPE发送的第一报文,并获取交换机出方向处理引擎EPE发送的第二报文,进而根据报文头部的关键信息将第一报文和第二报文识别为同一条报文流,最后将识别为同一条报文流的第一报文和第二报文合并重组为INT报告并发送给目标设备,可见,不需要将当前交换机的INT信息插入到报文中,就可以实现INT Sink节点的功能,从而解决了相关技术中在协议层实现网络状态监控对网络带宽消耗大的问题,降低了对网络带宽的消耗。
需要说明的是,本实施例中的方法步骤的执行主体可以是芯片,例如特定用途集成电路(Application Specific Integrated Circuit,简称为ASIC)芯片,或现场可编程门阵列(Field Programmable Gata Array,简称为FPGA)芯片,或NP等,可以根据实际情况进行相应的调整。
在本实施例的可选实施方式中,对于步骤S202中涉及到的获取交换机入方向处理引擎IPE发送的第一报文的方式,进一步可以是:获取由IPE转发到交换机队列缓存处理引擎(Buffer Store and Retrieve,简称为BSR)的第一报文;其中,BSR在收到第一报文后,对第一报文进行复制并将复制后的第一报文转发到EPE;
在本实施例的可选实施方式中,对于步骤S202中涉及到的获取交换机出方向处理引擎EPE发送的第二报文的方式,进一步可以:获取由EPE转发到BSR的第二报文,其中,BSR在收到第二报文后,对第二报文进行复制并将复制后的第二报文转发到EPE。
对于上述步骤S202,上述获取第一报文和第二报文的方式,在具体应用场景中,以执行主体为芯片为例,由于第一报文在转发到BSR之后,会由BSR转发到芯片的处理器,且BSR会复制一份第一报文,并将其转发到EPE。
需要说明的是,本实施例中的报文头部的关键信息包括:入端口,入方向时戳和五元组。在具体应用场景中,该报文信息中的入端口,入方向时戳和五元组携带在Bridge Header中。
在本实施例的可选实施方式中,对于步骤S204中涉及到的根据报文信息将第一报文和第二报文识别为同一条报文流的方式,进一步可以包括:
步骤S204-11,根据第一报文中的入端口,入方向时戳和五元组计算出第一哈希值;
步骤S204-12,根据第二报文中的入端口,入方向时戳和五元组计算出第二哈希值;其中,在第一报文信息与第二报文中携带的报文头部的关键信息相同的情况下,第一哈希值与第二哈希值是相同的;
步骤S204-13,根据第一哈希值与第二哈希值将第一报文和第二报文识别为同一条报文流。
通过上述步骤S204-11至步骤S204-13可知,是通过报文头部的关键信息中入端口,入方向时戳和五元组计算出的哈希值来将其识别为同一报文流。通过计算哈希值的方式能够使得识别报文是否为同一报文流更加准确。
在本实施例的,对于步骤S206中涉及到的将识别为同一条报文流的第一报文和第二报文发送给目标设备的方式,进一步可以是:根据带内网络遥测INT报文协议将识别为同一条报文流的第一报文和第二报文合并重组为INT报告并发送给目标设备。
下面结合本实施例的可选实施方式对本申请进行举例说明;
在本可选实施方式中提供了一种INT Sink节点的芯片实现方法,如图3所示,该方法的步骤包括:
步骤S11,在交换机入方向上,芯片将报文转发至BSR;
其中,在该步骤S11中包括接收报文并解析INT报文、通过流表判断是否需要做INT Sink处理、报文送CPU的信息处理。
步骤S12,BSR拷贝一份报文给CPU;
其中,该步骤S12进一步可以是收集入端口、入方向时戳、根据五元组计算的hash值信息、组成Bridge Header。
步骤S13,BSR转发报文至EPE;
其中,该步骤S13进一步包括队列缓冲、转发信息处理。
步骤S14,EPE送一份报文到BSR,同时将报文转发出去;
其中,该步骤4进一步包括INT报文解封装、报文送CPU的信息处理。
步骤S15,BSR拷贝一份报文给CPU;CPU根据Bridge Header中入端口、入方向时戳和五元组计算的Hash值将两个报文识别为同一条流,再根据INT Report协议组成Report报文发送给监控设备。
其中,该步骤S15进一步包括收集当前交换机的metadata、组成Bridge Header。其中,芯片内部报文转发的总线结构,如图4所示。
在本可选实施方式中,通过芯片实现Sink节点的INT报文解封装,CPU根据Bridge Header中的入端口、入方向时戳和五元组计算的Hash值将IPE和EPE上送的两份报文识别为同一条流,并根据INT Report协议发送Report报文给监控设备,可以实现INT Sink节点的功能。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到根据上述实施例的方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本发明各个实施例所述的方法。
实施例2
在本实施例中还提供了一种报文的处理装置,该装置用于实现上述实施例及优选实施方式,已经进行过说明的不再赘述。如以下所使用的,术语“模块”可以实现预定功能的软件和/或硬件的组合。尽管以下实施例所描述的装置较佳地以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并被构想的。
图5是根据本发明实施例的报文的处理装置的结构框图,如图5所示,该装置包括:
(1)获取模块52,设置为获取交换机入方向处理引擎IPE发送的第一报文,并获取交换机出方向处理引擎EPE发送的第二报文;其中,第一报文头部包括带内网络遥测INT收集的数据,且第一报文与第二报文相同;
(2)识别模块54,设置为根据报文头部的关键信息将第一报文和第二报文识别为同一条报文流;
(3)发送模块56,设置为将识别为同一条报文流的第一报文和第二报文并重组INT报告并发送给目标设备。
可选地,本实施例中的获取模块52进一步可以包括:第一获取单元,设置为获取由IPE转发到交换机队列缓存处理引擎BSR的第一报文;其中,BSR在收到第一报文后,对第一报文进行复制并将复制后的第一报文转发到EPE;第二获取单元,设置为获取由EPE转发到BSR的第二报文,其中,BSR在收到所述第二报文后,对第二报文进行复制并将复制后的第二报文转发到EPE。
可选地,本实施例中的报文头部的关键信息进一步包括:入端口,入方向时戳和五元组。
基于上述报文头部的关键信息,本实施例中的识别模块54进一步可以包括:第一计算单元,设置为根据第一报文中的入端口,入方向时戳和五元组计算出第一哈希值;第二计算单元,设置为根据第二报文中的入端口,入方向时戳和五元组计算出第二哈希值;其中,在第一报文信息与第 二报文中携带的报文头部的关键信息相同的情况下,第一哈希值与第二哈希值是相同的;识别单元,设置为根据第一哈希值与第二哈希值将第一报文和第二报文识别为同一条报文流。
可选地,本实施例中的发送模块56,还设置为根据带内网络遥测INT报文协议将识别为同一条报文流的第一报文和第二报文合并重组为INT报告并发送给目标设备。
需要说明的是,上述各个模块是可以通过软件或硬件来实现的,对于后者,可以通过以下方式实现,但不限于此:上述模块均位于同一处理器中;或者,上述各个模块以任意组合的形式分别位于不同的处理器中。
实施例3
本发明的实施例还提供了一种存储介质,该存储介质中存储有计算机程序,其中,该计算机程序被设置为运行时执行上述任一项方法实施例中的步骤。
可选地,在本实施例中,上述存储介质可以被设置为存储用于执行以下步骤的计算机程序:
S1,获取交换机入方向处理引擎IPE发送的第一报文,并获取交换机出方向处理引擎EPE发送的第二报文;其中,第一报文头部包括带内网络遥测INT收集的数据,且第一报文与第二报文相同;
S2,根据报文头部的关键信息将第一报文和第二报文识别为同一条报文流;
S3,将识别为同一条报文流的第一报文和第二报文合并重组为INT报告并发送给目标设备。
可选地,在本实施例中,上述存储介质可以包括但不限于:U盘、只读存储器(Read-Only Memory,简称为ROM)、随机存取存储器(Random Access Memory,简称为RAM)、移动硬盘、磁碟或者光盘等各种可以存储计算机程序的介质。
本发明的实施例还提供了一种电子装置,包括存储器和处理器,该存储器中存储有计算机程序,该处理器被设置为运行计算机程序以执行上述任一项方法实施例中的步骤。
可选地,上述电子装置还可以包括传输设备以及输入输出设备,其中,该传输设备和上述处理器连接,该输入输出设备和上述处理器连接。
可选地,在本实施例中,上述处理器可以被设置为通过计算机程序执行以下步骤:
S1,获取交换机入方向处理引擎IPE发送的第一报文,并获取交换机出方向处理引擎EPE发送的第二报文;其中,第一报文头部包括带内网络遥测INT收集的数据,且第一报文与第二报文相同;
S2,根据报文头部的关键信息将第一报文和第二报文识别为同一条报文流;
S3,将识别为同一条报文流的第一报文和第二报文合并重组为INT报告并发送给目标设备。
可选地,本实施例中的具体示例可以参考上述实施例及可选实施方式中所描述的示例,本实施例在此不再赘述。
显然,本领域的技术人员应该明白,上述的本发明的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本发明不限制于任何特定的硬件和软件结合。
以上所述仅为本发明的优选实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明可以有各种更改和变化。凡在本发明的原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护 范围之内。

Claims (12)

  1. 一种报文的处理方法,包括:
    获取交换机入方向处理引擎IPE发送的第一报文,并获取交换机出方向处理引擎EPE发送的第二报文;其中,所述第一报文头部包括带内网络遥测INT收集的数据,且所述第一报文与所述第二报文相同;
    根据报文头部的关键信息将所述第一报文和所述第二报文识别为同一条报文流;
    将识别为同一条报文流的所述第一报文和所述第二报文合并重组为INT报告并发送给目标设备。
  2. 根据权利要求1所述的方法,其中,
    获取交换机入方向处理引擎IPE发送的第一报文,包括:获取由所述IPE转发到交换机队列缓存处理引擎BSR的所述第一报文;其中,所述BSR在收到所述第一报文后,对所述第一报文进行复制并将复制后的第一报文转发到所述EPE;
    获取交换机出方向处理引擎EPE发送的第二报文,包括:获取由所述EPE转发到所述BSR的所述第二报文,其中,所述BSR在收到所述第二报文后,对所述第二报文进行复制并将复制后的第二报文转发到所述EPE。
  3. 根据权利要求1所述的方法,其中,所述报文头部的关键信息包括:入端口,入方向时戳和五元组。
  4. 根据权利要求3所述的方法,其中,根据所述报文头部的关键信息将所述第一报文和所述第二报文识别为同一条报文流,包括:
    根据所述第一报文中的入端口,入方向时戳和五元组计算出第一哈希值;
    根据所述第二报文中的入端口,入方向时戳和五元组计算出第二 哈希值;其中,在所述第一报文的报文头部的关键信息与所述第二报文的报文头部的关键信息相同的情况下,所述第一哈希值与所述第二哈希值是相同的;
    根据所述第一哈希值与所述第二哈希值将所述第一报文和所述第二报文识别为同一条报文流。
  5. 根据权利要求1至4中任一项所述的方法,其中,将识别为同一条报文流的所述第一报文和所述第二报文合并重组为INT报告并发送给目标设备,包括:
    根据带内网络遥测INT报文协议将识别为同一条报文流的所述第一报文和所述第二报文合并重组为INT报告并发送给目标设备。
  6. 一种报文的处理装置,包括:
    获取模块,设置为获取交换机入方向处理引擎IPE发送的第一报文,并获取交换机出方向处理引擎EPE发送的第二报文;其中,所述第一报文头部包括带内网络遥测INT收集的数据,且所述第一报文与所述第二报文相同;
    识别模块,设置为根据报文头部的关键信息将所述第一报文和所述第二报文识别为同一条报文流;
    发送模块,设置为将识别为同一条报文流的所述第一报文和所述第二报文合并重组为INT报告并发送给目标设备。
  7. 根据权利要求6所述的装置,其中,所述获取模块包括:
    第一获取单元,设置为获取由所述IPE转发到交换机队列缓存处理引擎BSR的所述第一报文;其中,所述BSR在收到所述第一报文后,对所述第一报文进行复制并将复制后的第一报文转发到所述EPE;
    第二获取单元,设置为获取由所述EPE转发到所述BSR的所述第二报文,其中,所述BSR在收到所述第二报文后,对所述第二报 文进行复制并将复制后的第二报文转发到所述EPE。
  8. 根据权利要求6所述的装置,其中,所述报文头部的关键信息包括:入端口,入方向时戳和五元组。
  9. 根据权利要求8所述的装置,其中,所述识别模块包括:
    第一计算单元,设置为根据所述第一报文中的入端口,入方向时戳和五元组计算出第一哈希值;
    第二计算单元,设置为根据所述第二报文中的入端口,入方向时戳和五元组计算出第二哈希值;其中,在所述第一报文的报文头部的关键信息与所述第二报文的报文头部的关键信息相同的情况下,所述第一哈希值与所述第二哈希值是相同的;
    识别单元,设置为根据所述第一哈希值与所述第二哈希值将所述第一报文和所述第二报文识别为同一条报文流。
  10. 根据权利要求6至9中任一项所述的装置,其中,
    所述发送模块,还设置为根据带内网络遥测INT报文协议将识别为同一条报文流的所述第一报文和所述第二报文合并重组为INT报告并发送给目标设备。
  11. 一种计算机可读的存储介质,所述存储介质中存储有计算机程序,其中,所述计算机程序被设置为运行时执行所述权利要求1至5任一项中所述的方法。
  12. 一种电子装置,包括存储器和处理器,所述存储器中存储有计算机程序,所述处理器被设置为运行所述计算机程序以执行所述权利要求1至5任一项中所述的方法。
PCT/CN2020/113079 2019-12-27 2020-09-02 报文的处理方法及装置、存储介质和电子装置 WO2021128927A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US17/789,224 US20230042747A1 (en) 2019-12-27 2020-09-02 Message Processing Method and Device, Storage Medium, and Electronic Device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201911380640.9 2019-12-27
CN201911380640.9A CN111147403B (zh) 2019-12-27 2019-12-27 报文的处理方法及装置、存储介质和电子装置

Publications (1)

Publication Number Publication Date
WO2021128927A1 true WO2021128927A1 (zh) 2021-07-01

Family

ID=70521141

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/113079 WO2021128927A1 (zh) 2019-12-27 2020-09-02 报文的处理方法及装置、存储介质和电子装置

Country Status (3)

Country Link
US (1) US20230042747A1 (zh)
CN (1) CN111147403B (zh)
WO (1) WO2021128927A1 (zh)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111147403B (zh) * 2019-12-27 2021-08-31 苏州盛科通信股份有限公司 报文的处理方法及装置、存储介质和电子装置
CN111988271B (zh) * 2020-06-30 2021-11-16 联想(北京)有限公司 一种通信流处理方法及装置
CN113300869B (zh) * 2020-07-29 2022-06-14 阿里巴巴集团控股有限公司 带内网络遥感功能通信方法、网络设备及存储介质
CN112260968B (zh) * 2020-10-16 2022-06-21 苏州盛科通信股份有限公司 遥测数据报文的处理方法及装置
CN112769648B (zh) * 2020-12-31 2022-08-19 苏州盛科通信股份有限公司 一种信息更新方法、装置、存储介质及电子装置

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105245450A (zh) * 2015-09-23 2016-01-13 盛科网络(苏州)有限公司 Capwap分片重组的芯片实现方法
CN108011837A (zh) * 2017-11-21 2018-05-08 新华三技术有限公司 报文处理方法及装置
CN108111432A (zh) * 2017-12-27 2018-06-01 新华三技术有限公司 报文转发方法及装置
CN109194581A (zh) * 2018-08-24 2019-01-11 新华三技术有限公司 报文处理方法及装置
US10277518B1 (en) * 2017-01-16 2019-04-30 Innovium, Inc. Intelligent packet queues with delay-based actions
CN111147403A (zh) * 2019-12-27 2020-05-12 盛科网络(苏州)有限公司 报文的处理方法及装置、存储介质和电子装置

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10341748B2 (en) * 2017-07-05 2019-07-02 Infinera Corporation Packet-optical in-band telemetry (POINT) framework
CN108259344B (zh) * 2017-11-29 2020-12-29 新华三技术有限公司 遥测Telemetry方法和装置
US10924352B2 (en) * 2018-01-17 2021-02-16 Nicira, Inc. Data center network topology discovery
CN108521371B (zh) * 2018-03-09 2020-12-25 新华三技术有限公司 报文转发方法及装置
CN108777646B (zh) * 2018-05-02 2020-08-11 新华三技术有限公司 流量监控方法及装置
US11323340B2 (en) * 2019-01-07 2022-05-03 Vmware, Inc. Packet flow monitoring in software-defined networking (SDN) environments

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105245450A (zh) * 2015-09-23 2016-01-13 盛科网络(苏州)有限公司 Capwap分片重组的芯片实现方法
US10277518B1 (en) * 2017-01-16 2019-04-30 Innovium, Inc. Intelligent packet queues with delay-based actions
CN108011837A (zh) * 2017-11-21 2018-05-08 新华三技术有限公司 报文处理方法及装置
CN108111432A (zh) * 2017-12-27 2018-06-01 新华三技术有限公司 报文转发方法及装置
CN109194581A (zh) * 2018-08-24 2019-01-11 新华三技术有限公司 报文处理方法及装置
CN111147403A (zh) * 2019-12-27 2020-05-12 盛科网络(苏州)有限公司 报文的处理方法及装置、存储介质和电子装置

Also Published As

Publication number Publication date
US20230042747A1 (en) 2023-02-09
CN111147403A (zh) 2020-05-12
CN111147403B (zh) 2021-08-31

Similar Documents

Publication Publication Date Title
WO2021128927A1 (zh) 报文的处理方法及装置、存储介质和电子装置
CN109391560B (zh) 网络拥塞的通告方法、代理节点及计算机设备
US9166921B2 (en) Selective packet sequence acceleration in a network environment
US9246825B2 (en) Accelerated processing of aggregate data flows in a network environment
US8792353B1 (en) Preserving sequencing during selective packet acceleration in a network environment
US10397126B2 (en) VXLAN packet transmission
US9722933B2 (en) Selective packet sequence acceleration in a network environment
US10757076B2 (en) Enhanced network processing of virtual node data packets
WO2018113425A1 (zh) 一种检测时延的方法、装置及系统
US9590922B2 (en) Programmable and high performance switch for data center networks
US20220191140A1 (en) Data transmission control method, apparatus, and storage medium
CN108521371B (zh) 报文转发方法及装置
US10491718B2 (en) Method and apparatus for processing packets in a network device
EP3313031B1 (en) Sdn-based arp realization method and apparatus
US11316804B2 (en) Forwarding entry update method and apparatus in a memory
EP3122012B1 (en) Data processing method and apparatus for openflow network
WO2021088813A1 (zh) 报文封装方法及装置、报文解封装方法及装置
WO2017148419A1 (zh) 数据传输方法及服务器
CN109039947B (zh) 网络包去重方法、装置、网络分流设备及存储介质
CN112398754B (zh) 数据传输方法、装置、介质、电子设备及网络接入设备
JP4040045B2 (ja) データ転送装置
CN107231316B (zh) 报文的传输方法及装置
WO2020220986A1 (zh) 一种报文处理方法、装置及设备
US9455911B1 (en) In-band centralized control with connection-oriented control protocols
CN114301960B (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: 20907770

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20907770

Country of ref document: EP

Kind code of ref document: A1