CN108696400A - Network monitoring method and device - Google Patents
Network monitoring method and device Download PDFInfo
- Publication number
- CN108696400A CN108696400A CN201710234863.9A CN201710234863A CN108696400A CN 108696400 A CN108696400 A CN 108696400A CN 201710234863 A CN201710234863 A CN 201710234863A CN 108696400 A CN108696400 A CN 108696400A
- Authority
- CN
- China
- Prior art keywords
- monitoring
- proxy server
- network
- request
- network monitoring
- 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.)
- Pending
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/08—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1001—Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
- H04L67/1004—Server selection for load balancing
- H04L67/1008—Server selection for load balancing based on parameters of servers, e.g. available memory or workload
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/56—Provisioning of proxy services
- H04L67/562—Brokering proxy services
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Hardware Design (AREA)
- General Engineering & Computer Science (AREA)
- Environmental & Geological Engineering (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
- Debugging And Monitoring (AREA)
- Computer And Data Communications (AREA)
Abstract
本申请公开了网络监测方法和装置。该方法的一具体实施方式包括:接收用户发送的指定代理服务器组执行的网络监测请求;获取该代理服务器组中每个代理服务器的状态信息,状态信息包括:CPU利用率、内存利用率以及执行的监测操作的数量和位置信息;根据CPU利用率、内存利用率以及执行的监测操作的数量,从所述代理服务器组中选取预定数目的代理服务器,并确定出所选取的代理服务器的地理位置;向所选取的代理服务器发送执行网络监测操作的请求;接收所选取的代理服务器返回的监测结果,并根据监测结果和预设的网络质量指标确定该地理位置的网络是否异常。该实施方式实现了对网络质量全方位实时监测。
The application discloses a network monitoring method and device. A specific implementation of the method includes: receiving a network monitoring request sent by a user for execution by a specified proxy server group; obtaining status information of each proxy server in the proxy server group, the status information including: CPU utilization, memory utilization and execution Quantity and location information of the monitoring operation; According to CPU utilization rate, memory utilization rate and the quantity of the monitoring operation of execution, select predetermined number of proxy servers from the proxy server group, and determine the geographic location of the selected proxy server; Send a request to the selected proxy server to perform a network monitoring operation; receive the monitoring result returned by the selected proxy server, and determine whether the network in the geographical location is abnormal according to the monitoring result and the preset network quality index. This implementation mode realizes all-round real-time monitoring of network quality.
Description
技术领域technical field
本申请涉及计算机技术领域,具体涉及互联网技术领域,尤其涉及网络监测方法和装置。The present application relates to the field of computer technology, specifically to the field of Internet technology, especially to a network monitoring method and device.
背景技术Background technique
在这个信息时代,任何线上数据的传输都离不开网络,随着云计算技术的快速发展,许多传统领域行业也越来越多的依赖于互联网公司提供的云计算服务,因此网络的稳定尤为重要。但是由于很多不可抗力或者人为的因素,网络不可能是一直处于稳定状态的。因此对互联网的网络质量进行即时监测,发现网络的不稳定来及时切换业务就变成了一个亟待解决的问题。In this information age, any online data transmission is inseparable from the network. With the rapid development of cloud computing technology, many industries in traditional fields are increasingly relying on cloud computing services provided by Internet companies. Therefore, the stability of the network especially important. However, due to many force majeure or human factors, the network cannot always be in a stable state. Therefore, real-time monitoring of the network quality of the Internet, finding out that the network is unstable and switching services in time has become an urgent problem to be solved.
现有技术中一般采用以下两种方法对互联网的网络质量进行即时监测。一种方法是在业务核心机房挑选几台服务器,从机房到个各省市运营商反向监测网络质量。该方法只能监测核心机房到各省市运营商的网络质量,全国各省市运营商到核心机房网络质量未知。另一种方法是租用第三方基调网络监测实现对部分业务的实时监测。租用第三方基调网络监测,无法根据自身业务需求进行针对性的监测,而且无法模拟真实用户对业务的访问情况。In the prior art, the following two methods are generally adopted to monitor the network quality of the Internet in real time. One method is to select several servers in the core computer room of the business, and reversely monitor the network quality from the computer room to operators in various provinces and cities. This method can only monitor the network quality from the core computer room to the operators in various provinces and cities, and the network quality from the operators in various provinces and cities across the country to the core computer room is unknown. Another method is to rent a third-party keynote network monitoring to realize real-time monitoring of some services. Renting a third-party keynote network monitoring cannot conduct targeted monitoring according to its own business needs, and it cannot simulate real users' access to services.
发明内容Contents of the invention
本申请的目的在于提出一种改进的网络监测方法和装置,来解决以上背景技术部分提到的技术问题。The purpose of this application is to propose an improved network monitoring method and device to solve the technical problems mentioned in the above background technology section.
第一方面,本申请实施例提供了一种网络监测方法,该方法包括:接收用户发送的指定代理服务器组执行的网络监测请求;获取代理服务器组中每个代理服务器的状态信息,状态信息包括:CPU利用率、内存利用率以及执行的监测操作的数量和位置信息;根据CPU利用率、内存利用率以及执行的监测操作的数量,从代理服务器组中选取预定数目的代理服务器,并确定出所选取的代理服务器的地理位置;向所选取的代理服务器发送执行网络监测操作的请求;接收所选取的代理服务器返回的监测结果,并根据监测结果和预设的网络质量指标确定地理位置的网络是否异常。In the first aspect, the embodiment of the present application provides a network monitoring method, the method includes: receiving a network monitoring request sent by a user for execution by a specified proxy server group; obtaining status information of each proxy server in the proxy server group, the status information includes : CPU utilization rate, memory utilization rate and the number and location information of the monitoring operations performed; according to the CPU utilization rate, memory utilization rate and the number of monitoring operations performed, select a predetermined number of proxy servers from the proxy server group, and determine the The geographical location of the selected proxy server; sending a request to the selected proxy server to perform network monitoring operations; receiving the monitoring result returned by the selected proxy server, and determining whether the network in the geographical location is based on the monitoring result and the preset network quality index abnormal.
在一些实施例中,网络监测操作包括以下至少一项:监测数据包的传输延时和/或丢包率的操作,监测HTTP请求的返回状态的操作,监测是否发生域名劫持的操作,监测网络的路由跳转信息是否异常的操作。In some embodiments, the network monitoring operation includes at least one of the following: the operation of monitoring the transmission delay and/or packet loss rate of the data packet, the operation of monitoring the return status of the HTTP request, the operation of monitoring whether domain name hijacking occurs, and monitoring the network Whether the routing jump information is abnormal.
在一些实施例中,执行网络监测操作的请求包括执行方式标识,执行方式标识用于指示所选取的代理服务器并行/串行执行网络监测操作。In some embodiments, the request to execute the network monitoring operation includes an execution mode identifier, and the execution mode identifier is used to instruct the selected proxy server to execute the network monitoring operation in parallel/serially.
在一些实施例中,根据CPU利用率、内存利用率以及执行的监测操作的数量,从代理服务器组中选取预定数目的代理服务器,包括:按照CPU利用率由小到大的顺序从代理服务器组中选取预定数目的代理服务器;和/或按照内存利用率由小到大的顺序从代理服务器组中选取预定数目的代理服务器;和/或按照执行的监测操作的数量由小到大的顺序从代理服务器组中选取预定数目的代理服务器。In some embodiments, selecting a predetermined number of proxy servers from the proxy server group according to the CPU utilization rate, the memory utilization rate, and the number of monitoring operations performed, including: selecting the proxy server group from the proxy server group in ascending order of the CPU utilization rate Select a predetermined number of proxy servers from among; and/or select a predetermined number of proxy servers from the proxy server group in descending order of memory utilization; and/or select a predetermined number of proxy servers in descending order of the number of monitoring operations performed A predetermined number of proxy servers are selected from the proxy server group.
在一些实施例中,该方法还包括:将监测结果缓存到消息队列中,并在消息队列中对不同的网络监测操作类型创建不同的主题。In some embodiments, the method further includes: buffering the monitoring results in a message queue, and creating different topics in the message queue for different types of network monitoring operations.
在一些实施例中,该方法还包括:响应于接收到包括目标位置区域的网络监测请求,将消息队列中的监测结果进行聚合,得到聚合后的监测结果,并将聚合后的监测结果投递到数据持久化集群中;根据聚合后的监测结果和预设的网络质量指标确定目标位置区域的网络是否异常。In some embodiments, the method further includes: in response to receiving the network monitoring request including the target location area, aggregating the monitoring results in the message queue to obtain the aggregated monitoring results, and posting the aggregated monitoring results to In the data persistence cluster; determine whether the network in the target location area is abnormal according to the aggregated monitoring results and the preset network quality indicators.
在一些实施例中,执行网络监测操作的请求包括以下至少一项:用于指示所选取的代理服务器开始执行网络监测操作的开始时间、用于指示结束执行网络监测操作的结束时间和用于指示周期性执行网络监测操作的执行周期;以及该方法还包括:将开始时间、结束时间和执行周期存储在数据库中。In some embodiments, the request for performing the network monitoring operation includes at least one of the following: a start time for instructing the selected proxy server to start performing the network monitoring operation, an end time for instructing the end of performing the network monitoring operation, and an end time for instructing the selected proxy server to start performing the network monitoring operation. The execution period of the network monitoring operation is periodically executed; and the method further includes: storing the start time, the end time and the execution period in the database.
在一些实施例中,该方法还包括:向代理服务器发送更新请求,以使得代理服务器进行灰度升级;接收代理服务器反馈的更新信息并存储在数据库中。In some embodiments, the method further includes: sending an update request to the proxy server, so that the proxy server performs a grayscale upgrade; receiving update information fed back by the proxy server and storing it in the database.
在一些实施例中,该方法还包括:将代理服务器发送的状态信息存储在数据库中;和/或将用户的用户信息和网络监测请求存储在数据库中。In some embodiments, the method further includes: storing the status information sent by the proxy server in the database; and/or storing the user information and the network monitoring request of the user in the database.
在一些实施例中,向所选取的代理服务器发送执行网络监测操作的请求,包括:响应于接收到所选取的代理服务器定期发送的监测操作请求,向所选取的代理服务器发送执行网络监测操作的请求。In some embodiments, sending a request to the selected proxy server to perform a network monitoring operation includes: in response to receiving a monitoring operation request periodically sent by the selected proxy server, sending a request to the selected proxy server to perform a network monitoring operation ask.
第二方面,本申请实施例提供了一种网络监测装置,该装置包括:接收单元,用于接收用户发送的指定代理服务器组执行的网络监测请求;获取单元,用于获取代理服务器组中每个代理服务器的状态信息,状态信息包括:CPU利用率、内存利用率以及执行的监测操作的数量和位置信息;选取单元,用于根据CPU利用率、内存利用率以及执行的监测操作的数量,从代理服务器组中选取预定数目的代理服务器,并确定出所选取的代理服务器的地理位置;发送单元,用于向所选取的代理服务器发送执行网络监测操作的请求;确定单元,用于接收所选取的代理服务器返回的监测结果,并根据监测结果和预设的网络质量指标确定地理位置的网络是否异常。In the second aspect, the embodiment of the present application provides a network monitoring device, which includes: a receiving unit, configured to receive a network monitoring request sent by a user to be executed by a designated proxy server group; an obtaining unit, configured to obtain each The status information of a proxy server, the status information includes: CPU utilization, memory utilization and the number and location information of the monitoring operations performed; the selection unit is used for according to the CPU utilization, memory utilization and the number of monitoring operations performed, Select a predetermined number of proxy servers from the proxy server group, and determine the geographic location of the selected proxy server; the sending unit is used to send a request to the selected proxy server to perform network monitoring operations; the determination unit is used to receive the selected proxy server The monitoring results returned by the proxy server, and determine whether the network in the geographical location is abnormal according to the monitoring results and the preset network quality indicators.
在一些实施例中,网络监测操作包括以下至少一项:监测数据包的传输延时和/或丢包率的操作,监测HTTP请求的返回状态的操作,监测是否发生域名劫持的操作,监测网络的路由跳转信息是否异常的操作。In some embodiments, the network monitoring operation includes at least one of the following: the operation of monitoring the transmission delay and/or packet loss rate of the data packet, the operation of monitoring the return status of the HTTP request, the operation of monitoring whether domain name hijacking occurs, and monitoring the network Whether the routing jump information is abnormal.
在一些实施例中,执行网络监测操作的请求包括执行方式标识,执行方式标识用于指示所选取的代理服务器并行/串行执行网络监测操作。In some embodiments, the request to execute the network monitoring operation includes an execution mode identifier, and the execution mode identifier is used to instruct the selected proxy server to execute the network monitoring operation in parallel/serially.
在一些实施例中,发送单元用于进一步:按照CPU利用率由小到大的顺序从代理服务器组中选取预定数目的代理服务器;和/或按照内存利用率由小到大的顺序从代理服务器组中选取预定数目的代理服务器;和/或按照执行的监测操作的数量由小到大的顺序从代理服务器组中选取预定数目的代理服务器。In some embodiments, the sending unit is configured to further: select a predetermined number of proxy servers from the proxy server group in ascending order of CPU utilization; and/or select a predetermined number of proxy servers from the proxy server in ascending order of memory utilization Select a predetermined number of proxy servers from the group; and/or select a predetermined number of proxy servers from the proxy server group in ascending order of the number of monitoring operations performed.
在一些实施例中,该装置还包括:缓存单元,用于将监测结果缓存到消息队列中,并在消息队列中对不同的网络监测操作类型创建不同的主题。In some embodiments, the device further includes: a cache unit, configured to cache the monitoring result in a message queue, and create different topics for different types of network monitoring operations in the message queue.
在一些实施例中,该装置还包括:聚合单元,用于响应于接收到包括目标位置区域的网络监测请求,将消息队列中的监测结果进行聚合,得到聚合后的监测结果,并将聚合后的监测结果投递到数据持久化集群中;以及确定单元进一步用于根据聚合后的监测结果和预设的网络质量指标确定目标位置区域的网络是否异常。In some embodiments, the device further includes: an aggregation unit, configured to aggregate the monitoring results in the message queue in response to receiving the network monitoring request including the target location area, obtain the aggregated monitoring results, and aggregate the The monitoring results are delivered to the data persistence cluster; and the determination unit is further used to determine whether the network in the target location area is abnormal according to the aggregated monitoring results and the preset network quality indicators.
在一些实施例中,执行网络监测操作的请求包括以下至少一项:用于指示所选取的代理服务器开始执行网络监测操作的开始时间、用于指示结束执行网络监测操作的结束时间和用于指示周期性执行网络监测操作的执行周期;以及该装置还包括:将开始时间、结束时间和执行周期存储在数据库中。In some embodiments, the request for performing the network monitoring operation includes at least one of the following: a start time for instructing the selected proxy server to start performing the network monitoring operation, an end time for instructing the end of performing the network monitoring operation, and an end time for instructing the selected proxy server to start performing the network monitoring operation. The execution cycle of periodically executing the network monitoring operation; and the apparatus further includes: storing the start time, the end time and the execution cycle in a database.
在一些实施例中,该装置还包括:升级单元,用于向代理服务器发送更新请求,以使得代理服务器进行灰度升级;接收代理服务器反馈的更新信息并存储在数据库中。In some embodiments, the device further includes: an upgrade unit, configured to send an update request to the proxy server, so that the proxy server performs a grayscale upgrade; receive update information fed back by the proxy server and store it in the database.
在一些实施例中,存储单元进一步用于:将代理服务器发送的状态信息存储在数据库中;和/或将用户的用户信息和网络监测请求存储在数据库中。In some embodiments, the storage unit is further configured to: store the status information sent by the proxy server in the database; and/or store the user information and network monitoring request of the user in the database.
在一些实施例中,发送单元进一步用于:响应于接收到所选取的代理服务器定期发送的监测操作请求,向所选取的代理服务器发送执行网络监测操作的请求。In some embodiments, the sending unit is further configured to: send a request to the selected proxy server to perform a network monitoring operation in response to receiving a monitoring operation request periodically sent by the selected proxy server.
第三方面,本申请实施例提供了一种服务器,包括:一个或多个处理器;存储装置,用于存储一个或多个程序,当一个或多个程序被一个或多个处理器执行,使得一个或多个处理器实现如第一方面中任一的方法。In a third aspect, the embodiment of the present application provides a server, including: one or more processors; a storage device for storing one or more programs, when one or more programs are executed by one or more processors, One or more processors are caused to implement the method according to any one of the first aspect.
第四方面,本申请实施例提供了该程序被处理器执行时实现如第一方面中任一的方法。In a fourth aspect, the embodiment of the present application provides that when the program is executed by a processor, any one of the methods in the first aspect is implemented.
本申请实施例提供的网络监测方法和装置,从用户指定的分布在不同位置区域的代理服务器(Agent)组中选取当前负载适宜监测网络的代理服务器,并向所选取的代理服务器发送执行网络监测操作的请求,根据代理服务器返回的监测结果和预设的网络质量指标确定所选取的代理服务器所在的地理位置的网络是否异常。本申请通过部署在全国各省市不同运营商上的代理服务器执行用户下发的不同类型的监测任务,充分模拟用户对核心业务的访问情况来对全国各省市运营商的网络质量进行实时监测,并生成预警来实现业务的及时切换,减少因为网络问题导致的业务损失。相比现有实现方案,该技术实现方案更贴近用户的真实场景,且监测种类多样化,可以根据业务需求进行灵活扩展,大大降低了运营成本。In the network monitoring method and device provided in the embodiments of the present application, an agent server whose current load is suitable for monitoring the network is selected from the agent server (Agent) group specified by the user and distributed in different location areas, and sends an execution network monitoring message to the selected agent server. According to the monitoring result returned by the proxy server and the preset network quality index, it is determined whether the network in the geographic location where the selected proxy server is located is abnormal. This application implements different types of monitoring tasks issued by users through proxy servers deployed on different operators in various provinces and cities across the country, fully simulating users' access to core services to monitor the network quality of operators in various provinces and cities across the country in real time, and Generate early warnings to realize timely switching of services and reduce business losses caused by network problems. Compared with the existing implementation schemes, this technology implementation scheme is closer to the real scene of the user, and the types of monitoring are diversified, and it can be flexibly expanded according to business needs, greatly reducing operating costs.
附图说明Description of drawings
通过阅读参照以下附图所作的对非限制性实施例所作的详细描述,本申请的其它特征、目的和优点将会变得更明显:Other characteristics, objects and advantages of the present application will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings:
图1是本申请可以应用于其中的示例性系统架构图;FIG. 1 is an exemplary system architecture diagram to which the present application can be applied;
图2是根据本申请的网络监测方法的一个实施例的流程图;Fig. 2 is a flow chart according to an embodiment of the network monitoring method of the present application;
图3是根据本申请的网络监测方法的一个应用场景的示意图;FIG. 3 is a schematic diagram of an application scenario of a network monitoring method according to the present application;
图4是根据本申请的网络监测方法的又一个实施例的流程图;FIG. 4 is a flowchart of another embodiment of the network monitoring method according to the present application;
图5是根据本申请的网络监测方法的服务器和代理服务器之间的消息交互流程图;Fig. 5 is a flow chart of message interaction between the server and the proxy server according to the network monitoring method of the present application;
图6是根据本申请的网络监测装置的一个实施例的结构示意图;FIG. 6 is a schematic structural diagram of an embodiment of a network monitoring device according to the present application;
图7是适于用来实现本申请实施例的服务器的计算机系统的结构示意图。FIG. 7 is a schematic structural diagram of a computer system suitable for implementing the server of the embodiment of the present application.
具体实施方式Detailed ways
下面结合附图和实施例对本申请作进一步的详细说明。可以理解的是,此处所描述的具体实施例仅仅用于解释相关发明,而非对该发明的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与有关发明相关的部分。The application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain related inventions, rather than to limit the invention. It should also be noted that, for the convenience of description, only the parts related to the related invention are shown in the drawings.
需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。下面将参考附图并结合实施例来详细说明本申请。It should be noted that, in the case of no conflict, the embodiments in the present application and the features in the embodiments can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and embodiments.
图1示出了可以应用本申请的网络监测方法或网络监测装置的实施例的示例性系统架构100。FIG. 1 shows an exemplary system architecture 100 to which embodiments of the network monitoring method or network monitoring device of the present application can be applied.
如图1所示,系统架构100可以包括终端设备101、102、103,服务器104,代理服务器105、106、107和目标服务器108。终端设备101、102、103,服务器104,代理服务器105、106、107和目标服务器108之间通过通信链路互联,例如有线、无线通信链路或者光纤电缆等等。As shown in FIG. 1 , the system architecture 100 may include terminal devices 101 , 102 , 103 , a server 104 , proxy servers 105 , 106 , 107 and a target server 108 . Terminal devices 101, 102, 103, server 104, proxy servers 105, 106, 107, and target server 108 are interconnected through communication links, such as wired, wireless communication links or optical fiber cables.
用户可以使用终端设备101、102、103通过服务器104和代理服务器105、106、107监测目标服务器108的网络连接质量。终端设备101、102、103上可以安装有各种通讯客户端应用例如网页浏览器应用、购物类应用、搜索类应用、即时通信工具、邮箱客户端、社交平台软件等。Users can use terminal devices 101 , 102 , 103 to monitor the network connection quality of target server 108 through server 104 and proxy servers 105 , 106 , 107 . Various communication client applications such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, and social platform software can be installed on the terminal devices 101, 102, and 103.
终端设备101、102、103可以是具有显示屏并且支持网页浏览的各种电子设备,包括但不限于智能手机、平板电脑、电子书阅读器、MP3播放器(Moving Picture ExpertsGroup Audio Layer III,动态影像专家压缩标准音频层面3)、MP4(Moving PictureExperts Group Audio Layer IV,动态影像专家压缩标准音频层面4)播放器、膝上型便携计算机和台式计算机等等。Terminal devices 101, 102, 103 can be various electronic devices with display screens and support web browsing, including but not limited to smartphones, tablet computers, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III, moving picture Expert Compression Standard Audio Layer 3), MP4 (Moving PictureExperts Group Audio Layer IV, Moving Picture Experts Compression Standard Audio Layer 4) Players, Laptop Portable Computers and Desktop Computers, etc.
服务器104可以是提供各种服务的服务器,例如对终端设备101、102、103上显示的网络质量信息网页提供支持的网络监测服务器。网络监测服务器可以对接收到的网络监测请求等数据进行分析等处理,并根据处理结果分配用于进行网络监测的代理服务器105、106、107。代理服务器105、106、107执行网络监测操作,并将监测结果(例如网络的异常数据)反馈给终端设备。The server 104 may be a server that provides various services, for example, a network monitoring server that supports the network quality information web pages displayed on the terminal devices 101 , 102 , and 103 . The network monitoring server can analyze and process received data such as network monitoring requests, and allocate proxy servers 105, 106, and 107 for network monitoring according to the processing results. The proxy servers 105, 106, 107 perform network monitoring operations, and feed back monitoring results (such as network abnormal data) to terminal devices.
需要说明的是,本申请实施例所提供的网络监测方法一般由服务器104和代理服务器105、106、107执行,相应地,网络监测装置一般设置于服务器104和代理服务器105、106、107中。It should be noted that the network monitoring method provided by the embodiment of the present application is generally executed by the server 104 and the proxy servers 105, 106, 107, and correspondingly, the network monitoring device is generally set in the server 104 and the proxy servers 105, 106, 107.
应该理解,图1中的终端设备、服务器、代理服务器、目标服务器的数目仅仅是示意性的。根据实现需要,可以具有任意数目的终端设备、网络和服务器。It should be understood that the numbers of terminal devices, servers, proxy servers, and target servers in FIG. 1 are only illustrative. According to the implementation needs, there can be any number of terminal devices, networks and servers.
继续参考图2,示出了根据本申请的网络监测方法的一个实施例的流程200。该网络监测方法,包括以下步骤:Continuing to refer to FIG. 2 , a flow 200 of an embodiment of the network monitoring method according to the present application is shown. The network monitoring method includes the following steps:
步骤201,接收用户发送的指定代理服务器组执行的网络监测请求。Step 201, receiving a network monitoring request to be executed by a designated proxy server group sent by a user.
在本实施例中,网络方法运行于其上的电子设备(例如图1所示的服务器104)可以通过有线连接方式或者无线连接方式从用户利用其进行网络监测的终端接收指定代理服务器组执行的网络监测请求。服务器收到过多个代理服务器的位置信息,位置信息包括地理位置信息和运营商信息。可预先根据位置区域将多个代理服务器分组。例如,收到代理服务器A发送的位置信息为北京联通,代理服务器B发送的位置信息为北京电信,代理服务器C发送的位置信息为北京联通,代理服务器D发送的位置信息为上海联通,则将代理服务器A和B分为一组,代理服务器C为一组,代理服务器D为一组。用户可以指定分组为北京联通的代理服务器组执行的网络监测请求。In this embodiment, the electronic device on which the network method runs (for example, the server 104 shown in FIG. 1 ) can receive the command executed by the designated proxy server group from the terminal that the user uses to monitor the network through a wired connection or a wireless connection. Network monitoring request. The server has received location information of multiple proxy servers, and the location information includes geographic location information and operator information. Multiple proxy servers may be grouped according to location area in advance. For example, if the location information sent by proxy server A is Beijing Unicom, the location information sent by proxy server B is Beijing Telecom, the location information sent by proxy server C is Beijing Unicom, and the location information sent by proxy server D is Shanghai Unicom, then the Proxy servers A and B are divided into one group, proxy server C is in one group, and proxy server D is in one group. Users can specify groups to perform network monitoring requests for Beijing Unicom's proxy server group.
步骤202,获取该代理服务器组中每个代理服务器的状态信息。Step 202, acquire status information of each proxy server in the proxy server group.
在本实施例中,每个代理服务器的状态信息可包括:CPU利用率、内存利用率以及执行的监测操作的数量和位置信息等信息。该状态信息可由代理服务器定时上报。位置信息包括地理位置信息和运营商信息。例如,北京市联通,广东移动等。监测操作的数量为代理服务器执行网络监测时的操作(例如,发送ICMP(Internet Control Message Protocol,Internet控制报文协议)包,HTTP请求等)的数量。In this embodiment, the status information of each proxy server may include information such as CPU utilization, memory utilization, and the number and location information of the monitoring operations performed. The status information can be regularly reported by the proxy server. The location information includes geographic location information and operator information. For example, Beijing Unicom, Guangdong Mobile and so on. The number of monitoring operations is the number of operations (for example, sending ICMP (Internet Control Message Protocol, Internet Control Message Protocol) packets, HTTP requests, etc.) when the proxy server performs network monitoring.
步骤203,根据CPU利用率、内存利用率以及执行的监测操作的数量,从代理服务器组中选取预定数目的代理服务器,并确定出所选取的代理服务器的地理位置。Step 203: Select a predetermined number of proxy servers from the proxy server group according to CPU utilization, memory utilization and the number of monitoring operations performed, and determine the geographic location of the selected proxy servers.
在本实施例中,可以从该代理服务器组中多个候选的代理服务器中选取负载较小的代理服务器执行监测操作。负载情况可参考CPU利用率、内存利用率以及执行的监测操作的数量。CPU利用率和内存利用率越高以及执行的监测操作的数量越多,说明负载重,不适宜执行监测操作。根据步骤202获得的位置信息可以确定所选取的代理服务器的地理位置。In this embodiment, a proxy server with a smaller load may be selected from multiple candidate proxy servers in the proxy server group to perform the monitoring operation. The load profile can refer to CPU utilization, memory utilization, and the number of monitoring operations performed. The higher the CPU utilization rate and memory utilization rate and the greater the number of monitoring operations performed, it means that the load is heavy and it is not suitable to perform monitoring operations. The geographic location of the selected proxy server can be determined according to the location information obtained in step 202 .
在本实施例的一些可选的实现方式中,将代理服务器发送的状态信息存储在数据库中,和/或将用户的用户信息和网络监测请求存储在数据库中。该数据库可以是MySQL数据库。In some optional implementation manners of this embodiment, the status information sent by the proxy server is stored in the database, and/or the user information and network monitoring request of the user are stored in the database. The database can be a MySQL database.
步骤204,向所选取的代理服务器发送执行网络监测操作的请求。Step 204, sending a request for performing a network monitoring operation to the selected proxy server.
在本实施例中,基于步骤203选取的服务器,向所选取的代理服务器发送执行网络监测操作的请求。网络监测操作的方式有多种,可针对不同代理服务器的负载情况有针对性地发送网络监测操作的请求。例如,对于负载重的代理服务器可发送单一方式的网络监测操作的请求,例如,仅发送ICMP包。对于负载较轻的代理服务器可发送多种方式的网络监测操作的请求,例如,并行执行发送ICMP包,HTTP请求,DNS检测等操作。In this embodiment, based on the server selected in step 203, a request for performing a network monitoring operation is sent to the selected proxy server. There are many ways of network monitoring operation, and the request for network monitoring operation can be sent in a targeted manner according to the load conditions of different proxy servers. For example, a heavily loaded proxy server may send requests for network monitoring operations in a single mode, for example, sending only ICMP packets. A proxy server with a light load can send requests for network monitoring operations in various ways, for example, perform operations such as sending ICMP packets, HTTP requests, and DNS detection in parallel.
在本实施例的一些可选的实现方式中,网络监测操作包括以下至少一项:监测数据包的传输延时和/或丢包率的操作,监测HTTP请求的返回状态的操作,监测是否发生域名劫持的操作,监测网络的路由跳转信息是否异常的操作。具体的监测操作的示例可如下所示:In some optional implementations of this embodiment, the network monitoring operation includes at least one of the following: the operation of monitoring the transmission delay and/or packet loss rate of the data packet, the operation of monitoring the return status of the HTTP request, and monitoring whether The operation of domain name hijacking, the operation of monitoring whether the routing information of the network is abnormal. An example of a specific monitoring operation could be as follows:
a)ICMP-PING:通过底层发送ICMP包的监测方式,可以知道代理服务器所在省市运营商到某一IP或域名的基本网络状况,通过延时和丢包率来体现。a) ICMP-PING: Through the monitoring method of sending ICMP packets at the bottom layer, you can know the basic network status of the operator in the province and city where the proxy server is located to a certain IP or domain name, which is reflected by the delay and packet loss rate.
b)TCP-PING:底层发送TCP包到目的端,目的端直接返回一个Reset包,通过记录发包和回包时间计算延时,通过统计回包个数来计算丢包率,增加TCP-PING的任务类型主要是由于某些运营商对ICMP包进行了压制,而对TCP包一般不会限制。b) TCP-PING: The bottom layer sends a TCP packet to the destination, and the destination directly returns a Reset packet, calculates the delay by recording the sending and returning time of the packet, calculates the packet loss rate by counting the number of returned packets, and increases the TCP-PING The task type is mainly due to the suppression of ICMP packets by some operators, but generally there is no restriction on TCP packets.
c)HTTP:通过在代理服务器内部对互联网上某一网址发起HTTP请求的方式,我们能够充分模拟用户浏览某一网页,这也是最贴近用户行为的一种监测任务方式,监测结果通过HTTP返回状态码和其他各种结果参数来体现。c) HTTP: By initiating an HTTP request to a website on the Internet inside the proxy server, we can fully simulate a user browsing a certain webpage, which is also a monitoring task method that is closest to user behavior, and the monitoring result returns the status through HTTP code and various other result parameters.
d)DNS:通过在代理服务器内部对某一域名进行解析,然后与标准域名解析作对比,可以监测在该地区该运营商的网络下是否发生了针对某一域名的DNS劫持(在劫持的网络范围内拦截域名解析的请求,分析请求的域名,把审查范围以外的请求放行,否则返回假的IP地址或者什么都不做使请求失去响应,其效果就是对特定的网络不能反应或访问的是假网址)。d) DNS: By analyzing a domain name inside the proxy server, and then comparing it with the standard domain name resolution, it is possible to monitor whether DNS hijacking for a domain name has occurred under the network of the operator in the area (in the hijacked network Intercept domain name resolution requests within the scope, analyze the requested domain name, and release requests outside the scope of review, otherwise return a false IP address or do nothing to make the request unresponsive, and the effect is that it cannot respond to or access a specific network. fake URL).
e)Traceroute:Traceroute是用来发出数据包的主机到目标主机之间所经过的网关的工具。通过在代理服务器内部对某一IP或者域名进行Traceroute监测,可以知晓该代理服务器所在地区网络访问某一IP或域名的整个路由跳转情况。e) Traceroute: Traceroute is a tool used to pass through the gateway between the host sending the data packet and the target host. By performing Traceroute monitoring on a certain IP or domain name inside the proxy server, you can know the entire routing jump situation of accessing a certain IP or domain name from the network where the proxy server is located.
在本实施例的一些可选的实现方式中,执行网络监测操作的请求包括执行方式标识,执行方式标识用于指示所选取的代理服务器并行/串行执行网络监测操作。例如,如果执行方式标识为并行,则同时执行上述多个监测操作。如果执行方式标识为串行,则一次只执行一种上述监测操作,在一种监测操作结束后再执行另一种。服务器可根据代理服务器当前负载情况调整执行方式。对同一组代理服务器可发送不同的执行方式。例如,代理服务器A上已经运行8个监测任务,而代理服务器B目前空闲,则可针对代理服务器A发送的执行方式标识为串行,针对代理服务器B发送的执行方式标识为并行。In some optional implementations of this embodiment, the request to execute the network monitoring operation includes an execution mode identifier, and the execution mode identifier is used to instruct the selected proxy server to execute the network monitoring operation in parallel/serially. For example, if the execution mode is identified as parallel, the above-mentioned multiple monitoring operations are executed simultaneously. If the execution mode is identified as serial, only one of the above-mentioned monitoring operations is performed at a time, and another one is performed after one monitoring operation is completed. The server can adjust the execution mode according to the current load condition of the proxy server. Different implementations can be sent to the same set of proxy servers. For example, 8 monitoring tasks have been running on proxy server A, and proxy server B is currently idle, then the execution mode sent by proxy server A can be marked as serial, and the execution mode sent by proxy server B can be marked as parallel.
在本实施例的一些可选的实现方式中,根据CPU利用率、内存利用率以及执行的监测操作的数量,从该代理服务器组中选取预定数目的代理服务器,包括:按照CPU利用率由小到大的顺序从该代理服务器组中选取预定数目的代理服务器;和/或按照内存利用率由小到大的顺序从该代理服务器组中选取预定数目的代理服务器;和/或按照执行的监测操作的数量由小到大的顺序从该代理服务器组中选取预定数目的代理服务器。例如,如果预定数目为1,而代理服务器A的CPU利用率为80%,代理服务器B的CPU利用率为20%,则选择代理服务器B执行监测操作。在CPU利用率相同时,可参考内存利用率的大小,选择内存利用率低的代理服务器。如果CPU利用率和内存利用率都相同时,可参考执行的监测操作的数量,选择执行的监测操作的数量较少的代理服务器。In some optional implementations of this embodiment, a predetermined number of proxy servers are selected from the proxy server group according to CPU utilization, memory utilization and the number of monitoring operations performed, including: Select a predetermined number of proxy servers from the proxy server group in order of increasing memory utilization; and/or select a predetermined number of proxy servers from the proxy server group in ascending order of memory utilization; and/or according to the monitoring performed Select a predetermined number of proxy servers from the proxy server group in ascending order of the number of operations. For example, if the predetermined number is 1, and the CPU utilization rate of the proxy server A is 80%, and the CPU utilization rate of the proxy server B is 20%, then the proxy server B is selected to perform the monitoring operation. When the CPU utilization is the same, you can refer to the size of the memory utilization to select a proxy server with a low memory utilization. If the CPU utilization rate and memory utilization rate are the same, the number of monitoring operations performed may be referred to, and a proxy server with a smaller number of monitoring operations performed may be selected.
在本实施例的一些可选的实现方式中,执行网络监测操作的请求包括以下至少一项:用于指示所选取的代理服务器开始执行网络监测操作的开始时间、用于指示结束执行网络监测操作的结束时间和用于指示周期性执行网络监测操作的执行周期;以及该方法还包括:将开始时间、结束时间和执行周期存储在数据库中,例如MySQL数据库。服务器可以通过开始时间、结束时间和执行周期控制代理服务器的工作状态。并且可以确定代理服务器的状态信息,即使没收到代理服务器发送的状态信息,也可根据之前发送的开始时间、结束时间和执行周期推算代理服务器的状态信息。In some optional implementations of this embodiment, the request for performing the network monitoring operation includes at least one of the following: a start time for instructing the selected proxy server to start performing the network monitoring operation, an indication for ending the execution of the network monitoring operation The end time and the execution period used to indicate the periodic execution of the network monitoring operation; and the method further includes: storing the start time, the end time and the execution period in a database, such as a MySQL database. The server can control the working status of the proxy server through the start time, end time and execution cycle. And the status information of the proxy server can be determined. Even if the status information sent by the proxy server is not received, the status information of the proxy server can be calculated according to the start time, end time and execution cycle sent before.
在本实施例的一些可选的实现方式中,向所选取的代理服务器发送执行网络监测操作的请求,包括:响应于接收到所选取的代理服务器定期发送的监测操作请求,向所选取的代理服务器发送执行网络监测操作的请求。这种情况下,服务器不主动发监测请求,而是等待接收到代理服务器主动请求监测时,再发给代理服务器。In some optional implementations of this embodiment, sending a request to the selected proxy server to perform a network monitoring operation includes: in response to receiving the monitoring operation request periodically sent by the selected proxy server, sending the selected proxy server The server sends a request to perform a network monitoring operation. In this case, the server does not actively send a monitoring request, but waits to receive the monitoring request from the proxy server before sending it to the proxy server.
步骤205,接收所选取的代理服务器返回的监测结果,并根据监测结果和预设的网络质量指标确定上述地理位置的网络是否异常。Step 205, receiving the monitoring result returned by the selected proxy server, and determining whether the network in the above geographic location is abnormal according to the monitoring result and the preset network quality index.
在本实施例中,监测结果可包括时延、丢包率等监测操作得到的信息。根据预设的网络质量指标(例如,丢包率阈值,时延阈值,HTTP请求成功率阈值等)确定代理服务器所在的地理位置的网络是否异常。例如,如果丢包率达到丢包率阈值10%以上则可认为该地理位置的网络异常。In this embodiment, the monitoring result may include information obtained from monitoring operations such as time delay and packet loss rate. Determine whether the network at the geographic location where the proxy server is located is abnormal according to preset network quality indicators (eg, packet loss rate threshold, delay threshold, HTTP request success rate threshold, etc.). For example, if the packet loss rate exceeds 10% of the packet loss rate threshold, it may be considered that the network in the geographic location is abnormal.
在本实施例的一些可选的实现方式中,向代理服务器发送更新请求,以使得代理服务器进行灰度升级。接收代理服务器反馈的更新信息并存储在数据库中。灰度升级是一种升级时候的平滑切换,当有些代理服务器要进行升级,这时就得先升级其中的一个代理服务器,作为测试,以确保升级无误。也就是说所有代理服务器不同步更新升级(例如这次只是广东更新)。升级完成后,再升级其他地区的服务器。In some optional implementation manners of this embodiment, an update request is sent to the proxy server, so that the proxy server performs a grayscale upgrade. Receive the updated information fed back by the proxy server and store it in the database. Grayscale upgrade is a smooth switch during upgrade. When some proxy servers need to be upgraded, one of the proxy servers must be upgraded first as a test to ensure that the upgrade is correct. That is to say, all proxy servers are not updated and upgraded synchronously (for example, this time it is only Guangdong update). After the upgrade is complete, upgrade servers in other regions.
继续参见图3,图3是根据本实施例的网络监测方法的应用场景的一个示意图。在图3的应用场景中,服务器300包括:任务调度服务器302、DB(Database,数据库)服务器303,状态管理服务器304,Server服务器305、数据队列308、实时计算集群309和分布式数据库集群310。代理服务器包括下载器306和Agent(代理服务器)307。用户通过用户终端301向服务器300发送的网络监测请求,服务器300选取代Agent307执行网络监测操作。Agent307将监测结果返回给服务器300。具体工作如下所示:Continue to refer to FIG. 3 , which is a schematic diagram of an application scenario of the network monitoring method according to this embodiment. In the application scenario of FIG. 3 , the server 300 includes: a task scheduling server 302, a DB (Database, database) server 303, a state management server 304, a Server server 305, a data queue 308, a real-time computing cluster 309 and a distributed database cluster 310. The proxy server includes a downloader 306 and an Agent (proxy server) 307 . The user sends a network monitoring request to the server 300 through the user terminal 301, and the server 300 chooses to replace the Agent 307 to perform the network monitoring operation. Agent 307 returns the monitoring result to server 300 . The specific work is as follows:
用户终端301:用户通过用户终端301向服务器300发送指定代理服务器组执行的网络监测请求,并可接收服务器300返回的监测结果。User terminal 301: the user sends a network monitoring request to the server 300 through the user terminal 301, and can receive the monitoring result returned by the server 300.
任务调度服务器302:负责根据用户下发的监测请求生成Agent307内部可以执行的监测操作和任务,主要功能包括:接收用户下发的监测任务,并转化成Agent307内部执行的监测操作和任务。任务调度服务器302生成监测操作和任务时,需结合Agent分组,Agent307所在的CPU和内存状态以及Agent正在运行的监测任务数量这几个维度的信息,选举出该次监测任务下发的最佳Agent。Task scheduling server 302: responsible for generating monitoring operations and tasks that can be performed inside Agent307 according to monitoring requests issued by users. The main functions include: receiving monitoring tasks issued by users and transforming them into monitoring operations and tasks performed internally by Agent307. When the task scheduling server 302 generates monitoring operations and tasks, it needs to combine the Agent grouping, the CPU and memory status of the Agent 307, and the number of monitoring tasks that the Agent is running to select the best Agent for this monitoring task. .
DB服务器303:负责持久化存储业务信息,采用MySQL实现,主要功能如下:持久化存储用户信息和用户下发的监测任务信息。持久化存储上下载器306和Agent307的状态信息;DB server 303: responsible for persistent storage of business information, implemented by MySQL, with the following main functions: persistent storage of user information and monitoring task information issued by users. persistently store the status information of the uploader and downloader 306 and the Agent307;
状态管理服务器304:负责维护系统中各个资源的状态信息,主要功能如下:定时更新上下载器306和Agent307状态,主要有在线和离线两种状态。根据监测任务,即监测操作的起止运行时间,定时更新其运行状态,主要有执行和停止两种状态。Status management server 304: responsible for maintaining the status information of each resource in the system, the main functions are as follows: regularly update the status of the uploader and downloader 306 and Agent 307, mainly including online and offline status. According to the monitoring task, that is, the start and end running time of the monitoring operation, its running status is regularly updated, mainly including execution and stop.
Server服务器305:负责接收Agent询问,接收Agent上报的任务运行结果,主要功能包括:接收Agent307是否有新的监测任务的定期询问,若有,将监测任务的具体信息返回给Agent。接收Agent上报的任务运行结果,并根据任务类型分别做简单的数据预处理,然后将其投递到数据队列中。Server 305: responsible for receiving inquiries from the Agent, and receiving the task running results reported by the Agent. The main functions include: receiving regular inquiries from the Agent 307 whether there are new monitoring tasks, and if so, returning the specific information of the monitoring tasks to the Agent. Receive the task running results reported by the Agent, perform simple data preprocessing according to the task type, and then deliver them to the data queue.
下载器306负责对全国各省市运营商上部署的Agent307进行安装和更新,主要功能包括:根据系统版本和运营商为其分配的公网IP,对上Agent307进行灰度更新;The downloader 306 is responsible for installing and updating the Agent 307 deployed on operators in various provinces and cities across the country. The main functions include: according to the system version and the public network IP assigned to it by the operator, grayscale update of the Agent 307;
Agent307:采集运行状态指标,运行用户下发的网络监测请求,主要功能如下:采集的运行状态指标,包括的CPU和内存使用情况,以及Agent运行任务个数,当Agent307运行对产生较大负载时,本身的自杀机制能够保证的正常业务不受影响。定时询问Server服务器305是否有新分配给自己的监测操作,若有,则从Server服务器305拉取监测操作信息,并根据唯一的监测操作ID从Server服务器拉取该监测操作下所包含的任务信息,根据任务中包含的执行时间轴在本地执行,并将运行结果批量上报给Server服务器305。Agent307在Server服务器305获取的监测操作可以包含多个不同类型的任务,主要包括ICMP-PING、TCP-PING、HTTP、DNS、Traceroute等监测类型,并且Agent307支持串行和并行两种执行方式。Agent307: Collect running status indicators and execute network monitoring requests issued by users. The main functions are as follows: collected running status indicators, including CPU and memory usage, and the number of Agent running tasks. When Agent307 runs to generate a large load , The normal business that can be guaranteed by its own suicide mechanism will not be affected. Regularly ask whether the Server server 305 has a new monitoring operation assigned to itself, if so, pull the monitoring operation information from the Server server 305, and pull the task information contained in the monitoring operation from the Server server according to the unique monitoring operation ID , execute locally according to the execution timeline included in the task, and report the running results to the Server 305 in batches. The monitoring operations acquired by Agent 307 on Server 305 may include multiple different types of tasks, mainly including ICMP-PING, TCP-PING, HTTP, DNS, Traceroute and other monitoring types, and Agent 307 supports serial and parallel execution modes.
数据队列308:负责缓存Agent307上报的执行结果,主要功能如下:对Agent307上报的监测结果进行缓存,防止数据的丢失,本申请中采用开源的消息队列Kafka,对于Agent307中运行的不同任务类型,需在Kafka中创建不同的主题(Topic)。Data queue 308: responsible for caching the execution results reported by Agent307, the main functions are as follows: caching the monitoring results reported by Agent307 to prevent data loss. The open source message queue Kafka is used in this application. For different task types running in Agent307, it needs Create different topics (Topic) in Kafka.
实时计算集群309:负责将Agent307上报的数据按照业务需求进行实时聚合,将聚合结果以及原始数据投递到分布式数据集群310,例如,数据持久化集群。本申请中采用开源的流式实时计算集群Storm(一个分布式的、容错的实时计算系统),主要功能如下:持续抓取数据队列308中的监测数据,并根据提前设置好的聚合维度对数据进行聚合,并将聚合结果投递到数据持久化集群。为了避免原始数据的丢失,实时计算集群309也会将一份原始数据投递到数据持久化集群。Real-time computing cluster 309: responsible for real-time aggregation of data reported by Agent 307 according to business requirements, and delivery of aggregation results and original data to distributed data cluster 310, for example, data persistence cluster. In this application, an open-source streaming real-time computing cluster Storm (a distributed, fault-tolerant real-time computing system) is used. Perform aggregation and deliver the aggregation result to the data persistence cluster. In order to avoid the loss of the original data, the real-time computing cluster 309 will also deliver a copy of the original data to the data persistence cluster.
分布式数据集群310:将Agent307上报的监测数据进行持久化存储,主要功能如下:对原始数据和聚合后的数据进行持久化存储,本申请中采用Druid(一个用于大数据实时查询和分析的高容错、高性能开源分布式系统,旨在快速处理大规模的数据,并能够实现快速查询和分析)。Distributed data cluster 310: persistently store the monitoring data reported by Agent307, the main functions are as follows: persistently store the original data and aggregated data, Druid (a real-time query and analysis for big data) is used in this application Highly fault-tolerant, high-performance open source distributed system, designed to quickly process large-scale data, and enable fast query and analysis).
本申请的上述实施例提供的方法通过分布在各地的代理服务器,实现了从各省市运营商到核心机房的正向探测,补充了之前只能做反向探测的不足。监测操作可以充分模拟用户的上网行为,其监测结果更加贴近真实场景,数据更加可靠。有效利用了普遍存在的x86硬件资源和开源解决方案,降低了研发成本。能够结合自身相关业务进行深度定制,具有良好的可扩展性。覆盖全国绝大多是地级市及不同运营商,数据全面。取代了第三基调监测,节省了公司运营成本。The method provided by the above-mentioned embodiments of the present application realizes the forward detection from the operators in various provinces and cities to the core computer room through the proxy servers distributed in various places, which makes up for the deficiency that only reverse detection can be done before. The monitoring operation can fully simulate the user's online behavior, the monitoring results are closer to the real scene, and the data is more reliable. Effective use of ubiquitous x86 hardware resources and open source solutions reduces research and development costs. It can be deeply customized in combination with its own related business, and has good scalability. Covering most of the country's prefecture-level cities and different operators, the data is comprehensive. Replaced the third tone monitoring, saving the company operating costs.
进一步参考图4,其示出了网络监测方法的又一个实施例的流程400。该网络监测方法的流程400,包括以下步骤:Further referring to FIG. 4 , it shows a flow 400 of another embodiment of the network monitoring method. The process 400 of the network monitoring method includes the following steps:
步骤401,接收用户发送的指定代理服务器组执行的网络监测请求。Step 401, receiving a network monitoring request to be executed by a designated proxy server group sent by a user.
步骤402,获取代理服务器组中每个代理服务器的状态信息。Step 402, acquiring status information of each proxy server in the proxy server group.
步骤403,根据CPU利用率、内存利用率以及执行的监测操作的数量,从代理服务器组中选取预定数目的代理服务器,并确定出所选取的代理服务器的地理位置。Step 403: Select a predetermined number of proxy servers from the proxy server group according to CPU utilization, memory utilization and the number of monitoring operations performed, and determine the geographic location of the selected proxy servers.
步骤404,向所选取的代理服务器发送执行网络监测操作的请求。Step 404, sending a request for performing a network monitoring operation to the selected proxy server.
步骤405,接收所选取的代理服务器返回的监测结果,并根据监测结果和预设的网络质量指标确定地理位置的网络是否异常。Step 405, receiving the monitoring result returned by the selected proxy server, and determining whether the network in the geographic location is abnormal according to the monitoring result and the preset network quality index.
步骤401-405,与步骤201-205基本相同,因此不再赘述。Steps 401-405 are basically the same as steps 201-205, so details are not repeated here.
步骤406,将监测结果缓存到消息队列中,并在消息队列中对不同的网络监测操作类型创建不同的主题。In step 406, the monitoring result is cached in the message queue, and different topics are created in the message queue for different types of network monitoring operations.
在本实施例中,可采用Kafka消息队列按监测操作类型(例如,监测丢包率、HTTP请求成功率等)进行缓存。Kafka是一种高吞吐量的分布式发布订阅消息系统,有如下特性:通过O(1)的磁盘数据结构提供消息的持久化,这种结构对于即使数以TB的消息存储也能够保持长时间的稳定性能。高吞吐量:即使是非常普通的硬件Kafka也可以支持每秒数百万的消息。支持通过Kafka服务器和消费机集群来分区消息。支持Hadoop并行数据加载。每条发布到Kafka集群的消息都有一个类别,这个类别被称为主题(Topic),物理上不同Topic的消息分开存储,逻辑上一个Topic的消息虽然保存于一个或多个Broker(Kafka集群包含一个或多个服务器,这种服务器被称为Broker)上但用户只需指定消息的Topic即可生产或消费数据而不必关心数据存于何处。In this embodiment, the Kafka message queue can be used to cache according to the monitoring operation type (for example, monitoring packet loss rate, HTTP request success rate, etc.). Kafka is a high-throughput distributed publish-subscribe message system with the following characteristics: Provide message persistence through O(1) disk data structure, which can maintain long-term storage even for messages with several terabytes stable performance. High Throughput: Even very modest hardware Kafka can support millions of messages per second. Support for partitioning messages through Kafka server and consumer machine clusters. Support Hadoop parallel data loading. Each message published to the Kafka cluster has a category. This category is called a topic (Topic). Physically, messages of different Topics are stored separately. Logically, a Topic message is stored in one or more Brokers (the Kafka cluster contains One or more servers, this kind of server is called Broker), but users only need to specify the Topic of the message to produce or consume data without caring about where the data is stored.
步骤407,响应于接收到包括目标位置区域的网络监测请求,将消息队列中的监测结果进行聚合,得到聚合后的监测结果,并将聚合后的监测结果投递到数据持久化集群中。Step 407, in response to receiving the network monitoring request including the target location area, aggregate the monitoring results in the message queue to obtain the aggregated monitoring results, and post the aggregated monitoring results to the data persistence cluster.
在本实施例中,实时计算集群Storm会从Kafka中不断消费结果数据,按业务需求对数据进行聚合,并将聚合后的结果投递到后端数据持久化集群中。同时,Storm也可以上传一份原始数据到数据持久化集群中进行持久化,防止原始数据的丢失。In this embodiment, the real-time computing cluster Storm will continuously consume the result data from Kafka, aggregate the data according to business requirements, and deliver the aggregated results to the back-end data persistence cluster. At the same time, Storm can also upload a copy of original data to the data persistence cluster for persistence to prevent loss of original data.
步骤408,根据聚合后的监测结果和预设的网络质量指标确定目标位置区域的网络是否异常。Step 408: Determine whether the network in the target location area is abnormal according to the aggregated monitoring results and the preset network quality index.
在本实施例中,监测结果可包括时延、丢包率等监测操作得到的属于同一目标位置区域的多个网址的网络质量信息。根据预设的网络质量指标(例如,丢包率阈值,时延阈值,HTTP请求成功率等)和多个网址的网络质量信息的平均值确定目标位置区域是否异常。例如,如果多个网址的平均丢包率达到10%以上则可认为目标位置区域的网络异常。In this embodiment, the monitoring results may include network quality information of multiple URLs belonging to the same target location area obtained through monitoring operations such as time delay and packet loss rate. Determine whether the target location area is abnormal according to preset network quality indicators (eg, packet loss rate threshold, delay threshold, HTTP request success rate, etc.) and the average value of network quality information of multiple URLs. For example, if the average packet loss rate of multiple URLs exceeds 10%, it can be considered that the network in the target location area is abnormal.
从图4中可以看出,与图2对应的实施例相比,本实施例中的网络监测方法的流程400突出了监测结果聚合的步骤。由此,本实施例描述的方案可以引入更多的监测结果来评价某一位置区域的网络质量,从而提高监测的覆盖率,并且可自主定制目标区域的监测进行聚合分析,具有良好的扩展性。It can be seen from FIG. 4 that, compared with the embodiment corresponding to FIG. 2 , the process 400 of the network monitoring method in this embodiment highlights the step of monitoring result aggregation. Therefore, the solution described in this embodiment can introduce more monitoring results to evaluate the network quality of a certain location area, thereby improving the coverage of monitoring, and can independently customize the monitoring of the target area for aggregation analysis, which has good scalability .
进一步参考图5,其示出了是根据本申请的网络监测方法的服务器和代理服务器之间的消息交互流程图,包括以下消息:Further referring to FIG. 5 , it shows a flow chart of message interaction between the server and the proxy server according to the network monitoring method of the present application, including the following messages:
消息501,注册到服务器:代理服务器向服务器发送注册请求,注册请求中可包括代理服务器的硬件信息,也可包括状态信息,例如,CPU利用率、内存利用率等信息。Message 501, register to server: the proxy server sends a registration request to the server, and the registration request may include hardware information of the proxy server, and may also include status information, such as CPU utilization, memory utilization, and other information.
消息502,注册成功:服务器收到注册请求后验证代理服务器的有效性后再发送注册成功的消息。Message 502, registration successful: the server verifies the validity of the proxy server after receiving the registration request, and then sends a message of successful registration.
消息503,询问是否分配新的监测操作:代理服务器定时向服务器询问是否分配新的监测操作。Message 503, asking whether to assign a new monitoring operation: the proxy server periodically asks the server whether to assign a new monitoring operation.
消息504,没有分配新的监测操作:服务器如果没有收到用户的监测请求时,没有需要分配的监测操作,因此回复代理服务器没有分配新的监测操作的消息。Message 504, No new monitoring operation assigned: If the server does not receive a monitoring request from the user, there is no monitoring operation to be assigned, so it replies to the proxy server with a message that no new monitoring operation is assigned.
消息505,获取包括任务1和任务2的监测操作信息:服务器如果收到用户的监测请求时,需要分配监测操作,因此通知代理服务器获取任务1和任务2的监测操作信息。Message 505, obtain the monitoring operation information including task 1 and task 2: if the server receives the monitoring request from the user, it needs to assign the monitoring operation, so it notifies the proxy server to obtain the monitoring operation information of task 1 and task 2.
消息506,请求任务1信息和任务2信息:代理服务器接收到消息505后向服务器发消息请求获得任务1信息和任务2信息。Message 506, requesting task 1 information and task 2 information: After receiving message 505, the proxy server sends a message to the server requesting to obtain task 1 information and task 2 information.
消息507,返回任务1信息和任务2信息:服务器将任务1信息和任务2信息发送给代理服务器。Message 507, return task 1 information and task 2 information: the server sends task 1 information and task 2 information to the proxy server.
消息508,返回任务1的监测结果:代理服务器执行任务1后将任务1的监测结果返回给服务器。Message 508, return the monitoring result of task 1: the proxy server returns the monitoring result of task 1 to the server after executing task 1.
消息509,返回任务2的监测结果:代理服务器执行任务2后将任务2的监测结果返回给服务器。Message 509, return the monitoring result of task 2: the proxy server returns the monitoring result of task 2 to the server after executing task 2.
消息510,返回任务1的监测结果:服务器将任务1的监测结果返回给消息队列。Message 510, return the monitoring result of task 1: the server returns the monitoring result of task 1 to the message queue.
消息511,返回任务2的监测结果:服务器将任务2的监测结果返回给消息队列。Message 511, return the monitoring result of task 2: the server returns the monitoring result of task 2 to the message queue.
进一步参考图6,作为对上述各图所示方法的实现,本申请提供了一种网络监测装置的一个实施例,该装置实施例与图2所示的方法实施例相对应,该装置具体可以应用于各种电子设备中。Further referring to FIG. 6 , as an implementation of the methods shown in the above figures, the present application provides an embodiment of a network monitoring device. This device embodiment corresponds to the method embodiment shown in FIG. 2 , and the device can specifically Used in various electronic equipment.
如图6所示,本实施例的网络监测装置600包括:接收单元601、获取单元602、选取单元603、发送单元604和确定单元605。其中,接收单元601用于接收用户发送的指定代理服务器组执行的网络监测请求;获取单元602用于获取代理服务器组中每个代理服务器的状态信息,状态信息包括:CPU利用率、内存利用率以及执行的监测操作的数量和位置信息;选取单元603用于根据CPU利用率、内存利用率以及执行的监测操作的数量,从代理服务器组中选取预定数目的代理服务器,并确定出所选取的代理服务器的地理位置;发送单元604用于向所选取的代理服务器发送执行网络监测操作的请求;确定单元605用于接收所选取的代理服务器返回的监测结果,并根据监测结果和预设的网络质量指标确定地理位置的网络是否异常。As shown in FIG. 6 , the network monitoring device 600 of this embodiment includes: a receiving unit 601 , an acquiring unit 602 , a selecting unit 603 , a sending unit 604 and a determining unit 605 . Wherein, the receiving unit 601 is used to receive the network monitoring request that the specified proxy server group is sent by the user; the obtaining unit 602 is used to obtain the status information of each proxy server in the proxy server group, and the status information includes: CPU utilization rate, memory utilization rate and the number and location information of the monitoring operations performed; the selection unit 603 is used to select a predetermined number of proxy servers from the proxy server group according to the CPU utilization, memory utilization and the number of monitoring operations performed, and determine the selected proxy The geographic location of the server; the sending unit 604 is used to send a request to the selected proxy server to perform a network monitoring operation; the determining unit 605 is used to receive the monitoring result returned by the selected proxy server, and according to the monitoring result and the preset network quality Metrics to determine whether a geographic location's network is anomalous.
在本实施例中,网络监测装置600的接收单元601、获取单元602、选取单元603、发送单元604和确定单元605的具体处理可以参考图2对应实施例中的步骤201、步骤202、步骤203、步骤204和步骤205。In this embodiment, the specific processing of the receiving unit 601, the acquiring unit 602, the selecting unit 603, the sending unit 604 and the determining unit 605 of the network monitoring device 600 can refer to the steps 201, 202 and 203 in the corresponding embodiment in FIG. 2 , step 204 and step 205.
在本实施例的一些可选的实现方式中,网络监测操作包括以下至少一项:监测数据包的传输延时和/或丢包率的操作,监测HTTP请求的返回状态的操作,监测是否发生域名劫持的操作,监测网络的路由跳转信息是否异常的操作。In some optional implementations of this embodiment, the network monitoring operation includes at least one of the following: the operation of monitoring the transmission delay and/or packet loss rate of the data packet, the operation of monitoring the return status of the HTTP request, and monitoring whether The operation of domain name hijacking, the operation of monitoring whether the routing information of the network is abnormal.
在本实施例的一些可选的实现方式中,执行网络监测操作的请求包括执行方式标识,执行方式标识用于指示所选取的代理服务器并行/串行执行网络监测操作。In some optional implementations of this embodiment, the request to execute the network monitoring operation includes an execution mode identifier, and the execution mode identifier is used to instruct the selected proxy server to execute the network monitoring operation in parallel/serially.
在本实施例的一些可选的实现方式中,发送单元604用于进一步:按照CPU利用率由小到大的顺序从该代理服务器组中选取预定数目的代理服务器;和/或按照内存利用率由小到大的顺序从该代理服务器组中选取预定数目的代理服务器;和/或按照执行的监测操作的数量由小到大的顺序从该代理服务器组中选取预定数目的代理服务器。In some optional implementations of this embodiment, the sending unit 604 is further configured to: select a predetermined number of proxy servers from the proxy server group in ascending order of CPU utilization; and/or select a predetermined number of proxy servers according to memory utilization Selecting a predetermined number of proxy servers from the proxy server group in ascending order; and/or selecting a predetermined number of proxy servers from the proxy server group in ascending order of the number of monitoring operations performed.
在本实施例的一些可选的实现方式中,该装置600还包括缓存单元(未示出),用于将监测结果缓存到消息队列中,并在消息队列中对不同的网络监测操作类型创建不同的主题。In some optional implementations of this embodiment, the apparatus 600 further includes a cache unit (not shown), configured to cache the monitoring results in a message queue, and create different themes.
在本实施例的一些可选的实现方式中,该装置600还包括聚合单元(未示出),用于响应于接收到包括目标位置区域的网络监测请求,将消息队列中的监测结果进行聚合,得到聚合后的监测结果,并将聚合后的监测结果投递到数据持久化集群中;以及确定单元605进一步用于根据聚合后的监测结果和预设的网络质量指标确定目标位置区域的网络是否异常。In some optional implementations of this embodiment, the apparatus 600 further includes an aggregation unit (not shown), configured to aggregate the monitoring results in the message queue in response to receiving a network monitoring request including the target location area , to obtain the aggregated monitoring results, and deliver the aggregated monitoring results to the data persistence cluster; and the determination unit 605 is further used to determine whether the network in the target location area is abnormal.
在本实施例的一些可选的实现方式中,执行网络监测操作的请求包括以下至少一项:用于指示所选取的代理服务器开始执行网络监测操作的开始时间、用于指示结束执行网络监测操作的结束时间和用于指示周期性执行网络监测操作的执行周期;该装置600还包括存储单元(未示出),用于将开始时间、结束时间和执行周期存储在数据库中。In some optional implementations of this embodiment, the request for performing the network monitoring operation includes at least one of the following: a start time for instructing the selected proxy server to start performing the network monitoring operation, an indication for ending the execution of the network monitoring operation The end time and the execution period used to indicate the periodic execution of the network monitoring operation; the apparatus 600 also includes a storage unit (not shown) for storing the start time, end time and execution period in the database.
在本实施例的一些可选的实现方式中,该装置600还包括升级单元(未示出),用于向代理服务器发送更新请求,以使得代理服务器进行灰度升级;接收代理服务器反馈的更新信息并存储在数据库中。In some optional implementations of this embodiment, the device 600 also includes an upgrade unit (not shown), configured to send an update request to the proxy server, so that the proxy server performs a grayscale upgrade; receive an update fed back by the proxy server information and stored in the database.
在本实施例的一些可选的实现方式中,存储单元进一步用于:将代理服务器发送的状态信息存储在数据库中;和/或将用户的用户信息和网络监测请求存储在数据库中。In some optional implementations of this embodiment, the storage unit is further configured to: store the status information sent by the proxy server in the database; and/or store the user information and network monitoring request of the user in the database.
在本实施例的一些可选的实现方式中,发送单元604进一步用于响应于接收到所选取的代理服务器定期发送的监测操作请求,向所选取的代理服务器发送执行网络监测操作的请求。In some optional implementations of this embodiment, the sending unit 604 is further configured to, in response to receiving a monitoring operation request periodically sent by the selected proxy server, send a request for performing a network monitoring operation to the selected proxy server.
下面参考图7,其示出了适于用来实现本申请实施例的服务器的计算机系统700的结构示意图。图7示出的服务器仅仅是一个示例,不应对本申请实施例的功能和使用范围带来任何限制。Referring now to FIG. 7 , it shows a schematic structural diagram of a computer system 700 suitable for implementing the server of the embodiment of the present application. The server shown in FIG. 7 is only an example, and should not limit the functions and scope of use of this embodiment of the present application.
如图7所示,计算机系统700包括中央处理单元(CPU)701,其可以根据存储在只读存储器(ROM)702中的程序或者从存储部分708加载到随机访问存储器(RAM)703中的程序而执行各种适当的动作和处理。在RAM 703中,还存储有系统700操作所需的各种程序和数据。CPU 701、ROM 702以及RAM 703通过总线704彼此相连。输入/输出(I/O)接口705也连接至总线704。As shown in FIG. 7 , a computer system 700 includes a central processing unit (CPU) 701 that can operate according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage section 708 into a random-access memory (RAM) 703 Instead, various appropriate actions and processes are performed. In the RAM 703, various programs and data necessary for the operation of the system 700 are also stored. The CPU 701 , ROM 702 , and RAM 703 are connected to each other via a bus 704 . An input/output (I/O) interface 705 is also connected to the bus 704 .
以下部件连接至I/O接口705:包括键盘、鼠标等的输入部分706;包括诸如阴极射线管(CRT)、液晶显示器(LCD)等以及扬声器等的输出部分707;包括硬盘等的存储部分708;以及包括诸如LAN卡、调制解调器等的网络接口卡的通信部分709。通信部分709经由诸如因特网的网络执行通信处理。驱动器710也根据需要连接至I/O接口705。可拆卸介质711,诸如磁盘、光盘、磁光盘、半导体存储器等等,根据需要安装在驱动器710上,以便于从其上读出的计算机程序根据需要被安装入存储部分708。The following components are connected to the I/O interface 705: an input section 706 including a keyboard, a mouse, etc.; an output section 707 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker; a storage section 708 including a hard disk, etc. and a communication section 709 including a network interface card such as a LAN card, a modem, or the like. The communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I/O interface 705 as needed. A removable medium 711 such as a magnetic disk, optical disk, magneto-optical disk, semiconductor memory, etc. is mounted on the drive 710 as necessary so that a computer program read therefrom is installed into the storage section 708 as necessary.
特别地,根据本公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信部分709从网络上被下载和安装,和/或从可拆卸介质711被安装。在该计算机程序被中央处理单元(CPU)701执行时,执行本申请的方法中限定的上述功能。需要说明的是,本申请所述的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本申请中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本申请中,计算机可读的信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读的信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:无线、电线、光缆、RF等等,或者上述的任意合适的组合。In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product, which includes a computer program carried on a computer-readable medium, where the computer program includes program codes for executing the methods shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network via communication portion 709 and/or installed from removable media 711 . When the computer program is executed by the central processing unit (CPU) 701, the above-mentioned functions defined in the method of the present application are performed. It should be noted that the computer-readable medium described in this application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, electrical connections with one or more wires, portable computer diskettes, hard disks, random access memory (RAM), read-only memory (ROM), erasable Programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this application, however, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, in which computer-readable program codes are carried. Such propagated data signals may take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device. . Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
附图中的流程图和框图,图示了按照本申请各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。The flowchart and block diagrams in the Figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in a flowchart or block diagram may represent a module, program segment, or portion of code that contains one or more logical functions for implementing specified executable instructions. It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or they may sometimes be executed in the reverse order, depending upon the functionality involved. It should also be noted that each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented by a dedicated hardware-based system that performs the specified functions or operations , or may be implemented by a combination of dedicated hardware and computer instructions.
描述于本申请实施例中所涉及到的单元可以通过软件的方式实现,也可以通过硬件的方式来实现。所描述的单元也可以设置在处理器中,例如,可以描述为:一种处理器包括接收单元、获取单元、选取单元、发送单元和确定单元。其中,这些单元的名称在某种情况下并不构成对该单元本身的限定,例如,接收单元还可以被描述为“接收用户发送的指定代理服务器组执行的网络监测请求”。The units involved in the embodiments described in the present application may be implemented by means of software or by means of hardware. The described units may also be set in a processor. For example, it may be described as: a processor includes a receiving unit, an acquiring unit, a selecting unit, a sending unit, and a determining unit. Wherein, the names of these units do not limit the unit itself under certain circumstances, for example, the receiving unit may also be described as "receiving a network monitoring request performed by a designated proxy server group sent by a user".
作为另一方面,本申请还提供了一种计算机可读介质,该计算机可读介质可以是上述实施例中描述的装置中所包含的;也可以是单独存在,而未装配入该装置中。上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被该装置执行时,使得该装置:接收用户发送的指定代理服务器组执行的网络监测请求;获取代理服务器组中每个代理服务器的状态信息,状态信息包括:CPU利用率、内存利用率以及执行的监测操作的数量和位置信息;根据CPU利用率、内存利用率以及执行的监测操作的数量,从代理服务器组中选取预定数目的代理服务器,并确定出所选取的代理服务器的地理位置;向所选取的代理服务器发送执行网络监测操作的请求;接收所选取的代理服务器返回的监测结果,并根据监测结果和预设的网络质量指标确定地理位置的网络是否异常。As another aspect, the present application also provides a computer-readable medium. The computer-readable medium may be included in the device described in the above embodiments, or it may exist independently without being assembled into the device. The above-mentioned computer-readable medium carries one or more programs, and when the above-mentioned one or more programs are executed by the device, the device: receives a network monitoring request sent by a user to be executed by a designated proxy server group; The status information of each proxy server, the status information includes: CPU utilization, memory utilization, and the number and location information of the monitoring operations performed; according to the CPU utilization, memory utilization and the number of monitoring operations performed, from the proxy server group Select a predetermined number of proxy servers, and determine the geographical location of the selected proxy servers; send a request to the selected proxy servers to perform network monitoring operations; receive the monitoring results returned by the selected proxy servers, and according to the monitoring results and preset The network quality indicator of determines whether the network of the geographic location is anomalous.
以上描述仅为本申请的较佳实施例以及对所运用技术原理的说明。本领域技术人员应当理解,本申请中所涉及的发明范围,并不限于上述技术特征的特定组合而成的技术方案,同时也应涵盖在不脱离所述发明构思的情况下,由上述技术特征或其等同特征进行任意组合而形成的其它技术方案。例如上述特征与本申请中公开的(但不限于)具有类似功能的技术特征进行互相替换而形成的技术方案。The above description is only a preferred embodiment of the present application and an illustration of the applied technical principle. Those skilled in the art should understand that the scope of the invention involved in this application is not limited to the technical solution formed by the specific combination of the above-mentioned technical features, but should also cover the technical solution formed by the above-mentioned technical features without departing from the inventive concept. Other technical solutions formed by any combination of or equivalent features thereof. For example, a technical solution formed by replacing the above-mentioned features with technical features with similar functions disclosed in (but not limited to) this application.
Claims (22)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201710234863.9A CN108696400A (en) | 2017-04-12 | 2017-04-12 | Network monitoring method and device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201710234863.9A CN108696400A (en) | 2017-04-12 | 2017-04-12 | Network monitoring method and device |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN108696400A true CN108696400A (en) | 2018-10-23 |
Family
ID=63843526
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201710234863.9A Pending CN108696400A (en) | 2017-04-12 | 2017-04-12 | Network monitoring method and device |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN108696400A (en) |
Cited By (12)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110365541A (en) * | 2019-07-31 | 2019-10-22 | 腾讯科技(深圳)有限公司 | Method for generating corresponding relationship in gateway, method and device for sending instructions |
| CN110943864A (en) * | 2019-11-29 | 2020-03-31 | 北京金山云网络技术有限公司 | Network anomaly positioning method and device of distributed storage system |
| CN111464373A (en) * | 2019-01-18 | 2020-07-28 | 苏宁易购集团股份有限公司 | Micro-service full-link monitoring system and method |
| CN111585831A (en) * | 2020-03-30 | 2020-08-25 | 福建天泉教育科技有限公司 | Abnormal application processing method and storage medium |
| CN111769997A (en) * | 2019-07-15 | 2020-10-13 | 北京京东尚科信息技术有限公司 | Method, server, device and computer readable medium for network monitoring |
| CN111818019A (en) * | 2020-06-19 | 2020-10-23 | 五八有限公司 | Method, device, equipment and medium for determining network hijacking data or network hijacking |
| WO2021056715A1 (en) * | 2019-09-26 | 2021-04-01 | 平安科技(深圳)有限公司 | Server proxy monitoring method and related product |
| CN113660163A (en) * | 2021-08-18 | 2021-11-16 | 奇安信科技集团股份有限公司 | A kind of Internet path selection method and device |
| CN113839828A (en) * | 2020-06-24 | 2021-12-24 | 北京字节跳动网络技术有限公司 | Network quality detection method, device, terminal equipment and medium |
| CN115061715A (en) * | 2022-06-22 | 2022-09-16 | 中国工商银行股份有限公司 | Service upgrade method and device based on multi-active system in the same city |
| CN115834434A (en) * | 2023-02-07 | 2023-03-21 | 阿里巴巴(中国)有限公司 | Network device control method, control server, proxy device and communication network |
| CN116055555A (en) * | 2023-01-28 | 2023-05-02 | 深圳市明源云科技有限公司 | Proxy server setting method, device, electronic device and readable storage medium |
Citations (17)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| AU5172399A (en) * | 1998-08-13 | 2000-03-06 | Cp8 Technologies | Method for communication between a user station and a network, in particular such as internet, and implementing architecture |
| AU1562402A (en) * | 1995-10-31 | 2002-04-11 | Frederick S.M. Herz | System for customized electronic identification of desirable objects |
| CN101030860A (en) * | 2007-02-15 | 2007-09-05 | 华为技术有限公司 | Method and apparatus for preventing server from being attacked by automatic software |
| CN101047697A (en) * | 2006-03-29 | 2007-10-03 | 华为技术有限公司 | Method and equipment for prevent DDOS offence to web server |
| CN101656633A (en) * | 2008-08-21 | 2010-02-24 | 北京亿企通信息技术有限公司 | Method for testing network in instant messaging device |
| CN101719853A (en) * | 2009-11-30 | 2010-06-02 | 英业达股份有限公司 | Processing method for detecting running state of server |
| CN101741683A (en) * | 2008-11-26 | 2010-06-16 | 英业达股份有限公司 | Data downloading method and system under server architecture |
| CN101902456A (en) * | 2010-02-09 | 2010-12-01 | 北京启明星辰信息技术股份有限公司 | Safety defense system of Website |
| CN101924771A (en) * | 2010-08-26 | 2010-12-22 | 北京天融信科技有限公司 | Core-level TCP adhering junction method for accelerating application proxy |
| CN105099755A (en) * | 2015-05-29 | 2015-11-25 | 北京奇虎科技有限公司 | Method, device and system for monitoring performance of website system |
| US20160220893A1 (en) * | 2001-09-28 | 2016-08-04 | Bally Gaming, Inc. | Systems including automatic card handling apparatuses and related methods |
| US20160307436A1 (en) * | 2015-07-30 | 2016-10-20 | Monty Nixon | Emergency Safety Monitoring System and Method |
| US20160336025A1 (en) * | 2014-05-16 | 2016-11-17 | Alphonso Inc. | Efficient apparatus and method for audio signature generation using recognition history |
| US20160362980A1 (en) * | 2015-06-15 | 2016-12-15 | Joy Mm Delaware, Inc. | Systems and methods for monitoring longwall mine roof stability |
| CN106302434A (en) * | 2016-08-11 | 2017-01-04 | 腾讯科技(深圳)有限公司 | Server adaptation method, device and system |
| CN106357480A (en) * | 2016-11-23 | 2017-01-25 | 北京蓝海讯通科技股份有限公司 | Method and device for monitoring network performance of application and mobile terminal |
| CN106470133A (en) * | 2015-08-20 | 2017-03-01 | 阿里巴巴集团控股有限公司 | System pressure method of testing and device |
-
2017
- 2017-04-12 CN CN201710234863.9A patent/CN108696400A/en active Pending
Patent Citations (17)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| AU1562402A (en) * | 1995-10-31 | 2002-04-11 | Frederick S.M. Herz | System for customized electronic identification of desirable objects |
| AU5172399A (en) * | 1998-08-13 | 2000-03-06 | Cp8 Technologies | Method for communication between a user station and a network, in particular such as internet, and implementing architecture |
| US20160220893A1 (en) * | 2001-09-28 | 2016-08-04 | Bally Gaming, Inc. | Systems including automatic card handling apparatuses and related methods |
| CN101047697A (en) * | 2006-03-29 | 2007-10-03 | 华为技术有限公司 | Method and equipment for prevent DDOS offence to web server |
| CN101030860A (en) * | 2007-02-15 | 2007-09-05 | 华为技术有限公司 | Method and apparatus for preventing server from being attacked by automatic software |
| CN101656633A (en) * | 2008-08-21 | 2010-02-24 | 北京亿企通信息技术有限公司 | Method for testing network in instant messaging device |
| CN101741683A (en) * | 2008-11-26 | 2010-06-16 | 英业达股份有限公司 | Data downloading method and system under server architecture |
| CN101719853A (en) * | 2009-11-30 | 2010-06-02 | 英业达股份有限公司 | Processing method for detecting running state of server |
| CN101902456A (en) * | 2010-02-09 | 2010-12-01 | 北京启明星辰信息技术股份有限公司 | Safety defense system of Website |
| CN101924771A (en) * | 2010-08-26 | 2010-12-22 | 北京天融信科技有限公司 | Core-level TCP adhering junction method for accelerating application proxy |
| US20160336025A1 (en) * | 2014-05-16 | 2016-11-17 | Alphonso Inc. | Efficient apparatus and method for audio signature generation using recognition history |
| CN105099755A (en) * | 2015-05-29 | 2015-11-25 | 北京奇虎科技有限公司 | Method, device and system for monitoring performance of website system |
| US20160362980A1 (en) * | 2015-06-15 | 2016-12-15 | Joy Mm Delaware, Inc. | Systems and methods for monitoring longwall mine roof stability |
| US20160307436A1 (en) * | 2015-07-30 | 2016-10-20 | Monty Nixon | Emergency Safety Monitoring System and Method |
| CN106470133A (en) * | 2015-08-20 | 2017-03-01 | 阿里巴巴集团控股有限公司 | System pressure method of testing and device |
| CN106302434A (en) * | 2016-08-11 | 2017-01-04 | 腾讯科技(深圳)有限公司 | Server adaptation method, device and system |
| CN106357480A (en) * | 2016-11-23 | 2017-01-25 | 北京蓝海讯通科技股份有限公司 | Method and device for monitoring network performance of application and mobile terminal |
Non-Patent Citations (2)
| Title |
|---|
| 秦建平: "《Android 编程宝典》", 31 December 2013 * |
| 程起敏等: "基于Internet的车辆监控信息服务系统的设计与实现", 《武汉大学学报(信息科学版)》 * |
Cited By (16)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111464373A (en) * | 2019-01-18 | 2020-07-28 | 苏宁易购集团股份有限公司 | Micro-service full-link monitoring system and method |
| CN111769997A (en) * | 2019-07-15 | 2020-10-13 | 北京京东尚科信息技术有限公司 | Method, server, device and computer readable medium for network monitoring |
| CN110365541B (en) * | 2019-07-31 | 2021-06-15 | 腾讯科技(深圳)有限公司 | A method for generating a corresponding relationship in a gateway, a method for sending an instruction, and a device |
| CN110365541A (en) * | 2019-07-31 | 2019-10-22 | 腾讯科技(深圳)有限公司 | Method for generating corresponding relationship in gateway, method and device for sending instructions |
| WO2021056715A1 (en) * | 2019-09-26 | 2021-04-01 | 平安科技(深圳)有限公司 | Server proxy monitoring method and related product |
| CN110943864A (en) * | 2019-11-29 | 2020-03-31 | 北京金山云网络技术有限公司 | Network anomaly positioning method and device of distributed storage system |
| CN110943864B (en) * | 2019-11-29 | 2023-04-07 | 北京金山云网络技术有限公司 | Network anomaly positioning method and device of distributed storage system |
| CN111585831B (en) * | 2020-03-30 | 2022-10-21 | 福建天泉教育科技有限公司 | Abnormal application processing method and storage medium |
| CN111585831A (en) * | 2020-03-30 | 2020-08-25 | 福建天泉教育科技有限公司 | Abnormal application processing method and storage medium |
| CN111818019A (en) * | 2020-06-19 | 2020-10-23 | 五八有限公司 | Method, device, equipment and medium for determining network hijacking data or network hijacking |
| CN113839828A (en) * | 2020-06-24 | 2021-12-24 | 北京字节跳动网络技术有限公司 | Network quality detection method, device, terminal equipment and medium |
| CN113660163A (en) * | 2021-08-18 | 2021-11-16 | 奇安信科技集团股份有限公司 | A kind of Internet path selection method and device |
| CN115061715A (en) * | 2022-06-22 | 2022-09-16 | 中国工商银行股份有限公司 | Service upgrade method and device based on multi-active system in the same city |
| CN116055555A (en) * | 2023-01-28 | 2023-05-02 | 深圳市明源云科技有限公司 | Proxy server setting method, device, electronic device and readable storage medium |
| CN115834434A (en) * | 2023-02-07 | 2023-03-21 | 阿里巴巴(中国)有限公司 | Network device control method, control server, proxy device and communication network |
| CN115834434B (en) * | 2023-02-07 | 2024-01-26 | 阿里巴巴(中国)有限公司 | Network device control method, control server, proxy device and communication network |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN108696400A (en) | Network monitoring method and device | |
| US8782215B2 (en) | Performance testing in a cloud environment | |
| US10257115B2 (en) | Cloud-based service resource provisioning based on network characteristics | |
| EP3296870B1 (en) | Cdn-based content management system | |
| CN111124819B (en) | Method and device for full link monitoring | |
| US10680896B2 (en) | Virtualized network function monitoring | |
| US20190319881A1 (en) | Traffic management based on past traffic arrival patterns | |
| US20150067019A1 (en) | Method and system for using arbitrary computing devices for distributed data processing | |
| US11695623B2 (en) | Method and apparatus for binding network card in multi-network card server, and electronic device and storage medium | |
| US11237888B2 (en) | Message processing method and system, storage medium and electronic device | |
| CN110233861A (en) | Dispatching method and device, storage medium, the electronic equipment of CDN node | |
| EP2808792B1 (en) | Method and system for using arbitrary computing devices for distributed data processing | |
| US10812390B2 (en) | Intelligent load shedding of traffic based on current load state of target capacity | |
| CN108093036B (en) | A method and device for acquiring resources | |
| CN105677492B (en) | A kind of reliability application execution method of terminaloriented | |
| CN110247847B (en) | Method and device for back source routing between nodes | |
| CN112152879A (en) | Network quality determination method and device, electronic equipment and readable storage medium | |
| CN112217853A (en) | Resource access method and device | |
| CN115277506B (en) | Load balancing equipment testing method and system | |
| CN110493291A (en) | A method and device for processing HTTP requests | |
| US20190098081A1 (en) | Near real-time computation of scaling unit's load and availability state | |
| CN112433891B (en) | Data processing method, device and server | |
| CN112783716A (en) | Monitoring method and device | |
| WO2020186168A1 (en) | Computing node identifier-based request allocation | |
| US9692702B1 (en) | Automated throttling of website polling |
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 | ||
| RJ01 | Rejection of invention patent application after publication | ||
| RJ01 | Rejection of invention patent application after publication |
Application publication date: 20181023 |