WO2015131523A1 - Data query method, system and computer storage medium - Google Patents

Data query method, system and computer storage medium Download PDF

Info

Publication number
WO2015131523A1
WO2015131523A1 PCT/CN2014/088926 CN2014088926W WO2015131523A1 WO 2015131523 A1 WO2015131523 A1 WO 2015131523A1 CN 2014088926 W CN2014088926 W CN 2014088926W WO 2015131523 A1 WO2015131523 A1 WO 2015131523A1
Authority
WO
WIPO (PCT)
Prior art keywords
oid
configuration item
data
query
request
Prior art date
Application number
PCT/CN2014/088926
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 WO2015131523A1 publication Critical patent/WO2015131523A1/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/02Standardisation; Integration
    • H04L41/0213Standardised network management protocols, e.g. simple network management protocol [SNMP]

Definitions

  • the present invention relates to a data transmission method in the field of communications, and in particular to a data query method, system and computer storage medium based on the Simple Network Management Protocol (SNMP) protocol.
  • SNMP Simple Network Management Protocol
  • Network management essentially monitors, analyzes, and controls various devices in the network system to ensure reliable and efficient operation of the network system.
  • the network administrator manages the face of the network by managing the interactive communication between the workstations and the agents.
  • Management information is the management object.
  • the protocol between the management workstation and the agent is the network management protocol.
  • TCP Transmission Control Protocol
  • IP Internet Protocol
  • SNMP Simple Network Management Protocol
  • the getbulk method introduced by the SNMP protocol from the V2 version the getBulk is configured to acquire all the data in batches, and actually implements the get-next-request operation by iteratively, wherein the get-next- The request operation is configured to look up the proxy for the value of the next instance of the instance that matches the instance ID of the variable binding list, ie, return the instance that is larger than the delivered index, such as an instance with an index value of 2, 3, or 4. If the index delivered by the get-next-request operation is 2, an instance with an index value of 3 is returned. It can be seen that the getBulk method completely replaces multiple get or getNext operations, so that a large amount of data can be obtained through a single request. the goal of. Its biggest advantage is that it reduces the number of interactions. A request can get a batch of data, which improves the query efficiency compared to the original get and getNext operations.
  • Embodiments of the present invention provide a data query method, system, and computer storage medium to support efficient query of data.
  • the embodiment of the invention provides a data query method, including:
  • the getBulk command is sent according to the SNMP protocol, and the entity data of the target request object is obtained according to the query condition.
  • the configuration item of the query condition includes at least one of the following configuration items:
  • the maximum number of requests configuration item that calibrates the maximum number of requests at a time
  • Timeout time configuration item that calibrates a request timeout period
  • a retries configuration item that calibrates the number of retries for which a request failed
  • the overrun message splitting number configuration item is configured, and the overrun message splitting number configuration item identifies the number of the message that divides the overrun message, until the overrun message is supported to be returned normally.
  • the configuration item of the query condition further includes:
  • a boundary OID configuration item is configured, and the boundary OID configuration item is used to calibrate the subsequent data processing before the target boundary OID is identified.
  • the configuration item of the query condition further includes:
  • An OID collection list configuration item that calibrates a list of valid OID collections.
  • the data query method further includes:
  • the OID self-growth lookup logic is executed according to at least one preset self-growth OID processing mechanism until a valid OID is found.
  • An embodiment of the present invention provides a data query system, including:
  • the management terminal is configured to acquire a query condition configured for the target request object, and send a getBulk command to the agent based on the SNMP protocol;
  • the agent is configured to acquire entity data of the target request object according to the query condition.
  • the configuration item of the query condition includes at least one of the following configuration items:
  • the maximum number of requests configuration item that calibrates the maximum number of requests at a time
  • Timeout time configuration item that calibrates a request timeout period
  • a retries configuration item that calibrates the number of retries for which a request failed
  • the configuration item of the query condition further includes:
  • a boundary OID is configured to calibrate the boundary OID configuration item that terminates subsequent data processing when the boundary OID is identified.
  • the configuration item of the query condition further includes:
  • An OID collection list configuration item that calibrates a list of valid OID collections.
  • the agent is further configured to perform OID self-growth lookup logic according to at least one preset self-growth OID processing mechanism until a valid OID is found, when it is recognized that the data returned according to the getBulk command does not belong to the required OID set list.
  • the embodiment of the invention further provides a computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions are configured to execute the data query method described above.
  • the technical solution provided by the embodiment of the invention provides a flexible, effective and fast data query method. Compared with related technologies, it can reduce the number of requests, can filter out unnecessary data processing, can realize as much request data as possible, and support the number of automated probe change requests, thereby effectively improving the query efficiency of batch data.
  • FIG. 1 is a schematic flowchart 1 of a data query method based on an SNMP protocol according to an embodiment of the present invention
  • FIG. 2 is a schematic flowchart 2 of a data query method based on an SNMP protocol according to an embodiment of the present invention
  • FIG. 3 is a schematic flowchart 3 of a data query method based on an SNMP protocol according to an embodiment of the present invention
  • FIG. 4 is a schematic structural diagram of a data query system based on an SNMP protocol according to an embodiment of the present invention.
  • SNMP is an application layer protocol and is part of the TCP/IP protocol family, it operates through UDP (User Datagram Protocol), in other words, it is limited by the length of the UDP packet, based on the getBulk A data request made by the method may not be able to meet the needs of the user.
  • UDP User Datagram Protocol
  • OID Object identifier
  • OID collection data function.
  • the data request based on the getBulk method in the related art is prone to request timeout.
  • the possible reasons for the timeout include: interface timeout, request waiting timeout, network delay caused by network instability, and reduced user experience.
  • the data query method based on the SNMP protocol provided by the embodiment of the present invention is implemented to implement efficient data query, and includes the following specific steps:
  • the configuration item of the query condition includes at least one of the following configuration items:
  • the synchronous OID configuration item of the start operation object identifier OID is calibrated.
  • the configuration of the synchronous OID configuration item in the interface or the configuration file can support the dynamic designation of querying different OIDs, which is flexible and changeable;
  • the maximum number of requests for the maximum number of requests can be calibrated at a time. For example, configuring the maximum number of requests in the interface or configuration file can dynamically specify the maximum request parameters. It is enough to adjust according to the length of the request table instance data, so that the maximum amount of data is obtained once;
  • the retries configuration item that calibrates the number of retries for which the request fails for example, configuring the retries configuration item in the interface or the configuration file, and can support the number of attempts to re-request after dynamically requesting the request timeout;
  • configuring the overrun message splitting configuration item in the interface or configuration file may cause the requested OID content instance data to be dynamically changed, which results in uncertainty of the message length, and this configuration may be a long request message. Splitting according to the specified requirements, in the case of increasing the number of requests, the integrity of the data is guaranteed.
  • the configuration item of the query condition further includes:
  • a request table OID group has a total of 35 attributes, and the OID data collected by the demand only exists in the first 24 OIDs, and the last valid OID is the end OID: .1.3.6.1.4.1.3902.4101.1.3.1.24, boundary The OID is: .1.3.6.1.4.1.3902.4101.1.3.1.25.
  • the query is ended when the 25th attribute is currently taken.
  • the configuration item of the query condition further includes:
  • the OID collection list configuration item of a valid OID collection list is defined.
  • the getBulk operation must return the data in order when requesting the table data, from the first attribute to the nth attribute, and return once. Current instance all instance values, then Returns the next attribute data. In this case, it is confirmed according to the predefined set contents which need to process the OID and which do not have to be processed, thereby reducing redundant data processing.
  • the data query method based on the SNMP protocol may further include:
  • the OID self-growth search logic is executed according to at least one preset self-growth OID processing mechanism until a valid OID is found.
  • the current set of data has the required OID data, and contains the unnecessary OID data.
  • the subsequent processing flow is skipped, and the self-growth processing mechanism is used until Subsequent processing is performed after the next valid OID (when the boundary OID is not reached), reducing the traversal of unnecessary OID instance data and redundant request overhead.
  • the method provided by the embodiment of the present invention provides an over-limit message OID cache mechanism when requesting data according to the getBulk command: the OID is cached while the over-limit message is split. By buffering the OID set, it is determined whether the next batch of data is a split OID, and if so, the number of split requests is continued, otherwise, the original request number is restored. It also provides a request number reset mechanism: the number of proactive automatic reset requests is to get as much data as possible for each time, to send requests as little as possible, and to complete tasks efficiently.
  • Step S201 Collect related configuration items from an interface or a configuration file.
  • the query method is more flexible.
  • conditions can be formulated according to specific examples to achieve the most efficient and most suitable query.
  • the background can pre-set default experience values for configuration items for use.
  • Step S202 Prepare an SNMP request object and send a getBulk request.
  • Step S203 When there is data return, cyclically process each batch of data, and perform an item check as shown in Table 2 on the OID:
  • Step S204 In the case that the request operation is not completed, the last instance OID of the last request data is collected, and then enters the valid OID search logic. When the boundary OID is not reached, the attribute ID mode is accumulated until a valid OID is found.
  • Scenario 2 The last request for the last data does not belong to the required OID, then enter the OID self-growth lookup logic until a valid OID is found. Effectively avoid meaningless request messages.
  • Step S205 Processing the maximum number of requests, determining whether it is necessary to reset the number of message requests and performing corresponding processing.
  • This request is a split OID. Continue to use the number of split requests.
  • this request is not a split OID.
  • Step S206 Send a getBulk request.
  • step S203 If it is successful, if there is data return, the process goes to step S203, and if it fails, the process goes to step S207.
  • step S207 Determine whether the cause of the failure is a message overrun abnormality. If the message exceeds the limit abnormality, proceed to step S208, and then proceed to step S203; otherwise, stop the process.
  • the embodiment of the present invention further provides a data query system based on the SNMP protocol, including:
  • a manager 41 configured to acquire a query condition configured for the target request object, and send a getBulk command to the agent based on the SNMP protocol;
  • the agent 42 is configured to acquire the entity data of the target request object in the information management library 43 (MIB) according to the query condition.
  • the configuration item of the query condition includes at least one of the following configuration items:
  • the synchronous OID configuration item of the start operation object identifier OID is calibrated.
  • the configuration of the synchronous OID configuration item in the interface or the configuration file can support the dynamic designation of querying different OIDs, which is flexible and changeable;
  • the maximum number of requests for the maximum number of requests can be calibrated at a time. For example, configuring the maximum number of requests in the interface or configuration file can dynamically specify the maximum request parameters. The user can adjust the data length of the request table instance. Requesting the most data at a time;
  • the retries configuration item that calibrates the number of retries for which the request fails for example, configuring the retries configuration item in the interface or the configuration file, and can support the number of attempts to re-request after dynamically requesting the request timeout;
  • the OID content instance data may be dynamically changed, which leads to the uncertainty of the message length. This configuration can split the long request message according to the specified requirements, and ensure the completeness of the data when the number of requests is increased. .
  • the configuration item of the query condition further includes:
  • a boundary OID to calibrate the boundary OID configuration item that ends the subsequent data processing when the boundary OID is recognized.
  • the boundary OID configuration item is configured in the interface or configuration file, and can be judged according to the boundary OID, and the discarding is not required.
  • the data is returned in time.
  • a request table OID group has a total of 35 attributes, and the OID data collected by the demand only exists in the first 24 OIDs, and the last valid OID is the end OID: .1.3.6.1.4.1.3902.4101.1.3.1.24, boundary The OID is: .1.3.6.1.4.1.3902.4101.1.3.1.25.
  • the query is ended when the 25th attribute is currently taken.
  • the configuration item of the query condition further includes:
  • a boundary OID to calibrate the boundary OID configuration item that ends the subsequent data processing when the boundary OID is recognized.
  • the boundary OID configuration item is configured in the interface or configuration file, and can be judged according to the boundary OID, and the discarding is not required.
  • the data is returned in time.
  • a request table OID group has a total of 35 attributes, and the OID data collected by the demand only exists in the first 24 OIDs, and the last valid OID is the end OID: .1.3.6.1.4.1.3902.4101.1.3.1.24, boundary The OID is: .1.3.6.1.4.1.3902.4101.1.3.1.25.
  • the query is ended when the 25th attribute is currently taken.
  • the configuration item of the query condition further includes:
  • the OID collection list configuration item of a valid OID collection list is defined.
  • the getBulk operation must return the data in order when requesting the table data, from the first attribute to the nth attribute, and return once. All instance values of the current property, and then return to the next property data. In this case, it is confirmed according to the predefined set contents which need to process the OID and which do not have to be processed, thereby reducing redundant data processing.
  • the agent is further configured to perform OID self-growth lookup logic according to at least one preset self-growth OID processing mechanism until a valid OID is found, when it is recognized that the data returned according to the getBulk command does not belong to the required OID set list.
  • the current set of data has the required OID data, and contains the unnecessary OID data.
  • the self-growth processing mechanism is used until Subsequent processing is performed after the next valid OID (when the boundary OID is not reached), reducing the traversal of unnecessary OID instance data and redundant request overhead.
  • the agent when the agent requests data according to the getBulk command, the agent also provides an overrun message OID cache mechanism: the OID is cached while the overrun message is split. By buffering the OID set, it is determined whether the next batch of data is a split OID, and if so, the number of split requests is continued, otherwise, the original request number is restored. And the agent also provides a request number reset mechanism: the number of probe automatic reset requests is to obtain data as much as possible for each time, to send requests as little as possible, and to complete tasks efficiently.
  • the embodiment of the invention further describes a computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions are configured to execute the data shown in any one of FIG. 1, FIG. 2 or FIG. Query method.
  • the disclosed apparatus and method may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division, and the actual implementation may have another The way of dividing, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored, or not executed.
  • the coupling, or direct coupling, or communication connection of the components shown or discussed may be indirect coupling or communication connection through some interfaces, devices or units, and may be electrical, mechanical or other forms. of.
  • the units described above as separate components may or may not be physically separated, and the components displayed as the unit may or may not be physical units, that is, may be located in one place or distributed to multiple network units; Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may be separately used as one unit, or two or more units may be integrated into one unit;
  • the unit can be implemented in the form of hardware or in the form of hardware plus software functional units.
  • the foregoing program may be stored in a computer readable storage medium, and the program is executed when executed.
  • the foregoing storage medium includes: a mobile storage device, a random access memory (RAM), a read-only memory (ROM), a magnetic disk, or an optical disk.
  • RAM random access memory
  • ROM read-only memory
  • magnetic disk or an optical disk.
  • optical disk A medium that can store program code.
  • the above-described integrated unit of the present invention may be stored in a computer readable storage medium if it is implemented in the form of a software function module and sold or used as a standalone product.
  • the technical solution of the embodiments of the present invention may be embodied in the form of a software product in essence or in the form of a software product, which is stored in a storage medium and includes a plurality of instructions for making
  • a computer device (which may be a personal computer, server, or network device, etc.) performs all or part of the methods described in various embodiments of the present invention.
  • the foregoing storage medium includes: a mobile storage device, a RAM, a ROM, a disk, or a light.
  • a medium such as a disk that can store program code.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

Disclosed in an embodiment of the present invention are a data query method, system and computer storage medium, the method comprising: acquiring a query condition configured for a target requested object; transmitting a getBulk command based on an SNMP protocol, and acquiring entity data of the target requested object according to the query condition. DARWING: FIG. 1: S10 Acquiring a query condition configured for a target requested object S20 Transmitting a getBulk command based on an SNMP protocol, and acquiring entity data of the target requested object according to the query condition

Description

数据查询方法、系统及计算机存储介质Data query method, system and computer storage medium 技术领域Technical field
本发明涉及通信领域的数据传输方法,具体而言,涉及一种基于简单网络管理协议(SNMP,Simple Network Management Protocol)协议的数据查询方法、系统及计算机存储介质。The present invention relates to a data transmission method in the field of communications, and in particular to a data query method, system and computer storage medium based on the Simple Network Management Protocol (SNMP) protocol.
背景技术Background technique
随着目前网络技术的飞速发展,大数据时代也随之到来,在此形势下,对于网络数据的传输技术也面临着越加严峻的挑战。With the rapid development of network technology, the era of big data has also come. Under this situation, the transmission technology of network data is also facing more and more severe challenges.
网络管理,实质对网络系统中的各种设备进行监测、分析以及控制,从而保障网络系统可靠有效地运行。网络管理员通过管理工作站于代理之间的交互通信以达到对网络进行管理的面对。为了保证管理工作站与代理之间能正确地交换管理信息,需要对管理信息作出定义和在管理工作站于代理两者之间达成一致协议。管理信息即管理对象,管理工作站于代理之间的协议就是网管协议,目前,使用最为广泛的网管协议便是基于传输控制协议(TCP,Transmission Control Protocol)/网络之间互连的协议(IP,Internet Protocol)的简单网络管理协议SNMP协议,该协议简单、易于实现且具有良好的可扩充性,是工业界事实上的网管协议标准。Network management essentially monitors, analyzes, and controls various devices in the network system to ensure reliable and efficient operation of the network system. The network administrator manages the face of the network by managing the interactive communication between the workstations and the agents. In order to ensure the correct exchange of management information between the management workstation and the agent, it is necessary to define the management information and reach an agreement between the management workstation and the agent. Management information is the management object. The protocol between the management workstation and the agent is the network management protocol. Currently, the most widely used network management protocol is based on the Transmission Control Protocol (TCP)/Internet-based interconnection protocol (IP, Internet Protocol) Simple Network Management Protocol SNMP protocol, which is simple, easy to implement and has good scalability. It is the de facto network management protocol standard in the industry.
SNMP协议从V2版本开始引入的获取数据(getBulk)方法,所述getBulk配置为批量获取所有的数据,实际上时通过迭代调用get-next-request操作来实现的,其中,所述get-next-request操作配置为向代理查找与变量绑定列表的实例ID相匹配的实例的下一个实例的值,即返回比下发的索引大的那个实例,比如有索引值为2、3、4的实例,若get-next-request操作下发的索引是2,则返回索引值为3的实例。可见,所述getBulk方法完全替代了多次的get或getNext操作,藉以实现通过单次请求便能够获取大量数据 的目的。它最大的优势是减少了交互次数,一次请求可以获取一批数据,相比原有的get和getNext操作提升了查询效率。The getbulk method introduced by the SNMP protocol from the V2 version, the getBulk is configured to acquire all the data in batches, and actually implements the get-next-request operation by iteratively, wherein the get-next- The request operation is configured to look up the proxy for the value of the next instance of the instance that matches the instance ID of the variable binding list, ie, return the instance that is larger than the delivered index, such as an instance with an index value of 2, 3, or 4. If the index delivered by the get-next-request operation is 2, an instance with an index value of 3 is returned. It can be seen that the getBulk method completely replaces multiple get or getNext operations, so that a large amount of data can be obtained through a single request. the goal of. Its biggest advantage is that it reduces the number of interactions. A request can get a batch of data, which improves the query efficiency compared to the original get and getNext operations.
然而在相关技术中,对于基于所述getBulk方法获取批量数据的应用还存在诸多不足,难以实现高效数据查询。However, in the related art, there are still many deficiencies in the application for obtaining batch data based on the getBulk method, and it is difficult to implement efficient data query.
发明内容Summary of the invention
本发明实施例提供一种数据查询方法、系统及计算机存储介质,以支持高效地查询数据。Embodiments of the present invention provide a data query method, system, and computer storage medium to support efficient query of data.
本发明实施例采用以下技术方案实现:The embodiment of the invention adopts the following technical solutions:
本发明实施例提供一种数据查询方法,包括:The embodiment of the invention provides a data query method, including:
获取针对目标请求对象而配置的查询条件;Get the query conditions configured for the target request object;
基于SNMP协议发送getBulk命令,依据所述查询条件获取所述目标请求对象的实体数据。The getBulk command is sent according to the SNMP protocol, and the entity data of the target request object is obtained according to the query condition.
优选地,所述查询条件的配置项包括下述配置项中的至少一个:Preferably, the configuration item of the query condition includes at least one of the following configuration items:
标定启始操作对象标识符OID的同步OID配置项;Aligning the synchronous OID configuration item of the start operation object identifier OID;
标定一次最多请求条数的最大请求数配置项;The maximum number of requests configuration item that calibrates the maximum number of requests at a time;
标定一次请求超时时间的超时时间配置项;Timeout time configuration item that calibrates a request timeout period;
标定一次请求失败的重试次数的重试次数配置项;A retries configuration item that calibrates the number of retries for which a request failed;
以及,标定超限消息分割数配置项,所述超限消息分割数配置项标识对超限消息的消息进行分割的条数,直至支持所述超限消息正常返回。And, the overrun message splitting number configuration item is configured, and the overrun message splitting number configuration item identifies the number of the message that divides the overrun message, until the overrun message is supported to be returned normally.
优选地,所述查询条件的配置项还包括:Preferably, the configuration item of the query condition further includes:
配置一个边界OID配置项,所述边界OID配置项用于标定在识别到目标边界OID时提前结束后续数据处理。A boundary OID configuration item is configured, and the boundary OID configuration item is used to calibrate the subsequent data processing before the target boundary OID is identified.
优选地,所述查询条件的配置项还包括:Preferably, the configuration item of the query condition further includes:
标定一个有效OID集合列表的OID集合列表配置项。An OID collection list configuration item that calibrates a list of valid OID collections.
优选地,所述数据查询方法还包括: Preferably, the data query method further includes:
当依据getBulk命令返回的数据不属于目标OID集合列表时,依据至少一预设自增长OID处理机制执行OID自增长查找逻辑直至找到有效OID。When the data returned according to the getBulk command does not belong to the target OID set list, the OID self-growth lookup logic is executed according to at least one preset self-growth OID processing mechanism until a valid OID is found.
本发明实施例提供一种数据查询系统,包括:An embodiment of the present invention provides a data query system, including:
管理端,配置为获取针对目标请求对象而配置的查询条件,以及基于SNMP协议向代理端发送getBulk命令;The management terminal is configured to acquire a query condition configured for the target request object, and send a getBulk command to the agent based on the SNMP protocol;
代理端,配置为依据所述查询条件获取所述目标请求对象的实体数据。The agent is configured to acquire entity data of the target request object according to the query condition.
优选地,所述查询条件的配置项包括下述配置项中的至少一个:Preferably, the configuration item of the query condition includes at least one of the following configuration items:
标定启始操作对象标识符OID的同步OID配置项;Aligning the synchronous OID configuration item of the start operation object identifier OID;
标定一次最多请求条数的最大请求数配置项;The maximum number of requests configuration item that calibrates the maximum number of requests at a time;
标定一次请求超时时间的超时时间配置项;Timeout time configuration item that calibrates a request timeout period;
标定一次请求失败的重试次数的重试次数配置项;A retries configuration item that calibrates the number of retries for which a request failed;
以及,标定对超限消息的消息进行分割的条数直至消息能够正常返回的超限消息分割数配置项。And, calibrating the number of times the message of the overrun message is divided until the overrun message split number configuration item that the message can normally return.
优选地,所述查询条件的配置项还包括:Preferably, the configuration item of the query condition further includes:
配置一个边界OID以标定在识别到该边界OID时提前结束后续数据处理的边界OID配置项。A boundary OID is configured to calibrate the boundary OID configuration item that terminates subsequent data processing when the boundary OID is identified.
优选地,所述查询条件的配置项还包括:Preferably, the configuration item of the query condition further includes:
标定一个有效OID集合列表的OID集合列表配置项。An OID collection list configuration item that calibrates a list of valid OID collections.
优选地,所述代理端还配置为当识别出依据getBulk命令返回的数据不属于需要的OID集合列表时,依据至少一预设自增长OID处理机制执行OID自增长查找逻辑直至找到有效OID。Preferably, the agent is further configured to perform OID self-growth lookup logic according to at least one preset self-growth OID processing mechanism until a valid OID is found, when it is recognized that the data returned according to the getBulk command does not belong to the required OID set list.
本发明实施例还提供一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,所述计算机可执行指令配置为执行以上所述的数据查询方法。 The embodiment of the invention further provides a computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions are configured to execute the data query method described above.
本发明实施例提供的技术方案提供了一种灵活、有效、快捷的数据查询方法。与相关技术相比,其可以减少请求次数,能够过滤掉不必要的数据处理,能够实现一次尽量多的请求数据,以及支持自动化探测性变化请求数,从而切实可行地提升批量数据的查询效率。The technical solution provided by the embodiment of the invention provides a flexible, effective and fast data query method. Compared with related technologies, it can reduce the number of requests, can filter out unnecessary data processing, can realize as much request data as possible, and support the number of automated probe change requests, thereby effectively improving the query efficiency of batch data.
附图说明DRAWINGS
图1为本发明实施例提供的一种基于SNMP协议的数据查询方法的流程示意图一;1 is a schematic flowchart 1 of a data query method based on an SNMP protocol according to an embodiment of the present invention;
图2为本发明实施例提供的一种基于SNMP协议的数据查询方法的流程示意图二;2 is a schematic flowchart 2 of a data query method based on an SNMP protocol according to an embodiment of the present invention;
图3为本发明实施例提供的一种基于SNMP协议的数据查询方法的流程示意图三;3 is a schematic flowchart 3 of a data query method based on an SNMP protocol according to an embodiment of the present invention;
图4为本发明实施例提供的一种基于SNMP协议的数据查询系统的结构示意图。FIG. 4 is a schematic structural diagram of a data query system based on an SNMP protocol according to an embodiment of the present invention.
具体实施方式detailed description
下面结合附图和具体实施例对本发明所述技术方案作进一步的详细描述,以使本领域的技术人员可以更好的理解本发明并能予以实施,但所举实施例不作为对本发明的限定。The technical solutions of the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments to enable those skilled in the art to understand the invention. .
发明人在实施本发明的过程中发现,相关技术中基于getBulk方法获取批量数据的应用存在不足,导致难以实现高效数据查询,表现在以下方面:In the process of implementing the present invention, the inventors have found that the application of the batch data based on the getBulk method in the related art is insufficient, which makes it difficult to implement efficient data query, which is manifested in the following aspects:
1,由于SNMP为应用层协议,且为TCP/IP协议族的一部分,它通过UDP(User Datagram Protocol,用户数据报协议)来操作,换言之,即其受到UDP报文长度限制,基于所述getBulk方法进行的一次数据请求不一定能够满足用户需要。1, because SNMP is an application layer protocol and is part of the TCP/IP protocol family, it operates through UDP (User Datagram Protocol), in other words, it is limited by the length of the UDP packet, based on the getBulk A data request made by the method may not be able to meet the needs of the user.
2,对于大数据请求而言,可能需要执行多次getBulk操作,在完成所 有数据获取的过程中,得反复从上次请求的最后一个实例OID(Object identifier,对象标识符)开始,例如:OID:.1.3.6.1.4.1.3902.4101.1.3.1.25.1020,其中1020为实例ID,请求此OID,返回将从1021条实例数据开始,其流程较为复杂。2, for big data requests, you may need to perform multiple getBulk operations, in the completion of the In the process of data acquisition, it is necessary to repeatedly start from the last instance OID (Object identifier) of the last request, for example: OID: 1.1.3.6.1.4.1.3902.4101.1.3.1.25.1020, where 1020 is The instance ID, requesting this OID, will start with 1021 instance data, and the process is more complicated.
3,如果基于所述getBulk方法对表数据进行数据请求,则在返回的数据中可能存在部分不需要的OID数据。这是因为getBulk操作存在顺序返回结果数据的特点,当一个OID的全部实例返回结束后,才开始返回下个OID的实例数据,直到结束,由此可见,相关技术中基于getBulk方法不支持查询指定OID集合数据的功能。3. If a data request is made to the table data based on the getBulk method, there may be some unnecessary OID data in the returned data. This is because the getBulk operation has the characteristic of returning the result data in sequence. When all the instances of an OID are returned, the instance data of the next OID is returned until the end. It can be seen that the related technology does not support the query design based on the getBulk method. OID collection data function.
4,相关技术中基于所述getBulk方法进行数据请求容易出现请求超时,例如存在超时的可能原因包括:界面超时、请求等待超时、遇到网络不稳定导致的网络延时,降低了用户体验。4. The data request based on the getBulk method in the related art is prone to request timeout. For example, the possible reasons for the timeout include: interface timeout, request waiting timeout, network delay caused by network instability, and reduced user experience.
如图1所示,本发明实施例提供的一种基于SNMP协议的数据查询方法,以实现高效数据查询,包括如下具体步骤:As shown in FIG. 1 , the data query method based on the SNMP protocol provided by the embodiment of the present invention is implemented to implement efficient data query, and includes the following specific steps:
S101、获取针对目标请求对象而配置的查询条件;S101. Acquire a query condition configured for the target request object.
S102、基于SNMP协议发送getBulk命令,依据所述查询条件获取所述目标请求对象的实体数据。S102. Send a getBulk command according to the SNMP protocol, and acquire entity data of the target request object according to the query condition.
值得注意的是,本实施例中,依照SNMP标准的该getBulk命令(操作原语)查询数据的处理流程为本领域技术人员所公知,本文对此不做细述。It should be noted that, in this embodiment, the process of querying data according to the getBulk command (operation primitive) of the SNMP standard is well known to those skilled in the art, and will not be described in detail herein.
本实施例中,所述查询条件的配置项包括下述配置项中的至少一个:In this embodiment, the configuration item of the query condition includes at least one of the following configuration items:
1、标定启始操作对象标识符OID的同步OID配置项,例如,在界面或配置文件中配置同步OID配置项,可以支持动态指定查询不同的OID,灵活多变;1. The synchronous OID configuration item of the start operation object identifier OID is calibrated. For example, the configuration of the synchronous OID configuration item in the interface or the configuration file can support the dynamic designation of querying different OIDs, which is flexible and changeable;
2、标定一次最多请求条数的最大请求数配置项,例如,在界面或配置文件中配置最大请求数配置项,可以支持动态指定最大请求参数,用户能 够依据请求表实例数据长度进行调整,以至一次请求得到最多数据;2. The maximum number of requests for the maximum number of requests can be calibrated at a time. For example, configuring the maximum number of requests in the interface or configuration file can dynamically specify the maximum request parameters. It is enough to adjust according to the length of the request table instance data, so that the maximum amount of data is obtained once;
3、标定一次请求超时时间的超时时间配置项,例如,在界面或配置文件中配置超时时间配置项,可以支持动态指定一次请求的超时时间,可据实际的网络状况来灵活设置;3. Set the timeout time configuration item of the request timeout time. For example, configure the timeout time configuration item in the interface or configuration file to support the dynamic timeout time of a request. It can be flexibly set according to the actual network status.
4、标定一次请求失败的重试次数的重试次数配置项,例如,在界面或配置文件中配置重试次数配置项,可以支持动态指定请求超时后,重新请求的尝试次数;4. The retries configuration item that calibrates the number of retries for which the request fails, for example, configuring the retries configuration item in the interface or the configuration file, and can support the number of attempts to re-request after dynamically requesting the request timeout;
5、以及,标定对超限的消息进行分割的条数,直至支持超限的消息能够正常返回。5. And, calibrate the number of messages that are overrun, until the message that supports the overrun can return normally.
例如,在界面或配置文件中配置超限消息分割数配置项,可以使得请求的OID内容实例数据可能是动态变化的,这导致消息长度的不确定性,而此项配置可将超长请求消息按指定要求进行拆分,在增加请求次数的情况下,保证了数据的完整。For example, configuring the overrun message splitting configuration item in the interface or configuration file may cause the requested OID content instance data to be dynamically changed, which results in uncertainty of the message length, and this configuration may be a long request message. Splitting according to the specified requirements, in the case of increasing the number of requests, the integrity of the data is guaranteed.
优选实施方式中,所述查询条件的配置项还包括:In a preferred embodiment, the configuration item of the query condition further includes:
6、配置一个边界OID以标定在识别到该边界OID时提前结束后续数据处理的边界OID配置项。6. Configure a boundary OID to calibrate the boundary OID configuration item that ends the subsequent data processing when the boundary OID is identified.
例如,在界面或配置文件中配置边界OID配置项,可以根据边界OID判断,丢弃后面不需要的数据,及时返回。例如:一个请求表OID组一共有35个属性,而需求采集的OID数据只存在于前24个OID中,最后一条有效OID就是结束OID:.1.3.6.1.4.1.3902.4101.1.3.1.24,边界OID就是:.1.3.6.1.4.1.3902.4101.1.3.1.25。当前取到第25个属性时结束查询。For example, if you configure a boundary OID configuration item in the interface or configuration file, you can judge according to the boundary OID, discard the data that is not needed later, and return it in time. For example, a request table OID group has a total of 35 attributes, and the OID data collected by the demand only exists in the first 24 OIDs, and the last valid OID is the end OID: .1.3.6.1.4.1.3902.4101.1.3.1.24, boundary The OID is: .1.3.6.1.4.1.3902.4101.1.3.1.25. The query is ended when the 25th attribute is currently taken.
更为优选的实施方式中,所述查询条件的配置项还包括:In a further preferred embodiment, the configuration item of the query condition further includes:
7、标定一个有效OID集合列表的OID集合列表配置项,通过定义一个有效OID集合列表,使得在请求表数据时getBulk操作一定按序返回数据,从第1个属性到第n个属性,一次返回当前属性所有实例值,接着才 返回下个属性数据。此情况下根据预先定义集合内容确认哪些是需要处理OID,哪些不必处理,减少冗余数据处理。7. The OID collection list configuration item of a valid OID collection list is defined. By defining a valid OID collection list, the getBulk operation must return the data in order when requesting the table data, from the first attribute to the nth attribute, and return once. Current instance all instance values, then Returns the next attribute data. In this case, it is confirmed according to the predefined set contents which need to process the OID and which do not have to be processed, thereby reducing redundant data processing.
优选地,如图2所示,基于图1,基于SNMP协议的数据查询方法还可以包括:Preferably, as shown in FIG. 2, based on FIG. 1, the data query method based on the SNMP protocol may further include:
S103、当依据getBulk命令返回的数据不属于需要的OID集合列表时,依据至少一预设自增长OID处理机制执行OID自增长查找逻辑直至找到有效OID。S103. When the data returned according to the getBulk command does not belong to the required OID set list, the OID self-growth search logic is executed according to at least one preset self-growth OID processing mechanism until a valid OID is found.
具体实施时,当前一组数据中即有需要的OID数据,又包含不需要的OID数据,在判断遇到第一个不需要OID实例数据时即跳出后续处理流程,使用自增长处理机制,直到遇见下个有效OID(在未达到边界OID的情况)才进行后续处理,减少对不需要OID实例数据的遍历以及多余的请求开销。In the specific implementation, the current set of data has the required OID data, and contains the unnecessary OID data. When it is judged that the first OID instance data is not needed, the subsequent processing flow is skipped, and the self-growth processing mechanism is used until Subsequent processing is performed after the next valid OID (when the boundary OID is not reached), reducing the traversal of unnecessary OID instance data and redundant request overhead.
除此之外,本发明实施例提供的方法在依据getBulk命令请求数据时,还提供超限消息OID缓存机制:在对超限消息分割的同时将OID进行缓存。通过缓存OID集合,判断下批数据是否为分割OID,如果是,继续使用分割请求数,否则,恢复原始请求数。以及还提供请求数重置机制:探测性的自动重置请求数目前就是为每一次都尽量多的取得数据,尽量少发送请求,高效的完成任务。In addition, the method provided by the embodiment of the present invention provides an over-limit message OID cache mechanism when requesting data according to the getBulk command: the OID is cached while the over-limit message is split. By buffering the OID set, it is determined whether the next batch of data is a split OID, and if so, the number of split requests is continued, otherwise, the original request number is restored. It also provides a request number reset mechanism: the number of proactive automatic reset requests is to get as much data as possible for each time, to send requests as little as possible, and to complete tasks efficiently.
以下是本发明一具体实施例提供的基于SNMP协议的数据查询方法的实施流程,如图3所示,包括以下步骤:The following is an implementation process of the SNMP-based data query method provided by an embodiment of the present invention. As shown in FIG. 3, the following steps are included:
步骤S201:从界面或配置文件收集相关配置项。Step S201: Collect related configuration items from an interface or a configuration file.
为了应对不同场景,查询方法更为灵活可变,在本实施例中,可以依据具体实例来制定条件以达到最为高效、最符合需求的查询。例如,在某些场景之下,后台可为配置项事先制定默认的经验值,供其使用。In order to cope with different scenarios, the query method is more flexible. In this embodiment, conditions can be formulated according to specific examples to achieve the most efficient and most suitable query. For example, under certain scenarios, the background can pre-set default experience values for configuration items for use.
本实施例提供的配置项如表1所示:The configuration items provided in this embodiment are shown in Table 1:
Figure PCTCN2014088926-appb-000001
Figure PCTCN2014088926-appb-000001
Figure PCTCN2014088926-appb-000002
Figure PCTCN2014088926-appb-000002
表1Table 1
步骤S202:准备SNMP的请求对象,发送getBulk请求。Step S202: Prepare an SNMP request object and send a getBulk request.
步骤S203:当有数据返回时,循环处理每批数据,并对OID进行如表2所示的项目检查:Step S203: When there is data return, cyclically process each batch of data, and perform an item check as shown in Table 2 on the OID:
Figure PCTCN2014088926-appb-000003
Figure PCTCN2014088926-appb-000003
表2Table 2
步骤S204:在请求操作未结束的情况下,收集上一次请求数据的最后一个实例OID,然后进入有效OID查找逻辑,在未达到边界OID,累计属性ID方式直到找到有效OID。Step S204: In the case that the request operation is not completed, the last instance OID of the last request data is collected, and then enters the valid OID search logic. When the boundary OID is not reached, the attribute ID mode is accumulated until a valid OID is found.
在具体实施时,针对如下场景:In the specific implementation, for the following scenarios:
场景一、上次请求最后一条数据属于需要OID,则继续后续处理。Scenario 1. If the last data requested last time belongs to the required OID, the subsequent processing is continued.
场景二、上次请求最后一条数据不属于需要OID,则进入OID自增长查找逻辑,直至找到有效OID。有效避免无意义的请求消息。 Scenario 2: The last request for the last data does not belong to the required OID, then enter the OID self-growth lookup logic until a valid OID is found. Effectively avoid meaningless request messages.
步骤S205:处理最大请求数,判断是否需要重置消息请求数并进行对应处理。Step S205: Processing the maximum number of requests, determining whether it is necessary to reset the number of message requests and performing corresponding processing.
具体存在如下场景:Specifically, the following scenarios exist:
场景一、本次请求是分割过的OID。继续使用分割后的请求数。Scene 1. This request is a split OID. Continue to use the number of split requests.
场景二、本次请求不是分割过的OID。恢复原始配置的请求数。Scenario 2, this request is not a split OID. The number of requests to restore the original configuration.
步骤S206:发送getBulk请求。Step S206: Send a getBulk request.
如果成功,有数据返回,则转入步骤S203,如果失败,则转入步骤S207。If it is successful, if there is data return, the process goes to step S203, and if it fails, the process goes to step S207.
S207,判断失败原因是否为消息越限异常,如果是消息越限异常,则转入步骤S208,然后转入步骤S203;否则,停止处理。S207. Determine whether the cause of the failure is a message overrun abnormality. If the message exceeds the limit abnormality, proceed to step S208, and then proceed to step S203; otherwise, stop the process.
S208,对消息按要求长度进行分割查询,直至返回全部数据。S208: Perform a split query on the message according to the required length until all data is returned.
如图4所示,本发明实施例还相应地提供了一种基于SNMP协议的数据查询系统,包括:As shown in FIG. 4, the embodiment of the present invention further provides a data query system based on the SNMP protocol, including:
管理端(Manager)41,配置为获取针对目标请求对象而配置的查询条件,以及基于SNMP协议向代理端发送getBulk命令;a manager 41 configured to acquire a query condition configured for the target request object, and send a getBulk command to the agent based on the SNMP protocol;
代理端(Agent)42,配置为依据所述查询条件在信息管理库43(MIB,Management Information Base)获取所述目标请求对象的实体数据。The agent 42 is configured to acquire the entity data of the target request object in the information management library 43 (MIB) according to the query condition.
本实施例中,所述查询条件的配置项包括下述配置项中的至少一个:In this embodiment, the configuration item of the query condition includes at least one of the following configuration items:
1、标定启始操作对象标识符OID的同步OID配置项,例如,在界面或配置文件中配置同步OID配置项,可以支持动态指定查询不同的OID,灵活多变;1. The synchronous OID configuration item of the start operation object identifier OID is calibrated. For example, the configuration of the synchronous OID configuration item in the interface or the configuration file can support the dynamic designation of querying different OIDs, which is flexible and changeable;
2、标定一次最多请求条数的最大请求数配置项,例如,在界面或配置文件中配置最大请求数配置项,可以支持动态指定最大请求参数,用户能够依据请求表实例数据长度进行调整,以至一次请求得到最多数据;2. The maximum number of requests for the maximum number of requests can be calibrated at a time. For example, configuring the maximum number of requests in the interface or configuration file can dynamically specify the maximum request parameters. The user can adjust the data length of the request table instance. Requesting the most data at a time;
3、标定一次请求超时时间的超时时间配置项,例如,在界面或配置文件中配置超时时间配置项,可以支持动态指定一次请求的超时时间,可据 实际的网络状况来灵活设置;3. Set the timeout time configuration item of the request timeout time. For example, configure the timeout time configuration item in the interface or configuration file to support the timeout period for dynamically specifying a request. The actual network conditions are flexibly set;
4、标定一次请求失败的重试次数的重试次数配置项,例如,在界面或配置文件中配置重试次数配置项,可以支持动态指定请求超时后,重新请求的尝试次数;4. The retries configuration item that calibrates the number of retries for which the request fails, for example, configuring the retries configuration item in the interface or the configuration file, and can support the number of attempts to re-request after dynamically requesting the request timeout;
5、以及,标定对超限消息的消息进行分割的条数直至消息能够正常返回的超限消息分割数配置项,例如,在界面或配置文件中配置超限消息分割数配置项,可以使得请求的OID内容实例数据可能是动态变化的,这导致消息长度的不确定性,而此项配置可将超长请求消息按指定要求进行拆分,在增加请求次数的情况下,保证了数据的完整。5, and, calibrate the number of the message that divides the message of the overrun message until the number of the message segmentation limit of the message that can be returned normally, for example, configuring the overrun message segmentation configuration item in the interface or the configuration file, so that the request can be made The OID content instance data may be dynamically changed, which leads to the uncertainty of the message length. This configuration can split the long request message according to the specified requirements, and ensure the completeness of the data when the number of requests is increased. .
优选实施方式中,所述查询条件的配置项还包括:In a preferred embodiment, the configuration item of the query condition further includes:
6、配置一个边界OID以标定在识别到该边界OID时提前结束后续数据处理的边界OID配置项,例如,在界面或配置文件中配置边界OID配置项,可以根据边界OID判断,丢弃后面不需要的数据,及时返回。例如:一个请求表OID组一共有35个属性,而需求采集的OID数据只存在于前24个OID中,最后一条有效OID就是结束OID:.1.3.6.1.4.1.3902.4101.1.3.1.24,边界OID就是:.1.3.6.1.4.1.3902.4101.1.3.1.25。当前取到第25个属性时结束查询。6. Configure a boundary OID to calibrate the boundary OID configuration item that ends the subsequent data processing when the boundary OID is recognized. For example, the boundary OID configuration item is configured in the interface or configuration file, and can be judged according to the boundary OID, and the discarding is not required. The data is returned in time. For example, a request table OID group has a total of 35 attributes, and the OID data collected by the demand only exists in the first 24 OIDs, and the last valid OID is the end OID: .1.3.6.1.4.1.3902.4101.1.3.1.24, boundary The OID is: .1.3.6.1.4.1.3902.4101.1.3.1.25. The query is ended when the 25th attribute is currently taken.
优选实施方式中,所述查询条件的配置项还包括:In a preferred embodiment, the configuration item of the query condition further includes:
6、配置一个边界OID以标定在识别到该边界OID时提前结束后续数据处理的边界OID配置项,例如,在界面或配置文件中配置边界OID配置项,可以根据边界OID判断,丢弃后面不需要的数据,及时返回。例如:一个请求表OID组一共有35个属性,而需求采集的OID数据只存在于前24个OID中,最后一条有效OID就是结束OID:.1.3.6.1.4.1.3902.4101.1.3.1.24,边界OID就是:.1.3.6.1.4.1.3902.4101.1.3.1.25。当前取到第25个属性时结束查询。 6. Configure a boundary OID to calibrate the boundary OID configuration item that ends the subsequent data processing when the boundary OID is recognized. For example, the boundary OID configuration item is configured in the interface or configuration file, and can be judged according to the boundary OID, and the discarding is not required. The data is returned in time. For example, a request table OID group has a total of 35 attributes, and the OID data collected by the demand only exists in the first 24 OIDs, and the last valid OID is the end OID: .1.3.6.1.4.1.3902.4101.1.3.1.24, boundary The OID is: .1.3.6.1.4.1.3902.4101.1.3.1.25. The query is ended when the 25th attribute is currently taken.
更为优选的实施方式中,所述查询条件的配置项还包括:In a further preferred embodiment, the configuration item of the query condition further includes:
7、标定一个有效OID集合列表的OID集合列表配置项,通过定义一个有效OID集合列表,使得在请求表数据时getBulk操作一定按序返回数据,从第1个属性到第n个属性,一次返回当前属性所有实例值,接着才返回下个属性数据。此情况下根据预先定义集合内容确认哪些是需要处理OID,哪些不必处理,减少冗余数据处理。7. The OID collection list configuration item of a valid OID collection list is defined. By defining a valid OID collection list, the getBulk operation must return the data in order when requesting the table data, from the first attribute to the nth attribute, and return once. All instance values of the current property, and then return to the next property data. In this case, it is confirmed according to the predefined set contents which need to process the OID and which do not have to be processed, thereby reducing redundant data processing.
优选地,所述代理端还配置为当识别出依据getBulk命令返回的数据不属于需要的OID集合列表时,依据至少一预设自增长OID处理机制执行OID自增长查找逻辑直至找到有效OID。具体实施时,当前一组数据中即有需要的OID数据,又包含不需要的OID数据,在判断遇到第一个不需要OID实例数据时即跳出后续处理流程,使用自增长处理机制,直到遇见下个有效OID(在未达到边界OID的情况)才进行后续处理,减少对不需要OID实例数据的遍历以及多余的请求开销。Preferably, the agent is further configured to perform OID self-growth lookup logic according to at least one preset self-growth OID processing mechanism until a valid OID is found, when it is recognized that the data returned according to the getBulk command does not belong to the required OID set list. In the specific implementation, the current set of data has the required OID data, and contains the unnecessary OID data. When it is judged that the first OID instance data is not needed, the subsequent processing flow is skipped, and the self-growth processing mechanism is used until Subsequent processing is performed after the next valid OID (when the boundary OID is not reached), reducing the traversal of unnecessary OID instance data and redundant request overhead.
此外,本发明实施例中,所述代理端在依据getBulk命令请求数据时,还提供超限消息OID缓存机制:在对超限消息分割的同时将OID进行缓存。通过缓存OID集合,判断下批数据是否为分割OID,如果是,继续使用分割请求数,否则,恢复原始请求数。以及所述代理端还提供请求数重置机制:探测性的自动重置请求数目前就是为每一次都尽量多的取得数据,尽量少发送请求,高效的完成任务。In addition, in the embodiment of the present invention, when the agent requests data according to the getBulk command, the agent also provides an overrun message OID cache mechanism: the OID is cached while the overrun message is split. By buffering the OID set, it is determined whether the next batch of data is a split OID, and if so, the number of split requests is continued, otherwise, the original request number is restored. And the agent also provides a request number reset mechanism: the number of probe automatic reset requests is to obtain data as much as possible for each time, to send requests as little as possible, and to complete tasks efficiently.
本发明实施例还记载一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,所述计算机可执行指令配置为执行图1、图2或图3任一附图所示的数据查询方法。The embodiment of the invention further describes a computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions are configured to execute the data shown in any one of FIG. 1, FIG. 2 or FIG. Query method.
在本发明所提供的几个实施例中,应该理解到,所揭露的设备和方法,可以通过其它的方式实现。以上所描述的设备实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外 的划分方式,如:多个单元或组件可以结合,或可以集成到另一个系统,或一些特征可以忽略,或不执行。另外,所显示或讨论的各组成部分相互之间的耦合、或直接耦合、或通信连接可以是通过一些接口,设备或单元的间接耦合或通信连接,可以是电性的、机械的或其它形式的。In the several embodiments provided by the present invention, it should be understood that the disclosed apparatus and method may be implemented in other manners. The device embodiments described above are merely illustrative. For example, the division of the unit is only a logical function division, and the actual implementation may have another The way of dividing, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored, or not executed. In addition, the coupling, or direct coupling, or communication connection of the components shown or discussed may be indirect coupling or communication connection through some interfaces, devices or units, and may be electrical, mechanical or other forms. of.
上述作为分离部件说明的单元可以是、或也可以不是物理上分开的,作为单元显示的部件可以是、或也可以不是物理单元,即可以位于一个地方,也可以分布到多个网络单元上;可以根据实际的需要选择其中的部分或全部单元来实现本实施例方案的目的。The units described above as separate components may or may not be physically separated, and the components displayed as the unit may or may not be physical units, that is, may be located in one place or distributed to multiple network units; Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
另外,在本发明各实施例中的各功能单元可以全部集成在一个处理单元中,也可以是各单元分别单独作为一个单元,也可以两个或两个以上单元集成在一个单元中;上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may be separately used as one unit, or two or more units may be integrated into one unit; The unit can be implemented in the form of hardware or in the form of hardware plus software functional units.
本领域普通技术人员可以理解:实现上述方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成,前述的程序可以存储于一计算机可读取存储介质中,该程序在执行时,执行包括上述方法实施例的步骤;而前述的存储介质包括:移动存储设备、随机存取存储器(RAM,Random Access Memory)、只读存储器(ROM,Read-Only Memory)、磁碟或者光盘等各种可以存储程序代码的介质。A person skilled in the art can understand that all or part of the steps of implementing the above method embodiments may be completed by using hardware related to the program instructions. The foregoing program may be stored in a computer readable storage medium, and the program is executed when executed. The foregoing storage medium includes: a mobile storage device, a random access memory (RAM), a read-only memory (ROM), a magnetic disk, or an optical disk. A medium that can store program code.
或者,本发明上述集成的单元如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明实施例的技术方案本质上或者说对相关技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机、服务器、或者网络设备等)执行本发明各个实施例所述方法的全部或部分。而前述的存储介质包括:移动存储设备、RAM、ROM、磁碟或者光 盘等各种可以存储程序代码的介质。Alternatively, the above-described integrated unit of the present invention may be stored in a computer readable storage medium if it is implemented in the form of a software function module and sold or used as a standalone product. Based on such understanding, the technical solution of the embodiments of the present invention may be embodied in the form of a software product in essence or in the form of a software product, which is stored in a storage medium and includes a plurality of instructions for making A computer device (which may be a personal computer, server, or network device, etc.) performs all or part of the methods described in various embodiments of the present invention. The foregoing storage medium includes: a mobile storage device, a RAM, a ROM, a disk, or a light. A medium such as a disk that can store program code.
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以所述权利要求的保护范围为准。 The above is only a specific embodiment of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily think of changes or substitutions within the technical scope of the present invention. It should be covered by the scope of the present invention. Therefore, the scope of the invention should be determined by the scope of the appended claims.

Claims (11)

  1. 一种数据查询方法,包括:A data query method, including:
    获取针对目标请求对象而配置的查询条件;Get the query conditions configured for the target request object;
    基于简单网络管理协议SNMP协议发送获取数据getBulk命令,依据所述查询条件获取所述目标请求对象的实体数据。The acquiring data getBulk command is sent according to the SNMP protocol of the Simple Network Management Protocol, and the entity data of the target request object is obtained according to the query condition.
  2. 如权利要求1所述的数据查询方法,其中,所述查询条件的配置项包括下述配置项中的至少一个:The data query method according to claim 1, wherein the configuration item of the query condition comprises at least one of the following configuration items:
    标定启始操作对象标识符OID的同步OID配置项;Aligning the synchronous OID configuration item of the start operation object identifier OID;
    标定一次最多请求条数的最大请求数配置项;The maximum number of requests configuration item that calibrates the maximum number of requests at a time;
    标定一次请求超时时间的超时时间配置项;Timeout time configuration item that calibrates a request timeout period;
    标定一次请求失败的重试次数的重试次数配置项;A retries configuration item that calibrates the number of retries for which a request failed;
    以及,标定超限消息分割数配置项,所述超限消息分割数配置项标识对超限消息进行分割的条数,直至支持所述超限消息正常返回。And calibrating the over-limit message splitting number configuration item, where the over-limit message splitting number configuration item identifies the number of the over-limit message segmentation until the over-limit message is supported to be returned normally.
  3. 如权利要求2所述的数据查询方法,其中,所述查询条件的配置项还包括:The data query method of claim 2, wherein the configuration item of the query condition further comprises:
    配置一个边界OID配置项,所述边界OID配置项用于标定在识别到指定边界OID时提前结束后续数据处理。A boundary OID configuration item is configured, and the boundary OID configuration item is used to calibrate the subsequent data processing before the identification of the specified boundary OID.
  4. 如权利要求2所述的基于SNMP协议的数据查询方法,其中,所述查询条件的配置项还包括:The SNMP-based data query method of claim 2, wherein the configuration item of the query condition further comprises:
    标定一个有效OID集合列表的OID集合列表配置项。An OID collection list configuration item that calibrates a list of valid OID collections.
  5. 如权利要求4所述的基于SNMP协议的数据查询方法,其中,还包括:The data query method based on the SNMP protocol of claim 4, further comprising:
    当依据getBulk命令返回的数据不属于目标OID集合列表时,依据至少一预设自增长OID处理机制执行OID自增长查找逻辑直至找到有效OID。 When the data returned according to the getBulk command does not belong to the target OID set list, the OID self-growth lookup logic is executed according to at least one preset self-growth OID processing mechanism until a valid OID is found.
  6. 一种数据查询系统,包括:A data query system comprising:
    管理端,配置为获取针对目标请求对象而配置的查询条件,以及基于简单网络管理协议SNMP协议向代理端发送获取数据getBulk命令;The management terminal is configured to acquire a query condition configured for the target request object, and send a getBulk command to the agent according to the Simple Network Management Protocol (SNMP) protocol;
    代理端,配置为依据所述查询条件获取所述目标请求对象的实体数据。The agent is configured to acquire entity data of the target request object according to the query condition.
  7. 如权利要求6所述的数据查询系统,其中,所述查询条件的配置项包括下述配置项中的至少一个:The data query system according to claim 6, wherein the configuration item of the query condition comprises at least one of the following configuration items:
    标定启始操作对象标识符OID的同步OID配置项;Aligning the synchronous OID configuration item of the start operation object identifier OID;
    标定一次最多请求条数的最大请求数配置项;The maximum number of requests configuration item that calibrates the maximum number of requests at a time;
    标定一次请求超时时间的超时时间配置项;Timeout time configuration item that calibrates a request timeout period;
    标定一次请求失败的重试次数的重试次数配置项;A retries configuration item that calibrates the number of retries for which a request failed;
    以及,标定超限消息分割数配置项,所述超限消息分割数配置项标识对超限消息的消息进行分割的条数,直至支持所述超限消息正常返回。And, the overrun message splitting number configuration item is configured, and the overrun message splitting number configuration item identifies the number of the message that divides the overrun message, until the overrun message is supported to be returned normally.
  8. 如权利要求7所述的数据查询系统,其中,所述查询条件的配置项还包括:The data query system of claim 7, wherein the configuration item of the query condition further comprises:
    配置一个边界OID配置项,所述边界OID配置项用于标定在识别到目标边界OID时提前结束后续数据处理。A boundary OID configuration item is configured, and the boundary OID configuration item is used to calibrate the subsequent data processing before the target boundary OID is identified.
  9. 如权利要求7所述的数据查询系统,其中,所述查询条件的配置项还包括:The data query system of claim 7, wherein the configuration item of the query condition further comprises:
    标定一个有效OID集合列表的OID集合列表配置项。An OID collection list configuration item that calibrates a list of valid OID collections.
  10. 如权利要求9所述的数据查询系统,其中,所述代理端还配置为当识别出依据getBulk命令返回的数据不属于目标OID集合列表时,依据至少一预设自增长OID处理机制执行OID自增长查找逻辑直至找到有效OID。The data query system according to claim 9, wherein the agent is further configured to perform OID self according to at least one preset self-growth OID processing mechanism when it is recognized that the data returned according to the getBulk command does not belong to the target OID set list. Increase the lookup logic until a valid OID is found.
  11. 一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,所述计算机可执行指令配置为权利要求1至5任一项所述的数据 查询方法。 A computer storage medium having computer executable instructions stored therein, the computer executable instructions being configured as the data of any one of claims 1 to 5. Query method.
PCT/CN2014/088926 2014-09-25 2014-10-20 Data query method, system and computer storage medium WO2015131523A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410499529.2 2014-09-25
CN201410499529.2A CN105512134A (en) 2014-09-25 2014-09-25 Method and system for querying data based on SNMP protocol

Publications (1)

Publication Number Publication Date
WO2015131523A1 true WO2015131523A1 (en) 2015-09-11

Family

ID=54054423

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/088926 WO2015131523A1 (en) 2014-09-25 2014-10-20 Data query method, system and computer storage medium

Country Status (2)

Country Link
CN (1) CN105512134A (en)
WO (1) WO2015131523A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111814045A (en) * 2020-06-30 2020-10-23 平安科技(深圳)有限公司 Data query method and device, electronic equipment and storage medium
CN111813461A (en) * 2020-07-06 2020-10-23 斑马网络技术有限公司 Vehicle ECU calibration method, device and equipment
CN112788537A (en) * 2019-11-07 2021-05-11 维沃移动通信有限公司 Location query method, core network function and location service requester

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108616385B (en) * 2018-03-29 2021-03-16 烽火通信科技股份有限公司 Query method of Simple Network Management Protocol (SNMP) agent, traversal method and system of Management Information Base (MIB) tree
CN112769923A (en) * 2020-12-31 2021-05-07 成都科来网络技术有限公司 Method, device and storage medium for monitoring network equipment performance index in big data scene

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008071197A (en) * 2006-09-14 2008-03-27 Ricoh Co Ltd Device information acquisition method for acquiring information from device by snmp message, and information processor
CN101192994A (en) * 2007-07-25 2008-06-04 中兴通讯股份有限公司 A method for conditionally getting data in SNNP
CN102780579A (en) * 2012-06-18 2012-11-14 华为技术有限公司 Method and device for inquiring bulk data based on simple network management protocol (SNMP)
CN103001807A (en) * 2012-12-20 2013-03-27 北京思特奇信息技术股份有限公司 Request response module corresponding to simple network management protocol (SNMP)

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1704931A (en) * 2004-05-27 2005-12-07 华为技术有限公司 Method and apparatus for providing information inquiry by the network administration system
CN100420206C (en) * 2006-04-05 2008-09-17 华为技术有限公司 SNMP communication system and method
CN101247272B (en) * 2008-03-24 2011-05-11 中兴通讯股份有限公司 Network management method and apparatus

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008071197A (en) * 2006-09-14 2008-03-27 Ricoh Co Ltd Device information acquisition method for acquiring information from device by snmp message, and information processor
CN101192994A (en) * 2007-07-25 2008-06-04 中兴通讯股份有限公司 A method for conditionally getting data in SNNP
CN102780579A (en) * 2012-06-18 2012-11-14 华为技术有限公司 Method and device for inquiring bulk data based on simple network management protocol (SNMP)
CN103001807A (en) * 2012-12-20 2013-03-27 北京思特奇信息技术股份有限公司 Request response module corresponding to simple network management protocol (SNMP)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112788537A (en) * 2019-11-07 2021-05-11 维沃移动通信有限公司 Location query method, core network function and location service requester
CN111814045A (en) * 2020-06-30 2020-10-23 平安科技(深圳)有限公司 Data query method and device, electronic equipment and storage medium
CN111813461A (en) * 2020-07-06 2020-10-23 斑马网络技术有限公司 Vehicle ECU calibration method, device and equipment

Also Published As

Publication number Publication date
CN105512134A (en) 2016-04-20

Similar Documents

Publication Publication Date Title
WO2015131523A1 (en) Data query method, system and computer storage medium
US11575592B2 (en) Message processing method and apparatus, control-plane device, and computer storage medium
US20150304212A1 (en) Method and apparatus for matching flow table, and switch
US20180314433A1 (en) Method, system, and related device for nas data access
JP7056893B2 (en) Application programming interface Methods, devices, API gateways, and programs for transmitting API requests.
US20220014434A1 (en) Slice Resource Deployment Method and Apparatus, and Slice Manager and Computer Storage Medium
CN105740418A (en) File monitoring and message pushing based real-time synchronization system
CN107710196B (en) Method and system for managing resource object
US20150350154A1 (en) Using Distributed Network Elements to Send Authoritative DNS Responses
JP2006146927A (en) Network management apparatus and method based on snmp
US20160080529A1 (en) Method and device for sending requests
US20140046968A1 (en) Data acquisition method, device and system
WO2017097210A1 (en) Method, apparatus and system for upgrading software
WO2021120633A1 (en) Load balancing method and related device
US8799437B1 (en) Dynamic optimization of device management command for bulk retrieval of configuration data
CN113835825B (en) Dynamic adjustment method and device of virtual service host, server and storage medium
WO2019192318A1 (en) Traffic smoothing method, server, and forwarding device
US20230161541A1 (en) Screen projection method and system
WO2015106623A1 (en) Method and apparatus for configuring and delivering flow table entry
JP2017500679A (en) Media resource feedback method, apparatus, program, and recording medium
WO2016197727A1 (en) Data transmission method and device
WO2013104181A1 (en) Resource management method and device
WO2016110070A1 (en) Data acquiring method and device, and storage medium
US9847927B2 (en) Information processing device, method, and medium
WO2015100628A1 (en) Network element data access method and apparatus, and network management system

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

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

Country of ref document: EP

Kind code of ref document: A1