WO2016202025A1 - Trap message processing method and apparatus - Google Patents

Trap message processing method and apparatus Download PDF

Info

Publication number
WO2016202025A1
WO2016202025A1 PCT/CN2016/076645 CN2016076645W WO2016202025A1 WO 2016202025 A1 WO2016202025 A1 WO 2016202025A1 CN 2016076645 W CN2016076645 W CN 2016076645W WO 2016202025 A1 WO2016202025 A1 WO 2016202025A1
Authority
WO
WIPO (PCT)
Prior art keywords
trap
discarding
packet
rule
message
Prior art date
Application number
PCT/CN2016/076645
Other languages
French (fr)
Chinese (zh)
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 WO2016202025A1 publication Critical patent/WO2016202025A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0604Management of faults, events, alarms or notifications using filtering, e.g. reduction of information by using priority, element types, position or time
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks

Abstract

The present invention provides a Trap message processing method and apparatus. The method comprises: receiving a Trap message for identifying device alarm information; matching the Trap message with a discarding rule for discarding a Trap message; and processing the Trap message according to the matching result. The present invention resolves the problem of high false discarding rate of a Trap message due to the fact that a useful Trap message is drowned in useless Trap messages and discarded in the related art, thereby achieving the effect of reducing the false discarding rate of the Trap message.

Description

陷阱Trap报文处理方法及装置Trap packet processing method and device 技术领域Technical field
本发明涉及通信领域,具体而言,涉及一种陷阱Trap报文处理方法及装置。The present invention relates to the field of communications, and in particular, to a trap Trap message processing method and apparatus.
背景技术Background technique
在网络通讯环境下,网络管理系统主要负责网络的告警管理、安全管理、配置管理等工作,其中,告警管理对网络维护的正常运行起着非常重要的作用。In the network communication environment, the network management system is mainly responsible for network alarm management, security management, configuration management, etc. Among them, alarm management plays a very important role in the normal operation of network maintenance.
在当前网络通讯设备领域中,网元由于环境影响或硬件故障而发生异常情况时,需要以告警的方式上报到网管系统。鉴于简单网络管理系统(Simple Network Management System,简称为SNMP)协议的简易性和成熟性,被各大设备提供商广泛使用。设备的告警信息通常采用发送SNMP陷阱Trap报文到网管系统,网管系统解析Trap报文为告警数据的方式。In the current network communication device field, when the network element is abnormal due to environmental impact or hardware failure, it needs to be reported to the network management system by means of an alarm. In view of the simplicity and maturity of the Simple Network Management System (SNMP) protocol, it is widely used by major equipment providers. The alarm information of the device is sent to the NMS through the SNMP trap trap. The NMS analyzes the Trap packets as alarm data.
随着网络设备规模的增大,网管系统接收到的整个网络中的网元Trap报文十分庞大,对业务影响小或者无影响的Trap报文被网管系统接收并解析处理,大量浪费了网管系统的计算资源,并且无用Trap报文过多还会撑满告警业务处理缓冲池,导致后来的重要告警丢失。因此对无用Trap报文的丢弃是必不可少的部分。As the size of the network device increases, the network management system receives a large number of Trap packets from the network. The Trap packets that have little or no impact on the service are received and parsed by the NMS. The computing resources, and too many unnecessary Trap packets will fill the alarm service processing buffer pool, resulting in the loss of important alarms. Therefore, the discarding of unnecessary Trap packets is an indispensable part.
目前相关技术中的告警丢弃处理技术中主要采用的是Trap报文经过协议栈解析后上报给网管系统,在系统中映射成业务告警信息后再根据业务过滤规则进行丢弃,协议栈对SNMP Trap报文的用户数据包协议(User Datagram Protocol,简称为UDP)报文解析虽然快,但经过后面流程的业务映射等流程都浪费了系统资源,浪费量和无用Trap报文的数量成正比。另外用户通过网管系统配置的告警丢弃规则通常只能精确到告警码,而此告警码下如果具备特殊属性值的Trap报文对网管系统具备特殊意义不该丢弃时,也被丢弃了,无法做到一个告警码下具备特殊属性值的Trap报文不丢弃,而其他则丢弃。因此,在相关技术中存在着有用的Trap报文会被丢弃,Trap报文的误丢弃率高的问题。Currently, the alarm discarding processing technology in the related art mainly uses the Trap packet to be reported to the network management system after being parsed by the protocol stack, and then mapped to the service alarm information in the system, and then discarded according to the service filtering rule, and the protocol stack is notified to the SNMP Trap. Although the User Datagram Protocol (UDP) packet parsing is fast, the process of the service mapping and other processes in the subsequent process wastes system resources, and the amount of wasted is proportional to the number of useless Trap packets. In addition, the alarm discarding rule configured by the user through the network management system can only be accurate to the alarm code. If the Trap packet with special attribute value is not discarded for the network management system, it is discarded. Traps with special attribute values are not discarded when they are sent to an alarm code, and others are discarded. Therefore, in the related art, there is a problem that a useful Trap packet is discarded and a Trap packet has a high discard rate.
针对相关技术中存在的由于有用的Trap报文会被无用的Trap报文淹没而被丢弃,从而导致的Trap报文的误丢弃率高的问题,目前尚未提出有效的解决方案。An effective solution has been proposed for the problem that the Trap packets are discarded due to the use of the Trap packets and the Trap packets are discarded.
发明内容Summary of the invention
本发明提供了一种陷阱Trap报文处理方法及装置,以至少解决相关技术中存在的有用的Trap报文会被无用的Trap报文淹没而被丢弃,从而导致的Trap报文的误丢弃率高的问题。The present invention provides a method and a device for processing trap traps, so as to at least solve the problem that the traps of the traps are discarded due to the use of the traps of the traps in the related art. High problem.
根据本发明的一个方面,提供了一种陷阱Trap报文处理方法,包括:接收用于标识设备告警信息的Trap报文;将所述Trap报文与用于丢弃Trap报文的丢弃规则进行匹配;根据匹配结果对所述Trap报文进行处理。 According to an aspect of the present invention, a trap Trap packet processing method is provided, including: receiving a Trap message for identifying device alarm information; and matching the Trap message with a discarding rule for discarding Trap messages. The Trap message is processed according to the matching result.
可选地,所述丢弃规则包括以下至少之一:丢弃预配置的Trap对象标识符OID标识的Trap报文;丢弃预配置的Trap对象标识符OID标识的,且报文属性为第一预定属性值的Trap报文;丢弃预配置的Trap对象标识符OID标识的,且报文属性非第二预定属性值的Trap报文。Optionally, the discarding rule includes at least one of the following: discarding the Trap message identified by the pre-configured Trap object identifier OID; discarding the pre-configured Trap object identifier OID, and the packet attribute is the first predetermined attribute. The value of the Trap packet is discarded. The Trap packet whose identifier is not the second predetermined attribute value is discarded.
可选地,在接收用于标识设备告警信息的所述Trap报文之前,还包括:解析所述丢弃规则;根据解析后的丢弃规则生成具备预定内存结构的丢弃规则。Optionally, before receiving the Trap message for identifying the device alarm information, the method further includes: parsing the discarding rule; and generating a discarding rule with a predetermined memory structure according to the parsed discarding rule.
可选地,将所述Trap报文与用于丢弃Trap报文的丢弃规则进行匹配包括:对所述Trap报文进行原始的协议层结构解析;将解析后的Trap报文和所述具备预定内存结构的丢弃规则进行匹配。Optionally, the matching the Trap packet with the discarding rule for discarding the Trap packet includes: parsing the original protocol layer structure of the Trap packet; and parsing the parsed Trap packet with the predetermined The discard rules of the memory structure are matched.
可选地,根据匹配结果对所述Trap报文进行处理包括:当所述Trap报文与所述丢弃规则相匹配时,丢弃所述Trap报文;和/或,当所述Trap报文与所述丢弃规则不匹配时,将所述Trap报文映射成告警信息;将所述告警信息发送给用于对所述告警信息进行处理的上层模块。Optionally, the processing of the Trap packet according to the matching result includes: discarding the Trap packet when the Trap packet matches the discarding rule; and/or, when the Trap packet is If the discarding rule does not match, the Trap packet is mapped to the alarm information; and the alarm information is sent to an upper layer module for processing the alarm information.
根据本发明的另一方面,提供了一种陷阱Trap报文处理装置,包括:接收模块,设置为接收用于标识设备告警信息的Trap报文;匹配模块,设置为将所述Trap报文与用于丢弃Trap报文的丢弃规则进行匹配;处理模块,设置为根据匹配结果对所述Trap报文进行处理。According to another aspect of the present invention, a trap trap message processing apparatus is provided, including: a receiving module, configured to receive a Trap message for identifying device alarm information; and a matching module configured to set the Trap message with The discarding rule for discarding the Trap packet is matched. The processing module is configured to process the Trap packet according to the matching result.
可选地,所述丢弃规则包括以下至少之一:丢弃预配置的Trap对象标识符OID标识的Trap报文;丢弃预配置的Trap对象标识符OID标识的,且报文属性为第一预定属性值的Trap报文;丢弃预配置的Trap对象标识符OID标识的,且报文属性非第二预定属性值的Trap报文。Optionally, the discarding rule includes at least one of the following: discarding the Trap message identified by the pre-configured Trap object identifier OID; discarding the pre-configured Trap object identifier OID, and the packet attribute is the first predetermined attribute. The value of the Trap packet is discarded. The Trap packet whose identifier is not the second predetermined attribute value is discarded.
可选地,所述装置还包括:解析模块,设置为解析所述丢弃规则;生成模块,设置为根据解析后的丢弃规则生成具备预定内存结构的丢弃规则。Optionally, the apparatus further includes: a parsing module configured to parse the discarding rule; and a generating module configured to generate a discarding rule having a predetermined memory structure according to the parsed discarding rule.
可选地,所述匹配模块包括:解析单元,设置为对所述Trap报文进行原始的协议层结构解析;匹配单元,设置为将解析后的Trap报文和所述具备预定内存结构的丢弃规则进行匹配。Optionally, the matching module includes: a parsing unit configured to perform original protocol layer structure parsing on the Trap packet; and a matching unit configured to parse the parsed Trap message and the discard with a predetermined memory structure The rules are matched.
可选地,所述处理模块包括:丢弃单元,设置为当所述Trap报文与所述丢弃规则相匹配时,丢弃所述Trap报文;和/或,映射单元,设置为当所述Trap报文与所述丢弃规则不匹配时,将所述Trap报文映射成告警信息;发送单元,设置为将所述告警信息发送给用于对所述告警信息进行处理的上层模块。Optionally, the processing module includes: a discarding unit, configured to discard the Trap packet when the Trap packet matches the discarding rule; and/or, the mapping unit is set to be the Trap The packet is mapped to the alarm information when the packet does not match the discarding rule. The sending unit is configured to send the alarm information to an upper module for processing the alarm information.
通过本发明,采用接收用于标识设备告警信息的Trap报文;将所述Trap报文与用于丢弃Trap报文的丢弃规则进行匹配;根据匹配结果对所述Trap报文进行处理,解决了相关技术中存在的有用的Trap报文会被无用的Trap报文淹没而被丢弃,从而导致的Trap报文的误丢弃率高的问题,进而达到了降低Trap报文的误丢弃率的效果。According to the present invention, the Trap message is used to identify the alarm information of the device, and the Trap message is matched with the discarding rule for discarding the Trap message. The Trap message is processed according to the matching result. The useful Trap packets in the related art are discarded by the use of the traps. The trap rate of the Trap packets is high.
附图说明DRAWINGS
此处所说明的附图用来提供对本发明的进一步理解,构成本申请的一部分,本发明的示意性实施例及其说明用于解释本发明,并不构成对本发明的不当限定。在附图中: The drawings described herein are intended to provide a further understanding of the invention, and are intended to be a part of the invention. In the drawing:
图1是根据本发明实施例的陷阱Trap报文处理方法的流程图;FIG. 1 is a flowchart of a method for processing a trap trap message according to an embodiment of the present invention;
图2是根据本发明实施例的陷阱Trap报文处理装置的结构框图;2 is a structural block diagram of a trap trap message processing apparatus according to an embodiment of the present invention;
图3是根据本发明实施例的陷阱Trap报文处理装置的优选结构框图;FIG. 3 is a block diagram showing a preferred structure of a trap trap message processing apparatus according to an embodiment of the present invention; FIG.
图4是根据本发明实施例的陷阱Trap报文处理装置中匹配模块24的结构框图;4 is a structural block diagram of a matching module 24 in a trap Trap message processing apparatus according to an embodiment of the present invention;
图5是根据本发明实施例的陷阱Trap报文处理装置中处理模块26的结构框图;FIG. 5 is a structural block diagram of a processing module 26 in a trap Trap message processing apparatus according to an embodiment of the present invention;
图6是根据本发明实施例的Trap报文丢弃处理结构框图;FIG. 6 is a structural block diagram of a Trap packet discarding process according to an embodiment of the present invention;
图7是根据本发明实施例的使用Trap OID和属性指定丢弃特定Trap报文的判断流程图;FIG. 7 is a flowchart of determining, by using a Trap OID and an attribute, to discard a specific Trap message according to an embodiment of the present invention;
图8是根据本发明实施例的使用Trap OID和属性例外指定丢弃特定Trap报文的判断流程图。FIG. 8 is a flowchart of determining, by using a Trap OID and an attribute exception, to discard a specific Trap message according to an embodiment of the present invention.
具体实施方式detailed description
下文中将参考附图并结合实施例来详细说明本发明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。The invention will be described in detail below with reference to the drawings in conjunction with the embodiments. It should be noted that the embodiments in the present application and the features in the embodiments may be combined with each other without conflict.
需要说明的是,本发明的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。It is to be understood that the terms "first", "second" and the like in the specification and claims of the present invention are used to distinguish similar objects, and are not necessarily used to describe a particular order or order.
在本实施例中提供了一种陷阱Trap报文处理方法,图1是根据本发明实施例的陷阱Trap报文处理方法的流程图,如图1所示,该流程包括如下步骤:A method for processing a trap Trap message is provided in this embodiment. FIG. 1 is a flowchart of a method for processing a trap Trap message according to an embodiment of the present invention. As shown in FIG. 1 , the process includes the following steps:
步骤S102,接收用于标识设备告警信息的Trap报文;Step S102: Receive a Trap message for identifying device alarm information.
步骤S104,将该Trap报文与用于丢弃Trap报文的丢弃规则进行匹配;Step S104: Match the Trap message with the discarding rule for discarding the Trap message.
步骤S106,根据匹配结果对该Trap报文进行处理。Step S106: The Trap message is processed according to the matching result.
通过上述步骤,在执行Trap报文的丢弃处理时,是将Trap报文与丢弃规则进行匹配的,相对于相关技术中的将Trap报文对应的告警码与丢弃规则进行匹配,上述实施例中的匹配更为精细,能够根据Trap报文本身的一些特性来决定是否对该Trap报文执行丢弃处理。从而解决了相关技术中存在的有用的Trap报文会被无用的Trap报文淹没而被丢弃,从而导致的Trap报文的误丢弃率高的问题,进而达到了降低Trap报文的误丢弃率的效果。In the foregoing, the Trap packet is matched with the discarding rule when the Trap packet is discarded. The alarm code corresponding to the Trap packet is matched with the discarding rule in the related art. The matching is more detailed. You can determine whether to discard the traps based on the characteristics of the Trap text. Therefore, the problem that the useful Trap packets in the related art are flooded by the useless Trap packets is discarded, and the error rate of the Trap packets is high, thereby reducing the false discard rate of the Trap packets. Effect.
在一个可选的实施例中,上述丢弃规则包括以下至少之一:丢弃预配置的Trap对象标识符OID标识的Trap报文;丢弃预配置的Trap对象标识符OID标识的,且报文属性为第一预定属性值的Trap报文;丢弃预配置的Trap对象标识符OID标识的,且报文属性非第二预定属性值的Trap报文。从上述的丢弃规则中可以看出,后两种丢弃规则中不仅考虑了Trap报文的Trap OID,还考虑了Trap报文的属性值,进一步提高了Trap报文丢弃的准确率。上述的丢弃规则进行几种示例,还可以有其他的丢弃规则,例如,丢弃除某个Trap OID标识的Trap报 文之外的其他Trap报文。相对于相关技术中的丢弃方式,上述丢弃规则的粒度更为精细,从而解决了相关技术中存在的丢弃粒度过大而导致的Trap报文误丢弃率高的问题,有效降低了Trap报文的误丢弃率。In an optional embodiment, the discarding rule includes at least one of the following: discarding the Trap message identified by the pre-configured Trap object identifier OID; discarding the pre-configured Trap object identifier OID, and the packet attribute is The Trap message of the first predetermined attribute value is discarded; the Trap message whose identifier is not the second predetermined attribute value is discarded by the pre-configured Trap object identifier OID. As shown in the above discarding rules, the latter two discarding rules not only consider the Trap OID of the Trap packet, but also consider the attribute value of the Trap packet, which further improves the accuracy of discarding the Trap packet. The above-mentioned discarding rules are exemplified by the following rules. For example, you can discard the traps of a Trap OID. Other Trap messages other than the text. Compared with the discarding mode in the related art, the discarding rule has a finer granularity, which solves the problem that the discarding granularity of the Trap packet is high due to the excessive discarding granularity in the related art, and effectively reduces the Trap packet. False discard rate.
在一个可选的实施例中,在接收用于标识设备告警信息的Trap报文之前,还包括:解析上述丢弃规则;根据解析后的丢弃规则生成具备预定内存结构的丢弃规则。将丢弃规则处理成具备预定内存结构的丢弃规则能够更方便的同Trap报文进行匹配。In an optional embodiment, before receiving the Trap message for identifying the device alarm information, the method further includes: parsing the discarding rule; and generating a discarding rule with a predetermined memory structure according to the parsed discarding rule. The discarding rule is processed into a discarding rule with a predetermined memory structure, which can be more easily matched with the Trap packet.
在一个可选的实施例中,将Trap报文与用于丢弃Trap报文的丢弃规则进行匹配包括:对Trap报文进行原始的协议层结构解析;将解析后的Trap报文和具备预定内存结构的丢弃规则进行匹配。In an optional embodiment, the matching of the Trap message with the discarding rule for discarding the Trap message includes: parsing the original protocol layer structure of the Trap message; and parsing the Trap message and having the predetermined memory. The structure's drop rules are matched.
在一个可选的实施例中,根据匹配结果对Trap报文进行处理包括:当该Trap报文与丢弃规则相匹配时,丢弃该Trap报文;和/或,当该Trap报文与丢弃规则不匹配时,将该Trap报文映射成告警信息;将告警信息发送给用于对告警信息进行处理的上层模块。即,当Trap报文的Trap OID或者Trap报文的Trap OID和属性值和丢弃规则中规定的相对应时,说明该Trap报文是应该被丢弃的,从而对该Trap报文执行丢弃处理。否则,说明该Trap报文对网管系统具备一定的意义,不应该丢弃,从而将从Trap报文中映射出的告警信息发送给上层模块进行处理。In an optional embodiment, the processing of the Trap packet according to the matching result includes: discarding the Trap packet when the Trap packet matches the discarding rule; and/or, when the Trap packet and the discarding rule If the packet is not matched, the trap message is mapped to the alarm information; the alarm information is sent to the upper layer module for processing the alarm information. That is, when the Trap OID of the Trap packet or the Trap OID of the Trap packet and the attribute value are the same as those specified in the discarding rule, the Trap packet should be discarded, and the discarding process is performed on the trap packet. Otherwise, the Trap packet has a certain meaning to the network management system and should not be discarded. The alarm information mapped from the Trap packet is sent to the upper module for processing.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到根据上述实施例的方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本发明各个实施例所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, by hardware, but in many cases, the former is A better implementation. Based on such understanding, the technical solution of the present invention, which is essential or contributes to the prior art, may be embodied in the form of a software product stored in a storage medium (such as ROM/RAM, disk, The optical disc includes a number of instructions for causing a terminal device (which may be a cell phone, a computer, a server, or a network device, etc.) to perform the methods described in various embodiments of the present invention.
在本实施例中还提供了一种陷阱Trap报文处理装置,该装置用于实现上述实施例及优选实施方式,已经进行过说明的不再赘述。如以下所使用的,术语“模块”可以实现预定功能的软件和/或硬件的组合。尽管以下实施例所描述的装置较佳地以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并被构想的。In this embodiment, a trap trap message processing device is also provided, which is used to implement the foregoing embodiments and preferred embodiments, and details are not described herein. As used below, the term "module" may implement a combination of software and/or hardware of a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, hardware, or a combination of software and hardware, is also possible and contemplated.
图2是根据本发明实施例的陷阱Trap报文处理装置的结构框图,如图2所示,该装置包括接收模块22、匹配模块24和处理模块26,下面对该装置进行说明。2 is a structural block diagram of a trap trap message processing apparatus according to an embodiment of the present invention. As shown in FIG. 2, the apparatus includes a receiving module 22, a matching module 24, and a processing module 26. The apparatus will be described below.
接收模块22,设置为接收用于标识设备告警信息的Trap报文;匹配模块24,连接至上述接收模块22,设置为将Trap报文与用于丢弃Trap报文的丢弃规则进行匹配;处理模块26,连接至上述匹配模块24,设置为根据匹配结果对Trap报文进行处理。The receiving module 22 is configured to receive a Trap message for identifying the device alarm information, and the matching module 24 is connected to the receiving module 22, and is configured to match the Trap message with the discarding rule for discarding the Trap message; 26, connected to the matching module 24, configured to process the Trap message according to the matching result.
可选地,上述丢弃规则包括以下至少之一:丢弃预配置的Trap对象标识符OID标识的Trap报文;丢弃预配置的Trap对象标识符OID标识的,且报文属性为第一预定属性值的Trap报文;丢弃预配置的Trap对象标识符OID标识的,且报文属性非第二预定属性值的Trap报文。 Optionally, the discarding rule includes at least one of the following: discarding the Trap message identified by the pre-configured Trap object identifier OID; discarding the pre-configured Trap object identifier OID, and the packet attribute is the first predetermined attribute value. The Trap packet is discarded. The Trap packet whose identifier is not the second predetermined attribute value is discarded.
图3是根据本发明实施例的陷阱Trap报文处理装置的优选结构框图,如图3所示,该装置除包括图2所示的所有模块外,还包括解析模块32和生成模块34,下面对该装置进行说明。FIG. 3 is a block diagram of a preferred structure of a trap trap message processing apparatus according to an embodiment of the present invention. As shown in FIG. 3, the apparatus includes a parsing module 32 and a generating module 34, in addition to all the modules shown in FIG. The device will be described.
解析模块32,设置为解析上述丢弃规则;生成模块34,连接至上述解析模块32和接收模块22,设置为根据解析后的丢弃规则生成具备预定内存结构的丢弃规则。The parsing module 32 is configured to parse the discarding rule; the generating module 34 is connected to the parsing module 32 and the receiving module 22, and is configured to generate a discarding rule having a predetermined memory structure according to the parsed discarding rule.
图4是根据本发明实施例的陷阱Trap报文处理装置中匹配模块24的结构框图,如图4所示,该匹配模块24包括解析单元42和匹配单元44,下面对该匹配模块24进行说明。4 is a structural block diagram of a matching module 24 in a trap Trap message processing apparatus according to an embodiment of the present invention. As shown in FIG. 4, the matching module 24 includes a parsing unit 42 and a matching unit 44, and the matching module 24 is performed below. Description.
解析单元42,设置为对Trap报文进行原始的协议层结构解析;匹配单元44,连接至上述解析单元42,设置为将解析后的Trap报文和具备预定内存结构的丢弃规则进行匹配。The parsing unit 42 is configured to perform original protocol layer structure parsing on the Trap packet, and the matching unit 44 is connected to the parsing unit 42 and configured to match the parsed Trap message with a discarding rule having a predetermined memory structure.
图5是根据本发明实施例的陷阱Trap报文处理装置中处理模块26的结构框图,如图5所示,该处理模块26包括丢弃单元52,和/或映射单元54、发送单元56,下面对该处理模块26进行说明。FIG. 5 is a structural block diagram of a processing module 26 in a trap Trap message processing apparatus according to an embodiment of the present invention. As shown in FIG. 5, the processing module 26 includes a discarding unit 52, and/or a mapping unit 54, a transmitting unit 56, and The processing module 26 will be described.
丢弃单元52,设置为当Trap报文与丢弃规则相匹配时,丢弃该Trap报文;和/或,映射单元54,设置为当Trap报文与丢弃规则不匹配时,将该Trap报文映射成告警信息;发送单元56,连接至上述映射单元54,设置为将上述告警信息发送给用于对告警信息进行处理的上层模块。The discarding unit 52 is configured to: when the trap packet matches the discarding rule, discard the trap packet; and/or, the mapping unit 54 is configured to map the trap packet when the trap packet does not match the discarding rule. The sending unit 56 is connected to the mapping unit 54 and configured to send the alarm information to an upper module for processing the alarm information.
从上述实施例可知,本发明实施例中提供的是一种基于SNMP Trap报文进行丢弃的方法,从而使丢弃行为发生在进入业务层处理前,并且不区分设备,对全网生效。基于Trap OID丢弃规则基础上可以进一步配置具备特定属性和属性值的Trap的丢弃方法。从而克服现有网管系统告警丢弃效率低、粒度无法精确到Trap属性的问题。对基于Trap方法的设备业务开通具有重要意义。It is to be noted that, in the embodiment of the present invention, a method for discarding based on SNMP Trap packets is provided, so that the discarding behavior occurs before entering the service layer processing, and does not distinguish the device, and is effective for the entire network. Based on the Trap OID discarding rule, you can further configure the discarding method for traps with specific attributes and attribute values. Therefore, the problem that the alarming efficiency of the existing network management system is low and the granularity cannot be accurate to the Trap attribute is overcome. It is of great significance to the opening of equipment services based on the Trap method.
图6是根据本发明实施例的Trap报文丢弃处理结构框图,如图6所示,包括丢弃规则解析器62(同上述的接收模块22和解析单元42)、Trap报文解析处理器64(同上述的解析模块32和生成模块34)、丢弃处理器66(同上述的丢弃单元52)和上报发送器68(同上述的映射单元54和发送单元56),下面对各部分进行说明。FIG. 6 is a block diagram of a Trap packet discarding process according to an embodiment of the present invention. As shown in FIG. 6, the discarding rule parser 62 (the receiving module 22 and the parsing unit 42 described above) and the Trap packet parsing processor 64 are included. The above-described parsing module 32 and generating module 34), discarding processor 66 (same as discarding unit 52 described above), and reporting transmitter 68 (same as mapping unit 54 and transmitting unit 56 described above) will be described below.
丢弃规则解析器62:将预先设置的告警丢弃规则(同上述的丢弃规则)解析成系统内存中的数据结构。The discard rule parser 62: parses the preset alarm discarding rule (same as the discarding rule described above) into a data structure in the system memory.
Trap报文解析处理器64:从网管Trap接收端口接收Trap报文,并按照协议格式解析报文数据结构。The Trap packet parsing processor 64: receives a trap packet from the Trap receiving port of the network management system, and parses the packet data structure according to the protocol format.
丢弃处理器66:根据丢弃规则快速匹配Trap报文中的特征。对于匹配成功Trap报文的进行丢弃处理。The discarding processor 66: quickly matches the features in the Trap message according to the discarding rule. Discards the packets that match the successful traps.
上报发送器68:将未被丢弃的Trap报文经过映射等处理转化为网管系统中的告警信息,并推送给网管上层处理模块。The report transmitter 68: converts the Trap packet that has not been discarded into the alarm information of the network management system by mapping and the like, and pushes it to the upper layer processing module of the network management system.
其中Trap报文解析处理器64、丢弃规则解析器62、丢弃处理器66可以直接位于SNMP 协议栈中,这样处理效率最高。The Trap message parsing processor 64, the discarding rule parser 62, and the discarding processor 66 can be directly located in the SNMP. In the protocol stack, this is the most efficient.
本发明实施例中还提供了一种Trap报文的丢弃处理方法,包括以下步骤:In the embodiment of the present invention, a method for discarding a Trap packet is provided, including the following steps:
步骤A.将预先设置的告警丢弃规则解析成系统内存中的数据结构;Step A: parsing the preset alarm discarding rule into a data structure in the system memory;
步骤B.从网管Trap接收端口接收Trap报文,并按照协议格式解析报文数据结构;Step B: Receive a Trap packet from the Trap receiving port of the NMS, and parse the packet data structure according to the protocol format.
步骤C.根据丢弃规则快速匹配Trap报文中的特征,对于匹配成功的Trap报文进行丢弃处理;Step C: Quickly match the features in the Trap packet according to the discarding rule, and discard the successfully matched Trap packet.
步骤D.将未被丢弃的Trap报文经过映射等处理转化为网管系统中的告警信息,并推送给网管上层处理模块。Step D: The Trap message that has not been discarded is converted into the alarm information in the network management system by the mapping process, and is sent to the upper layer processing module of the network management system.
本发明实施例中定制告警丢弃规则的方法是直接基于Trap报文结构配置网管系统告警丢弃规则,用于在告警进入业务层处理前根据协议报文字段进行告警丢弃,无需业务分析,该丢弃规则可以采用如下形式:The method for customizing the alarm discarding rule in the embodiment of the present invention is to configure the alarm discarding rule of the network management system based on the Trap packet structure, and the alarm is discarded according to the protocol packet field before the alarm enters the service layer processing, and the service discarding rule is not required. Can take the following form:
形式1:配置丢弃Trap报文的Trap OID,所有符合此Trap OID的Trap报文均被丢弃;The value of the Trap OID that discards the Trap packets is discarded.
形式2:配置丢弃Trap报文的Trap OID,同时配置属性区域结构中指定位置的属性OID或者重要性value的正则表达式(同上述的报文属性为第一预定属性值)。所有符合此Trap OID,并且在指定位置出现了属性OID或者匹配正则表达式value的Trap报文被丢弃;For example, the Trap OID of the Trap packet is configured, and the attribute OID of the specified location in the attribute area structure or the regular expression of the importance value is configured (the packet attribute is the first predetermined attribute value). All traps that match the Trap OID and have the attribute OID or match the regular expression value are discarded.
形式3:配置丢弃Trap报文的Trap OID,同时配置符合此Trap OID下的Trap报文例外(同上述的报文属性非第二预定属性值的Trap报文)。例外通过Trap中指定位置的属性OID和value的符合配置正则表达式指定。在此方式下,当实际接收到的Trap报文的Trap OID符合上述Trap报文例外指定的规则,那么继续上报该Trap报文,否则丢弃该Trap报文。For example, the Trap OID of the Trap packet is configured, and the Trap packet with the Trap OID is not the same as the Trap message. The exception is specified by the matching configuration regular expression of the attribute OID and value of the specified location in the Trap. In this mode, the Trap OID of the Trap packet is the same as the Trap packet exception. The Trap packet is discarded. Otherwise, the Trap packet is discarded.
下面结合具体的丢弃规则对本发明进行举例说明。The invention is exemplified below in conjunction with specific discarding rules.
实施例一Embodiment 1
使用Trap OID方式指定丢弃Trap报文的过程:The process of discarding traps is as follows:
步骤1.系统启动后丢弃规则解析器62解析预定义的告警丢弃规则,生成内存中便于丢弃处理器66快速读取的内存结构。所配置的丢弃规则采用上述1的方式,如:Step 1. After the system is started, the discard rule parser 62 parses the predefined alarm discarding rule, and generates a memory structure in the memory that facilitates the discarding of the processor 66 for fast reading. The configured discard rule adopts the above 1 method, such as:
/trap/1/exclude/oid=.1.3.6.1.2.1.11.2/trap/1/exclude/oid=.1.3.6.1.2.1.11.2
表示符合Trap OID是.1.3.6.1.2.1.11.2的Trap报文将被丢弃,其他Trap报文上报到上层业务模块。The Trap packets whose Trap OID is in the range of 1.1.3.6.1.2.1.11.2 are discarded. The other Trap packets are reported to the upper-layer service module.
步骤2.网管系统在告警接收端口接收到Trap报文,Trap解析处理器64对Trap报文进行原始的协议层结构解析。Step 2: The network management system receives the trap packet on the alarm receiving port, and the trap parsing processor 64 parses the original protocol layer structure of the trap packet.
步骤3.解析后的Trap结构进入丢弃处理器66,此处完成Trap OID和属性字段与预配置 的规则比较,根据比较结构丢弃告警,或者送入上报发送器68。Step 3. The parsed Trap structure enters the drop processor 66, where the Trap OID and attribute fields and pre-configuration are completed. The rule comparison discards the alarm according to the comparison structure or sends it to the reporting transmitter 68.
步骤4.上报发送器68将告警分别送入各个需要接收告警进行业务处理的上层模块。Step 4. The reporting transmitter 68 sends the alarms to the upper modules that need to receive alarms for service processing.
实施例二Embodiment 2
使用Trap OID和属性指定丢弃特定Trap报文的过程:Use the Trap OID and attributes to specify the process of discarding specific Trap packets:
步骤1.系统启动后丢弃规则解析器62解析预定义的告警丢弃规则,生成内存中便于丢弃处理器66快速读取的内存结构。例如所配置的丢弃规则采用上述形式二中的方式,如:Step 1. After the system is started, the discard rule parser 62 parses the predefined alarm discarding rule, and generates a memory structure in the memory that facilitates the discarding of the processor 66 for fast reading. For example, the configured discard rule adopts the method in the above second form, such as:
/trap/1/exclude/oid=.1.3.6.1.2.1.11.2/trap/1/exclude/oid=.1.3.6.1.2.1.11.2
/trap/1/exclude/value=2_.1.3.6.1.2.1.2.2.1.1_^[0-9]*$/trap/1/exclude/value=2_.1.3.6.1.2.1.2.2.1.1_^[0-9]*$
在此实施例中配置了第1条告警丢弃规则,表示符合Trap OID是.1.3.6.1.2.1.11.2,并且属性区域中第2个属性的key是.1.3.6.1.2.1.2.2.1.1,并且value符合正则表达式^[0-9]*$的Trap将被丢弃。In this embodiment, the first alarm discarding rule is configured, indicating that the Trap OID is 1.1.3.6.1.2.1.11.2, and the key of the second attribute in the attribute area is .1.3.6.1.2.1.2.2.1.1. And the trap whose value matches the regular expression ^[0-9]*$ will be discarded.
步骤2.网管系统在告警接收端口接收到Trap后,Trap解析处理器64对Trap进行原始的协议层结构解析。Step 2. After the network management system receives the trap on the alarm receiving port, the trap parsing processor 64 performs the original protocol layer structure parsing on the trap.
步骤3.解析后的Trap结构进入丢弃处理器66,此处完成TrapOID和属性字段与预配置的规则比较,根据比较结构丢弃告警,或者送入上报发送器68。Step 3: The parsed Trap structure enters the discarding processor 66, where the TrapOID and the attribute field are compared with the pre-configured rules, and the alarm is discarded according to the comparison structure, or sent to the reporting transmitter 68.
详细判断流程如图7所示,图7是根据本发明实施例的使用Trap OID和属性指定丢弃特定Trap报文的判断流程图。图7中包括如下步骤:S1解析报文中Trap OID,在D1中判断,如果在规则中没有找到相应的Trap OID规则就通过S4,进入到步骤4。如果配置了此Trap OID规则,S2解析报文中属性字段提取属性OID和值,并在D2中判断,匹配规则exclude则丢弃S3,不送入步骤4,否则S4送入步骤4。The detailed judgment process is as shown in FIG. 7. FIG. 7 is a flow chart of determining the discarding of a specific Trap message by using the Trap OID and the attribute. FIG. 7 includes the following steps: S1 parses the Trap OID in the packet, and determines in D1 that if the corresponding Trap OID rule is not found in the rule, the process proceeds to S4 through S4. If the Trap OID rule is configured, the attribute field in the S2 parsing message extracts the attribute OID and value, and judges in D2. If the matching rule excludes S3, it does not send to step 4, otherwise S4 sends it to step 4.
步骤4.上报发送器68将告警信息分别送入各个需要接收告警进行业务处理的上层模块。Step 4. The reporting transmitter 68 sends the alarm information to each upper module that needs to receive an alarm for service processing.
实施例三Embodiment 3
使用Trap OID和属性例外指定丢弃特定Trap报文的过程:Use the Trap OID and attribute exception to specify the process of discarding specific Trap packets:
步骤1.系统启动后62丢弃规则解析器解析预定义的告警丢弃规则,生成内存中便于丢弃处理器66快速读取的内存结构。例如所配置的丢弃规则采用上述形式三的方式,如:Step 1. After the system is started, the discarding rule parser parses the predefined alarm discarding rule, and generates a memory structure in the memory that facilitates discarding the processor 66 for fast reading. For example, the configured discard rule adopts the above form three, such as:
/trap/1/exclude/oid=.1.3.6.1.2.1.11.2/trap/1/exclude/oid=.1.3.6.1.2.1.11.2
/trap/1/exception/value=2_.1.3.6.1.2.1.2.2.1.1_^[0-9]*$/trap/1/exception/value=2_.1.3.6.1.2.1.2.2.1.1_^[0-9]*$
在实施例三中配置了第1条告警丢弃规则,表示符合Trap OID是.1.3.6.1.2.1.11.2的Trap 将被丢弃,但有个例外,就是如果属性区域中第2个属性的key是.1.3.6.1.2.1.2.2.1.1,并且value符合正则表达式^[0-9]*$的Trap将不被此规则影响,继续上报到上层业务模块。The first alarm discarding rule is configured in the third embodiment to indicate that the Trap OID is 1.1.3.6.1.2.1.11.2. Will be discarded, but with one exception, if the key of the second attribute in the attribute area is .1.3.6.1.2.1.2.2.1.1, and the value matches the regular expression ^[0-9]*$, the Trap will not Affected by this rule, continue to report to the upper layer business module.
步骤2.网管系统在告警接收端口接收到Trap后,Trap解析处理器64对Trap进行原始的协议层结构解析。Step 2. After the network management system receives the trap on the alarm receiving port, the trap parsing processor 64 performs the original protocol layer structure parsing on the trap.
步骤3.解析后的Trap结构进入丢弃处理器66,此处完成TrapOID和属性字段与预配置的规则比较,根据比较结构丢弃告警,或者送入上报发送器68。Step 3: The parsed Trap structure enters the discarding processor 66, where the TrapOID and the attribute field are compared with the pre-configured rules, and the alarm is discarded according to the comparison structure, or sent to the reporting transmitter 68.
详细判断流程如图8所示,图8是根据本发明实施例的使用Trap OID和属性例外指定丢弃特定Trap报文的判断流程图。该流程包括如下步骤:S1解析Trap报文中的TrapOID,在D1中判断,如果在丢弃规则中没有找到相应的TrapOID规则就通过S4,进入到步骤4。如果配置了此TrapID规则,S2解析报文中属性字段提取属性OID和值,并在D2中判断,没有匹配规则exception则丢弃S3,不送入步骤4,否则S4送入步骤4。The detailed judgment process is as shown in FIG. 8. FIG. 8 is a flowchart of determining the discarding of a specific Trap message by using the Trap OID and the attribute exception. The process includes the following steps: S1 parses the TrapOID in the Trap message, and determines in D1 that if the corresponding TrapOID rule is not found in the discarding rule, the process proceeds to S4 through S4. If the TrapID rule is configured, the attribute field in the S2 parsing message extracts the attribute OID and value, and judges in D2 that if there is no matching rule exception, S3 is discarded, and step 4 is not sent, otherwise S4 is sent to step 4.
步骤4.上报发送器68将告警信息分别送入各个需要接收告警进行业务处理的上层模块。Step 4. The reporting transmitter 68 sends the alarm information to each upper module that needs to receive an alarm for service processing.
相关技术中的告警丢弃或者过滤方法都是基于特定告警发生源,或者Trap经过业务解析、映射之后的用户可理解的告警码比对和丢弃。相对于相关技术中的方案,本发明实施例中的方案是基于Trap报文数据,没有进入任何业务处理层前的丢弃,同时不区分告警发生源,对全网设备发来的告警生效,处理效率高,系统开销小。并且能够基于Trap OID配置的丢弃规则之上进一步根据Trap报文中的属性指定采取的动作,做到细粒度的告警丢弃规则配置。基于Trap的设备业务自动开通网管系统通常只关心少量Trap类型,本发明实施例中的方案对于这样的系统具有重要意义。The alarm discarding or filtering method in the related art is based on a specific alarm generating source, or the trap is compared and discarded by the user after the service is parsed and mapped. Compared with the solution in the related art, the solution in the embodiment of the present invention is based on the data of the Trap packet, and does not enter the discarding before the service processing layer, and does not distinguish the source of the alarm, and the alarm sent by the device on the entire network takes effect. High efficiency and low system overhead. Based on the discarding rule configured by the Trap OID, the action taken by the attribute in the Trap packet is further specified to implement fine-grained alarm discarding rule configuration. The Trap-based device service automatic opening network management system is usually only concerned with a small number of Trap types. The solution in the embodiment of the present invention is of great significance for such a system.
需要说明的是,上述各个模块是可以通过软件或硬件来实现的,对于后者,可以通过以下方式实现,但不限于此:上述模块均位于同一处理器中;或者,上述模块分别位于多个处理器中。It should be noted that each of the above modules may be implemented by software or hardware. For the latter, the foregoing may be implemented by, but not limited to, the foregoing modules are all located in the same processor; or, the modules are located in multiple In the processor.
本发明的实施例还提供了一种存储介质。可选地,在本实施例中,上述存储介质可以被设置为存储用于执行以下步骤的程序代码:Embodiments of the present invention also provide a storage medium. Optionally, in the embodiment, the foregoing storage medium may be configured to store program code for performing the following steps:
S1,接收用于标识设备告警信息的Trap报文;S1, receiving a trap message for identifying device alarm information;
S2,将该Trap报文与用于丢弃Trap报文的丢弃规则进行匹配;S2, the Trap packet is matched with the discarding rule for discarding the Trap packet.
S3,根据匹配结果对该Trap报文进行处理。S3: The Trap message is processed according to the matching result.
可选地,在本实施例中,上述存储介质可以包括但不限于:U盘、只读存储器(Read-Only Memory,简称为ROM,)、随机存取存储器(Random Access Memory,简称为RAM)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。Optionally, in this embodiment, the foregoing storage medium may include, but is not limited to, a USB flash drive, a Read-Only Memory (ROM), and a Random Access Memory (RAM). A variety of media that can store program code, such as a hard disk, a disk, or an optical disk.
可选地,本实施例中的具体示例可以参考上述实施例及可选实施方式中所描述的示例,本实施例在此不再赘述。 For example, the specific examples in this embodiment may refer to the examples described in the foregoing embodiments and the optional embodiments, and details are not described herein again.
显然,本领域的技术人员应该明白,上述的本发明的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本发明不限制于任何特定的硬件和软件结合。It will be apparent to those skilled in the art that the various modules or steps of the present invention described above can be implemented by a general-purpose computing device that can be centralized on a single computing device or distributed across a network of multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device such that they may be stored in the storage device by the computing device and, in some cases, may be different from the order herein. The steps shown or described are performed, or they are separately fabricated into individual integrated circuit modules, or a plurality of modules or steps thereof are fabricated as a single integrated circuit module. Thus, the invention is not limited to any specific combination of hardware and software.
以上所述仅为本发明的优选实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明可以有各种更改和变化。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The above description is only the preferred embodiment of the present invention, and is not intended to limit the present invention, and various modifications and changes can be made to the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and scope of the present invention are intended to be included within the scope of the present invention.
工业实用性Industrial applicability
如上所述,本发明实施例提供的一种陷阱Trap报文处理方法及装置具有以下有益效果:解决了相关技术中存在的由于有用的Trap报文会被无用的Trap报文淹没而被丢弃,从而导致的Trap报文的误丢弃率高的问题,进而达到了降低Trap报文的误丢弃率的效果。 As described above, the method and the device for processing a trap Trap packet provided by the embodiment of the present invention have the following beneficial effects: the problem that the useful Trap packet is discarded by the useless Trap packet in the related art is solved. As a result, the problem of high discard rate of Trap packets is high, and the effect of reducing the discard rate of Trap packets is achieved.

Claims (10)

  1. 一种陷阱Trap报文处理方法,包括:A trap Trap packet processing method includes:
    接收用于标识设备告警信息的Trap报文;Receiving a trap message for identifying device alarm information;
    将所述Trap报文与用于丢弃Trap报文的丢弃规则进行匹配;Match the Trap packet with the discard rule for discarding the Trap packet.
    根据匹配结果对所述Trap报文进行处理。The Trap packet is processed according to the matching result.
  2. 根据权利要求1所述的方法,其中,所述丢弃规则包括以下至少之一:The method of claim 1, wherein the discarding rule comprises at least one of the following:
    丢弃预配置的Trap对象标识符OID标识的Trap报文;Discard the trap message of the pre-configured Trap object identifier OID.
    丢弃预配置的Trap对象标识符OID标识的,且报文属性为第一预定属性值的Trap报文;And discarding the trap message whose identifier is the first predetermined attribute value, and the packet attribute is the first predetermined attribute value.
    丢弃预配置的Trap对象标识符OID标识的,且报文属性非第二预定属性值的Trap报文。A Trap packet whose pre-configured Trap object identifier OID is identified and whose packet attribute is not the second predetermined attribute value is discarded.
  3. 根据权利要求1所述的方法,其中,在接收用于标识设备告警信息的所述Trap报文之前,还包括:The method according to claim 1, wherein before receiving the Trap message for identifying device alarm information, the method further includes:
    解析所述丢弃规则;Parsing the discarding rule;
    根据解析后的丢弃规则生成具备预定内存结构的丢弃规则。A discard rule having a predetermined memory structure is generated according to the parsed discard rule.
  4. 根据权利要求3所述的方法,其中,将所述Trap报文与用于丢弃Trap报文的丢弃规则进行匹配包括:The method of claim 3, wherein matching the Trap message with a discarding rule for discarding a Trap message includes:
    对所述Trap报文进行原始的协议层结构解析;Performing original protocol layer structure parsing on the Trap packet;
    将解析后的Trap报文和所述具备预定内存结构的丢弃规则进行匹配。Matching the parsed Trap message with the discarding rule with a predetermined memory structure.
  5. 根据权利要求1至4中任一项所述的方法,其中,根据匹配结果对所述Trap报文进行处理包括:The method according to any one of claims 1 to 4, wherein processing the Trap message according to the matching result comprises:
    当所述Trap报文与所述丢弃规则相匹配时,丢弃所述Trap报文;和/或,When the Trap packet matches the discarding rule, the Trap packet is discarded; and/or,
    当所述Trap报文与所述丢弃规则不匹配时,将所述Trap报文映射成告警信息;将所述告警信息发送给用于对所述告警信息进行处理的上层模块。When the Trap packet does not match the discarding rule, the Trap packet is mapped to the alarm information, and the alarm information is sent to an upper layer module for processing the alarm information.
  6. 一种陷阱Trap报文处理装置,包括:A trap trap processing device includes:
    接收模块,设置为接收用于标识设备告警信息的Trap报文;a receiving module, configured to receive a trap message for identifying device alarm information;
    匹配模块,设置为将所述Trap报文与用于丢弃Trap报文的丢弃规则进行匹配;The matching module is configured to match the Trap packet with a discarding rule for discarding Trap packets.
    处理模块,设置为根据匹配结果对所述Trap报文进行处理。The processing module is configured to process the Trap message according to the matching result.
  7. 根据权利要求6所述的装置,其中,所述丢弃规则包括以下至少之一: The apparatus of claim 6, wherein the discarding rule comprises at least one of the following:
    丢弃预配置的Trap对象标识符OID标识的Trap报文;Discard the trap message of the pre-configured Trap object identifier OID.
    丢弃预配置的Trap对象标识符OID标识的,且报文属性为第一预定属性值的Trap报文;And discarding the trap message whose identifier is the first predetermined attribute value, and the packet attribute is the first predetermined attribute value.
    丢弃预配置的Trap对象标识符OID标识的,且报文属性非第二预定属性值的Trap报文。A Trap packet whose pre-configured Trap object identifier OID is identified and whose packet attribute is not the second predetermined attribute value is discarded.
  8. 根据权利要求6所述的装置,其中,还包括:The apparatus of claim 6 further comprising:
    解析模块,设置为解析所述丢弃规则;a parsing module configured to parse the discarding rule;
    生成模块,设置为根据解析后的丢弃规则生成具备预定内存结构的丢弃规则。The generating module is configured to generate a discarding rule with a predetermined memory structure according to the parsed discarding rule.
  9. 根据权利要求8所述的装置,其中,所述匹配模块包括:The apparatus of claim 8 wherein said matching module comprises:
    解析单元,设置为对所述Trap报文进行原始的协议层结构解析;The parsing unit is configured to perform original protocol layer structure parsing on the Trap packet;
    匹配单元,设置为将解析后的Trap报文和所述具备预定内存结构的丢弃规则进行匹配。The matching unit is configured to match the parsed Trap message with the discarding rule with a predetermined memory structure.
  10. 根据权利要求6至9中任一项所述的装置,其中,所述处理模块包括:The apparatus according to any one of claims 6 to 9, wherein the processing module comprises:
    丢弃单元,设置为当所述Trap报文与所述丢弃规则相匹配时,丢弃所述Trap报文;和/或,The discarding unit is configured to discard the Trap packet when the Trap packet matches the discarding rule; and/or,
    映射单元,设置为当所述Trap报文与所述丢弃规则不匹配时,将所述Trap报文映射成告警信息;发送单元,设置为将所述告警信息发送给用于对所述告警信息进行处理的上层模块。 The mapping unit is configured to: when the Trap packet does not match the discarding rule, the Trap packet is mapped to the alarm information; and the sending unit is configured to send the alarm information to the alarm information. The upper module for processing.
PCT/CN2016/076645 2015-06-16 2016-03-17 Trap message processing method and apparatus WO2016202025A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510333033.2A CN106330478A (en) 2015-06-16 2015-06-16 Method and device for processing trap message
CN201510333033.2 2015-06-16

Publications (1)

Publication Number Publication Date
WO2016202025A1 true WO2016202025A1 (en) 2016-12-22

Family

ID=57544901

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/076645 WO2016202025A1 (en) 2015-06-16 2016-03-17 Trap message processing method and apparatus

Country Status (2)

Country Link
CN (1) CN106330478A (en)
WO (1) WO2016202025A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111885180A (en) * 2020-07-28 2020-11-03 海尔优家智能科技(北京)有限公司 Message issuing method and device

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112787847A (en) * 2020-12-24 2021-05-11 凌云天博光电科技股份有限公司 Method and device for rapidly processing large number of Trap based on network management system EPON

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101312405A (en) * 2007-05-24 2008-11-26 杭州华三通信技术有限公司 Alarm processing method and network management system
CN101369918A (en) * 2008-09-25 2009-02-18 浙江工业大学 Network management browser
CN101388808A (en) * 2008-10-24 2009-03-18 中兴通讯股份有限公司 Trap processing method on the basis of simple network management protocol
CN101540700A (en) * 2009-04-10 2009-09-23 成都市华为赛门铁克科技有限公司 Configuration linkage method, system, terminal and network equipment management server
WO2012114343A1 (en) * 2011-02-24 2012-08-30 Hewlett-Packard Development Company, L.P. System and method for error reporting in a network

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101056228A (en) * 2007-06-22 2007-10-17 中兴通讯股份有限公司 Test method and system for data device alarming
CN102571382A (en) * 2010-12-16 2012-07-11 中兴通讯股份有限公司 Trap processing method, webmaster and system based on SNMP (Simple Network Management Protocol)
CN103138958B (en) * 2011-11-23 2017-11-24 上海寰创通信科技股份有限公司 A kind of implementation method of network management standard interface
CN103414596B (en) * 2013-08-28 2017-07-14 上海斐讯数据通信技术有限公司 The method that all manufacturer Trap and processing are recognized based on simple management procotol

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101312405A (en) * 2007-05-24 2008-11-26 杭州华三通信技术有限公司 Alarm processing method and network management system
CN101369918A (en) * 2008-09-25 2009-02-18 浙江工业大学 Network management browser
CN101388808A (en) * 2008-10-24 2009-03-18 中兴通讯股份有限公司 Trap processing method on the basis of simple network management protocol
CN101540700A (en) * 2009-04-10 2009-09-23 成都市华为赛门铁克科技有限公司 Configuration linkage method, system, terminal and network equipment management server
WO2012114343A1 (en) * 2011-02-24 2012-08-30 Hewlett-Packard Development Company, L.P. System and method for error reporting in a network

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111885180A (en) * 2020-07-28 2020-11-03 海尔优家智能科技(北京)有限公司 Message issuing method and device
CN111885180B (en) * 2020-07-28 2023-06-20 海尔优家智能科技(北京)有限公司 Message issuing method and device

Also Published As

Publication number Publication date
CN106330478A (en) 2017-01-11

Similar Documents

Publication Publication Date Title
EP1999890B1 (en) Automated network congestion and trouble locator and corrector
CN103430483B (en) For determining the technology of the correlating event in communication system
CN105577496B (en) The system that a kind of home gateway identifies access device type using cloud platform
US20150319032A1 (en) Method and system for detecting changes in a network using simple network management protocol polling
CN109756528B (en) Frequency control method and device, equipment, storage medium and server
CN113300816B (en) Node positioning method, network transmission method, device and equipment
WO2016187979A1 (en) Transmitting method and apparatus for bidirectional forwarding detection (bfd) message
CN104660730B (en) The means of communication and its system of server-side and far-end unit
WO2016202025A1 (en) Trap message processing method and apparatus
US20160248652A1 (en) System and method for classifying and managing applications over compressed or encrypted traffic
KR102397346B1 (en) Methods, devices and systems for monitoring data traffic
EP3541088B1 (en) Method, device and system for bearing a frame sequence number in a multichannel passive optical network
CN110784375B (en) Network data monitoring method and device, electronic equipment and storage medium
WO2013078873A1 (en) Method and device for identifying response message
KR20220029142A (en) Sdn controller server and method for analysing sdn based network traffic usage thereof
WO2017070965A1 (en) Data processing method based on software defined network and related device
CN114285769B (en) Shared internet surfing detection method, device, equipment and storage medium
CN106713014B (en) Monitored host in monitoring system, monitoring system and monitoring method
CN115242892A (en) Flow identification obtaining method, device, equipment and medium
WO2015176450A1 (en) Service delivery method and system
CA3186107A1 (en) Method, apparatus, system, device, and storage medium for implementing terminal verification
KR20120010535A (en) Apparatus and method for analyzing packet
US10466934B2 (en) Methods and systems for time-based binning of network traffic
CN106301832A (en) A kind of method and apparatus of processing system daily record message
US9141462B2 (en) System and method for error reporting in a network

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: 16810766

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: 16810766

Country of ref document: EP

Kind code of ref document: A1