CN111884879A - Network detection method, device and related equipment - Google Patents

Network detection method, device and related equipment Download PDF

Info

Publication number
CN111884879A
CN111884879A CN202010731238.7A CN202010731238A CN111884879A CN 111884879 A CN111884879 A CN 111884879A CN 202010731238 A CN202010731238 A CN 202010731238A CN 111884879 A CN111884879 A CN 111884879A
Authority
CN
China
Prior art keywords
network
executing
judging whether
network detection
restarting
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010731238.7A
Other languages
Chinese (zh)
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.)
Shenzhen Launch Technology Co Ltd
Original Assignee
Shenzhen Launch 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 Shenzhen Launch Technology Co Ltd filed Critical Shenzhen Launch Technology Co Ltd
Priority to CN202010731238.7A priority Critical patent/CN111884879A/en
Publication of CN111884879A publication Critical patent/CN111884879A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/10Active monitoring, e.g. heartbeat, ping or trace-route
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/16Threshold monitoring

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Cardiology (AREA)
  • General Health & Medical Sciences (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The application discloses a network detection method, which comprises the steps of obtaining a network detection instruction; performing network detection according to the network detection instruction, and judging whether the network is disconnected; if the network is disconnected, outputting a network disconnection prompt; if the network is not disconnected, executing a ping command, and judging whether the response time of the ping command exceeds a preset threshold value; if the response time exceeds the preset threshold value, outputting the network disconnection prompt; the network detection method can realize more accurate network detection and avoid data loss. The application also discloses a network detection device, equipment and a computer readable storage medium, which have the beneficial effects.

Description

Network detection method, device and related equipment
Technical Field
The present application relates to the field of network technologies, and in particular, to a network detection method, and further relates to a network detection apparatus, a device, and a computer-readable storage medium.
Background
With the vigorous popularization of 5G in China, the application field of 5G becomes wider and wider, but the problems of network disconnection, network access incapability, network access slowness and the like are inevitable due to the problems that the coverage area of a 5G base station is not wide enough, the reliability of a 5G module is high and the like.
At present, common network detection is to detect the networking situation at regular time, and if a network disconnection is detected, dial-up connection is carried out again, however, only detecting whether the network is disconnected and redialing cannot completely meet the requirement, because under the condition that a network signal is unstable, the situation that the network is always connected but the access to the network is slow sometimes occurs, and for the situation, the network disconnection cannot be detected by adopting the existing method, so that network recovery cannot be carried out, and the problems of data delay and even data loss can be caused.
Therefore, how to implement more accurate network detection and avoid data loss is a problem that needs to be solved by those skilled in the art.
Disclosure of Invention
The application aims to provide a network detection method, which can realize more accurate network detection and avoid data loss; another object of the present application is to provide a network detecting device, a network detecting apparatus, and a computer-readable storage medium, all of which have the above advantages.
In order to solve the above technical problem, the present application provides a network detection method, where the network detection method includes:
acquiring a network detection instruction;
performing network detection according to the network detection instruction, and judging whether the network is disconnected;
if the network is disconnected, outputting a network disconnection prompt;
if the network is not disconnected, executing a ping command, and judging whether the response time of the ping command exceeds a preset threshold value;
and if the response time exceeds the preset threshold value, outputting the network disconnection prompt.
Preferably, the acquiring the network detection instruction includes:
and responding to the network detection instruction according to a preset time interval.
Preferably, before outputting the network disconnection prompt if the response time exceeds the preset threshold, the method further includes:
counting the execution times of the ping command;
judging whether the execution times reach preset times or not;
if the execution times do not reach the preset times, the ping command is executed in a circulating mode until the execution times reach the preset times.
Preferably, after the outputting the network disconnection prompt, the method further includes:
executing the redialing operation and returning to the network detection flow;
judging whether the network is connected successfully;
if the network is not successfully connected, executing a radio frequency restarting operation, and returning to the step of executing the redialing operation;
judging whether the network is connected successfully;
if the network is not successfully connected, executing the operation of restarting the communication module; and returning to the step of executing the redialing operation;
judging whether the network is connected successfully;
and if the network is not successfully connected, outputting a network recovery failure prompt.
Preferably, before performing the restart radio frequency operation, the method further includes:
judging whether the frequency of restarting the radio frequency reaches a first threshold value;
if not, executing the radio frequency restarting operation;
and if so, executing the operation of restarting the communication module.
Preferably, before the executing the operation of restarting the communication module, the method further includes:
judging whether the number of times of restarting the communication module reaches a second threshold value;
if not, executing the operation of restarting the communication module;
and if so, executing the step of outputting the network recovery failure prompt.
Preferably, before the redialing operation is performed, the method further includes:
the network connection is disconnected.
In order to solve the above technical problem, the present application further provides a network detection apparatus, where the network detection apparatus includes:
the detection instruction acquisition module is used for acquiring a network detection instruction;
the network connection detection module is used for carrying out network detection according to the network detection instruction and judging whether the network is disconnected;
the first network disconnection output module is used for outputting a network disconnection prompt if the network is disconnected;
the ping command execution module is used for executing a ping command if the network is not disconnected and judging whether the response time of the ping command exceeds a preset threshold value or not;
and the second network disconnection output module is used for outputting the network disconnection prompt if the response time exceeds the preset threshold value.
Preferably, the detection instruction obtaining module is specifically configured to respond to the network detection instruction according to a preset time interval.
Preferably, the network detection device further includes a ping command execution frequency counting module, configured to count the execution frequency of the ping command before outputting the network disconnection prompt if the response time exceeds the preset threshold; judging whether the execution times reach preset times or not; if the execution times do not reach the preset times, the ping command is executed in a circulating mode until the execution times reach the preset times.
Preferably, the network detection device further comprises a network recovery module, configured to execute a redialing operation after the network disconnection prompt is output, and return to the network detection process; judging whether the network is connected successfully; if the network is not successfully connected, executing a radio frequency restarting operation, and returning to the step of executing the redialing operation; judging whether the network is connected successfully; if the network is not successfully connected, executing the operation of restarting the communication module; and returning to the step of executing the redialing operation; judging whether the network is connected successfully; and if the network is not successfully connected, outputting a network recovery failure prompt.
Preferably, the network detection device further includes a restart radio frequency number counting module, configured to determine whether the restart radio frequency number reaches a first threshold before the restart radio frequency operation is executed; if not, executing the radio frequency restarting operation; and if so, executing the operation of restarting the communication module.
Preferably, the network detection apparatus further includes a communication module restart frequency counting module, configured to determine whether the frequency of restarting the communication module reaches a second threshold before the execution of the communication module restart operation; if not, executing the operation of restarting the communication module; and if so, executing the step of outputting the network recovery failure prompt.
Preferably, the network detection apparatus further includes a network disconnection module, configured to disconnect a network connection before performing a redialing operation.
In order to solve the above technical problem, the present application further provides a network detection device, where the network detection device includes:
a memory for storing a computer program;
a processor for implementing the following steps when executing the computer program:
acquiring a network detection instruction; performing network detection according to the network detection instruction, and judging whether the network is disconnected; if the network is disconnected, outputting a network disconnection prompt; if the network is not disconnected, executing a ping command, and judging whether the response time of the ping command exceeds a preset threshold value; and if the response time exceeds the preset threshold value, outputting the network disconnection prompt.
Preferably, when the processor executes the computer subprogram stored in the memory, the following steps may be specifically implemented: and responding to the network detection instruction according to a preset time interval.
Preferably, when the processor executes the computer program stored in the memory, the following steps may be further implemented: counting the execution times of the ping command before outputting the network disconnection prompt if the response time exceeds the preset threshold; judging whether the execution times reach preset times or not; if the execution times do not reach the preset times, the ping command is executed in a circulating mode until the execution times reach the preset times.
Preferably, when the processor executes the computer program stored in the memory, the following steps may be further implemented: after the network disconnection prompt is output, executing redialing operation and returning to a network detection process; judging whether the network is connected successfully; if the network is not successfully connected, executing a radio frequency restarting operation, and returning to the step of executing the redialing operation; judging whether the network is connected successfully; if the network is not successfully connected, executing the operation of restarting the communication module; and returning to the step of executing the redialing operation; judging whether the network is connected successfully; and if the network is not successfully connected, outputting a network recovery failure prompt.
Preferably, when the processor executes the computer program stored in the memory, the following steps may be further implemented: before executing the radio frequency restarting operation, judging whether the radio frequency restarting frequency reaches a first threshold value; if not, executing the radio frequency restarting operation; and if so, executing the operation of restarting the communication module.
Preferably, when the processor executes the computer program stored in the memory, the following steps may be further implemented: before the operation of restarting the communication module is executed, judging whether the frequency of restarting the communication module reaches a second threshold value; if not, executing the operation of restarting the communication module; and if so, executing the step of outputting the network recovery failure prompt.
Preferably, when the processor executes the computer program stored in the memory, the following steps may be further implemented: disconnecting the network connection prior to said performing the redialing operation.
To solve the above technical problem, the present application further provides a computer-readable storage medium having a computer program stored thereon, where the computer program, when executed by a processor, implements the following steps:
acquiring a network detection instruction; performing network detection according to the network detection instruction, and judging whether the network is disconnected; if the network is disconnected, outputting a network disconnection prompt; if the network is not disconnected, executing a ping command, and judging whether the response time of the ping command exceeds a preset threshold value; and if the response time exceeds the preset threshold value, outputting the network disconnection prompt.
Preferably, when executed by a processor, the computer sub-program stored in the computer-readable storage medium may specifically implement the following steps: and responding to the network detection instruction according to a preset time interval.
Preferably, when the computer program stored in the computer readable storage medium is executed by the processor, the following steps can be further implemented: counting the execution times of the ping command before outputting the network disconnection prompt if the response time exceeds the preset threshold; judging whether the execution times reach preset times or not; if the execution times do not reach the preset times, the ping command is executed in a circulating mode until the execution times reach the preset times.
Preferably, when the computer program stored in the computer readable storage medium is executed by the processor, the following steps can be further implemented: after the network disconnection prompt is output, executing redialing operation and returning to a network detection process; judging whether the network is connected successfully; if the network is not successfully connected, executing a radio frequency restarting operation, and returning to the step of executing the redialing operation; judging whether the network is connected successfully; if the network is not successfully connected, executing the operation of restarting the communication module; and returning to the step of executing the redialing operation; judging whether the network is connected successfully; and if the network is not successfully connected, outputting a network recovery failure prompt.
Preferably, when the computer program stored in the computer readable storage medium is executed by the processor, the following steps can be further implemented: before executing the radio frequency restarting operation, judging whether the radio frequency restarting frequency reaches a first threshold value; if not, executing the radio frequency restarting operation; and if so, executing the operation of restarting the communication module.
Preferably, when the computer program stored in the computer readable storage medium is executed by the processor, the following steps can be further implemented: before the operation of restarting the communication module is executed, judging whether the frequency of restarting the communication module reaches a second threshold value; if not, executing the operation of restarting the communication module; and if so, executing the step of outputting the network recovery failure prompt.
Preferably, when the computer program stored in the computer readable storage medium is executed by the processor, the following steps can be further implemented: disconnecting the network connection prior to said performing the redialing operation.
Therefore, according to the technical scheme provided by the application, more accurate network detection is realized by adding the ping command, when the network is detected to be in the connection state, the ping command can be executed to determine the network delay condition, if the ping command can be responded within a certain time threshold, the current network connection is normal, otherwise, the network is in the connection state, but serious network delay exists, namely the current network connection is abnormal, and at the moment, the network disconnection prompt is output.
The network detection device, the equipment and the computer readable storage medium provided by the application all have the beneficial effects, and are not described herein again.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below.
Fig. 1 is a schematic flow chart of a network detection method provided in the present application;
fig. 2 is a schematic flow chart of another network detection method provided in the present application;
fig. 3 is a schematic flowchart of a network recovery method provided in the present application;
fig. 4 is a schematic flow chart of another network recovery method provided in the present application;
fig. 5 is a schematic structural diagram of a network detection apparatus provided in the present application;
fig. 6 is a schematic structural diagram of a network detection device provided in the present application.
Detailed Description
The core of the application is to provide a network detection method, which can realize more accurate network detection and avoid data loss; another core of the present application is to provide a network detection apparatus, a system, a device and a computer readable storage medium, all having the above beneficial effects.
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application.
Referring to fig. 1, fig. 1 is a schematic flow chart of a first network detection method provided in the present application, where the network detection method may include:
s101: acquiring a network detection instruction;
this step is intended to enable the acquisition of network detection instructions for implementing network detection. It can be understood that the obtaining manner of the network detection instruction does not affect the implementation of the present technical solution, and may be initiated by a user through a terminal device, or may be automatically triggered based on a preset response condition, so as to the obtaining manner, the present application is not specifically limited.
As a preferred embodiment, the obtaining the network detection instruction may include: and responding to the network detection instruction according to a preset time interval.
The preferred embodiment provides a more specific network detection instruction acquisition method, namely a timing response method. Specifically, the instruction response time interval, that is, the preset time interval, may be set according to an actual requirement, so that the network detection instruction may be automatically responded according to the preset time interval. Of course, the specific value of the preset time interval is not unique, and the user can perform user-defined setting according to actual requirements.
S102: performing network detection according to the network detection instruction, and judging whether the network is disconnected; if not, executing S103, if yes, executing S104;
s103: executing the ping command and judging whether the response time of the ping command exceeds a preset threshold value or not; if yes, executing S104, otherwise executing S105;
s104: outputting a network disconnection prompt;
s105: and outputting a prompt of normal network connection.
Specifically, after the network detection instruction is obtained, the network detection can be directly performed based on the network detection instruction to determine whether the network is currently disconnected, if the network is disconnected, the network disconnection prompt can be directly output, if the network is not disconnected, the current network cannot be indicated to be in a normal operation state, there may be a case where the network is connected but the network speed is slow so that the network access cannot be normally performed, and therefore, can execute the preset ping command and further judge whether the response time of the ping command exceeds the preset threshold value, if the preset threshold value is exceeded, the current network is connected but abnormal, normal network access cannot be performed, a network disconnection prompt is also output, if the preset threshold value is not exceeded, the current network is connected and no abnormal condition exists, normal network access can be carried out, and at the moment, a prompt of normal network connection is output.
The ping (Packet Internet Groper) command is a TCP (Transmission Control Protocol)/IP (Internet Protocol, Protocol for interconnection between networks), and may be used to detect a connection condition of a network and analyze a network speed, and may implement network speed analysis by performing ping to designate a server, qq, hundred degrees, and other web portals. In addition, the specific value of the preset threshold is not unique, and the user can perform self-defined setting according to actual requirements.
According to the network detection method, more accurate network detection is achieved by adding the ping command, when the network is detected to be in a connection state, the ping command can be executed to determine the network delay condition, if the ping command can be responded within a certain time threshold value, the current network connection is normal, otherwise, the network is in the connection state, but serious network delay exists, namely the current network connection is abnormal, and at the moment, a network disconnection prompt is output.
The network detection method provided by the present application is further described below by another specific embodiment, referring to fig. 2, fig. 2 is a schematic flow chart of a second network detection method provided by the present application, and the network detection method may include:
s201: acquiring a network detection instruction;
s202: performing network detection according to the network detection instruction, and judging whether the network is disconnected; if not, executing S203, if yes, executing S205;
s203: executing the ping command and judging whether the response time of the ping command exceeds a preset threshold value or not; if yes, executing S204, otherwise executing S206;
s204: counting the execution times of the ping command, and judging whether the execution times reach preset times; if yes, executing S205, otherwise, returning to S203;
s205: outputting a network disconnection prompt;
s206: and outputting a prompt of normal network connection.
The preferred embodiment provides a more specific network detection method, which can execute multiple ping commands to ensure the accuracy of the network detection result in order to avoid the situation that the network detection result is inaccurate due to misoperation or other abnormalities existing in the ping command execution. Specifically, after a ping command is completed, the execution times of the ping command can be counted, and whether the execution times reaches the preset times is further judged, if not, the ping command is executed in a circulating mode until the execution times of the ping command reaches the preset times, if the response time of each ping command exceeds the preset threshold value, the current network disconnection can be judged, and if not, the network connection is normal. Certainly, the specific value of the preset times is not unique, and the user can perform self-defined setting according to actual requirements, and the method is not limited in the application.
For the specific implementation process of the above steps S201 to S203, S205 and S206, reference may be made to the content of the foregoing embodiment, and details are not repeated here.
The network detection method provided by the present application is further described below by another specific embodiment, referring to fig. 3, fig. 3 is a schematic flow chart of a network recovery method provided by the present application, where the network recovery method may include:
s301: executing redialing operation;
s302: carrying out network detection and judging whether the network is successfully connected; if not, executing S303, if yes, executing S308;
s303: executing a restart radio frequency operation;
s304: executing the redialing operation, carrying out network detection and judging whether the network is successfully connected; if not, executing S305, if yes, executing S308;
s305: executing a restart communication module operation;
s306: executing the redialing operation, carrying out network detection and judging whether the network is successfully connected; if not, executing S307, if yes, executing S308;
s307: outputting a network recovery failure prompt;
s308: and outputting a prompt of normal network connection.
Under the condition that the current network is determined to be disconnected, network recovery operation can be performed, and the network recovery operation can be divided into multi-stage operation, namely redialing, restarting radio frequency and restarting a communication module. Specifically, when it is determined that the network is not connected, a redialing operation is executed first, and network detection is performed again after the dialing is completed, where the network detection process is the steps of S101 to S105 or the steps of S201 to S206, if the network is still not connected, a reradiation operation is executed, and dialing and network detection are performed again after the radio frequency is restarted, the network detection process is also the steps of S101 to S105 or the steps of S201 to S206, if the network is still not connected, a communication module restarting operation is executed, and dialing and network detection are performed again after the communication module is restarted, the network detection process is also the steps of S101 to S105 or the steps of S201 to S206, and if the network is still not connected, a network recovery failure prompt is output to inform a user that the current network is abnormal and cannot be automatically recovered. Of course, when the network is detected to be connected, the normal prompt of the network connection can be directly output.
The network detection method provided by the preferred embodiment can further realize automatic network recovery after completing network detection, and realize network recovery through multi-stage operation, thereby avoiding the situation that the network cannot be recovered only by redialing, and improving the reliability of network recovery.
The network detection method provided by the present application is further described below by another specific embodiment, referring to fig. 4, fig. 4 is a schematic flow chart of another network recovery method provided by the present application, where the network recovery method may include:
s401: executing redialing operation;
s402: carrying out network detection and judging whether the network is successfully connected; if not, executing S403, if yes, executing S410;
s403: executing a restart radio frequency operation;
s404: executing the redialing operation, carrying out network detection and judging whether the network is successfully connected; if not, executing S405, if yes, executing S410;
s405: judging whether the frequency of restarting the radio frequency reaches a first threshold value; if not, returning to S403, if yes, executing S406;
s406: executing a restart communication module operation;
s407: executing the redialing operation, carrying out network detection and judging whether the network is successfully connected; if not, executing S408, and if yes, executing S410;
s408: judging whether the number of times of restarting the communication module reaches a second threshold value; if not, returning to S406, if yes, executing S409;
s409: outputting a network recovery failure prompt;
s410: and outputting a prompt of normal network connection.
In order to further ensure the reliability of network recovery, radio frequency restart and network restart can be carried out for multiple times, namely, the corresponding maximum restart times are preset, and when the restart times reach the maximum restart times and still the network recovery cannot be realized, a network recovery failure prompt is output. For the operation of restarting the radio frequency, when the restarting times of the operation reach a first threshold value, entering a process of restarting a communication module, otherwise, circularly restarting the radio frequency; and for the operation of restarting the communication module, entering a prompt message output flow when the restarting frequency reaches a second threshold value, and otherwise, circularly restarting the communication module. Of course, the specific values of the first threshold and the second threshold are not unique, and the first threshold and the second threshold may be the same or different, and may be set by a user in a user-defined manner according to actual needs, which is not limited in the present application.
As a preferred embodiment, before the performing the redialing operation, the method may further include: the network connection is disconnected.
Specifically, before redialing, the network connection needs to be disconnected, so that the situation that normal dialing cannot be performed due to the fact that the network is in a connected state is avoided.
For the specific implementation of the steps S401 to S404, S406, S407, S409, and S410, reference may be made to the contents of the foregoing embodiments, and no further description is provided herein.
On the basis of the foregoing embodiments, the embodiments of the present application take detecting an embedded system 5G network as an example, and provide a more specific network detection method, which is implemented in the following specific flow:
1. network detection process:
step 1: detecting the 5G network connection at regular time, if the 5G network is disconnected, returning a network connection failure prompt, otherwise, entering the step 2;
step 2: executing ping commands, and respectively ping a designated server, a Baidu and a qq;
and step 3: and if the time of 3 ping returns exceeds the preset threshold value, returning a network connection failure prompt, otherwise, returning a network connection success prompt.
2. And (3) network recovery flow:
step 1: if the network connection failure prompt is obtained based on the network detection process, executing the step 2;
step 2: disconnecting the network connection and redialing;
and step 3: delaying for waiting for completion of dialing;
and 4, step 4: entering the network detection flow to carry out network detection, executing step 15 if a network connection success prompt is obtained, and executing step 5 if a network connection failure prompt is obtained;
and 5: counting the number of times of restarting the radio frequency, if the number of times of restarting the radio frequency is less than a corresponding threshold value, closing the radio frequency and executing the step 6, and if the number of times of restarting the radio frequency reaches the corresponding threshold value, executing the step 10;
step 6: delaying and turning on the radio frequency again;
and 7: the number of times of restarting the radio frequency is increased by 1;
and 8: redialing and waiting for the completion of dialing;
and step 9: entering the network detection flow to carry out network detection, executing the step 15 if a network connection success prompt is obtained, and returning to the step 5 if a network connection failure prompt is obtained;
step 10: counting the number of times of restarting the 5G network module (communication module), if the number is less than a corresponding threshold value, powering off the 5G network module, executing the step 11, and if the number reaches the corresponding threshold value, executing the step 16;
step 11: delaying, and electrifying and starting the 5G network module again;
step 12: adding 1 to the number of times of restarting the 5G network module;
step 13: redialing and waiting for the completion of dialing;
step 14: entering the network detection flow to perform network detection, executing step 15 if a network connection success prompt is obtained, and returning to step 10 if a network connection failure prompt is obtained;
step 15: resetting the number of times of restarting the radio frequency and the number of times of restarting the module;
step 16: and returning a network recovery failure prompt.
It can be seen that, the network detection method provided in this embodiment implements more accurate network detection by adding a ping command, and when a network is detected to be in a connection state, the ping command may be executed to determine a network delay condition, if the ping command can be responded within a certain time threshold, it indicates that the current network connection is normal, otherwise, it indicates that although the network is in the connection state, there is a serious network delay, that is, the current network connection is not normal, and at this time, a network disconnection prompt is output, so that the network detection is implemented by the ping command, thereby effectively ensuring the accuracy of the network detection result and avoiding the data loss problem; furthermore, after the network detection is finished, the network recovery is realized through multi-stage operation, the condition that the network cannot be recovered only by redialing is avoided, and the reliability of the network recovery is improved.
In the following, the network detection apparatus provided in the embodiments of the present application is introduced, and the network detection apparatus described below and the network detection method described above may be referred to correspondingly.
Referring to fig. 5, fig. 5 is a schematic structural diagram of a network detection apparatus provided in the present application, where the network detection apparatus may include:
a detection instruction obtaining module 100, configured to obtain a network detection instruction;
the network connection detection module 200 is configured to perform network detection according to the network detection instruction, and determine whether the network is disconnected;
a first network disconnection output module 300, configured to output a network disconnection prompt if the network is disconnected;
a ping command executing module 400, configured to execute a ping command if the network is not disconnected, and determine whether response time of the ping command exceeds a preset threshold;
and a second network disconnection output module 500, configured to output a network disconnection prompt if the response time exceeds a preset threshold.
According to the network detection device, by introducing the content distribution strategy, namely the preset information distribution strategy, different users receive the update and upgrade information according to the strategy to complete the downloading of the latest version software, so that the situation that massive users have a crowded downloading state due to the release of a new version can be effectively avoided and stopped under the condition that the bandwidth and the server resources are limited, the downloading speed and the downloading quality of the new version software are ensured, the phenomenon that a client is blocked and delayed in the downloading process of the new version software is avoided, and the user experience is further improved.
In some specific embodiments, the detection instruction obtaining module 100 may be specifically configured to respond to the network detection instruction at preset time intervals.
In some specific embodiments, the network detection device may further include a ping command execution frequency counting module, configured to count the execution frequency of the ping command before outputting the network disconnection prompt if the response time exceeds a preset threshold; judging whether the execution times reach preset times or not; if the execution times do not reach the preset times, the ping command is executed in a circulating mode until the execution times reach the preset times.
In some specific embodiments, the network detection apparatus may further include a network recovery module, configured to execute a redialing operation after outputting the network disconnection prompt, and return to the network detection procedure; judging whether the network is successfully connected; if the network is not successfully connected, executing a radio frequency restarting operation, and returning to the step of executing a redialing operation; judging whether the network is successfully connected; if the network is not connected successfully, the operation of restarting the communication module is executed; and returning to the step of executing the redialing operation; judging whether the network is successfully connected; and if the network is not successfully connected, outputting a network recovery failure prompt.
In some specific embodiments, the network detection apparatus may further include a restart radio frequency number counting module, configured to determine whether the number of restart radio frequencies reaches a first threshold before performing a restart radio frequency operation; if not, executing a radio frequency restarting operation; and if so, executing the operation of restarting the communication module.
In some specific embodiments, the network detection apparatus may further include a communication module restart count counting module, configured to determine whether the number of times of restarting the communication module reaches a second threshold before performing the communication module restart operation; if not, executing the operation of restarting the communication module; if yes, executing the step of outputting a network recovery failure prompt.
In some specific embodiments, the network detection apparatus may further include a network disconnection module configured to disconnect a network connection before performing the redialing operation.
In the following, the network detection device provided in the embodiment of the present application is introduced, and the network detection device described below and the network detection method described above may be referred to correspondingly.
Referring to fig. 6, fig. 6 is a schematic structural diagram of a network detection device provided in the present application, where the network detection device may include:
a memory 11 for storing a computer program;
the processor 12, when executing the computer program stored in the memory 11, may implement the following steps:
acquiring a network detection instruction; performing network detection according to the network detection instruction, and judging whether the network is disconnected; if the network is disconnected, outputting a network disconnection prompt; if the network is not disconnected, executing the ping command and judging whether the response time of the ping command exceeds a preset threshold value; and if the response time exceeds a preset threshold value, outputting a network disconnection prompt.
In some specific embodiments, when the processor 12 executes the computer subprogram stored in the memory 11, the following steps may be specifically implemented: and responding to the network detection instruction according to a preset time interval.
In some specific embodiments, when the processor 12 executes the computer program stored in the memory 11, the following steps can be further implemented: counting the execution times of the ping command before outputting the network disconnection prompt if the response time exceeds a preset threshold value; judging whether the execution times reach preset times or not; if the execution times do not reach the preset times, the ping command is executed in a circulating mode until the execution times reach the preset times.
In some specific embodiments, when the processor 12 executes the computer program stored in the memory 11, the following steps can be further implemented: after the network disconnection prompt is output, executing redialing operation and returning to a network detection process; judging whether the network is successfully connected; if the network is not successfully connected, executing a radio frequency restarting operation, and returning to the step of executing a redialing operation; judging whether the network is successfully connected; if the network is not connected successfully, the operation of restarting the communication module is executed; and returning to the step of executing the redialing operation; judging whether the network is successfully connected; and if the network is not successfully connected, outputting a network recovery failure prompt.
In some specific embodiments, when the processor 12 executes the computer program stored in the memory 11, the following steps can be further implemented: before executing the radio frequency restarting operation, judging whether the radio frequency restarting frequency reaches a first threshold value; if not, executing a radio frequency restarting operation; and if so, executing the operation of restarting the communication module.
In some specific embodiments, when the processor 12 executes the computer program stored in the memory 11, the following steps can be further implemented: before the operation of restarting the communication module is executed, judging whether the frequency of restarting the communication module reaches a second threshold value; if not, executing the operation of restarting the communication module; if yes, executing the step of outputting a network recovery failure prompt.
In some specific embodiments, when the processor 12 executes the computer program stored in the memory 11, the following steps can be further implemented: before the redialing operation is performed, the network connection is disconnected.
Further, an embodiment of the present application also discloses a computer-readable storage medium for storing a computer program, where the computer program, when executed by a processor, can implement the following steps:
acquiring a network detection instruction; performing network detection according to the network detection instruction, and judging whether the network is disconnected; if the network is disconnected, outputting a network disconnection prompt; if the network is not disconnected, executing the ping command and judging whether the response time of the ping command exceeds a preset threshold value; and if the response time exceeds a preset threshold value, outputting a network disconnection prompt.
In some specific embodiments, when executed by a processor, the computer sub-program stored in the computer-readable storage medium may specifically implement the following steps: and responding to the network detection instruction according to a preset time interval.
In some specific embodiments, when executed by a processor, a computer program stored in a computer readable storage medium may further implement the steps of: counting the execution times of the ping command before outputting the network disconnection prompt if the response time exceeds a preset threshold value; judging whether the execution times reach preset times or not; if the execution times do not reach the preset times, the ping command is executed in a circulating mode until the execution times reach the preset times.
In some specific embodiments, when executed by a processor, a computer program stored in a computer readable storage medium may further implement the steps of: after the network disconnection prompt is output, executing redialing operation and returning to a network detection process; judging whether the network is successfully connected; if the network is not successfully connected, executing a radio frequency restarting operation, and returning to the step of executing a redialing operation; judging whether the network is successfully connected; if the network is not connected successfully, the operation of restarting the communication module is executed; and returning to the step of executing the redialing operation; judging whether the network is successfully connected; and if the network is not successfully connected, outputting a network recovery failure prompt.
In some specific embodiments, when executed by a processor, a computer program stored in a computer readable storage medium may further implement the steps of: before executing the radio frequency restarting operation, judging whether the radio frequency restarting frequency reaches a first threshold value; if not, executing a radio frequency restarting operation; and if so, executing the operation of restarting the communication module.
In some specific embodiments, when executed by a processor, a computer program stored in a computer readable storage medium may further implement the steps of: before the operation of restarting the communication module is executed, judging whether the frequency of restarting the communication module reaches a second threshold value; if not, executing the operation of restarting the communication module; if yes, executing the step of outputting a network recovery failure prompt.
In some specific embodiments, when executed by a processor, a computer program stored in a computer readable storage medium may further implement the steps of: before the redialing operation is performed, the network connection is disconnected.
The computer-readable storage medium may include: 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.
For a detailed description of the computer-readable storage medium provided in the present application, please refer to the above method embodiments, which are not described herein again.
The embodiments are described in a progressive manner in the specification, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
Finally, it should also be noted that, herein, 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. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The network detection method, device, apparatus, and computer-readable storage medium provided by the present application are described in detail above. The principles and embodiments of the present application are explained herein using specific examples, which are provided only to help understand the method and the core idea of the present application. It should be noted that, for those skilled in the art, it is possible to make several improvements and modifications to the present application without departing from the principle of the present application, and these improvements and modifications also fall into the elements of the protection scope of the claims of the present application.

Claims (10)

1. A method for network detection, comprising:
acquiring a network detection instruction;
performing network detection according to the network detection instruction, and judging whether the network is disconnected;
if the network is disconnected, outputting a network disconnection prompt;
if the network is not disconnected, executing a ping command of an Internet packet explorer, and judging whether the response time of the ping command exceeds a preset threshold value;
and if the response time exceeds the preset threshold value, outputting the network disconnection prompt.
2. The network detection method of claim 1, wherein the obtaining the network detection instruction comprises:
and responding to the network detection instruction according to a preset time interval.
3. The network detection method according to claim 1 or 2, wherein before outputting the network disconnection prompt if the response time exceeds the preset threshold, the method further comprises:
counting the execution times of the ping command;
judging whether the execution times reach preset times or not;
if the execution times do not reach the preset times, the ping command is executed in a circulating mode until the execution times reach the preset times.
4. The network detection method of claim 1, wherein after outputting the outage prompt, further comprising:
executing the redialing operation and returning to the network detection flow;
judging whether the network is connected successfully;
if the network is not successfully connected, executing a radio frequency restarting operation, and returning to the step of executing the redialing operation;
judging whether the network is connected successfully;
if the network is not successfully connected, executing the operation of restarting the communication module; and returning to the step of executing the redialing operation;
judging whether the network is connected successfully;
and if the network is not successfully connected, outputting a network recovery failure prompt.
5. The network detection method of claim 4, wherein prior to performing the restart radio frequency operation, further comprising:
judging whether the frequency of restarting the radio frequency reaches a first threshold value;
if not, executing the radio frequency restarting operation;
and if so, executing the operation of restarting the communication module.
6. The network detection method of claim 4, wherein prior to performing the restart communication module operation, further comprising:
judging whether the number of times of restarting the communication module reaches a second threshold value;
if not, executing the operation of restarting the communication module;
and if so, executing the step of outputting the network recovery failure prompt.
7. The network detection method of claim 4, wherein prior to performing the redialing operation, further comprising:
the network connection is disconnected.
8. A network sensing apparatus, comprising:
the detection instruction acquisition module is used for acquiring a network detection instruction;
the network connection detection module is used for carrying out network detection according to the network detection instruction and judging whether the network is disconnected;
the first network disconnection output module is used for outputting a network disconnection prompt if the network is disconnected;
the ping command execution module is used for executing a ping command if the network is not disconnected and judging whether the response time of the ping command exceeds a preset threshold value or not;
and the second network disconnection output module is used for outputting the network disconnection prompt if the response time exceeds the preset threshold value.
9. A network sensing device, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the network detection method according to any one of claims 1 to 7 when executing said computer program.
10. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by the processor, carries out the steps of the network detection method according to any one of claims 1 to 7.
CN202010731238.7A 2020-07-27 2020-07-27 Network detection method, device and related equipment Pending CN111884879A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010731238.7A CN111884879A (en) 2020-07-27 2020-07-27 Network detection method, device and related equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010731238.7A CN111884879A (en) 2020-07-27 2020-07-27 Network detection method, device and related equipment

Publications (1)

Publication Number Publication Date
CN111884879A true CN111884879A (en) 2020-11-03

Family

ID=73201571

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010731238.7A Pending CN111884879A (en) 2020-07-27 2020-07-27 Network detection method, device and related equipment

Country Status (1)

Country Link
CN (1) CN111884879A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113438157A (en) * 2021-06-25 2021-09-24 上海钧正网络科技有限公司 Method, device and equipment for restoring network in echelon and readable storage medium
CN113612662A (en) * 2021-08-04 2021-11-05 湖南快乐阳光互动娱乐传媒有限公司 Network monitoring method, device, readable medium and equipment
CN113765736A (en) * 2021-07-23 2021-12-07 深圳市智微智能科技股份有限公司 android device network stabilizing method, system, terminal and storage medium
CN114143911A (en) * 2021-11-19 2022-03-04 广州朗国电子科技股份有限公司 Android platform-based wireless screen-casting and network-breaking automatic reconnection method
CN114189460A (en) * 2021-09-17 2022-03-15 惠州高盛达智显科技有限公司 Cash register quick and stable networking method and system
CN114500338A (en) * 2022-01-26 2022-05-13 湖南快乐阳光互动娱乐传媒有限公司 Method and device for detecting networking state and networking equipment
CN115174437A (en) * 2022-06-27 2022-10-11 广州鲁邦通物联网科技股份有限公司 Network connection stability detection method and system
CN116614675A (en) * 2023-07-19 2023-08-18 深圳市华曦达科技股份有限公司 Wi-Fi (wireless fidelity) back connection automatic detection method and system for smart television box and readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080056141A1 (en) * 2006-08-29 2008-03-06 Cisco Technology, Inc. Method and System for Providing Connectivity Outage Detection for MPLS Core Networks Based on Service Level Agreement
CN101902404A (en) * 2010-07-29 2010-12-01 中兴通讯股份有限公司 Method and device for realizing automatic re-networking
CN102546619A (en) * 2011-12-29 2012-07-04 浙江工业大学 Modbus protocol conversion system based on 3G (The 3rd Generation Telecommunication) Internet access
CN105306289A (en) * 2014-06-27 2016-02-03 中兴通讯股份有限公司 Method and device for improving reliability of multi-module devices, and client terminal device
CN107770768A (en) * 2017-10-17 2018-03-06 维沃移动通信有限公司 A kind of data network restoration methods, mobile terminal

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080056141A1 (en) * 2006-08-29 2008-03-06 Cisco Technology, Inc. Method and System for Providing Connectivity Outage Detection for MPLS Core Networks Based on Service Level Agreement
CN101902404A (en) * 2010-07-29 2010-12-01 中兴通讯股份有限公司 Method and device for realizing automatic re-networking
CN102546619A (en) * 2011-12-29 2012-07-04 浙江工业大学 Modbus protocol conversion system based on 3G (The 3rd Generation Telecommunication) Internet access
CN105306289A (en) * 2014-06-27 2016-02-03 中兴通讯股份有限公司 Method and device for improving reliability of multi-module devices, and client terminal device
CN107770768A (en) * 2017-10-17 2018-03-06 维沃移动通信有限公司 A kind of data network restoration methods, mobile terminal

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113438157A (en) * 2021-06-25 2021-09-24 上海钧正网络科技有限公司 Method, device and equipment for restoring network in echelon and readable storage medium
CN113765736A (en) * 2021-07-23 2021-12-07 深圳市智微智能科技股份有限公司 android device network stabilizing method, system, terminal and storage medium
CN113612662A (en) * 2021-08-04 2021-11-05 湖南快乐阳光互动娱乐传媒有限公司 Network monitoring method, device, readable medium and equipment
CN114189460A (en) * 2021-09-17 2022-03-15 惠州高盛达智显科技有限公司 Cash register quick and stable networking method and system
CN114143911A (en) * 2021-11-19 2022-03-04 广州朗国电子科技股份有限公司 Android platform-based wireless screen-casting and network-breaking automatic reconnection method
CN114143911B (en) * 2021-11-19 2023-12-05 广州朗国电子科技股份有限公司 Method for automatically reconnecting wireless screen-on and screen-off based on Android platform
CN114500338A (en) * 2022-01-26 2022-05-13 湖南快乐阳光互动娱乐传媒有限公司 Method and device for detecting networking state and networking equipment
CN115174437A (en) * 2022-06-27 2022-10-11 广州鲁邦通物联网科技股份有限公司 Network connection stability detection method and system
CN115174437B (en) * 2022-06-27 2024-05-07 广州鲁邦通物联网科技股份有限公司 Network connection stability detection method and system
CN116614675A (en) * 2023-07-19 2023-08-18 深圳市华曦达科技股份有限公司 Wi-Fi (wireless fidelity) back connection automatic detection method and system for smart television box and readable storage medium
CN116614675B (en) * 2023-07-19 2023-12-22 深圳市华曦达科技股份有限公司 Wi-Fi (wireless fidelity) back connection automatic detection method and system for smart television box and readable storage medium

Similar Documents

Publication Publication Date Title
CN111884879A (en) Network detection method, device and related equipment
CN112769652B (en) Node service monitoring method, device, equipment and medium
CN112969167A (en) Equipment network distribution method, device and system, electronic equipment and storage medium
US20170171355A1 (en) Method for transferring a new software version to at least one electricity meter via a communication network
CN112214441A (en) Communication switching method, equipment and system based on serial bus polling protocol
CN111756573A (en) CTDB double-network-card fault monitoring method in distributed cluster and related equipment
CN112333013B (en) Self-adaptive networking method, device, router and storage medium
CN111866921A (en) Method, device and equipment for searching service fault of 5G base station and storage medium
CN111130929B (en) Method and system for automatically testing WIFI throughput
CN110099001B (en) Bidirectional forwarding detection time parameter negotiation method and device and electronic equipment
CN110913416B (en) Terminal, networking method thereof and computer-readable storage medium
CN114189424B (en) Intelligent device control method, intelligent device control device, electronic device, medium and program product
CN110581786A (en) Method, device, system and medium for testing communication stability of NCSI (network communication service) network
CN112769653A (en) Network detection and switching method, system and medium based on network port binding
CN112492703B (en) Network connection management method, device, equipment and storage medium
CN114356630B (en) Memory leakage detection method, electronic equipment, storage medium and system
CN112148444B (en) Data processing method, device, system and storage medium
US20230162298A1 (en) Method for reconnecting a smart electricity meter and smart electricity meter implementing said method
CN105515896A (en) Mobile terminal network congestion determination method and device
CN114257660B (en) SV and GOOSE message processing method, device, equipment and storage medium
CN116389188B (en) Data transmission method and related device
CN115297501A (en) Equipment state detection method, electronic equipment and storage medium
CN107517114B (en) Method and device for updating link state of communication port
CN117527655A (en) NAT type detection method and device and electronic equipment
CN117527638A (en) Communication detection method, device, electronic 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
RJ01 Rejection of invention patent application after publication

Application publication date: 20201103

RJ01 Rejection of invention patent application after publication