WO2012155632A1 - Method and apparatus for automatically detecting northbound interface - Google Patents

Method and apparatus for automatically detecting northbound interface Download PDF

Info

Publication number
WO2012155632A1
WO2012155632A1 PCT/CN2012/072363 CN2012072363W WO2012155632A1 WO 2012155632 A1 WO2012155632 A1 WO 2012155632A1 CN 2012072363 W CN2012072363 W CN 2012072363W WO 2012155632 A1 WO2012155632 A1 WO 2012155632A1
Authority
WO
WIPO (PCT)
Prior art keywords
interface
result
detected
detection
interfaces
Prior art date
Application number
PCT/CN2012/072363
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 WO2012155632A1 publication Critical patent/WO2012155632A1/en

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
    • H04L41/04Network management architectures or arrangements
    • H04L41/044Network management architectures or arrangements comprising hierarchical management structures

Definitions

  • the present invention relates to the field of mobile communications, and in particular, to a northbound interface automatic detection method and apparatus. Background technique
  • the northbound interface detection mode is mainly performed by manually checking the log and the process information, which is not only complicated in operation, low in efficiency, high in maintenance cost, but also not timely, and when a function module has a problem, only when the function interface is called It will be found that there is an abnormality that cannot be discovered in advance and affects the user's use. Summary of the invention
  • the embodiment of the invention provides a method and a device for automatically detecting a northbound interface, so as to solve the problems of low efficiency, cumbersome operation, high maintenance cost, and untimely warning in the northbound interface detection in the prior art.
  • the embodiment of the invention provides a method for automatically detecting a northbound interface, including:
  • Read a preset configuration file obtain a list of interfaces to be detected from the configuration file, send a call instruction to the interface in the interface to be detected, and receive the result data returned by the interface, and respectively return the result data returned by each interface.
  • Set the standard template data into Line comparison obtain the detection results of all interfaces in the list of interfaces to be detected.
  • the call instruction is sent to the interface in the interface list to be detected, and the result data returned by the interface is received, and the result data returned by each interface is compared with the preset standard template data, and all the interfaces to be detected are obtained.
  • the detection result of the interface specifically includes: Step 1: Send a call instruction to an interface in the list of interfaces to be detected;
  • Step 2 Receive the result data returned by the interface, compare the result data returned by the interface with the standard template data, and obtain the detection result of the interface;
  • Step 3 Repeat steps 1 and 2 until the detection results of all interfaces in the interface list to be detected are obtained.
  • the result data returned by the interface is compared with the standard template data
  • the detection result of the interface includes: comparing the result data returned by the interface with the standard template data, and if the result data returned by the interface is consistent with the standard template data, The detection result of the interface is determined by the detection, and the detection result is recorded. If the result data returned by the interface is inconsistent with the standard template data, the detection result of the interface is determined to be unpassed, the detection result is recorded, and the result returned by the interface is recorded in the detection result. The number of rows in which the data is inconsistent with the standard template data.
  • the configuration file further includes: maintenance personnel information corresponding to each interface to be detected.
  • the method further includes:
  • the detection result of all the interfaces in the detection interface list is analyzed, the pass rate of the current test is counted, and the overall detection result is sent to the corresponding maintenance personnel according to the maintenance personnel information in the configuration file, wherein the overall detection result includes: The time of detection, the pass rate of this test, the interface that the local test failed, and the maintenance personnel information corresponding to the failed interface.
  • the embodiment of the invention further provides an automatic detection device for the northbound interface, comprising:
  • a configuration information module configured to save a preset configuration file
  • Get module set to read the configuration file from the configuration information module, get from the configuration file Take a list of detection interfaces
  • the interface calling module is configured to send a call instruction to the interface in the list of interfaces to be detected, and receive the result data returned by the interface;
  • the detection module is configured to compare the result data returned by each interface with the preset standard template data, and obtain detection results of all interfaces in the interface list to be detected.
  • the interface calling module is specifically configured to: send a calling instruction to an interface in the interface to be detected, receive the result data returned by the interface, invoke the detecting module, and after the detecting module completes, sequentially call the list of the interface to be detected. Other interfaces, until the last interface in the list of interfaces to be detected is called, wherein the detection module is called after each interface is called; the detection module is specifically set to: compare the result data returned by an interface with the standard template data, and obtain The detection result of the interface, the calling interface calling module, after the execution of the interface calling module, the detection results of the other interfaces in the interface to be detected are obtained, and the detection results of all the interfaces in the interface to be detected are obtained, where each acquisition is obtained.
  • the interface call module is called after the detection result of an interface.
  • the detecting module is specifically configured to: compare the result data returned by the interface with the standard template data, and if the result data returned by the interface is consistent with the standard template data, determine that the detection result of the interface is to pass the detection, and the detection result is recorded, if the interface If the returned result data is inconsistent with the standard template data, the detection result of the interface is determined to be unpassed, the detection result is recorded, and the number of rows in which the result data returned by the interface is inconsistent with the standard template data is recorded in the detection result.
  • the configuration file further includes: maintenance personnel information corresponding to each interface to be detected.
  • the device further includes: an analysis module, configured to analyze the detection result of all the interfaces in the list of the interfaces to be detected, calculate the pass rate of the current test, and send the overall detection result to the corresponding according to the maintenance personnel information in the configuration file.
  • the maintenance personnel wherein the overall test results include: the time of the test, the pass rate of the test, the interface that the local test failed, and the maintenance personnel information corresponding to the failed interface.
  • the detection result is obtained, which solves the problems of low efficiency, cumbersome operation, high maintenance cost, and untimely warning in the northbound interface detection in the prior art. It can automate and intelligentize the northbound interface detection, and provide early warning for interface problems, improve maintenance efficiency, enable maintenance personnel to detect and locate faults more timely, accurately, and efficiently, and provide guarantees for quickly solving faults and improve the network. Management efficiency of management.
  • FIG. 1 is a flowchart of a method for automatically detecting a northbound interface according to an embodiment of the present invention
  • FIG. 2 is a flowchart of detailed processing of a northbound interface automatic detection method according to an embodiment of the present invention
  • FIG. 3 is a flowchart of detection analysis processing according to an embodiment of the present invention
  • FIG. 5 is a schematic structural diagram of a northbound interface automatic detecting device according to an embodiment of the present invention.
  • FIG. 6 is a schematic diagram of a northbound interface automatic detecting device according to an embodiment of the present invention.
  • the embodiment of the present invention provides a method and an apparatus for automatically detecting a northbound interface, and specifically, the embodiment of the present invention
  • a northbound interface automatic diagnostic analysis method and apparatus based on data comparison is provided, which includes the following processes: reading a list of interfaces in a configuration file, issuing a command invoked by an interface, returning result data by the interface, and then comparing the result data with a standard template. The data is compared and judged whether an interface is normal. After all interfaces are detected, the detection result is statistically analyzed, and the detection result is sent to the relevant maintenance personnel.
  • the above treatments all reflect the operations that require manual intervention, all of which are automated, demand-oriented, improve maintenance efficiency, enable maintenance personnel to detect and locate faults more timely, accurately, and efficiently, and provide fault resolution quickly.
  • the protection of the network management improves the management efficiency of the network management; and the northbound interface automatic detecting device of the embodiment of the invention has the advantages of simple structure, high reliability, simple implementation in practical applications, and practical application value.
  • the present invention will be further described in detail below in conjunction with the drawings and embodiments. It is understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
  • FIG. 1 is a flowchart of a method for automatically detecting a northbound interface according to an embodiment of the present invention. As shown in FIG. 1, a method for automatically detecting a northbound interface according to an embodiment of the present invention includes the following processing:
  • Step 101 Read a preset configuration file, and obtain a list of interfaces to be detected from the configuration file.
  • the configuration file includes a list of interfaces to be detected, and may further include maintenance personnel information corresponding to each interface to be detected.
  • Step 102 Send a call instruction to the interface in the interface to be detected, and receive the result data returned by the interface, and compare the result data returned by each interface with the preset standard template data to obtain all the interfaces to be detected. The detection result of the interface.
  • step 102 the implementation may be specifically implemented as follows:
  • Step 1 Send a call instruction to an interface in the list of interfaces to be detected
  • Step 2 Receive the result data returned by the interface, compare the result data returned by the interface with the standard template data, and obtain the detection result of the interface;
  • the result data returned by the interface is compared with the standard template data. If the result data returned by the interface is consistent with the standard template data, the detection result of the interface is determined to pass the detection, and the detection result is recorded, if the result data and the standard returned by the interface are If the template data is inconsistent, the detection result of the interface is determined to be unpassed, the detection result is recorded, and the number of rows in which the result data returned by the interface is inconsistent with the standard template data is recorded in the detection result.
  • Step 3 Repeat steps 1 and 2 until the detection result of all interfaces in the interface list to be detected is obtained. After performing step 102, the following processing can also be performed:
  • the detection result of all the interfaces in the detection interface list is analyzed, the pass rate of the current test is counted, and the overall detection result is sent to the corresponding maintenance personnel according to the maintenance personnel information in the configuration file, wherein the overall detection result includes: The time of detection, the pass rate of this test, the interface that the local test failed, and the maintenance personnel information corresponding to the failed interface.
  • Step 1 Read the configuration file to obtain the list of interfaces to be detected.
  • the configuration file is configured with the list of interfaces to be tested and the maintenance personnel corresponding to the interface. After the system is running, the configuration file is read first, and the list of interfaces to be detected is obtained.
  • Step 2 Send the command, call the interface: The system sends the command to invoke the interface, calls the first interface in the list of interfaces to be detected, saves the result returned by the interface, and then proceeds to step 3 for judgment analysis. After the execution of step 3 is completed, call other interfaces in the interface list one by one, and repeat steps 2 and 3 until the last interface is called.
  • Step 3 Compare and return the result returned by the interface with the standard template data: The system compares the returned result with the standard template data. If the data is consistent with the standard template data, the interface is considered to pass the test, and the test result is recorded; If the template data is inconsistent, the interface is considered to fail to pass, and the number of inconsistent lines in the result data is recorded. Member: After all interfaces have been tested, the system reads the test results and counts the pass rate of the test: the number of passes/tests, and then sends the overall test results to the relevant maintenance personnel, including the time and pass rate of the test. , the interface that does not pass, and the corresponding maintenance personnel.
  • FIG. 2 is a flowchart of detailed processing of the northbound interface automatic detecting method according to the embodiment of the present invention. As shown in FIG. 2, the following processing is included:
  • the system compares the result returned by the interface with the standard template data, analyzes whether the analysis is consistent, and records the detection and analysis result.
  • step S202 determining whether it is the last interface in the list of interfaces to be detected, and if yes, transferring the record to the current detection result; if not, proceeding to step S202 to start the call of the next interface;
  • FIG. 3 is a flowchart of detection and analysis processing according to an embodiment of the present invention. As shown in FIG. 3, the following processing is included:
  • S301 The system compares the result returned by the interface with the standard template data line by line.
  • the system considers that the interface is detected as pass, and saves the interface detection result to the result file.
  • the interface is not detected, the number of inconsistent lines in the result data and the maintenance personnel corresponding to the interface are saved to the result file.
  • FIG. 4 is a flowchart of sending a detection result according to an embodiment of the present invention, as shown in FIG. 4, including the following processing:
  • the pass rate of this test is counted: the number of passes detected / the total number of tests.
  • 5404 Send the test result to the relevant maintenance personnel, including the time, pass rate, interface that failed, and the corresponding maintenance personnel.
  • the embodiments of the present invention all reflect the operations that need manual intervention, all of which are automated, demand-oriented, improve maintenance efficiency, and enable maintenance personnel to discover and locate faults more timely, accurately, and efficiently, and provide faults for quick troubleshooting. Guarantee, improve the management effect of network management
  • the northbound interface automatic detecting device of the embodiment of the invention has the advantages of simple structure, high reliability, simple implementation in practical applications, and practical application value.
  • the northbound interface automatic detecting apparatus includes: a configuration information module 50, an obtaining module 52, an interface calling module 54, And the detecting module 56, each module of the embodiment of the present invention is described in detail below.
  • the configuration information module 50 is configured to save a preset configuration file.
  • the configuration file includes a list of interfaces to be detected, and may further include maintenance personnel information corresponding to each interface to be detected.
  • the obtaining module 52 is configured to read the configuration file from the configuration information module 50, and obtain a list of interfaces to be detected from the configuration file;
  • the interface invoking module 54 is configured to sequentially send a calling instruction to the interface in the interface to be detected list, and receive the result data returned by the interface;
  • the detecting module 56 is configured to compare the result data returned by each interface with the preset standard template data, and obtain the detection results of all the interfaces in the interface list to be detected.
  • the interface invoking module 54 is specifically configured to: send a calling instruction to an interface in the interface to be detected, receive the result data returned by the interface, and call the detecting module 56, and after the detecting module 56 completes, sequentially call the list of the interface to be detected. Other interfaces, until the last interface in the list of interfaces to be detected is called, wherein the detection module 56 is called after each interface is invoked; the detection module 56 is specifically configured to: compare the result data returned by an interface with the standard template data. The detection result of the interface is obtained, and the interface calling module 54 is called. After the interface calling module 54 is executed, the detection results of other interfaces in the interface to be detected are obtained in sequence, and the detection results of all the interfaces in the interface to be detected are obtained.
  • the interface calling module 54 is called after each detection result of the interface is acquired.
  • the detection module 56 returns the result of the interface.
  • the data is compared with the standard template data. If the result data returned by the interface is consistent with the standard template data, the detection result of the interface is determined to pass the detection, and the detection result is recorded. If the result data returned by the interface is inconsistent with the standard template data, the interface is determined.
  • the detection result is that the detection fails, the detection result is recorded, and the number of rows in which the result data returned by the interface is inconsistent with the standard template data is recorded in the detection result.
  • the northbound interface automatic detecting apparatus further includes: an analyzing module, configured to analyze the detection result of all the interfaces in the list of the interfaces to be detected, and calculate the passing rate of the current detecting, and according to the maintenance in the configuration file
  • the personnel information sends the overall test result to the corresponding maintenance personnel.
  • the overall test result includes: the time of the test, the pass rate of the test, the interface that failed the local test, and the maintenance personnel corresponding to the failed interface. information.
  • FIG. 6 is a schematic diagram of a northbound interface automatic detecting apparatus according to an embodiment of the present invention. As shown in FIG. 6, the method includes:
  • the flow control unit 60 is an overall process control module of the system, and the system flow unit 60 controls the sequence of execution of the system as follows: configuration information read-interface call-result analysis-detection result transmission.
  • the configuration information sheet is saved.
  • the configuration file is saved.
  • the configuration file is configured with the interface to be detected and the maintenance personnel corresponding to the interface. After the system is running, the configuration file is read first to obtain the list of interfaces to be detected.
  • the interface invoking unit 64 is set to invoke the command of the sending interface, call the first interface in the list of interfaces to be detected, record the result returned by the interface, and then transfer to the judgment analysis. After the execution is completed, the other interfaces in the interface list are called in turn until the last interface is called.
  • the detection and analysis unit 66 is configured to perform a comparison analysis, and compare the result returned by the calling interface with the standard template data. If the data is consistent with the standard template data, the interface is considered to pass the test. And the detection result is recorded. If the data is inconsistent with the standard template data, the interface is considered to fail to pass, and the number of inconsistent lines in the result data and the maintenance personnel corresponding to the interface are recorded.
  • the sending unit 68 is configured to read the detection result after the all interfaces are detected, and count the passing rate of the current detection: the number of detection passes/the total number of detections, and then send the overall detection result to the relevant maintenance personnel, including the current detection. Time, pass rate, and interfaces that do not pass, corresponding maintenance personnel.
  • FIG. 2 is a flowchart of detailed processing of the northbound interface automatic detecting method according to the embodiment of the present invention. As shown in FIG. 2, the following processing is included:
  • the list of interfaces to be detected is first read from the configuration file of the configuration information sheet 62.
  • the interface invoking unit 64 calls an interface in the list of interfaces to be detected, and starts calling from the first interface.
  • the detection and analysis unit 66 compares the result returned by the interface with the standard template data, analyzes whether the analysis is consistent, and records the detection analysis result.
  • the interface invoking unit 64 determines whether it is the last interface in the list of interfaces to be detected, and if so, the transfer result transmitting unit 68 records the current detection result; if not, proceeds to step S202 to start the next interface. transfer;
  • FIG. 3 is a flowchart of detection and analysis processing according to an embodiment of the present invention. As shown in FIG. 3, the following processing is included:
  • the detection and analysis unit 66 compares the result returned by the interface with the standard template data line by line.
  • the detection analysis unit 66 determines whether the data is completely consistent with the standard template data.
  • the detection and analysis unit 66 considers that the interface is detected as passing, and saves the interface detection result to the result file. S304, if it is inconsistent with the standard template data, the detection and analysis unit 66 considers that the interface is detected as not passing, and saves the number of rows inconsistent in the result data and the maintenance personnel corresponding to the interface to the result file.
  • FIG. 4 is a flowchart of sending a detection result according to an embodiment of the present invention, as shown in FIG. 4, including the following processing:
  • the result transmitting unit 68 reads the detection results of all the interfaces from the detection result file.
  • the result sending unit 68 counts the pass rate of the current test: the number of detected passes/the total number of detections.
  • the result sending unit 68 records an interface that does not pass the statistical detection and the corresponding maintenance personnel. Measured time, pass rate, interface that does not pass, and corresponding maintenance personnel.
  • the embodiments of the present invention all reflect the operations that need manual intervention, all of which are automated, demand-oriented, improve maintenance efficiency, and enable maintenance personnel to discover and locate faults more timely, accurately, and efficiently, and provide faults for quick troubleshooting.
  • the protection of the network management is improved.
  • the northbound interface automatic detection device of the embodiment of the invention has the advantages of simple structure, high reliability, simple implementation in practical applications, and practical application value.
  • the invention compares the result data returned by the interface with the preset standard template data, and obtains the detection result, which solves the low efficiency, the cumbersome operation, the high maintenance cost and the unpredictable early warning in the northbound interface detection in the prior art.
  • the problem is that the northbound interface detection can be automated and intelligent, and the interface is pre-warned to improve the maintenance efficiency, so that the maintenance personnel can find and locate faults more timely, accurately, and efficiently, and provide guarantees for quickly solving faults.

Abstract

Disclosed is a method for automatically detecting a northbound interface. The method comprises: reading a preset configuration file, and obtaining an interface list to be detected from the configuration file; and sending an invocation instruction sequentially to an interface in the interface list to be detected, receiving result data returned by the interface, and comparing result data returned by each interface and preset standard template data separately, so as to obtain detection results of all interfaces in the interface list to be detected. Correspondingly, further disclosed is an apparatus for automatically detecting a northbound interface. With the technical solution of the present invention, automation and intellectualization of northbound interface detection can be implemented, and early warning is provided for an interface problem in advance, so as to improve the maintenance efficiency, so that maintenance personnel may discover and position a fault in a more timely, accurate, and efficient fashion, so as to provide guarantee for quickly solving the fault and improve management efficiency of network management.

Description

北向接口自动检测方法及装置 技术领域  North direction interface automatic detection method and device
本发明涉及移动通讯领域, 特别是涉及一种北向接口自动检测方法及 装置。 背景技术  The present invention relates to the field of mobile communications, and in particular, to a northbound interface automatic detection method and apparatus. Background technique
随着通讯行业的快速发展, 网络规模的不断扩大, 设备类型和数量的 快速增加, 具有全网监控、 管理和维护功能的通讯网管和北向接口系统的 应用也日益广泛, 北向接口系统是否稳定运行将会直接影响运营商的日常 维护以及客户满意度, 因此接口运行状态的检测分析是非常重要的一项工 作。  With the rapid development of the communication industry, the scale of the network continues to expand, the types and quantities of devices increase rapidly, and the applications of communication network management and northbound interface systems with network-wide monitoring, management, and maintenance functions are increasingly widespread, and whether the northbound interface system is stable. It will directly affect the operator's daily maintenance and customer satisfaction, so the detection and analysis of the interface operating status is a very important task.
目前, 北向接口检测方式主要通过手动查看日志及进程信息来进行, 不仅操作复杂、 效率低下、 维护成本高, 而且不具有及时性, 对于某功能 模块出现问题时, 只有调用到该功能接口时才会发现有异常, 不能提前发 现, 影响用户使用。 发明内容  At present, the northbound interface detection mode is mainly performed by manually checking the log and the process information, which is not only complicated in operation, low in efficiency, high in maintenance cost, but also not timely, and when a function module has a problem, only when the function interface is called It will be found that there is an abnormality that cannot be discovered in advance and affects the user's use. Summary of the invention
本发明实施例提供一种北向接口自动检测方法及装置, 以解决现有技 术中北向接口检测中存在的效率低、 操作繁瑣、 维护成本高、 预警不及时 的问题。  The embodiment of the invention provides a method and a device for automatically detecting a northbound interface, so as to solve the problems of low efficiency, cumbersome operation, high maintenance cost, and untimely warning in the northbound interface detection in the prior art.
本发明实施例提供一种北向接口自动检测方法, 包括:  The embodiment of the invention provides a method for automatically detecting a northbound interface, including:
读取预先设置的配置文件, 从配置文件中获取待检测接口列表; 依次向待检测接口列表中的接口发送调用指令, 并接收接口返回的结 果数据, 将每一个接口返回的结果数据分别与预先设置的标准模板数据进 行对比, 获取待检测接口列表中全部接口的检测结果。 Read a preset configuration file, obtain a list of interfaces to be detected from the configuration file, send a call instruction to the interface in the interface to be detected, and receive the result data returned by the interface, and respectively return the result data returned by each interface. Set the standard template data into Line comparison, obtain the detection results of all interfaces in the list of interfaces to be detected.
优选地, 依次向待检测接口列表中的接口发送调用指令, 并接收接口 返回的结果数据, 将每一个接口返回的结果数据分别与预先设置的标准模 板数据进行对比, 获取待检测接口列表中全部接口的检测结果具体包括: 步驟 1 , 向待检测接口列表中的某一接口发送调用指令;  Preferably, the call instruction is sent to the interface in the interface list to be detected, and the result data returned by the interface is received, and the result data returned by each interface is compared with the preset standard template data, and all the interfaces to be detected are obtained. The detection result of the interface specifically includes: Step 1: Send a call instruction to an interface in the list of interfaces to be detected;
步驟 2,接收接口返回的结果数据, 将接口返回的结果数据与标准模板 数据进行对比, 获取接口的检测结果;  Step 2: Receive the result data returned by the interface, compare the result data returned by the interface with the standard template data, and obtain the detection result of the interface;
步驟 3 , 重复执行步驟 1和步驟 2, 直到获取待检测接口列表中全部接 口的检测结果。  Step 3: Repeat steps 1 and 2 until the detection results of all interfaces in the interface list to be detected are obtained.
优选地, 将接口返回的结果数据与标准模板数据进行对比, 获取接口 的检测结果具体包括: 将接口返回的结果数据与标准模板数据进行对比, 如果接口返回的结果数据与标准模板数据一致, 则确定接口的检测结果为 通过检测, 记录检测结果, 如果接口返回的结果数据与标准模板数据不一 致, 则确定接口的检测结果为未通过检测, 记录检测结果, 并在检测结果 中记录接口返回的结果数据与标准模板数据不一致的行数。  Preferably, the result data returned by the interface is compared with the standard template data, and the detection result of the interface includes: comparing the result data returned by the interface with the standard template data, and if the result data returned by the interface is consistent with the standard template data, The detection result of the interface is determined by the detection, and the detection result is recorded. If the result data returned by the interface is inconsistent with the standard template data, the detection result of the interface is determined to be unpassed, the detection result is recorded, and the result returned by the interface is recorded in the detection result. The number of rows in which the data is inconsistent with the standard template data.
优选地, 配置文件还包括: 每个待检测接口所对应的维护人员信息。 优选地, 获取待检测接口列表中全部接口的检测结果之后, 方法还包 括:  Preferably, the configuration file further includes: maintenance personnel information corresponding to each interface to be detected. Preferably, after obtaining the detection result of all interfaces in the interface to be detected, the method further includes:
对待检测接口列表中全部接口的检测结果进行分析, 统计本次检测的 通过率, 并根据配置文件中的维护人员信息将整体检测结果发送给相应的 维护人员, 其中, 整体检测结果包括: 本次检测的时间、 本次检测的通过 率、 本地检测未通过的接口、 以及未通过的接口所对应的维护人员信息。  The detection result of all the interfaces in the detection interface list is analyzed, the pass rate of the current test is counted, and the overall detection result is sent to the corresponding maintenance personnel according to the maintenance personnel information in the configuration file, wherein the overall detection result includes: The time of detection, the pass rate of this test, the interface that the local test failed, and the maintenance personnel information corresponding to the failed interface.
本发明实施例还提供了一种北向接口自动检测装置, 包括:  The embodiment of the invention further provides an automatic detection device for the northbound interface, comprising:
配置信息模块, 设置为保存预先设置的配置文件;  a configuration information module, configured to save a preset configuration file;
获取模块, 设置为从配置信息模块中读取配置文件, 从配置文件中获 取待检测接口列表; Get module, set to read the configuration file from the configuration information module, get from the configuration file Take a list of detection interfaces;
接口调用模块, 设置为依次向待检测接口列表中的接口发送调用指令, 并接收接口返回的结果数据;  The interface calling module is configured to send a call instruction to the interface in the list of interfaces to be detected, and receive the result data returned by the interface;
检测模块, 设置为将每一个接口返回的结果数据分别与预先设置的标 准模板数据进行对比, 获取待检测接口列表中全部接口的检测结果。  The detection module is configured to compare the result data returned by each interface with the preset standard template data, and obtain detection results of all interfaces in the interface list to be detected.
优选地, 接口调用模块具体设置为: 向待检测接口列表中的某一接口 发送调用指令, 接收接口返回的结果数据, 调用检测模块, 在检测模块执 行完毕后, 依次调用待检测接口列表中的其他接口, 直到待检测接口列表 中的最后一个接口调用完毕, 其中, 每调用一个接口后均调用检测模块; 检测模块具体设置为: 将某一接口返回的结果数据与标准模板数据进 行对比, 获取该接口的检测结果, 调用接口调用模块, 在接口调用模块执 行完毕后, 依次获取待检测接口列表中的其他接口的检测结果, 直到获取 待检测接口列表中全部接口的检测结果, 其中, 每获取一个接口的检测结 果后均调用接口调用模块。  Preferably, the interface calling module is specifically configured to: send a calling instruction to an interface in the interface to be detected, receive the result data returned by the interface, invoke the detecting module, and after the detecting module completes, sequentially call the list of the interface to be detected. Other interfaces, until the last interface in the list of interfaces to be detected is called, wherein the detection module is called after each interface is called; the detection module is specifically set to: compare the result data returned by an interface with the standard template data, and obtain The detection result of the interface, the calling interface calling module, after the execution of the interface calling module, the detection results of the other interfaces in the interface to be detected are obtained, and the detection results of all the interfaces in the interface to be detected are obtained, where each acquisition is obtained. The interface call module is called after the detection result of an interface.
优选地, 检测模块具体设置为: 将接口返回的结果数据与标准模板数 据进行对比, 如果接口返回的结果数据与标准模板数据一致, 则确定接口 的检测结果为通过检测, 记录检测结果, 如果接口返回的结果数据与标准 模板数据不一致, 则确定接口的检测结果为未通过检测, 记录检测结果, 并在检测结果中记录接口返回的结果数据与标准模板数据不一致的行数。  Preferably, the detecting module is specifically configured to: compare the result data returned by the interface with the standard template data, and if the result data returned by the interface is consistent with the standard template data, determine that the detection result of the interface is to pass the detection, and the detection result is recorded, if the interface If the returned result data is inconsistent with the standard template data, the detection result of the interface is determined to be unpassed, the detection result is recorded, and the number of rows in which the result data returned by the interface is inconsistent with the standard template data is recorded in the detection result.
优选地, 配置文件还包括: 每个待检测接口所对应的维护人员信息。 优选地, 上述装置还包括: 分析模块, 设置为对待检测接口列表中全 部接口的检测结果进行分析, 统计本次检测的通过率, 并根据配置文件中 的维护人员信息将整体检测结果发送给相应的维护人员, 其中, 整体检测 结果包括: 本次检测的时间、 本次检测的通过率、 本地检测未通过的接口、 以及未通过的接口所对应的维护人员信息。 本发明有益效果如下: Preferably, the configuration file further includes: maintenance personnel information corresponding to each interface to be detected. Preferably, the device further includes: an analysis module, configured to analyze the detection result of all the interfaces in the list of the interfaces to be detected, calculate the pass rate of the current test, and send the overall detection result to the corresponding according to the maintenance personnel information in the configuration file. The maintenance personnel, wherein the overall test results include: the time of the test, the pass rate of the test, the interface that the local test failed, and the maintenance personnel information corresponding to the failed interface. The beneficial effects of the present invention are as follows:
通过将接口返回的结果数据分别与预先设置的标准模板数据进行对 比, 获取检测结果, 解决了现有技术中北向接口检测中存在的效率低、 操 作繁瑣、 维护成本高、 预警不及时的问题, 能够实现北向接口检测的自动 化、 智能化, 并针对接口的问题提前预警, 提高了维护效率, 使维护人员 可以更及时、 准确、 高效的发现、 定位故障, 为快速解决故障提供保障, 提高了网络管理的管理效率。 附图说明  By comparing the result data returned by the interface with the preset standard template data, the detection result is obtained, which solves the problems of low efficiency, cumbersome operation, high maintenance cost, and untimely warning in the northbound interface detection in the prior art. It can automate and intelligentize the northbound interface detection, and provide early warning for interface problems, improve maintenance efficiency, enable maintenance personnel to detect and locate faults more timely, accurately, and efficiently, and provide guarantees for quickly solving faults and improve the network. Management efficiency of management. DRAWINGS
图 1是本发明实施例的北向接口自动检测方法的流程图;  1 is a flowchart of a method for automatically detecting a northbound interface according to an embodiment of the present invention;
图 2是本发明实施例的北向接口自动检测方法的详细处理的流程图; 图 3是本发明实施例的检测分析处理的流程图;  2 is a flowchart of detailed processing of a northbound interface automatic detection method according to an embodiment of the present invention; FIG. 3 is a flowchart of detection analysis processing according to an embodiment of the present invention;
图 4是本发明实施例的检测结果发送的流程图;  4 is a flowchart of sending a detection result according to an embodiment of the present invention;
图 5是本发明实施例的北向接口自动检测装置的结构示意图; 图 6是本发明实施例的北向接口自动检测装置的优选示意图。 具体实施方式  5 is a schematic structural diagram of a northbound interface automatic detecting device according to an embodiment of the present invention; and FIG. 6 is a schematic diagram of a northbound interface automatic detecting device according to an embodiment of the present invention. detailed description
为了解决现有技术中北向接口检测存在的效率低、 操作繁瑣、 维护成 本高、 预警不及时的问题, 本发明实施例提供了一种北向接口自动检测方 法及装置, 具体地, 本发明实施例提供了一种基于数据比对的北向接口自 动诊断分析方法和装置, 包括如下处理: 读取配置文件中的接口列表, 下 发接口调用的命令, 接口返回结果数据, 然后将结果数据与标准模板数据 进行比对, 判断分析某接口是否正常, 待所有接口检测完毕后, 统计检测 结果, 并将检测结果发送给相关维护人员。 上述处理将原本需要人工干预 的操作, 全部体现为自动化方式, 以需求为导向, 提高了维护效率, 使维 护人员可以更及时、 准确、 高效的发现、 定位故障, 为快速解决故障提供 的保障, 提高了网络管理的管理效率; 而且本发明实施例的北向接口自动 检测装置的结构简单, 可靠性高, 在实际应用中实施简单, 具有实际应用 价值。 以下结合附图以及实施例, 对本发明进行进一步详细说明。 应当理 解, 此处所描述的具体实施例仅仅用以解释本发明, 并不限定本发明。 In order to solve the problem that the northbound interface detection in the prior art is low in efficiency, cumbersome in operation, high in maintenance cost, and unpredictable in time, the embodiment of the present invention provides a method and an apparatus for automatically detecting a northbound interface, and specifically, the embodiment of the present invention A northbound interface automatic diagnostic analysis method and apparatus based on data comparison is provided, which includes the following processes: reading a list of interfaces in a configuration file, issuing a command invoked by an interface, returning result data by the interface, and then comparing the result data with a standard template. The data is compared and judged whether an interface is normal. After all interfaces are detected, the detection result is statistically analyzed, and the detection result is sent to the relevant maintenance personnel. The above treatments all reflect the operations that require manual intervention, all of which are automated, demand-oriented, improve maintenance efficiency, enable maintenance personnel to detect and locate faults more timely, accurately, and efficiently, and provide fault resolution quickly. The protection of the network management improves the management efficiency of the network management; and the northbound interface automatic detecting device of the embodiment of the invention has the advantages of simple structure, high reliability, simple implementation in practical applications, and practical application value. The present invention will be further described in detail below in conjunction with the drawings and embodiments. It is understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
方法实施例  Method embodiment
图 1是本发明实施例的北向接口自动检测方法的流程图, 如图 1所示, 根据本发明实施例的北向接口自动检测方法包括如下处理:  1 is a flowchart of a method for automatically detecting a northbound interface according to an embodiment of the present invention. As shown in FIG. 1, a method for automatically detecting a northbound interface according to an embodiment of the present invention includes the following processing:
步驟 101 ,读取预先设置的配置文件,从配置文件中获取待检测接口列 表;  Step 101: Read a preset configuration file, and obtain a list of interfaces to be detected from the configuration file.
具体地, 在本发明实施例中, 配置文件中包括待检测接口列表, 还可 以包括每个待检测接口所对应的维护人员信息。  Specifically, in the embodiment of the present invention, the configuration file includes a list of interfaces to be detected, and may further include maintenance personnel information corresponding to each interface to be detected.
步驟 102 ,依次向待检测接口列表中的接口发送调用指令, 并接收接口 返回的结果数据, 将每一个接口返回的结果数据分别与预先设置的标准模 板数据进行对比, 获取待检测接口列表中全部接口的检测结果。  Step 102: Send a call instruction to the interface in the interface to be detected, and receive the result data returned by the interface, and compare the result data returned by each interface with the preset standard template data to obtain all the interfaces to be detected. The detection result of the interface.
在步驟 102中, 具体可以采用如下方式实现:  In step 102, the implementation may be specifically implemented as follows:
步驟 1 , 向待检测接口列表中的某一接口发送调用指令;  Step 1: Send a call instruction to an interface in the list of interfaces to be detected;
步驟 2,接收接口返回的结果数据, 将接口返回的结果数据与标准模板 数据进行对比, 获取接口的检测结果;  Step 2: Receive the result data returned by the interface, compare the result data returned by the interface with the standard template data, and obtain the detection result of the interface;
具体地, 将接口返回的结果数据与标准模板数据进行对比, 如果接口 返回的结果数据与标准模板数据一致, 则确定接口的检测结果为通过检测, 记录检测结果, 如果接口返回的结果数据与标准模板数据不一致, 则确定 接口的检测结果为未通过检测, 记录检测结果, 并在检测结果中记录接口 返回的结果数据与标准模板数据不一致的行数。  Specifically, the result data returned by the interface is compared with the standard template data. If the result data returned by the interface is consistent with the standard template data, the detection result of the interface is determined to pass the detection, and the detection result is recorded, if the result data and the standard returned by the interface are If the template data is inconsistent, the detection result of the interface is determined to be unpassed, the detection result is recorded, and the number of rows in which the result data returned by the interface is inconsistent with the standard template data is recorded in the detection result.
步驟 3 , 重复执行步驟 1和步驟 2, 直到获取待检测接口列表中全部接 口的检测结果。 在执行了步驟 102之后 , 还可以进行如下处理: Step 3: Repeat steps 1 and 2 until the detection result of all interfaces in the interface list to be detected is obtained. After performing step 102, the following processing can also be performed:
对待检测接口列表中全部接口的检测结果进行分析, 统计本次检测的 通过率, 并根据配置文件中的维护人员信息将整体检测结果发送给相应的 维护人员, 其中, 整体检测结果包括: 本次检测的时间、 本次检测的通过 率、 本地检测未通过的接口、 以及未通过的接口所对应的维护人员信息。  The detection result of all the interfaces in the detection interface list is analyzed, the pass rate of the current test is counted, and the overall detection result is sent to the corresponding maintenance personnel according to the maintenance personnel information in the configuration file, wherein the overall detection result includes: The time of detection, the pass rate of this test, the interface that the local test failed, and the maintenance personnel information corresponding to the failed interface.
以下对本发明实施例的上述技术方案进行详细的说明。  The above technical solutions of the embodiments of the present invention are described in detail below.
步驟 1 , 读取配置文件, 获取待检测接口列表: 配置文件中配置好待检 测接口列表以及接口对应的维护人员, 系统运行后会首先读取该配置文件, 获取到待检测接口列表。  Step 1: Read the configuration file to obtain the list of interfaces to be detected. The configuration file is configured with the list of interfaces to be tested and the maintenance personnel corresponding to the interface. After the system is running, the configuration file is read first, and the list of interfaces to be detected is obtained.
步驟 2, 下发命令, 调用接口: 系统下发调用接口的命令, 调用待检测 接口列表中的第一个接口, 保存接口返回的结果, 然后转入步驟 3 进行判 断分析。 待步驟 3执行完毕后, 依次调用接口列表中的其他接口, 重复步 驟 2和步驟 3 , 直至最后一个接口调用完毕。  Step 2: Send the command, call the interface: The system sends the command to invoke the interface, calls the first interface in the list of interfaces to be detected, saves the result returned by the interface, and then proceeds to step 3 for judgment analysis. After the execution of step 3 is completed, call other interfaces in the interface list one by one, and repeat steps 2 and 3 until the last interface is called.
步驟 3, 将接口返回的结果与标准模板数据进行比较分析: 系统将返回 的结果与标准模板数据做比较, 如果与标准模板数据一致, 则认为该接口 检测通过, 并记录检测结果; 如果与标准模板数据不一致, 则认为该接口 检测不通过, 并记录结果数据中不一致的行数。 员: 待全部接口检测完毕后, 系统读取检测结果, 统计本次检测的通过率: 检测通过数 /检测总数, 然后将整体检测结果发送给相关维护人员, 含有本 次检测的时间、 通过率、 不通过的接口及对应的维护人员。  Step 3: Compare and return the result returned by the interface with the standard template data: The system compares the returned result with the standard template data. If the data is consistent with the standard template data, the interface is considered to pass the test, and the test result is recorded; If the template data is inconsistent, the interface is considered to fail to pass, and the number of inconsistent lines in the result data is recorded. Member: After all interfaces have been tested, the system reads the test results and counts the pass rate of the test: the number of passes/tests, and then sends the overall test results to the relevant maintenance personnel, including the time and pass rate of the test. , the interface that does not pass, and the corresponding maintenance personnel.
以下结合附图对本发明实施例的技术方案进行详细的说明。  The technical solutions of the embodiments of the present invention are described in detail below with reference to the accompanying drawings.
图 2是本发明实施例的北向接口自动检测方法的详细处理的流程图, 如图 2所示, 包括如下处理:  FIG. 2 is a flowchart of detailed processing of the northbound interface automatic detecting method according to the embodiment of the present invention. As shown in FIG. 2, the following processing is included:
S201 , 系统启动后, 首先从配置文件中读取待检测接口列表。 5202 , 系统调用待检测接口列表中的接口, 从第一个接口开始调用。S201. After the system is started, first read the list of interfaces to be detected from the configuration file. 5202. The system calls an interface in the list of interfaces to be detected, and starts from the first interface.
5203 , 系统将接口返回的结果与标准模板数据作比对, 分析是否一致, 并记录检测分析结果。 5203. The system compares the result returned by the interface with the standard template data, analyzes whether the analysis is consistent, and records the detection and analysis result.
5204, 判断是否是待检测接口列表中的最后一个接口, 如果是, 则转 入记录本次检测结果; 如果不是, 则继续转入 S202步驟, 开始下一个接口 的调用;  5204, determining whether it is the last interface in the list of interfaces to be detected, and if yes, transferring the record to the current detection result; if not, proceeding to step S202 to start the call of the next interface;
5205 , 记录检测结果。  5205, record the test results.
图 3是本发明实施例的检测分析处理的流程图, 如图 3所示, 包括如 下处理:  FIG. 3 is a flowchart of detection and analysis processing according to an embodiment of the present invention. As shown in FIG. 3, the following processing is included:
S301, 系统将接口返回的结果与标准模板数据进行逐行比对。  S301: The system compares the result returned by the interface with the standard template data line by line.
5302 , 判断与标准模板数据是否完全一致。  5302. Determine whether the data is identical to the standard template data.
5303 , 如果与标准模板数据一致, 系统认为该接口检测为通过, 将该 接口检测结果保存至结果文件中。  5303. If the data is consistent with the standard template data, the system considers that the interface is detected as pass, and saves the interface detection result to the result file.
5304, 如果与标准模板数据不一致, 认为该接口检测为不通过, 将结 果数据中不一致的行数以及接口对应的维护人员保存至结果文件中。  If the interface is not detected, the number of inconsistent lines in the result data and the maintenance personnel corresponding to the interface are saved to the result file.
图 4是本发明实施例的检测结果发送的流程图, 如图 4所示, 包括如 下处理:  FIG. 4 is a flowchart of sending a detection result according to an embodiment of the present invention, as shown in FIG. 4, including the following processing:
S401, 从检测结果文件中读取所有接口的检测结果。  S401. Read the detection result of all interfaces from the detection result file.
5402 , 统计本次检测的通过率: 检测通过数 /检测总数。  5402, the pass rate of this test is counted: the number of passes detected / the total number of tests.
5403 , 记录统计检测不通过的接口及对应的维护人员。  5403. Record the interface that the statistical test fails and the corresponding maintenance personnel.
5404, 将检测结果发送给相关维护人员, 含有本次检测的时间、 通过 率、 不通过的接口及对应的维护人员。  5404: Send the test result to the relevant maintenance personnel, including the time, pass rate, interface that failed, and the corresponding maintenance personnel.
本发明实施例将原本需要人工干预的操作, 全部体现为自动化方式, 以需求为导向, 提高了维护效率, 使维护人员可以更及时、 准确、 高效的 发现、 定位故障, 为快速解决故障提供的保障, 提高了网络管理的管理效 率; 而且本发明实施例的北向接口自动检测装置的结构简单, 可靠性高, 在实际应用中实施简单, 具有实际应用价值。 The embodiments of the present invention all reflect the operations that need manual intervention, all of which are automated, demand-oriented, improve maintenance efficiency, and enable maintenance personnel to discover and locate faults more timely, accurately, and efficiently, and provide faults for quick troubleshooting. Guarantee, improve the management effect of network management The northbound interface automatic detecting device of the embodiment of the invention has the advantages of simple structure, high reliability, simple implementation in practical applications, and practical application value.
装置实施例  Device embodiment
图 5是本发明实施例的北向接口自动检测装置的结构示意图, 如图 5 所示,根据本发明实施例的北向接口自动检测装置包括: 配置信息模块 50、 获取模块 52、 接口调用模块 54、 以及检测模块 56, 以下对本发明实施例的 各个模块进行详细的说明。  5 is a schematic structural diagram of a northbound interface automatic detecting apparatus according to an embodiment of the present invention. As shown in FIG. 5, the northbound interface automatic detecting apparatus according to the embodiment of the present invention includes: a configuration information module 50, an obtaining module 52, an interface calling module 54, And the detecting module 56, each module of the embodiment of the present invention is described in detail below.
配置信息模块 50, 设置为保存预先设置的配置文件; 具体地, 在本发 明实施例中, 配置文件中包括待检测接口列表, 还可以包括每个待检测接 口所对应的维护人员信息。  The configuration information module 50 is configured to save a preset configuration file. Specifically, in the embodiment of the present invention, the configuration file includes a list of interfaces to be detected, and may further include maintenance personnel information corresponding to each interface to be detected.
获取模块 52 ,设置为从配置信息模块 50中读取配置文件,从配置文件 中获取待检测接口列表;  The obtaining module 52 is configured to read the configuration file from the configuration information module 50, and obtain a list of interfaces to be detected from the configuration file;
接口调用模块 54, 设置为依次向待检测接口列表中的接口发送调用指 令, 并接收接口返回的结果数据;  The interface invoking module 54 is configured to sequentially send a calling instruction to the interface in the interface to be detected list, and receive the result data returned by the interface;
检测模块 56 , 设置为将每一个接口返回的结果数据分别与预先设置的 标准模板数据进行对比, 获取待检测接口列表中全部接口的检测结果。  The detecting module 56 is configured to compare the result data returned by each interface with the preset standard template data, and obtain the detection results of all the interfaces in the interface list to be detected.
接口调用模块 54具体设置为: 向待检测接口列表中的某一接口发送调 用指令, 接收接口返回的结果数据, 调用检测模块 56, 在检测模块 56执行 完毕后, 依次调用待检测接口列表中的其他接口, 直到待检测接口列表中 的最后一个接口调用完毕, 其中, 每调用一个接口后均调用检测模块 56; 检测模块 56具体设置为: 将某一接口返回的结果数据与标准模板数据 进行对比, 获取该接口的检测结果, 调用接口调用模块 54 , 在接口调用模 块 54执行完毕后, 依次获取待检测接口列表中的其他接口的检测结果, 直 到获取待检测接口列表中全部接口的检测结果, 其中, 每获取一个接口的 检测结果后均调用接口调用模块 54。 其中,检测模块 56将接口返回的结果 数据与标准模板数据进行对比, 如果接口返回的结果数据与标准模板数据 一致, 则确定接口的检测结果为通过检测, 记录检测结果, 如果接口返回 的结果数据与标准模板数据不一致, 则确定接口的检测结果为未通过检测, 记录检测结果, 并在检测结果中记录接口返回的结果数据与标准模板数据 不一致的行数。 The interface invoking module 54 is specifically configured to: send a calling instruction to an interface in the interface to be detected, receive the result data returned by the interface, and call the detecting module 56, and after the detecting module 56 completes, sequentially call the list of the interface to be detected. Other interfaces, until the last interface in the list of interfaces to be detected is called, wherein the detection module 56 is called after each interface is invoked; the detection module 56 is specifically configured to: compare the result data returned by an interface with the standard template data. The detection result of the interface is obtained, and the interface calling module 54 is called. After the interface calling module 54 is executed, the detection results of other interfaces in the interface to be detected are obtained in sequence, and the detection results of all the interfaces in the interface to be detected are obtained. The interface calling module 54 is called after each detection result of the interface is acquired. Wherein, the detection module 56 returns the result of the interface. The data is compared with the standard template data. If the result data returned by the interface is consistent with the standard template data, the detection result of the interface is determined to pass the detection, and the detection result is recorded. If the result data returned by the interface is inconsistent with the standard template data, the interface is determined. The detection result is that the detection fails, the detection result is recorded, and the number of rows in which the result data returned by the interface is inconsistent with the standard template data is recorded in the detection result.
优选地, 根据本发明实施例的北向接口自动检测装置还包括: 分析模 块, 设置为对待检测接口列表中全部接口的检测结果进行分析, 统计本次 检测的通过率, 并根据配置文件中的维护人员信息将整体检测结果发送给 相应的维护人员, 其中, 整体检测结果包括: 本次检测的时间、 本次检测 的通过率、 本地检测未通过的接口、 以及未通过的接口所对应的维护人员 信息。  Preferably, the northbound interface automatic detecting apparatus according to the embodiment of the present invention further includes: an analyzing module, configured to analyze the detection result of all the interfaces in the list of the interfaces to be detected, and calculate the passing rate of the current detecting, and according to the maintenance in the configuration file The personnel information sends the overall test result to the corresponding maintenance personnel. The overall test result includes: the time of the test, the pass rate of the test, the interface that failed the local test, and the maintenance personnel corresponding to the failed interface. information.
以下结合附图, 对本发明实施例的上述技术方案进行详细说明。  The above technical solutions of the embodiments of the present invention are described in detail below with reference to the accompanying drawings.
图 6是本发明实施例的北向接口自动检测装置的优选示意图, 如图 6 所示, 包括:  FIG. 6 is a schematic diagram of a northbound interface automatic detecting apparatus according to an embodiment of the present invention. As shown in FIG. 6, the method includes:
流程控制单元 60, 为系统的整体流程控制模块, 系统流程单元 60控制 本系统执行的流程顺序为: 配置信息读取-接口调用 -结果分析 -检测结果发 送。  The flow control unit 60 is an overall process control module of the system, and the system flow unit 60 controls the sequence of execution of the system as follows: configuration information read-interface call-result analysis-detection result transmission.
配置信息单 62, 保存有配置文件, 配置文件中配置好待检测接口列表 以及接口对应的维护人员, 本系统运行后会首先读取该配置文件, 获取到 待检测接口列表。  The configuration information sheet is saved. The configuration file is saved. The configuration file is configured with the interface to be detected and the maintenance personnel corresponding to the interface. After the system is running, the configuration file is read first to obtain the list of interfaces to be detected.
接口调用单元 64, 设置为下发接口调用命令, 调用待检测接口列表中 的第一个接口, 记录接口返回的结果, 然后转入判断分析。 执行完毕后, 依次调用接口列表中的其他接口, 直至最后一个接口调用完毕。  The interface invoking unit 64 is set to invoke the command of the sending interface, call the first interface in the list of interfaces to be detected, record the result returned by the interface, and then transfer to the judgment analysis. After the execution is completed, the other interfaces in the interface list are called in turn until the last interface is called.
检测分析单元 66, 设置为执行比较分析, 将调用接口返回的结果与标 准模板数据做比较, 如果与标准模板数据一致, 则认为该接口检测通过, 并记录检测结果; 如果与标准模板数据不一致, 则认为该接口检测不通过, 并记录结果数据中不一致的行数以及接口对应的维护人员。 The detection and analysis unit 66 is configured to perform a comparison analysis, and compare the result returned by the calling interface with the standard template data. If the data is consistent with the standard template data, the interface is considered to pass the test. And the detection result is recorded. If the data is inconsistent with the standard template data, the interface is considered to fail to pass, and the number of inconsistent lines in the result data and the maintenance personnel corresponding to the interface are recorded.
结果发送单元 68, 设置为待全部接口检测完毕后, 读取检测结果, 统 计本次检测的通过率: 检测通过数 /检测总数, 然后将整体检测结果发送给 相关维护人员, 含有本次检测的时间、 通过率以及不通过的接口、 对应的 维护人员。  The sending unit 68 is configured to read the detection result after the all interfaces are detected, and count the passing rate of the current detection: the number of detection passes/the total number of detections, and then send the overall detection result to the relevant maintenance personnel, including the current detection. Time, pass rate, and interfaces that do not pass, corresponding maintenance personnel.
图 2是本发明实施例的北向接口自动检测方法的详细处理的流程图, 如图 2所示, 包括如下处理:  FIG. 2 is a flowchart of detailed processing of the northbound interface automatic detecting method according to the embodiment of the present invention. As shown in FIG. 2, the following processing is included:
5201 , 在流程控制单元 60的控制下, 系统启动后, 首先从配置信息单 62的配置文件中读取待检测接口列表。  5201. Under the control of the flow control unit 60, after the system is started, the list of interfaces to be detected is first read from the configuration file of the configuration information sheet 62.
5202 , 接口调用单元 64调用待检测接口列表中的接口, 从第一个接口 开始调用。  5202, the interface invoking unit 64 calls an interface in the list of interfaces to be detected, and starts calling from the first interface.
5203 , 检测分析单元 66将接口返回的结果与标准模板数据作比对, 分 析是否一致, 并记录检测分析结果。  5203. The detection and analysis unit 66 compares the result returned by the interface with the standard template data, analyzes whether the analysis is consistent, and records the detection analysis result.
S204,接口调用单元 64判断是否是待检测接口列表中的最后一个接口, 如果是, 则转入结果发送单元 68记录本次检测结果; 如果不是, 则继续转 入 S202步驟, 开始下一个接口的调用;  S204, the interface invoking unit 64 determines whether it is the last interface in the list of interfaces to be detected, and if so, the transfer result transmitting unit 68 records the current detection result; if not, proceeds to step S202 to start the next interface. transfer;
S205 , 记录检测结果。  S205, recording the detection result.
图 3是本发明实施例的检测分析处理的流程图, 如图 3所示, 包括如 下处理:  FIG. 3 is a flowchart of detection and analysis processing according to an embodiment of the present invention. As shown in FIG. 3, the following processing is included:
5301 ,检测分析单元 66将接口返回的结果与标准模板数据进行逐行比 对。  5301. The detection and analysis unit 66 compares the result returned by the interface with the standard template data line by line.
5302 , 检测分析单元 66判断与标准模板数据是否完全一致。  5302. The detection analysis unit 66 determines whether the data is completely consistent with the standard template data.
5303 , 如果与标准模板数据一致, 检测分析单元 66认为该接口检测为 通过, 将该接口检测结果保存至结果文件中。 S304, 如果与标准模板数据不一致, 检测分析单元 66认为该接口检测 为不通过, 将结果数据中不一致的行数以及接口对应的维护人员保存至结 果文件中。 5303. If it is consistent with the standard template data, the detection and analysis unit 66 considers that the interface is detected as passing, and saves the interface detection result to the result file. S304, if it is inconsistent with the standard template data, the detection and analysis unit 66 considers that the interface is detected as not passing, and saves the number of rows inconsistent in the result data and the maintenance personnel corresponding to the interface to the result file.
图 4是本发明实施例的检测结果发送的流程图, 如图 4所示, 包括如 下处理:  FIG. 4 is a flowchart of sending a detection result according to an embodiment of the present invention, as shown in FIG. 4, including the following processing:
5401 , 结果发送单元 68从检测结果文件中读取所有接口的检测结果。 5401. The result transmitting unit 68 reads the detection results of all the interfaces from the detection result file.
5402 ,结果发送单元 68统计本次检测的通过率:检测通过数 /检测总数。5402. The result sending unit 68 counts the pass rate of the current test: the number of detected passes/the total number of detections.
5403 ,结果发送单元 68记录统计检测不通过的接口及对应的维护人员。 测的时间、 通过率、 不通过的接口及对应的维护人员。 5403. The result sending unit 68 records an interface that does not pass the statistical detection and the corresponding maintenance personnel. Measured time, pass rate, interface that does not pass, and corresponding maintenance personnel.
本发明实施例将原本需要人工干预的操作, 全部体现为自动化方式, 以需求为导向, 提高了维护效率, 使维护人员可以更及时、 准确、 高效的 发现、 定位故障, 为快速解决故障提供的保障, 提高了网络管理的管理效 率; 而且本发明实施例的北向接口自动检测装置的结构简单, 可靠性高, 在实际应用中实施简单, 具有实际应用价值。  The embodiments of the present invention all reflect the operations that need manual intervention, all of which are automated, demand-oriented, improve maintenance efficiency, and enable maintenance personnel to discover and locate faults more timely, accurately, and efficiently, and provide faults for quick troubleshooting. The protection of the network management is improved. The northbound interface automatic detection device of the embodiment of the invention has the advantages of simple structure, high reliability, simple implementation in practical applications, and practical application value.
尽管为示例目的, 已经公开了本发明的优选实施例, 本领域的技术人 员将意识到各种改进、 增加和取代也是可能的, 因此, 本发明的范围应当 不限于上述实施例。 工业实用性  While the preferred embodiments of the present invention have been disclosed for purposes of illustration, those skilled in the art will recognize that various modifications, additions and substitutions are possible, and the scope of the invention should not be limited to the embodiments described above. Industrial applicability
本发明通过将接口返回的结果数据分别与预先设置的标准模板数据进 行对比, 获取检测结果, 解决了现有技术中北向接口检测中存在的效率低、 操作繁瑣、 维护成本高、 预警不及时的问题, 能够实现北向接口检测的自 动化、 智能化, 并针对接口的问题提前预警, 提高了维护效率, 使维护人 员可以更及时、 准确、 高效的发现、 定位故障, 为快速解决故障提供保障, 提高了网络管理的管理效率。  The invention compares the result data returned by the interface with the preset standard template data, and obtains the detection result, which solves the low efficiency, the cumbersome operation, the high maintenance cost and the unpredictable early warning in the northbound interface detection in the prior art. The problem is that the northbound interface detection can be automated and intelligent, and the interface is pre-warned to improve the maintenance efficiency, so that the maintenance personnel can find and locate faults more timely, accurately, and efficiently, and provide guarantees for quickly solving faults. The management efficiency of network management.

Claims

权利要求书 Claim
1、 一种北向接口自动检测方法, 其中, 该方法包括:  1. A northbound interface automatic detection method, wherein the method comprises:
读取预先设置的配置文件, 从所述配置文件中获取待检测接口列表; 依次向所述待检测接口列表中的接口发送调用指令, 并接收所述接口 返回的结果数据, 将每一个接口返回的所述结果数据分别与预先设置的标 准模板数据进行对比, 获取所述待检测接口列表中全部接口的检测结果。  Reading a preset configuration file, obtaining a list of interfaces to be detected from the configuration file; sequentially sending a call instruction to the interface in the interface to be detected, and receiving result data returned by the interface, and returning each interface The result data is compared with the preset standard template data, and the detection results of all the interfaces in the interface to be detected are obtained.
2、 如权利要求 1所述的方法, 其中, 所述依次向所述待检测接口列表 中的接口发送调用指令, 并接收所述接口返回的结果数据, 将每一个接口 返回的所述结果数据分别与预先设置的标准模板数据进行对比, 获取所述 待检测接口列表中全部接口的检测结果为:  2. The method according to claim 1, wherein the sequence sends a call instruction to an interface in the list of interfaces to be detected, and receives result data returned by the interface, and returns the result data of each interface. The detection result of all interfaces in the to-be-detected interface list is obtained by comparing with the preset standard template data:
步驟 1 , 向所述待检测接口列表中的某一接口发送调用指令;  Step 1: Send a call instruction to an interface in the list of interfaces to be detected;
步驟 2,接收所述接口返回的结果数据, 将所述接口返回的结果数据与 所述标准模板数据进行对比, 获取所述接口的检测结果;  Step 2: Receive result data returned by the interface, compare result data returned by the interface with the standard template data, and obtain a detection result of the interface.
步驟 3 , 重复执行步驟 1和步驟 2, 直到获取所述待检测接口列表中全 部接口的检测结果。  Step 3: Repeat steps 1 and 2 until the detection result of all the interfaces in the interface to be detected is obtained.
3、 如权利要求 2所述的方法, 其中, 将所述接口返回的结果数据与所 述标准模板数据进行对比, 获取所述接口的检测结果具体包括:  The method of claim 2, wherein comparing the result data returned by the interface with the standard template data, and obtaining the detection result of the interface specifically includes:
将所述接口返回的结果数据与所述标准模板数据进行对比, 所述接口 返回的结果数据与所述标准模板数据一致, 则确定所述接口的检测结果为 通过检测, 记录所述检测结果; 所述接口返回的结果数据与所述标准模板 数据不一致, 则确定所述接口的检测结果为未通过检测, 记录所述检测结 果, 并在所述检测结果中记录所述所述接口返回的结果数据与所述标准模 板数据不一致的行数。  The result data returned by the interface is compared with the standard template data, and the result data returned by the interface is consistent with the standard template data, and the detection result of the interface is determined to pass the detection, and the detection result is recorded; If the result data returned by the interface is inconsistent with the standard template data, the detection result of the interface is determined to be unpassed, the detection result is recorded, and the result returned by the interface is recorded in the detection result. The number of rows in which the data is inconsistent with the standard template data.
4、如权利要求 1至 3任一项所述的方法, 其中, 所述配置文件还包括: 每个待检测接口所对应的维护人员信息。 The method according to any one of claims 1 to 3, wherein the configuration file further includes: maintenance personnel information corresponding to each interface to be detected.
5、 如权利要求 4所述的方法, 其中, 获取所述待检测接口列表中全部 接口的检测结果之后, 该方法还包括: The method of claim 4, wherein after obtaining the detection result of all interfaces in the to-be-detected interface list, the method further includes:
对所述待检测接口列表中全部接口的检测结果进行分析, 统计本次检 测的通过率, 并根据所述配置文件中的所述维护人员信息将整体检测结果 发送给相应的维护人员, 其中, 所述整体检测结果包括: 本次检测的时间、 本次检测的通过率、 本地检测未通过的接口、 以及未通过的接口所对应的 维护人员信息。  The detection result of all the interfaces in the interface to be detected is analyzed, and the pass rate of the current test is counted, and the overall test result is sent to the corresponding maintenance personnel according to the maintenance personnel information in the configuration file, where The overall detection result includes: the time of the current detection, the passing rate of the current detection, the interface that the local detection fails, and the maintenance personnel information corresponding to the failed interface.
6、 一种北向接口自动检测装置, 其中, 该装置包括:  6. A northbound interface automatic detecting device, wherein the device comprises:
配置信息模块, 设置为保存预先设置的配置文件;  a configuration information module, configured to save a preset configuration file;
获取模块, 设置为从所述配置信息模块中读取所述配置文件, 从所述 配置文件中获取待检测接口列表;  An obtaining module, configured to read the configuration file from the configuration information module, and obtain a list of interfaces to be detected from the configuration file;
接口调用模块, 设置为依次向所述待检测接口列表中的接口发送调用 指令, 并接收所述接口返回的结果数据;  The interface calling module is configured to send a call instruction to the interface in the list of interfaces to be detected, and receive result data returned by the interface;
检测模块, 设置为将每一个接口返回的所述结果数据分别与预先设置 的标准模板数据进行对比, 获取所述待检测接口列表中全部接口的检测结 果。  The detecting module is configured to compare the result data returned by each interface with the preset standard template data, and obtain the detection result of all interfaces in the interface to be detected.
7、 如权利要求 6所述的装置, 其中,  7. The apparatus according to claim 6, wherein
所述接口调用模块具体设置为: 向所述待检测接口列表中的某一接口 发送调用指令, 接收所述接口返回的结果数据, 调用所述检测模块, 在所 述检测模块执行完毕后, 依次调用所述待检测接口列表中的其他接口, 直 到所述待检测接口列表中的最后一个接口调用完毕, 其中, 每调用一个接 口后均调用所述检测模块;  The interface calling module is specifically configured to: send a call instruction to an interface in the to-be-detected interface list, receive result data returned by the interface, invoke the detecting module, and after the detecting module finishes executing, sequentially Calling the other interface in the to-be-detected interface list, until the last interface in the to-be-detected interface list is called, where the detection module is called after each interface is called;
所述检测模块具体设置为: 将某一接口返回的所述结果数据与所述标 准模板数据进行对比, 获取该接口的检测结果, 调用所述接口调用模块, 在所述所述接口调用模块执行完毕后, 依次获取所述待检测接口列表中的 其他接口的检测结果, 直到获取所述待检测接口列表中全部接口的检测结 果, 其中, 每获取一个接口的检测结果后均调用所述接口调用模块。 The detecting module is specifically configured to: compare the result data returned by an interface with the standard template data, obtain a detection result of the interface, invoke the interface calling module, and execute the module in the interface After the completion, sequentially obtain the list of the interfaces to be detected. The detection result of the other interfaces is obtained until the detection result of all the interfaces in the interface to be detected is obtained, and the interface calling module is called after each detection result of the interface is acquired.
8、 如权利要求 7所述的装置, 其中, 所述检测模块具体设置为: 将接口返回的结果数据与所述标准模板数据进行对比, 所述接口返回 的结果数据与所述标准模板数据一致, 则确定所述接口的检测结果为通过 检测, 记录所述检测结果; 所述接口返回的结果数据与所述标准模板数据 不一致, 则确定所述接口的检测结果为未通过检测, 记录所述检测结果, 并在所述检测结果中记录所述所述接口返回的结果数据与所述标准模板数 据不一致的行数。  The device of claim 7, wherein the detecting module is specifically configured to: compare result data returned by the interface with the standard template data, and the result data returned by the interface is consistent with the standard template data. And determining, by the detection, that the detection result of the interface is that the detection result is recorded; if the result data returned by the interface is inconsistent with the standard template data, determining that the detection result of the interface is failing detection, and recording the And detecting a result, and recording, in the detection result, a number of rows in which the result data returned by the interface is inconsistent with the standard template data.
9、如权利要求 6至 8任一项所述的装置, 其中, 所述配置文件还包括: 每个待检测接口所对应的维护人员信息。  The device according to any one of claims 6 to 8, wherein the configuration file further comprises: maintenance personnel information corresponding to each interface to be detected.
10、 如权利要求 9所述的装置, 其中, 该装置还包括:  10. The device of claim 9, wherein the device further comprises:
分析模块, 设置为对所述待检测接口列表中全部接口的检测结果进行 分析, 统计本次检测的通过率, 并根据所述配置文件中的所述维护人员信 息将整体检测结果发送给相应的维护人员, 其中, 所述整体检测结果包括: 本次检测的时间、 本次检测的通过率、 本地检测未通过的接口、 以及未通 过的接口所对应的维护人员信息。  The analysis module is configured to analyze the detection result of all the interfaces in the interface to be detected, collect the pass rate of the current test, and send the overall detection result to the corresponding according to the maintenance personnel information in the configuration file. The maintenance personnel, wherein the overall detection result includes: the time of the current detection, the passing rate of the current detection, the interface that the local detection fails, and the maintenance personnel information corresponding to the failed interface.
PCT/CN2012/072363 2011-10-17 2012-03-15 Method and apparatus for automatically detecting northbound interface WO2012155632A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201110314093.1 2011-10-17
CN2011103140931A CN103051467A (en) 2011-10-17 2011-10-17 Automatic detecting method and device of northbound interface

Publications (1)

Publication Number Publication Date
WO2012155632A1 true WO2012155632A1 (en) 2012-11-22

Family

ID=47176239

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2012/072363 WO2012155632A1 (en) 2011-10-17 2012-03-15 Method and apparatus for automatically detecting northbound interface

Country Status (2)

Country Link
CN (1) CN103051467A (en)
WO (1) WO2012155632A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107741767A (en) * 2017-11-02 2018-02-27 郑州云海信息技术有限公司 A kind of board docking calculation, system and a kind of board the service of connection devices
CN109861842A (en) * 2018-11-23 2019-06-07 阿里巴巴集团控股有限公司 O&M method, apparatus, electronic equipment and the storage medium of server cluster

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5987633A (en) * 1997-08-20 1999-11-16 Mci Communications Corporation System, method and article of manufacture for time point validation
CN101001182A (en) * 2007-01-12 2007-07-18 中国电信股份有限公司 Adaptive test method and system of network management interface test
CN101145130A (en) * 2007-08-02 2008-03-19 中兴通讯股份有限公司 Simple network management protocol software test device and test method
CN101572632A (en) * 2009-03-04 2009-11-04 公安部第三研究所 Method for testing management end interface of information security management system
CN102104504A (en) * 2009-12-21 2011-06-22 中兴通讯股份有限公司 Platform and method for testing northbound interface

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US2987633A (en) * 1959-04-28 1961-06-06 Charles E Pallas Zero suppressed pulse stretcher
CN101212357B (en) * 2006-12-31 2010-09-15 亿阳信通股份有限公司 Interface testing method and device
CN100592691C (en) * 2007-01-10 2010-02-24 中国电信股份有限公司 Automatic comparison method and system for the consistency test of the network management interface information model
CN1997199B (en) * 2007-01-12 2011-05-11 中国电信股份有限公司 An integrated testing system and method for 3G network management interface

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5987633A (en) * 1997-08-20 1999-11-16 Mci Communications Corporation System, method and article of manufacture for time point validation
CN101001182A (en) * 2007-01-12 2007-07-18 中国电信股份有限公司 Adaptive test method and system of network management interface test
CN101145130A (en) * 2007-08-02 2008-03-19 中兴通讯股份有限公司 Simple network management protocol software test device and test method
CN101572632A (en) * 2009-03-04 2009-11-04 公安部第三研究所 Method for testing management end interface of information security management system
CN102104504A (en) * 2009-12-21 2011-06-22 中兴通讯股份有限公司 Platform and method for testing northbound interface

Also Published As

Publication number Publication date
CN103051467A (en) 2013-04-17

Similar Documents

Publication Publication Date Title
US20180107196A1 (en) Method of Detecting Home Appliance Bus Control System
CN102662828B (en) A kind of method and device realizing software automatic test
CN109361562B (en) Automatic testing method based on associated network equipment access
CN109408338B (en) Method, device, equipment and system for grabbing trace of NVME (network video management entity) hard disk
CN106485805A (en) A kind of pipeline inspection management method and system
WO2016045353A1 (en) Troubleshooting analysis method, device, system and storage medium
WO2016082543A1 (en) Device testing method and testing device
CN102999417B (en) Automatic test management system and method
CN106649043B (en) Automatic fault diagnosis method and system for operation and maintenance system
CN103077114A (en) Automatic testing method based on communication protocol of temperature measuring device
WO2012155632A1 (en) Method and apparatus for automatically detecting northbound interface
CN106055465A (en) Client error abnormal information statistical method
CN101706752B (en) Method and device for in-situ software error positioning
TWI638548B (en) Broadband subscriber lines malfunction testing system
CN116107794B (en) Ship software fault automatic diagnosis method, system and storage medium
CN103067101B (en) Communication terminal testing and monitoring method and device
CN112231157B (en) AI server HCA card performance test method and system based on hardware topology
CN111722997B (en) Abnormality detection method for automated test and computer-readable storage medium
WO2016127483A1 (en) Processing method and device for collection agent management subsystem
CN113360389A (en) Performance test method, device, equipment and storage medium
CN102591734A (en) Method and device for detecting reset type of system
CN108845932B (en) Unit testing method and device of network library, storage medium and terminal
TWI440355B (en) Subscriber lines testing system for the ltt/ag co-exist environment
CN115878477A (en) Error reporting information processing method, device, equipment and medium
CN104679618A (en) Test result integration system and method

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

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

Country of ref document: EP

Kind code of ref document: A1