CN112202643B - Network detection method, device, test host and storage medium - Google Patents

Network detection method, device, test host and storage medium Download PDF

Info

Publication number
CN112202643B
CN112202643B CN202011083509.9A CN202011083509A CN112202643B CN 112202643 B CN112202643 B CN 112202643B CN 202011083509 A CN202011083509 A CN 202011083509A CN 112202643 B CN112202643 B CN 112202643B
Authority
CN
China
Prior art keywords
client
request
result
network
test
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
CN202011083509.9A
Other languages
Chinese (zh)
Other versions
CN112202643A (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.)
Chengdu Knownsec Information Technology Co ltd
Original Assignee
Chengdu Knownsec Information Technology 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 Chengdu Knownsec Information Technology Co ltd filed Critical Chengdu Knownsec Information Technology Co ltd
Priority to CN202011083509.9A priority Critical patent/CN112202643B/en
Publication of CN112202643A publication Critical patent/CN112202643A/en
Application granted granted Critical
Publication of CN112202643B publication Critical patent/CN112202643B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/10Active monitoring, e.g. heartbeat, ping or trace-route
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0852Delays
    • H04L43/0864Round trip delays

Abstract

The application relates to the technical field of computer networks, and provides a network detection method, a device, a test host and a storage medium, wherein the method comprises the following steps: receiving a detection request sent by a client, wherein the detection request is sent based on the abnormity of the client accessing a service website; based on the detection request, the client is controlled to send a first dial test request to a preset test website through a server in the CDN, and the client is controlled to send a second dial test request to a service website; receiving a first result which is sent by a client and responds to a first dial test request and fed back by a preset test website; receiving a second result which is sent by the client and responds to the second dial testing request and fed back by the service website; and performing network detection according to the first result and the second result. Compared with the prior art, the method and the device can effectively and timely detect the network.

Description

Network detection method, device, test host and storage medium
Technical Field
The present application relates to the field of computer networks, and in particular, to a network detection method, device, test host, and storage medium.
Background
The domestic Network environment is complicated, the quantity of IP (Internet protocol) of public Network outlets of small operators is rare, and the Network complexity is increased by multiple Network Address Translation (NAT) protocols in different areas; meanwhile, in a cross-regional and cross-line network environment, an operator link involves problems such as traffic settlement and the like, so that network access efficiency is low.
In order to improve the Network access efficiency, a Content Delivery Network (CDN) is usually used to optimize the Network access speed, so that a special CDN manufacturer provides an efficient Network access service.
The problem of abnormal website access caused by poor overall network environment is usually encountered when the existing CDN manufacturer delivers service to users, and the problems are caused by too complex network environment and cannot timely and effectively detect the network.
Disclosure of Invention
The application aims to provide a network detection method, a network detection device, a test host and a storage medium, and solves the problem that a network cannot be timely and effectively detected.
In order to achieve the above purpose, the embodiments of the present application employ the following technical solutions:
in a first aspect, the present application provides a network detection method, which is applied to a test host, where the test host is in communication connection with both a client and a server in a content delivery network CDN, and the method includes: receiving a detection request sent by the client, wherein the detection request is sent based on the abnormity of the business website accessed by the client; based on the detection request, controlling the client to send a first dial test request to a preset test website through a server in the CDN, and controlling the client to send a second dial test request to the service website; receiving a first result which is sent by the client and fed back by a preset test website and responds to the first dial test request; receiving a second result which is sent by the client and responds to the second dial testing request and fed back by the service website; and carrying out network detection according to the first result and the second result.
In a second aspect, the present application provides a network detection apparatus, which is applied to a test host, where the test host is in communication connection with a client and a server in a content delivery network CDN, and the apparatus includes: the request receiving module is used for receiving a detection request sent by the client, wherein the detection request is sent based on the abnormity of the client access service website; the dial testing module is used for controlling the client to send a first dial testing request to a preset testing website through a server in the CDN and controlling the client to send a second dial testing request to the service website based on the detection request; a response receiving module to: receiving a first result which is sent by the client and fed back by a preset test website and responds to the first dial test request; receiving a second result which is sent by the client and responds to the second dial testing request and fed back by the service website; and the detection module is used for carrying out network detection according to the first result and the second result.
In a third aspect, the present application provides a test host, where the test host includes a memory and a processor, where the memory stores a computer program, and the processor implements the network detection method when executing the computer program.
In a fourth aspect, the present application provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements a network detection method as described above.
Compared with the prior art, the method has the following beneficial effects: the application provides a network detection method, a device, a test host and a storage medium, which are applied to the test host, wherein the test host is in communication connection with a client and a server in a Content Delivery Network (CDN), when a client accesses a service website through the client and is abnormal, in order to carry out network detection aiming at the abnormality, the client sends a detection request to the test host through the client, the detection request is triggered by the client accessing the detection website, the test host controls the client to send a first dial test request to a preset test website through the server in the CDN based on the detection request and controls the client to send a second dial test request to the service website, after receiving a first result fed back by the preset test website and responding to the first dial test request and a second result fed back by the service website, the test host sends a second dial test request to the service website according to the first result and the second result, network detection is carried out, the network communication condition between the client 20 and the CDN can be known based on a first result responding to the first dial testing request, so that the network can be effectively detected according to the first result and a second result responding to the second dial testing request, and meanwhile, due to the fact that the whole process does not need manual intervention, the timeliness of detection is guaranteed.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained from the drawings without inventive effort.
Fig. 1 shows an application scenario diagram provided in an embodiment of the present application.
Fig. 2 shows a block diagram of a test host provided in an embodiment of the present application.
Fig. 3 shows a flowchart of a network detection method according to an embodiment of the present application.
Fig. 4 shows a flowchart of another network detection method provided in the embodiment of the present application.
Fig. 5 is a flowchart illustrating another network detection method according to an embodiment of the present application.
Fig. 6 shows a block schematic diagram of a network detection device provided in an embodiment of the present application.
Icon: 10-a test host; 11-a processor; 12-a memory; 13-a bus; 14-a communication interface; 20-a client; 30-a server; 100-a network detection device; 110-a request receiving module; 120-dial testing module; 130-a response receiving module; 140-detection module.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
In the description of the present application, it should be noted that if the terms "upper", "lower", "inside", "outside", etc. are used for indicating the orientation or positional relationship based on the orientation or positional relationship shown in the drawings or the orientation or positional relationship which the present invention product is usually put into use, it is only for convenience of describing the present application and simplifying the description, but it is not intended to indicate or imply that the referred device or element must have a specific orientation, be constructed in a specific orientation and be operated, and thus, should not be construed as limiting the present application.
Furthermore, the appearances of the terms "first," "second," and the like, if any, are used solely to distinguish one from another and are not to be construed as indicating or implying relative importance.
It should be noted that the features of the embodiments of the present application may be combined with each other without conflict.
The method comprises the steps that a network is timely and effectively detected, technicians of most network service providers develop a test script program and deliver the test script program to users, the users run the test script program on a client side and feed back specific test data to the technicians, and after the technicians analyze the test data, a network detection result is obtained, so that the network is optimized or network problems are positioned according to the network detection result.
However, the existing test script can only obtain data of the network quality of the client preliminarily, and cannot clearly obtain test data of the network communication condition between the client 20 and the CDN, so that the detection of the network is relatively blind, and the validity of the detection is greatly reduced.
Meanwhile, the types of the clients are diversified, for example, the clients can be computers, mobile phones, tablets and the like, the participants of the current network environment are in a state of coexistence of multiple types of terminals, and the operating systems of the clients of different types have different degrees of limitation, so that the cost of developing and maintaining test script programs aiming at different platforms and versions is extremely high; meanwhile, because the user of the client is usually a common user and only has little or no network test related knowledge and experience, the communication time consumption cost is very high, on one hand, the test data is not obtained in time, and finally the test data cannot be analyzed in time to detect the network in time, so that the optimization operation is performed on the detection result, and on the other hand, the user experience caused by the method is very poor.
In view of this, embodiments of the present application provide a network detection method, an apparatus, a test host, and a storage medium, which can improve effectiveness and timeliness of network detection.
Referring to fig. 1, fig. 1 shows an application scenario diagram provided by an embodiment of the present application, in fig. 1, a client 20 is communicatively connected to servers 30 in multiple CDN rooms, each server in each CDN room constitutes one CDN, and a test host 10 is also communicatively connected to the client 20 at the same time, in fig. 1, only two servers 30 are exemplarily shown in each CDN room, in an actual application scenario, multiple servers 30 exist in each CDN room, when a user accesses a service website through the client 20 and is abnormal, the user sends a detection request to the test host through the client 20, the client 20 is controlled to send a first dial test request to a preset test website through the servers 30 in the CDN rooms and to send a second dial test request to the service website, the client 20 finally sends a first result fed back by the preset test website in response to the first dial test request and a second result fed back by the service website in response to the second dial test request to the test host 10, the test host can know the network communication condition between the client 20 and the CDN based on the first result, so that the network can be effectively detected according to the first result and the second result in response to the second dial test request, and the timeliness of the detection is ensured because the whole process does not require manual intervention.
It should be noted that when there are multiple CDN rooms, there are multiple corresponding preset test websites, and for any preset test website, the client 20 accesses the preset test website through a server in the CDN room corresponding to the preset test website, so as to obtain a processing condition of a first dial test request between the client 20 and each CDN room.
In addition, as a specific embodiment, the network service provider may provide a detection website for the user, when the user accesses the detection website through the client 20, the user triggers sending of a detection request to the test host 10, and after the test host 10 receives the detection request, the test host 10 automatically performs network detection according to the first result and the second result. Since the client 20 can send the detection request to the test host 10 only by accessing the detection website, there is no requirement for the device type and the operating system type of the client 20, and only a browser capable of accessing a preset website is installed in the client 20, thereby avoiding the problem of high development and maintenance costs caused by developing and maintaining test scripts of different platforms and different versions for different clients.
The test host 10 may be, but is not limited to, a physical host, a physical server, or a virtual machine capable of implementing the same function as the physical host or the physical server.
The client 20 may be, but is not limited to, a mobile phone, a tablet computer, a notebook computer, a desktop computer, etc.
The server 30 is a computer device located in the CDN room in the CDN network, and may be a network communication device, such as a switch, a router, or the like.
It should be noted that the test host 10 may be any one server 30 in any CDN room, or may be a host that is independent of all CDN rooms and is in communication connection with servers in the CDN rooms, and may be deployed correspondingly according to the requirements of an actual scene, and the specific deployment manner is not limited in the present application.
On the basis of fig. 1, a block schematic diagram of the test host 10 in fig. 1 is further provided in the embodiment of the present application, please refer to fig. 2, and fig. 2 shows a block schematic diagram of the test host 10 provided in the embodiment of the present application.
The test host 10 includes a processor 11, a memory 12, a bus 13, and a communication interface 14. The processor 11 and the memory 12 are connected by a bus 13, and the processor 11 is communicatively connected to the client 20 and the server 30 by a communication interface 14.
The processor 11 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 11. The Processor 11 may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; but may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components.
The Memory 12 may include a high-speed Random Access Memory (RAM) and may also include a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. Alternatively, the memory 12 may be a storage device built in the processor 11, or may be a storage device independent of the processor 11.
The bus 13 may be an ISA bus, a PCI bus, an EISA bus, or the like. Fig. 2 is represented by only one double-headed arrow, but does not represent only one bus or one type of bus.
On the basis of fig. 1 and fig. 2, an embodiment of the present application provides a flowchart of a network detection method applied to the test host 10 in fig. 1 and fig. 2, please refer to fig. 3, and fig. 3 shows a flowchart of a network detection method provided by an embodiment of the present application, where the method includes the following steps:
step S100, receiving a detection request sent by a client, wherein the detection request is sent after the client accesses a service website abnormally.
In this embodiment, the service website is a website that the user actually needs to access, and the user may access the service website by inputting a website address of the service website in the browser software of the client 20. The detection request is a request sent by the client 20 to the test host 10 for triggering network detection, and as a specific embodiment, the request may be implemented by a user accessing a detection website through browser software of the client 20, and the detection website is a website provided for the user and enabling the user to automatically trigger network detection by accessing the detection website. As another specific implementation, the request may also be implemented by a user clicking a button on a preset web page, for example, after the user accesses the service website abnormally, the user automatically jumps to the preset web page, a detection button is displayed on the preset web page, and the user is prompted to click the detection button to trigger network detection, so as to locate the reason for the abnormal access of the service website.
Step S120, based on the detection request, the client is controlled to send a first dial test request to a preset test website through a server in the CDN, and the client is controlled to send a second dial test request to the service website.
In this embodiment, the preset test website is a website for testing a communication condition between the client 20 and the server 30 in the CDN, the first dial test request is a test request data packet sent by the client 20 to the preset test website through the server in the CDN, the client 20 may be in communication connection with multiple CDNs at the same time, at this time, a preset test website may be set for each CDN in advance, and the client 20 is controlled to send the first dial test request to the corresponding preset test website through the server 30 in each CDN, so as to test the communication condition between the client 20 and the server 30 in each CDN.
In this embodiment, the second dial test request is a test request data packet sent by the client 20 to the service website.
Step S130, receiving a first result, sent by the client, of responding to the first dial test request and fed back by the preset test website.
In this embodiment, the first dial test request finally reaches the test host 10 through the server 30 in the CDN, the test host returns response information for the first dial test request, the response information finally returns to the client 20 through the server 30 in the CDN again, and the client 20 generates the first result according to the response information of the first dial test request. The first result is used for characterizing the response condition of the first dial test request, including but not limited to response information such as response state, response delay and the like.
Step S140, receiving a second result of the service website feedback sent by the client and responding to the second dial testing request.
In this embodiment, the second result is used to characterize a response condition of the second dial testing request, and is generated by the client 20 according to the response information of the second dial testing request fed back by the service website, and the second result includes, but is not limited to, response information such as a response state and a response delay.
Step S150, performing network detection according to the first result and the second result.
In this embodiment, since the first result may reflect a communication status between the client 20 and a server in the CDN, and the second result may reflect a communication status between the client 20 and a service website, the network is detected by synthesizing the first result and the second result, and the network state is further determined according to a result of the network detection, so as to detect a probable cause of a network problem, and help a technician narrow an investigation range.
It should be further noted that, in order to facilitate further automatic analysis, the first result and the second result may also be stored in the database, and a technician may access the first result and the second result in the database and analyze them again to obtain an analysis result of the network detection with more guidance, so as to perform targeted optimization on the network according to the analysis result.
The network detection method provided by the embodiment of the application can know the network communication condition between the client 20 and the CDN based on the first result responding to the first dial test request, so that the network can be effectively detected according to the first result and the second result responding to the second dial test request, meanwhile, the whole process does not need manual intervention, the detection timeliness is ensured, more effective guidance is provided for subsequently positioning network problems according to the detection result, and the difficulty of positioning the network problems is reduced.
On the basis of fig. 2, an embodiment of the present application further provides a specific implementation of network detection, please refer to fig. 4, and fig. 4 show a flowchart of another network detection method provided in the embodiment of the present application, and step S150 includes the following sub-steps:
in the substep S1501, if the first state representation is normal in response to the first dial testing request and the second state representation is overtime in response to the second dial testing request, it is determined that the website analysis of the service website is abnormal.
In this embodiment, the first state represents a response state of the first dial testing request, where values of the response state include normal and timeout, and when the value of the first state is normal, it may be considered that a response of the first dial testing request is returned within a preset duration and correct response data is returned, and when the value of the first state is timeout, it may be considered that the response of the first dial testing request is not returned within the preset duration, and at this time, there are at least the following possible situations: (1) the response of the first dial testing request is not returned within the preset time length, but correct response data are finally returned; (2) the response of the first dial testing request is returned within a preset time length, and wrong response data are finally returned; (3) the response of the first dial testing request is not returned within the preset time length, and finally wrong response data are returned; (4) the response of the first dial test request is not returned within the preset time length, and finally, no response data is returned, where the preset time length may be a preset timeout time length, for example, the preset time length is 5000 milliseconds. The second state is similar to the first state and will not be described herein.
In this embodiment, if the response to the first dial test request is normal, it indicates that the communication between the client 20 and the server 30 in the CDN is normal, and it may be determined that there is no problem in the network of the client 20, and meanwhile, if the response to the second dial test request is overtime, it indicates that the website analysis of the service website is abnormal, so that the problem location range may be narrowed to the reason that the website analysis is abnormal, and the specific location causes the website analysis abnormality.
In sub-step S1502, if the first state representation is overtime in response to the first dial test request and the second state representation is overtime in response to the second dial test request, it is determined that the network communication of the client is abnormal.
In this embodiment, since the communication condition of the server 30 of the SDN for network detection can be guaranteed to be good, otherwise, network detection cannot be performed based on the good condition, in this case, if the first dial test request is overtime and the second dial test request is overtime, it is determined that the network communication of the client is abnormal, and the abnormality may be a network interruption of the client, or a network communication abnormality of the client due to a link fluctuation of the network of the client, or a network abnormality of the client due to other reasons, which finally causes an abnormality in accessing a service website by the client, that is, a problem location range is narrowed to the network of the client, and at this time, a reason for the network abnormality of the client needs to be further investigated.
According to the network detection method provided by the embodiment of the application, the first state in the first result and the second state in the second result are compared, so that whether the website analysis of the service website is abnormal or the client accesses the service website due to the network communication abnormality of the client can be timely located, and the possible reason of the abnormality of the service website can be rapidly located.
In this embodiment, the first result further includes a first time delay in addition to the first state, and the second result further includes a second time delay in addition to the second state, in order to determine the abnormality of other situations as much as possible, the embodiment of the present application further provides another specific implementation manner of network detection, please continue to refer to fig. 4, and step S150 further includes the following sub-steps:
in the substep S1503, if the first state representation is normal in response to the first dial testing request and the second state representation is normal in response to the second dial testing request, the network detection is performed according to the first delay and the second delay.
In this embodiment, the first time delay is used to represent a time length between the time when the client 20 initiates the first dial test request and the time when the client 20 receives the response of the first dial test request, as a specific implementation manner, the client 20 records the initiation time at the time when the client 20 initiates the first dial test request, records the response receiving time at the time when the client receives the response of the first dial test request, where the time length between the response time and the initiation time is the first time delay, and the second time delay is similar to the first time delay, and is not described here again.
If the first dial testing request is normal and the second dial testing request is normal, judging other types of abnormalities according to the first time delay and the second time delay, wherein the other types of abnormalities include, but are not limited to, browser abnormalities of a client, response abnormalities of a service website, network delay abnormalities of the client and the like.
As a specific implementation manner, the method for performing network detection according to the first delay and the second delay may be:
firstly, if the first time delay is smaller than a first preset value and the second time delay is smaller than a second preset value, it is determined that the browser of the client is abnormal.
In this embodiment, the first preset value and the second preset value may be set according to actual scene needs, and the first preset value may be greater than, less than, or equal to the second preset value. If the first time delay is smaller than the first preset value and the second time delay is smaller than the second preset value, it means that the network between the client 20 and the server 30 in the SDN is smooth and the network between the client 20 and the service website is smooth, and it is determined that the browser of the client 20 is abnormal.
Secondly, if the first time delay is smaller than the first preset value and the second time delay is larger than or equal to the third preset value, the response of the service website is judged to be abnormal.
In this embodiment, the third preset value may be set according to actual scene needs. If the first time delay is smaller than the first preset value and the second time delay is larger than or equal to the third preset value, it means that the network between the client 20 and the server 30 in the SDN is smooth and the network between the client 20 and the service website is not smooth, and it is determined that the response of the service website is abnormal.
Thirdly, if the first time delay is larger than or equal to a fourth preset value and the second time delay is larger than or equal to a third preset value, the network delay of the client is judged to be abnormal.
In this embodiment, the fourth preset value may be set according to actual scene needs. If the first time delay is greater than or equal to the fourth preset value and the second time delay is greater than or equal to the third preset value, it means that the network between the client 20 and the server 30 in the SDN is not smooth and the network between the client 20 and the service website is not smooth, and it is determined that the network delay of the client is abnormal.
It should be noted that, according to actual needs, the first result and the second result may further include a client IP address, information related to an Internet Service Provider ISP (ISP) used by the client 20, and the like, so as to perform more comprehensive detection on the network according to the information.
According to the network detection method provided by the embodiment of the application, in addition to the detection of the network according to the first state and the second state so as to judge the reason causing the abnormality of the client accessing the service website, the detection of the network is also carried out according to the first time delay and the second time delay so as to judge the reason causing the abnormality of the client accessing the service website, and the type of the positioned abnormality reason is expanded.
On the basis of fig. 3, an embodiment of the present application further provides a first dial test request sending method when there are multiple CDNs, please refer to fig. 5, where fig. 5 shows a flowchart of another network detection method provided in the embodiment of the present application, and step S120 includes the following sub-steps:
and a substep S1201, based on the detection request, controlling the client to send a first dial test request to each preset test website through a server in the corresponding CDN.
In this embodiment, there are multiple CDNs, the test host 10 is in communication connection with the server 30 in each CDN, each CDN corresponds to one preset test website, and the test host controls the client 20 to send a first dial test request to each preset test website. For example, CDNs include: the number 1 CDN, the number 2 CDN and the number 3 CDN correspond to a preset test website which is as follows: com, slave2.test.com, slave3.test.com, the client 20 accesses slave1.test.com through the server 30 in # 1 CDN, slave2.test.com through the server 30 in # 2 CDN, and slave3.test.com through the server 30 in # 3 CDN.
It should be noted that, by clearly obtaining and knowing the response result from the client 20 to the servers in different CDNs, the line can be optimized and adjusted according to the response result and the region where the user is located and the ISP.
In the network detection method provided by the embodiment of the application, when there are a plurality of CDNs, the first dial test request is sent to each preset test website, so that the network communication condition between the client 20 and each CDN can be known according to the first result of responding to each first dial test request, and thus, more reference data can be provided for technicians, so that the technicians can analyze the network more comprehensively.
In order to perform the corresponding steps in the above embodiments and various possible implementations, an implementation of the network detection apparatus 100 is given below. Referring to fig. 6, fig. 6 is a block diagram illustrating a network detection apparatus 100 according to an embodiment of the present disclosure. It should be noted that the basic principle and the generated technical effect of the network detection apparatus 100 provided in the present embodiment are the same as those of the above embodiments, and for the sake of brief description, no reference is made to this embodiment.
The network detection device 100 may be a stored program stored in the memory 12 in fig. 2, the network detection device 100 includes at least one software functional module which may be stored in the memory 12 in fig. 2 in the form of software or firmware (firmware), and the processor 11 in fig. 2 executes the program after receiving the execution instruction to implement the network detection method.
The network detection device 100 includes a request receiving module 110, a dial test module 120, a response receiving module 130, and a detection module 140.
The request receiving module 110 is configured to receive a detection request sent by a client, where the detection request is sent after an exception occurs when the client accesses a service website.
And the dial test module 120 is configured to control, based on the detection request, the client to send a first dial test request to the preset test website through the server in the CDN, and control the client to send a second dial test request to the service website.
As a specific implementation manner, the number of CDNs is multiple, the test host is in communication connection with a server in each CDN, each CDN corresponds to a preset test website, and the dial test module 120 is specifically configured to: and controlling the client to send a first dial test request to each preset test website through a server in the corresponding CDN based on the detection request.
A response receiving module 130 configured to: receiving a first result which is sent by a client and responds to a first dial test request and fed back by a preset test website; and receiving a second result which is sent by the client and responds to the second dial testing request and fed back by the service website.
The detecting module 140 is configured to perform network detection according to the first result and the second result.
As a specific embodiment, the first result includes a first state, the second result includes a second state, and the detection module 140 is specifically configured to: if the first state representation responds to the first dial testing request normally and the second state representation responds to the second dial testing request overtime, judging that the website analysis of the service website is abnormal; and if the first state representation responses to the first dial test request overtime and the second state representation responses to the second dial test request overtime, judging that the network communication of the client is abnormal.
As a specific embodiment, the first result further includes a first time delay, the second result further includes a second time delay, and the detection module 140 is further specifically configured to: and if the first state representation is normal in response to the first dial testing request and the second state representation is normal in response to the second dial testing request, performing network detection according to the first time delay and the second time delay.
As a specific embodiment, when the detecting module 140 performs the step of performing network detection according to the first delay and the second delay, it is specifically configured to: if the first time delay is smaller than a first preset value and the second time delay is smaller than a second preset value, judging that the browser of the client is abnormal; if the first time delay is smaller than the first preset value and the second time delay is larger than or equal to the third preset value, judging that the response of the service website is abnormal; and if the first time delay is greater than or equal to the fourth preset value and the second time delay is greater than or equal to the third preset value, judging that the network delay of the client is abnormal.
Embodiments of the present application provide a computer-readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the network detection method as described above.
To sum up, the embodiment of the present application provides a network detection method, an apparatus, a test host and a storage medium, which are applied to a test host, where the test host is in communication connection with both a client and a server in a content delivery network CDN, and the method includes: receiving a detection request sent by a client, wherein the detection request is sent based on the abnormity of the client accessing a service website; based on the detection request, the client is controlled to send a first dial test request to a preset test website through a server in the CDN, and the client is controlled to send a second dial test request to a service website; receiving a first result which is sent by a client and responds to a first dial test request and fed back by a preset test website; receiving a second result which is sent by the client and responds to the second dial testing request and fed back by the service website; and performing network detection according to the first result and the second result. Compared with the prior art, the network communication condition between the client 20 and the CDN can be known based on the first result responding to the first dial testing request, so that the network can be effectively detected according to the first result and the second result responding to the second dial testing request, and meanwhile, the timeliness of detection is guaranteed as the whole process does not need manual intervention.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present application should be covered within the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (9)

1. The network detection method is applied to a test host, the test host is in communication connection with a client and servers in a Content Delivery Network (CDN), the CDN is multiple, the test host is in communication connection with the servers in each CDN, each CDN corresponds to a preset test website, and the method comprises the following steps:
receiving a detection request sent by the client, wherein the detection request is sent based on the abnormity of the business website accessed by the client;
controlling the client to send a first dial test request to each preset test website through a corresponding server in the CDN based on the detection request, and controlling the client to send a second dial test request to the service website;
receiving a first result which is sent by the client and fed back by the preset test website and responds to the first dial test request;
receiving a second result which is sent by the client and responds to the second dial testing request and fed back by the service website;
and carrying out network detection according to the first result and the second result.
2. The network sensing method of claim 1, wherein the first result comprises a first state and the second result comprises a second state, and wherein the step of performing the network sensing based on the first result and the second result comprises:
if the first state representation responds to the first dial testing request normally and the second state representation responds to the second dial testing request overtime, judging that the website analysis of the service website is abnormal;
and if the first state representation responses to the first dial testing request overtime and the second state representation responses to the second dial testing request overtime, judging that the network communication of the client is abnormal.
3. The network sensing method of claim 2, wherein the first result further comprises a first delay, the second result further comprises a second delay, and the step of performing the network sensing according to the first result and the second result further comprises:
and if the first state representation shows that the response to the first dial testing request is normal and the second state representation shows that the response to the second dial testing request is normal, performing network detection according to the first time delay and the second time delay.
4. The network detection method of claim 3, wherein the step of performing network detection based on the first delay and the second delay comprises:
if the first time delay is smaller than a first preset value and the second time delay is smaller than a second preset value, judging that the browser of the client is abnormal;
if the first time delay is smaller than the first preset value and the second time delay is larger than or equal to a third preset value, judging that the response of the service website is abnormal;
and if the first time delay is greater than or equal to a fourth preset value and the second time delay is greater than or equal to a third preset value, determining that the network delay of the client is abnormal.
5. The utility model provides a network detection device which characterized in that is applied to the test host computer, the equal communication connection of server in test host computer and customer end and the content delivery network CDN, CDN is a plurality of, the test host computer with each the equal communication connection of server in the CDN, each CDN corresponds a test website of predetermineeing, the device includes:
the request receiving module is used for receiving a detection request sent by the client, wherein the detection request is sent based on the abnormity of the client access service website;
the dial testing module is used for controlling the client to send a first dial testing request to each preset testing website through a corresponding server in the CDN based on the detection request and controlling the client to send a second dial testing request to the service website;
a response receiving module to: receiving a first result which is sent by the client and fed back by the preset test website and responds to the first dial test request; receiving a second result which is sent by the client and responds to the second dial testing request and fed back by the service website;
and the detection module is used for carrying out network detection according to the first result and the second result.
6. The network detection device of claim 5, wherein the first result comprises a first state and the second result comprises a second state, and wherein the detection module is specifically configured to:
if the first state representation responds to the first dial testing request normally and the second state representation responds to the second dial testing request overtime, judging that the website analysis of the service website is abnormal;
and if the first state representation responses to the first dial testing request overtime and the second state representation responses to the second dial testing request overtime, judging that the network communication of the client is abnormal.
7. The network sensing device of claim 5, wherein the first result further comprises a first latency, wherein the second result further comprises a second latency, and wherein the sensing module is further configured to:
and if the first result represents that the response to the first dial testing request is normal and the second result represents that the response to the second dial testing request is normal, performing network detection according to the first time delay and the second time delay.
8. A test host comprising a memory and a processor, the memory storing a computer program, wherein the processor implements the network detection method of any one of claims 1-4 when executing the computer program.
9. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the network detection method according to any one of claims 1 to 4.
CN202011083509.9A 2020-10-12 2020-10-12 Network detection method, device, test host and storage medium Active CN112202643B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011083509.9A CN112202643B (en) 2020-10-12 2020-10-12 Network detection method, device, test host and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011083509.9A CN112202643B (en) 2020-10-12 2020-10-12 Network detection method, device, test host and storage medium

Publications (2)

Publication Number Publication Date
CN112202643A CN112202643A (en) 2021-01-08
CN112202643B true CN112202643B (en) 2022-03-29

Family

ID=74013465

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011083509.9A Active CN112202643B (en) 2020-10-12 2020-10-12 Network detection method, device, test host and storage medium

Country Status (1)

Country Link
CN (1) CN112202643B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116708149A (en) * 2022-12-29 2023-09-05 荣耀终端有限公司 Network diagnosis method and electronic equipment

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2001002977A1 (en) * 1999-06-30 2001-01-11 Silverbrook Research Pty Ltd Method and system for searching classified advertising
US6981180B1 (en) * 2000-03-16 2005-12-27 Akamai Technologies, Inc. Method and apparatus for testing request-response service using live connection traffic
CN102938716A (en) * 2012-12-06 2013-02-20 网宿科技股份有限公司 Content distribution network acceleration test method and device
CN105897615A (en) * 2015-09-14 2016-08-24 乐视云计算有限公司 Data transmission method and device
CN107103001A (en) * 2016-02-22 2017-08-29 阿里巴巴集团控股有限公司 The methods, devices and systems of target front end resource file are obtained based on browser
CN107306278A (en) * 2016-04-18 2017-10-31 阿里巴巴集团控股有限公司 Fault detection method, GSLB server and residential gateway
CN107426241A (en) * 2017-08-25 2017-12-01 北京神州绿盟信息安全科技股份有限公司 A kind of method and device of network safety prevention
CN108234207A (en) * 2017-12-29 2018-06-29 北京奇虎科技有限公司 A kind of Fault Locating Method and device based on content distributing network CDN
CN108922281A (en) * 2018-08-03 2018-11-30 姚树莲 A kind of computer laboratory instructional device based on cloud platform
CN110380890A (en) * 2019-06-03 2019-10-25 网宿科技股份有限公司 A kind of CDN system service quality detection method and system

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7231606B2 (en) * 2000-10-31 2007-06-12 Software Research, Inc. Method and system for testing websites
US9774670B2 (en) * 2010-08-22 2017-09-26 Qwilt, Inc. Methods for detection of content servers and caching popular content therein
CN103561351B (en) * 2013-11-22 2016-03-09 合一网络技术(北京)有限公司 A kind of service end interface test method based on P2P and device
CN104753811B (en) * 2013-12-30 2018-02-23 中国移动通信集团公司 A kind of streaming media service optimization method, equipment and system
CN103685575B (en) * 2014-01-06 2018-09-07 洪高颖 A kind of web portal security monitoring method based on cloud framework
US9681166B2 (en) * 2014-02-25 2017-06-13 Facebook, Inc. Techniques for emotion detection and content delivery
CN105138921B (en) * 2015-08-18 2018-02-09 中南大学 Fishing website aiming field name recognition method based on page feature matching
CN105791034B (en) * 2016-05-15 2018-10-26 北京联合大学 A kind of browsing class service-aware analysis method
CN106375381B (en) * 2016-08-26 2019-06-28 山东慧行天下文化传媒有限公司 A kind of micro- tour guide's data processing method and server-side based on cloud
CN108206847B (en) * 2016-12-19 2020-09-04 腾讯科技(深圳)有限公司 CDN management system, method and device

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2001002977A1 (en) * 1999-06-30 2001-01-11 Silverbrook Research Pty Ltd Method and system for searching classified advertising
WO2001003020A1 (en) * 1999-06-30 2001-01-11 Silverbrook Research Pty Ltd Method and system for listing classified advertising
WO2001002905A1 (en) * 1999-06-30 2001-01-11 Silverbrook Research Pty Ltd Digital camera with interactive printer
US6981180B1 (en) * 2000-03-16 2005-12-27 Akamai Technologies, Inc. Method and apparatus for testing request-response service using live connection traffic
CN102938716A (en) * 2012-12-06 2013-02-20 网宿科技股份有限公司 Content distribution network acceleration test method and device
CN105897615A (en) * 2015-09-14 2016-08-24 乐视云计算有限公司 Data transmission method and device
CN107103001A (en) * 2016-02-22 2017-08-29 阿里巴巴集团控股有限公司 The methods, devices and systems of target front end resource file are obtained based on browser
CN107306278A (en) * 2016-04-18 2017-10-31 阿里巴巴集团控股有限公司 Fault detection method, GSLB server and residential gateway
CN107426241A (en) * 2017-08-25 2017-12-01 北京神州绿盟信息安全科技股份有限公司 A kind of method and device of network safety prevention
CN108234207A (en) * 2017-12-29 2018-06-29 北京奇虎科技有限公司 A kind of Fault Locating Method and device based on content distributing network CDN
CN108922281A (en) * 2018-08-03 2018-11-30 姚树莲 A kind of computer laboratory instructional device based on cloud platform
CN110380890A (en) * 2019-06-03 2019-10-25 网宿科技股份有限公司 A kind of CDN system service quality detection method and system

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
JOURNAL OF XI′AN JIAOTONG UNIVERSITY 2007 Annual Classification Index Title(Issue/Page);《西安交通大学学报》;20071210(第12期);全文 *
QoE-Driven Energy-Aware Multipath Content Delivery Approach for MPTCP-Based Mobile Phones;Yuanlong Cao等;《中国通信》;20170215(第02期);全文 *
内容中心网络中DoS攻击问题综述;李杨等;《信息安全学报》;20170115(第01期);全文 *
天翼高清端到端网络运营质量保障体系;邵壮丰等;《电信科学》;20171220;全文 *

Also Published As

Publication number Publication date
CN112202643A (en) 2021-01-08

Similar Documents

Publication Publication Date Title
US10212063B2 (en) Network aware distributed business transaction anomaly detection
EP2936337B1 (en) Interactivity analyses of web resources based on reload events
US10931730B2 (en) Method and system for ISP network performance monitoring and fault detection
US8200769B2 (en) Downloading a plug-in on an instant messaging client
EP2378418A1 (en) Methods and systems for adaption, diagnosis, optimization, and prescription technology for network based applications
CN110266557B (en) Method, device, system and storage medium for monitoring broadband service quality
US11463537B1 (en) Proxy selection by monitoring quality and available capacity
CN107135249B (en) Data downloading method and device
CN111711533B (en) Fault diagnosis method, fault diagnosis device, electronic device and storage medium
CN111092904B (en) Network connection method and device
CN112202643B (en) Network detection method, device, test host and storage medium
CN110784364B (en) Data monitoring method and device, storage medium and terminal
JP6612151B2 (en) Network equipment monitoring device
CN112187869A (en) Remote debugging system and method of IOT device, electronic device and storage medium
CN114915565B (en) Network debugging method and system
CN111049741B (en) Method for improving communication reliability, communication system and terminal equipment
CN109756393B (en) Information processing method, system, medium, and computing device
KR101680736B1 (en) Process for checking status of network device
CN112491612A (en) Method for reporting network abnormal data, terminal and computer storage medium
CN110309027B (en) APP fault positioning method and device, server and terminal
CN110278271B (en) Network request control method and device and terminal equipment
US20230262140A1 (en) Method for updating a presence status of a user of a communication terminal for a set of communication applications
CN115277518A (en) Network state detection method and device, computer equipment and storage medium
CN117675629A (en) Network state testing method, system, electronic equipment and readable storage medium
WO2006098593A1 (en) System for tracing menu search path by user

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
CP02 Change in the address of a patent holder
CP02 Change in the address of a patent holder

Address after: 9/F, Building C, No. 28, North Tianfu Avenue, China (Sichuan) Pilot Free Trade Zone, Hi tech Zone, Chengdu, 610000, Sichuan

Patentee after: CHENGDU KNOWNSEC INFORMATION TECHNOLOGY Co.,Ltd.

Address before: 610000, 11th floor, building 2, no.219, Tianfu Third Street, Chengdu pilot Free Trade Zone, hi tech Zone, Chengdu, Sichuan Province 610000

Patentee before: CHENGDU KNOWNSEC INFORMATION TECHNOLOGY Co.,Ltd.