[go: up one dir, main page]

CN110011875B - Dialing test method, device, equipment and computer-readable storage medium - Google Patents

Dialing test method, device, equipment and computer-readable storage medium Download PDF

Info

Publication number
CN110011875B
CN110011875B CN201910301699.8A CN201910301699A CN110011875B CN 110011875 B CN110011875 B CN 110011875B CN 201910301699 A CN201910301699 A CN 201910301699A CN 110011875 B CN110011875 B CN 110011875B
Authority
CN
China
Prior art keywords
dial
test
server
network
tested
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN201910301699.8A
Other languages
Chinese (zh)
Other versions
CN110011875A (en
Inventor
曹旭东
冯坤炎
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
WeBank Co Ltd
Original Assignee
WeBank Co Ltd
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 WeBank Co Ltd filed Critical WeBank Co Ltd
Priority to CN201910301699.8A priority Critical patent/CN110011875B/en
Publication of CN110011875A publication Critical patent/CN110011875A/en
Application granted granted Critical
Publication of CN110011875B publication Critical patent/CN110011875B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/448Execution paradigms, e.g. implementations of programming paradigms
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a dial testing method, a device, equipment and a computer readable storage medium, wherein the method comprises the following steps: calling a function module of an automation operation and maintenance tool (ansable) according to the network protocol type of the target network; based on the called functional module, sending a dial testing request to a server to be dial tested in the target network; and receiving dial testing resources corresponding to the dial testing requests returned by the server to be dial tested, and determining a dial testing result of the server to be dial tested according to the dial testing resources. The invention realizes the rapid construction of the dial testing platform, improves the dial testing monitoring efficiency, and avoids the problem of lower dial testing efficiency caused by the fact that business operation and maintenance personnel realize the dial testing function by developing codes.

Description

拨测方法、装置、设备及计算机可读存储介质Dialing test method, device, equipment and computer-readable storage medium

技术领域technical field

本发明涉及金融科技(Fintech)技术领域,尤其涉及一种拨测方法、装置、设备及计算机可读存储介质。The present invention relates to the technical field of financial technology (Fintech), in particular to a dial testing method, device, equipment and computer-readable storage medium.

背景技术Background technique

随着计算机技术的发展,越来越多的计算机技术被应用在金融领域,传统金融业正在逐步向金融科技(Fintech)转变,运维监控技术也不例外;但由于金融行业的安全性、实时性需求,这也对计算机技术提出了更高的要求,金融科技中,后端服务的质量对客户端业务的影响非常大,提升客户端的金融服务体验是目前金融科技领域的重要问题,而自动化拨测是监控后端服务质量的重要手段。With the development of computer technology, more and more computer technologies are applied in the financial field, and the traditional financial industry is gradually transforming into financial technology (Fintech), and operation and maintenance monitoring technology is no exception; however, due to the security, real-time This also puts forward higher requirements for computer technology. In financial technology, the quality of back-end services has a great impact on the client business. Improving the financial service experience of the client is an important issue in the field of financial technology at present, and automation Dial testing is an important means to monitor the quality of backend services.

拨测是指管理节点通过模拟客户端构造报文发送到后端服务器,并根据后端服务器返回的数据来判断服务的质量;现有的拨测方法,是由业务运维人员在管理节点编写拨测代码来实现拨测功能的,存在的问题是,业务运维人员不是专业的代码开发人员,通过编码方式来实现拨测功能,拨测效率较低。Dialing test means that the management node sends the message to the backend server by simulating the client to construct a message, and judges the quality of service according to the data returned by the backend server; the existing dialing test method is written by the business operation and maintenance personnel on the management node The problem of dialing test codes to realize the dialing test function is that business operation and maintenance personnel are not professional code developers, and the dialing test function is realized through coding, and the dialing test efficiency is low.

发明内容Contents of the invention

本发明的主要目的在于提供一种拨测方法、装置、设备及计算机可读存储介质,旨在解决由于业务运维人员开发代码来实现拨测功能导致的拨测效率较低的问题。The main purpose of the present invention is to provide a dial testing method, device, equipment and computer-readable storage medium, aiming to solve the problem of low dial testing efficiency caused by business operation and maintenance personnel developing codes to realize the dial testing function.

为实现上述目的,本发明提供一种拨测方法,所述拨测方法包括以下步骤:In order to achieve the above object, the present invention provides a method for dialing and testing, and the method for dialing and testing includes the following steps:

根据目标网络的网络协议类型,调用自动化运维工具ansible的功能模块;According to the network protocol type of the target network, call the function module of the automated operation and maintenance tool ansible;

基于调用的所述功能模块,发送拨测请求至所述目标网络中的待拨测服务器;Sending a dial-up test request to a server to be dialed-in in the target network based on the called function module;

接收所述待拨测服务器返回的与所述拨测请求对应的拨测资源,并根据所述拨测资源确定所述待拨测服务器的拨测结果。receiving the dial-test resource corresponding to the dial-test request returned by the server to be tested, and determining a dial-test result of the server to be tested according to the dial-test resource.

可选地,所述根据目标网络的网络协议类型,调用自动化运维工具ansible的功能模块的步骤包括:Optionally, according to the network protocol type of the target network, the step of calling the function module of the automated operation and maintenance tool ansible includes:

检测目标网络的网络协议类型为公有协议或私有协议;The network protocol type of the detection target network is a public protocol or a private protocol;

若所述网络协议类型为私有协议,则调用所述ansible的shell功能模块。If the network protocol type is a private protocol, then call the shell function module of the ansible.

可选地,所述基于调用的所述功能模块,发送拨测请求至所述目标网络中的待拨测服务器的步骤包括:Optionally, the step of sending a dial-up test request to the server to be dialed-in in the target network based on the called function module includes:

基于所述shell功能模块,调用网络数据包发送工具Packet Sender;Based on the shell function module, call the network packet sending tool Packet Sender;

通过所述Packet Sender发送拨测请求至所述目标网络中的待拨测服务器。Sending a dial-up test request to a server to be dial-up-tested in the target network through the Packet Sender.

可选地,所述检测目标网络的网络协议类型为公有协议或私有协议的步骤之后还包括:Optionally, after the step of detecting that the network protocol type of the target network is a public protocol or a private protocol, it also includes:

若所述网络协议类型为公有协议,则调用所述ansible的uri功能模块。If the network protocol type is a public protocol, then call the uri function module of the ansible.

可选地,所述基于调用的所述功能模块,发送拨测请求至所述目标网络中的待拨测服务器的步骤包括:Optionally, the step of sending a dial-up test request to the server to be dialed-in in the target network based on the called function module includes:

通过所述uri功能模块发送拨测请求至所述目标网络中的待拨测服务器。Sending a dial-up test request to a server to be dial-up-tested in the target network through the uri function module.

可选地,所述接收所述待拨测服务器返回的与所述拨测请求对应的拨测资源,并根据所述拨测资源确定所述待拨测服务器的拨测结果的步骤包括:Optionally, the step of receiving the dial test resource corresponding to the dial test request returned by the server to be tested, and determining the dial test result of the server to be tested according to the dial test resource includes:

接收所述待拨测服务器返回的与所述拨测请求对应的拨测资源;receiving the dial test resource corresponding to the dial test request returned by the server to be tested;

识别所述拨测资源中是否包括目标关键字;Identify whether the dial test resource includes the target keyword;

若所述拨测资源中包括所述目标关键字,则确定所述待拨测服务器的拨测结果为正常;If the dial test resource includes the target keyword, then determine that the dial test result of the server to be dial test is normal;

若所述拨测资源中不包括所述目标关键字,则确定所述待拨测服务器的拨测结果为异常。If the dial test resource does not include the target keyword, it is determined that the dial test result of the server to be tested is abnormal.

此外,为实现上述目的,本发明还提出一种拨测装置,所述拨测装置包括:In addition, in order to achieve the above purpose, the present invention also proposes a dial testing device, which includes:

调用模块,用于根据目标网络的网络协议类型,调用自动化运维工具ansible的功能模块;The calling module is used to call the function module of the automated operation and maintenance tool ansible according to the network protocol type of the target network;

发送模块,用于基于调用的所述功能模块,发送拨测请求至所述目标网络中的待拨测服务器;A sending module, configured to send a dial test request to a server to be dialed and tested in the target network based on the called function module;

确定模块,用于接收所述待拨测服务器返回的与所述拨测请求对应的拨测资源,并根据所述拨测资源确定所述待拨测服务器的拨测结果。The determining module is configured to receive the dial-test resource corresponding to the dial-test request returned by the server to be tested, and determine the dial-test result of the server to be tested according to the dial-test resource.

可选地,所述调用模块包括:Optionally, the calling module includes:

检测单元,用于检测目标网络的网络协议类型为公有协议或私有协议;A detection unit, configured to detect whether the network protocol type of the target network is a public protocol or a private protocol;

第一调用单元,用于在所述检测单元检测出所述网络协议类型为私有协议,则调用所述ansible的shell功能模块。The first calling unit is used to call the shell function module of the ansible when the detection unit detects that the network protocol type is a private protocol.

可选地,所述发送模块包括:Optionally, the sending module includes:

调用子单元,用于基于所述shell功能模块,调用网络数据包发送工具PacketSender;Invoking subunits for invoking the network data packet sending tool PacketSender based on the shell function module;

第一发送单元,用于通过所述Packet Sender发送拨测请求至所述目标网络中的待拨测服务器。A first sending unit, configured to send a dial test request to a server to be dialed in the target network through the Packet Sender.

可选地,所述调用模块还包括:Optionally, the calling module also includes:

第二调用单元,用于在所述检测单元检测出所述网络协议类型为公有协议,则调用所述ansible的uri功能模块。The second calling unit is used for calling the uri function module of the ansible when the detection unit detects that the network protocol type is a public protocol.

可选地,所述发送模块还包括:Optionally, the sending module also includes:

第二发送单元,用于通过所述uri功能模块发送拨测请求至所述目标网络中的待拨测服务器。The second sending unit is configured to send a dial test request to a server to be dialed in the target network through the uri function module.

可选地,所述确定模块包括:Optionally, the determination module includes:

接收单元,用于接收所述待拨测服务器返回的与所述拨测请求对应的拨测资源;a receiving unit, configured to receive the dial test resource corresponding to the dial test request returned by the dial test server;

识别单元,用于识别所述拨测资源中是否包括目标关键字;An identification unit, configured to identify whether the dial test resource includes a target keyword;

第一确定单元,用于若所述拨测资源中包括所述目标关键字,则确定所述待拨测服务器的拨测结果为正常;A first determining unit, configured to determine that the dial test result of the server to be dialed is normal if the dial test resource includes the target keyword;

第二确定单元,用于若所述拨测资源中不包括所述目标关键字,则确定所述待拨测服务器的拨测结果为异常。The second determining unit is configured to determine that the dial test result of the server to be tested is abnormal if the target keyword is not included in the dial test resource.

此外,为实现上述目的,本发明还提出一种拨测设备,所述设备包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的拨测程序,所述拨测程序被所述处理器执行时实现如上所述的拨测方法的步骤。In addition, in order to achieve the above object, the present invention also proposes a dial testing device, which includes: a memory, a processor, and a dial test program stored in the memory and operable on the processor. When the test program is executed by the processor, the steps of the above-mentioned dial test method are realized.

此外,为实现上述目的,本发明还提出一种计算机可读存储介质,所述计算机可读存储介质上存储有拨测程序,所述拨测程序被处理器执行时实现如上所述的拨测方法的步骤。In addition, in order to achieve the above object, the present invention also proposes a computer-readable storage medium, on which a dial-up test program is stored, and when the dial-up test program is executed by a processor, the above-mentioned dial-up test is realized. method steps.

本发明根据目标网络的网络协议类型,调用自动化运维工具ansible的功能模块;基于调用的所述功能模块,发送拨测请求至所述目标网络中的待拨测服务器;接收所述待拨测服务器返回的与所述拨测请求对应的拨测资源,并根据所述拨测资源确定所述待拨测服务器的拨测结果;由此,业务运维人员在实现拨测功能时,不需要编写完整的拨测代码,而只需要根据目标网络的网络协议类型,调用自动化运维工具ansible的功能模块即可执行,运维人员无需关注底层代码的实现,本发明将运维工具ansible用于自动化拨测,实现了拨测平台的快速构建,大大提高了拨测监控的效率,避免了由于业务运维人员通过开发代码实现拨测功能导致的拨测效率较低的问题。According to the network protocol type of the target network, the present invention calls the function module of the automatic operation and maintenance tool ansible; based on the called function module, sends a dial test request to the server to be dialed in the target network; receives the call to be tested The dial test resource corresponding to the dial test request returned by the server, and determine the dial test result of the server to be dial tested according to the dial test resource; thus, when the service operation and maintenance personnel implement the dial test function, they do not need to Write a complete dial test code, and only need to call the function module of the automatic operation and maintenance tool ansible according to the network protocol type of the target network to execute, and the operation and maintenance personnel do not need to pay attention to the implementation of the underlying code. The present invention uses the operation and maintenance tool ansible Automated dial testing realizes the rapid construction of the dial test platform, greatly improves the efficiency of dial test monitoring, and avoids the problem of low dial test efficiency caused by business operation and maintenance personnel implementing the dial test function through code development.

附图说明Description of drawings

图1是本发明实施例方案涉及的硬件运行环境的结构示意图;Fig. 1 is a schematic structural diagram of the hardware operating environment involved in the solution of the embodiment of the present invention;

图2为本发明拨测方法第一实施例的流程示意图;Fig. 2 is a schematic flow chart of the first embodiment of the dial testing method of the present invention;

图3为本发明拨测方法第二实施例的流程示意图;3 is a schematic flow chart of a second embodiment of the dialing method of the present invention;

图4为本发明拨测方法第三实施例的流程示意图;FIG. 4 is a schematic flow chart of a third embodiment of the dialing method of the present invention;

图5为本发明拨测方法第四实施例的流程示意图。FIG. 5 is a schematic flowchart of a fourth embodiment of a dial-up testing method according to the present invention.

本发明目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The realization of the purpose of the present invention, functional characteristics and advantages will be further described in conjunction with the embodiments and with reference to the accompanying drawings.

具体实施方式Detailed ways

应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。It should be understood that the specific embodiments described here are only used to explain the present invention, not to limit the present invention.

如图1所示,图1是本发明实施例方案涉及的硬件运行环境的结构示意图。As shown in FIG. 1 , FIG. 1 is a schematic structural diagram of a hardware operating environment involved in the solution of the embodiment of the present invention.

需要说明的是,图1即可为拨测设备的硬件运行环境的结构示意图。本发明实施例拨测设备可以是PC,便携计算机等终端设备。It should be noted that FIG. 1 is a schematic structural diagram of a hardware operating environment of a dial-up testing device. The dial testing device in this embodiment of the present invention may be a terminal device such as a PC or a portable computer.

如图1所示,该拨测设备可以包括:处理器1001,例如CPU,网络接口1004,用户接口1003,存储器1005,通信总线1002。其中,通信总线1002用于实现这些组件之间的连接通信。用户接口1003可以包括显示屏(Display)、输入单元比如键盘(Keyboard),可选用户接口1003还可以包括标准的有线接口、无线接口。网络接口1004可选的可以包括标准的有线接口、无线接口(如WI-FI接口)。存储器1005可以是高速RAM存储器,也可以是稳定的存储器(non-volatile memory),例如磁盘存储器。存储器1005可选的还可以是独立于前述处理器1001的存储装置。As shown in FIG. 1 , the dial testing device may include: a processor 1001 , such as a CPU, a network interface 1004 , a user interface 1003 , a memory 1005 , and a communication bus 1002 . Wherein, the communication bus 1002 is used to realize connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. Optionally, the network interface 1004 may include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 can be a high-speed RAM memory, or a stable memory (non-volatile memory), such as a disk memory. Optionally, the memory 1005 may also be a storage device independent of the aforementioned processor 1001 .

本领域技术人员可以理解,图1中示出的拨测设备结构并不构成对拨测设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。Those skilled in the art can understand that the structure of the dial test device shown in Figure 1 does not constitute a limitation on the dial test device, and may include more or less components than shown in the figure, or combine certain components, or different components layout.

如图1所示,作为一种计算机可读存储介质的存储器1005中可以包括操作系统、网络通信模块、用户接口模块以及拨测程序。其中,操作系统是管理和控制拨测设备硬件和软件资源的程序,支持拨测程序以及其它软件或程序的运行。As shown in FIG. 1 , the memory 1005 as a computer-readable storage medium may include an operating system, a network communication module, a user interface module, and a dial-up test program. Wherein, the operating system is a program that manages and controls the hardware and software resources of the dial test device, and supports the operation of the dial test program and other software or programs.

在图1所示的拨测设备中,用户接口1003主要用于与各个终端进行数据通信;网络接口1004主要用于连接后台服务器,与后台服务器进行数据通信;而处理器1001可以用于调用存储器1005中存储的拨测程序,并执行以下操作:In the dial testing device shown in Figure 1, the user interface 1003 is mainly used for data communication with each terminal; the network interface 1004 is mainly used for connecting to the background server and performing data communication with the background server; and the processor 1001 can be used to call the memory The dial test program stored in 1005, and perform the following operations:

根据目标网络的网络协议类型,调用自动化运维工具ansible的功能模块;According to the network protocol type of the target network, call the function module of the automated operation and maintenance tool ansible;

基于调用的所述功能模块,发送拨测请求至所述目标网络中的待拨测服务器;Sending a dial-up test request to a server to be dialed-in in the target network based on the called function module;

接收所述待拨测服务器返回的与所述拨测请求对应的拨测资源,并根据所述拨测资源确定所述待拨测服务器的拨测结果。receiving the dial-test resource corresponding to the dial-test request returned by the server to be tested, and determining a dial-test result of the server to be tested according to the dial-test resource.

进一步地,处理器1001还可以用于调用存储器1005中存储的拨测程序,并执行以下步骤:Further, the processor 1001 can also be used to call the dial-up program stored in the memory 1005, and perform the following steps:

检测目标网络的网络协议类型为公有协议或私有协议;The network protocol type of the detection target network is a public protocol or a private protocol;

若所述网络协议类型为私有协议,则调用所述ansible的shell功能模块。If the network protocol type is a private protocol, then call the shell function module of the ansible.

进一步地,处理器1001还可以用于调用存储器1005中存储的拨测程序,并执行以下步骤:Further, the processor 1001 can also be used to call the dial-up program stored in the memory 1005, and perform the following steps:

基于所述shell功能模块,调用网络数据包发送工具Packet Sender;Based on the shell function module, call the network packet sending tool Packet Sender;

通过所述Packet Sender发送拨测请求至所述目标网络中的待拨测服务器。Sending a dial-up test request to a server to be dial-up-tested in the target network through the Packet Sender.

进一步地,处理器1001还可以用于调用存储器1005中存储的拨测程序,并执行以下步骤:Further, the processor 1001 can also be used to call the dial-up program stored in the memory 1005, and perform the following steps:

若所述网络协议类型为公有协议,则调用所述ansible的uri功能模块。If the network protocol type is a public protocol, then call the uri function module of the ansible.

进一步地,处理器1001还可以用于调用存储器1005中存储的拨测程序,并执行以下步骤:Further, the processor 1001 can also be used to call the dial-up program stored in the memory 1005, and perform the following steps:

通过所述uri功能模块发送拨测请求至所述目标网络中的待拨测服务器。Sending a dial-up test request to a server to be dial-up-tested in the target network through the uri function module.

进一步地,处理器1001还可以用于调用存储器1005中存储的拨测程序,并执行以下步骤:Further, the processor 1001 can also be used to call the dial-up program stored in the memory 1005, and perform the following steps:

接收所述待拨测服务器返回的与所述拨测请求对应的拨测资源;receiving the dial test resource corresponding to the dial test request returned by the server to be tested;

识别所述拨测资源中是否包括目标关键字;Identify whether the dial test resource includes the target keyword;

若所述拨测资源中包括所述目标关键字,则确定所述待拨测服务器的拨测结果为正常;If the dial test resource includes the target keyword, then determine that the dial test result of the server to be dial test is normal;

若所述拨测资源中不包括所述目标关键字,则确定所述待拨测服务器的拨测结果为异常。If the dial test resource does not include the target keyword, it is determined that the dial test result of the server to be tested is abnormal.

基于上述的结构,提出本发明拨测方法的各个实施例。Based on the above structure, various embodiments of the dial testing method of the present invention are proposed.

参照图2,图2为本发明拨测方法第一实施例的流程示意图。Referring to FIG. 2 , FIG. 2 is a schematic flowchart of a first embodiment of a dial-up testing method according to the present invention.

本发明实施例提供了拨测方法的实施例,需要说明的是,虽然在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤。The embodiment of the present invention provides an embodiment of the dial testing method. It should be noted that although the logic sequence is shown in the flowchart, in some cases, the sequence shown or described can be executed in a different sequence than here. A step of.

本实施例拨测方法包括:The dial testing method in this embodiment includes:

步骤S100,根据目标网络的网络协议类型,调用自动化运维工具ansible的功能模块。Step S100, according to the network protocol type of the target network, call the function module of the automatic operation and maintenance tool ansible.

目前,随着金融科技的快速发展,互联网金融服务的应用也越来越广泛,其中,后端服务的质量对客户端业务的影响非常大,提升客户端的金融服务体验是目前科技金融领域的重要问题,而自动化拨测是监控后端服务质量的重要手段。At present, with the rapid development of financial technology, the application of Internet financial services is becoming more and more extensive. Among them, the quality of back-end services has a great impact on client business. Improving the financial service experience of clients is an important issue in the field of financial technology. problems, and automated dial testing is an important means to monitor the quality of back-end services.

拨测是指管理节点通过模拟客户端构造报文发送到后端服务器,并根据后端服务器返回的数据来判断服务的质量;现有技术中,拨测一般是由业务运维人员在管理节点编写拨测代码来实现拨测功能的,存在的问题是,业务运维人员不是专业的代码开发人员,通过编写代码的方式来实现拨测功能,拨测效率较低。Dialing test means that the management node sends the message to the back-end server by simulating the client, and judges the quality of service according to the data returned by the back-end server; The problem of writing test codes to implement the dial test function is that business operation and maintenance personnel are not professional code developers, and the dial test function is realized by writing codes, and the dial test efficiency is low.

ansible是基于Python编程语言开发的自动化运维工具,ansible提供一种基于多个功能模块工作的部署框架。Ansible is an automated operation and maintenance tool developed based on the Python programming language. Ansible provides a deployment framework based on the work of multiple functional modules.

本实施例中,将自动化运维工具ansible应用于拨测场景,业务运维人员在进行拨测作业时,无需编写完整的代码集合,在构建拨测命令集合时只需根据目标网络的网络协议类型,调用ansible相应的功能模块来实现拨测功能。In this embodiment, the automated operation and maintenance tool ansible is applied to the dial test scenario. The business operation and maintenance personnel do not need to write a complete code set when performing the dial test operation. When constructing the dial test command set, they only need to follow the network protocol of the target network Type, call the corresponding function module of ansible to realize the dial test function.

本实施例所述目标网络即待拨测服务器当前所处的网络环境,目标网络的网络协议类型具体可以是公有协议或私有协议,公有协议下和私有协议下的拨测作业分别基于ansible不同的功能模块实现。The target network described in this embodiment is the network environment where the server to be tested is currently located. The network protocol type of the target network can be a public protocol or a private protocol. The dial test operations under the public protocol and the private protocol are based on different ansible protocols. Realization of functional modules.

步骤S200,基于调用的所述功能模块,发送拨测请求至所述目标网络中的待拨测服务器;Step S200, based on the called function module, sending a dial test request to the server to be dialed and tested in the target network;

根据待拨测服务器所处网络的网络协议类型,调用与该网络协议类型相应的ansible的功能模块后,基于调用的所述功能模块,发送拨测请求至所述目标网络中的待拨测服务器。According to the network protocol type of the network where the server to be tested is located, after calling the ansible function module corresponding to the network protocol type, based on the called function module, sending a test request to the server to be tested in the target network .

在本实施例中,作为一种实施方式,若网络协议类型为公有网络,ansible的uri功能模块提供了对HTTP协议的支持,本实施例拨测方法调用ansible的uri功能模块,通过所述uri功能模块发送拨测请求至所述目标网络中的待拨测服务器;拨测请求具体可以是URL地址,uri功能模块发送URL地址至目标网络,再由该目标网络中对应的服务器提供与该URL地址对应的网络资源,根据服务器返回的网络资源判断服务器的返回接口是否存在异常;若网络协议类型为私有协议,通过ansible的shell模块调用网络数据包发送工具PacketSender,通过所述Packet Sender发送拨测请求至所述目标网络中的待拨测服务器;待拨测服务器可以是一个服务器集群,集群内的多个服务器均用于提供拨测请求对应的网络资源,本实施例在此不做具体限制。In this embodiment, as an implementation mode, if the network protocol type is a public network, the uri function module of ansible provides support for the HTTP protocol. The dial test method of this embodiment calls the uri function module of ansible, through the uri The function module sends a dialing test request to the server to be dialed in the target network; the dialing test request can be a URL address specifically, and the uri function module sends the URL address to the target network, and then the corresponding server in the target network provides a URL address corresponding to the URL. For the network resource corresponding to the address, judge whether the return interface of the server is abnormal according to the network resource returned by the server; if the network protocol type is a private protocol, call the network packet sending tool PacketSender through the ansible shell module, and send the dial test through the Packet Sender Request to the server to be tested in the target network; the server to be tested may be a server cluster, and multiple servers in the cluster are used to provide network resources corresponding to the test request, which is not specifically limited in this embodiment .

步骤S300,接收所述待拨测服务器返回的与所述拨测请求对应的拨测资源,并根据所述拨测资源确定所述待拨测服务器的拨测结果。Step S300, receiving the dial-test resource corresponding to the dial-test request returned by the server to be tested, and determining a dial-test result of the server to be tested according to the dial-test resource.

在本实施例中,拨测网络(即所述目标网络)的网络类型可以是公有网络或者私有网络,本实施例以目标网络的网络类型为公有网络做具体说明。业务运维人员需要拨测公有网络中的某个服务对应的服务器(即所述待拨测服务器),则需构建拨测命令集合,通过在管理节点执行拨测命令集合中的拨测命令,发送拨测请求至待拨测服务器,由此模拟客户端访问待拨测服务器时发送的访问请求,待拨测服务器在接收到管理节点发送的拨测请求后,返回给管理节点与该拨测请求对应的网络资源,管理节点根据待拨测服务器返回的网络资源来确定待拨测服务器是否正常完成了对该拨测请求的响应。In this embodiment, the network type of the dial-up test network (that is, the target network) may be a public network or a private network. In this embodiment, the network type of the target network is a public network for specific description. Business operation and maintenance personnel need to dial test the server corresponding to a certain service in the public network (that is, the server to be dialed and tested), then they need to build a dial test command set, and execute the dial test command in the dial test command set on the management node, Send a dial test request to the server to be tested, thereby simulating the access request sent by the client when accessing the server to be tested. After receiving the dial test request sent by the management node, the server to be tested returns to the management node and the test The corresponding network resources are requested, and the management node determines whether the server to be tested has normally completed the response to the dial test request according to the network resources returned by the server to be tested.

进一步地,业务运维人员在构建拨测命令集合时,无需编写完整的代码,只需在编写ansible的playbook时调用uri模块,传入相关参数,即可执行,无需关注底层代码的实现;ansible使用SSH连接到服务器并运行配置好的任务,服务器上不用安装任何多余的软件,本实施例采用编写ansible playbook来生成拨测命令集合。Furthermore, business operation and maintenance personnel do not need to write complete codes when building a set of dial test commands. They only need to call the uri module when writing ansible playbooks, pass in relevant parameters, and execute them without paying attention to the implementation of the underlying code; ansible Use SSH to connect to the server and run the configured tasks. There is no need to install any redundant software on the server. In this embodiment, ansible playbook is used to generate a set of dial test commands.

进一步地,以下以在公有网络中拨测一个登录系统的服务是否正常为例,对本实施例拨测方法做详细介绍:Further, the dial-up test method of this embodiment is described in detail below by taking the dial-up test of whether the service of a login system is normal in the public network as an example:

步骤a,获取登录页面;Step a, obtain the login page;

浏览器接收到登录系统的地址后,显示待拨测服务器的接口返回的对应的登录页面,具体是根据调用的uri功能模块发送一个URL地址,根据接口的返回码判断是否获取到登录页面,例如,若返回码为第一预设值,则表示成功拉取到页面,并将页面的html文件存储为一个字符串变量,若返回码不是所述第一预设值,则表示该接口返回异常,调用告警接口或者命令发送出告警。After the browser receives the address of the login system, it displays the corresponding login page returned by the interface of the server to be tested. Specifically, it sends a URL address according to the called uri function module, and judges whether the login page is obtained according to the return code of the interface, for example , if the return code is the first preset value, it means that the page is successfully fetched, and the html file of the page is stored as a string variable; if the return code is not the first preset value, it means that the interface returns an exception , call the alarm interface or command to send an alarm.

步骤b,基于帐号及密码构造登录请求;Step b, constructing a login request based on the account number and password;

该步骤具体是模拟客户在登录页面输入帐号和密码,并点击登录的这个动作。根据调用的uri功能模块构造http请求,在http请求的body中加入待提交到后端的参数(即所述输入账号和密码),同时head中也要加入步骤a中返回的cookie,uri功能模块发送该http请求至待拨测服务器,根据待拨测服务器接口的返回码来判断服务是否存在异常;进一步地,若返回码是第二预设值且浏览器的当前页面定向到了其他页面(即登录成功),则表征该接口正常,若返回码不是所述第二预设值,则表示该接口返回异常,调用告警接口或者命令发送出告警。This step specifically simulates the action of the customer entering the account number and password on the login page and clicking login. Construct the http request according to the called uri function module, add the parameters to be submitted to the backend in the body of the http request (that is, the input account number and password), and also add the cookie returned in step a to the head, and the uri function module sends The http request is sent to the server to be tested, and it is judged whether the service is abnormal according to the return code of the server interface to be tested; further, if the return code is the second preset value and the current page of the browser is directed to other pages (i.e. login success), it means that the interface is normal, if the return code is not the second preset value, it means that the interface returns an exception, and the alarm interface is called or the command is sent to send an alarm.

步骤c,获取票据并验证票据;Step c, obtain the ticket and verify the ticket;

登录系统后,输入帐号和密码在一定的时间内不需要重复输入密码的,浏览器将步骤b返回的ticket携带发送到待拨测服务器,服务器验证该ticket是否有效并发送一个返回码,根据服务器接口返回的返回码来判断该接口是否存在异常,若返回码是第三预设值且页面中包含'authenticationSuccess'字符串,则表征该接口正常,若返回码不是所述第三预设值,则表示该接口返回异常,调用告警接口或者命令发送出告警。After logging in to the system, if you do not need to enter the password again after entering the account number and password within a certain period of time, the browser will carry the ticket returned in step b and send it to the server to be tested, and the server will verify whether the ticket is valid and send a return code. The return code returned by the interface is used to determine whether the interface is abnormal. If the return code is the third preset value and the page contains the string 'authenticationSuccess', it indicates that the interface is normal. If the return code is not the third preset value, It means that the interface returns an exception, call the alarm interface or command to send an alarm.

本实施例根据目标网络的网络协议类型,调用自动化运维工具ansible的功能模块;基于调用的所述功能模块,发送拨测请求至所述目标网络中的待拨测服务器;接收所述待拨测服务器返回的与所述拨测请求对应的拨测资源,并根据所述拨测资源确定所述待拨测服务器的拨测结果;由此,业务运维人员在实现拨测功能时,不需要编写完整的拨测代码,而只需要根据目标网络的网络协议类型,调用自动化运维工具ansible的功能模块即可执行,运维人员无需关注底层代码的实现,本实施例将运维工具ansible用于自动化拨测,实现了拨测平台的快速构建,大大提高了拨测监控的效率,避免了由于业务运维人员通过开发代码实现拨测功能导致的拨测效率较低的问题。According to the network protocol type of the target network, this embodiment calls the function module of the automated operation and maintenance tool ansible; based on the function module called, sends a dial test request to the test server to be dialed in the target network; receives the dial test server to be dialed The dial test resource corresponding to the dial test request returned by the test server, and determine the dial test result of the server to be dial tested according to the dial test resource; thus, when the service operation and maintenance personnel implement the dial test function, they do not It is necessary to write a complete dial-up test code, but only need to call the function module of the automatic operation and maintenance tool ansible according to the network protocol type of the target network, and the operation and maintenance personnel do not need to pay attention to the implementation of the underlying code. It is used for automatic dial testing, which realizes the rapid construction of the dial test platform, greatly improves the efficiency of dial test monitoring, and avoids the problem of low dial test efficiency caused by business operation and maintenance personnel implementing the dial test function through developing codes.

进一步地,提出本发明拨测方法第二实施例。Further, a second embodiment of the dial testing method of the present invention is proposed.

参照图3,图3为本发明拨测方法第二实施例的流程示意图,基于上述拨测方法第一实施例,本实施例中,步骤S100,根据目标网络的网络协议类型,调用自动化运维工具ansible的功能模块的步骤包括:Referring to Fig. 3, Fig. 3 is a schematic flow diagram of the second embodiment of the dial-up testing method of the present invention. Based on the above-mentioned first embodiment of the dial-up testing method, in this embodiment, step S100 calls the automated operation and maintenance according to the network protocol type of the target network The steps of the function module of the tool ansible include:

步骤S101,检测目标网络的网络协议类型为公有协议或私有协议;Step S101, detecting that the network protocol type of the target network is a public protocol or a private protocol;

目前有一些商业拨测软件,主要以公有云的方式提供完善的拨测监控服务,但对于较小的企业团队而言,购买商业拨测软件的成本太大,并且现有的这些公有云拨测软件无法支持私有云环境。At present, there are some commercial dial-test software, which mainly provide comprehensive dial-test monitoring services in the form of public clouds, but for small enterprise teams, the cost of purchasing commercial dial-test software is too high, and the existing public cloud dial-up The testing software cannot support the private cloud environment.

在本实施例中,首先检测目标网络(即拨测网络)的网络协议类型为公有协议或私有协议。In this embodiment, firstly, it is detected that the network protocol type of the target network (that is, the dial-up test network) is a public protocol or a private protocol.

步骤S102,若所述网络协议类型为私有协议,则调用所述ansible的shell功能模块。Step S102, if the type of the network protocol is a private protocol, call the shell function module of the ansible.

私有协议一般是企业内部自定的协议标准,只适用于本企业生产的设备产品,若检测出拨测网络的网络协议类型为私有协议,由于ansible没有直接可以支持私有协议的功能模块,本实施例中,通过ansible的shell模块调用PacketSender来实现。The private protocol is generally an internal protocol standard of the enterprise, which is only applicable to the equipment products produced by the enterprise. If it is detected that the network protocol type of the test network is a private protocol, since ansible does not have a functional module that can directly support the private protocol, this implementation In the example, it is implemented by calling PacketSender through the shell module of ansible.

进一步地,步骤S200,基于调用的所述功能模块,发送拨测请求至所述目标网络中的待拨测服务器的步骤包括:Further, in step S200, the step of sending a dial-up test request to the server to be tested in the target network based on the called function module includes:

步骤S201,基于所述shell功能模块,调用网络数据包发送工具Packet Sender;Step S201, based on the shell function module, calling the network packet sending tool Packet Sender;

网络数据包发送工具Packet Sender是用来发包的工具,通过该工具能够发送和接收TCP和UDP的网络数据包。Network data packet sending tool Packet Sender is a tool for sending packets, through which TCP and UDP network data packets can be sent and received.

步骤S202,通过所述Packet Sender发送拨测请求至所述目标网络中的待拨测服务器。Step S202, sending a dial-up test request to a server to be dialed-in in the target network through the Packet Sender.

管理节点的拨测请求基于Packet Sender发送至拨测网络下的待拨测服务器,并根据待拨测服务器返回的网络资源来判断待拨测服务器是否存在返回异常。The dial-up test request of the management node is sent to the server under the dial-up test network based on the Packet Sender, and judges whether the server to be dial-in-test returns abnormality according to the network resources returned by the dial-up test server.

本实施例检测目标网络的网络协议类型为公有协议或私有协议,若所述网络协议类型为私有协议,则调用所述ansible的shell功能模块,基于所述shell功能模块,调用网络数据包发送工具Packet Sender,通过所述Packet Sender发送拨测请求至所述目标网络中的待拨测服务器,接收所述待拨测服务器返回的与所述拨测请求对应的拨测资源,并根据所述拨测资源确定所述待拨测服务器的拨测结果;由此,业务运维人员在实现拨测功能时,不需要编写完整的拨测代码,而只需要根据目标网络的网络协议类型,调用自动化运维工具ansible的功能模块即可执行,运维人员无需关注底层代码的实现,本实施例将运维工具ansible用于自动化拨测,实现了拨测平台的快速构建,大大提高了拨测监控的效率,避免了由于业务运维人员通过开发代码实现拨测功能导致的拨测效率较低的问题,并且支持私有协议下拨测功能的实现,且降低了拨测成本。This embodiment detects that the network protocol type of the target network is a public protocol or a private protocol. If the network protocol type is a private protocol, the shell function module of the ansible is called, and based on the shell function module, a network packet sending tool is called Packet Sender, sending a dial test request to the server to be dialed in the target network through the Packet Sender, receiving the dial test resource corresponding to the dial test request returned by the server to be tested, and according to the dial test The test resource determines the dial test result of the server to be tested; thus, when implementing the dial test function, the business operation and maintenance personnel do not need to write a complete dial test code, but only need to call the automatic test according to the network protocol type of the target network The functional modules of the operation and maintenance tool ansible can be executed, and the operation and maintenance personnel do not need to pay attention to the implementation of the underlying code. In this embodiment, the operation and maintenance tool ansible is used for automatic dial testing, which realizes the rapid construction of the dial test platform and greatly improves the dial test monitoring The high efficiency avoids the problem of low dial-test efficiency caused by business operation and maintenance personnel implementing the dial-test function by developing codes, and supports the realization of the dial-test function under the private protocol, and reduces the dial-test cost.

进一步地,提出本发明拨测方法第三实施例。Further, a third embodiment of the dial testing method of the present invention is proposed.

参照图4,图4为本发明拨测方法第三实施例的流程示意图,基于上述拨测方法第二实施例,本实施例中,步骤S101,检测目标网络的网络协议类型为公有协议或私有协议的步骤之后还包括:Referring to FIG. 4, FIG. 4 is a schematic flow chart of the third embodiment of the dial-up test method of the present invention. Based on the second embodiment of the above-mentioned dial-up test method, in this embodiment, in step S101, it is detected that the network protocol type of the target network is a public protocol or a private protocol Following the steps of the protocol also include:

步骤S103,若所述网络协议类型为公有协议,则调用所述ansible的uri功能模块。Step S103, if the network protocol type is a public protocol, call the uri function module of the ansible.

本实施例中,具体地,对公有协议下的拨测网络提出一种实施方式,ansible的uri模块可以直接发送URL地址,因此,调用ansible的uri功能模块直接对HTTP协议提供拨测支持。In this embodiment, specifically, an implementation mode is proposed for the dial test network under the public protocol. The uri module of ansible can directly send the URL address. Therefore, the uri function module of ansible is called to directly provide dial test support for the HTTP protocol.

进一步地,步骤S200,基于调用的所述功能模块,发送拨测请求至所述目标网络中的待拨测服务器的步骤包括:Further, in step S200, the step of sending a dial-up test request to the server to be tested in the target network based on the called function module includes:

步骤S203,通过所述uri功能模块发送拨测请求至所述目标网络中的待拨测服务器;Step S203, sending a dial-up test request to a server to be dialed-in in the target network through the uri function module;

若检测出目标网络的网络协议类型为公有协议,则调用ansible的uri功能模块发送拨测请求至拨测网络中的待拨测服务器,并根据待拨测服务器返回的网络资源来判断待拨测服务器是否存在返回异常。If it is detected that the network protocol type of the target network is a public protocol, call the uri function module of ansible to send a dial test request to the dial test server in the dial test network, and judge the dial test based on the network resources returned by the dial test server Whether the server returns an exception.

本实施例检测目标网络的网络协议类型为公有协议或私有协议,若所述网络协议类型为公有协议,则调用所述ansible的uri功能模块,通过所述uri功能模块发送拨测请求至所述目标网络中的待拨测服务器,接收所述待拨测服务器返回的与所述拨测请求对应的拨测资源,并根据所述拨测资源确定所述待拨测服务器的拨测结果;若检测出所述网络协议类型为私有协议,则调用所述ansible的shell功能模块,基于所述shell功能模块,调用网络数据包发送工具Packet Sender,通过所述Packet Sender发送拨测请求至所述目标网络中的待拨测服务器,接收所述待拨测服务器返回的与所述拨测请求对应的拨测资源,并根据所述拨测资源确定所述待拨测服务器的拨测结果,由此,通过将运维工具ansible用于自动化拨测,实现了拨测平台的快速构建,大大提高了拨测监控的效率,并且满足公有协议与私有协议网络环境下的拨测需求,提升了拨测功能的适用范围。This embodiment detects that the network protocol type of the target network is a public protocol or a private protocol. If the network protocol type is a public protocol, the uri function module of the ansible is called, and the dial test request is sent to the said uri function module through the uri function module. The server to be dialed and tested in the target network receives the dial test resource corresponding to the dial test request returned by the server to be dialed and tested, and determines the dial test result of the server to be dialed and tested according to the dial test resource; if Detect that the network protocol type is a private protocol, then call the shell function module of the ansible, based on the shell function module, call the network packet sending tool Packet Sender, and send a dial test request to the target through the Packet Sender The server to be dialed and tested in the network receives the dial test resource corresponding to the dial test request returned by the server to be dialed and tested, and determines the dial test result of the server to be dialed and tested according to the dial test resource, thereby , by using the operation and maintenance tool ansible for automated dial testing, the rapid construction of the dial test platform is realized, the efficiency of dial test monitoring is greatly improved, and the dial test requirements in the network environment of public protocols and private protocols are met, and the dial test is improved. The scope of application of the function.

进一步地,提出本发明拨测方法第四实施例。Further, a fourth embodiment of the dial testing method of the present invention is proposed.

参照图5,图5为本发明拨测方法第四实施例的流程示意图,基于上述拨测方法第一实施例,本实施例中,步骤S300,接收所述待拨测服务器返回的与所述拨测请求对应的拨测资源,并根据所述拨测资源确定所述待拨测服务器的拨测结果的步骤包括:Referring to FIG. 5, FIG. 5 is a schematic flowchart of the fourth embodiment of the dial-up testing method of the present invention. Based on the first embodiment of the above-mentioned dial-up testing method, in this embodiment, in step S300, receiving the information returned by the dial-up testing server and the The dial test resource corresponding to the dial test request, and the step of determining the dial test result of the server to be dial tested according to the dial test resource includes:

步骤S301,接收所述待拨测服务器返回的与所述拨测请求对应的拨测资源;Step S301, receiving the dial test resource corresponding to the dial test request returned by the dial test server;

步骤S302,识别所述拨测资源中是否包括目标关键字;Step S302, identifying whether the dial test resource includes the target keyword;

步骤S303,若所述拨测资源中包括所述目标关键字,则确定所述待拨测服务器的拨测结果为正常;Step S303, if the dial test resource includes the target keyword, then determine that the dial test result of the server to be tested is normal;

步骤S304,若所述拨测资源中不包括所述目标关键字,则确定所述待拨测服务器的拨测结果为异常。Step S304, if the dial-test resource does not include the target keyword, determine that the dial-test result of the server to be tested is abnormal.

在本实施例中,作为一种实施方式,管理节点发送拨测请求至待拨测服务器后,接收所述待拨测服务器返回的与所述拨测请求对应的拨测资源,识别所述拨测资源中是否包括目标关键字,其中,拨测请求可以是URL地址,拨测资源即为该URL地址对应的网络资源,目标关键字可以设置为表征该网络资源的关键字信息,若待拨测服务器返回的拨测资源中包括所述目标关键字,则说明待拨测服务器正常返回了客户端需要的网络资源,则确定所述待拨测服务器的拨测结果为正常,若待拨测服务器返回的所述拨测资源中不包括所述目标关键字,则说明待拨测服务器未正常返回客户端需要的网络资源,则确定所述待拨测服务器的拨测结果为异常,并发出告警信息。In this embodiment, as an implementation manner, after the management node sends a dial test request to the server to be tested, it receives the dial test resource corresponding to the dial test request returned by the server to be tested, and identifies the dial test resource. Whether the target keyword is included in the testing resource, wherein, the dialing test request can be a URL address, and the dialing test resource is the network resource corresponding to the URL address, and the target keyword can be set as keyword information representing the network resource. If the dial test resource returned by the test server includes the target keyword, it means that the server to be dialed and tested has normally returned the network resources required by the client, and it is determined that the dial test result of the server to be dialed and tested is normal. The dial test resource returned by the server does not include the target keyword, indicating that the server to be dialed for test has not normally returned the network resource required by the client, then it is determined that the dial test result of the server to be dialed for test is abnormal, and an Warning message.

此外,本发明实施例还提出一种拨测装置,所述拨测装置包括:In addition, the embodiment of the present invention also proposes a dial testing device, the dial testing device includes:

调用模块,用于根据目标网络的网络协议类型,调用自动化运维工具ansible的功能模块;The calling module is used to call the function module of the automated operation and maintenance tool ansible according to the network protocol type of the target network;

发送模块,用于基于调用的所述功能模块,发送拨测请求至所述目标网络中的待拨测服务器;A sending module, configured to send a dial test request to a server to be dialed and tested in the target network based on the called function module;

确定模块,用于接收所述待拨测服务器返回的与所述拨测请求对应的拨测资源,并根据所述拨测资源确定所述待拨测服务器的拨测结果。The determining module is configured to receive the dial-test resource corresponding to the dial-test request returned by the server to be tested, and determine the dial-test result of the server to be tested according to the dial-test resource.

优选地,所述调用模块包括:Preferably, the calling module includes:

检测单元,用于检测目标网络的网络协议类型为公有协议或私有协议;A detection unit, configured to detect whether the network protocol type of the target network is a public protocol or a private protocol;

第一调用单元,用于在所述检测单元检测出所述网络协议类型为私有协议,则调用所述ansible的shell功能模块。The first calling unit is used to call the shell function module of the ansible when the detection unit detects that the network protocol type is a private protocol.

优选地,所述发送模块包括:Preferably, the sending module includes:

调用子单元,用于基于所述shell功能模块,调用网络数据包发送工具PacketSender;Invoking subunits for invoking the network data packet sending tool PacketSender based on the shell function module;

第一发送单元,用于通过所述Packet Sender发送拨测请求至所述目标网络中的待拨测服务器。A first sending unit, configured to send a dial test request to a server to be dialed in the target network through the Packet Sender.

优选地,所述调用模块还包括:Preferably, the calling module also includes:

第二调用单元,用于在所述检测单元检测出所述网络协议类型为公有协议,则调用所述ansible的uri功能模块。The second calling unit is used for calling the uri function module of the ansible when the detection unit detects that the network protocol type is a public protocol.

优选地,所述发送模块还包括:Preferably, the sending module also includes:

第二发送单元,用于通过所述uri功能模块发送拨测请求至所述目标网络中的待拨测服务器。The second sending unit is configured to send a dial test request to a server to be dialed in the target network through the uri function module.

优选地,所述确定模块包括:Preferably, the determination module includes:

接收单元,用于接收所述待拨测服务器返回的与所述拨测请求对应的拨测资源;a receiving unit, configured to receive the dial test resource corresponding to the dial test request returned by the dial test server;

识别单元,用于识别所述拨测资源中是否包括目标关键字;An identification unit, configured to identify whether the dial test resource includes a target keyword;

第一确定单元,用于若所述拨测资源中包括所述目标关键字,则确定所述待拨测服务器的拨测结果为正常;A first determining unit, configured to determine that the dial test result of the server to be dialed is normal if the dial test resource includes the target keyword;

第二确定单元,用于若所述拨测资源中不包括所述目标关键字,则确定所述待拨测服务器的拨测结果为异常。The second determining unit is configured to determine that the dial test result of the server to be tested is abnormal if the target keyword is not included in the dial test resource.

本实施例提出的拨测装置各个模块运行时实现如上所述的拨测方法的步骤,在此不再赘述。The steps of implementing the above-mentioned dialing test method during operation of each module of the dialing test device proposed in this embodiment will not be repeated here.

此外,本发明实施例还提出一种计算机可读存储介质,所述存储介质上存储有拨测程序,所述拨测程序被处理器执行时实现如上所述的拨测方法的步骤。In addition, an embodiment of the present invention also provides a computer-readable storage medium, on which a dial testing program is stored, and when the dial testing program is executed by a processor, the steps of the above dial testing method are implemented.

其中,在所述处理器上运行的拨测程序被执行时所实现的方法可参照本发明拨测方法各个实施例,此处不再赘述。For the methods implemented when the dial testing program running on the processor is executed, reference may be made to various embodiments of the dial testing method of the present invention, and details are not repeated here.

需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。It should be noted that, in this document, the term "comprising", "comprising" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article or apparatus comprising a set of elements includes not only those elements, It also includes other elements not expressly listed, or elements inherent in the process, method, article, or device. Without further limitations, an element defined by the phrase "comprising a ..." does not preclude the presence of additional identical elements in the process, method, article, or apparatus comprising that element.

上述本发明实施例序号仅仅为了描述,不代表实施例的优劣。The serial numbers of the above embodiments of the present invention are for description only, and do not represent the advantages and disadvantages of the embodiments.

通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本发明各个实施例所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus a necessary general-purpose hardware platform, and of course also by hardware, but in many cases the former is better implementation. Based on such an understanding, the essence of the technical solution of the present invention or the part that contributes to the prior art can be embodied in the form of software products, and the computer software products are stored in a storage medium (such as ROM/RAM, disk, CD) contains several instructions to make a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) execute the methods described in various embodiments of the present invention.

以上仅为本发明的优选实施例,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围内。The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process conversion made by using the description of the present invention and the contents of the accompanying drawings, or directly or indirectly used in other related technical fields , are all included in the scope of patent protection of the present invention in the same way.

Claims (10)

1.一种拨测方法,其特征在于,所述拨测方法包括以下步骤:1. A method for dialing and testing, characterized in that, the method for dialing and testing comprises the following steps: 当目标网络的网络协议类型为私有协议时,调用自动化运维工具ansible的shell功能模块;When the network protocol type of the target network is a private protocol, call the shell function module of the automated operation and maintenance tool ansible; 基于所述shell功能模块,调用网络数据包发送工具Packet Sender;Based on the shell function module, call the network packet sending tool Packet Sender; 通过所述Packet Sender发送拨测请求至所述目标网络中的待拨测服务器;sending a dial test request to the server to be dial test in the target network through the Packet Sender; 接收所述待拨测服务器返回的与所述拨测请求对应的拨测资源,并根据所述拨测资源确定所述待拨测服务器的拨测结果。receiving the dial-test resource corresponding to the dial-test request returned by the server to be tested, and determining a dial-test result of the server to be tested according to the dial-test resource. 2.如权利要求1所述的拨测方法,其特征在于,还包括:2. The dial testing method according to claim 1, further comprising: 若所述网络协议类型为公有协议,则调用所述ansible的uri功能模块。If the network protocol type is a public protocol, then call the uri function module of the ansible. 3.如权利要求2所述的拨测方法,其特征在于,还包括:3. The dial testing method according to claim 2, further comprising: 通过所述uri功能模块发送拨测请求至所述目标网络中的待拨测服务器。Sending a dial-up test request to a server to be dial-up-tested in the target network through the uri function module. 4.如权利要求1-3任一项所述的拨测方法,其特征在于,所述接收所述待拨测服务器返回的与所述拨测请求对应的拨测资源,并根据所述拨测资源确定所述待拨测服务器的拨测结果的步骤包括:4. The dial test method according to any one of claims 1-3, wherein the dial test resource corresponding to the dial test request returned by the server to be tested is received, and according to the dial test The step of determining the dialing test result of the server to be dialed by the testing resource comprises: 接收所述待拨测服务器返回的与所述拨测请求对应的拨测资源;receiving the dial test resource corresponding to the dial test request returned by the server to be tested; 识别所述拨测资源中是否包括目标关键字;Identify whether the dial test resource includes the target keyword; 若所述拨测资源中包括所述目标关键字,则确定所述待拨测服务器的拨测结果为正常;If the dial test resource includes the target keyword, then determine that the dial test result of the server to be dial test is normal; 若所述拨测资源中不包括所述目标关键字,则确定所述待拨测服务器的拨测结果为异常。If the dial test resource does not include the target keyword, it is determined that the dial test result of the server to be tested is abnormal. 5.一种拨测装置,其特征在于,所述拨测装置包括:5. A dial-up testing device, characterized in that, the dial-up testing device comprises: 第一调用单元,用于当目标网络的网络协议类型为私有协议时,调用自动化运维工具ansible的shell功能模块;The first calling unit is used to call the shell function module of the automated operation and maintenance tool ansible when the network protocol type of the target network is a private protocol; 调用子单元,基于所述shell功能模块,调用网络数据包发送工具Packet Sender;Call subunit, based on the shell function module, call network data packet sending tool Packet Sender; 第一发送单元,用于通过所述Packet Sender发送拨测请求至所述目标网络中的待拨测服务器;A first sending unit, configured to send a dial test request to a server to be dialed in the target network through the Packet Sender; 确定模块,用于接收所述待拨测服务器返回的与所述拨测请求对应的拨测资源,并根据所述拨测资源确定所述待拨测服务器的拨测结果。The determining module is configured to receive the dial-test resource corresponding to the dial-test request returned by the server to be tested, and determine the dial-test result of the server to be tested according to the dial-test resource. 6.如权利要求5所述的拨测装置,其特征在于,第二调用单元,用于若所述网络协议类型为公有协议,则调用所述ansible的uri功能模块。6. The dial testing device according to claim 5, wherein the second calling unit is configured to call the uri function module of the ansible if the type of the network protocol is a public protocol. 7.如权利要求6所述的拨测装置,其特征在于,第二发送单元,用于通过所述uri功能模块发送拨测请求至所述目标网络中的待拨测服务器。7. The dial testing device according to claim 6, wherein the second sending unit is configured to send a dial testing request to a server to be tested in the target network through the uri function module. 8.如权利要求5-7任一项所述的拨测装置,其特征在于,所述确定模块包括:8. The dial testing device according to any one of claims 5-7, wherein the determination module comprises: 接收单元,用于接收所述待拨测服务器返回的与所述拨测请求对应的拨测资源;a receiving unit, configured to receive the dial test resource corresponding to the dial test request returned by the dial test server; 识别单元,用于识别所述拨测资源中是否包括目标关键字;An identification unit, configured to identify whether the dial test resource includes a target keyword; 第一确定单元,用于若所述拨测资源中包括所述目标关键字,则确定所述待拨测服务器的拨测结果为正常;A first determining unit, configured to determine that the dial test result of the server to be dialed is normal if the dial test resource includes the target keyword; 第二确定单元,用于若所述拨测资源中不包括所述目标关键字,则确定所述待拨测服务器的拨测结果为异常。The second determining unit is configured to determine that the dial test result of the server to be tested is abnormal if the target keyword is not included in the dial test resource. 9.一种拨测设备,其特征在于,所述设备包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的拨测程序,所述拨测程序被所述处理器执行时实现如权利要求1至4中任一项所述的拨测方法的步骤。9. A dial-up test device, characterized in that the device comprises: a memory, a processor, and a dial-up test program stored on the memory and operable on the processor, the dial-up test program being executed by the When the processor executes, the steps of realizing the dial testing method according to any one of claims 1 to 4 are realized. 10.一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有拨测程序,所述拨测程序被处理器执行时实现如权利要求1至4中任一项所述的拨测方法的步骤。10. A computer-readable storage medium, characterized in that, the computer-readable storage medium stores a dial-up test program, and when the dial-up test program is executed by a processor, it realizes the process described in any one of claims 1 to 4. The steps of the dialing test method described above.
CN201910301699.8A 2019-04-11 2019-04-11 Dialing test method, device, equipment and computer-readable storage medium Active CN110011875B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910301699.8A CN110011875B (en) 2019-04-11 2019-04-11 Dialing test method, device, equipment and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910301699.8A CN110011875B (en) 2019-04-11 2019-04-11 Dialing test method, device, equipment and computer-readable storage medium

Publications (2)

Publication Number Publication Date
CN110011875A CN110011875A (en) 2019-07-12
CN110011875B true CN110011875B (en) 2023-03-03

Family

ID=67172033

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910301699.8A Active CN110011875B (en) 2019-04-11 2019-04-11 Dialing test method, device, equipment and computer-readable storage medium

Country Status (1)

Country Link
CN (1) CN110011875B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111953556B (en) * 2020-07-02 2021-09-17 中盈优创资讯科技有限公司 Website automatic dial testing method and device, computer equipment and readable storage medium
CN113068216B (en) * 2021-03-17 2023-06-27 牙木科技股份有限公司 Network dial testing method, network dial testing system and computer readable storage medium
CN113949657B (en) * 2021-11-30 2023-04-18 中国电信股份有限公司 Internet of things detection device, system and test method
CN114584760B (en) * 2022-03-01 2024-08-16 湖南快乐阳光互动娱乐传媒有限公司 Media resource dial testing method and related equipment
CN114760235B (en) * 2022-04-24 2024-03-22 青岛海尔科技有限公司 Method and device for executing dial test task, storage medium, and electronic device
CN115190293B (en) * 2022-07-08 2025-08-26 湖南快乐阳光互动娱乐传媒有限公司 A dialing test method, device, electronic equipment and computer storage medium
CN118474187A (en) * 2023-01-31 2024-08-09 华为云计算技术有限公司 Dial-test source determining method and device and computing device cluster
CN119893176A (en) * 2024-12-04 2025-04-25 天翼云科技有限公司 Dial testing method, device, equipment and medium for video monitoring management cloud platform

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105634849A (en) * 2014-11-05 2016-06-01 中国移动通信集团公司 Dial measuring method and apparatus for data traffic unified payment services
CN107193669A (en) * 2017-05-09 2017-09-22 千寻位置网络有限公司 The system and design method of maintenance interface based on mixed cloud or large-scale cluster
CN109032618A (en) * 2018-07-11 2018-12-18 郑州云海信息技术有限公司 A kind of deployment and interconnection method and system with OpenStack cloud management platform
CN109298868A (en) * 2018-08-22 2019-02-01 华东计算技术研究所(中国电子科技集团公司第三十二研究所) Intelligent dynamic deployment and unloading method for mapping image data processing software
CN109343894A (en) * 2018-09-20 2019-02-15 郑州云海信息技术有限公司 A cloud platform operation and maintenance method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105634849A (en) * 2014-11-05 2016-06-01 中国移动通信集团公司 Dial measuring method and apparatus for data traffic unified payment services
CN107193669A (en) * 2017-05-09 2017-09-22 千寻位置网络有限公司 The system and design method of maintenance interface based on mixed cloud or large-scale cluster
CN109032618A (en) * 2018-07-11 2018-12-18 郑州云海信息技术有限公司 A kind of deployment and interconnection method and system with OpenStack cloud management platform
CN109298868A (en) * 2018-08-22 2019-02-01 华东计算技术研究所(中国电子科技集团公司第三十二研究所) Intelligent dynamic deployment and unloading method for mapping image data processing software
CN109343894A (en) * 2018-09-20 2019-02-15 郑州云海信息技术有限公司 A cloud platform operation and maintenance method and device

Also Published As

Publication number Publication date
CN110011875A (en) 2019-07-12

Similar Documents

Publication Publication Date Title
CN110011875B (en) Dialing test method, device, equipment and computer-readable storage medium
CN111666197B (en) Pressure testing method and device, electronic equipment and computer readable medium
US9201767B1 (en) System and method for implementing a testing framework
US8813039B2 (en) Method and system for software defect reporting
CN109582556B (en) Method, device and system for testing running condition of application program in mobile terminal
CN113259479B (en) Data processing method and equipment
CN110289983B (en) Load balancing application creation method and device, computer equipment and storage medium
CN112199621B (en) Method and device for quickly generating poster and computer equipment
JP2002108728A (en) How to post trouble information and provider equipment
CN105262608B (en) Monitoring method and device for network service
CN104834602A (en) Program issuing method, device and system
CN114095567A (en) Data access request processing method and device, computer equipment and medium
CN112860398A (en) Data processing method, device, equipment and medium based on rule engine
CN111694620A (en) Interaction method, device and equipment of third-party service and computer storage medium
CN111954240A (en) Network fault processing method and device and electronic equipment
CN116560896B (en) Anomaly compensation method, device, equipment and storage medium
CN110267215A (en) A data detection method, device and storage medium
CN103986746A (en) A method and device for establishing communication between a user and a third party
CN112988385A (en) Request processing method, device, system, storage medium and electronic equipment
CN114428723A (en) Test system, system test method, related device and storage medium
CN109522202B (en) Software testing method and device
CN110875832A (en) Abnormal service monitoring method, device and system and computer readable storage medium
CN115277506B (en) Load balancing equipment testing method and system
CN114448703B (en) Request processing method, request processing device, electronic equipment and storage medium
CN114546743A (en) Method and device for testing equipment interface performance

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant