CN113612662A - Network monitoring method, device, readable medium and equipment - Google Patents
Network monitoring method, device, readable medium and equipment Download PDFInfo
- Publication number
- CN113612662A CN113612662A CN202110891141.7A CN202110891141A CN113612662A CN 113612662 A CN113612662 A CN 113612662A CN 202110891141 A CN202110891141 A CN 202110891141A CN 113612662 A CN113612662 A CN 113612662A
- Authority
- CN
- China
- Prior art keywords
- network
- monitoring result
- internet
- network monitoring
- access
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000012544 monitoring process Methods 0.000 title claims abstract description 377
- 238000000034 method Methods 0.000 title claims abstract description 75
- 238000012806 monitoring device Methods 0.000 claims description 8
- 238000001514 detection method Methods 0.000 claims description 6
- 238000004590 computer program Methods 0.000 claims description 3
- 230000004044 response Effects 0.000 abstract description 5
- 230000008569 process Effects 0.000 description 12
- 230000009471 action Effects 0.000 description 3
- 230000000694 effects Effects 0.000 description 3
- 230000005540 biological transmission Effects 0.000 description 2
- 230000001747 exhibiting effect Effects 0.000 description 2
- 238000012360 testing method Methods 0.000 description 2
- 230000008859 change Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
- 238000012795 verification Methods 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/50—Testing arrangements
-
- 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/06—Generation of reports
-
- 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/0876—Network utilisation, e.g. volume of load or congestion level
- H04L43/0894—Packet rate
-
- 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/10—Active monitoring, e.g. heartbeat, ping or trace-route
-
- 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/10—Active monitoring, e.g. heartbeat, ping or trace-route
- H04L43/103—Active monitoring, e.g. heartbeat, ping or trace-route with adaptive polling, i.e. dynamically adapting the polling rate
-
- 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/16—Threshold 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)
- Environmental & Geological Engineering (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The application discloses a network monitoring method, a device, a readable medium and equipment, wherein the method comprises the steps of obtaining the network speed of network equipment in the current polling period; judging whether the network speed of the current polling period is greater than a preset network speed value or not; if the network speed of the current polling period is not greater than the preset network speed value, sending an Internet packet searching (PING) service command to the specified Internet domain name; and if the PING service command cannot be successfully responded by the specified Internet domain name, determining that the network monitoring result of the current polling period is that the network equipment cannot access the Internet. Compared with the prior art that the network monitoring result is determined to be that the network equipment cannot access the internet only by means of unsuccessful response of the PING service command, the method and the device for monitoring the network monitoring result in the current polling period are more accurate when the network monitoring result in the current polling period is determined to be that the network equipment cannot access the internet.
Description
Technical Field
The present application relates to the field of computer technologies, and in particular, to a network monitoring method, apparatus, readable medium, and device.
Background
In the prior art, in order to ensure that a user can know the current network condition when using a network device, whether the network device has access to the Internet is generally detected through an Internet Packet explorer (PING) service command. Specifically, the network device sends an Internet Packet explorer (PING) service command to a specified domain name, if the PING service command can be successfully responded, the network device is considered to be accessible to the Internet, and if the PING service command cannot be successfully responded, the network device is considered to be inaccessible to the Internet.
However, the accuracy of the detection result obtained by the existing internet detection method is not high. Specifically, in some cases, although the internet does not have an access failure, when the PING service command is used for detection, the PING service command cannot successfully respond due to the failure of the specified domain name or some other reasons, and it is determined that the network device cannot access the internet by mistake. And further informing the user of the result, so that the user makes a wrong countermeasure subsequently.
Disclosure of Invention
Based on the defects of the prior art, the application provides a network monitoring method, a device, a readable medium and equipment, so as to realize the accuracy of the network monitoring result of the network equipment which cannot access the internet.
A first aspect of the present application discloses a network monitoring method, including:
acquiring the network speed of the network equipment in the current polling period;
judging whether the network speed of the current polling period is greater than a preset network speed value or not;
if the network speed of the current polling period is not greater than the preset network speed value, sending an Internet packet searching (PING) service command to the specified Internet domain name;
and if the PING service command cannot be successfully responded by the specified Internet domain name, determining that the network monitoring result of the current polling period is that the network equipment cannot access the Internet.
Optionally, in the network monitoring method, after determining whether the network speed of the current polling period is greater than a preset network speed value, the method further includes:
if the network speed of the current polling cycle is greater than the preset network speed value, determining that the network monitoring result of the current polling cycle is that the network equipment can access the Internet;
and if the PING service command is successfully responded by the specified Internet domain name, determining that the network monitoring result of the current polling period is that the network equipment can access the Internet.
Optionally, in the network monitoring method, before the determining whether the network speed of the current polling period is greater than a preset network speed value, the method further includes:
acquiring a network monitoring result of the last polling period;
if the network monitoring result of the last polling cycle is that the network equipment cannot access the internet, determining a preset first network speed value as the preset network speed value;
if the network monitoring result of the last polling cycle is that the network equipment can access the internet, determining a preset second network speed value as the preset network speed value; and the preset first network speed value is greater than the preset second network speed value.
Optionally, in the network monitoring method, after the network monitoring result of the current polling cycle is determined, the method further includes:
if the network monitoring result of the current polling cycle is that the network equipment can access the Internet, judging whether the network monitoring result which is sent to the display module at the latest time is that the network equipment can access the Internet or not;
and if the network monitoring result which is sent to the display module at the latest time is that the network equipment cannot access the Internet, sending the network monitoring result of the current polling cycle to the display module in the current polling cycle.
Optionally, in the network monitoring method, after the network monitoring result of the current polling cycle is determined, the method further includes:
if the network monitoring result of the current polling cycle is that the network equipment cannot access the internet, judging whether the network monitoring result which is sent to the display module at the latest time is that the network equipment cannot access the internet or not;
and if the network monitoring result which is sent to the display module at the latest time is that the network equipment can access the Internet, sending the network monitoring result of the current polling period to the display module in the current polling period.
Optionally, in the network monitoring method, after the network monitoring result of the current polling cycle is determined, the method further includes:
if the determined network monitoring result of the current polling cycle is that the network equipment can access the Internet, setting the state value of the network monitoring result value m as a first state value;
if the determined network monitoring result of the current polling cycle is that the network equipment cannot access the internet, setting the state value of the network monitoring result value m as a second state value;
the acquiring a network monitoring result of a previous polling cycle includes:
reading a state value of a network monitoring result value m;
if the state value of the network monitoring result value m is read as the first state value, determining that the network monitoring result of the last polling cycle is that the network equipment can access the internet;
and if the state value of the network monitoring result value m is read as the second state value, determining that the network monitoring result of the last polling cycle is that the network equipment cannot access the internet.
Optionally, in the network monitoring method, after the sending the network monitoring result of the current polling cycle to the display module, the method further includes:
if the network monitoring result sent to the display module indicates that the network equipment can access the internet, setting the state value of the sending state value S as a third state value;
if the network monitoring result sent to the display module is that the network equipment cannot access the internet, setting the state value of the sending state value S as a fourth state value;
wherein, if the network monitoring result of the current polling cycle is that the network device can access the internet, determining whether the network monitoring result sent to the display module at the latest time is that the network device can access the internet, includes:
if the network monitoring result of the current polling cycle is that the network equipment can access the Internet, judging whether the network monitoring result which is sent to the display module at the latest time is that the network equipment can access the Internet according to the read state value of the sending state value S; if the sending state value S is read to be the third state value, judging that the latest network monitoring result sent to the display module is that the network equipment can access the Internet; and if the sending state value S is read to be the fourth state value, judging that the latest network monitoring result sent to the display module is that the network equipment cannot access the Internet.
Optionally, in the network monitoring method, if the network monitoring result of the current polling cycle is that the network device can access the internet, determining whether the network monitoring result sent to the display module at the latest time is that the network device can access the internet, further includes:
reading a state value showing a state value I; wherein the state value of the presentation state value I comprises: a fifth state value or a sixth state value; the fifth state value is used for indicating that the network monitoring result currently displayed by the display module is that the network equipment can access the internet; the sixth state value is used for indicating that the network monitoring result currently displayed by the display module is that the network equipment cannot access the internet;
the sending of the network monitoring result of the current polling cycle to the display module, and the displaying of the network monitoring result of the current polling cycle to the user by the display module, include:
if the state value of the display state value I is the sixth state value and the latest network monitoring result sent to the display module is judged to be the network device accessible to the Internet, sending the network monitoring result of the current polling cycle to the display module, and displaying the network monitoring result of the current polling cycle to a user by the display module;
if the network monitoring result sent to the display module last time is that the network device can access the internet, the method does not send the network monitoring result of the current polling cycle to the display module in the current polling cycle includes:
and if the state value of the display state value I is a fifth state value and the network monitoring result which is sent to the display module at the latest time is judged to be the network accessible to the network equipment, not sending the network monitoring result of the current polling cycle to the display module in the current polling cycle.
Optionally, in the network monitoring method, the current polling period is set by a configuration server.
Optionally, in the network monitoring method, if the specified internet domain name is multiple, the sending an internet packet searchers PING service command to the specified internet domain name includes:
respectively sending Internet packet explorer PING service commands to a plurality of specified Internet domain names;
wherein, if the PING service command cannot be successfully responded by the specified internet domain name, determining that the network monitoring result of the current polling cycle is that the network device cannot access the internet, includes:
and if the PING service command cannot be responded by all the specified Internet domain names, determining that the network monitoring result of the current polling period is that the network equipment cannot access the Internet.
The second aspect of the present application discloses a network monitoring device, including:
the first acquisition unit is used for acquiring the network speed of the network equipment in the current polling period;
the first judgment unit is used for judging whether the network speed of the current polling period is greater than a preset network speed value or not;
the first sending unit is used for sending an Internet packet seeker PING service command to the specified Internet domain name if the network speed of the current polling period is not greater than the preset network speed value;
and the first determining unit is used for determining that the network monitoring result of the current polling cycle is that the network equipment cannot access the internet if the PING service command cannot be successfully responded by the specified internet domain name.
Optionally, in the network monitoring apparatus, the network monitoring apparatus further includes:
the second determining unit is used for determining that the network monitoring result of the current polling cycle is that the network equipment can access the internet if the network speed of the current polling cycle is greater than the preset network speed value;
and the third determining unit is used for determining that the network monitoring result of the current polling cycle is that the network equipment can access the internet if the PING service command is successfully responded by the specified internet domain name.
Optionally, in the network monitoring apparatus, the network monitoring apparatus further includes:
the second acquisition unit is used for acquiring the network monitoring result of the previous polling cycle;
a fourth determining unit, configured to determine a preset first network speed value as the preset network speed value if the network monitoring result of the previous polling cycle is that the network device does not have access to the internet;
a fifth determining unit, configured to determine a preset second network speed value as the preset network speed value if the network monitoring result of the previous polling cycle indicates that the network device may access the internet; and the preset first network speed value is greater than the preset second network speed value.
Optionally, in the network monitoring apparatus, the network monitoring apparatus further includes:
the second judging unit is used for judging whether the network monitoring result which is sent to the display module at the latest time is the internet accessible by the network equipment or not if the network monitoring result of the current polling period is the internet accessible by the network equipment;
and the second sending unit is used for sending the network monitoring result of the current polling cycle to the display module in the current polling cycle if the network monitoring result sent to the display module at the latest time is that the network equipment cannot access the internet.
Optionally, in the network monitoring apparatus, the network monitoring apparatus further includes:
the third judging unit is used for judging whether the network monitoring result which is sent to the display module at the latest time is the internet inaccessible to the network equipment or not if the network monitoring result of the current polling period is the internet inaccessible to the network equipment;
and the third sending unit is used for sending the network monitoring result of the current polling cycle to the display module in the current polling cycle if the network monitoring result sent to the display module at the latest time is that the network device can access the internet.
Optionally, in the network monitoring apparatus, the network monitoring apparatus further includes:
the first setting unit is used for setting the state value of the network monitoring result value m as a first state value if the determined network monitoring result of the current polling period is that the network equipment can access the internet;
the second setting unit is used for setting the state value of the network monitoring result value m as a second state value if the determined network monitoring result of the current polling period is that the network equipment cannot access the internet;
wherein the first obtaining unit includes:
the reading subunit is used for reading the state value of the network monitoring result value m;
the first determining subunit is configured to determine, if the state value of the network monitoring result value m is read as the first state value, that the network monitoring result of the previous polling cycle is that the network device can access the internet;
and the second determining subunit is configured to determine, if the state value obtained by reading the network monitoring result value m is the second state value, that the network monitoring result of the last polling cycle is that the network device does not have access to the internet.
Optionally, in the network monitoring apparatus, the network monitoring apparatus further includes:
the third setting unit is used for setting the state value of the sending state value S as a third state value if the network monitoring result sent to the display module indicates that the network equipment can access the Internet;
the fourth setting unit is used for setting the state value of the sending state value S as a fourth state value if the network monitoring result sent to the display module is that the network equipment cannot access the internet;
wherein the second determination unit includes:
the first judging subunit is configured to, if the network monitoring result of the current polling cycle is that the network device can access the internet, judge whether the network monitoring result that is sent to the display module at the latest time is that the network device can access the internet according to the read state value of the sending state value S; if the first judging subunit reads that the sending state value S is the third state value, it judges that the latest network monitoring result sent to the display module is that the network device can access the internet; and if the sending state value S is read to be the fourth state value, judging that the latest network monitoring result sent to the display module is that the network equipment cannot access the Internet.
Optionally, in the network monitoring apparatus, the network monitoring apparatus further includes:
a first reading unit for reading a state value showing the state value I; wherein the state value of the presentation state value I comprises: a fifth state value or a sixth state value; the fifth state value is used for indicating that the network monitoring result currently displayed by the display module is that the network equipment can access the internet; the sixth state value is used for indicating that the network monitoring result currently displayed by the display module is that the network equipment cannot access the internet;
and the first sending subunit is configured to send the network monitoring result of the current polling cycle to the display module if the state value of the display state value I is the sixth state value and it is determined that the network monitoring result sent to the display module at the latest time is that the network device can access the internet, and the display module displays the network monitoring result of the current polling cycle to the user.
Optionally, in the network monitoring apparatus, the current polling period is set by the configuration server.
Optionally, in the network monitoring apparatus, if there are a plurality of specified internet domain names, the first sending unit includes:
a second sending subunit, configured to send an internet PING service command to the plurality of specified internet domain names, respectively;
wherein the first determination unit includes:
and the fourth determining subunit is configured to determine that the network monitoring result of the current polling cycle is that the network device does not have access to the internet if the PING service command cannot be responded by all the specified internet domain names.
A third aspect of the application discloses a computer readable medium having a computer program stored thereon, wherein the program when executed by a processor implements the method as described in any of the first aspects above.
The fourth aspect of the present application discloses a network monitoring device, including:
one or more processors;
a storage device having one or more programs stored thereon;
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method as in any one of the first aspects above.
It can be seen from the above technical solutions that, in the network monitoring method provided in the embodiment of the present application, by obtaining the network speed of the network device in the current polling cycle, it is determined whether the network speed of the current polling cycle is greater than a preset network speed value, and when the network speed of the polling cycle is not greater than the preset network speed value, a PING service command is sent to a specified internet domain name, and if the PING service command cannot be successfully responded by the specified internet domain name, it is determined that the network monitoring result of the current polling cycle is that the network device cannot access the internet, therefore, in the embodiment of the present application, when the network speed of the current polling cycle is not greater than the preset network speed value and the PING service command cannot be successfully responded by the specified internet domain name, it is determined that the network monitoring result of the current polling cycle is that the network device cannot access the internet, compared with the prior art that it is determined that the network device cannot access the internet only by means that the PING service command cannot be successfully responded, the embodiment of the application is more accurate when the network monitoring result of the current polling period is determined to be that the network equipment cannot access the Internet.
Drawings
In order to more clearly illustrate the embodiments of the present invention 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, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a schematic flowchart of a network monitoring method according to an embodiment of the present application;
fig. 2 is a schematic flowchart of another network monitoring method according to an embodiment of the present application;
fig. 3 is a schematic flowchart of a method for displaying network monitoring results according to an embodiment of the present application;
fig. 4 is a schematic flowchart of another method for displaying network monitoring results according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a network monitoring device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, the present application discloses a network monitoring method, which is applied to a network device, where the network device may be an electronic device that can be added to the internet, such as a mobile phone, a tablet, a computer, and the like, and specifically includes the following steps:
s101, acquiring the network speed of the network equipment in the current polling period.
The polling period refers to a period during which network monitoring is performed. The network monitoring method shown in fig. 1 is triggered to be executed according to a preset polling period to ensure that the latest network monitoring result can be known in real time, i.e. step S101 needs to be executed in each polling period. The network speed refers to the time for requesting and returning data when the network equipment is on the internet and uploading and downloading the data. The network speed of the network device in the current polling period refers to a value capable of reflecting the network speed condition of the network device in the current polling period, and may be, for example, an average network speed of the network device in the current polling period, a median among a plurality of network speeds collected by the network device in the current polling period, or the like.
Optionally, in an embodiment of the present application, the polling period may be set by a configuration server. For example, if the configuration server desires a polling period of 10 seconds, the configuration server issues setting data "polling period is 10 seconds" to the network device, so that the network device takes 10 seconds as the polling period.
S102, judging whether the network speed of the current polling period is larger than a preset network speed value.
If the network speed of the current polling cycle is greater than the preset network speed value, it is indicated that the network speed in the current polling cycle reaches a theoretical value (i.e., the preset network speed value) when the network can successfully access the internet, so that it can be considered that the network device in the current polling cycle can access the internet, and therefore the process can be ended, the process returns to step S101 again, the network speed of the next polling cycle is continuously obtained, and the embodiment shown in fig. 1 is executed again.
If the network speed of the current polling cycle is less than or equal to the preset network speed value, it is indicated that the network speed of the network device in the current polling cycle does not reach the theoretical value that the network device can successfully access the internet, and therefore it is considered that the network device in the current polling cycle may not successfully access the internet, and specifically, further verification is required, so step S103 needs to be executed.
The preset network speed value is a network speed threshold value of the network device in a state that the network device can successfully access the internet theoretically, and can be set by experience or results of multiple tests. For example, the network speed of the network device under the condition that the network device can successfully access the internet in the past is collected to determine a minimum value of the network device when the network device can successfully access the internet, and the minimum value is used as a preset network speed value.
S103, sending a PING service command to the specified Internet domain name.
Although the network speed of the current polling cycle is less than or equal to the preset network speed value as a result of the determination in step S102, it is considered that the network device may not be able to access the internet, in order to make the finally obtained network monitoring result more accurate, another way (i.e., the way of step S103) needs to be used to determine again whether the network device is really unable to access the internet.
The PING service command is used primarily to test whether the network device can successfully PING the specified internet domain name. The PING service command carries a specified internet domain name. If the network device is able to successfully PING (or reach) the specified internet domain name, the specified internet domain name is able to successfully respond to the PING service command and return a result of the successful response to the network device. Specifically, the PING service command is actually a command for exchanging a data packet between the network device and the device where the specified internet domain name is located, if the network device can successfully exchange the data packet with the device where the specified internet domain name is located, the packet is transmitted, and the return information received by the network device can indicate that the internet domain name specified by the PING service command successfully responds, and if the network device cannot successfully exchange the data packet with the specified internet domain name, the return information received by the network device indicates that the PING service command does not successfully respond to the specified internet domain name, and even the network device cannot receive the returned information.
It should be noted that the designated internet domain name may be one or more. I.e., step S103 is performed, PING service commands may be sent to a plurality of specified internet domain names, respectively.
And S104, judging whether the PING service command is successfully responded by the appointed Internet domain name.
Specifically, whether the PING service command is successfully responded by the specified internet domain name is judged through the return information of the device where the specified internet domain name is located. If the network device does not receive the return information or the return information shows that the PING service command does not successfully respond to the appointed Internet domain name, the network device judges that the PING service command does not successfully respond to the appointed Internet domain name. Therefore, since the network speed of the network device in the current polling cycle is not greater than the preset network speed value and the PING service command does not successfully respond to the specified internet domain name, it may be considered that the network device in the current polling cycle does not have access to the internet, and step S105 is performed.
If the network device receives the return information, and the return information indicates that the PING service command can be successfully responded by the specified internet domain name, it can be considered that although the network speed is not greater than the preset network speed value in the current polling period, the specified internet domain name can be normally accessed by the PING, and therefore the network device can be considered to be accessible to the internet in the current polling period, and the process is ended.
Optionally, in an embodiment of the present application, if there are a plurality of specified internet domain names, an implementation manner of the step S104 is executed, including:
and respectively judging whether the PING service command is successfully responded by each specified Internet domain name.
If the PING service command cannot be responded by all the specified internet domain names, it is determined that the network monitoring result of the current polling period is that the network device cannot access the internet, and step S105 is executed. If the PING service command has a successful response of the specified internet domain name, determining that the network monitoring result of the current polling period is that the network device can access the internet, namely, as long as one specified internet domain name successfully responds to the PING service command in all specified internet domain names, the network device is considered to be accessible to the internet.
Optionally, it may be sequentially determined whether the PING service command is successfully responded by each specified internet domain name, and when it is determined that the PING service command is successfully responded by the specified internet domain name, it is determined that the network device can access the internet, and the process is ended. Otherwise, continuously judging whether the PING service command is successfully responded by the next specified internet domain name or not, and when the PING service command is judged not to be successfully responded by all specified internet domain names, determining that the network monitoring result of the current polling cycle is that the network equipment cannot access the internet, namely executing the step S105.
And under the condition that a plurality of specified internet domain names exist, determining that the network monitoring result of the current polling period is the internet inaccessible to the network equipment only if the PING service command cannot be responded by all the specified internet domain names, wherein the network monitoring result of the current polling period obtained by the specified internet domain names is obviously more accurate compared with the network monitoring result of the current polling period obtained by the specified internet domain names under the condition that only one specified internet domain name exists. In the case of only a single designated internet domain name, if the designated internet domain name happens to fail in the current polling period, it is easy to misjudge an inaccurate network monitoring result (i.e., a domain name which cannot be designated by a PING service command is misjudged to be successfully responded by a network device and cannot access the internet).
And S105, determining that the network monitoring result of the current polling period is that the network equipment cannot access the Internet.
When the network device does not have access to the internet, the presented characteristics are that the network speed is low and close to zero, and the network device cannot successfully exchange data with the domain name (i.e. the network device cannot PING the domain name), and the like. Because the network speed of the current polling cycle is not greater than the preset network speed value, and the PING service command cannot be successfully responded by the specified Internet domain name, the characteristics of the network equipment in the case of not accessing the Internet can be met, and therefore the network monitoring result of the current polling cycle can be determined to be that the network equipment cannot access the Internet.
In the prior art, whether a network device can access the internet is determined only by whether a PING service command is assigned to an internet domain name response. However, it is not very accurate to use only the specified internet domain name to determine whether the network device can access the monitoring results of the internet. Specifically, in some cases, although the internet does not have an access failure, when the PING service command is used for detection, the PING service command cannot successfully respond due to the failure of the specified domain name or some other reasons, and it is determined that the network device cannot access the internet by mistake. And further informing the user of the result, so that the user makes a wrong countermeasure subsequently.
In the embodiment of the application, the network monitoring result of the current polling cycle is determined to be the internet inaccessible to the network device only when the network speed of the current polling cycle is not greater than the preset network speed value and the PING service command cannot be successfully responded by the specified internet domain name. In addition, in the embodiment of the application, it is preferentially adopted whether the network speed of the current polling cycle is greater than the preset network speed value or not to determine the network monitoring result of the polling cycle, and when the network speed of the current polling cycle is greater than the preset network speed value, the monitoring result of the network device is considered that the network device can access the internet, and subsequent operations are not required. In the process of determining the network monitoring result of the network device accessible to the internet, a PING service command does not need to be sent every time, if the network speed of the polling period is greater than the preset network speed value, the network speed of the polling period is only needed to be used to determine the network monitoring result of the network device accessible to the internet, the PING service command does not need to be sent, and the performance overhead of the mode of determining the network monitoring result through the PING service command is greater than that of determining the network monitoring result through the network speed.
Referring to fig. 2, the embodiment of the present application further discloses another network monitoring method, which is applied to a network device, where the network device may be an electronic device that can be added to the internet, such as a mobile phone, a tablet, a computer, and the like, and specifically includes the following steps:
s201, obtaining the network speed of the network equipment in the current polling period.
The execution process and principle of step S201 are the same as those of step S101 shown in fig. 1, and are not described here again.
S202, obtaining a network monitoring result of the last polling period.
Specifically, after the network monitoring result of each polling cycle is obtained through the embodiment shown in fig. 2 in each polling cycle, the network monitoring result of each polling cycle may be stored. When the embodiment shown in fig. 2 is executed in the current polling cycle, the stored network monitoring result of the last polling cycle may be obtained.
It should be noted that there are many storage ways for the network monitoring result. For example, after the network monitoring result of the current polling cycle is determined through the embodiment shown in fig. 2, if the determined network monitoring result of the current polling cycle is that the network device can access the internet, the state value of the network monitoring result value m is set to be a first state value, and if the determined network monitoring result of the current polling cycle is that the network device cannot access the internet, the state value of the network monitoring result value m is set to be a second state value. The state value of the network monitoring result value m represents the latest determined network monitoring result. That is, after the network monitoring result is determined in each polling period, the state value of the network monitoring result value m needs to be set according to the determined network monitoring result, that is, the newly determined network monitoring result can be stored by setting the state value of the network monitoring result value m. When the current polling cycle is executed to step S202, the state value of m is read, and the latest determined network monitoring result (i.e., the network monitoring result of the previous polling cycle) is read. And if the read state value of m is the first state value, determining that the network monitoring result of the last polling cycle is that the network equipment can access the internet, and if the read state value of m is the second state value, determining that the network monitoring result of the last polling cycle is that the network equipment can not access the internet.
The first state value and the second state value may be in english or binary value form. However, the first status value is different from the second status value to distinguish two different network monitoring results. For example, the first status value may be true, and represents that the network device has access to the internet as a result of the network monitoring in the current polling period. The second status value may be false, which represents that the network detection result of the current polling cycle is that the network device does not access the internet. In the current polling cycle, when step S202 is executed, the network monitoring result of the previous polling cycle may be obtained by reading the state value of m, if the state value of m is true, it is indicated that the network monitoring result of the previous polling cycle is that the network device may access the internet, and if the state value of m is false, it is indicated that the network monitoring result of the previous polling cycle is that the network device may not access the internet.
S203, judging whether the network speed of the current polling cycle is greater than a preset network speed value, wherein if the network monitoring result of the last polling cycle is that the network equipment cannot access the Internet, the preset first network speed value is determined as the preset network speed value, and if the network monitoring result of the last polling cycle is that the network equipment can access the Internet, the preset second network speed value is determined as the preset network speed value, and the preset first network speed value is greater than the preset second network speed value.
The preset network speed value in step S203 is determined by the network monitoring result of the last polling cycle acquired in step S202. If the network monitoring result obtained in step S202 is that the network device does not have access to the internet, the preset network speed value used for determining the network speed in step S203 is determined as a preset first network speed value, and if the network monitoring result obtained in step S202 is that the network device has access to the internet, the preset network speed value used for determining the network speed in step S203 is determined as a preset second network speed value.
If the network speed of the current polling cycle is not greater than the preset network speed value, it indicates that the network device may not access the internet in the current polling cycle, step S204 needs to be performed to make further determination, and if the network speed of the current polling cycle is greater than the preset network speed value, it is determined that the network device may access the internet in the current polling cycle, i.e., step S207 is performed.
In step S203, in order to make the finally obtained network monitoring result of the current polling cycle more accurate, the preset network speed value needs to be determined by referring to the network monitoring result of the previous polling cycle. If the network monitoring result of the previous polling cycle is that the network device does not have access to the internet, theoretically, because the time interval between the previous polling cycle and the current polling cycle is short, the probability that the network monitoring result of the current polling cycle will be changed to the network device that has access to the internet is not so high, and therefore, if the network monitoring result of the current polling cycle is accurately judged to be that the network device has access to the internet, a relatively severe condition needs to be met. That is, the preset network speed value of step S203 is determined to be the preset first network speed value, which is set to be larger, and if the network monitoring result of the previous polling cycle is that the network device can access the internet, then theoretically, the probability that the network monitoring result of the current polling cycle will be that the network device can access the internet is higher, so that if it is determined that the network device can access the internet in the current polling cycle, it may meet a condition that is not particularly severe, that is, the preset network speed value of step S203 is determined to be the preset second network speed value, which is set to be smaller than the preset first network speed value. For example, the preset first network speed value is 10KB/S, the preset second network speed value is 5KB/S, if the network monitoring result of the previous polling cycle is that the network device cannot access the internet, when step S203 is executed, it is determined whether the network speed of the current polling cycle is greater than 10KB/S, if so, step S207 is executed, and if not, step S204 is executed. If the network monitoring result of the previous polling cycle is that the network device can access the internet, then step S203 is executed to determine whether the network speed of the current polling cycle is greater than 5KB/S, if so, step S207 is executed, and if not, step S204 is executed.
And S204, sending a PING service command to the specified Internet domain name.
The execution process and principle of step S204 are the same as step S103, and are not described here again.
S205, whether the PING service command is successfully responded by the appointed Internet domain name is judged.
If the step S205 determines that the internet domain name specified by the PING service command successfully responds, step S207 is executed, and if the step S205 determines that the internet domain name specified by the PING service command cannot successfully respond, step S206 is executed.
The execution process and principle of step S205 are the same as those of step S104, and are not described here again.
S206, determining that the network monitoring result of the current polling cycle is that the network equipment cannot access the Internet.
And S207, determining that the network monitoring result of the current polling cycle is that the network equipment can access the Internet.
And S208, sending the network monitoring result of the polling period to a display module, and displaying the network monitoring result of the polling period to a user by the display module.
The display module is used for displaying the network monitoring result of the current polling cycle to the user, and the display module can be a display screen, a display panel and the like. The display module can be in the network device or other devices. The display module has many forms for displaying the network monitoring result, for example, the form may be a text display, a graphic display, and the like, and the difference in the form for displaying the network monitoring result does not affect the implementation of the embodiment of the present application.
After the network monitoring result of the current polling cycle is determined through steps S201 to S207, the network monitoring result of the current polling cycle is displayed through the display module, so that the user can know the current network monitoring result. When the current network equipment can not be used normally, the user can take correct countermeasures in time according to the current network monitoring result. For example, if the current network device cannot be used normally and the current network monitoring result indicates that the network device cannot access the internet, it is indicated that the current network device cannot be used normally due to a network reason, and therefore measures can be taken to find out a specific network problem.
Optionally, the network monitoring result of each polling cycle may be sent to the display module, and displayed to the user by the display module, or the network monitoring result of the current polling cycle may be sent only when the network monitoring result of the current polling cycle changes compared with the monitoring result of the previous polling cycle, so as to achieve the effect of saving additional performance overhead.
Optionally, when the network monitoring result is that the network device can access the internet all the time, the network monitoring result is not repeatedly sent to the display module, so as to achieve the effect of saving the performance overhead. Specifically, referring to fig. 3, before executing step S208, the method further includes:
s301, if the network monitoring result of the current polling cycle is that the network device can access the Internet, judging whether the network monitoring result sent to the display module at the latest time is that the network device can access the Internet.
Specifically, if it is determined that the network monitoring result in the polling period is that the network device can access the internet in the embodiment shown in fig. 2, it is determined whether the network monitoring result sent to the presentation module last time (i.e., last time) is that the network device can access the internet. If the network monitoring result sent to the display module last time (i.e., last time) is that the network device can access the internet, it indicates that the network monitoring result in the current polling cycle is consistent with the network monitoring result sent to the display module last time, and therefore, the same network monitoring result does not need to be sent to the user again to be displayed once, i.e., step S302 is executed. If the network monitoring result sent to the presentation module last time is not that the network device can access the internet, it indicates that the network monitoring result in the current polling period is inconsistent with the network monitoring result sent to the presentation module last time, and it is necessary to notify the user of the change, that is, step S303 needs to be executed, or it may be considered to be step S208 shown in fig. 2.
It should be noted that the network monitoring result sent to the presentation module at the latest time does not represent the network monitoring result sent in the last polling cycle. In the embodiment shown in fig. 3, if the network monitoring results of a plurality of consecutive polling periods are all internet-accessible network devices, the network monitoring results are sent to the presentation module only in the polling period in which the network monitoring results are first monitored as internet-accessible network devices, and the network monitoring results are not sent in the remaining polling periods.
It should be further noted that, the network monitoring result sent to the display module at the latest time in step S301 may be that the network monitoring result sent to the display module is recorded every time the network monitoring result is sent to the display module, and then what the network monitoring result sent to the display module at the latest time is can be looked up from the record in step S301.
Optionally, the manner of recording the network monitoring result sent to the display module last time may be: after the network monitoring result of the polling period is sent to the display module, if the network monitoring result sent to the display module is that the network equipment can access the internet, the state value of the sending state value S is set to be a third state value, and if the network monitoring result sent to the display module is that the network equipment cannot access the internet, the state value of the sending state value S is set to be a fourth state value.
It should be noted that the third status value is different from the fourth status value to distinguish two different network monitoring results sent to the display module. For example, the third state value may be set to true and the fourth state value may be set to false. It should be further noted that the sending state value S needs to be set only when the network monitoring result is sent to the display module, and if the network monitoring result is determined but not sent to the display module, the sending state value S does not need to be set again.
By recording the latest network monitoring result sent to the display module in the above manner, it can be determined whether the latest network monitoring result sent to the display module is that the network device can access the internet or not according to the read state value of the sending state value S when step S301 is executed. If the transmission state value S is read to be the third state value, the network monitoring result which is transmitted to the display module at the latest time is judged to be the internet accessible to the network equipment, and if the transmission state value S is read to be the fourth state value, the network monitoring result which is transmitted to the display module at the latest time is judged to be the internet inaccessible to the network equipment.
Optionally, in a specific embodiment of the present application, after the step S301 is executed, the method further includes:
the state value showing the state value I is read. Wherein, the state value of the display state value I comprises: and the fifth state value is used for indicating that the network monitoring result currently displayed by the display module is the internet accessible to the network equipment, and the sixth state value is used for indicating that the network monitoring result currently displayed by the display module is the internet inaccessible to the network equipment. If the state value of the display state value I is the sixth state value and it is determined that the network monitoring result sent to the display module at the latest time is that the network device can access the internet, step S303 is executed. If the state value of the display state value I is the fifth state value and it is determined that the network monitoring result sent to the display module at the latest time is that the network device can access the internet, step S302 is executed.
The state value of the display state value I is used for explaining whether the currently displayed network monitoring result of the display module is that the network equipment can access the Internet. In some cases, although the network monitoring result that the network device can access the internet is sent to the display module, the display module cannot be successfully displayed on the display module after receiving the network monitoring result. Therefore, after step S301 is executed, if it is determined that the network monitoring result sent to the display module at the latest time is that the network device can access the internet, but the status value of the display status value I is read as the sixth status value, which means that the network monitoring result sent to the display module at the latest time is that the network device can access the internet and is not successfully displayed on the display module, it is still necessary to resend the network monitoring result sent in the current polling cycle to the display module, so as to ensure that the user can see the network monitoring result. If the state value of the display state value I is the fifth state value and it is determined that the network monitoring result sent to the display module at the latest time is that the network device can access the internet, the network monitoring result in the polling period does not need to be sent to the display module any more, and step S302 is executed.
S302, the network monitoring result of the polling period is not sent to the display module in the current polling period.
And S303, sending the network monitoring result of the polling period to a display module in the current polling period.
In general, the network monitoring result is that the network device can access the internet, and only in a very specific case, a network fault occurs, so that the network monitoring result is that the network device cannot access the internet. Therefore, if the network monitoring result of each polling cycle is sent to the presentation module, the network monitoring result is repeatedly sent to the network device accessible to the internet for a very large number of times, and in order to save performance overhead, in the embodiment shown in fig. 3, the network monitoring result is sent to the presentation module only when the network monitoring result of the current polling cycle is that the network device is accessible to the internet, but the network monitoring result sent to the presentation module last time is not accessible to the network device. When the next polling cycle is reached, the network monitoring result which is sent to the display module at the latest time becomes the network device accessible internet, so that if the network monitoring result of the next polling cycle is also the network device accessible internet, the network monitoring result does not need to be sent to the display module any more, and the performance expense is saved.
Optionally, in a specific embodiment of the present application, when the network monitoring result is that the network device cannot access the internet all the time, the network monitoring result is not repeatedly sent to the display module, so as to achieve an effect of saving performance overhead. Specifically, referring to fig. 4, before executing step S208 shown in fig. 2, the method further includes:
s401, if the network monitoring result of the current polling cycle is that the network equipment cannot access the Internet, judging whether the network monitoring result sent to the display module at the latest time is that the network equipment cannot access the Internet.
If the network monitoring result sent to the display module at the latest time is that the network device does not access the internet, it indicates that the network monitoring result sent to the display module at the latest time is consistent with the network monitoring result of the current polling cycle, and therefore, the step S402 may not be executed any more, so as to achieve the purpose of saving performance overhead. If the network monitoring result sent to the display module last time is not that the network device cannot access the internet, it indicates that the network monitoring result sent to the display module last time is inconsistent with the network monitoring result in the current polling cycle, and the network monitoring result still needs to be sent to the display module, that is, step S403 is executed, which may also be considered as step S208 shown in fig. 2.
S402, the network monitoring result of the polling cycle is not sent to the display module in the current polling cycle.
And S403, sending the network monitoring result of the polling period to a display module in the current polling period.
It should be noted that step S208 in the embodiment shown in fig. 2 is an optional step in the embodiment of fig. 2, that is, it is not necessary to send the network monitoring result to the presentation module, and the user may also know whether the current internet is accessible by directly checking the network monitoring results identified in steps S201 to S207. Fig. 3 and 4 describe that step S208 may not be executed under which conditions and step S208 needs to be executed under which conditions, so that the embodiments of fig. 3 and 4 are all an optional implementation manner for executing step S208, except for the embodiments shown in fig. 3 and 5, other manners can execute step S208, and the manner for executing step S208 includes but is not limited to the range provided in the embodiments of the present application.
Referring to fig. 5, based on the foregoing network monitoring device provided in the embodiment of the present application, the embodiment of the present application correspondingly discloses a network monitoring device including: a first acquiring unit 501, a first judging unit 502, a first sending unit 503, and a first determining unit 504.
A first obtaining unit 501, configured to obtain a network speed of the network device in a current polling period.
The first determining unit 502 is configured to determine whether the network speed of the current polling period is greater than a preset network speed value.
A first sending unit 503, configured to send a PING service command to the specified internet domain name if the network speed of the polling period is not greater than the preset network speed value.
And the first determining unit is used for determining that the network monitoring result of the current polling period is that the network equipment cannot access the internet if the PING service command cannot be successfully responded by the specified internet domain name.
Optionally, in a specific embodiment of the present application, the network monitoring apparatus further includes:
and the second determining unit is used for determining that the network monitoring result of the current polling cycle is that the network equipment can access the internet if the network speed of the current polling cycle is greater than the preset network speed value.
And the third determining unit is used for determining that the network monitoring result of the current polling period is that the network equipment can access the internet if the specified internet domain name of the PING service command successfully responds.
Optionally, in a specific embodiment of the present application, the method further includes:
and the second acquisition unit is used for acquiring the network monitoring result of the previous polling cycle.
And the fourth determining unit is used for determining a preset first network speed value as the preset network speed value if the network monitoring result of the last polling cycle is that the network equipment cannot access the internet.
And a fifth determining unit, configured to determine a preset second network speed value as the preset network speed value if the network monitoring result of the previous polling cycle is that the network device has access to the internet, where the preset first network speed value is greater than the preset second network speed value.
Optionally, in a specific embodiment of the present application, the method further includes: a second judging unit and a second transmitting unit.
And the second judging unit is used for judging whether the network monitoring result which is sent to the display module at the latest time is the network device accessible internet or not if the network monitoring result of the polling period is the network device accessible internet.
And the second sending unit is used for sending the network monitoring result of the current polling cycle to the display module in the current polling cycle if the network monitoring result sent to the display module at the latest time is that the network equipment cannot access the internet.
Optionally, in a specific embodiment of the present application, the method further includes: a third judging unit and a third sending unit.
And the third judging unit is used for judging whether the network monitoring result which is sent to the display module at the latest time is the internet inaccessible to the network equipment or not if the network monitoring result of the current polling period is the internet inaccessible to the network equipment.
And the third sending unit is used for sending the network monitoring result of the current polling cycle to the display module in the current polling cycle if the network monitoring result sent to the display module at the latest time is that the network equipment can access the internet.
Optionally, in a specific embodiment of the present application, the method further includes: a first setting unit and a second setting unit.
And the first setting unit is used for setting the state value of the network monitoring result value m as a first state value if the determined network monitoring result of the current polling cycle is that the network equipment can access the internet.
And the second setting unit is used for setting the state value of the network monitoring result value m as a second state value if the determined network monitoring result of the current polling period is that the network equipment cannot access the internet.
Wherein, first acquisition unit includes: a reading subunit, a first determining subunit, and a second determining subunit.
And the reading subunit is used for reading the state value of the network monitoring result value m.
And the first determining subunit is configured to determine that the network monitoring result of the previous polling cycle is that the network device can access the internet if the state value of the network monitoring result value m is read as the first state value.
And the second determining subunit is configured to determine, if the state value of the read network monitoring result value m is the second state value, that the network monitoring result of the last polling cycle is that the network device does not have access to the internet.
Optionally, in a specific embodiment of the present application, the method further includes:
and the third setting unit is used for setting the state value of the sending state value S as a third state value if the network monitoring result sent to the display module indicates that the network equipment can access the internet.
And the fourth setting unit is used for setting the state value of the sending state value S as a fourth state value if the network monitoring result sent to the display module is that the network equipment cannot access the internet.
Wherein, the second judging unit includes:
and the first judging subunit is used for judging whether the network monitoring result which is sent to the display module at the latest time is that the network equipment can access the internet or not according to the read state value of the sending state value S if the network monitoring result of the polling period is that the network equipment can access the internet. If the first judging subunit reads that the sending state value S is the third state value, it judges that the network monitoring result sent to the display module at the latest time is the internet accessible to the network device, and if the sending state value S is the fourth state value, it judges that the network monitoring result sent to the display module at the latest time is the internet inaccessible to the network device.
Optionally, in a specific embodiment of the present application, the method further includes:
a first reading unit for reading a state value exhibiting a state value I, wherein the state value exhibiting the state value I comprises: and the fifth state value is used for indicating that the network monitoring result currently displayed by the display module is the internet accessible to the network equipment, and the sixth state value is used for indicating that the network monitoring result currently displayed by the display module is the internet inaccessible to the network equipment.
And the first sending subunit is configured to send the network monitoring result of the polling cycle to the display module if the state value of the display state value I is the sixth state value and the network monitoring result sent to the display module at the latest time is judged to be that the network device can access the internet, and display the network monitoring result of the polling cycle to the user by the display module.
Optionally, in a specific embodiment of the present application, the polling period is set by a configuration server.
Optionally, in an embodiment of the present application, if there are a plurality of specified internet domain names, the first sending unit includes:
and the second sending subunit is used for sending the PING service command to the plurality of specified Internet domain names respectively.
Wherein, the first determining unit includes:
and the fourth determining subunit is configured to determine that the network monitoring result of the current polling cycle is that the network device does not have access to the internet if the PING service command cannot be responded by all the specified internet domain names.
The specific principle and the implementation process of each unit in the network monitoring device disclosed in the embodiment of the present application are the same as those of the network monitoring method disclosed in the embodiment of the present application, and reference may be made to corresponding parts in the network monitoring method disclosed in the embodiment of the present application, which are not described herein again.
In the network monitoring apparatus provided in this embodiment of the present application, the first obtaining unit 501 obtains the network speed of the network device in the current polling period, then the first determining unit 502 determines whether the network speed of the current polling period is greater than a preset network speed value, the first sending unit 503 sends a PING service command to the specified internet domain name when the network speed of the polling period is not greater than the preset network speed value, if the PING service command cannot be successfully responded by the specified internet domain name, the first determining unit 504 determines that the network monitoring result of the current polling period is that the network device cannot access the internet, therefore, in this embodiment of the present application, when the network speed of the current polling period is not greater than the preset network speed value and the PING service command cannot be successfully responded by the specified internet domain name, it is determined that the network monitoring result of the current polling period is that the network device cannot access the internet, compared with the prior art that the network monitoring result is determined to be that the network equipment cannot access the internet only by means of unsuccessful response of the PING service command, the method and the device for monitoring the network monitoring result in the current polling period are more accurate when the network monitoring result in the current polling period is determined to be that the network equipment cannot access the internet.
The embodiment of the application discloses a computer readable medium, on which a computer program is stored, wherein the program is executed by a processor to implement the network monitoring method according to any one of the above embodiments.
The embodiment of the application discloses network monitoring equipment, includes: one or more processors, a storage device, having one or more programs stored thereon, which when executed by the one or more processors, cause the one or more processors to implement the network monitoring method as in any of the embodiments described above.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
It is further 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.
Claims (11)
1. A method of network monitoring, comprising:
acquiring the network speed of the network equipment in the current polling period;
judging whether the network speed of the current polling period is greater than a preset network speed value or not;
if the network speed of the current polling period is not greater than the preset network speed value, sending an Internet packet searching (PING) service command to the specified Internet domain name;
and if the PING service command cannot be successfully responded by the specified Internet domain name, determining that the network monitoring result of the current polling period is that the network equipment cannot access the Internet.
2. The method of claim 1, wherein after determining whether the network speed of the current polling period is greater than a preset network speed value, the method further comprises:
if the network speed of the current polling cycle is greater than the preset network speed value, determining that the network monitoring result of the current polling cycle is that the network equipment can access the Internet;
and if the PING service command is successfully responded by the specified Internet domain name, determining that the network monitoring result of the current polling period is that the network equipment can access the Internet.
3. The method of claim 2, wherein before determining whether the network speed of the current polling period is greater than the preset network speed value, the method further comprises:
acquiring a network monitoring result of the last polling period;
if the network monitoring result of the last polling cycle is that the network equipment cannot access the internet, determining a preset first network speed value as the preset network speed value;
if the network monitoring result of the last polling cycle is that the network equipment can access the internet, determining a preset second network speed value as the preset network speed value; and the preset first network speed value is greater than the preset second network speed value.
4. The method of claim 2, wherein after determining the network monitoring result of the current polling period, further comprising:
if the network monitoring result of the current polling cycle is that the network equipment can access the Internet, judging whether the network monitoring result which is sent to the display module at the latest time is that the network equipment can access the Internet or not;
and if the network monitoring result which is sent to the display module at the latest time is that the network equipment cannot access the Internet, sending the network monitoring result of the current polling cycle to the display module in the current polling cycle.
5. The method of claim 4, wherein after determining the network monitoring result of the current polling period, further comprising:
if the network monitoring result of the current polling cycle is that the network equipment cannot access the internet, judging whether the network monitoring result which is sent to the display module at the latest time is that the network equipment cannot access the internet or not;
and if the network monitoring result which is sent to the display module at the latest time is that the network equipment can access the Internet, sending the network monitoring result of the current polling period to the display module in the current polling period.
6. The method of claim 3, wherein after determining the network monitoring result of the current polling period, further comprising:
if the determined network monitoring result of the current polling cycle is that the network equipment can access the Internet, setting the state value of the network monitoring result value m as a first state value;
if the determined network monitoring result of the current polling cycle is that the network equipment cannot access the internet, setting the state value of the network monitoring result value m as a second state value;
the acquiring a network monitoring result of a previous polling cycle includes:
reading a state value of a network monitoring result value m;
if the state value of the network monitoring result value m is read as the first state value, determining that the network monitoring result of the last polling cycle is that the network equipment can access the internet;
and if the state value of the network monitoring result value m is read as the second state value, determining that the network monitoring result of the last polling cycle is that the network equipment cannot access the internet.
7. The method according to claim 4, wherein after sending the network monitoring result of the current polling period to the presentation module, further comprising:
if the network monitoring result sent to the display module indicates that the network equipment can access the internet, setting the state value of the sending state value S as a third state value;
if the network monitoring result sent to the display module is that the network equipment cannot access the internet, setting the state value of the sending state value S as a fourth state value;
wherein, if the network monitoring result of the current polling cycle is that the network device can access the internet, determining whether the network monitoring result sent to the display module at the latest time is that the network device can access the internet, includes:
if the network monitoring result of the current polling cycle is that the network equipment can access the Internet, judging whether the network monitoring result which is sent to the display module at the latest time is that the network equipment can access the Internet according to the read state value of the sending state value S; if the sending state value S is read to be the third state value, judging that the latest network monitoring result sent to the display module is that the network equipment can access the Internet; and if the sending state value S is read to be the fourth state value, judging that the latest network monitoring result sent to the display module is that the network equipment cannot access the Internet.
8. The method according to claim 4, wherein if the network monitoring result of the current polling cycle is that the network device has access to the internet, determining whether the network monitoring result sent to the presentation module last time is that the network device has access to the internet, further comprising:
reading a state value showing a state value I; wherein the state value of the presentation state value I comprises: a fifth state value or a sixth state value; the fifth state value is used for indicating that the network monitoring result currently displayed by the display module is that the network equipment can access the internet; the sixth state value is used for indicating that the network monitoring result currently displayed by the display module is that the network equipment cannot access the internet;
and if the state value of the display state value I is the sixth state value and the latest network monitoring result sent to the display module is judged to be that the network equipment can access the Internet, sending the network monitoring result of the current polling cycle to the display module, and displaying the network monitoring result of the current polling cycle to a user by the display module.
9. A network monitoring device, comprising:
the first acquisition unit is used for acquiring the network speed of the network equipment in the current polling period;
the first judgment unit is used for judging whether the network speed of the current polling period is greater than a preset network speed value or not;
the first detection unit is used for sending an Internet packet searchers PING service command to the specified Internet domain name if the network speed of the current polling period is not larger than the preset network speed value;
and the first determining unit is used for determining that the network monitoring result of the current polling cycle is that the network equipment cannot access the internet if the PING service command cannot be successfully responded by the specified internet domain name.
10. A computer-readable medium, on which a computer program is stored, wherein the program, when executed by a processor, implements the method of any one of claims 1 to 8.
11. A network monitoring device, comprising:
one or more processors;
a storage device having one or more programs stored thereon;
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method of any of claims 1-8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110891141.7A CN113612662A (en) | 2021-08-04 | 2021-08-04 | Network monitoring method, device, readable medium and equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110891141.7A CN113612662A (en) | 2021-08-04 | 2021-08-04 | Network monitoring method, device, readable medium and equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113612662A true CN113612662A (en) | 2021-11-05 |
Family
ID=78306795
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110891141.7A Pending CN113612662A (en) | 2021-08-04 | 2021-08-04 | Network monitoring method, device, readable medium and equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113612662A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114500338A (en) * | 2022-01-26 | 2022-05-13 | 湖南快乐阳光互动娱乐传媒有限公司 | Method and device for detecting networking state and networking equipment |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101013973A (en) * | 2007-02-09 | 2007-08-08 | 华为技术有限公司 | Network element state detecting method and network management equipment |
US7912950B1 (en) * | 2007-07-09 | 2011-03-22 | ByteSphere Technologies, LLC | Adaptive polling facility for network monitoring system |
CN103036622A (en) * | 2011-09-29 | 2013-04-10 | 北京邮电大学 | Cognitive radio spectrum detection method and device based on self-adaption double thresholds |
CN111526529A (en) * | 2020-04-30 | 2020-08-11 | 维沃移动通信有限公司 | Network prompting method and device and electronic equipment |
CN111884879A (en) * | 2020-07-27 | 2020-11-03 | 深圳市元征科技股份有限公司 | Network detection method, device and related equipment |
CN113115345A (en) * | 2021-04-20 | 2021-07-13 | 北京壹思达惟信息技术有限公司 | Single frequency network delay dynamic adjustment method and device |
-
2021
- 2021-08-04 CN CN202110891141.7A patent/CN113612662A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101013973A (en) * | 2007-02-09 | 2007-08-08 | 华为技术有限公司 | Network element state detecting method and network management equipment |
US7912950B1 (en) * | 2007-07-09 | 2011-03-22 | ByteSphere Technologies, LLC | Adaptive polling facility for network monitoring system |
CN103036622A (en) * | 2011-09-29 | 2013-04-10 | 北京邮电大学 | Cognitive radio spectrum detection method and device based on self-adaption double thresholds |
CN111526529A (en) * | 2020-04-30 | 2020-08-11 | 维沃移动通信有限公司 | Network prompting method and device and electronic equipment |
CN111884879A (en) * | 2020-07-27 | 2020-11-03 | 深圳市元征科技股份有限公司 | Network detection method, device and related equipment |
CN113115345A (en) * | 2021-04-20 | 2021-07-13 | 北京壹思达惟信息技术有限公司 | Single frequency network delay dynamic adjustment method and device |
Non-Patent Citations (1)
Title |
---|
邢永红: "快速查找网速变慢的原因及解决办法", 《福建电脑》 * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114500338A (en) * | 2022-01-26 | 2022-05-13 | 湖南快乐阳光互动娱乐传媒有限公司 | Method and device for detecting networking state and networking equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11012339B2 (en) | Web site reachability management for content browsing | |
CN113472607B (en) | Application program network environment detection method, device, equipment and storage medium | |
CN111159269B (en) | Data processing method, device and system | |
CN112685211B (en) | Error information display method and device, electronic equipment and medium | |
CN105373460A (en) | Monitoring message alarming method and system | |
CN105045714A (en) | Method and device for testing starting duration of application software and terminal | |
CN111464376A (en) | Website availability monitoring method and device, storage medium and computer equipment | |
CN105323121A (en) | Network condition detection method and device | |
CN111782621B (en) | Business application log processing method and device | |
CN113612662A (en) | Network monitoring method, device, readable medium and equipment | |
CN113868058A (en) | Peripheral component high-speed interconnection equipment fault detection method and device and server | |
CN111431952B (en) | Message pushing method, device and system, computer storage medium and electronic equipment | |
CN114221988A (en) | Content distribution network hotspot analysis method and system | |
CN102684925A (en) | Method and device for acquiring internet access source information | |
CN113157504A (en) | Touch screen equipment testing method and touch screen equipment testing system | |
CN103731315A (en) | Server failure detecting method | |
CN103942206B (en) | Access network picture, the response method of access request and its device, system | |
CN106708705B (en) | Terminal background process monitoring method and system | |
CN114666390B (en) | Page monitoring method and device of application program, electronic equipment and storage medium | |
CN115361378A (en) | Test environment file searching method and system and computer equipment | |
WO2012047185A1 (en) | Systems and methods for gateway status information handling | |
CN114422396A (en) | DNS server management method and device, electronic equipment and storage medium | |
CN112202784B (en) | Anti-crawler method and device and storage medium | |
CN106611010B (en) | Method and device for determining webpage loading speed | |
CN114143219A (en) | Network monitoring method, device, medium and equipment of B/S system architecture |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20211105 |