WO2017215445A1 - 设备信息获取方法及装置 - Google Patents

设备信息获取方法及装置 Download PDF

Info

Publication number
WO2017215445A1
WO2017215445A1 PCT/CN2017/086692 CN2017086692W WO2017215445A1 WO 2017215445 A1 WO2017215445 A1 WO 2017215445A1 CN 2017086692 W CN2017086692 W CN 2017086692W WO 2017215445 A1 WO2017215445 A1 WO 2017215445A1
Authority
WO
WIPO (PCT)
Prior art keywords
information
configuration
device information
meta
mode field
Prior art date
Application number
PCT/CN2017/086692
Other languages
English (en)
French (fr)
Inventor
陈彬
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2017215445A1 publication Critical patent/WO2017215445A1/zh

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/04Network management architectures or arrangements

Definitions

  • the present disclosure relates to the field of communications, and in particular, to a device information acquisition method and apparatus.
  • the network device With the development of mobile technology and network technology, the network is evolving faster and faster. In the process of evolution, network device functions become more and more complex, and the classification becomes more and more detailed.
  • the network device can be divided into a main control card, a switch card, a line card, a service processing card, an interface card, a port, Backplanes, etc., each device form is subdivided into several dozens of hardware implementations due to different services, performance, and functions. How to manage and maintain these devices, network operators have put forward a lot of new requirements, not only require network device management software to personalize each device, but also require network device management software to be forward-looking, without upgrading New devices can be supported with simple processing.
  • Most of the existing network device management softwares are device management software provided by the device manufacturers themselves.
  • the device manufacturers develop proprietary data acquisition, processing, and display functions according to their own device interfaces. Due to the diversity of device forms and the lack of scalability of network device management software, the released network device management software cannot support new devices or new features. When new devices or new features are added, network device management has to be redeveloped. Software, which leads to repeated human input, affecting the speed of product launch and user experience.
  • the problem of low versatility caused by the device information corresponding to the device can only be obtained according to the device-specific interface, and an effective solution has not been proposed.
  • An embodiment of the present disclosure provides a method and an apparatus for acquiring device information, so as to at least solve the problem of low versatility caused by acquiring device information corresponding to the device according to the device-specific interface.
  • a device information obtaining method including: searching for meta information corresponding to a device, wherein the meta information is used to describe the device; and acquiring according to configuration information in the meta information.
  • First device information for describing initial information of the device processing the first device information to obtain second device information of the device.
  • the configuration information includes: a basic data configuration and an information item configuration, where the basic data configuration includes: a data description field for describing the function of the meta information, a device information acquisition manner field, and a device information processing manner.
  • the information item configuration includes: an information name of the device, and a first device information combination mode field.
  • acquiring the first device information for describing the device initial information according to the configuration information in the meta information includes: generating the executable code segment by using the configuration information; and running the executable code segment to Obtaining the first device information on the device.
  • generating the executable code segment by using the configuration information includes: parsing the configuration information to extract one or more fields included in the configuration information; and using device information included in the configuration information The mode field is obtained, and the executable code segment is generated.
  • processing the first device information, and obtaining the second device information of the device includes: processing, according to the device information processing mode field included in the configuration information, processing, by the first device information;
  • the first device information combination mode field included in the configuration information is combined with the processed first device information to obtain the second device information.
  • the method further includes: storing and displaying the first device information and/or the second device information.
  • a device information obtaining apparatus including: a searching module, configured to search for meta information corresponding to a device, where the meta information is used to describe the device; Obtaining first device information for describing the device initial information according to the configuration information in the meta information; the first processing module is configured to process the first device information to obtain second device information of the device.
  • the configuration information includes: a basic data configuration and an information item configuration, where the basic data configuration includes: a data description field for describing the function of the meta information, a device information acquisition manner field, and a device information processing manner.
  • the information item configuration includes: an information name of the device, and a first device information combination mode field.
  • the obtaining module includes: a generating unit, configured to generate the executable code segment by using the configuration information, and an acquiring unit, configured to run the executable code segment to obtain the first piece from the device Device Information.
  • the generating unit includes: a parsing subunit, configured to parse the configuration information to extract one or more fields included in the configuration information; and generate a subunit, configured to use the configuration information
  • the device information acquisition mode field included in the method generates the executable code segment.
  • the first processing module includes: a processing unit, configured to process the first device information according to a device information processing mode field included in the configuration information; and a combination unit, configured to perform The first device information combination mode field included in the configuration information is combined with the processed first device information to obtain the second device information.
  • the device further includes: a second processing module, configured to store and display the first device information and/or the second device information.
  • a second processing module configured to store and display the first device information and/or the second device information.
  • a storage medium is also provided.
  • the storage medium is arranged to store program code for performing the following steps:
  • the meta information corresponding to the device is searched, wherein the meta information is used to describe the device; the first device information used to describe the initial information of the device is obtained according to the configuration information in the meta information; and the first device is processed.
  • the information obtains the second device information of the device, and solves the problem that the versatility caused by the device-only interface acquiring the device information corresponding to the device is low, and the versatility is improved.
  • FIG. 1 is a flowchart of a device information acquisition method according to an embodiment of the present disclosure
  • FIG. 2 is a schematic diagram of a module corresponding to a device information acquiring method according to an embodiment of the present disclosure
  • FIG. 3 is a structural block diagram of a device information acquiring apparatus according to an embodiment of the present disclosure
  • FIG. 4 is a structural block diagram (1) of a device information acquiring apparatus according to an embodiment of the present disclosure
  • FIG. 5 is a structural block diagram (2) of a device information acquiring apparatus according to an embodiment of the present disclosure
  • FIG. 6 is a structural block diagram (3) of a device information acquiring apparatus according to an embodiment of the present disclosure.
  • FIG. 7 is a structural block diagram (4) of a device information acquiring apparatus according to an embodiment of the present disclosure.
  • FIG. 1 is a flowchart of a device information acquisition method according to an embodiment of the present disclosure. As shown in FIG. 1 , the process includes the following steps:
  • Step S102 searching for meta information corresponding to the device, where the meta information is used to describe the device;
  • Step S104 Acquire first device information for describing initial information of the device according to the configuration information in the meta information.
  • Step S106 processing the first device information to obtain second device information of the device.
  • the application scenario of the device information acquiring method includes, but is not limited to, the network device management software performs personalized management on each device.
  • the meta-information corresponding to the device is searched, where the meta-information is used to describe the device; and the first device information used to describe the initial information of the device is obtained according to the configuration information in the meta-information;
  • a device information obtains second device information of the device. That is to say, in this embodiment, the first device information describing the initial information of the device is obtained by using the corresponding meta information of each device in the configuration file, and then the second device information is further processed to obtain the second device information for the user to process.
  • the problem that the versatility caused by the device information corresponding to the device can be obtained according to the device-specific interface is low, and the versatility is improved.
  • a general meta-information description device information processing method is mainly implemented.
  • the information describing the device information is meta information, and the meta information includes a description of the information acquisition, processing, and combination methods, and the purpose of describing the device information is achieved by combining the meta information.
  • the acquisition method in the meta information is converted into a general device language, and the acquisition device information is executed by the interpreter, and then the data processing and combination are performed according to the processing and combination methods in the meta information, and finally the processed data is displayed. For the user to handle.
  • device information processing method in this example compared with the prior art, device information is abstracted and decomposed, and the network device management software no longer cares about specific device and device information, but cares for more stable information: description of device information. , processing and combination, ie, meta information.
  • the software interprets, executes, processes, and groups this meta-information description method. In order to obtain specific equipment information, improve the maintainability of the software, reduce the repetitive investment of manpower, and improve the speed of product launch and the user experience.
  • the configuration information involved in the step S104 includes: a basic data configuration and an information item configuration, where the basic data configuration includes: a data description field for describing the function of the meta information, and a device information acquisition manner.
  • step S104 includes the following steps:
  • Step S11 generating configuration code segments by using the configuration information
  • Step S12 running the executable code segment to obtain the first device information from the device.
  • the configuration information is generated into an executable code segment, and the executable code segment is executed to obtain the first device information from the device, so that different device information can be acquired, thereby further avoiding related technologies.
  • the device-specific interface and the proprietary device information acquisition method must be used to obtain the problem that the device information acquisition method caused by the device information is low in generality.
  • step S11 includes the following steps:
  • Step S21 parsing the configuration information to extract one or more fields included in the configuration information
  • Step S22 Generate the executable code segment by using a device information acquisition mode field included in the configuration information.
  • the one or more fields include, but are not limited to, a data description field, a device information acquisition mode field, and a device information processing mode field, which are used to describe the function of the meta information, and an information name of the device, and the first Device information combination mode field.
  • the executable code segment can be generated according to the device information acquisition mode field included in the configuration information, and the first device information can be acquired.
  • step S106 includes the following steps:
  • Step S31 processing the first device information according to the device information processing mode field included in the configuration information
  • Step S32 Combine the processed first device information according to the first device information combination mode field included in the configuration information to obtain the second device information.
  • processing of processing the first device information includes, but is not limited to, processing, such as extracting, deduplicating, and sorting the first device information.
  • the manner of combining the processed first device information includes, but is not limited to, a multi-attribute combination, a logical AND, a logical OR, a logical exclusive OR, and the like.
  • the first device information is processed according to the device information processing manner included in the configuration information, and the processed first device information is combined to obtain the second device information, which further solves the problem.
  • the problem of low versatility caused by obtaining the device information according to each device-specific interface can be achieved, and the effect of improving versatility is achieved.
  • the foregoing device information acquiring method further includes the following steps:
  • Step S41 storing and displaying the first device information and/or the second device information.
  • the device information obtaining method provided in this example mainly includes the following modules when implemented:
  • the meta information configuration module 201 The meta information configuration module 201, the meta information reading module 202, the meta information interpretation module 203, the interpreter module 204, the information processing module 205, the information combination module 206, the device information storage module 207, and the processing module 208.
  • the device information obtaining method of this example includes the following steps:
  • the meta information reading module 202 reads the configuration data in the meta information configuration module 201; the configuration data is divided into two types: basic data configuration and information item configuration.
  • the basic data configuration includes fields such as a data description, an information acquisition method, and an information processing method; the information item configuration includes fields such as an information name and a basic data combination manner description.
  • Step S52 the meta information interpretation module 203 interprets the configuration data as an executable code segment
  • Step S53 the interpreter module 204 executes the executable code segment to obtain the original data from the device;
  • Step S54 the information processing module 205 performs processing such as extraction, de-duplication, and the like on the original data according to the configuration of the configuration data to obtain basic data;
  • Step S55 the information combination module 206 combines the basic data according to the configuration of the configuration data to obtain device information.
  • Step S56 the device information storage module 207 stores the obtained device information
  • step S57 the processing module 208 reads the stored device information and displays the processing.
  • Meta-information configuration modules are available in a variety of ways, such as INI configuration files, XML, database tables, and more.
  • the configuration file construction mode is taken as an example, wherein static_tunnel_filter and tunnel_filter are basic data configurations, and functions_filter is information item configuration.
  • the desc in the basic data configuration is the data description, the cmd is the information acquisition method, the pattern and the item are the information processing methods; the tunnel in the information item configuration is the information name, and the static_tunnel_filter+tunnel_filter is the basic data combination method.
  • An example of this meta information configuration module is:
  • Pattern tunnel_( ⁇ d+) ⁇ s+ ⁇ d+. ⁇ d+. ⁇ d+. ⁇ d+ ⁇ s+-
  • Tunnel static_tunnel_filter+tunnel_filter
  • the meta information reading module reads the configuration file, and the meta information interpretation module extracts the information and the fields of obtaining, processing, and combining.
  • the meta-information module uses the information to obtain field information to generate code that can interact with the device through the interpreter.
  • Segments the specific code segment form depends on the interpreter, can use a general interpreter, such as Python; or a custom interpreter, such as a class C syntax interpreter. Taking the class C syntax interpreter as an example, the generated code segment format is as follows:
  • the interpreter module collects the original data by interpreting and executing the code segment, and the information processing module extracts, deduplicates, sorts and the like according to the processing field information to obtain the basic data.
  • the description method of the extraction rule can be a general regular expression or a custom implementation.
  • the information combination module combines the basic data according to the combined field information to obtain device information.
  • Combination methods include multiple attribute combinations, logical AND, logical OR, logical XOR, and so on.
  • the storage module performs storage, and finally the processing module reads the stored device information for display processing.
  • a device information obtaining device is further provided, which is used to implement the above-mentioned embodiments and preferred embodiments, and has not been described again.
  • the term “module” may implement a combination of software and/or hardware of a predetermined function.
  • 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.
  • FIG. 3 is a structural block diagram of a device information acquiring apparatus according to an embodiment of the present disclosure. As shown in FIG. 3, the apparatus includes:
  • the search module 32 is configured to search for meta information corresponding to the device, where the meta information is used to describe the device;
  • the obtaining module 34 is configured to obtain first device information for describing initial information of the device according to the configuration information in the meta information;
  • the first processing module 36 is configured to process the first device information to obtain second device information of the device.
  • the application scenario of the device information acquiring device includes, but is not limited to, the network device management software performs personalized management on each device.
  • the meta-information corresponding to the device is searched, where the meta-information is used to describe the device; and the first device information used to describe the initial information of the device is obtained according to the configuration information in the meta-information;
  • a device information obtains second device information of the device. That is to say, in this embodiment, the first device information describing the initial information of the device is obtained by using the corresponding meta information of each device in the configuration file, and then the second device information is further processed to obtain the second device information for the user to process.
  • the problem of low versatility caused by acquiring the device information according to the proprietary interface of each device in the related art is solved, and the versatility is improved. effect.
  • the foregoing configuration information includes: a basic data configuration and an information item configuration, where the basic data configuration includes: a data description field for describing the function of the meta information, a device information acquisition manner field, and device information.
  • the processing mode field; the information item configuration includes: a device name of the device, and a first device information combination mode field.
  • FIG. 4 is a structural block diagram (1) of a device information acquiring apparatus according to an embodiment of the present disclosure.
  • the obtaining module 34 includes:
  • a generating unit 42 configured to generate the executable code segment by the configuration information
  • the obtaining unit 46 is configured to run the executable code segment to obtain the first device information from the device.
  • the device shown in FIG. 4 generates configuration code segments, and executes the executable code segments to obtain first device information from the device, and can acquire different device information, thereby further avoiding related technologies.
  • the device-specific interface and the proprietary device information acquisition method must be used to obtain the problem that the device information acquisition method caused by the device information is low in generality.
  • FIG. 5 is a structural block diagram (2) of a device information acquiring apparatus according to an embodiment of the present disclosure.
  • the generating unit 42 includes:
  • parsing subunit 52 configured to parse the configuration information to extract one or more fields included in the configuration information
  • the generating subunit 54 is configured to generate the executable code segment using the device information obtaining mode field included in the configuration information.
  • the one or more fields include, but are not limited to, a data description field, a device information acquisition mode field, and a device information processing mode field, which are used to describe the function of the meta information, and an information name of the device, and the first Device information combination mode field.
  • the apparatus shown in FIG. 5 is configured to generate an executable code segment according to the device information acquisition mode field included in the configuration information, and further obtain the first device information.
  • FIG. 6 is a structural block diagram (3) of a device information acquiring apparatus according to an embodiment of the present disclosure.
  • the first processing module 36 includes:
  • the processing unit 62 is configured to process the first device information according to the device information processing mode field included in the configuration information;
  • the combining unit 64 is configured to combine the processed first device information according to the first device information combination mode field included in the configuration information to obtain the second device information.
  • processing of processing the first device information includes, but is not limited to, processing, such as extracting, deduplicating, and sorting the first device information.
  • the manner of combining the processed first device information includes, but is not limited to, a multi-attribute combination, a logical AND, a logical OR, a logical exclusive OR, and the like.
  • the first device information is processed according to the device information processing manner included in the configuration information, and the processed first device information is combined to obtain the second device information, thereby further solving
  • the problem of low versatility caused by obtaining the device information according to each device-specific interface is achieved. Highly versatile effect.
  • FIG. 7 is a structural block diagram (4) of a device information acquiring apparatus according to an embodiment of the present disclosure. As shown in FIG. 7, the apparatus includes: in addition to all the modules shown in FIG.
  • the second processing module 72 is configured to store and display the first device information and/or the second device information.
  • each of the above modules may be implemented by software or hardware.
  • the foregoing may be implemented by, but not limited to, the foregoing modules are all located in the same processor; or, the above modules are in any combination.
  • the forms are located in different processors.
  • Embodiments of the present disclosure also provide a storage medium.
  • the foregoing storage medium may be configured to store program code for performing the following steps:
  • S3. Process the first device information to obtain second device information of the device.
  • the foregoing storage medium may include, but not limited to, a USB flash drive, a Read-Only Memory (ROM), a Random Access Memory (RAM), a mobile hard disk, and a magnetic memory.
  • ROM Read-Only Memory
  • RAM Random Access Memory
  • a mobile hard disk e.g., a hard disk
  • magnetic memory e.g., a hard disk
  • the processor performs the above steps S1, S2, S3 according to the stored program code in the storage medium.
  • modules or steps of the present disclosure 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. As such, the disclosure is not limited to any specific combination of hardware and software.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Stored Programmes (AREA)
  • General Factory Administration (AREA)

Abstract

本公开提供了一种设备信息获取方法及装置。其中,该方法包括:查找与设备对应的元信息,其中,该元信息用于描述该设备;根据该元信息中的配置信息获取用于描述该设备初始信息的第一设备信息;处理该第一设备信息,得到该设备的第二设备信息。通过本公开,解决了相关技术中只能根据设备专有接口获取该设备对应的设备信息所导致的通用性较低的问题,达到提高通用性的效果。 (图1)

Description

设备信息获取方法及装置 技术领域
本公开涉及通信领域,具体而言,涉及一种设备信息获取方法及装置。
背景技术
随着移动技术和网络技术的发展,网络演进的速度越来越快。在演进过程中,网络设备功能越来越复杂,分类越来越细,例如根据路由器设备的形态,网络设备可分为主控卡、交换卡、线卡、业务处理卡、接口卡、端口、背板等,每一个设备形态因为业务、性能、功能的不同,又细分出几种到数十种硬件实现。如何管理、维护好这些设备,网络运营商提出了很多新需求,不仅要求网络设备管理软件能对每个设备进行个性化管理,而且还要求网络设备管理软件有前瞻性,在不升级的情况下,通过简单处理就能支持新设备。
现有的网络设备管理软件,大多数都是设备厂商自己提供设备管理软件,设备厂商根据自己的设备接口,开发专有的数据采集、处理、显示功能。由于设备形态的多样性和网络设备管理软件可扩展性的不足,造成已发布的网络设备管理软件不能支持新设备或新特性,当新设备或新特性加入时,就不得不重新开发网络设备管理软件,从而带来人力的重复投入,影响产品的推出速度和用户的使用体验。
针对相关技术中,只能根据设备专有接口获取该设备对应的设备信息所导致的通用性较低的问题,尚未提出有效的解决方案。
发明内容
本公开的实施例提供了一种设备信息获取方法及装置,以至少解决相关技术中只能根据设备专有接口获取该设备对应的设备信息所导致的通用性较低的问题。
根据本公开的一个实施例,提供了一种设备信息获取方法,包括:查找与设备对应的元信息,其中,所述元信息用于描述所述设备;根据所述元信息中的配置信息获取用于描述所述设备初始信息的第一设备信息;处理所述第一设备信息,得到所述设备的第二设备信息。
可选地,所述配置信息包括:基础数据配置和信息项配置,其中,所述基础数据配置包括:用于描述所述元信息作用的数据描述字段、设备信息获取方式字段、设备信息加工方式字段;所述信息项配置包括:设备的信息名称、所述第一设备信息组合方式字段。
可选地,根据所述元信息中的配置信息获取用于描述所述设备初始信息的第一设备信息包括:将所述配置信息生成可执行代码段;运行所述可执行代码段,以从所述设备上获取所述第一设备信息。
可选地,将所述配置信息生成可执行代码段包括:解析所述配置信息,以提取出所述配置信息中所包括的一个或多个字段;使用所述配置信息中所包括的设备信息获取方式字段,生成所述可执行代码段。
可选地,处理所述第一设备信息,得到所述设备的第二设备信息包括:根据所述配置信息中所包括的设备信息加工方式字段,对所述第一设备信息进行加工处理;根据所述配置信息中所包括的第一设备信息组合方式字段,组合经过加工处理后的第一设备信息,以得到所述第二设备信息。
可选地,所述方法还包括:存储并显示所述第一设备信息和/或所述第二设备信息。
根据本公开的另一个实施例,提供了一种设备信息获取装置,包括:查找模块,用于查找与设备对应的元信息,其中,所述元信息用于描述所述设备;获取模块,用于根据所述元信息中的配置信息获取用于描述所述设备初始信息的第一设备信息;第一处理模块,用于处理所述第一设备信息,得到所述设备的第二设备信息。
可选地,所述配置信息包括:基础数据配置和信息项配置,其中,所述基础数据配置包括:用于描述所述元信息作用的数据描述字段、设备信息获取方式字段、设备信息加工方式字段;所述信息项配置包括:设备的信息名称、所述第一设备信息组合方式字段。
可选地,所述获取模块包括:生成单元,用于将所述配置信息生成可执行代码段;获取单元,用于运行所述可执行代码段,以从所述设备上获取所述第一设备信息。
可选地,所述生成单元包括:解析子单元,用于解析所述配置信息,以提取出所述配置信息中所包括的一个或多个字段;生成子单元,用于使用所述配置信息中所包括的设备信息获取方式字段,生成所述可执行代码段。
可选地,所述第一处理模块包括:加工单元,用于根据所述配置信息中所包括的设备信息加工方式字段,对所述第一设备信息进行加工处理;组合单元,用于根据所述配置信息中所包括的第一设备信息组合方式字段,组合经过加工处理后的第一设备信息,以得到所述第二设备信息。
可选地,所述装置还包括:第二处理模块,用于存储并显示所述第一设备信息和/或所述第二设备信息。
根据本公开的又一个实施例,还提供了一种存储介质。该存储介质设置为存储用于执行以下步骤的程序代码:
查找与设备对应的元信息,其中,所述元信息用于描述所述设备;根据所述元信息中的配置信息获取用于描述所述设备初始信息的第一设备信息;处理所述第一设备信息,得到所述设备的第二设备信息。
通过本公开,查找与设备对应的元信息,其中,该元信息用于描述该设备;根据该元信息中的配置信息获取用于描述该设备初始信息的第一设备信息;处理该第一设备信息,得到该设备的第二设备信息,解决了相关技术中只能根据设备专有接口获取该设备对应的设备信息所导致的通用性较低的问题,达到提高通用性的效果。
附图说明
此处所说明的附图用来提供对本公开的进一步理解,构成本申请的一部分,本公开的示意性实施例及其说明用于解释本公开,并不构成对本公开的不当限定。在附图中:
图1是根据本公开实施例的设备信息获取方法流程图;
图2是根据本公开实施例的设备信息获取方法对应的模块示意图;
图3是根据本公开实施例的设备信息获取装置的结构框图;
图4是根据本公开实施例的设备信息获取装置的结构框图(一);
图5是根据本公开实施例的设备信息获取装置的结构框图(二);
图6是根据本公开实施例的设备信息获取装置的结构框图(三);
图7是根据本公开实施例的设备信息获取装置的结构框图(四)。
具体实施方式
下文中将参考附图并结合实施例来详细说明本公开。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。
需要说明的是,本公开的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。
实施例1
在本实施例中提供了一种设备信息获取方法,图1是根据本公开实施例的设备信息获取方法流程图,如图1所示,该流程包括如下步骤:
步骤S102,查找与设备对应的元信息,其中,该元信息用于描述该设备;
步骤S104,根据该元信息中的配置信息获取用于描述该设备初始信息的第一设备信息;
步骤S106,处理该第一设备信息,得到该设备的第二设备信息。
可选地,在本实施例中,上述设备信息获取方法的应用场景包括但并不限于:网络设备管理软件对每个设备进行个性化管理。在该应用场景下,查找与设备对应的元信息,其中,该元信息用于描述该设备;根据该元信息中的配置信息获取用于描述该设备初始信息的第一设备信息;处理该第一设备信息,得到该设备的第二设备信息。也就是说,本实施例通过设置在配置文件中的每一设备对应元信息,获取描述设备初始信息的第一设备信息,然后进一步处理第一设备信息得到第二设备信息,以供用户处理。通过本实施例,解决了相关技术中只能根据设备专有接口获取该设备对应的设备信息所导致的通用性较低的问题,达到提高通用性的效果。
下面结合具体示例,对本实施例进行举例说明。
本示例中主要实现了一种通用的元信息描述设备信息处理方法。其中,描述设备信息的信息为元信息,元信息中包含信息获取、加工、组合方法的描述,通过组合元信息来达到描述设备信息的目的。元信息中的获取方法被转换为一种通用设备语言,通过解释器下发执行采集设备信息,然后按元信息中的加工、组合方法进行数据加工、组合,最终将加工好的数据进行显示以供用户处理。
采用本示例中的设备信息处理方法,与现有技术相比,对设备信息进行抽象和分解,网络设备管理软件不再关心具体设备和设备信息,而是关心更加稳定的信息:设备信息的描述、加工和组合方式,即,元信息。软件通过对这种元信息描述方法进行解释、执行、加工、组 合,从而获得具体的设备信息,提高软件的可维护性,减少人力的重复投入,提高产品的推出速度和用户的使用体验。
在一个可选地实施方式中,步骤S104中涉及到配置信息包括:基础数据配置和信息项配置,其中,该基础数据配置包括:用于描述该元信息作用的数据描述字段、设备信息获取方式字段、设备信息加工方式字段;该信息项配置包括:设备的信息名称、该第一设备信息组合方式字段。
可选地,上述步骤S104包括以下步骤:
步骤S11,将该配置信息生成可执行代码段;
步骤S12,运行该可执行代码段,以从该设备上获取该第一设备信息。
通过上述步骤S11至步骤S12,将配置信息生成可执行代码段,运行该可执行代码段,以从该设备上获取第一设备信息,能够获取不同的设备信息,从而进一步避免了相关技术中,针对每一设备必须使用该设备专有的接口以及专有的设备信息获取方式去获取设备信息造成的设备信息获取方式通用性较低的问题。
在一个可选地实施方式中,上述步骤S11包括以下步骤:
步骤S21,解析该配置信息,以提取出该配置信息中所包括的一个或多个字段;
步骤S22,使用该配置信息中所包括的设备信息获取方式字段,生成该可执行代码段。
需要说明的是,上述一个或多个字段包括但并不限于:用于描述该元信息作用的数据描述字段、设备信息获取方式字段、设备信息加工方式字段;以及设备的信息名称、该第一设备信息组合方式字段。
通过上述步骤S21至步骤S22,使得可以根据配置信息中所包括的设备信息获取方式字段,生成可执行代码段,进而可以获取上述第一设备信息。
可选地,上述步骤S106包括以下步骤:
步骤S31,根据该配置信息中所包括的设备信息加工方式字段,对该第一设备信息进行加工处理;
步骤S32,根据该配置信息中所包括的第一设备信息组合方式字段,组合经过加工处理后的第一设备信息,以得到该第二设备信息。
需要说明的是,对第一设备信息进行加工处理的方式包括但并不限于:对第一设备信息进行提取、去重、排序等加工处理。
另外,组合经过加工处理后的第一设备信息的方式包括但并不限于:多属性组合,逻辑与,逻辑或,逻辑异或等。
通过上述步骤S31至步骤S32,按照配置信息中所包括的设备信息加工方式对第一设备信息进行加工处理,并对加工出后的第一设备信息进行组合,得到第二设备信息,进一步解决了相关技术中只能根据每一设备专有接口获取该设备信息所导致的通用性较低的问题,达到提高通用性的效果。
在一个可选地实施方式中,上述设备信息获取方法还包括以下步骤:
步骤S41,存储并显示该第一设备信息和/或该第二设备信息。
下面结合具体示例,对本实施例进行举例说明。
如图2所示,本示例提供的设备信息获取方法在实现时主要包括以下模块:
元信息配置模块201,元信息读取模块202,元信息解释模块203,解释器模块204,信息加工模块205,信息组合模块206,设备信息存储模块207和处理模块208。
其中结合上述模块,本示例的设备信息获取方法包括以下步骤:
步骤S51,元信息读取模块202读取元信息配置模块201中的配置数据;配置数据分2种类型:基础数据配置和信息项配置。基础数据配置包含数据描述、信息获取方法,信息加工方法等字段;信息项配置包含信息名称、基础数据组合方式描述等字段。
步骤S52,元信息解释模块203把配置数据解释成可执行代码段;
步骤S53,解释器模块204执行可执行代码段,从设备上获取原始数据;
步骤S54,信息加工模块205根据配置数据的配置对原始数据进行提取、去重等加工处理,获得基础数据;
步骤S55,信息组合模块206根据配置数据的配置对基础数据进行组合,获得设备信息;
步骤S56,设备信息存储模块207存储获得的设备信息;
步骤S57,处理模块208读取存储的设备信息并显示等处理。
下面结合附图和实施实例对本公开进行详细描述。
元信息配置模块有多种构造方式,如,INI配置文件、XML、数据库表等。在元信息配置模块的该实例中,以配置文件构造方式为例,其中static_tunnel_filter、tunnel_filter是基础数据配置,functions_filter是信息项配置。基础数据配置中的desc是数据描述,cmd是信息获取方法,pattern和item是信息加工方法;信息项配置中的tunnel是信息名称,static_tunnel_filter+tunnel_filter是基础数据组合方法。该元信息配置模块的实例为:
[static_tunnel_filter]
desc=static tunnel selection
cmd=show mpls traffic-eng static brief
pattern=tunnel_(\d+)\s+-
item=1
[tunnel_filter]
desc=tunnel selection
cmd=show mpls traffic-eng tunnels brief
pattern=tunnel_(\d+)\s+\d+.\d+.\d+.\d+\s+-
item=1
[functions_filter]
tunnel=static_tunnel_filter+tunnel_filter
元信息读取模块读取配置文件,元信息解释模块把信息及其获取、加工、组合等字段给提取出来。
然后元信息解释模块利用信息获取字段信息,生成可以通过解释器与设备交互的代码 段,具体代码段形式依赖于解释器,可以采用通用的解释器,如Python;或者定制的解释器,如类C语法的解释器。以类C语法的解释器为例,生成的代码段格式如下:
Figure PCTCN2017086692-appb-000001
解释器模块通过解释、执行代码段采集原始数据,信息加工模块根据加工字段信息,对原始数据进行提取、去重、排序等加工处理,获得基础数据。提取规则的描述方法可以采用通用的正则表达式,也可以进行定制实现。
信息组合模块再根据组合字段信息对基础数据进行组合,获得设备信息。组合方式包括多属性组合,逻辑与,逻辑或,逻辑异或等。
通过存储模块进行存储,最后处理模块读取存储的设备信息进行显示处理。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到根据上述实施例的方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本公开的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本公开各个实施例所述的方法。
实施例2
在本实施例中还提供了一种设备信息获取装置,该装置用于实现上述实施例及优选实施方式,已经进行过说明的不再赘述。如以下所使用的,术语“模块”可以实现预定功能的软件和/或硬件的组合。尽管以下实施例所描述的装置较佳地以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并被构想的。
图3是根据本公开实施例的设备信息获取装置的结构框图,如图3所示,该装置包括:
1)查找模块32,设置为查找与设备对应的元信息,其中,该元信息用于描述该设备;
2)获取模块34,设置为根据该元信息中的配置信息获取用于描述该设备初始信息的第一设备信息;
3)第一处理模块36,设置为处理该第一设备信息,得到该设备的第二设备信息。
可选地,在本实施例中,上述设备信息获取装置的应用场景包括但并不限于:网络设备管理软件对每个设备进行个性化管理。在该应用场景下,查找与设备对应的元信息,其中,该元信息用于描述该设备;根据该元信息中的配置信息获取用于描述该设备初始信息的第一设备信息;处理该第一设备信息,得到该设备的第二设备信息。也就是说,本实施例通过设置在配置文件中的每一设备对应元信息,获取描述设备初始信息的第一设备信息,然后进一步处理第一设备信息得到第二设备信息,以供用户处理。通过本实施例,解决了相关技术中只能根据每一设备专有接口获取该设备信息所导致的通用性较低的问题,达到提高通用性的 效果。
在一个可选地实施方式中,上述配置信息包括:基础数据配置和信息项配置,其中,该基础数据配置包括:用于描述该元信息作用的数据描述字段、设备信息获取方式字段、设备信息加工方式字段;该信息项配置包括:设备的信息名称、该第一设备信息组合方式字段。
在一个可选地实施方式中,图4是根据本公开实施例的设备信息获取装置的结构框图(一),如图4所示,获取模块34包括:
1)生成单元42,设置为将该配置信息生成可执行代码段;
2)获取单元46,设置为运行该可执行代码段,以从该设备上获取该第一设备信息。
通过图4所示的装置,将配置信息生成可执行代码段,运行该可执行代码段,以从该设备上获取第一设备信息,能够获取不同的设备信息,从而进一步避免了相关技术中,针对每一设备必须使用该设备专有的接口以及专有的设备信息获取方式去获取设备信息造成的设备信息获取方式通用性较低的问题。
在一个可选地实施方式中,图5是根据本公开实施例的设备信息获取装置的结构框图(二),如图5所示,生成单元42包括:
1)解析子单元52,设置为解析该配置信息,以提取出该配置信息中所包括的一个或多个字段;
2)生成子单元54,设置为使用该配置信息中所包括的设备信息获取方式字段,生成该可执行代码段。
需要说明的是,上述一个或多个字段包括但并不限于:用于描述该元信息作用的数据描述字段、设备信息获取方式字段、设备信息加工方式字段;以及设备的信息名称、该第一设备信息组合方式字段。
通过上述图5所示的装置,使得可以根据配置信息中所包括的设备信息获取方式字段,生成可执行代码段,进而可以获取上述第一设备信息。
在一个可选地实施方式中,图6是根据本公开实施例的设备信息获取装置的结构框图(三),如图6所示,第一处理模块36包括:
1)加工单元62,设置为根据该配置信息中所包括的设备信息加工方式字段,对该第一设备信息进行加工处理;
2)组合单元64,设置为根据该配置信息中所包括的第一设备信息组合方式字段,组合经过加工处理后的第一设备信息,以得到该第二设备信息。
需要说明的是,对第一设备信息进行加工处理的方式包括但并不限于:对第一设备信息进行提取、去重、排序等加工处理。
另外,组合经过加工处理后的第一设备信息的方式包括但并不限于:多属性组合,逻辑与,逻辑或,逻辑异或等。
通过上述图6所示的装置,按照配置信息中所包括的设备信息加工方式对第一设备信息进行加工处理,并对加工出后的第一设备信息进行组合,得到第二设备信息,进一步解决了相关技术中只能根据每一设备专有接口获取该设备信息所导致的通用性较低的问题,达到提 高通用性的效果。
在一个可选地实施方式中,图7是根据本公开实施例的设备信息获取装置的结构框图(四),如图7所示,该装置除了包括图3所示的所有模块外还包括:
1)第二处理模块72,设置为存储并显示该第一设备信息和/或该第二设备信息。
需要说明的是,上述各个模块是可以通过软件或硬件来实现的,对于后者,可以通过以下方式实现,但不限于此:上述模块均位于同一处理器中;或者,上述各个模块以任意组合的形式分别位于不同的处理器中。
实施例3
本公开的实施例还提供了一种存储介质。可选地,在本实施例中,上述存储介质可以被设置为存储用于执行以下步骤的程序代码:
S1,查找与设备对应的元信息,其中,该元信息用于描述该设备;
S2,根据该元信息中的配置信息获取用于描述该设备初始信息的第一设备信息;
S3,处理该第一设备信息,得到该设备的第二设备信息。
可选地,在本实施例中,上述存储介质可以包括但不限于:U盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。
可选地,在本实施例中,处理器根据存储介质中已存储的程序代码执行上述步骤S1、S2、S3。
可选地,本实施例中的具体示例可以参考上述实施例及可选实施方式中所描述的示例,本实施例在此不再赘述。
显然,本领域的技术人员应该明白,上述的本公开的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本公开不限制于任何特定的硬件和软件结合。
以上所述仅为本公开的优选实施例而已,并不用于限制本公开,对于本领域的技术人员来说,本公开可以有各种更改和变化。凡在本公开的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本公开的保护范围之内。

Claims (13)

  1. 一种设备信息获取方法,其特征在于,包括:
    查找与设备对应的元信息,其中,所述元信息用于描述所述设备;
    根据所述元信息中的配置信息获取用于描述所述设备初始信息的第一设备信息;
    处理所述第一设备信息,得到所述设备的第二设备信息。
  2. 根据权利要求1所述的方法,其特征在于,
    所述配置信息包括:基础数据配置和信息项配置,其中,所述基础数据配置包括:用于描述所述元信息作用的数据描述字段、设备信息获取方式字段、设备信息加工方式字段;所述信息项配置包括:设备的信息名称、所述第一设备信息组合方式字段。
  3. 根据权利要求2所述的方法,其特征在于,根据所述元信息中的配置信息获取用于描述所述设备初始信息的第一设备信息包括:
    将所述配置信息生成可执行代码段;
    运行所述可执行代码段,以从所述设备上获取所述第一设备信息。
  4. 根据利要求3所述的方法,其特征在于,将所述配置信息生成可执行代码段包括:
    解析所述配置信息,以提取出所述配置信息中所包括的一个或多个字段;
    使用所述配置信息中所包括的设备信息获取方式字段,生成所述可执行代码段。
  5. 根据利要求1所述的方法,其特征在于,处理所述第一设备信息,得到所述设备的第二设备信息包括:
    根据所述配置信息中所包括的设备信息加工方式字段,对所述第一设备信息进行加工处理;
    根据所述配置信息中所包括的第一设备信息组合方式字段,组合经过加工处理后的第一设备信息,以得到所述第二设备信息。
  6. 根据利要求1至5中任意一项所述的方法,其特征在于,还包括:
    存储并显示所述第一设备信息和/或所述第二设备信息。
  7. 一种设备信息获取装置,其特征在于,包括:
    查找模块,设置为查找与设备对应的元信息,其中,所述元信息用于描述所述设备;
    获取模块,设置为根据所述元信息中的配置信息获取用于描述所述设备初始信息的第一设备信息;
    第一处理模块,设置为处理所述第一设备信息,得到所述设备的第二设备信息。
  8. 根据权利要求7所述的装置,其特征在于,
    所述配置信息包括:基础数据配置和信息项配置,其中,所述基础数据配置包括:用于描述所述元信息作用的数据描述字段、设备信息获取方式字段、设备信息加工方式字段;所述信息项配置包括:设备的信息名称、所述第一设备信息组合方式字段。
  9. 根据权利要求8所述的装置,其特征在于,所述获取模块包括:
    生成单元,设置为将所述配置信息生成可执行代码段;
    获取单元,设置为运行所述可执行代码段,以从所述设备上获取所述第一设备信息。
  10. 根据利要求9所述的装置,其特征在于,所述生成单元包括:
    解析子单元,设置为解析所述配置信息,以提取出所述配置信息中所包括的一个或多个字段;
    生成子单元,设置为使用所述配置信息中所包括的设备信息获取方式字段,生成所述可执行代码段。
  11. 根据利要求7所述的装置,其特征在于,所述第一处理模块包括:
    加工单元,设置为根据所述配置信息中所包括的设备信息加工方式字段,对所述第一设备信息进行加工处理;
    组合单元,设置为根据所述配置信息中所包括的第一设备信息组合方式字段,组合经过加工处理后的第一设备信息,以得到所述第二设备信息。
  12. 根据利要求7至11中任意一项所述的装置,其特征在于,所述装置还包括:
    第二处理模块,设置为存储并显示所述第一设备信息和/或所述第二设备信息。
  13. 一种计算机存储介质,所述计算机存储介质存储有执行指令,所述执行指令用于执行权利要求1至6中任一项所述的方法。
PCT/CN2017/086692 2016-06-16 2017-05-31 设备信息获取方法及装置 WO2017215445A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610428852.X 2016-06-16
CN201610428852.XA CN107517113B (zh) 2016-06-16 2016-06-16 设备信息获取方法及装置

Publications (1)

Publication Number Publication Date
WO2017215445A1 true WO2017215445A1 (zh) 2017-12-21

Family

ID=60662994

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/086692 WO2017215445A1 (zh) 2016-06-16 2017-05-31 设备信息获取方法及装置

Country Status (2)

Country Link
CN (1) CN107517113B (zh)
WO (1) WO2017215445A1 (zh)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101162393A (zh) * 2007-11-13 2008-04-16 南京邮电大学 基于通用即插即用的自适应通用控制点系统结构和控制方法
CN101203817A (zh) * 2005-06-20 2008-06-18 霍尼韦尔国际公司 在过程控制系统中管理具有不同设备描述规范的现场设备
WO2009012696A1 (fr) * 2007-07-24 2009-01-29 Huawei Technologies Co., Ltd. Procédé de gestion de configuration de lot de dispositifs de communication et son appareil

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101166039B (zh) * 2006-10-17 2012-07-11 中兴通讯股份有限公司 一种无线通信系统中远端射频单元自动发现的方法
CN101621405B (zh) * 2009-07-07 2012-02-29 中兴通讯股份有限公司 分布式管理监控系统及其监控方法、创建方法
JP2014038600A (ja) * 2012-07-20 2014-02-27 Ricoh Co Ltd 情報提供装置、情報提供方法及び情報提供システム
US8966260B1 (en) * 2013-01-30 2015-02-24 Palo Alto Networks, Inc. Credentials management in large scale virtual private network deployment
CN103905337B (zh) * 2014-03-31 2018-01-23 华为技术有限公司 一种网络资源的处理装置、方法和系统

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101203817A (zh) * 2005-06-20 2008-06-18 霍尼韦尔国际公司 在过程控制系统中管理具有不同设备描述规范的现场设备
WO2009012696A1 (fr) * 2007-07-24 2009-01-29 Huawei Technologies Co., Ltd. Procédé de gestion de configuration de lot de dispositifs de communication et son appareil
CN101162393A (zh) * 2007-11-13 2008-04-16 南京邮电大学 基于通用即插即用的自适应通用控制点系统结构和控制方法

Also Published As

Publication number Publication date
CN107517113B (zh) 2022-07-15
CN107517113A (zh) 2017-12-26

Similar Documents

Publication Publication Date Title
CN109739894B (zh) 补充元数据描述的方法、装置、设备及存储介质
WO2020220638A1 (zh) 链路系统与日志系统的关联方法、装置及存储介质
JP5298117B2 (ja) 分散コンピューティングにおけるデータマージング
US10922361B2 (en) Identifying and structuring related data
US9910870B2 (en) System and method for creating data models from complex raw log files
US20120203751A1 (en) Capture, Aggregate, and Use Search Activities as a Source of Social Data Within an Enterprise
CN111367976B (zh) 基于java反射机制的excel文件数据的导出方法及装置
CN113157947A (zh) 知识图谱的构建方法、工具、装置和服务器
CN107480205A (zh) 一种进行数据分区的方法和装置
CN104408118A (zh) 数据库的创建方法和装置
CN110764760B (zh) 用于绘制程序流程图的方法、装置、计算机系统和介质
CN107368407B (zh) 信息处理方法和装置
CN117171108B (zh) 一种虚拟模型映射方法和系统
US20140072227A1 (en) Searching and Sorting Image Files
US9201937B2 (en) Rapid provisioning of information for business analytics
CN107818152B (zh) 一种植物检索方法和系统
WO2017215445A1 (zh) 设备信息获取方法及装置
CN108984221B (zh) 一种多平台用户行为日志的采集方法和装置
CN108628909B (zh) 信息推送方法和装置
EP2892018A1 (en) Automated compilation of graph input for the hipergraph solver
CN112286879B (zh) 基于元数据的数据资产构建方法及装置
US9652359B1 (en) Annotation natural keys for source code analysis
CN111159213A (zh) 一种数据查询方法、装置、系统和存储介质
CN110471708B (zh) 基于可重用组件的配置项获取的方法及装置
CN107832347A (zh) 数据降维方法、系统及电子设备

Legal Events

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

Ref document number: 17812556

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

Country of ref document: EP

Kind code of ref document: A1