CN113726607A - Network detection method and device, electronic equipment and storage medium - Google Patents
Network detection method and device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN113726607A CN113726607A CN202111004621.3A CN202111004621A CN113726607A CN 113726607 A CN113726607 A CN 113726607A CN 202111004621 A CN202111004621 A CN 202111004621A CN 113726607 A CN113726607 A CN 113726607A
- Authority
- CN
- China
- Prior art keywords
- detection
- error
- network
- content
- probe
- 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.)
- Granted
Links
- 238000001514 detection method Methods 0.000 title claims abstract description 391
- 238000000034 method Methods 0.000 claims abstract description 40
- 239000000523 sample Substances 0.000 claims description 94
- 238000004458 analytical method Methods 0.000 claims description 10
- 238000004590 computer program Methods 0.000 claims description 9
- 230000000007 visual effect Effects 0.000 claims description 6
- 230000000977 initiatory effect Effects 0.000 claims description 3
- 238000012423 maintenance Methods 0.000 abstract 1
- 238000010586 diagram Methods 0.000 description 12
- 238000004891 communication Methods 0.000 description 8
- 238000012545 processing Methods 0.000 description 8
- 238000005070 sampling Methods 0.000 description 8
- 230000006870 function Effects 0.000 description 4
- 238000012544 monitoring process Methods 0.000 description 4
- 230000008569 process Effects 0.000 description 4
- 239000002699 waste material Substances 0.000 description 4
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 230000005540 biological transmission Effects 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 238000012360 testing method Methods 0.000 description 2
- 238000012546 transfer Methods 0.000 description 2
- 230000002159 abnormal effect Effects 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 238000013473 artificial intelligence Methods 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 230000036541 health Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 230000001953 sensory effect Effects 0.000 description 1
- 239000004984 smart glass Substances 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/08—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
- H04L43/0805—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
- H04L43/0811—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking connectivity
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/08—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
- H04L43/0823—Errors, e.g. transmission errors
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/45—Network directories; Name-to-address mapping
- H04L61/4505—Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols
- H04L61/4511—Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols using domain name system [DNS]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/02—Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Environmental & Geological Engineering (AREA)
- Mobile Radio Communication Systems (AREA)
- Telephonic Communication Services (AREA)
Abstract
The disclosure provides a network detection method, a network detection device, electronic equipment and a storage medium, and relates to the technical field of internet application, in particular to the technical field of network operation and maintenance. The specific implementation scheme is as follows: the method is applied to the mobile terminal and used for sending a detection starting message to a server; receiving a detection instruction set returned by the server according to the detection starting message, wherein the detection instruction set comprises: detecting content and detecting mode; performing network detection on the detection content according to a detection mode to obtain a network detection result; and sending the detection result to the server. The network detection based on the mobile terminal is realized.
Description
Technical Field
The present disclosure relates to the field of internet application technologies, and in particular, to a network detection method and apparatus, an electronic device, and a storage medium.
Background
Network services need to ensure stable network quality through real-time monitoring. In the prior art, a specific Network monitoring base station sends a detection request simulating real user access to periodically monitor a website, a domain name, a background interface and the like, so as to grasp the Network quality of a user to an IDC (Internet Data Center) or a CDN (Content Delivery Network) and further grasp the overall health condition of a Network service.
Disclosure of Invention
The disclosure provides a network detection method, a network detection device, an electronic device and a storage medium.
According to an aspect of the present disclosure, there is provided a network probing method applied to a mobile terminal, the method including:
sending a detection starting message to a server;
receiving a detection instruction set returned by the server according to the detection starting message, wherein the detection instruction set comprises: detecting content and detecting mode;
performing network detection on the detection content according to a detection mode to obtain a network detection result;
and sending the detection result to the server.
According to another aspect of the present disclosure, there is provided a network probing system comprising a server and a plurality of mobile terminals, wherein:
the server is used for receiving the detection starting message sent by the mobile terminal and returning a detection instruction set to the mobile terminal according to the detection starting message; receiving and analyzing a detection result sent by the mobile terminal to obtain detection data; displaying the detection data in a visual mode;
the mobile terminal is used for realizing any network detection method.
According to an aspect of the present disclosure, there is provided a network probing apparatus applied to a mobile terminal, the apparatus including:
the message sending module is used for sending a detection starting message to the server;
an instruction receiving module, configured to receive a probe instruction set returned by the server according to the probe initiation message, where the probe instruction set includes: detecting content and detecting mode;
the network detection module is used for carrying out network detection on the detection content according to the detection mode to obtain a network detection result;
and the result sending module is used for sending the detection result to the server.
According to the network detection method, the mobile terminal is used for obtaining the detection mode and the detection content from the server, so that the mobile terminal can perform network detection on the detection content according to the detection mode, a detection result is obtained, and network detection based on the mobile terminal is achieved.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present disclosure, nor do they limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
Drawings
The drawings are included to provide a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
fig. 1 is a schematic flow diagram of a first embodiment of a network probing method provided in accordance with the present disclosure;
fig. 2 is a flowchart illustrating one possible implementation manner of step S11 in the network probing method provided according to the present disclosure;
fig. 3 is a flowchart illustrating one possible implementation manner of step S13 in the network probing method provided according to the present disclosure;
fig. 4 is a flowchart illustrating one possible implementation manner of step S31 in the network probing method provided according to the present disclosure;
FIG. 5 is a schematic block diagram of a network probing system provided in accordance with the present disclosure;
FIG. 6 is a schematic diagram of a network probing apparatus provided in accordance with the present disclosure;
fig. 7 is a block diagram of an electronic device for implementing a network probing method of an embodiment of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, in which various details of the embodiments of the disclosure are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
In the related art, a specific network monitoring base station simulates real user access to perform network detection, but the network detection is not comprehensive enough due to limited scenes which can be covered by the specific monitoring base station, and the network detection is performed by simulating real users, so that the obtained detection result is different from the real network condition of actual users, and errors are easily generated in the network detection process.
In order to solve the problem, the present disclosure provides a network probing method, an apparatus, an electronic device, and a storage medium, where the network probing method is applied to a mobile terminal, and includes:
sending a detection starting message to a server;
receiving a detection instruction set returned by the server according to the detection starting message, wherein the detection instruction set comprises: detecting content and detecting mode;
performing network detection on the detection content according to a detection mode to obtain a network detection result;
and sending the detection result to the server.
Therefore, by applying the network detection method provided by the disclosure, the mobile terminal is used for obtaining the detection content and the detection mode from the server, and then the network detection is performed on the detection content according to the detection mode based on the mobile terminal, so that the real network condition of the user can be determined, and due to the popularity of the mobile terminal, the scene which can be covered by the network detection is wider, and the network service quality can be monitored more comprehensively.
Referring to fig. 1, fig. 1 is a flowchart illustrating a network probing method applied to a mobile terminal according to an embodiment of the present disclosure, including the following steps S11-S14.
Step S11: and sending a detection starting message to the server.
The network detection method in the embodiment of the disclosure is applied to a mobile terminal, and can be realized through the mobile terminal, specifically, the mobile terminal can be a notebook computer, a smart phone, a smart watch, smart glasses or the like. The mobile terminal may send a probe start message to the server in case that the mobile terminal is capable of network probing itself. In one example, the mobile terminal may perform a self-test, and send a probe start message to the server when a self-test result indicates that the mobile terminal meets a trigger condition of network probe. The detection start message may include information such as a current network condition of the mobile terminal, and a network detection mode that the mobile terminal can currently support. The mobile terminal sends the detection starting message to the server, so that the server can judge the current network condition, and acquire which mobile terminals can be used for network detection at present so as to determine whether the network detection can be carried out or not and how to carry out the network detection.
Step S12: and receiving a detection instruction set returned by the server according to the detection starting message.
Wherein the set of probing instructions comprises: detection content and detection mode.
And under the condition that the server judges that the network detection can be carried out, the server returns a detection instruction set to the mobile terminal. The detection content included in the detection instruction set may be content that needs to be detected when the mobile terminal performs network detection, for example, the time delay of network connection, the success rate of network connection request, the success rate of DNS (Domain Name System) analysis, the unobstructed situation of network link, and the like.
The probe method included in the probe instruction set may be a probe means required when the mobile terminal performs network probe, for example, a network connection request based on an HTTP Protocol (hypertext Transfer Protocol), a network connection request based on an HTTPs (hypertext Transfer Protocol over secure HTTP channel), a network connection request based on a TCP (Transmission Control Protocol), network probe by a Packet Internet Groper (Internet Packet probe), probe by a DNS resolution request, or the like.
The server can acquire the network detection mode and the network condition currently supported by the mobile terminal according to the detection starting message sent by the mobile terminal, determine the detection mode and the detection content required by the current network detection of the mobile terminal according to the network detection mode and the network condition, and send the obtained detection mode and the detection content to the mobile terminal as a detection instruction set.
The mobile terminal can perform network detection for one data center at a time or for a plurality of data centers at a time. In an example, when the server determines that a mobile terminal needs to perform network probing on multiple data centers, the server may send multiple probing instruction sets to the mobile terminal or encapsulate the multiple probing instruction sets into one message to the mobile terminal, so that the mobile terminal obtains probing manners and probing contents of the multiple data centers. For example, when the server determines that a mobile terminal needs to probe the internet data center and the content distribution network, a set of probing instructions for the internet data center and the content distribution network, respectively, including a probing mode and probing content for the internet data center and the content distribution network, respectively, may be sent to the mobile terminal.
Step S13: and carrying out network detection on the detection content according to a detection mode to obtain a network detection result.
After receiving the detection instruction set sent by the server, the mobile terminal can perform network detection on detection contents in the detection instruction set according to a detection mode in the detection instruction set. In an example, the mobile terminal may perform sorting according to network connection logic according to a network detection mode supported by the mobile terminal, to obtain a preset detection order, and perform network detection according to the preset detection order.
For example, the detection content in the detection instruction set sent by the server is to perform network detection on the IDC so as to know whether the network connection of the IDC is smooth, the detection modes are HTTPS, DNS, and PING, and at this time, the mobile terminal can obtain a detection sequence according to the network connection logic: the method comprises the steps that HTTPS, DNS and PING are carried out, the mobile terminal firstly initiates an HTTPS request to IDC, and if the request is successful, smooth network connection of the IDC is indicated; if the request fails, it is indicated that the IDC network connection has a problem, then a DNS analysis request is initiated, if the DNS analysis request fails, it is indicated that the DNS analysis has a problem, then PING detection can be initiated again, and the specific reason of the IDC network connection failure can be obtained. The IDC network connection failure and the specific reason can be used as the detection result of the network detection.
Step S14: and sending the detection result to the server.
As can be seen from the above, the detection result obtained by the mobile terminal corresponds to the detection content, which may include whether the network detection is successful or not, the detection data in the network detection process, the specific cause of the problem in the network detection process, and the like.
Therefore, by applying the network detection method provided by the disclosure, the mobile terminal is used for obtaining the detection content and the detection mode from the server, and then the network detection is performed on the detection content according to the detection mode based on the mobile terminal, so that the real network condition of the user can be determined, and due to the popularity of the mobile terminal, the scene which can be covered by the network detection is wider, and the network service quality can be monitored more comprehensively.
In a possible implementation manner, referring to fig. 2, the mobile terminal has a network probe application installed therein, and the step S11 sends a probe start message to the server, where the method includes:
step 21: and after the network detection application in the mobile terminal is started, sending a detection starting message to the server according to a preset triggering probability.
The mobile terminal may be installed with a network detection application, and the network detection application may be application software dedicated for network detection, or may be an additional function application of the application software in the mobile terminal, both of which are within the protection scope of the present application. When the network probing application is started, a probe start message may be sent to the server according to a preset trigger probability.
The preset trigger probability may be manually set at the network detection application development stage, for example, may be set to 1%, that is, after each time the network detection application is started, the mobile terminal is triggered to send the detection start message to the server with a probability of 1%. In one example, the mobile terminal may also preset a sampling numerator and a sampling denominator, a value of the sampling denominator is greater than a value of the sampling numerator, a value is selected between values less than the sampling denominator, and when the value is less than or equal to the value of the sampling numerator, the mobile terminal sends a probe start message to the server. For example, the sampling numerator is 1000, the sampling denominator is 100000, a random number is generated between 1 and 100000, if the random number is less than or equal to 1000, the logic for executing the probe is hit, the mobile terminal sends a probe start message to the server, otherwise, the mobile terminal does not send the probe start message to the server.
The preset trigger probability may also be determined by the network detection application according to the current network condition, for example, if the network detection application detects that the current network condition is better, the trigger probability of the mobile terminal sending the detection start message to the server is reduced, and if the network detection application detects that the current network condition is worse, the trigger probability of the mobile terminal sending the detection start message to the server is improved.
Therefore, according to the network detection method provided by the disclosure, the mobile terminal can send the detection start message to the server according to the preset trigger probability, so that the network detection is more flexible, and resource waste caused by frequent sending of the detection start message by the mobile terminal can be avoided.
In a possible implementation manner, referring to fig. 3, the step S13 of performing network probing on the probe content according to the probing manner to obtain a network probing result includes:
step S31: and establishing a serial detection task according to the detection content and the detection mode, and adding the serial detection task into the global serial queue.
When the mobile terminal sends the detection starting message to the server and receives the detection content and the detection mode fed back by the server, the serial detection task can be established according to the detection content and the detection mode. Since the probe content returned by the server may include a plurality of probe contents, for example, the IDC and the CDN are respectively probed, the mobile terminal may establish a plurality of serial probe tasks, add the plurality of serial probe tasks to the global serial queue, and wait for the execution of the serial probe tasks. In one example, the network probe for the probe content in the probe instruction set may establish the serial probe tasks in a specified order; for example, when network probing is performed on a certain data center, HTTPS probing may be performed first, if HTTPS probing is successful, it is indicated that network connection with the data center is normal, and if HTTPS probing fails, it may be because DNS resolution is abnormal, and thus DNS probing is performed when HTTPS probing fails; if the DNS detection is successful, the problem occurs in the HTTPS connection stage, and if the DNS detection is failed, the network link is possibly not smooth, so that PING detection is performed when the DNS detection is failed; if the PING detection is successful, the DNS resolution phase is in a problem, and if the PING detection is failed, the network link is not smooth. Therefore, in one possible implementation, the serial probing tasks may be established according to the probing content and the probing manner in the order of the logic execution of the probing; for example, for data center a, the established serialized probe task may be HTTPS probe → DNS probe → PING probe. The established serial probe task is then added to a pre-established global serial queue.
Step S32: and when the working state of the mobile terminal is an idle state, selecting and executing the serial detection tasks according to the sequence of the serial detection tasks in the global serial queue to obtain a network detection result.
The mobile terminal can perform self-checking, and when the working state of the current mobile terminal is determined to be an idle state, the serial detection task is selected and executed. The determination mode that the working state of the mobile terminal is the idle state may be set in a self-defined manner according to an actual situation, for example, when the number of applications running in the mobile terminal is less than a preset number, or when the occupancy rate of the processor of the mobile terminal is less than a preset occupancy rate threshold, the working state of the mobile terminal is determined to be the idle state. Because the mobile terminal can establish a plurality of serial detection tasks, the mobile terminal can sequentially or parallelly select and execute the serial detection tasks according to the sequence of the plurality of serial detection tasks in the global serial queue to perform network detection, and further obtain a network detection result. For example, the mobile terminal may sequentially execute each serial probe task in the order of the serial probe tasks in the global serial queue, or may execute a plurality of serial probe tasks in parallel, although different serial probe tasks may be executed in parallel, each probe in the same serial probe task needs to be executed in order, for example, for the serial probe task HTTPS probe → DNS probe → PING of the data center a, it needs to execute HTTPS probe first and then DNS probe last to execute PING probe, where for the same serial probe task, when the probe result of the probe in the serial order before indicates normal, the probe in the serial order after is no longer executed.
Therefore, the network probing method provided by the present disclosure can execute the serial probing task when the mobile terminal is idle, and can avoid inconvenience brought to the user to use the mobile terminal due to network probing when the serial probing task of other network applications in the mobile terminal is not executed timely due to network probing.
In one possible implementation, referring to fig. 4, the probe content includes internet data center probe content with multiple IP addresses and content distribution network probe content with multiple IP addresses;
the step S31 establishes a serial probe task according to the probe content and the probe mode, and adds the serial probe task to the global serial queue, including:
step S41: according to a preset detection proportion, selecting the Internet data center detection contents of a plurality of IP addresses in the Internet data center detection contents of the IP addresses, and selecting the content distribution network detection contents of the IP addresses in the content distribution network detection contents of the IP addresses.
When the server performs network detection on the internet data center and the content distribution network, the server may send a detection instruction set corresponding to the internet data center and the content distribution network to the mobile terminal, where the detection instruction set of the internet data center may include detection content of the internet data center, and the detection instruction set of the content distribution network may include detection content of the content distribution network. Because the Internet data center and the content distribution network are both data centers and comprise a plurality of Internet Protocol addresses (Internet Protocol addresses), the mobile terminal can select Internet data center detection contents with a preset detection proportion of the IP addresses from the detection contents of the Internet data center according to a preset detection proportion, and select content distribution network detection contents with a preset detection proportion of the IP addresses from the detection contents of the content distribution network.
The preset detection proportion may be a ratio of the number of the IP addresses to be detected extracted by the mobile terminal set manually to the total number of the IP addresses, or a ratio of the number of the IP addresses to be detected by the network detection this time to the total number of the IP addresses set by the mobile terminal according to the previous network detection result.
Step S42: and establishing a serial detection task according to the selected detection content and the detection mode corresponding to the selected detection content.
The selected detection content comprises Internet data center detection content of the selected IP addresses with the preset detection proportion and content distribution network detection content of the selected IP addresses with the preset detection proportion.
After the internet data center detection content of the IP addresses with the preset proportion and the content of the IP addresses with the preset detection proportion are extracted according to the preset detection proportion to distribute the network detection content, the mobile terminal establishes a serial detection task according to the selected detection content and the detection mode corresponding to the selected detection content.
Step S43: and adding the established serial detection task into the global serial queue.
And the mobile terminal adds the established serial detection task into the global serial queue and waits for the execution of the serial detection task.
Therefore, according to the network detection method provided by the disclosure, the internet data center to be detected, the content distribution network and the IP address can be selected according to the preset detection proportion, the detection result obtained by detecting the extracted detection content can be representative through random extraction, and meanwhile, resource waste caused by all detection can be avoided.
In one embodiment of the present disclosure, the probing methods include HTTPS/HTTP probing, DNS probing, PING probing;
the network detection result comprises: error codes, wherein the error codes comprise at least one of HTTPS/HTTP detection error codes, DNS detection error codes and PING detection error codes;
the HTTPS/HTTP detection error code includes at least one of a cancel exception, a timeout error, a build error, a DNS resolution failure, a Socket closed error, a no network error, a data flow error, an sslhandsake (Secure Socket Layer handshake) error, an SSL (Secure Socket Layer) error, a connection reset error, a Socket error, an IO (Input/Output) error;
the DNS detection error code comprises at least one of Request error, Answer error, resolution no result, Query error, UDP SOCKET error and DNS server no error;
the PING detection error code includes at least one of a gateway error, an illegal destination domain name, an ICMP (Internet Control Message Protocol) error, a read-write error, and a packet loss rate.
On the other hand, referring to fig. 5, fig. 5 is a schematic structural diagram of a network detection system provided by the present disclosure, including a server 501 and a plurality of mobile terminals 502:
the server 501 is configured to receive a detection start message sent by the mobile terminal, and return a detection instruction set to the mobile terminal according to the detection start message; receiving and analyzing a detection result sent by the mobile terminal to obtain detection data; and displaying the detection data in a visual mode.
The mobile terminal 502 is configured to implement any of the network probing methods described above.
And after receiving the detection starting message sent by the mobile terminal, the server returns a detection instruction set to the mobile terminal according to the detection starting message. And after the mobile terminal returns the detection result, the server receives and analyzes the detection result sent by the mobile terminal to obtain the detection data. The detection data obtained after the server analyzes the detection result can represent the real situation of the network. The server displays the detection data in a visual manner, which may include a thermodynamic diagram, a distribution diagram, and the like, for example, an available rate thermodynamic diagram and a delay thermodynamic diagram, to indicate the detection time consumption and success rate conditions including province and city levels, and to cluster error codes indicating detection failure, and the obtained clustering result is used to analyze province and city level network link conditions. A nearby access point profile may also be included to indicate the probe success rate and time consumption for the tap access points including each province, for analyzing the time consumption and stability of different access points.
Therefore, by applying the network detection system provided by the disclosure, the mobile terminal is utilized to obtain the detection content and the detection mode from the server, and then the detection result is returned to the server based on the mobile terminal, so that the real network condition of the user can be determined, and due to the popularity of the mobile terminal, the network detection can cover a wider scene, so that the network service quality can be monitored more comprehensively. The server can display the detection data obtained after analyzing the detection result in a visual mode, and the network condition can be displayed more visually.
On the other hand, referring to fig. 6, fig. 6 is a schematic structural diagram of a network detecting device provided by the present disclosure, which is applied to a mobile terminal, and includes:
a message sending module 601, configured to send a probe start message to a server;
an instruction receiving module 602, configured to receive a probe instruction set returned by the server according to the probe initiation message, where the probe instruction set includes: detecting content and detecting mode;
a network detection module 603, configured to perform network detection on the detection content according to the detection manner, so as to obtain a network detection result;
a result sending module 604, configured to send the detection result to the server.
Therefore, by applying the network detection device provided by the disclosure, the mobile terminal is utilized to acquire the detection content and the detection mode from the server, and then the network detection is carried out on the detection content according to the detection mode based on the mobile terminal, so that the real network condition of the user can be determined, and the network detection can cover a wider scene due to the popularity of the mobile terminal, so that the network service quality can be monitored more comprehensively.
In an embodiment of the present disclosure, the mobile terminal is installed with a network detection application, and the message sending module 601 is specifically configured to:
and after the network detection application in the mobile terminal is started, sending a detection starting message to the server according to a preset triggering probability.
Therefore, according to the network detection device provided by the disclosure, the mobile terminal can send the detection starting message to the server according to the preset trigger probability, so that the network detection is more flexible, and the resource waste caused by frequently sending the detection starting message by the mobile terminal can be avoided.
In an embodiment of the present disclosure, the network probing module 603 includes:
the task establishing submodule is used for establishing a serial detection task according to the detection content and the detection mode and adding the serial detection task into a global serial queue;
and the task execution submodule is used for selecting and executing the serial detection tasks according to the sequence of the serial detection tasks in the global serial queue when the working state of the mobile terminal is an idle state, so as to obtain a network detection result.
Therefore, the network probing device provided by the present disclosure can execute the serial probing task when the mobile terminal is idle, and can avoid inconvenience brought to the user to use the mobile terminal due to network probing when the serial probing task of other network applications in the mobile terminal is not executed timely due to network probing.
In one embodiment of the present disclosure, the probe content includes internet data center probe content of a plurality of IP addresses and content distribution network probe content of a plurality of IP addresses;
the task establishing submodule is specifically configured to:
according to a preset detection proportion, selecting Internet data center detection contents of a plurality of IP addresses in a preset detection proportion from the Internet data center detection contents of the plurality of IP addresses, and selecting content distribution network detection contents of a plurality of IP addresses in a preset detection proportion from the content distribution network detection contents of the plurality of IP addresses;
establishing a serial detection task according to the selected detection content and the detection mode corresponding to the selected detection content, wherein the selected detection content comprises the Internet data center detection content of the selected IP addresses with the preset detection proportion and the content distribution network detection content of the selected IP addresses with the preset detection proportion;
and adding the established serial detection task into the global serial queue.
Therefore, the network detection device provided by the disclosure can select the internet data center to be detected, the content distribution network and the IP address according to the preset detection proportion, randomly extract the detection result obtained by detecting the extracted detection content to be representative, and simultaneously avoid resource waste caused by all detection.
In one embodiment of the present disclosure, the probing means includes HTTPS/HTTP probing, DNS probing, PING probing;
the network probing result comprises: an error code, wherein the error code comprises at least one of an HTTPS/HTTP probe error code, a DNS probe error code, a PING probe error code;
the HTTPS/HTTP detection error code comprises at least one of a cancel exception, an overtime error, a build connection error, a DNS analysis failure, a Socket closed error, a no network error, a data flow error, an SSLHandshake error, an SSL error, a connection reset error, a Socket error and an IO error;
the DNS detection error code comprises at least one of a Request error, an Answer error, no analysis result, a Query error, a UDP SOCKET error and no DNS server error;
the PING detection error code comprises at least one of gateway error, illegal destination domain name, ICMP error, read-write error and packet loss rate.
In the technical scheme of the disclosure, the collection, storage, use, processing, transmission, provision, disclosure and other processing of the personal information of the related user are all in accordance with the regulations of related laws and regulations and do not violate the good customs of the public order.
The present disclosure also provides an electronic device, a readable storage medium, and a computer program product according to embodiments of the present disclosure.
FIG. 7 illustrates a schematic block diagram of an example electronic device 700 that can be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 7, the device 700 comprises a computing unit 701, which may perform various suitable actions and processes according to a computer program stored in a Read Only Memory (ROM)702 or a computer program loaded from a storage unit 708 into a Random Access Memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the device 700 can also be stored. The computing unit 701, the ROM 702, and the RAM 703 are connected to each other by a bus 704. An input/output (I/O) interface 705 is also connected to bus 704.
Various components in the device 700 are connected to the I/O interface 705, including: an input unit 706 such as a keyboard, a mouse, or the like; an output unit 707 such as various types of displays, speakers, and the like; a storage unit 708 such as a magnetic disk, optical disk, or the like; and a communication unit 709 such as a network card, modem, wireless communication transceiver, etc. The communication unit 709 allows the device 700 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), and the Internet.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server may be a cloud server, a server of a distributed system, or a server with a combined blockchain.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present disclosure may be executed in parallel, sequentially, or in different orders, as long as the desired results of the technical solutions disclosed in the present disclosure can be achieved, and the present disclosure is not limited herein.
The above detailed description should not be construed as limiting the scope of the disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present disclosure should be included in the scope of protection of the present disclosure.
Claims (14)
1. A network detection method is applied to a mobile terminal, and comprises the following steps:
sending a detection starting message to a server;
receiving a detection instruction set returned by the server according to the detection starting message, wherein the detection instruction set comprises: detecting content and detecting mode;
performing network detection on the detection content according to the detection mode to obtain a network detection result;
and sending the detection result to the server.
2. The method of claim 1, wherein a network probe application is installed in the mobile terminal, and the sending the probe start message to the server comprises:
and after the network detection application in the mobile terminal is started, sending a detection starting message to the server according to a preset triggering probability.
3. The method of claim 1, wherein performing network probing on the probe content according to the probing manner to obtain a network probing result comprises:
establishing a serial detection task according to the detection content and the detection mode, and adding the serial detection task into a global serial queue;
and when the working state of the mobile terminal is an idle state, selecting and executing the serial detection tasks according to the sequence of the serial detection tasks in the global serial queue to obtain a network detection result.
4. The method of claim 2, wherein the probe content comprises a plurality of IP-addressed internet data center probe content and a plurality of IP-addressed content distribution network probe content;
establishing a serial detection task according to the detection content and the detection mode, and adding the serial detection task into a global serial queue, wherein the method comprises the following steps:
according to a preset detection proportion, selecting Internet data center detection contents of a plurality of IP addresses in a preset detection proportion from the Internet data center detection contents of the plurality of IP addresses, and selecting content distribution network detection contents of a plurality of IP addresses in a preset detection proportion from the content distribution network detection contents of the plurality of IP addresses;
establishing a serial detection task according to the selected detection content and the detection mode corresponding to the selected detection content, wherein the selected detection content comprises the Internet data center detection content of the selected IP addresses with the preset detection proportion and the content distribution network detection content of the selected IP addresses with the preset detection proportion;
and adding the established serial detection task into the global serial queue.
5. The method according to any of claims 1-4, wherein the probing means comprises HTTPS/HTTP probes, DNS probes, PING probes;
the network probing result comprises: an error code, wherein the error code comprises at least one of an HTTPS/HTTP probe error code, a DNS probe error code, a PING probe error code;
the HTTPS/HTTP detection error code comprises at least one of a cancel exception, an overtime error, a build connection error, a DNS analysis failure, a Socket closed error, a no network error, a data flow error, an SSLHandshake error, an SSL error, a connection reset error, a Socket error and an IO error;
the DNS detection error code comprises at least one of a Request error, an Answer error, no analysis result, a Query error, a UDP SOCKET error and no DNS server error;
the PING detection error code comprises at least one of gateway error, illegal destination domain name, ICMP error, read-write error and packet loss rate.
6. A network probing system comprising a server and a plurality of mobile terminals, wherein:
the server is used for receiving the detection starting message sent by the mobile terminal and returning a detection instruction set to the mobile terminal according to the detection starting message; receiving and analyzing a detection result sent by the mobile terminal to obtain detection data; displaying the detection data in a visual mode;
the mobile terminal, configured to implement the method of any one of claims 1-5.
7. A network detection device is applied to a mobile terminal, and the device comprises:
the message sending module is used for sending a detection starting message to the server;
an instruction receiving module, configured to receive a probe instruction set returned by the server according to the probe initiation message, where the probe instruction set includes: detecting content and detecting mode;
the network detection module is used for carrying out network detection on the detection content according to the detection mode to obtain a network detection result;
and the result sending module is used for sending the detection result to the server.
8. The apparatus according to claim 7, wherein the mobile terminal has a network probing application installed therein, and the message sending module is specifically configured to:
and after the network detection application in the mobile terminal is started, sending a detection starting message to the server according to a preset triggering probability.
9. The apparatus of claim 7, wherein the network probing module comprises:
the task establishing submodule is used for establishing a serial detection task according to the detection content and the detection mode and adding the serial detection task into a global serial queue;
and the task execution submodule is used for selecting and executing the serial detection tasks according to the sequence of the serial detection tasks in the global serial queue when the working state of the mobile terminal is an idle state, so as to obtain a network detection result.
10. The apparatus of claim 8, wherein the probe content comprises a plurality of IP-addressed internet data center probe content and a plurality of IP-addressed content distribution network probe content;
the task establishing submodule is specifically configured to:
according to a preset detection proportion, selecting Internet data center detection contents of a plurality of IP addresses in a preset detection proportion from the Internet data center detection contents of the plurality of IP addresses, and selecting content distribution network detection contents of a plurality of IP addresses in a preset detection proportion from the content distribution network detection contents of the plurality of IP addresses;
establishing a serial detection task according to the selected detection content and the detection mode corresponding to the selected detection content, wherein the selected detection content comprises the Internet data center detection content of the selected IP addresses with the preset detection proportion and the content distribution network detection content of the selected IP addresses with the preset detection proportion;
and adding the established serial detection task into the global serial queue.
11. The apparatus according to any of claims 7-10, wherein the probing means comprises HTTPS/HTTP probes, DNS probes, PING probes;
the network probing result comprises: an error code, wherein the error code comprises at least one of an HTTPS/HTTP probe error code, a DNS probe error code, a PING probe error code;
the HTTPS/HTTP detection error code comprises at least one of a cancel exception, an overtime error, a build connection error, a DNS analysis failure, a Socket closed error, a no network error, a data flow error, an SSLHandshake error, an SSL error, a connection reset error, a Socket error and an IO error;
the DNS detection error code comprises at least one of a Request error, an Answer error, no analysis result, a Query error, a UDP SOCKET error and no DNS server error;
the PING detection error code comprises at least one of gateway error, illegal destination domain name, ICMP error, read-write error and packet loss rate.
12. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-5.
13. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of claims 1-5.
14. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1-5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111004621.3A CN113726607B (en) | 2021-08-30 | 2021-08-30 | Network detection method and device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111004621.3A CN113726607B (en) | 2021-08-30 | 2021-08-30 | Network detection method and device, electronic equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113726607A true CN113726607A (en) | 2021-11-30 |
CN113726607B CN113726607B (en) | 2022-09-02 |
Family
ID=78679126
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111004621.3A Active CN113726607B (en) | 2021-08-30 | 2021-08-30 | Network detection method and device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113726607B (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114363209A (en) * | 2022-01-07 | 2022-04-15 | 北京百度网讯科技有限公司 | Performance detection method, device, equipment and storage medium based on TCP network |
CN114430383A (en) * | 2022-01-29 | 2022-05-03 | 北京百度网讯科技有限公司 | Method and device for screening detection nodes, electronic equipment and storage medium |
CN115037664A (en) * | 2022-05-31 | 2022-09-09 | 深圳市共进电子股份有限公司 | Network connection testing method, device, repeater and storage medium |
WO2023123978A1 (en) * | 2021-12-30 | 2023-07-06 | 达闼机器人股份有限公司 | Network detection method and system, device, and storage medium |
WO2023185533A1 (en) * | 2022-03-30 | 2023-10-05 | 中兴通讯股份有限公司 | Detection processing method, apparatus and system, and storage medium and electronic apparatus |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN201919010U (en) * | 2010-12-22 | 2011-08-03 | 中国工商银行股份有限公司 | Website accessing performance monitoring system |
CN103220161A (en) * | 2012-01-18 | 2013-07-24 | 深圳市腾讯计算机系统有限公司 | Method and device for detecting server status |
CN110224896A (en) * | 2019-06-24 | 2019-09-10 | 深圳前海桔子信息技术有限公司 | A kind of network performance data acquisition method, device, server and storage medium |
CN111130948A (en) * | 2019-12-30 | 2020-05-08 | 迈普通信技术股份有限公司 | Network quality detection method and device |
CN112311620A (en) * | 2019-10-25 | 2021-02-02 | 北京京东尚科信息技术有限公司 | Method, apparatus, electronic device and readable medium for diagnosing network |
CN112953791A (en) * | 2021-01-29 | 2021-06-11 | 北京字节跳动网络技术有限公司 | Network detection method and device, electronic equipment and computer readable storage medium |
-
2021
- 2021-08-30 CN CN202111004621.3A patent/CN113726607B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN201919010U (en) * | 2010-12-22 | 2011-08-03 | 中国工商银行股份有限公司 | Website accessing performance monitoring system |
CN103220161A (en) * | 2012-01-18 | 2013-07-24 | 深圳市腾讯计算机系统有限公司 | Method and device for detecting server status |
CN110224896A (en) * | 2019-06-24 | 2019-09-10 | 深圳前海桔子信息技术有限公司 | A kind of network performance data acquisition method, device, server and storage medium |
CN112311620A (en) * | 2019-10-25 | 2021-02-02 | 北京京东尚科信息技术有限公司 | Method, apparatus, electronic device and readable medium for diagnosing network |
CN111130948A (en) * | 2019-12-30 | 2020-05-08 | 迈普通信技术股份有限公司 | Network quality detection method and device |
CN112953791A (en) * | 2021-01-29 | 2021-06-11 | 北京字节跳动网络技术有限公司 | Network detection method and device, electronic equipment and computer readable storage medium |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2023123978A1 (en) * | 2021-12-30 | 2023-07-06 | 达闼机器人股份有限公司 | Network detection method and system, device, and storage medium |
CN114363209A (en) * | 2022-01-07 | 2022-04-15 | 北京百度网讯科技有限公司 | Performance detection method, device, equipment and storage medium based on TCP network |
CN114363209B (en) * | 2022-01-07 | 2024-05-28 | 北京百度网讯科技有限公司 | Performance detection method, device, equipment and storage medium based on TCP (Transmission control protocol) network |
CN114430383A (en) * | 2022-01-29 | 2022-05-03 | 北京百度网讯科技有限公司 | Method and device for screening detection nodes, electronic equipment and storage medium |
CN114430383B (en) * | 2022-01-29 | 2024-06-07 | 北京百度网讯科技有限公司 | Detection node screening method and device, electronic equipment and storage medium |
WO2023185533A1 (en) * | 2022-03-30 | 2023-10-05 | 中兴通讯股份有限公司 | Detection processing method, apparatus and system, and storage medium and electronic apparatus |
CN115037664A (en) * | 2022-05-31 | 2022-09-09 | 深圳市共进电子股份有限公司 | Network connection testing method, device, repeater and storage medium |
CN115037664B (en) * | 2022-05-31 | 2023-09-08 | 深圳市共进电子股份有限公司 | Network connection testing method and device, repeater and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN113726607B (en) | 2022-09-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN113726607B (en) | Network detection method and device, electronic equipment and storage medium | |
US10210036B2 (en) | Time series metric data modeling and prediction | |
US20170126789A1 (en) | Automatic Software Controller Configuration based on Application and Network Data | |
CN113438106B (en) | Content distribution network processing method and device and electronic equipment | |
CN114389969B (en) | Method and device for testing client, electronic equipment and storage medium | |
CN111954240A (en) | Network fault processing method and device and electronic equipment | |
CN113360918A (en) | Vulnerability rapid scanning method, device, equipment and storage medium | |
CN112994934B (en) | Data interaction method, device and system | |
CN115865734B (en) | Fault detection method, data generation method, device, equipment and medium | |
CN115314322A (en) | Vulnerability detection confirmation method, device, equipment and storage medium based on flow | |
CN116471265A (en) | Client communication network, network request processing method, electronic device and medium | |
CN116132509A (en) | Railway safety computer platform communication method, device, equipment and medium | |
CN107317723B (en) | Data processing method and server | |
CN115767786A (en) | Multi-cluster communication method and device, electronic equipment and storage medium | |
CN115567431A (en) | Network stability testing method and device, tested equipment and storage medium | |
CN115277506B (en) | Load balancing equipment testing method and system | |
CN113821336A (en) | Resource allocation method and device, storage medium and electronic equipment | |
CN112260903A (en) | Link monitoring method and device | |
CN114615168B (en) | Application level monitoring method and device, electronic equipment, storage medium and product | |
CN113595827B (en) | Cloud network monitoring method and device, electronic equipment and computer medium | |
CN115576852B (en) | Quality evaluation method, device, equipment and storage medium of fuzzy test case | |
CN116760741B (en) | Data state monitoring method, device, equipment and medium | |
CN112804161B (en) | Domain name processing method | |
CN117251769B (en) | Abnormal data identification method, device, equipment and medium based on monitoring component | |
CN115378746B (en) | Network intrusion detection rule generation method, device, equipment and storage medium |
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 |