CN110635958B - Network fault diagnosis method, device and storage medium - Google Patents

Network fault diagnosis method, device and storage medium Download PDF

Info

Publication number
CN110635958B
CN110635958B CN201911074749.XA CN201911074749A CN110635958B CN 110635958 B CN110635958 B CN 110635958B CN 201911074749 A CN201911074749 A CN 201911074749A CN 110635958 B CN110635958 B CN 110635958B
Authority
CN
China
Prior art keywords
domain name
web client
request
name system
network
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
CN201911074749.XA
Other languages
Chinese (zh)
Other versions
CN110635958A (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.)
Beijing Knownsec Information Technology Co Ltd
Original Assignee
Beijing 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 Beijing Knownsec Information Technology Co Ltd filed Critical Beijing Knownsec Information Technology Co Ltd
Priority to CN201911074749.XA priority Critical patent/CN110635958B/en
Publication of CN110635958A publication Critical patent/CN110635958A/en
Application granted granted Critical
Publication of CN110635958B publication Critical patent/CN110635958B/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
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/02Standardisation; Integration
    • H04L41/0246Exchanging or transporting network management information using the Internet; Embedding network management web servers in network elements; Web-services-based protocols
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0677Localisation of faults
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/45Network directories; Name-to-address mapping
    • H04L61/4505Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols
    • H04L61/4511Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols using domain name system [DNS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • H04L67/025Protocols based on web technology, e.g. hypertext transfer protocol [HTTP] for remote control or remote monitoring of applications

Abstract

The application provides a network fault diagnosis method, a device and a storage medium, which comprises the steps of receiving a request for acquiring network operator information, an IP of a recursive domain name system and an IP of a content distribution network node, wherein the request is sent by a Web client and comprises a random sub-domain name of the Web client; searching the IP of the Web client and the IP of a recursion domain name system in a database according to the random sub-domain name of the Web client; searching network operator information corresponding to the Web client according to the IP of the Web client; acquiring the IP of a content distribution network node accessed by a Web client according to an IP request authoritative domain name system of the Web client; and sending the network operator information corresponding to the Web client, the IP of the recursive domain name system and the IP of the content distribution network node to the Web client so as to enable the Web client to carry out network fault diagnosis.

Description

Network fault diagnosis method, device and storage medium
Technical Field
The present application relates to the field of network diagnosis, and in particular, to a method, an apparatus, and a storage medium for network fault diagnosis.
Background
The traditional network fault diagnosis mode adopts a protocol stack mode, however, the protocol stack mode needs higher operation authority for client equipment, and the authority can be obtained only by installing related application programs or executing related codes to call a protocol stack.
The network fault diagnosis through the application program requires different versions to be developed for client devices of different platforms, and the resource investment is large; the network fault diagnosis by executing the codes has certain technical capability requirements on users, some dependent libraries also need to be installed, and the operability and the applicability are poor.
Disclosure of Invention
An object of the embodiments of the present application is to provide a method, an apparatus, and a storage medium for network fault diagnosis, so as to solve the problems of large resource investment, poor operability, and poor applicability existing in the existing protocol stack network diagnosis manner.
In a first aspect, an embodiment provides a network fault diagnosis method applied to a Web server, where the method includes: receiving a request for acquiring network operator information, an IP of a recursive domain name system and an IP of a content distribution network node, wherein the request is sent by a Web client and comprises a random sub-domain name of the Web client; searching the IP of the Web client and the IP of the recursive domain name system in a database according to the random sub-domain name of the Web client, wherein the random sub-domain name of the Web client, the IP of the Web client and the IP of the recursive domain name system are pre-associated and stored in the database; searching network operator information corresponding to the Web client according to the IP of the Web client; acquiring the IP of a content distribution network node accessed by the Web client according to the IP request authoritative domain name system of the Web client; and sending the network operator information corresponding to the Web client, the IP of the recursive domain name system and the IP of the content distribution network node to the Web client so that the Web client performs network fault diagnosis by using the corresponding network operator information, the IP of the recursive domain name system and the IP of the content distribution network node.
In the designed network fault diagnosis method, through the combination of the Web server and the Web client, network fault diagnosis can be performed on any Web client device supporting access to the Web server, independent application programs do not need to be developed for various types of Web client devices, the problems that different versions need to be developed for Web client devices of different platforms when the network fault diagnosis is performed through the application programs in the traditional protocol stack, the resource investment is large are solved, and the development cost can be obviously saved; meanwhile, a user can complete network fault diagnosis only by clicking a diagnosis button on the Web client, the problems that the conventional protocol stack has certain technical capability requirements on the user when the network fault diagnosis is carried out through executing codes, some dependent libraries need to be installed, and the operability and the applicability are poor are solved, and the applicability and the convenience of the network fault diagnosis are improved.
In an optional implementation manner of the first aspect, before receiving the request sent by the Web client to acquire the network operator information, the IP of the recursive domain name system, and the IP of the content distribution network node, the method further includes: receiving a request for acquiring the random sub-domain name sent by the Web client; acquiring the IP of the Web client according to the request, and generating a random sub-domain name; and storing the IP of the Web client and the random sub-domain name in the database in an associated manner, and returning the random sub-domain name to the Web client.
In the embodiment designed above, before network fault diagnosis is performed, the random sub-domain name of the Web client may be generated at each diagnosis, so that the security of network diagnosis is higher; only one random sub-domain name can be generated, and the random sub-domain name is not changed in the subsequent diagnosis processes, so that the network diagnosis efficiency is higher.
In an optional implementation manner of the first aspect, after the returning the random sub-domain name to the Web client, the method further includes: and receiving the resolution result of the random sub-domain name sent by the authoritative domain name system, wherein the resolution result of the random sub-domain name comprises the IP of the recursive domain name system, and associating the random sub-domain name with the IP of the recursive domain name system and storing the random sub-domain name and the IP of the recursive domain name system in the database.
In a second aspect, an embodiment provides a network fault diagnosis method, which is applied to a Web client, and the method includes: responding to a first operation instruction of a user and sending a request for acquiring network operator information, an IP of a recursive domain name system and an IP of a content distribution network node to a Web server; if receiving the network operator information, the IP of the recursive domain name system and the IP of the content distribution network node returned by the Web server; network fault diagnosis is performed using the network operator information, the IP of the recursive domain name system, and the IP of the content distribution network node.
In the designed network fault diagnosis method, through the combination of the Web server and the Web client, network fault diagnosis can be performed on any Web client device supporting access to the Web server, independent application programs do not need to be developed for various types of Web client devices, the problems that different versions need to be developed for Web client devices of different platforms when the network fault diagnosis is performed through the application programs in the traditional protocol stack, the resource investment is large are solved, and the development cost can be obviously saved; meanwhile, a user can complete network fault diagnosis only by clicking a diagnosis button on the Web client, the problems that the conventional protocol stack has certain technical capability requirements on the user when the network fault diagnosis is carried out through executing codes, some dependent libraries need to be installed, and the operability and the applicability are poor are solved, and the applicability and the convenience of the network fault diagnosis are improved.
In an optional implementation manner of the second aspect, the performing network fault diagnosis by using the network operator information, the IP of the recursive domain name system, and the IP of the content distribution network node includes: sending a first resource acquisition request to a corresponding content distribution network node according to the IP of the content distribution network node, recording the time consumed by the first resource acquisition request, and performing network fault diagnosis according to the time consumed by the first resource acquisition request; sending a second resource acquisition request to the network operator according to the corresponding network operator information, recording the time consumed by the second resource acquisition request, and performing network fault diagnosis according to the time consumed by the second resource acquisition request; and determining the network connectivity of the network operator and the recursive domain name system operator according to the corresponding network operator information and the IP of the recursive domain name system.
In the embodiment designed above, the fault diagnosis is performed through three diagnosis modes, so that the network fault diagnosis is more comprehensive, and when the CDN fails, the failed node can be quickly located according to the obtained CDN node IP.
In an optional implementation manner of the second aspect, before the sending, to the Web server, the request for obtaining the network operator information, the IP of the recursive domain name system, and the IP of the content distribution network node in response to the operation instruction of the user, the method further includes: responding to a second operation instruction of the user and sending a request for acquiring the random sub-domain name to the Web server; and receiving the random sub domain name returned by the Web server.
In an optional implementation manner of the second aspect, before the sending, to the Web server, the request for obtaining the network operator information, the IP of the recursive domain name system, and the IP of the content distribution network node in response to the operation instruction of the user, the method further includes: sending a random sub-domain name resolution request to the recursive domain name system, wherein the random sub-domain name resolution request comprises the random sub-domain name; and receiving a random sub-domain name resolution result returned by the recursive domain name system.
In a third aspect, an embodiment provides a network fault diagnosis apparatus, which is applied to a Web server, and the apparatus includes: the system comprises a receiving module, a sending module and a receiving module, wherein the receiving module is used for receiving a request which is sent by a Web client and used for acquiring network operator information, an IP of a recursive domain name system and an IP of a content distribution network node, and the request comprises a random sub-domain name of the Web client; the searching module is used for searching the IP of the Web client and the IP of the recursive domain name system in a database according to the random sub-domain name of the Web client, and the random sub-domain name of the Web client, the IP of the Web client and the IP of the recursive domain name system are pre-associated and stored in the database; searching network operator information corresponding to the Web client according to the IP of the Web client; the acquisition module is used for acquiring the IP of the content distribution network node accessed by the Web client according to the IP request authoritative domain name system of the Web client; the sending module is further configured to send the network operator information corresponding to the Web client, the IP of the recursive domain name system, and the IP of the content distribution network node to the Web client, so that the Web client performs network fault diagnosis by using the corresponding network operator information, the IP of the recursive domain name system, and the IP of the content distribution network node.
In the designed network fault diagnosis device, through the combination of the Web server and the Web client, network fault diagnosis can be performed on any Web client device supporting access to the Web server, independent application programs do not need to be developed for various types of Web client devices, the problems that different versions need to be developed for Web client devices of different platforms when the traditional protocol stack performs network fault diagnosis through the application programs, the resource investment is large are solved, and the development cost can be obviously saved; meanwhile, a user can complete network fault diagnosis only by clicking a diagnosis button on the Web client, the problems that the conventional protocol stack has certain technical capability requirements on the user when the network fault diagnosis is carried out through executing codes, some dependent libraries need to be installed, and the operability and the applicability are poor are solved, and the applicability and the convenience of the network fault diagnosis are improved.
In an optional implementation manner of the third aspect, the receiving module is further configured to receive a request for acquiring the random sub-domain name, which is sent by a Web client, before receiving a request for acquiring network operator information, an IP of a recursive domain name system, and an IP of a content distribution network node, which are sent by the Web client; the acquiring module is further configured to acquire an IP of the Web client according to the request for acquiring the random sub-domain name, and generate a random sub-domain name; the association storage module is used for storing the IP of the Web client and the random sub-domain name in a database in an association manner; and the sending module is used for sending the random sub-domain name to the Web client.
In an optional implementation manner of the third aspect, the receiving module is further configured to receive the random sub-domain name resolution result pushed by an authoritative domain name system, where the random sub-domain name resolution result includes an IP of the recursive domain name system; the association storage module is further configured to associate the random sub-domain name with an IP of a recursive domain name system and store the associated sub-domain name in the database.
In a fourth aspect, an embodiment provides a network fault diagnosis apparatus, which is applied to a Web client, and the apparatus includes: the sending module is used for responding to a first operation instruction of a user and sending a request for acquiring network operator information, an IP of a recursive domain name system and an IP of a content distribution network node to the Web server; the receiving module is used for receiving the corresponding network operator information, the IP of the recursive domain name system and the IP of the content distribution network node which are returned by the Web server; and the diagnosis module is used for diagnosing network faults by utilizing the network operator information, the IP of the recursive domain name system and the IP of the content distribution network node.
In the designed network fault diagnosis device, through the combination of the Web server and the Web client, network fault diagnosis can be performed on any Web client device supporting access to the Web server, independent application programs do not need to be developed for various types of Web client devices, the problems that different versions need to be developed for Web client devices of different platforms when the traditional protocol stack performs network fault diagnosis through the application programs, the resource investment is large are solved, and the development cost can be obviously saved; meanwhile, a user can complete network fault diagnosis only by clicking a diagnosis button on the Web client, the problems that the conventional protocol stack has certain technical capability requirements on the user when the network fault diagnosis is carried out through executing codes, some dependent libraries need to be installed, and the operability and the applicability are poor are solved, and the applicability and the convenience of the network fault diagnosis are improved.
In an optional implementation manner of the fourth aspect, the diagnosis module is specifically configured to send a first resource acquisition request to a corresponding content distribution network node according to an IP of the content distribution network node, record time consumed by the first resource acquisition request, and perform network fault diagnosis according to the time consumed by the first resource acquisition request; sending a second resource acquisition request to the network operator according to the corresponding network operator information, recording the time consumed by the second resource acquisition request, and performing network fault diagnosis according to the time consumed by the second resource acquisition request; and determining the network connectivity of the network operator and the recursive domain name system operator according to the corresponding network operator information and the IP of the recursive domain name system.
In an optional implementation manner of the fourth aspect, the sending module is further configured to send, to the Web server, a request for obtaining the random sub-domain name in response to a second operation instruction of the user before sending the first request to the Web server in response to the first operation instruction of the user; and the receiving module is used for receiving the random sub-domain name returned by the Web server.
In an optional implementation manner of the fourth aspect, the sending module is further configured to send a random sub-domain name resolution request to a recursive domain name system, where the random sub-domain name resolution request includes the random sub-domain name; the receiving module is further configured to receive a random sub-domain name resolution result returned by the recursive domain name system.
In a fifth aspect, an embodiment provides an electronic device, which includes a memory and a processor, where the memory stores a computer program, and the processor executes the computer program to perform the method in the first aspect or any optional implementation manner of the first aspect.
In a sixth aspect, embodiments provide a computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, implements the method of any of the preceding embodiments.
In a seventh aspect, an embodiment provides a computer program product, which when run on a computer, causes the computer to execute the method in any optional implementation manner of the first aspect and the first aspect.
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 of the present application 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 that those skilled in the art can also obtain other related drawings based on the drawings without inventive efforts.
Fig. 1 is a first flowchart of a network fault diagnosis method according to a first embodiment of the present application;
fig. 2 is a second flowchart of a network fault diagnosis method according to the first embodiment of the present application;
fig. 3 is a third flowchart of a network fault diagnosis method according to the first embodiment of the present application;
fig. 4 is a fourth flowchart of a network fault diagnosis method according to the first embodiment of the present application;
fig. 5 is a block diagram of a network fault diagnosis apparatus according to a second embodiment of the present application;
fig. 6 is a block diagram of a network fault diagnosis apparatus according to a third embodiment of the present application;
fig. 7 is a block diagram of an electronic device according to a fourth embodiment of the present application.
Icon: 200-a receiving module; 202-a lookup module; 204-an obtaining module; 206-a sending module; 208-an associative storage module; 300-a sending module; 302-a receiving module; 304-a diagnostic module; 4-an electronic device; 401-a processor; 402-a memory; 403-communication bus.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application.
First embodiment
As shown in fig. 1, an embodiment of the present application provides a network fault diagnosis method, which specifically includes the following steps:
step S100: the Web client responds to a first operation instruction of a user and sends a request for acquiring network operator information, an IP of a recursive domain name system and an IP of a content distribution network node to a Web server, wherein the request comprises a random sub-domain name of the Web client.
Step S102: and the Web server searches the IP of the Web client and the IP of the recursive domain name system in a database according to the random sub-domain name of the Web client.
Step S104: and the Web server searches the network operator information corresponding to the Web client according to the IP of the Web client.
Step S106: and acquiring the IP of the content distribution network node accessed by the Web client according to the IP request authoritative domain name system of the Web client.
Step S108: and the Web server sends the network operator information corresponding to the Web client, the IP of the recursive domain name system and the IP of the content distribution network node to the Web client.
Step S110: the Web client performs network fault diagnosis using the network operator information, the IP of the content distribution network node, and the IP of the recursive domain name system.
The Web client transmitting the request for acquiring the network operator information, the IP of the recursive domain name system, and the IP of the content distribution network node to the Web server in response to the first operation instruction of the user in step S100 may open the Web client on a terminal device (on a computer) for the user, and transmit the request for acquiring the network operator information, the IP of the recursive domain name system, and the IP of the content distribution network node to the Web server by clicking a network diagnostic button of the Web client. The Web client can be a browser or other webpage access application programs; the request may be an HTTP request; the random sub-domain name of the Web client in step S100 may be obtained and stored in advance, and included in the request information when the Web client sends a request.
In step S102, after receiving the request for acquiring the network operator information, the IP of the recursive Domain Name System, and the IP of the content distribution network node sent by the Web client, the Web server searches, in a database, the IP of the Web client corresponding to the random sub-Domain Name of the Web client and the IP of the recursive Domain Name System corresponding to the Web client according to the random sub-Domain Name of the Web client included in the request, where the random sub-Domain Name of the Web client, the IP of the Web client, and the IP of the recursive Domain Name System (DNS) are associated in advance and stored in the database, and the search is performed in the database based on a mapping relationship between the random sub-Domain Name of the Web client and the IP of the recursive DNS.
In step S104, the Web server searches for network operator information of the Web client according to the IP of the Web client, where the network operator information includes an operator type, such as an operator of mobile, universal, telecommunication, and the like.
In step S106, the Web server further requests an authoritative Domain Name System (DNS) to obtain an IP of a Content Delivery Network node (CDN) accessed by the Web client according to the IP of the Web client, specifically: and the Web server acquires the IP of the CND accessed by the Web client according to the internal interface of the IP request authority DNS of the Web client.
In step S108, after acquiring the IP of the recursive domain name system, the network operator information, and the IP of the content distribution network node obtained in the foregoing step, the Web server sends the IP of the recursive domain name system, the network operator information, and the IP of the content distribution network node to the Web client, and then executes step S110.
In step S110, after receiving the IP of the recursive domain name system, the network operator information, and the IP of the content distribution network node returned by the Web server, the Web client performs network fault diagnosis based on the IP of the recursive domain name system, the network operator information, and the IP of the content distribution network node.
In the designed network fault diagnosis method, through the combination of the Web server and the Web client, network fault diagnosis can be performed on any Web client device supporting access to the Web server, independent application programs do not need to be developed for various types of Web client devices, the problems that different versions need to be developed for Web client devices of different platforms when the network fault diagnosis is performed through the application programs in the traditional protocol stack, the resource investment is large are solved, and the development cost can be obviously saved; meanwhile, a user can complete network fault diagnosis only by clicking a diagnosis button on a Web client browser, the problems that the conventional protocol stack has certain technical capability requirements on the user when performing network fault diagnosis through executing codes, some dependent libraries need to be installed, and the operability and the applicability are poor are solved, and the applicability and the convenience of network fault diagnosis are improved.
In an optional implementation manner of this embodiment, the step S110 of performing, by the Web client, network fault diagnosis by using the network operator information, the IP of the content distribution network node, and the IP of the recursive domain name system may specifically include:
step S1100: the Web client sends a first resource acquisition request to a corresponding content distribution network node according to the IP of the content distribution network node, records the time consumed by the first request, and carries out network fault diagnosis according to the time consumed by the first request.
Step S1102: and the Web client sends a second resource acquisition request to the network operator according to the network operator information, records the time consumed by the second request, and diagnoses the network fault according to the time consumed by the second request.
Step S1104: and the Web client determines the network connectivity of the network operator and the recursive domain name system operator according to the network operator information and the IP of the recursive domain name system.
It should be noted that there is no execution order in the steps S1100 to S1104, and the steps may be executed simultaneously or in any order.
In step S1100, the Web client determines connectivity from the local network to the CDN node according to the first request time consumption for requesting CDN node resources, and if the first request time consumption is too long, the user may contact the CDN operator to resolve the failure due to a CDN node failure. The mode of sending the first resource obtaining request may be that the Web client sends an HTTP resource obtaining request to an interface provided by the CDN node.
In step S1102, the Web client determines connectivity from the local network to the external network according to the second request time consumption for requesting network operator resources, and if the second request time consumption is over, for example, the second request time consumption exceeds 1000ms, the surface network connectivity is poor, and the user may replace the network operator. The mode of sending the second resource acquisition request may be that the Web client sends an HTTP resource acquisition request to an interface provided by the operator's machine room server.
In step S1104, the network connectivity is also related to the local network operator and the recursive DNS operator, which may also lead to network failure if the local network operator does not coincide with the recursive DNS operator, which also leads to poor connectivity of the network.
In the embodiment designed above, the network fault diagnosis is performed through the three methods, so that the network fault diagnosis is more comprehensive.
In an optional implementation manner of this embodiment, after the Web client sends, in response to the first operation instruction of the user, a request for acquiring network operator information, an IP of the recursive domain name system, and an IP of a content distribution network node to the Web server in step S100, if the information acquisition may fail for some reason, the Web client directly goes to step S1102 to send a second resource acquisition request to the network operator according to the network operator information, records time consumed by the second request, and performs network fault diagnosis according to the time consumed by the second request.
In an optional implementation manner of this embodiment, before the step S100, in response to the first operation instruction of the user, the Web client sends a request to the Web server to acquire the network operator information, the IP of the recursive domain name system, and the IP of the content distribution network node, as shown in fig. 3, the method further includes:
step S90: and the Web client responds to a second operation instruction of the user and sends a request for acquiring the random sub-domain name to the Web server.
Step S92: the Web server acquires the IP of the Web client according to a request for acquiring the random sub-domain name sent by the Web client, generates the random sub-domain name, and stores the IP of the Web client and the random sub-domain name in a database in an associated manner.
Step S94: and the Web server returns the random sub-domain name to the Web client.
In step S90, the Web client performs, in response to the second operation of the user, sending a request to the Web server to acquire the random sub-domain name, specifically, the user accesses the Web interface through a browser of the Web client and sends an HTTP request to the Web server to acquire the random sub-domain name.
In step S92, the Web server obtains the IP of the Web client according to the HTTP request, generates a unique random subdomain name according to the IP of the Web client, associates the unique random subdomain name with the IP of the Web client, and stores the unique random subdomain name in the database, and then executes step S94 to return the unique random subdomain name to the Web client.
It should be noted that the random sub-domain name of the Web client in the present application may be regenerated each time the diagnosis is performed, or may be generated only once, then received by the Web client, stored, and then directly executed in step S100 when the network fault diagnosis is performed.
In addition, after the Web client sends the request for acquiring the random sub-domain name to the Web server in response to the second operation instruction of the user in step S90, the random sub-domain name may be failed to be acquired due to network anomaly, and at this time, sending the resource request to all operators is performed, and the resource request duration is recorded.
In an optional implementation manner of this embodiment, in step S100, before the Web client sends a request for acquiring network operator information, an IP of a recursive domain name system, and an IP of a content distribution network node to the Web server in response to a first operation instruction of a user, resolution of a domain name may occur, and in the process of resolution, the authoritative DNS may push a sub-domain name and an IP of a last-stage recursive DNS (that is, an IP of the recursive DNS mentioned above) that passes through in the process of domain name resolution to the server, as shown in fig. 4, the specific steps are as follows:
step S95: the Web client sends a domain name resolution request to the recursive DNS.
Step S96: and the recursive DNS does not find the IP of the Web server corresponding to the random sub-domain name, and the domain name resolution request is sent to the authoritative DNS.
Step S97: and the authoritative DNS records the IP of the last level of recursive DNS, pushes the IP of the last level of recursive DNS and the random sub-domain name of the Web client to the Web server, and returns the result of domain name resolution to the recursive DNS.
Step S98: the Web server associates the random sub-domain name of the Web client with the IP of the last level of recursive DNS and stores the random sub-domain name and the IP of the last level of recursive DNS in a database; the recursive DNS returns the domain name resolution result to the Web client.
Step S99: the Web client executes step S100 after receiving the domain name resolution result returned by the recursive DNS.
In step S95, the Web client sends the domain name resolution request to the recursive DNS, specifically, the browser of the Web client performs domain name resolution on the random sub-domain name first, sends the DNS request to the recursive DNS for domain name resolution, and then executes step S96.
In step S96, the recursive DNS does not find the IP of the Web server corresponding to the random sub-domain name, which means that all the recursive DNS do not find the IP of the Web server corresponding to the random sub-domain name, and the last-level DNS sends the domain name resolution request to the authoritative DNS.
Second embodiment
Fig. 5 shows a schematic structural block diagram of a network fault diagnosis device provided by the present application, and it should be understood that the device corresponds to the above-mentioned method embodiments executed by the Web server in fig. 1 to 4, and can execute the steps involved in the method executed by the Web server in the first embodiment, and the specific functions of the device can be referred to the above description, and in order to avoid repetition, the detailed description is appropriately omitted here. The device includes at least one software function that can be stored in memory in the form of software or firmware (firmware) or solidified in the Operating System (OS) of the device. Specifically, the apparatus includes: a receiving module 200, configured to receive a request sent by a Web client to obtain network operator information, an IP of a recursive domain name system, and an IP of a content distribution network node, where the request includes a random sub-domain name of the Web client; the searching module 202 is used for searching the IP of the Web client and the IP of the recursive domain name system in the database according to the random sub-domain name of the Web client, and the random sub-domain name of the Web client, the IP of the Web client and the IP of the recursive domain name system are pre-associated and stored in the database; searching network operator information corresponding to the Web client according to the IP of the Web client; the obtaining module 204 is configured to obtain, according to an IP request authoritative domain name system of the Web client, an IP of a content distribution network node accessed by the Web client; the sending module 206 is further configured to send the network operator information corresponding to the Web client, the IP of the recursive domain name system, and the IP of the content distribution network node to the Web client, so that the Web client performs network fault diagnosis by using the corresponding network operator information, the IP of the recursive domain name system, and the IP of the content distribution network node.
In the designed network fault diagnosis device, through the combination of the Web server and the Web client, network fault diagnosis can be performed on any Web client device supporting access to the Web server, independent application programs do not need to be developed for various types of Web client devices, the problems that different versions need to be developed for Web client devices of different platforms when the traditional protocol stack performs network fault diagnosis through the application programs, the resource investment is large are solved, and the development cost can be obviously saved; meanwhile, a user can complete network fault diagnosis only by clicking a diagnosis button on a Web client browser, the problems that the conventional protocol stack has certain technical capability requirements on the user when performing network fault diagnosis through executing codes, some dependent libraries need to be installed, and the operability and the applicability are poor are solved, and the applicability and the convenience of network fault diagnosis are improved.
In an optional implementation manner of this embodiment, the receiving module 200 is further configured to receive a request for acquiring a random sub-domain name sent by a Web client before receiving a request for acquiring network operator information, an IP of a recursive domain name system, and an IP of a content distribution network node sent by the Web client; the obtaining module 204 is further configured to obtain an IP of the Web client according to the request for obtaining the random sub-domain name, and generate a random sub-domain name; an association storage module 208, configured to store the IP of the Web client and the random sub-domain name in association in a database; and the sending module 206 is configured to send the random sub-domain name to the Web client.
In an optional implementation manner of this embodiment, the receiving module 200 is further configured to receive a random sub-domain name resolution result pushed by the authoritative domain name system, where the random sub-domain name resolution result includes an IP of a recursive domain name system; and the association storage module 208 is further configured to associate and store the random sub-domain name with the IP of the recursive domain name system in the database.
Third embodiment
Fig. 6 shows a schematic structural block diagram of a network fault diagnosis device provided by the present application, and it should be understood that the device corresponds to the above-mentioned method embodiments executed by the Web client in fig. 1 to 4, and is capable of executing the steps involved in the method executed by the Web client in the first embodiment, and the specific functions of the device may be referred to the above description, and in order to avoid repetition, detailed description is appropriately omitted here. The device includes at least one software function that can be stored in memory in the form of software or firmware (firmware) or solidified in the Operating System (OS) of the device. Specifically, the apparatus includes: a sending module 300, configured to send, to a Web server, a request for acquiring network operator information, an IP of a recursive domain name system, and an IP of a content distribution network node in response to a first operation instruction of a user; a receiving module 302, configured to receive corresponding network operator information, an IP of a recursive domain name system, and an IP of a content distribution network node, where the network operator information, the IP of the recursive domain name system, and the IP of the content distribution network node are returned by the Web server; and the diagnosis module 304 is used for performing network fault diagnosis by using the network operator information, the IP of the recursive domain name system and the IP of the content distribution network node.
In the designed network fault diagnosis device, through the combination of the Web server and the Web client, network fault diagnosis can be performed on any Web client device supporting access to the Web server, independent application programs do not need to be developed for various types of Web client devices, the problems that different versions need to be developed for Web client devices of different platforms when the traditional protocol stack performs network fault diagnosis through the application programs, the resource investment is large are solved, and the development cost can be obviously saved; meanwhile, a user can complete network fault diagnosis only by clicking a diagnosis button on a Web client browser, the problems that the conventional protocol stack has certain technical capability requirements on the user when performing network fault diagnosis through executing codes, some dependent libraries need to be installed, and the operability and the applicability are poor are solved, and the applicability and the convenience of network fault diagnosis are improved.
In an optional implementation manner of this embodiment, the diagnosing module 304 is specifically configured to send a first resource obtaining request to a corresponding content distribution network node according to an IP of the content distribution network node, record time consumed by the first resource obtaining request, and perform network fault diagnosis according to the time consumed by the first resource obtaining request; sending a second resource acquisition request to the network operator according to the corresponding network operator information, recording the time consumed by the second resource acquisition request, and diagnosing network faults according to the time consumed by the second resource acquisition request; and determining the network connectivity of the network operator and the recursive domain name system operator according to the corresponding network operator information and the IP of the recursive domain name system.
In an optional implementation manner of this embodiment, the sending module 300 is further configured to send a request for obtaining the random sub-domain name to the Web server in response to a second operation instruction of the user before sending the first request to the Web server in response to the first operation instruction of the user; a receiving module 302, configured to receive the random sub-domain name returned by the Web server.
In an optional implementation manner of this embodiment, the sending module 300 is further configured to send a random sub-domain name resolution request to the recursive domain name system, where the random sub-domain name resolution request includes a random sub-domain name; the receiving module 302 is further configured to receive a random sub-domain name resolution result returned by the recursive domain name system.
Fourth embodiment
As shown in fig. 7, the present application provides an electronic device 4 including: processor 401 and memory 402, processor 401 and memory 402 being interconnected and in communication with each other via communication bus 403 and/or other form of connection mechanism (not shown), memory 402 storing a computer program executable by processor 401, which computer program is executed by processor 401 when the computing device is running to perform the method of the first embodiment, any of the alternative implementations of the first embodiment, such as steps S100 to S110: the Web client responds to a first operation instruction of a user and sends a request for acquiring network operator information, an IP of a recursive domain name system and an IP of a content distribution network node to a Web server, wherein the request comprises a random sub-domain name and the like of the Web client.
The present application provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the method of the first embodiment, any of the alternative implementations of the first embodiment.
The storage medium may be implemented by any type of volatile or nonvolatile storage device or combination thereof, such as a Static Random Access Memory (SRAM), an Electrically Erasable Programmable Read-Only Memory (EEPROM), an Erasable Programmable Read-Only Memory (EPROM), a Programmable Read-Only Memory (PROM), a Read-Only Memory (ROM), a magnetic Memory, a flash Memory, a magnetic disk, or an optical disk.
The present application provides a computer program product which, when run on a computer, causes the computer to perform the method of the first embodiment, any of its alternative implementations.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
In addition, units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
Furthermore, the functional modules in the embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
It should be noted that the functions, if implemented in the form of software functional modules and sold or used as independent products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
In this document, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions.
The above description is only an example of the present application and is not intended to limit the scope of the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (9)

1. A network fault diagnosis method is applied to a Web server, and comprises the following steps:
receiving a request for acquiring network operator information, an IP of a recursive domain name system and an IP of a content distribution network node, wherein the request is sent by a Web client and comprises a random sub-domain name of the Web client;
searching the IP of the Web client and the IP of the recursive domain name system in a database according to the random sub-domain name of the Web client, wherein the random sub-domain name of the Web client, the IP of the Web client and the IP of the recursive domain name system are pre-associated and stored in the database;
searching network operator information corresponding to the Web client according to the IP of the Web client;
acquiring the IP of a content distribution network node accessed by the Web client according to the IP request authoritative domain name system of the Web client;
sending network operator information corresponding to the Web client, an IP of a recursive domain name system and an IP of a content distribution network node to the Web client, so that the Web client sends a first resource acquisition request to the corresponding content distribution network node according to the IP of the content distribution network node, records the time consumed by the first request, and diagnoses network faults according to the time consumed by the first request;
the Web client sends a second resource acquisition request to the network operator according to the network operator information, records the time consumed by the second request, and diagnoses network faults according to the time consumed by the second request;
and the Web client determines the network connectivity of the network operator and the recursive domain name system operator according to the network operator information and the IP of the recursive domain name system so as to diagnose the network fault.
2. The method of claim 1, wherein before receiving the request sent by the Web client to obtain the network operator information, the IP of the recursive domain name system, and the IP of the content distribution network node, the method further comprises:
receiving a request for acquiring the random sub-domain name sent by the Web client;
acquiring the IP of the Web client according to the request for acquiring the random sub-domain name, and generating a random sub-domain name;
and storing the IP of the Web client and the random sub-domain name in the database in an associated manner, and returning the random sub-domain name to the Web client.
3. The method of claim 1, wherein after the returning the random sub-domain name to the Web client, the method further comprises:
and receiving the resolution result of the random sub-domain name sent by the authoritative domain name system, wherein the resolution result of the random sub-domain name comprises the IP of the recursive domain name system, and associating the random sub-domain name with the IP of the recursive domain name system and storing the random sub-domain name and the IP of the recursive domain name system in the database.
4. A network fault diagnosis method is applied to a Web client, and comprises the following steps:
responding to a first operation instruction of a user and sending a request for acquiring network operator information, an IP of a recursive domain name system and an IP of a content distribution network node to a Web server;
if receiving the network operator information, the IP of the recursive domain name system and the IP of the content distribution network node returned by the Web server;
sending a first resource acquisition request to a corresponding content distribution network node according to the IP of the content distribution network node, recording the time consumed by the first request, and diagnosing network faults according to the time consumed by the first request;
sending a second resource acquisition request to the network operator according to the network operator information, recording the time consumed by the second request, and diagnosing network faults according to the time consumed by the second request;
and determining the network connectivity of the network operator and the recursive domain name system operator according to the network operator information and the IP of the recursive domain name system.
5. The method according to claim 4, wherein before the responding to the operation instruction of the user sends the request for obtaining the network operator information, the IP of the recursive domain name system, and the IP of the content distribution network node to the Web server, the method further comprises:
responding to a second operation instruction of the user and sending a request for acquiring the random sub-domain name to the Web server;
and receiving the random sub domain name returned by the Web server.
6. The method according to claim 4, wherein before the responding to the operation instruction of the user sends the request for obtaining the network operator information, the IP of the recursive domain name system, and the IP of the content distribution network node to the Web server, the method further comprises:
sending a random sub-domain name resolution request to the recursive domain name system, wherein the random sub-domain name resolution request comprises the random sub-domain name;
and receiving a random sub-domain name resolution result returned by the recursive domain name system.
7. A network fault diagnosis apparatus applied to a Web server, the apparatus comprising:
the system comprises a receiving module, a sending module and a receiving module, wherein the receiving module is used for receiving a request which is sent by a Web client and used for acquiring network operator information, an IP of a recursive domain name system and an IP of a content distribution network node, and the request comprises a random sub-domain name of the Web client;
the searching module is used for searching the IP of the Web client and the IP of the recursive domain name system in a database according to the random sub-domain name of the Web client, and the random sub-domain name of the Web client, the IP of the Web client and the IP of the recursive domain name system are pre-associated and stored in the database; searching network operator information corresponding to the Web client according to the IP of the Web client;
the acquisition module is used for acquiring the IP of the content distribution network node accessed by the Web client according to the IP request authoritative domain name system of the Web client;
the sending module is used for sending the network operator information corresponding to the Web client, the IP of the recursive domain name system and the IP of the content distribution network node to the Web client so that the Web client sends a first resource acquisition request to the corresponding content distribution network node according to the IP of the content distribution network node, records the time consumption of the first request and carries out network fault diagnosis according to the time consumption of the first request; the Web client sends a second resource acquisition request to the network operator according to the network operator information, records the time consumed by the second request, and diagnoses network faults according to the time consumed by the second request; and the Web client determines the network connectivity of the network operator and the recursive domain name system operator according to the network operator information and the IP of the recursive domain name system so as to diagnose the network fault.
8. A network fault diagnosis apparatus applied to a Web client, the apparatus comprising:
the sending module is used for responding to a first operation instruction of a user and sending a request for acquiring network operator information, an IP of a recursive domain name system and an IP of a content distribution network node to the Web server;
the receiving module is used for receiving the network operator information, the IP of the recursive domain name system and the IP of the content distribution network node returned by the Web server;
the diagnosis module is used for sending a first resource acquisition request to the corresponding content distribution network node according to the IP of the content distribution network node, recording the time consumed by the first request, and diagnosing network faults according to the time consumed by the first request;
the Web client sends a second resource acquisition request to the network operator according to the network operator information, records the time consumed by the second request, and diagnoses network faults according to the time consumed by the second request;
and the Web client determines the network connectivity of the network operator and the recursive domain name system operator according to the network operator information and the IP of the recursive domain name system so as to diagnose the network fault.
9. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the method of any one of claims 1 to 6.
CN201911074749.XA 2019-11-05 2019-11-05 Network fault diagnosis method, device and storage medium Active CN110635958B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911074749.XA CN110635958B (en) 2019-11-05 2019-11-05 Network fault diagnosis method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911074749.XA CN110635958B (en) 2019-11-05 2019-11-05 Network fault diagnosis method, device and storage medium

Publications (2)

Publication Number Publication Date
CN110635958A CN110635958A (en) 2019-12-31
CN110635958B true CN110635958B (en) 2022-04-29

Family

ID=68979048

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911074749.XA Active CN110635958B (en) 2019-11-05 2019-11-05 Network fault diagnosis method, device and storage medium

Country Status (1)

Country Link
CN (1) CN110635958B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7047950B1 (en) 2021-02-24 2022-04-05 沖電気工業株式会社 Processing devices, name resolution servers, terminal devices, methods and programs

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9137101B2 (en) * 2011-11-23 2015-09-15 Avaya Inc. Multi-layer network diagnostic tracing
KR102337548B1 (en) * 2014-07-18 2021-12-08 현대자동차주식회사 Method for diagnosing network and apparatus for the same
EP3213222B1 (en) * 2014-10-27 2021-03-24 Level 3 Communications, LLC Content delivery systems and methods
CN108234207B (en) * 2017-12-29 2021-09-21 北京奇虎科技有限公司 Fault positioning method and device based on Content Delivery Network (CDN)
CN109495319B (en) * 2018-12-24 2021-12-28 网易(杭州)网络有限公司 Method, device and equipment for determining fault information of CDN node

Also Published As

Publication number Publication date
CN110635958A (en) 2019-12-31

Similar Documents

Publication Publication Date Title
CN105808399B (en) Remote debugging method and device
CN111147616B (en) Resource acquisition method and device, electronic equipment and storage medium
CN103581351B (en) The method and apparatus of network access
CN101765837A (en) firmware retrieval across a network
CN109639748B (en) Cache updating method, device and system of DNS (Domain name Server) and domain name system
CN104683330A (en) Domain name hijacking resisting method and device
CN112995354B (en) Domain name resolution record reconstruction method and domain name resolution method
WO2020088170A1 (en) Domain name system configuration method and related apparatus
CN111106983B (en) Method and device for detecting network connectivity
CN110635958B (en) Network fault diagnosis method, device and storage medium
CN114745356A (en) Domain name resolution method, device and equipment and readable storage medium
JP5707263B2 (en) Fault location diagnostic system and fault location diagnostic method
CN115348191B (en) Internet of things terminal data acquisition method and device in wireless VPDN (virtual private digital network)
CN108647139B (en) System test method, device, storage medium and electronic device
WO2022267759A1 (en) Configuration method and configuration apparatus for domain name service (dns)
CN112118325A (en) DNS analysis processing method, device, analysis server and storage medium
CN112769967B (en) Domain name resolution processing method and device and electronic equipment
CN111092966B (en) Domain name system, domain name access method and device
CN115150358B (en) Domain name acquisition method, electronic device and system
CN114697201A (en) Data processing method and device based on application client side proxy request
CN110035134B (en) Network address translation method, device and access equipment
CN111491033A (en) Connection establishing method and device
CN104869182A (en) Domain name resolution method and device
CN105630637A (en) Software backup method, software backup terminal, software recovery method and software recovery terminal
CN111200512A (en) Network connection disaster tolerance method, terminal device, storage medium and electronic device

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