CN107231647B - Network detecting method, network detection device and intelligent terminal - Google Patents

Network detecting method, network detection device and intelligent terminal Download PDF

Info

Publication number
CN107231647B
CN107231647B CN201710655791.5A CN201710655791A CN107231647B CN 107231647 B CN107231647 B CN 107231647B CN 201710655791 A CN201710655791 A CN 201710655791A CN 107231647 B CN107231647 B CN 107231647B
Authority
CN
China
Prior art keywords
intelligent terminal
transmitting
state
network
reiving
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710655791.5A
Other languages
Chinese (zh)
Other versions
CN107231647A (en
Inventor
刘铭
胡亚东
候祥
宋永耀
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201710655791.5A priority Critical patent/CN107231647B/en
Publication of CN107231647A publication Critical patent/CN107231647A/en
Application granted granted Critical
Publication of CN107231647B publication Critical patent/CN107231647B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • H04L43/0811Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking connectivity
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/02Arrangements for optimising operational condition

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The present invention provides a kind of network detecting method, network detection device, intelligent terminal and computer readable storage mediums, the network detecting method includes: under the connected state of intelligent terminal, and periodic triggers detect the TCP of intelligent terminal and obtain the reiving/transmitting state of TCP data packet;If the continuous N1 above-mentioned reiving/transmitting state got is that TCP data pack receiving and transmitting is normal, network detection is carried out to intelligent terminal based on HTTP, obtains http testing result;If the reiving/transmitting state got is that TCP data pack receiving and transmitting is normal and http testing result indicates network-in-dialing, it is determined that intelligent terminal, which is currently at, can go up net state;When determine intelligent terminal be currently at can go up net state when, export preset surf the Internet indicate information.Technical solution provided by the invention can be improved the accuracy of network detection, and inform the network state of the current connected network of user in time.

Description

Network detecting method, network detection device and intelligent terminal
Technical field
The invention belongs to net application technology field more particularly to a kind of network detecting methods, network detection device, intelligence Terminal and computer readable storage medium.
Background technique
With the fast development of mechanics of communication, wireless network, especially WLAN (WLAN, Wireless Local Area Net) various aspects are all widely applied in life.Since WLAN does not need to be routed, and transmission speed Comparatively fast, it is thus possible to make up the deficiency of limited local area network well.And current almost all of intelligent terminal is all supported to pass through nothing Line fidelity (WiFi, Wireless Fidelity) accesses the hot spot (i.e. Hotspot) of WLAN to realize function of surfing the Net.
However, in the case where having connected network, often will appear due to the online etc. in limited time of network congestion or network The case where page accessed is not opened for a long time needs user to carry out a variety of online and attempts (such as to attempt to brush in this case The new or other links of access) just it is capable of determining whether that network goes wrong, waste the time of user.
Summary of the invention
It can in view of this, the present invention provides a kind of network detecting method, network detection device, intelligent terminal and computers Read storage medium, it is intended to improve the accuracy of network detection, and inform the network state of the current connected network of user in time.
The first aspect of the embodiment of the present invention provides a kind of network detecting method, comprising:
Under the connected state of intelligent terminal, periodic triggers detect the TCP of the intelligent terminal and obtain TCP data The reiving/transmitting state of packet, wherein the connected state is to have connected the state of wireless network, and the TCP refers to transmission control protocol, institute The reiving/transmitting state for stating TCP data packet is divided into the following two kinds: TCP data pack receiving and transmitting is normal and TCP data pack receiving and transmitting is abnormal;
If the continuous N1 reiving/transmitting state got is that TCP data pack receiving and transmitting is normal, it is based on Hyper text transfer Agreement carries out network detection to the intelligent terminal, obtains http testing result, wherein the http testing result indicates network It is not connected to or network-in-dialing, wherein the N1 is the natural number not less than 1;
If the continuous N2 times reiving/transmitting state got is that TCP data pack receiving and transmitting is normal and the http testing result Indicate network-in-dialing, it is determined that the intelligent terminal, which is currently at, can go up net state, wherein the N2 is greater than N1;
When determine the intelligent terminal be currently at can go up net state when, export preset surf the Internet indicate information, with refer to Net state can be gone up by showing that the intelligent terminal is currently at.
Based on first aspect present invention, in the first possible implementation, the preset instruction of surfing the Internet of output Information, comprising:
It can surf the Internet described in display in the status bar of the intelligent terminal and indicate information.
The first possible implementation based on first aspect present invention, in the second possible implementation, institute If stating the continuous N1 reiving/transmitting state got is that TCP data pack receiving and transmitting is normal, it is based on hypertext transfer protocol pair The intelligent terminal carries out network detection, are as follows:
If the continuous N1 reiving/transmitting state got is that TCP data pack receiving and transmitting is normal, and the intelligent terminal is worked as It does not show that described can surf the Internet indicates information in preceding status bar, then net is carried out to the intelligent terminal based on hypertext transfer protocol Network detection;
If the continuous N1 reiving/transmitting state got is that TCP data pack receiving and transmitting is normal, and the intelligent terminal is worked as Described can surf the Internet has been displayed in preceding status bar and indicates information, it is determined that the intelligent terminal, which is currently at, can go up net state.
The first possible implementation or this hair based on first aspect present invention perhaps first aspect present invention The possible implementation of second of bright first aspect, in the third possible implementation, if get for continuous N1 times The reiving/transmitting state is that TCP data pack receiving and transmitting is normal, then the network detecting method further include:
The reiving/transmitting state of TCP data packet is detected and obtained to the TCP of the intelligent terminal with preset another period triggering, To improve the frequency of the reiving/transmitting state of TCP detection and acquisition TCP data packet.
The first possible implementation or this hair based on first aspect present invention perhaps first aspect present invention The possible implementation of second of bright first aspect, it is in the fourth possible implementation, described to be based on Hyper text transfer Agreement carries out network detection to the intelligent terminal, obtains http testing result, comprising:
Hypertext transfer protocol connection request is sent respectively to preset N number of server;
It is successfully established when based on the hypertext transfer protocol connection request and any server in N number of server When connection, determine that the http testing result is network-in-dialing;
It can not succeed with any server in N number of server when based on the hypertext transfer protocol connection request When establishing connection, determine that the http testing result is that network is not connected to.
The second aspect of the embodiment of the present invention provides a kind of network detection device, comprising: acquiring unit, in intelligence Under the connected state of terminal, periodic triggers detect to the TCP of the intelligent terminal and obtain the reiving/transmitting state of TCP data packet, Wherein, the connected state is to have connected the state of wireless network, and the TCP refers to transmission control protocol, the TCP data packet Reiving/transmitting state is divided into the following two kinds: TCP data pack receiving and transmitting is normal and TCP data pack receiving and transmitting is abnormal;
Http detection unit, for being TCP number when the acquiring unit continuous N1 times reiving/transmitting state got When normal according to pack receiving and transmitting, network detection is carried out to the intelligent terminal based on hypertext transfer protocol, obtains http testing result, Wherein, http testing result instruction network is not connected to or network-in-dialing, wherein the N1 is the natural number not less than 1;
Determination unit, for being TCP data packet when the acquiring unit continuous N2 times reiving/transmitting state got When receiving and dispatching the http testing result instruction network-in-dialing that the normal and described http detection unit obtains, the intelligence is determined eventually End, which is currently at, can go up net state, wherein the N2 is greater than N1;
Network state indicating unit, for net state can be gone up when the determination unit determines that the intelligent terminal is currently at When, it exports preset surf the Internet and indicates information, net state can be gone up to indicate that the intelligent terminal is currently at.
Based on second aspect of the present invention, in the first possible implementation, the network state indicating unit is specific For: when the determination unit determine the intelligent terminal be currently at can go up net state when, in the state of the intelligent terminal It can surf the Internet described in display in column and indicate information.
The first possible implementation based on second aspect of the present invention, in the second possible implementation, institute It states http detection unit to be specifically used for: when the reiving/transmitting state that the acquiring unit continuous N1 times gets is TCP data Pack receiving and transmitting is normal, and do not shown in the current status bar of the intelligent terminal it is described can surf the Internet when indicating information, be based on hypertext Transport protocol carries out network detection to the intelligent terminal;
The determination unit is also used to: when the reiving/transmitting state that the acquiring unit continuous N1 times gets is TCP Data pack receiving and transmitting is normal, and had been displayed in the current status bar of the intelligent terminal it is described can surf the Internet when indicating information, determine institute Net state can be gone up by stating intelligent terminal and being currently at.
Third aspect present invention provides a kind of intelligent terminal, including memory, and processor and storage are on a memory and can The computer program run on a processor, above-mentioned processor realized when executing above-mentioned computer program above-mentioned first aspect or The network detecting method referred in any possible implementation of above-mentioned first aspect.
Fourth aspect present invention provides a kind of computer readable storage medium, is stored on the computer readable storage medium Computer program, above-mentioned computer program realize any of above-mentioned first aspect or above-mentioned first aspect when being executed by processor The network detecting method referred in possible implementation.
Therefore in the present invention program, under the connected state of intelligent terminal, periodic triggers are to the intelligent terminal TCP detect and obtain the reiving/transmitting state of TCP data packet, and the above-mentioned reiving/transmitting state got at continuous N1 times is TCP number When normal according to pack receiving and transmitting, network detection is carried out to the intelligent terminal based on hypertext transfer protocol, obtains http testing result, When the above-mentioned reiving/transmitting state continuously acquired is normal TCP data pack receiving and transmitting and http testing result instruction network-in-dialing, Net state can be gone up by determining that the intelligent terminal is currently at.By combining TCP detection mode and based on the net of hypertext transfer protocol Network detection mode can improve network inspection to avoid the situation for leading to testing result inaccuracy using single network detection mode The accuracy of survey, in addition, the present invention determine the intelligent terminal be currently at can go up net state when, export preset surf the Internet refer to Show information, so that user can be with the network state of the current connected network of timely learning.
Detailed description of the invention
It to describe the technical solutions in the embodiments of the present invention more clearly, below will be to embodiment or description of the prior art Needed in attached drawing be briefly described, it should be apparent that, the accompanying drawings in the following description is only of the invention some Embodiment for those of ordinary skill in the art without any creative labor, can also be according to these Attached drawing obtains other attached drawings.
Fig. 1 is network detecting method one embodiment flow diagram provided by the invention;
Fig. 2 is another embodiment flow diagram of network detecting method provided by the invention;
Fig. 3 is network detection device one embodiment structural schematic diagram provided by the invention;
Fig. 4 is intelligent terminal one embodiment structural schematic diagram provided by the invention.
Specific embodiment
In being described below, for illustration and not for limitation, the tool of such as particular system structure, technology etc is proposed Body details, to understand thoroughly the embodiment of the present invention.However, it will be clear to one skilled in the art that there is no these specific The present invention also may be implemented in the other embodiments of details.In other situations, it omits to well-known system, device, electricity The detailed description of road and method, in case unnecessary details interferes description of the invention.
It should be understood that the size of the serial number of each step is not meant that the order of the execution order in following methods embodiment, respectively The execution sequence of process should be determined by its function and internal logic, and the implementation process without coping with each embodiment constitutes any limit It is fixed.
In order to illustrate technical solutions according to the invention, the following is a description of specific embodiments.
Embodiment one
The embodiment of the present invention provides a kind of network detecting method, referring to Fig. 1, the network detection side in the embodiment of the present invention Method includes:
Step 101, under the connected state of intelligent terminal, periodic triggers are detected and are obtained to the TCP of above-mentioned intelligent terminal Take the reiving/transmitting state of TCP data packet;
In the embodiment of the present invention, above-mentioned connected state is to have connected the state of wireless network.Above-mentioned TCP is to pass transport control protocol View (i.e. Transmission Control Protocol) is write a Chinese character in simplified form.
In the embodiment of the present invention, above-mentioned TCP detection is also referred to as TCP test in some scenarios.Above-mentioned triggering is to above-mentioned The TCP detection of intelligent terminal may include following process: triggering above-mentioned intelligent terminal and sends TCP data packet and capture the TCP of return Data packet.The reiving/transmitting state of above-mentioned TCP data packet is divided into the following two kinds: TCP data pack receiving and transmitting is normal and TCP data pack receiving and transmitting is different Often.Wherein, TCP data pack receiving and transmitting is just referring to the TCP number that can receive return within a preset time after issuing TCP data packet According to packet, TCP data pack receiving and transmitting refers to the TCP data that can not receive return within a preset time after issuing TCP data packet extremely Packet.
Specifically, TCP detection process is referred to prior art realization, details are not described herein again.
If step 102, the continuous N1 above-mentioned reiving/transmitting state got are that TCP data pack receiving and transmitting is normal, based on super Text transfer protocol (HTTP, HyperText Transfer Protocol) carries out network detection to above-mentioned intelligent terminal, obtains Http testing result;
Wherein, above-mentioned http testing result instruction network is not connected to or network-in-dialing, wherein above-mentioned N1 is not less than 1 Natural number.In the embodiment of the present invention, when the above-mentioned reiving/transmitting state that continuous N1 times gets is that TCP data pack receiving and transmitting is normal, HTTP detection is triggered, namely network detection is carried out to above-mentioned intelligent terminal based on HTTP.
Optionally, it carries out network to above-mentioned intelligent terminal to detect including: to preset n based on HTTP in step 102 Server sends HTTP connection request respectively;If above-mentioned intelligent terminal is based on above-mentioned HTTP connection request and above-mentioned n server In any server be successfully established connection, it is determined that when secondary http testing result be network-in-dialing;If above-mentioned intelligent terminal It can not be successfully established and be connect with any server in above-mentioned N number of server based on above-mentioned HTTP connection request, it is determined that when secondary Http testing result be network be not connected to.Wherein, above-mentioned n is the natural number not less than 2.Further, it is possible to create n line Journey, and the n thread parallel based on creation sends HTTP connection request to n server respectively, to improve detection efficiency.
Certainly, in the embodiment of the present invention, being detected based on HTTP to above-mentioned intelligent terminal progress network in step 102 can also Think and only initiates HTTP connection request to carry out HTTP detection, herein without limitation to single server.
Optionally, when the above-mentioned reiving/transmitting state got when continuous N1 times is that TCP data pack receiving and transmitting is normal, with preset The triggering of another period detect to the TCP of above-mentioned intelligent terminal and obtains the reiving/transmitting state of TCP data packet, with improve TCP detect and Obtain the frequency of the reiving/transmitting state of TCP data packet.That is, when the continuous N1 times above-mentioned reiving/transmitting state got is TCP data When pack receiving and transmitting is normal, shortens in step 101 and " trigger the transmitting-receiving shape that TCP data packet is detected and obtained to the TCP of above-mentioned intelligent terminal It is the execution period of state " This move, a so that (N2-N1) can be obtained again in the neighbouring period for obtaining http testing result The reiving/transmitting state of TCP data packet.For example, if original step 101 triggering detects the TCP of above-mentioned intelligent terminal and obtains TCP number According to packet reiving/transmitting state period be 5 seconds, then the above-mentioned reiving/transmitting state got when continuous N1 times be TCP data pack receiving and transmitting just Chang Shi then can be detected to the TCP of above-mentioned intelligent terminal and be obtained the reiving/transmitting state of TCP data packet with period triggering in 2 seconds.
If step 103, the above-mentioned reiving/transmitting state got for continuous N2 times are that TCP data pack receiving and transmitting is normal and above-mentioned http Testing result indicates network-in-dialing, it is determined that above-mentioned intelligent terminal, which is currently at, can go up net state;
In the embodiment of the present invention, above-mentioned N2 is greater than N1.
It should be noted that if the continuous N2 times above-mentioned reiving/transmitting state got is that TCP data pack receiving and transmitting is normal, and this Shi Wei obtains above-mentioned http testing result (such as also in HTTP detection), then after may wait for http testing result acquisition, Judge whether the http testing result obtained indicates network-in-dialing, if the http testing result obtained indicates network-in-dialing, really Fixed above-mentioned intelligent terminal, which is currently at, can go up net state.Further, it if http testing result instruction network is not connected to, can incite somebody to action The statistical number of above-mentioned reiving/transmitting state is reset, and returns to step 101 later, is triggered according to the initial period to above-mentioned intelligent terminal TCP detect and obtain the reiving/transmitting state of TCP data packet, further exportable preset can not surf the Internet indicates information, with instruction The intelligent terminal be currently at can not go up net state (such as can be shown in the status bar of above-mentioned intelligent terminal it is above-mentioned can not on Net instruction information).Alternatively, if the http testing result indicates network-in-dialing, being monitored after obtaining above-mentioned http testing result Whether (N2-N1) a reiving/transmitting state has been obtained again after triggering HTTP detection, if not obtaining (N2-N1) a reiving/transmitting state, etc. To which if obtaining (N2-N1) a reiving/transmitting state again, the above-mentioned reiving/transmitting state for judging whether that continuous N2 times gets is TCP Data pack receiving and transmitting is normal, if judging, the above-mentioned reiving/transmitting state that continuous N2 times gets is that TCP data pack receiving and transmitting is normal, it is determined that Above-mentioned intelligent terminal, which is currently at, can go up net state.When http testing result instruction network is not connected to, or judge not connect When the continuous N2 above-mentioned reiving/transmitting state got is that TCP data pack receiving and transmitting is normal, the statistical number of reiving/transmitting state can be reset, it After return to step 101, the TCP of above-mentioned intelligent terminal is detected according to initial period triggering and obtains TCP data packet Reiving/transmitting state, further exportable preset can not surf the Internet indicate information, with indicate the intelligent terminal be currently at can not on Net state (such as can show that above-mentioned can not surf the Internet indicates information in the status bar of above-mentioned intelligent terminal).
Step 104, when determine above-mentioned intelligent terminal be currently at can go up net state when, export it is preset surf the Internet instruction letter Breath, can go up net state to indicate that above-mentioned intelligent terminal is currently at;
In the embodiment of the present invention, in order to enable user is capable of the network of current the networked network of the above-mentioned intelligent terminal of timely learning State, when determine every time above-mentioned intelligent terminal be currently at can go up net state when, export preset surf the Internet indicate information so that Obtaining user can be with the real-time network state of the above-mentioned intelligent terminal of timely learning.
In a kind of application scenarios, step 104 may include: that can go up net state when determining above-mentioned intelligent terminal is currently at When, show that above-mentioned surf the Internet indicates that (above-mentioned surf the Internet indicates that information for example can be with to information in the status bar of above-mentioned intelligent terminal For preset label of surfing the Internet), so as to user view this can surf the Internet indicate information when, would know that the intelligent terminal is currently located In net state can be gone up.Specifically, net state can be gone up when determining that above-mentioned intelligent terminal is currently at, and the state of above-mentioned intelligent terminal It can not be surfed the Internet when indicating information in column, show that above-mentioned surf the Internet indicates information in the status bar of above-mentioned intelligent terminal;Work as determination Above-mentioned intelligent terminal, which is currently at, can go up net state, and has been displayed to surf the Internet in the status bar of above-mentioned intelligent terminal and indicate information When, keep above-mentioned surf the Internet to indicate the display of information in the status bar of above-mentioned intelligent terminal.
Further, the network detecting method in the embodiment of the present invention can also include: the result for recording each network detection (such as statistical conditions and/or above-mentioned http testing result of above-mentioned reiving/transmitting state), should to facilitate user or technical staff to call The result of network detection carries out analysis or other application.
It should be noted that the network detecting method in the embodiment of the present invention can be applied in network detection device, it is above-mentioned Network detection device can be independent equipment, or also can integrate in intelligent terminal (such as mobile phone, tablet computer etc.) or In other equipment, it is not construed as limiting herein.
Therefore in the present invention program, under the connected state of intelligent terminal, periodic triggers are to the intelligent terminal TCP detect and obtain the reiving/transmitting state of TCP data packet, and the above-mentioned reiving/transmitting state got at continuous N1 times is TCP number When normal according to pack receiving and transmitting, network detection is carried out to the intelligent terminal based on hypertext transfer protocol, obtains http testing result, When the above-mentioned reiving/transmitting state continuously acquired is normal TCP data pack receiving and transmitting and http testing result instruction network-in-dialing, Net state can be gone up by determining that the intelligent terminal is currently at.By combining TCP detection mode and based on the net of hypertext transfer protocol Network detection mode can improve network inspection to avoid the situation for leading to testing result inaccuracy using single network detection mode The accuracy of survey, in addition, the present invention determine the intelligent terminal be currently at can go up net state when, export preset surf the Internet refer to Show information, so that user can be with the network state of the current connected network of timely learning.
Embodiment two
The difference of the embodiment of the present invention and embodiment one is, the receipts that the embodiment of the present invention is got at continuous N1 times Hair-like state is that TCP data pack receiving and transmitting is normal, and does not show to surf the Internet in the status bar of intelligent terminal and indicate information intelligent terminal Connected state under, ability further progress HTTP detection, a possibility that reduce erroneous judgement.As shown in Fig. 2, in the embodiment of the present invention Network detecting method include:
Step 201, under the connected state of intelligent terminal, periodic triggers are detected and are obtained to the TCP of above-mentioned intelligent terminal Take the reiving/transmitting state of TCP data packet;
In the embodiment of the present invention, above-mentioned connected state is to have connected the state of wireless network.Above-mentioned TCP is to pass transport control protocol View (i.e. Transmission Control Protocol) is write a Chinese character in simplified form.
In the embodiment of the present invention, above-mentioned TCP detection is also referred to as TCP test in some scenarios.Above-mentioned triggering is to above-mentioned The TCP detection of intelligent terminal may include following process: triggering above-mentioned intelligent terminal and sends TCP data packet and capture the TCP of return Data packet.The reiving/transmitting state of above-mentioned TCP data packet is divided into the following two kinds: TCP data pack receiving and transmitting is normal and TCP data pack receiving and transmitting is different Often.Wherein, TCP data pack receiving and transmitting is just referring to the TCP number that can receive return within a preset time after issuing TCP data packet According to packet, TCP data pack receiving and transmitting refers to the TCP data that can not receive return within a preset time after issuing TCP data packet extremely Packet.
Specifically, TCP detection process is referred to prior art realization, details are not described herein again.
If step 202, the above-mentioned reiving/transmitting state got for continuous N1 times are that TCP data pack receiving and transmitting is normal, and above-mentioned intelligence It can not show that above-mentioned surf the Internet indicates information in the current status bar of terminal, then network be carried out to above-mentioned intelligent terminal based on HTTP Detection, obtains http testing result;
Wherein, above-mentioned http testing result instruction network is not connected to or network-in-dialing, wherein above-mentioned N1 is not less than 1 Natural number.In the embodiment of the present invention, the above-mentioned reiving/transmitting state got when continuous N1 times is that TCP data pack receiving and transmitting is normal, and Do not show that above-mentioned surf the Internet indicates information in the current status bar of above-mentioned intelligent terminal, in order to reduce the probability of erroneous judgement, at this time into One step triggers HTTP detection, namely carries out network detection to above-mentioned intelligent terminal based on HTTP.
Optionally, it carries out network to above-mentioned intelligent terminal to detect including: to preset n based on HTTP in step 202 Server sends HTTP connection request respectively;If above-mentioned intelligent terminal is based on above-mentioned HTTP connection request and above-mentioned n server In any server be successfully established connection, it is determined that when secondary http testing result be network-in-dialing;If above-mentioned intelligent terminal It can not be successfully established and be connect with any server in above-mentioned N number of server based on above-mentioned HTTP connection request, it is determined that when secondary Http testing result be network be not connected to.Wherein, above-mentioned n is the natural number not less than 2.Further, it is possible to create n line Journey, and the n thread parallel based on creation sends HTTP connection request to n server respectively, to improve detection efficiency.
Certainly, in the embodiment of the present invention, being detected based on HTTP to above-mentioned intelligent terminal progress network in step 202 can also Think and only initiates HTTP connection request to carry out HTTP detection, herein without limitation to single server.
Optionally, when the above-mentioned reiving/transmitting state got when continuous N1 times is that TCP data pack receiving and transmitting is normal, with preset The triggering of another period detect to the TCP of above-mentioned intelligent terminal and obtains the reiving/transmitting state of TCP data packet, with improve TCP detect and Obtain the frequency of the reiving/transmitting state of TCP data packet.Alternatively, when the continuous N1 times above-mentioned reiving/transmitting state got is TCP data Do not shown in the status bar that pack receiving and transmitting is normal and above-mentioned intelligent terminal is current it is above-mentioned surf the Internet when indicating information, with preset another Period triggers the reiving/transmitting state that TCP data packet is detected and obtained to the TCP of above-mentioned intelligent terminal, to improve TCP detection and obtain The frequency of the reiving/transmitting state of TCP data packet.Above-mentioned raising TCP detection and obtain TCP data packet reiving/transmitting state frequency namely Shorten in step 201 " reiving/transmitting state that triggering detected to the TCP of above-mentioned intelligent terminal and obtained TCP data packet " This move Execute the period.
If step 203, the above-mentioned reiving/transmitting state got for continuous N1 times are that TCP data pack receiving and transmitting is normal, and above-mentioned intelligence Above-mentioned surf the Internet has been displayed in the current status bar of energy terminal and indicates information, it is determined that current above-mentioned intelligent terminal is currently at can Upper net state;
In the embodiment of the present invention, the first network testing result determined when continuous N1 times indicates network-in-dialing, and on It states and above-mentioned surf the Internet has been displayed in the current status bar of intelligent terminal indicates information, then above-mentioned intelligent terminal has been in front of showing Net state can be gone up, the process of HTTP detection can be skipped at this time, current above-mentioned intelligent terminal is directly determined and is currently at and can surf the Internet State.
If step 204, the above-mentioned reiving/transmitting state got for continuous N2 times are that TCP data pack receiving and transmitting is normal and above-mentioned http Testing result indicates network-in-dialing, it is determined that above-mentioned intelligent terminal, which is currently at, can go up net state;
In the embodiment of the present invention, above-mentioned N2 is greater than N1.
It should be noted that if the continuous N2 times above-mentioned reiving/transmitting state got is that TCP data pack receiving and transmitting is normal, and this Shi Wei obtains above-mentioned http testing result (such as also in HTTP detection), then after may wait for http testing result acquisition, Judge whether the http testing result obtained indicates network-in-dialing, if the http testing result obtained indicates network-in-dialing, really Fixed above-mentioned intelligent terminal, which is currently at, can go up net state.Further, it if http testing result instruction network is not connected to, can incite somebody to action The statistical number of above-mentioned reiving/transmitting state is reset, and returns to step 201 later, is triggered according to the initial period to above-mentioned intelligent terminal TCP detect and obtain the reiving/transmitting state of TCP data packet, further exportable preset can not surf the Internet indicates information, with instruction The intelligent terminal be currently at can not go up net state (such as can be shown in the status bar of above-mentioned intelligent terminal it is above-mentioned can not on Net instruction information).Alternatively, if the http testing result indicates network-in-dialing, being monitored after obtaining above-mentioned http testing result (N2-N1) a first network testing result whether has been obtained again after triggering HTTP detection, if not obtaining (N2-N1) a transmitting-receiving shape State then waits, if obtaining (N2-N1) a reiving/transmitting state again, judges whether the continuous N2 times above-mentioned reiving/transmitting state got Be that TCP data pack receiving and transmitting is normal, if judge the above-mentioned reiving/transmitting state that continuous N2 times gets be TCP data pack receiving and transmitting just Often, it is determined that above-mentioned intelligent terminal, which is currently at, can go up net state.When http testing result instruction network is not connected to, or sentence It is disconnected go out the not continuous N2 times above-mentioned reiving/transmitting state got when being that TCP data pack receiving and transmitting is normal, reiving/transmitting state can be reset, it After return to step 201, the TCP of above-mentioned intelligent terminal is detected according to initial period triggering and obtains TCP data packet Reiving/transmitting state, further exportable preset can not surf the Internet indicate information, with indicate the intelligent terminal be currently at can not on Net state (such as can show that above-mentioned can not surf the Internet indicates information in the status bar of above-mentioned intelligent terminal).
Step 205, when determine above-mentioned intelligent terminal be currently at can go up net state when, in the status bar of above-mentioned intelligent terminal Above-mentioned surf the Internet of middle display indicates information;
In the embodiment of the present invention, in order to enable user is capable of the network of current the networked network of the above-mentioned intelligent terminal of timely learning State, when determine every time above-mentioned intelligent terminal be currently at can go up net state when, export preset surf the Internet indicate information so that Obtaining user can be with the real-time network state of the above-mentioned intelligent terminal of timely learning.
Specifically, net state can be gone up when determining that above-mentioned intelligent terminal is currently at, and in the status bar of above-mentioned intelligent terminal It can not surf the Internet when indicating information, show that above-mentioned surf the Internet indicates information in the status bar of above-mentioned intelligent terminal;It is above-mentioned when determining Intelligent terminal, which is currently at, can go up net state, and has been displayed and can be surfed the Internet when indicating information in the status bar of above-mentioned intelligent terminal, Above-mentioned surf the Internet is kept to indicate the display of information in the status bar of above-mentioned intelligent terminal.
Further, the network detecting method in the embodiment of the present invention can also include: the result for recording each network detection (such as statistical conditions and/or above-mentioned http testing result of above-mentioned reiving/transmitting state), should to facilitate user or technical staff to call The result of network detection carries out analysis or other application.
It should be noted that the network detecting method in the embodiment of the present invention can be applied in network detection device, it is above-mentioned Network detection device can be independent equipment, or also can integrate in intelligent terminal (such as mobile phone, tablet computer etc.) or In other equipment, it is not construed as limiting herein.
Therefore in the present invention program, under the connected state of intelligent terminal, periodic triggers are to the intelligent terminal TCP detect and obtain the reiving/transmitting state of TCP data packet, and the above-mentioned reiving/transmitting state got at continuous N1 times is TCP number When normal according to pack receiving and transmitting, network detection is carried out to the intelligent terminal based on hypertext transfer protocol, obtains http testing result, When the above-mentioned reiving/transmitting state continuously acquired is normal TCP data pack receiving and transmitting and http testing result instruction network-in-dialing, Net state can be gone up by determining that the intelligent terminal is currently at.By combining TCP detection mode and based on the net of hypertext transfer protocol Network detection mode can improve network inspection to avoid the situation for leading to testing result inaccuracy using single network detection mode The accuracy of survey, in addition, the present invention determine the intelligent terminal be currently at can go up net state when, export preset surf the Internet refer to Show information, so that user can be with the network state of the current connected network of timely learning.In addition, the embodiment of the present invention is continuous The above-mentioned reiving/transmitting state got for N1 times is that TCP data pack receiving and transmitting is normal, and do not shown in the status bar of intelligent terminal can on Under the connected state of net instruction information intelligent terminal, on the one hand ability further progress HTTP detection can reduce mistake under the scene A possibility that sentencing, another aspect, which can also have been displayed surf the Internet in the status bar of intelligent terminal, indicates that information skips HTTP inspection It surveys, improves detection efficiency.
Embodiment three
The embodiment of the present invention also provides a kind of network detection device, as shown in figure 3, the network in the embodiment of the present invention detects Device 300 includes:
Acquiring unit 301, under the connected state of intelligent terminal, TCP of the periodic triggers to above-mentioned intelligent terminal Detect and obtain the reiving/transmitting state of TCP data packet, wherein above-mentioned connected state is to have connected the state of wireless network, above-mentioned TCP Refer to transmission control protocol, the reiving/transmitting state of above-mentioned TCP data packet is divided into the following two kinds: TCP data pack receiving and transmitting is normal and TCP data Pack receiving and transmitting is abnormal;
Http detection unit 302, for being TCP when the continuous N1 times above-mentioned reiving/transmitting state got of acquiring unit 301 Data pack receiving and transmitting is normal, carries out network detection to above-mentioned intelligent terminal based on hypertext transfer protocol, obtains http testing result, Wherein, above-mentioned http testing result instruction network is not connected to or network-in-dialing, wherein the N1 is the natural number not less than 1;
Determination unit 303, for being TCP data when the continuous N2 times above-mentioned reiving/transmitting state got of acquiring unit 301 Pack receiving and transmitting is normal, and http detection unit 302 obtain above-mentioned http testing result instruction network-in-dialing when, determine above-mentioned intelligence Terminal, which is currently at, can go up net state, wherein above-mentioned N2 is greater than N1;
Network state indicating unit 304, for when determination unit 303 determine above-mentioned intelligent terminal be currently at can go up it is netted When state, exports preset surf the Internet and indicate information, net state can be gone up to indicate that above-mentioned intelligent terminal is currently at.
Optionally, network state indicating unit 304 is specifically used for: when determination unit 303 determines that above-mentioned intelligent terminal is current In when can go up net state, show that above-mentioned surf the Internet indicates information in the status bar of above-mentioned intelligent terminal.
Optionally, http detection unit 302 is specifically used for: when the continuous N1 times above-mentioned transmitting-receiving got of acquiring unit 301 State is that TCP data pack receiving and transmitting is normal, and does not show above-mentioned instruction letter of surfing the Internet in the current status bar of above-mentioned intelligent terminal When breath, network detection is carried out to above-mentioned intelligent terminal based on HTTP;Determination unit 303 is also used to: as the continuous N1 of acquiring unit 301 The secondary above-mentioned reiving/transmitting state got is that TCP data pack receiving and transmitting is normal, and has shown in the current status bar of above-mentioned intelligent terminal Show it is above-mentioned surf the Internet when indicating information, net state can be gone up by determining that above-mentioned intelligent terminal is currently at.
Optionally, acquiring unit 301 is also used to: the reiving/transmitting state got when continuous N1 times is TCP data packet When receiving and dispatching normal, the transmitting-receiving shape of TCP data packet is detected and obtained to the TCP of the intelligent terminal with preset another period triggering State, to improve the frequency of the reiving/transmitting state of TCP detection and acquisition TCP data packet.
Optionally, http detection unit 302 is specifically used for: when the continuous N1 times transmitting-receiving got of acquiring unit 301 When state is that TCP data pack receiving and transmitting is normal, HTTP connection request is sent respectively to preset N number of server;When based on above-mentioned When any server in HTTP connection request and above-mentioned N number of server is successfully established connection, above-mentioned http testing result is determined For network-in-dialing;When based on above-mentioned HTTP connection request company can not be successfully established with any server in above-mentioned N number of server When connecing, determine that above-mentioned http testing result is that network is not connected to.
It should be noted that the network detection device in the embodiment of the present invention can be independent equipment, or can also be with It is integrated in intelligent terminal (such as mobile phone, tablet computer etc.) or other equipment, is not construed as limiting herein.
Therefore in the present invention program, under the connected state of intelligent terminal, periodic triggers are to the intelligent terminal TCP detect and obtain the reiving/transmitting state of TCP data packet, and the above-mentioned reiving/transmitting state got at continuous N1 times is TCP number When normal according to pack receiving and transmitting, network detection is carried out to the intelligent terminal based on hypertext transfer protocol, obtains http testing result, When the above-mentioned reiving/transmitting state continuously acquired is normal TCP data pack receiving and transmitting and http testing result instruction network-in-dialing, Net state can be gone up by determining that the intelligent terminal is currently at.By combining TCP detection mode and based on the net of hypertext transfer protocol Network detection mode can improve network inspection to avoid the situation for leading to testing result inaccuracy using single network detection mode The accuracy of survey, in addition, the present invention determine the intelligent terminal be currently at can go up net state when, export preset surf the Internet refer to Show information, so that user can be with the network state of the current connected network of timely learning.
Example IV
The embodiment of the present invention provides a kind of intelligent terminal, referring to Fig. 4, the intelligent terminal in the embodiment of the present invention includes: Memory 401, one or more processors 402 (one is only shown in Fig. 4) and is stored on memory 401 and can be in processor The computer program of upper operation.Wherein: memory 401 is deposited for storing software program and module, processor 402 by operation The software program and unit in memory 401 are stored up, thereby executing various function application and data processing.Specifically, it handles Device 402 is stored by operation and is performed the steps of in the above-mentioned computer program of memory 401
Under the connected state of intelligent terminal, periodic triggers detect the TCP of above-mentioned intelligent terminal and obtain TCP data The reiving/transmitting state of packet, wherein above-mentioned connected state is to have connected the state of wireless network, and above-mentioned TCP refers to transmission control protocol, on The reiving/transmitting state for stating TCP data packet is divided into the following two kinds: TCP data pack receiving and transmitting is normal and TCP data pack receiving and transmitting is abnormal;
If the continuous N1 above-mentioned reiving/transmitting state got is that TCP data pack receiving and transmitting is normal, it is based on Hyper text transfer Agreement carries out network detection to above-mentioned intelligent terminal, obtains http testing result, wherein above-mentioned http testing result indicates network It is not connected to or network-in-dialing, wherein above-mentioned N1 is the natural number not less than 1;
If the continuous N2 times above-mentioned reiving/transmitting state got is that TCP data pack receiving and transmitting is normal and above-mentioned http testing result Indicate network-in-dialing, it is determined that above-mentioned intelligent terminal, which is currently at, can go up net state, wherein above-mentioned N2 is greater than N1;
When determine above-mentioned intelligent terminal be currently at can go up net state when, export preset surf the Internet indicate information, with refer to Net state can be gone up by showing that above-mentioned intelligent terminal is currently at.
Assuming that above-mentioned is the first possible embodiment, then provided based on the first possible embodiment Second of possible embodiment in, preset surf the Internet of above-mentioned output indicates information, comprising:
Show that above-mentioned surf the Internet indicates information in the status bar of above-mentioned intelligent terminal.
It is above-mentioned in the third the possible embodiment provided based on above-mentioned second of possible embodiment If the continuous N1 above-mentioned reiving/transmitting state got is that TCP data pack receiving and transmitting is normal, based on hypertext transfer protocol to upper It states intelligent terminal and carries out network detection, are as follows:
If the continuous N1 above-mentioned reiving/transmitting state got is that TCP data pack receiving and transmitting is normal, and above-mentioned intelligent terminal is worked as It does not show that above-mentioned surf the Internet indicates information in preceding status bar, then net is carried out to above-mentioned intelligent terminal based on hypertext transfer protocol Network detection;
If the continuous N1 above-mentioned reiving/transmitting state got is that TCP data pack receiving and transmitting is normal, and above-mentioned intelligent terminal is worked as Above-mentioned surf the Internet has been displayed in preceding status bar and indicates information, it is determined that above-mentioned intelligent terminal, which is currently at, can go up net state.
In the first above-mentioned possible implementation perhaps above-mentioned second possible implementation or above-mentioned third In the 4th kind of possible embodiment provided based on the possible implementation of kind, processor 402 passes through operation storage It is also performed the steps of in the above-mentioned computer program of memory 401
If the continuous N1 above-mentioned reiving/transmitting state got is that TCP data pack receiving and transmitting is normal, with preset another week Phase triggers the reiving/transmitting state that TCP data packet is detected and obtained to the TCP of above-mentioned intelligent terminal, to improve TCP detection and obtain TCP The frequency of the reiving/transmitting state of data packet.
In the first above-mentioned possible implementation perhaps above-mentioned second possible implementation or above-mentioned third It is above-mentioned to be based on hypertext transfer protocol in the 5th kind of possible embodiment provided based on the possible implementation of kind Network detection is carried out to above-mentioned intelligent terminal, obtains http testing result, comprising:
Hypertext transfer protocol connection request is sent respectively to preset N number of server;
It is successfully established when based on above-mentioned hypertext transfer protocol connection request and any server in above-mentioned N number of server When connection, determine that above-mentioned http testing result is network-in-dialing;
It can not succeed with any server in above-mentioned N number of server when based on above-mentioned hypertext transfer protocol connection request When establishing connection, determine that above-mentioned http testing result is that network is not connected to.
Further, as shown in figure 4, above-mentioned intelligent terminal may also include that one or more input equipments 403 (only show in Fig. 4 One out) and one or more output equipments 404 (one is only shown in Fig. 4).Memory 401, processor 402, input equipment 403 and output equipment 404 connected by bus 405.
It should be appreciated that in embodiments of the present invention, alleged processor 402 can be central processing unit (Central Processing Unit, CPU), which can also be other general processors, digital signal processor (Digital Signal Processor, DSP), specific integrated circuit (Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic Device, discrete gate or transistor logic, discrete hardware components etc..General processor can be microprocessor or this at Reason device is also possible to any conventional processor etc..
Input equipment 403 may include keyboard, Trackpad, fingerprint adopt sensor (for acquire user finger print information and The directional information of fingerprint), microphone etc., output equipment 404 may include display, loudspeaker etc..
Memory 404 may include read-only memory and random access memory, and provide instruction sum number to processor 401 According to.Part or all of memory 404 can also include nonvolatile RAM.For example, memory 404 may be used also With the information of storage device type.
Therefore in the present invention program, under the connected state of intelligent terminal, periodic triggers are to the intelligent terminal TCP detect and obtain the reiving/transmitting state of TCP data packet, and the above-mentioned reiving/transmitting state got at continuous N1 times is TCP number When normal according to pack receiving and transmitting, network detection is carried out to the intelligent terminal based on hypertext transfer protocol, obtains http testing result, When the above-mentioned reiving/transmitting state continuously acquired is normal TCP data pack receiving and transmitting and http testing result instruction network-in-dialing, Net state can be gone up by determining that the intelligent terminal is currently at.By combining TCP detection mode and based on the net of hypertext transfer protocol Network detection mode can improve network inspection to avoid the situation for leading to testing result inaccuracy using single network detection mode The accuracy of survey, in addition, the present invention determine the intelligent terminal be currently at can go up net state when, export preset surf the Internet refer to Show information, so that user can be with the network state of the current connected network of timely learning.
It is apparent to those skilled in the art that for convenience of description and succinctly, only with above-mentioned each function Can unit, module division progress for example, in practical application, can according to need and by above-mentioned function distribution by different Functional unit, module are completed, i.e., the internal structure of above-mentioned apparatus is divided into different functional unit or module, more than completing The all or part of function of description.Each functional unit in embodiment, module can integrate in one processing unit, can also To be that each unit physically exists alone, can also be integrated in one unit with two or more units, it is above-mentioned integrated Unit both can take the form of hardware realization, can also realize in the form of software functional units.In addition, each function list Member, the specific name of module are also only for convenience of distinguishing each other, the protection scope being not intended to limit this application.Above system The specific work process of middle unit, module, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, is not described in detail or remembers in some embodiment The part of load may refer to the associated description of other embodiments.
Those of ordinary skill in the art may be aware that list described in conjunction with the examples disclosed in the embodiments of the present disclosure Member and algorithm steps can be realized with the combination of electronic hardware or computer software and electronic hardware.These functions are actually It is implemented in hardware or software, the specific application and design constraint depending on technical solution.Professional technician Each specific application can be used different methods to achieve the described function, but this realization is it is not considered that exceed The scope of the present invention.
In embodiment provided by the present invention, it should be understood that disclosed device and method can pass through others Mode is realized.For example, system embodiment described above is only schematical, for example, the division of above-mentioned module or unit, Only a kind of logical function partition, there may be another division manner in actual implementation, such as multiple units or components can be with In conjunction with or be desirably integrated into another system, or some features can be ignored or not executed.Another point, it is shown or discussed Mutual coupling or direct-coupling or communication connection can be through some interfaces, the INDIRECT COUPLING of device or unit or Communication connection can be electrical property, mechanical or other forms.
Above-mentioned unit as illustrated by the separation member may or may not be physically separated, aobvious as unit The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme 's.
If above-mentioned integrated unit is realized in the form of SFU software functional unit and sells or use as independent product When, it can store in a computer readable storage medium.Based on this understanding, the present invention realizes above-described embodiment side All or part of the process in method can also instruct relevant hardware to complete, above-mentioned computer by computer program Program can be stored in a computer readable storage medium, and the computer program is when being executed by processor, it can be achieved that above-mentioned each The step of a embodiment of the method.Wherein, above-mentioned computer program includes computer program code, and above-mentioned computer program code can Think source code form, object identification code form, executable file or certain intermediate forms etc..Above-mentioned computer-readable medium can be with It include: any entity or device, recording medium, USB flash disk, mobile hard disk, magnetic disk, light that can carry above-mentioned computer program code Disk, computer storage, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium etc..It should be noted that above-mentioned computer The content that readable medium includes can carry out increase and decrease appropriate according to the requirement made laws in jurisdiction with patent practice, such as In certain jurisdictions, according to legislation and patent practice, computer-readable medium do not include be electric carrier signal and telecommunications letter Number.
Above above-described embodiment is merely illustrative of the technical solution of the present invention, rather than its limitations;Although referring to aforementioned reality Applying example, invention is explained in detail, those skilled in the art should understand that: it still can be to aforementioned each Technical solution documented by embodiment is modified or equivalent replacement of some of the technical features;And these are modified Or replacement, the spirit and scope for technical solution of various embodiments of the present invention that it does not separate the essence of the corresponding technical solution should all It is included within protection scope of the present invention.

Claims (10)

1. a kind of network detecting method characterized by comprising
Under the connected state of intelligent terminal, periodic triggers detect the TCP of the intelligent terminal and obtain TCP data packet Reiving/transmitting state, wherein the connected state is to have connected the state of wireless network, and the TCP refers to transmission control protocol, described The reiving/transmitting state of TCP data packet is divided into the following two kinds: TCP data pack receiving and transmitting is normal and TCP data pack receiving and transmitting is abnormal;
If the continuous N1 reiving/transmitting state got is that TCP data pack receiving and transmitting is normal, it is based on hypertext transfer protocol Network detection is carried out to the intelligent terminal, obtains http testing result, wherein the http testing result instruction network does not connect Logical or network-in-dialing, wherein the N1 is the natural number not less than 1;
On the basis of the reiving/transmitting state that described continuous N1 times gets is that TCP data pack receiving and transmitting is normal, continue to obtain The reiving/transmitting state is until reach N2 times, if the continuous N2 reiving/transmitting state got is that TCP data pack receiving and transmitting is normal And the http testing result indicates network-in-dialing, it is determined that the intelligent terminal, which is currently at, can go up net state, wherein described N2 is greater than N1;
When determine the intelligent terminal be currently at can go up net state when, export preset surf the Internet indicate information, to indicate Net state can be gone up by stating intelligent terminal and being currently at.
2. network detecting method according to claim 1, which is characterized in that the preset instruction letter of surfing the Internet of the output Breath, comprising:
It can surf the Internet described in display in the status bar of the intelligent terminal and indicate information.
3. network detecting method according to claim 2, which is characterized in that if the continuous N1 receipts got Hair-like state is that TCP data pack receiving and transmitting is normal, then carries out network detection to the intelligent terminal based on hypertext transfer protocol, Are as follows:
If the continuous N1 time reiving/transmitting state got be that TCP data pack receiving and transmitting is normal, and the intelligent terminal is currently It does not show that described can surf the Internet indicates information in status bar, then network inspection is carried out to the intelligent terminal based on hypertext transfer protocol It surveys;
If the continuous N1 time reiving/transmitting state got be that TCP data pack receiving and transmitting is normal, and the intelligent terminal is currently Described can surf the Internet has been displayed in status bar and indicates information, it is determined that the intelligent terminal, which is currently at, can go up net state.
4. network detecting method according to any one of claims 1 to 3, which is characterized in that if get for continuous N1 times The reiving/transmitting state is that TCP data pack receiving and transmitting is normal, then the network detecting method further include:
The reiving/transmitting state of TCP data packet is detected and obtained with preset another period triggering, to the TCP of the intelligent terminal to mention The frequency of high TCP detection and the reiving/transmitting state for obtaining TCP data packet.
5. network detecting method according to any one of claims 1 to 3, which is characterized in that described to be based on Hyper text transfer Agreement carries out network detection to the intelligent terminal, obtains http testing result, comprising:
Hypertext transfer protocol connection request is sent respectively to preset N number of server;
It is connect when being successfully established based on the hypertext transfer protocol connection request with any server in N number of server When, determine that the http testing result is network-in-dialing;
It can not be successfully established with any server in N number of server when based on the hypertext transfer protocol connection request When connection, determine that the http testing result is that network is not connected to.
6. a kind of network detection device characterized by comprising
Acquiring unit, under the connected state of intelligent terminal, periodic triggers to be detected and obtained to the TCP of the intelligent terminal Take the reiving/transmitting state of TCP data packet, wherein the connected state is to have connected the state of wireless network, and the TCP refers to transmission control The reiving/transmitting state of agreement processed, the TCP data packet is divided into the following two kinds: TCP data pack receiving and transmitting is normal and TCP data pack receiving and transmitting is different Often;
Http detection unit, for being TCP data packet when the acquiring unit continuous N1 times reiving/transmitting state got When receiving and dispatching normal, network detection is carried out to the intelligent terminal based on hypertext transfer protocol, obtains http testing result, In, the http testing result instruction network is not connected to or network-in-dialing, wherein the N1 is the natural number not less than 1;
Determination unit, the reiving/transmitting state for getting at described continuous N1 times are the normal base of TCP data pack receiving and transmitting On plinth, continue to obtain the reiving/transmitting state until reaching N2 times, when the transmitting-receiving that the acquiring unit continuous N2 times gets State is the http testing result instruction network-in-dialing that TCP data pack receiving and transmitting is normal and the http detection unit obtains When, net state can be gone up by determining that the intelligent terminal is currently at, wherein the N2 is greater than N1;
Network state indicating unit, for when the determination unit determine the intelligent terminal be currently at can go up net state when, It exports preset surf the Internet and indicates information, net state can be gone up to indicate that the intelligent terminal is currently at.
7. network detection device according to claim 6, which is characterized in that the network state indicating unit is specifically used In: when the determination unit determine the intelligent terminal be currently at can go up net state when, in the status bar of the intelligent terminal It can surf the Internet described in middle display and indicate information.
8. network detection device according to claim 7, which is characterized in that
The http detection unit is specifically used for: when the reiving/transmitting state that the acquiring unit continuous N1 times gets is TCP data pack receiving and transmitting is normal, and do not shown in the current status bar of the intelligent terminal it is described can surf the Internet when indicating information, be based on Hypertext transfer protocol carries out network detection to the intelligent terminal;
The determination unit is also used to: when the reiving/transmitting state that the acquiring unit continuous N1 times gets is TCP data Pack receiving and transmitting is normal, and had been displayed in the current status bar of the intelligent terminal it is described can surf the Internet when indicating information, determine the intelligence Energy terminal, which is currently at, can go up net state.
9. a kind of intelligent terminal, including memory, processor and storage are in the memory and can be on the processor The computer program of operation, which is characterized in that the processor realizes such as claim 1 to 5 when executing the computer program The step of any one the method.
10. a kind of computer readable storage medium, the computer-readable recording medium storage has computer program, and feature exists In when the computer program is executed by processor the step of any one of such as claim 1 to 5 of realization the method.
CN201710655791.5A 2017-08-03 2017-08-03 Network detecting method, network detection device and intelligent terminal Active CN107231647B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710655791.5A CN107231647B (en) 2017-08-03 2017-08-03 Network detecting method, network detection device and intelligent terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710655791.5A CN107231647B (en) 2017-08-03 2017-08-03 Network detecting method, network detection device and intelligent terminal

Publications (2)

Publication Number Publication Date
CN107231647A CN107231647A (en) 2017-10-03
CN107231647B true CN107231647B (en) 2019-01-11

Family

ID=59958114

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710655791.5A Active CN107231647B (en) 2017-08-03 2017-08-03 Network detecting method, network detection device and intelligent terminal

Country Status (1)

Country Link
CN (1) CN107231647B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107801201A (en) * 2017-10-19 2018-03-13 维沃移动通信有限公司 Network recovery method and device
WO2019079950A1 (en) * 2017-10-23 2019-05-02 深圳市云中飞网络科技有限公司 Network connection detection method, device, terminal, and computer storage medium
CN110011868A (en) * 2018-01-05 2019-07-12 武汉斗鱼网络科技有限公司 A kind of network is reachable to determine method, electronic equipment and readable storage medium storing program for executing
CN111682974A (en) * 2019-03-11 2020-09-18 西安诺瓦电子科技有限公司 Network detection method, device and system for broadcast control equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6078956A (en) * 1997-09-08 2000-06-20 International Business Machines Corporation World wide web end user response time monitor
CN1656731A (en) * 2002-02-08 2005-08-17 杜松网络公司 Multi-method gateway-based network security systems and methods
CN101631052A (en) * 2009-08-25 2010-01-20 杭州华三通信技术有限公司 Method and device for detecting number of access terminals
CN101902450A (en) * 2009-11-13 2010-12-01 亿赞普(北京)科技有限公司 Network for realizing page push and control, page push method and page control method

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020042839A1 (en) * 2000-10-10 2002-04-11 Christopher Peiffer HTTP multiplexor/demultiplexor
CN103812728B (en) * 2014-02-13 2018-06-19 普联技术有限公司 A kind of network diagnosis method, system and router
CN104394036A (en) * 2014-12-05 2015-03-04 北京极科极客科技有限公司 Method for detecting network status
CN106603306B (en) * 2016-12-30 2019-12-10 宇龙计算机通信科技(深圳)有限公司 method and device for processing network connection abnormity

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6078956A (en) * 1997-09-08 2000-06-20 International Business Machines Corporation World wide web end user response time monitor
CN1656731A (en) * 2002-02-08 2005-08-17 杜松网络公司 Multi-method gateway-based network security systems and methods
CN101631052A (en) * 2009-08-25 2010-01-20 杭州华三通信技术有限公司 Method and device for detecting number of access terminals
CN101902450A (en) * 2009-11-13 2010-12-01 亿赞普(北京)科技有限公司 Network for realizing page push and control, page push method and page control method

Also Published As

Publication number Publication date
CN107231647A (en) 2017-10-03

Similar Documents

Publication Publication Date Title
CN107231647B (en) Network detecting method, network detection device and intelligent terminal
CN107256195B (en) Webpage front-end test method and device
CN107276856B (en) Network detecting method, network detection device and intelligent terminal
CN110275958A (en) Site information recognition methods, device and electronic equipment
CN110083334A (en) The online method and device of model
CN107332739B (en) Network detecting method, network detection device and intelligent terminal
CN107004163A (en) The feature design of mistake driving in machine learning
CN109685089A (en) The system and method for assessment models performance
CN110134711A (en) Processing method, device, equipment and the computer readable storage medium of big data
CN107294811A (en) Network detecting method, network detection means and intelligent terminal
CN109167699A (en) The method and apparatus for handling the state of the node of block chain
CN107818168A (en) Topic searching method, device and equipment
CN106686545B (en) A kind of application method and device of Wireless Fidelity national code
CN107180090A (en) Reading punch card method, electronic equipment and computer-readable storage medium based on e-book
CN110473042B (en) Method and device for acquiring information
CN109525697A (en) Contact person shares and the method, apparatus and terminal of display
CN108965575A (en) A kind of gesture motion recognition methods, device and terminal device
CN107360059B (en) Network detecting method, network detection device and intelligent terminal
CN107294812B (en) Network detecting method, network detection device and intelligent terminal
CN110489531A (en) The determination method and apparatus of high frequency problem
CN108805332A (en) A kind of feature evaluation method and apparatus
CN110535910A (en) Breakpoint user's recalls method, apparatus and storage medium
CN103019907B (en) A kind of end cell temperature monitoring method and device and terminal
CN107346323A (en) The method and label recommendations device of a kind of label recommendations
CN109299948A (en) Red packet sending method and device, wearable device 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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 523860 No. 18, Wu Sha Beach Road, Changan Town, Dongguan, Guangdong

Applicant after: OPPO Guangdong Mobile Communications Co., Ltd.

Address before: 523860 No. 18, Wu Sha Beach Road, Changan Town, Dongguan, Guangdong

Applicant before: Guangdong OPPO Mobile Communications Co., Ltd.

GR01 Patent grant
GR01 Patent grant