WO2012174800A1 - 一种网管数据采集方法和装置 - Google Patents

一种网管数据采集方法和装置 Download PDF

Info

Publication number
WO2012174800A1
WO2012174800A1 PCT/CN2011/079772 CN2011079772W WO2012174800A1 WO 2012174800 A1 WO2012174800 A1 WO 2012174800A1 CN 2011079772 W CN2011079772 W CN 2011079772W WO 2012174800 A1 WO2012174800 A1 WO 2012174800A1
Authority
WO
WIPO (PCT)
Prior art keywords
database
script
network management
management data
time
Prior art date
Application number
PCT/CN2011/079772
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 WO2012174800A1 publication Critical patent/WO2012174800A1/zh

Links

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

Definitions

  • the present invention relates to data collection technologies, and in particular, to a database-based network management data collection method and apparatus. Background technique
  • the invention provides a network management data collection method and device, which are used to solve the problems in the prior art that the acquisition method is complicated and the operating system is not easy to maintain due to the adoption of the JAVA program.
  • the invention provides a network management data collection method, and the method comprises:
  • the SHELL script includes a command statement for connecting to a database and for invoking a database script, the database script including a command statement for querying and exporting the required network management data to the database;
  • the present invention also provides a network management data collection device, the device comprising: a calling unit and an execution unit;
  • the calling unit is configured to invoke a pre-written SHELL script, where the SHELL script includes a command statement set to connect to the database and set to invoke the database script, where the database script includes setting to query and export the required network management data to the database.
  • Command statement includes a command statement set to connect to the database and set to invoke the database script, where the database script includes setting to query and export the required network management data to the database.
  • the execution unit is configured to execute the SHELL script, connect to the database, and invoke the database script to query and export the required network management data in the database.
  • the invention discards the way of applying the JAVA program in the prior art, and by using the SHELL script and the database script, the operating system directly operates on the user database, and the entire collection operation is performed based on the database, thereby making the collection environment of the network management data single, avoiding Installation and maintenance are inconvenient due to the application of JAVA programs.
  • FIG. 1 is a flowchart of a network management data collection method according to an embodiment of the present invention
  • FIG. 3 is a structural flowchart of a network management data collection method according to the present invention. detailed description
  • a scripting language is an interpreted language, and scripts consist of various command statements written in a scripting language. Since the scripting language does not need to be compiled, running the script does not need to be compiled into the target program as if it were a JAVA program, but is interpreted directly by the interpreter at the time of the call. Therefore, the script language is usually simpler and easier than the high-level programming languages such as C and JAVA, and can be used in the operating system without special environment library support.
  • SHELL is the command interpreter of the operating system, which can interpret external information to the operating system and realize the interaction between the external and the operating system.
  • the SHELL script is a series of command statements that can be executed by a series of operating systems stored in a file. SHELL can interpret and execute the SHELL script stored in the file, ie: read the command statement in the SHELL script, and explain it to the operating system, and then the operating system to execute various commands.
  • the invention provides a network management data collection method, which comprises the following steps:
  • the SHELL script includes a command statement for connecting to a database and for invoking a database script, the database script including a command statement for querying and exporting the required network management data to the database;
  • the operating system directly operates the user database to realize the collection of the network management data, and the collected data is exported for the upper network management. Since the entire collection operation is based on a database, the collection environment of the network management data is single, and the installation and maintenance inconvenience caused by the application of the JAVA program is avoided.
  • a network management data collection method includes the following steps: Step S101: An operating system invokes a pre-written SHELL script.
  • Step S102 The operating system is connected to the user database by executing a command statement in the SHELL script for connecting to the database.
  • Step S103 The operating system invokes and executes a pre-written database script to execute the command statement for calling the database script in the SHELL script, and queries and exports the required network management data from the user database.
  • the operating system implements timing call and execution of the SHELL script by executing a timing task statement, thereby enabling timing connection to the database and invoking the database script.
  • the timed task statement is a command statement for calling and executing the SHELL script at a timed time.
  • the SHELL script includes a preset collection time parameter, configured to: when the operating system executes the SHELL script, pass the collection time parameter to the database script, and the database script is based on the received collection. Time parameters, query and export at set time points or settings The required network management data for a fixed period of time.
  • the SHELL script includes a set output path parameter, and is used to: when the operating system executes the SHELL script, pass the output path parameter to the database script, and the database script is based on the received output path. Parameters, export the required network management data to the set file directory.
  • the database script includes a command statement for storing the required network management data as a file of a set format before exporting the required network management data.
  • FIG. 2 is a writing process of the embodiment of the present invention, as shown in FIG. 2 Show, including the following steps:
  • Step S201 Determine the required network management data according to the requirements of the operator, and prepare a database script capable of querying and exporting the required network management data from the database.
  • Step S202 determining a database to be connected and the database script, according to which a SHELL script for connecting the database and calling the database script is written.
  • Step S203 writing a timing task statement for calling and executing the SHELL script.
  • the operator uses the LINUX operating system and the SYBASE IQ database, and needs to periodically collect certain types of network management data in a user database named DBNAME, and finally in the form of an XML file. Output, the operator's network management data requirements are shown in Table 1.
  • VASID VASID, ie service
  • VASPID VASPID which is the enterprise
  • the IP address address, the first column content, namely: KPI-ID, is the index column to be collected, the contents of the second and third columns, namely: KPI name and KPI description, which is for each KPI-ID to be collected.
  • Step 1 According to the requirements of the operators listed in Table 1, determine the network management data indicator that the operating system needs to collect as the value corresponding to each KPI-ID in the table.
  • Step 2 According to the determined network management data indicators that need to be collected, write a database script for querying and exporting the values corresponding to all the KPI-IDs in the user database, and mainly includes the following three parts: querying all the users from the database.
  • KPI-ID corresponding to the value of the statement the query results are stored as XML file format of the statement, the statement export XML files, the database scripts named a .sql.
  • the database script will be used to query the KPI-ID and its corresponding value in the user database DBNAME, and store the query result in an XML file format and temporarily store it in the database, for example, temporarily stored in the xmldata field of the database table B. in.
  • the above script means: the value of the xmldata field in Table B is output, and the separator between the text segment and the text segment is ', .
  • Step 3 Write a SHELL script for connecting the user database DBNAME and calling the database script a.sql, mainly including the following three parts: connecting the DBNAME database and calling the database script a.sql statement, collection time parameter, output Path parameter, name the SHELL script b.sh.
  • $SRVNAME, $SYBUSER, SSYBPASSWD represent the service name, user name and password of the user database, respectively
  • $DBNAME, $HOST respectively represent the database name and port number of the user database.
  • -q a.sql means to execute the database script a.sql in the connected user database server environment.
  • the acquisition time parameters of the SHELL script are as follows:
  • Time mode date_mode A value of 0 means that the dynamic time is used, and the start time backstart and the end time backdate are used to constrain the time range.
  • a value of 1 indicates that the static time is used, that is, the query refers to the network management data belonging to the set time point. For example: when date_mode is '2010012100, it means that the query belongs to the KPI-ID and its value at 0:00 on January 21, 2010;
  • the collection granularity date_type is used to indicate the time unit of the dynamic time period when the value of the time mode date_mode is 0.
  • the value 1 indicates that the dynamic time period is in units of 1 hour, and the value 2 indicates the dynamic time period. 1 day is the unit, a value of 3 indicates that the dynamic time period is in units of January;
  • the start time is backstart: used when the value of the time mode in the above time mode is 0,
  • the start time of the dynamic time period the value of 0 means starting from the current time, that is, including the current time
  • the value of 1 means that the time of the start of the acquisition is the time of pushing back one time unit from the current time
  • the value of 2 means the start of the acquisition.
  • the time is the time to push back 2 time units at the current time, and so on;
  • End time backdate used to indicate the time length and end time of the dynamic time period when the value of the time mode date_mode is 0.
  • the value 1 indicates that the time data of the start time is reversed by 1 time unit.
  • a value of 2 indicates that the acquisition starts with the start time and reverses the time data of 2 time units, and so on.
  • the acquisition time parameter of the SHELL script is '0 1 1 4
  • the first parameter 0 indicates that the dynamic time acquisition is used
  • the second parameter 1 indicates that the time is reported
  • the reported time range is the third time.
  • the parameter and the fourth parameter are determined.
  • the third parameter 1 indicates that the starting point of the report is the first hour of the current time
  • the fourth parameter 4 indicates that the data is reported for 4 hours. Therefore, it is reported that the current time is 1 hour before. 4 hours of data.
  • the operating system upon execution of the script SHELL, will be connected to the subscriber database DBNAME, and call and executing database script a.sql, and at the same time the acquisition parameters and the output transfer path parameters to the script database a .sql, to ensure the operation
  • the system can collect the network management data KPI-ID and its corresponding value in the set time period (one month in this embodiment), and export it to the specified file directory.
  • Step 4 Write a timed task statement for calling and executing the SHELL script as follows: 16 5 5 * * su - sybiq -c " sh /home/sybiq/report/unicom config/b.sh 3 0 1
  • Step 5 The operating system sequentially performs the foregoing steps, and finally collects the required network management data stored in the XML format, and the following is the result of the collected network management data:
  • the value of the ⁇ kpild: ⁇ p ⁇ /kpild> identifier indicates the queried KPI-ID
  • the value between ⁇ &111 ⁇ 2> and ⁇ 11116> indicates the value corresponding to the queried KPI-ID.
  • a network management data collection device corresponding to the embodiment of the present invention, the device includes: a calling unit and an execution unit;
  • a calling unit configured to invoke a pre-written SHELL script
  • the SHELL script includes a command statement for connecting to a database and for invoking a database script
  • the database script includes a method for querying and exporting the required network management data to the database.
  • an execution unit configured to query and export the required network management data in the database by executing the SHELL script, connecting to the database, and calling the database script.
  • the device may further include: a timing unit, configured to execute a timing task statement to trigger the calling unit and the execution unit, where the timed task statement is a command statement that invokes and executes the SHELL script at a timed time .
  • the executing unit when executing the SHELL script, is further configured to: pass the collection time parameter to the database script, and the database script queries and exports the setting according to the received collection time parameter. Time point or required network management data within the set time period.
  • the executing unit when executing the SHELL script, is further configured to: pass the output path parameter to the database script, and the database script needs to query according to the received output path parameter.
  • the network management data is exported to the set file directory.
  • the network management data collection method and device of the present invention abandons the way of applying the JAVA program in the prior art, but adopts the acquisition structure flow as shown in FIG. 3, that is, the operating system directly operates the user database to obtain the final network management data file. .
  • the entire collection operation is based on the database, which makes the collection environment of the network management data single, avoiding the inconvenience of installation and maintenance caused by the application of the JAVA program.

Landscapes

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

Abstract

本发明公开了一种网管数据采集方法及装置,该方法包括:调用预先编写的SHELL脚本,所述SHELL脚本包括用于连接数据库和用于调用数据库脚本的命令语句,所述数据库脚本包括用于对所述数据库查询和导出所需网管数据的命令语句;通过执行所述SHELL脚本,连接数据库并调用所述数据库脚本,在所述数据库中查询和导出所需的网管数据。本发明通过应用SHELL脚本和数据库脚本,使得操作系统直接对用户数据库进行操作,整个采集操作是基于数据库进行的,从而使得网管数据的采集环境单一,避免了因应用JAVA程序而带来的安装和维护不便。

Description

一种网管数据采集方法和装置 技术领域
本发明涉及数据采集技术, 尤其涉及一种基于数据库的网管数据采集 方法及装置。 背景技术
目前, 运营商在进行网管数据采集时, 大多都是利用操作系统的定时 任务语句 ,去调用 JAVA程序来实现,这种方法以 JAVA程序作为辅助程序, 不能由操作系统直接对用户数据库进行操作, 使得网管数据的采集环境不 够单一且不易维护。
而且, JAVA程序的运行需要经过编译、 链接等步驟, 且需要特别的环 境类库支持, 因此, 目前的网管数据采集方法以及软件安装都比较复杂。 发明内容
本发明提供一种网管数据采集方法和装置, 用以解决现有技术中因采 用 JAVA程序而存在的采集方法复杂和操作系统不易维护的问题。
本发明提供了一种网管数据采集方法, 该方法包括:
调用预先编写的 SHELL脚本, 所述 SHELL脚本包括用于连接数据库 和用于调用数据库脚本的命令语句, 所述数据库脚本包括用于对所述数据 库查询和导出所需网管数据的命令语句;
执行所述 SHELL脚本, 连接数据库并调用所述数据库脚本, 在所述数 据库中查询和导出所需的网管数据。
本发明还提供了一种网管数据采集装置, 该装置包括: 调用单元及执 行单元; 其中, 调用单元, 设置为调用预先编写的 SHELL脚本, 所述 SHELL脚本包 括设置为连接数据库和设置为调用数据库脚本的命令语句, 所述数据库脚 本包括设置为对所述数据库查询和导出所需网管数据的命令语句;
执行单元, 设置为执行所述 SHELL脚本, 连接数据库并调用所述数据 库脚本, 在所述数据库中查询和导出所需的网管数据。
本发明摒弃了现有技术应用 JAVA程序的方式, 通过应用 SHELL脚本 和数据库脚本, 使得操作系统直接对用户数据库进行操作, 整个采集操作 是基于数据库进行的, 从而使得网管数据的采集环境单一, 避免了因应用 JAVA程序而带来的安装和维护不便。 附图说明
图 1为本发明实施例的网管数据采集方法流程图;
图 2为本发明实施例的脚本编写流程图;
图 3为本发明的网管数据采集方法结构流程图。 具体实施方式
脚本语言是一种解释型语言, 脚本由脚本语言编写的各种命令语句组 成。 由于脚本语言不需要编译, 因此, 运行脚本不像运行 JAVA程序一样, 还需要编译成目标程序, 而是在调用的时候由解释器直接解释。 所以, 脚 本语言通常比 C语言、 JAVA语言之类的高级编程语言要简单容易, 而且 不需要特别的环境类库支持就可以在操作系统中使用。
SHELL是操作系统的命令解释器,能够将外部的信息解释给操作系统, 实现外部与操作系统之间的交互。 而 SHELL脚本就是存放于文件中的一连 串操作系统能够执行的命令语句。 SHELL能够解释并执行存放在文件中的 SHELL脚本, 即: 读取 SHELL脚本中的命令语句, 并解释给操作系统, 再由操作系统去执行各种命令。 本发明提供一种网管数据采集方法, 包括以下步驟:
调用预先编写的 SHELL脚本, 所述 SHELL脚本包括用于连接数据库 和用于调用数据库脚本的命令语句, 所述数据库脚本包括用于对所述数据 库查询和导出所需网管数据的命令语句;
通过执行所述 SHELL脚本, 连接数据库并调用所述数据库脚本, 在所 述数据库中查询和导出所需的网管数据。
本发明通过应用 SHELL脚本和数据库脚本,使得操作系统直接对用户 数据库进行操作, 实现网管数据的采集, 并将采集后的数据导出以供上级 网管的查阅。 由于整个采集操作是基于数据库进行的, 使得网管数据的采 集环境单一, 避免了因应用 JAVA程序而带来的安装和维护不便。
下面结合附图和实施例, 对本发明的具体实施方式作进一步详细描述。 本发明实施例的一种网管数据采集方法, 如图 1所示, 包括以下步驟: 步驟 S101 , 操作系统调用预先编写的 SHELL脚本。
步驟 S102, 通过执行所述 SHELL脚本中用于连接数据库的命令语句, 操作系统与用户数据库进行连接。
步驟 S103 , 通过执行所述 SHELL脚本中用于调用数据库脚本的命令 语句, 操作系统调用并执行预先编写的数据库脚本, 从所述用户数据库中 查询和导出所需的网管数据。
优选地, 操作系统通过执行定时任务语句, 实现定时对所述 SHELL脚 本的调用和执行, 从而实现能够定时去连接所述数据库和调用所述数据库 脚本。 其中, 所述定时任务语句为在定时时间调用和执行所述 SHELL脚本 的命令语句。
优选地, 所述 SHELL脚本包括预先设定的采集时间参数, 用于在操作 系统执行所述 SHELL脚本时,将所述采集时间参数传递给所述数据库脚本, 所述数据库脚本根据收到的采集时间参数, 查询和导出在设定时间点或设 定时间段内的所需网管数据。
优选地, 所述 SHELL脚本包括设定的输出路径参数, 用于在操作系统 执行所述 SHELL脚本时, 将所述输出路径参数传递给所述数据库脚本, 所 述数据库脚本根据收到的输出路径参数, 将查询到的所需网管数据导出到 设定的文件目录下。
优选地, 所述数据库脚本包括在导出查询到的所需网管数据之前, 将 所述所需网管数据存储为设定格式的文件的命令语句。
为实现本发明实施例的网管数据采集方法, 本发明实施例需要编写所 述 SHELL脚本、 所述数据库脚本、 以及所述定时任务语句, 图 2为本发明 实施例的编写流程, 如图 2所示, 包括以下步驟:
步驟 S201 , 根据运营商的需求, 确定所需的网管数据, 据此编写能够 从数据库中查询和导出所需网管数据的数据库脚本。
步驟 S202, 确定需要连接的数据库和所述数据库脚本, 据此编写用于 连接所述数据库和调用所述数据库脚本的 SHELL脚本。
步驟 S203 , 编写用于调用和执行所述 SHELL脚本的定时任务语句。 本发明的一种网管数据采集方法的具体实施例:运营商使用 LINUX操 作系统和 SYBASE IQ数据库, 需要在名为 DBNAME的用户数据库中定时 采集某些类型的网管数据, 并最终以 XML文件的形式输出,运营商的网管 数据需求实例如表 1所示。
Figure imgf000006_0001
KPI-ID KPI名称 KPI描述 采样间隔
CM-01-14-01-01-01 网元编码 网元编码 1个月
KPB中 MMSSP
CM-01-14-01-01-02 MMSSP编码 1个月
的编码
CM-01-14-01-01-03 设备命名 设备命名 1个月
CM-01-14-01-01-04 网元位置信息 网元位置信息 1个月
CM-01-14-01-01-05 网元软件版本 网元软件版本 1个月
CM-01-14-01-01-06 网元供应商 网元供应商名称 1个月 名称
CM-01-14-01-01-07 网元创建曰期 网元创建曰期 1个月
彩信中心给彩信
彩信业务平台 业务平台分配的
CM-01-14-01-01-08 1个月
VASID VASID, 即服务编
彩信中心给彩信
业务平台分配的
彩信业务平台
CM-01-14-01-01-09 彩信业务平台 1个月
VASPID VASPID, 即企业
代码
彩信业务平台 彩信业务平台 IP
CM-01-14-01-01-10 1个月
IP地址 地址 其中, 第一列内容, 即: KPI-ID, 就是所要采集的指标列, 第二、 三 列的内容, 即: KPI名称及 KPI描述, 是对所要采集的每一个 KPI-ID的注 释性内容, 第四列内容, 即: 采样间隔, 表示本次采集的时间要求为按月
步驟 1 ,根据表 1中列出的运营商的需求,确定操作系统需要采集的网 管数据指标为表中每个 KPI-ID所对应的值 ( value )。
步驟 2,根据已经确定的需要采集的网管数据指标, 编写用于在用户数 据库中查询和导出上述所有 KPI-ID所对应的 value的数据库脚本, 主要包 括以下三个部分:从用户数据库中查询所有 KPI-ID所对应的 value的语句、 将查询结果存储为 XML文件格式的语句、 导出 XML文件的语句, 将该数 据库脚本命名为 a.sql。 所述数据库脚本将用于在用户数据库 DBNAME中查询 KPI-ID及其所 对应的 value, 并将查询结果存储为 XML文件形式后暂存于数据库中, 例 如, 暂存于数据库表 B的 xmldata字段中。
为了导出该 XML文件, 采用以下脚本语句:
Set temporary option Temp— Extract— Column— Delimiter: ' ' Select xmldata from B
Set temporary option temp— extract— name 1= ' '
上述脚本的意思为:将表 B中的 xmldata字段值输出,并且文本段与文 本段之间的分隔符为', 。
步驟 3 , 编写用于连接用户数据库 DBNAME和调用数据库脚本 a.sql 的 SHELL脚本, 主要包括以下三个部分: 连接所述 DBNAME数据库和调 用所述数据库脚本 a.sql的语句、采集时间参数、输出路径参数,将该 SHELL 脚本命名为 b.sh。
其中, 连接所述 DBNAME数据库和调用所述数据库脚本 a.sql的语句 为:
dbisqlc -c "eng=$SRVNAME;uid=$SYBUSER;pwd=$SYBPASSWD;dbn=$DBNAME;lin ks=tcpip {host=$HOST} " -q a.sql
其中, $SRVNAME、 $SYBUSER、 SSYBPASSWD 分别表示用户数据 库的服务名、 用户名和密码, $DBNAME、 $HOST分别表示用户数据库的 数据库名和端口号。 -q之前的语句是用来连接数据库的, -q a.sql表示在所 连接的用户数据库服务器环境下执行数据库脚本 a.sql。
所述 SHELL脚本的采集时间参数如下:
时间模式 date— mode: 值为 0 表示使用动态时间, 并使用起始时间 backstart, 结束时间 backdate来约束时间范围; 值为 1表示使用静态时间, 即:表示查询属于设定时间点的网管数据,例如: date— mode 为' 2010012100, 时, 表示查询属于 2010年 1月 21 日 0时的 KPI-ID及其 value;
采集粒度 date— type: 用于当上述时间模式 date— mode的值为 0时, 表 示动态时间段的时间单位,值为 1表示动态时间段以 1小时为单位,值为 2 表示动态时间段以 1天为单位, 值为 3表示动态时间段以 1月为单位; 起始时间 backstart: 用于当上述时间模式 date mode的值为 0时, 表示 动态时间段的开始时间, 值为 0表示从当前时间开始, 即包含当前时间, 值为 1表示采集开始的时间为以当前时间开始倒推 1个时间单位的时间, 值为 2表示采集开始的时间为以当前时间开始倒推 2个时间单位的时间, 依此类推;
结束时间 backdate: 用于当上述时间模式 date— mode的值为 0时, 表示 动态时间段的时间长度和结束时间,值为 1表示采集以起始时间开始倒推 1 个时间单位的时间数据, 值为 2表示采集以起始时间开始倒推 2个时间单 位的时间数据, 依此类推。
例如: 当所述 SHELL脚本的采集时间参数为 '0 1 1 4, 时, 第一个参 数 0表示使用动态时间采集; 第二个参数 1 表示是按照小时上报; 上报的 时间范围由第三个参数和第四个参数确定, 第三个参数 1 表示上报的起点 是当前时间的前 1个小时, 第四个参数 4表示上报 4个小时的数据, 因此, 就是上报当前时间 1个小时之前, 4个小时的数据。
操作系统在执行所述 SHELL脚本时, 将会与用户数据库 DBNAME进 行连接, 并调用和执行数据库脚本 a.sql, 以及同时把采集时间参数和输出 路径参数传递给数据库脚本 a.sql,以保证操作系统能够采集设定时间段(本 实施例中为 1个月) 内的网管数据 KPI-ID及其所对应的 value, 并导出到 指定的文件目录下。
步驟 4,编写用于调用和执行所述 SHELL脚本的定时任务语句,如下: 16 5 5 * * su - sybiq -c " sh /home/sybiq/report/unicom config/b.sh 3 0 1
Γ'
进入操作系统根目录下, 使用命令 crontab -e将此语句写入, 即可实现 每月五号的五点十六分调用和执行路径 /home/sybiq/report/unicom— config/下 的 SHELL脚本" b.sh 0 3 1 1", 其中, 4个采集时间参数分别为 0、 3 、 1 、 1 , 即表示时间模式为动态设置, 并且采集粒度为月, 起始时间为上个月, 结束时间为这个月, 即采集上个月开始到这个月结束的网管数据 KPI-ID及 其所对应的 value。
步驟 5 , 操作系统依次执行上述各个步驟, 最终定时采集到以 XML格 式存储的所需网管数据, 如下为某次采集到的网管数据结果:
<?xml version="1.0" encoding="gb2312"?>
<!DOCTYPE xmlData SYSTEM "upSendMsg.dtd">
<xmlData>
<head>
<fileType>MMK/fileType>
<fileName> 130250101 CMO 12010080000001.MMK/fileName>
<createFileTime>201009051611 </createFileTime>
<totalRecordNum> 1 </totalRecordNum>
</head>
<body>
<kpi>
<kpiId>CM-01-14-01-01-01 </kpiId>
<value>99999</value>
</kpi>
<kpi>
<kpiId>CM-01-14-01-01 -02</kpiId>
<value>88888</value>
</kpi>
<kpi>
</kpi>
</body>
</xmlData>
该 XML文件中,标识 <kpild:^p</kpild>†间的值表示查询到的 KPI-ID, < &11½>和<^11116>中间的值表示查询到的 KPI-ID对应的 value值。 本发明实施例对应的一种网管数据采集装置, 该装置包括: 调用单元 及执行单元; 其中,
调用单元, 用于调用预先编写的 SHELL脚本, 所述 SHELL脚本包括 用于连接数据库和用于调用数据库脚本的命令语句, 所述数据库脚本包括 用于对所述数据库查询和导出所需网管数据的命令语句;
执行单元, 用于通过执行所述 SHELL脚本, 连接数据库并调用所述数 据库脚本, 在所述数据库中查询和导出所需的网管数据。
其中, 该装置还可以进一步包括: 定时单元, 用于执行定时任务语句, 以触发所述调用单元和所述执行单元, 所述定时任务语句为在定时时间调 用和执行所述 SHELL脚本的命令语句。
优选地, 所述执行单元, 在执行所述 SHELL脚本时, 还用于将所述采 集时间参数传递给所述数据库脚本, 所述数据库脚本根据收到的采集时间 参数, 查询和导出在设定时间点或设定时间段内的所需网管数据。
优选地, 所述执行单元, 在执行所述 SHELL脚本时, 还用于将所述输 出路径参数传递给所述数据库脚本, 所述数据库脚本根据接收到的输出路 径参数, 将查询到的所需网管数据导出到设定的文件目录下。
本发明的网管数据采集方法和装置摒弃了现有技术应用 JAVA程序的 方式, 而是采用如图 3 所示的采集结构流程, 即: 操作系统直接对用户数 据库进行操作, 得到最终的网管数据文件。 整个采集操作是基于数据库进 行的,从而使得网管数据的采集环境单一,避免了因应用 JAVA程序而带来 的安装和维护不便。
显然, 本领域的技术人员可以对本发明进行各种改动和变型而不脱离 本发明的精神和范围。 这样, 倘若本发明的这些修改和变型属于本发明权 利要求及其等同技术的范围之内, 则本发明也意图包含这些改动和变型在 内。

Claims

权利要求书
1、 一种网管数据采集方法, 其中, 该方法包括:
调用预先编写的 SHELL脚本, 所述 SHELL脚本包括用于连接数据库 和用于调用数据库脚本的命令语句, 所述数据库脚本包括用于对所述数据 库查询和导出所需网管数据的命令语句;
执行所述 SHELL脚本, 连接数据库并调用所述数据库脚本, 在所述数 据库中查询和导出所需的网管数据。
2、 根据权利要求 1所述的方法, 其中, 所述调用 SHELL脚本及执行 SHELL脚本, 包括:
执行定时任务语句, 实现定时对所述 SHELL脚本的调用和执行, 所述
3、 根据权利要求 1所述的方法, 其中, 所述 SHELL脚本进一步包括: 预先设定的采集时间参数,在执行所述 SHELL脚本时,该方法进一步包括: 将所述采集时间参数传递给所述数据库脚本, 所述数据库脚本根据收 到的采集时间参数, 查询和导出在设定时间点或设定时间段内的所需网管 数据。
4、 根据权利要求 3所述的方法, 其中, 所述采集时间参数包括: 时间模式, 用于表示查询属于设定时间点的网管数据, 或属于设定时 间段内的网管数据;
采集粒度, 用于当所述时间模式表示的是查询属于设定时间段内的网 管数据时, 表示设定时间段以小时 \天\月为时间单位;
起始时间, 用于当所述时间模式表示的是查询属于设定时间段内的网 管数据时, 查询开始的时间;
结束时间, 用于当所述时间模式表示的是查询属于设定时间段内的网 管数据时, 查询结束的时间。
5、 根据权利要求 1至 4任一项所述的方法, 其中, 所述 SHELL脚本 进一步包括: 预先设定的输出路径参数, 在执行所述 SHELL脚本时, 该方 法进一步包括:
将所述输出路径参数传递给所述数据库脚本,
所述数据库脚本根据收到的输出路径参数, 将查询到的所需网管数据 导出到设定的文件目录下。
6、 根据权利要求 5所述的方法, 其中, 所述数据库脚本还包括: 在导 出查询到的所需网管数据之前, 将所述所需网管数据存储为设定格式的文 件的命令语句。
7、 一种网管数据采集装置, 其中, 该装置包括: 调用单元及执行单元; 其中,
调用单元, 设置为调用预先编写的 SHELL脚本, 所述 SHELL脚本包 括设置为连接数据库和设置为调用数据库脚本的命令语句, 所述数据库脚 本包括设置为对所述数据库查询和导出所需网管数据的命令语句;
执行单元, 设置为执行所述 SHELL脚本, 连接数据库并调用所述数据 库脚本, 在所述数据库中查询和导出所需的网管数据。
8、 根据权利要求 7所述的装置, 其中, 该装置还包括:
定时单元, 设置为执行定时任务语句, 以触发所述调用单元和所述执 令语句。
9、 根据权利要求 7所述的装置, 其中,
所述执行单元, 在执行所述 SHELL脚本时, 还设置为将述采集时间参 数传递给所述数据库脚本, 所述数据库脚本根据收到的采集时间参数, 查 询和导出在设定时间点或设定时间段内的所需网管数据。
10、 根据权利要求 7、 8或 9所述的装置, 其中, 所述执行单元, 在执行所述 SHELL脚本时, 还设置为将输出路径参数 传递给所述数据库脚本, 所述数据库脚本根据收到的输出路径参数, 将查 询到的所需网管数据导出到设定的文件目录下。
PCT/CN2011/079772 2011-06-23 2011-09-16 一种网管数据采集方法和装置 WO2012174800A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201110171043.2 2011-06-23
CN2011101710432A CN102231676A (zh) 2011-06-23 2011-06-23 一种网管数据采集方法和装置

Publications (1)

Publication Number Publication Date
WO2012174800A1 true WO2012174800A1 (zh) 2012-12-27

Family

ID=44844216

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2011/079772 WO2012174800A1 (zh) 2011-06-23 2011-09-16 一种网管数据采集方法和装置

Country Status (2)

Country Link
CN (1) CN102231676A (zh)
WO (1) WO2012174800A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104331309A (zh) * 2014-10-31 2015-02-04 北京思特奇信息技术股份有限公司 一种配置实现数据加载项shell的管理方法及系统
US11570260B1 (en) 2020-09-30 2023-01-31 Juniper Networks, Inc. Data collection configuration file generation

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106714216A (zh) * 2015-07-28 2017-05-24 中兴通讯股份有限公司 一种基于脚本实现rru故障分析的方法和装置
CN109273077B (zh) * 2018-10-08 2021-08-31 北京万东医疗科技股份有限公司 数据处理方法、装置及智能设备
CN109542873A (zh) * 2018-10-26 2019-03-29 深圳点猫科技有限公司 一种基于编程语言实现重跑历史数据的方法以及电子设备
CN109814841A (zh) * 2018-12-19 2019-05-28 大唐软件技术股份有限公司 一种资源信息采集方法及装置

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101309174A (zh) * 2008-06-27 2008-11-19 中兴通讯股份有限公司 一种网管数据上报方法及系统
CN101364891A (zh) * 2007-08-10 2009-02-11 中兴通讯股份有限公司 分布式电信网管中单点采集性能数据的系统及实现方法
CN101938374A (zh) * 2010-08-24 2011-01-05 中兴通讯股份有限公司 一种系统性能监控及告警方法和系统
CN102025555A (zh) * 2009-09-22 2011-04-20 中兴通讯股份有限公司 Ip多媒体子系统性能测试的方法及装置

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100733091B1 (ko) * 2005-11-25 2007-06-27 엘지노텔 주식회사 이중화 프로세서의 데이터 베이스 구축장치 및 그 제어방법
CN100582312C (zh) * 2006-12-06 2010-01-20 北方工业大学 一种利用计算机远程监测铝电解槽槽壳温度的方法
JP2008171225A (ja) * 2007-01-12 2008-07-24 Hitachi Information Systems Ltd データベース自動移行システム
CN101778400B (zh) * 2010-01-08 2012-06-27 哈尔滨工业大学 基于数据库的话务量分析与预测系统及使用该系统的话务量预测方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101364891A (zh) * 2007-08-10 2009-02-11 中兴通讯股份有限公司 分布式电信网管中单点采集性能数据的系统及实现方法
CN101309174A (zh) * 2008-06-27 2008-11-19 中兴通讯股份有限公司 一种网管数据上报方法及系统
CN102025555A (zh) * 2009-09-22 2011-04-20 中兴通讯股份有限公司 Ip多媒体子系统性能测试的方法及装置
CN101938374A (zh) * 2010-08-24 2011-01-05 中兴通讯股份有限公司 一种系统性能监控及告警方法和系统

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104331309A (zh) * 2014-10-31 2015-02-04 北京思特奇信息技术股份有限公司 一种配置实现数据加载项shell的管理方法及系统
CN104331309B (zh) * 2014-10-31 2018-04-17 北京思特奇信息技术股份有限公司 一种配置实现数据加载项shell的管理方法及系统
US11570260B1 (en) 2020-09-30 2023-01-31 Juniper Networks, Inc. Data collection configuration file generation

Also Published As

Publication number Publication date
CN102231676A (zh) 2011-11-02

Similar Documents

Publication Publication Date Title
WO2012174800A1 (zh) 一种网管数据采集方法和装置
WO2016123920A1 (zh) 支持多类型数据库操作的集成接口的实现方法及系统
DK2914022T3 (en) Device management method, middleware and machine-to-machine communication platform, device and system
US7548542B2 (en) Methods and apparatus for transferring data
EP2107719B1 (en) System and method for remote application configuration management on multifunction peripherals
WO2012034440A1 (zh) 一种数据库升级脚本的生成方法和装置
CN103036956B (zh) 一种分布式组态化海量数据归档系统及实现方法
US10853333B2 (en) System and method for developing and implementing a migration plan for migrating a file system
CN104111855A (zh) 一种基于Lua的iOS客户端功能动态更新的方法
CN104484216A (zh) 服务接口文档和在线测试工具生成方法、装置
CN109947433A (zh) 一种小程序的生成方法、更新方法及装置
CN103500196A (zh) 多并发大数据量环境下excel数据导出方法及其导出装置
JP2015046075A (ja) 情報処理装置、その制御方法、及びコンピュータプログラム
US9529578B2 (en) Automated service version upgrading
CN103019736A (zh) 一种语言文件生成方法及装置
US20140096237A1 (en) Information processing system, access right management method, information processing apparatus and control method and control program therefor
CN113515564B (zh) 基于j2ee的数据访问方法、装置、设备及存储介质
WO2009069864A1 (en) System and method for operating domain profile using database in core framework for sdr mobile terminals
CN110955674B (zh) 基于java服务的异步导出方法及组件
CN103927314A (zh) 一种数据批量处理的方法和装置
US20140032725A1 (en) Method and system for deploying a model-based application to an application server
CN103019795A (zh) 一种软件基础数据升级方法及系统
WO2021068692A1 (zh) 工作流迁移方法、装置、设备及计算机可读存储介质
CN111831508B (zh) 一种动态监控数据采集方法及装置
CN103020318A (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: 11868126

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

Country of ref document: EP

Kind code of ref document: A1