CN107332739A - Network detecting method, network detection means and intelligent terminal - Google Patents
Network detecting method, network detection means and intelligent terminal Download PDFInfo
- Publication number
- CN107332739A CN107332739A CN201710630935.1A CN201710630935A CN107332739A CN 107332739 A CN107332739 A CN 107332739A CN 201710630935 A CN201710630935 A CN 201710630935A CN 107332739 A CN107332739 A CN 107332739A
- Authority
- CN
- China
- Prior art keywords
- network
- intelligent terminal
- testing result
- net
- state
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/08—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
- H04L43/0805—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
- H04L43/0811—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking connectivity
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/02—Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/75—Indicating network or usage conditions on the user display
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/16—Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
- H04L69/161—Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields
- H04L69/162—Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields involving adaptations of sockets based mechanisms
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Environmental & Geological Engineering (AREA)
- Computer Security & Cryptography (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
The invention provides a kind of network detecting method, network detection means, intelligent terminal and computer-readable recording medium, the network detecting method includes:Under the networking state of intelligent terminal, the connection status of each socket of intelligent terminal is periodically obtained;Determined according to time connection status of each socket of acquisition is worked as when secondary first network testing result;If continuous N1 times the first network testing result determined indicates that network is not connected, network detection is carried out to intelligent terminal based on HTTP, the second network testing result is obtained;If the continuous N2 times first network testing result determined indicates that network is not connected and the second network testing result indicates that network is not connected, it is determined that intelligent terminal, which is currently at, can not go up net state;When it is determined that intelligent terminal is currently at when can not go up net state, exporting the default configured information that can not surf the Net.The technical scheme that the present invention is provided can improve the accuracy of network detection, and inform the network state of the current connected network of user in time.
Description
Technical field
The invention belongs to net application technology field, more particularly to a kind of network detecting method, network detection means, intelligence
Terminal and computer-readable recording medium.
Background technology
With the fast development of mechanics of communication, wireless network, particularly WLAN (WLAN, Wireless Local
Area Net) various aspects are obtained for extensive use in life.Because WLAN need not be connected up, and transmission speed
Comparatively fast, it is thus possible to make up the deficiency of limited LAN well.And current almost all of intelligent terminal is all supported by nothing
Line fidelity (WiFi, Wireless Fidelity) accesses the focus (i.e. Hotspot) of WLAN to realize function of surfing the Net.
However, due to network congestion or network prescribe a time limit online etc. reason, in the case where having connected network, often occur
The situation that the page accessed is not opened for a long time, in this case, it is necessary to which user, which carries out a variety of online, attempts (such as trial brush
The new or other links of access) just it is capable of determining whether that network goes wrong, waste the time of user.
The content of the invention
In view of this, can the invention provides a kind of network detecting method, network detection means, intelligent terminal and computer
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, including:
Under the networking state of intelligent terminal, the connection status of each socket of the intelligent terminal is periodically obtained,
Wherein, the networking state is the state for having connected wireless network;
The connection status of each socket according to when time acquisition, it is determined that work as secondary first network testing result, its
In, the first network testing result indicates that network is not connected or network-in-dialing;
If continuous N1 times the first network testing result determined indicates that network is not connected, passed based on hypertext
Defeated agreement carries out network detection to the intelligent terminal, obtains the second network testing result, wherein, the second network detection knot
Fruit indicates that network is not connected or network-in-dialing, wherein, the N1 is the natural number not less than 1;
If continuous N2 times the first network testing result determined indicates that network is not connected and second network
Testing result indicates that network is not connected, it is determined that the intelligent terminal, which is currently at, can not go up net state, wherein, the N2 is more than
N1;
When it is determined that the intelligent terminal is currently at when can not go up net state, exporting the default configured information that can not surf the Net,
Net state can not be gone up to indicate that the intelligent terminal is currently at.
Based on first aspect present invention, in the first possible implementation, default can not surf the Net of the output refers to
Show information, including:
Can not surf the Net configured information in the status bar of the intelligent terminal described in display.
The first possible implementation based on first aspect present invention, in second of possible implementation, institute
If stating the first network testing result determined for continuous N1 times indicates that network is not connected, based on HTTP
Network detection is carried out to the intelligent terminal, is:
If continuous N1 times the first network testing result determined indicates that network is not connected, and the intelligent terminal
The configured information that can not surf the Net is not shown in current status bar, then the intelligent terminal is entered based on HTTP
Row network is detected;
If continuous N1 times the first network testing result determined indicates that network is not connected, and the intelligent terminal
The configured information that can not surf the Net has been shown in current status bar, it is determined that the intelligent terminal be currently at can not go up it is netted
State.
Based on first aspect present invention, the either possible implementation of the first of first aspect present invention or this hair
Second of possible implementation of bright first aspect, in the third possible implementation, is determined when continuous N1 times
When the first network testing result indicates that network is not connected, the network detecting method also includes:
The connection status of each socket of the intelligent terminal is obtained with default another cycle, obtains described to improve
The frequency of the connection status of each socket of intelligent terminal.
Based on first aspect present invention, the either possible implementation of the first of first aspect present invention or this hair
Second of possible implementation of bright first aspect, it is described to be based on Hyper text transfer in the 4th kind of possible implementation
Agreement carries out network detection to the intelligent terminal, obtains the second network testing result, including:
HTTP connection request is sent respectively to default N number of server;
It is successfully established when based on the HTTP connection request with any server in N number of server
During connection, it is network-in-dialing to determine the second network testing result;
It can not succeed when based on the HTTP connection request with any server in N number of server
When setting up connection, determine that the second network testing result does not connect for network.
The second aspect of the embodiment of the present invention provides a kind of network detection means, including:Acquiring unit, in intelligence
Under the networking state of terminal, the connection status of each socket of the intelligent terminal is periodically obtained, wherein, the networking shape
State is the state for having connected wireless network;
First determining unit, for the connection status of each socket according to being obtained when time acquiring unit,
It is determined that when secondary first network testing result, wherein, the first network testing result indicates that network is not connected or network-in-dialing;
Http detection units, for detecting knot when the first network that first determining unit is determined for continuous N1 times
When fruit indicates that network is not connected, network detection is carried out to the intelligent terminal based on HTTP, the second net is obtained
Network testing result, wherein, the second network testing result indicates that network is not connected or network-in-dialing, wherein, the N1 is not
Natural number less than 1;
Second determining unit, for detecting knot when the first network that first determining unit is determined for continuous N2 times
When fruit indicates that network is not connected, and the second network testing result that the http detection units are obtained indicates that network does not connect
When logical, net state can not be gone up by determining that the intelligent terminal is currently at, wherein, the N2 is more than N1;
Network state indicating member, for when second determining unit determines that the intelligent terminal is currently at can not
During net state, the default configured information that can not surf the Net is exported, net state can not 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 member is specific
For:When second determining unit determine the intelligent terminal be currently at can not go up net state when, in the intelligent terminal
Status bar in can not surf the Net configured information described in display.
The first possible implementation based on second aspect of the present invention, in second of possible implementation, institute
State http detection units specifically for:The first network testing result determined for continuous N1 times when first determining unit
Indicate that network is not connected, and do not shown in the current status bar of the intelligent terminal it is described can not surf the Net configured information when, base
Network detection is carried out to the intelligent terminal in HTTP;
Second determining unit is additionally operable to:The first network determined for continuous N1 times when first determining unit
Testing result indicates that network is not connected, and the instruction letter that can not surf the Net has been shown in the current status bar of the intelligent terminal
During breath, net state can not be gone up by determining that the intelligent terminal is currently at.
Third aspect present invention provides a kind of intelligent terminal, including memory, processor and stores on a memory and can
The computer program run on a processor, realized during above-mentioned computing device above 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 is provided to be stored with a kind of computer-readable recording medium, the computer-readable recording medium
Computer program, above computer program realizes 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 networking state of intelligent terminal, periodically obtain the intelligent terminal
The connection status of each socket and the connection status of each socket based on acquisition determine when time first network detection knot
Really, and when the first network testing result determined for continuous N1 times indicates that network is not connected, based on HTTP
Network detection is carried out to the intelligent terminal, the second network testing result is obtained, the first network detection determined at continuous N2 times
When as a result indicating that network is not connected and the second network testing result indicates that network is not connected, determine that the intelligent terminal is currently located
In net state can not be gone up.Detected by combining the network detection mode based on socket and the network based on HTTP
Mode, can avoid causing the inaccurate situation of testing result using single network detection mode, improve the standard of network detection
True property, in addition, the present invention it is determined that the intelligent terminal be currently at can not on net state when, export the default instruction that can not surf the Net
Information, so that the network state of current connected network can be known in time by obtaining user.
Brief description of the drawings
Technical scheme in order to illustrate the embodiments of the present invention more clearly, below will be to embodiment or description of the prior art
In required for the accompanying drawing that uses be briefly described, it should be apparent that, drawings in the following description are only some of the present invention
Embodiment, for those of ordinary skill in the art, without having to pay creative labor, can also be according to these
Accompanying drawing obtains other accompanying drawings.
Network detecting method one embodiment schematic flow sheet that Fig. 1 provides for the present invention;
Network detecting method another embodiment schematic flow sheet that Fig. 2 provides for the present invention;
Network detection means one embodiment structural representation that Fig. 3 provides for the present invention;
Intelligent terminal one embodiment structural representation that Fig. 4 provides for the present invention.
Embodiment
In describing below, in order to illustrate rather than in order to limit, it is proposed that such as tool of particular system structure, technology etc
Body details, thoroughly to understand 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 can also be realized in the other embodiments of details.In other situations, omit to well-known system, device, electricity
Road and the detailed description of method, in case unnecessary details hinders description of the invention.
It should be understood that the size of the sequence number of each step is not meant to the priority of execution sequence in following embodiments of the method, respectively
The execution sequence of process should determine that the implementation process without tackling each embodiment constitutes any limit with its function and internal logic
It is fixed.
In order to illustrate technical solutions according to the invention, illustrated below by specific embodiment.
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 networking state of intelligent terminal, periodically obtain the company of each socket of above-mentioned intelligent terminal
Connect state;
In the embodiment of the present invention, above-mentioned networking state is the state for having connected wireless network.In a step 101, Ke Yizhou
Kernel is (for example from the transmission control protocol (TCP, Transmission Control Protocol) of above-mentioned intelligent terminal for phase property
TCP protocol stack information) the middle attribute information for obtaining each socket (namely socket), based on as time each socket of acquisition
Attribute information determine corresponding socket connection status.
In embodiments of the present invention, socket attribute includes but is not limited to state (i.e. state) information, retransmission time out
(RTO, Retransmission Time-Out) information, round-trip delay (RTT, Round-Trip Time) information, response timeout
(ATO, ACKnowledge Time-Out) information.In a step 101, based on when time each socket of acquisition attribute information
Corresponding socket connection status can be determined.For example, in a kind of application scenarios, for any socket, when what is got
The value of the state attributes of the socket is not TCP_SYN_SENT, and the value of the RTT attributes of the socket is more than default RTT
Threshold value (such as 10000000), and the corresponding links of the socket exist retransmit packet (can the RTO based on the socket belong to
Property determine) or do not respond packet (can based on the socket ATO attributes determine) when, it is determined that the connection with the Socket
State is not connected state;When the value of the socket got state attributes is not TCP_SYN_SENT, and the socket
The values of RTT attributes be more than default RTT threshold values (such as 10000000), and there is the number retransmitted in the corresponding links of the socket
According to bag (can based on the socket RTO attributes determine) or do not respond packet (can the ATO attributes based on the socket it is true
It is fixed) when, it is determined that the connection status with the Socket is not connected state.
Specifically, the implementation for obtaining the connection status of each socket of intelligent terminal can also be with reference to other existing
Technology realizes that here is omitted.
Step 102, basis are when time connection status of each socket of acquisition, it is determined that when secondary first network detection knot
Really;
Wherein, above-mentioned first network testing result indicates that network is not connected or network-in-dialing.
In the embodiment of the present invention, the distribution of the connection status of each socket got based on step 101, it may be determined that when
Secondary first network testing result.
Optionally, step 102 can include:
Whether detection connection status does not connect threshold value for the number of the not socket of connected state more than default;
If the number for detecting connection status for the not socket of connected state does not connect threshold value more than this, it is determined that when secondary
First network testing result do not connect for network;
Threshold value is not connected if detecting connection status and being not more than this for the not number of the socket of connected state, it is determined that when
Secondary first network testing result is network-in-dialing.
Certainly, in the embodiment of the present invention, according to when time distribution situation of the connection status of each socket of acquisition, also may be used
To be determined based on other preset algorithms when secondary first network testing result.For example, detection connection status is not connected state
It is pre- whether the ratio (such as M1/M2) of the quantity (such as M1) of socket and the quantity (such as M2) when secondary total socket is more than
If fractional threshold;If detecting M1/M2 more than the fractional threshold, it is determined that when secondary first network testing result be network not
Connection;If detecting M1/M2 is not more than the fractional threshold, it is determined that when secondary first network testing result is network-in-dialing.
If step 103, the above-mentioned first network testing result determined for continuous N1 times indicate that network is not connected, and is based on
HTTP (HTTP, HyperText Transfer Protocol) carries out network detection to above-mentioned intelligent terminal, obtains
To the second network testing result;
Wherein, above-mentioned second network testing result indicates that network is not connected or network-in-dialing, wherein, above-mentioned N1 be not less than
1 natural number.In the embodiment of the present invention, do not connected when detecting network continuous N1 times based on step 101 and the mode of step 102
When, triggering HTTP detections, namely network detection is carried out to above-mentioned intelligent terminal based on HTTP.
Optionally, being included based on HTTP to the progress network detection of above-mentioned intelligent terminal in step 103:To default n
Server sends HTTP connection requests respectively;If above-mentioned intelligent terminal is based on above-mentioned HTTP connection requests and above-mentioned n server
In any server be successfully established connection, it is determined that when the second secondary network testing result be network-in-dialing;If above-mentioned intelligence
Terminal can not be successfully established with any server in above-mentioned N number of server based on above-mentioned HTTP connection requests and is connected, it is determined that
When the second secondary network testing result is that network is not connected.Wherein, above-mentioned n is the natural number not less than 2.Further, it is possible to create
N thread is built, and the n thread parallel based on establishment sends HTTP connection requests respectively to n server, to improve detection effect
Rate.
Certainly, in the embodiment of the present invention, also may be used based on HTTP to the progress network detection of above-mentioned intelligent terminal in step 103
Think and only initiate HTTP connection requests to single server to carry out HTTP detections, do not limit herein.
Optionally, when the first network testing result determined when continuous N1 times indicates that network is not connected, with default
Another cycle obtains the connection status of each socket of above-mentioned intelligent terminal, to improve each set for obtaining above-mentioned intelligent terminal
Connect the frequency of the connection status of word.That is, the first network testing result determined when continuous N1 times indicates that network is not connected
When, shorten in step 101 the execution cycle of " connection status for obtaining each socket of above-mentioned intelligent terminal " This move, with
Just (N2-N1) individual first network testing result can be obtained again in the neighbouring period for obtaining the second network testing result.Example
Such as, if the cycle that original step 101 obtains the connection status of each socket of above-mentioned intelligent terminal is 5 seconds, as continuous N1
When the secondary first network testing result determined indicates that network is not connected, then above-mentioned intelligence can be obtained with the cycle of 2 seconds eventually
The connection status of each socket at end.
If step 104, the first network testing result determined for continuous N2 times indicate network and not connected and above-mentioned second
Network testing result indicates that network is not connected, it is determined that above-mentioned intelligent terminal, which is currently at, can not go up net state;
In the embodiment of the present invention, above-mentioned N2 is more than N1.
It should be noted that if the continuous N2 times first network testing result determined indicates that network is not connected, and this
Shi Wei obtains above-mentioned second network testing result (such as in being detected also in HTTP), then may wait for the second network testing result
After acquisition, judge whether the second network testing result obtained indicates that network is not connected, if the second network testing result obtained
Indicate that network is not connected, it is determined that above-mentioned intelligent terminal, which is currently at, can not go up net state.Further, if second network is detected
As a result network-in-dialing is indicated, then the statistical number of first network testing result can be reset, step 101 is returned to afterwards, according to
The initial cycle obtains the connection status of each socket of above-mentioned intelligent terminal.Or, obtaining above-mentioned second network detection
As a result after, if the second network testing result indicates that network is not connected, monitor and whether obtained again after triggering HTTP detections
(N2-N1) individual first network testing result, if not obtaining (N2-N1) individual first network testing result, is waited, if obtaining again
(N2-N1) individual first network testing result, then judge whether that the first network testing result determined for continuous N2 times indicates net
Network is not connected, if judging, the first network testing result determined for continuous N2 times indicates that network is not connected, it is determined that above-mentioned intelligence
Energy terminal, which is currently at, can not go up net state.When the second network testing result instruction network-in-dialing, or judge not continuous
, can be clear by the statistical number of first network testing result when the first network testing result determined for N2 times indicates that network is not connected
Zero, step 101 is returned to afterwards, and the connection status of each socket of above-mentioned intelligent terminal is obtained according to the initial cycle.
Step 105, refer to when it is determined that above-mentioned intelligent terminal is currently at when can not go up net state, exporting default can not surf the Net
Show information, net state can not be gone up to indicate that above-mentioned intelligent terminal is currently at;
In the embodiment of the present invention, in order to allow users to the network for knowing the current network that networks of above-mentioned intelligent terminal in time
State, when determine every time above-mentioned intelligent terminal be currently at can not go up net state when, export the default configured information that can not surf the Net,
So that the real-time network state of above-mentioned intelligent terminal can be known in time by obtaining user.
In a kind of application scenarios, step 105 can include:When it is determined that above-mentioned intelligent terminal be currently at can not go up it is netted
During state, the above-mentioned configured information that can not surf the Net (the above-mentioned configured information example that can not surf the Net is shown in the status bar of above-mentioned intelligent terminal
Such as can be the default mark that can not surf the Net), so as to user view this can not surf the Net configured information when, would know that the intelligence
Terminal, which is currently at, can not go up net state.Specifically, net state can not be gone up when determining that above-mentioned intelligent terminal is currently at, and it is above-mentioned
During the configured information that can not be surfed the Net in the status bar of intelligent terminal, shown in the status bar of above-mentioned intelligent terminal it is above-mentioned can not on
Net configured information;When it is determined that above-mentioned intelligent terminal is currently at can not go up in net state, and the status bar of above-mentioned intelligent terminal
Display can not surf the Net configured information when, the aobvious of the above-mentioned configured information that can not surf the Net is kept in the status bar of above-mentioned intelligent terminal
Show.
Further, the network detecting method in the embodiment of the present invention can also include:Record the result of each network detection
(such as above-mentioned first network testing result and/or above-mentioned second network testing result), to facilitate user or technical staff to call
The result of network detection is analyzed 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 means, it is above-mentioned
Network detection means can be independent equipment, or can also be integrated in intelligent terminal (such as mobile phone, tablet personal computer) or
In miscellaneous equipment, it is not construed as limiting herein.
Therefore, in embodiments of the present invention, under the networking state of intelligent terminal, periodically obtain the intelligent terminal
The connection status of each socket and the connection status of each socket based on acquisition determine when time first network detection
As a result, and when the first network testing result determined for continuous N1 times indicates that network is not connected, based on Hyper text transfer association
View carries out network detection to the intelligent terminal, obtains the second network testing result, the first network inspection determined at continuous N2 times
When survey result indicates that network is not connected and the second network testing result indicates that network is not connected, determine that the intelligent terminal is current
In net state can not be gone up.Examined by combining the network detection mode based on socket and the network based on HTTP
Survey mode, can avoid causing the inaccurate situation of testing result using single network detection mode, improve network detection
Accuracy, in addition, the present invention it is determined that the intelligent terminal be currently at can not on net state when, export default can not surf the Net refer to
Show information, so that the network state of current connected network can be known in time by obtaining user.
Embodiment two
The difference of the embodiment of the present invention and embodiment one is, the first net that the embodiment of the present invention is determined at continuous N1 times
Network testing result indicates that network is not connected, and does not show the configured information intelligent terminal that can not surf the Net in the status bar of intelligent terminal
Networking state under, just further carry out HTTP detections, to reduce the possibility of erroneous judgement.As shown in Fig. 2 in the embodiment of the present invention
Network detecting method include:
Step 201, under the networking state of intelligent terminal, periodically obtain the company of each socket of above-mentioned intelligent terminal
Connect state;
In the embodiment of the present invention, above-mentioned networking state is the state for having connected wireless network.In step 201, Ke Yizhou
Phase property obtains each socket (namely socket) from the TCP kernels (such as TCP protocol stack information) of above-mentioned intelligent terminal
Attribute information, based on the connection status that corresponding socket is determined when time each socket of acquisition attribute information.
In embodiments of the present invention, socket attribute include but is not limited to state (i.e. state) information, RTO information,
RTT information, ATO information.In step 201, the attribute information based on each socket when secondary acquisition can be determined accordingly
Socket connection status.For example, in a kind of application scenarios, for any socket, when the socket's got
The value of state attributes is not TCP_SYN_SENT, and the value of the RTT attributes of the socket is more than default RTT threshold values (such as
10000000), and the corresponding links of the socket exist the packet (can the RTO attributes based on the socket determine) that retransmits or
During packet (the ATO attributes determination that can be based on the socket) not responded, it is determined that the connection status with the Socket is not
Connected state;When the socket got state attributes value be TCP_SYN_SENT, and the socket RTT category
Property value be more than default RTT threshold values (such as 10000000), and the corresponding links of the socket there is the packet retransmitted (can
RTO attributes based on the socket are determined) or do not respond packet (can the ATO attributes based on the socket determine) when, then
It is determined that being not connected state with the connection status of the Socket.
Specifically, the implementation for obtaining the connection status of each socket of intelligent terminal can also be with reference to other existing
Technology realizes that here is omitted.
Step 202, basis are when time connection status of each socket of acquisition, it is determined that when secondary first network detection knot
Really;
Wherein, above-mentioned first network testing result indicates that network is not connected or network-in-dialing.
In the embodiment of the present invention, the distribution of the connection status of each socket got based on step 201, it may be determined that when
Secondary first network testing result.
Optionally, step 202 can include:
Whether detection connection status does not connect threshold value for the number of the not socket of connected state more than default;
If the number for detecting connection status for the not socket of connected state does not connect threshold value more than this, it is determined that when secondary
First network testing result do not connect for network;
Threshold value is not connected if detecting connection status and being not more than this for the not number of the socket of connected state, it is determined that when
Secondary first network testing result is network-in-dialing.
Certainly, in the embodiment of the present invention, according to when time distribution situation of the connection status of each socket of acquisition, also may be used
To be determined based on other preset algorithms when secondary first network testing result.For example, detection connection status is not connected state
It is pre- whether the ratio (such as M1/M2) of the quantity (such as M1) of socket and the quantity (such as M2) when secondary total socket is more than
If fractional threshold;If detecting M1/M2 more than the fractional threshold, it is determined that when secondary first network testing result be network not
Connection;If detecting M1/M2 is not more than the fractional threshold, it is determined that when secondary first network testing result is network-in-dialing.
If step 203, the above-mentioned first network testing result determined for continuous N1 times indicate that network is not connected, and above-mentioned
The above-mentioned configured information that can not surf the Net is not shown in the current status bar of intelligent terminal, then above-mentioned intelligent terminal is carried out based on HTTP
Network is detected, obtains the second network testing result;
Wherein, above-mentioned second network testing result indicates that network is not connected or network-in-dialing, wherein, above-mentioned N1 be not less than
1 natural number.In the embodiment of the present invention, do not connect when the mode based on step 201 and step 202 detects network continuous N1 times
It is logical, and the above-mentioned configured information that can not surf the Net is not shown in the current status bar of above-mentioned intelligent terminal, in order to reduce the probability of erroneous judgement,
Now further triggering HTTP detections, namely network detection is carried out to above-mentioned intelligent terminal based on HTTP.
Optionally, being included based on HTTP to the progress network detection of above-mentioned intelligent terminal in step 203:To default n
Server sends HTTP connection requests respectively;If above-mentioned intelligent terminal is based on above-mentioned HTTP connection requests and above-mentioned n server
In any server be successfully established connection, it is determined that when the second secondary network testing result be network-in-dialing;If above-mentioned intelligence
Terminal can not be successfully established with any server in above-mentioned N number of server based on above-mentioned HTTP connection requests and is connected, it is determined that
When the second secondary network testing result is that network is not connected.Wherein, above-mentioned n is the natural number not less than 2.Further, it is possible to create
N thread is built, and the n thread parallel based on establishment sends HTTP connection requests respectively to n server, to improve detection effect
Rate.
Certainly, in the embodiment of the present invention, also may be used based on HTTP to the progress network detection of above-mentioned intelligent terminal in step 203
Think and only initiate HTTP connection requests to single server to carry out HTTP detections, do not limit herein.
Optionally, when the first network testing result determined when continuous N1 times indicates that network is not connected, with default
Another cycle obtains the connection status of each socket of above-mentioned intelligent terminal, to improve each set for obtaining above-mentioned intelligent terminal
The frequency of the connection status of word is connect, or, the first network testing result determined when continuous N1 times indicates that network is not connected
And do not shown in the current status bar of above-mentioned intelligent terminal it is above-mentioned can not surf the Net configured information when, obtained with default another cycle
The connection status of each socket of above-mentioned intelligent terminal, to improve the connection shape for each socket for obtaining above-mentioned intelligent terminal
The frequency of state.Above-mentioned raising obtains the frequency of the connection status of each socket of above-mentioned intelligent terminal namely shortens step 201
In " connection status for obtaining each socket of above-mentioned intelligent terminal " This move the execution cycle.
If step 204, the first network testing result determined for continuous N1 times indicate that network is not connected, and above-mentioned intelligence
The above-mentioned configured information that can not surf the Net is shown in the current status bar of terminal, it is determined that current above-mentioned intelligent terminal is currently at not
Net state can be gone up;
In the embodiment of the present invention, the first network testing result determined when continuous N1 times indicates that network is not connected, and
The above-mentioned configured information that can not surf the Net has been shown in the current status bar of above-mentioned intelligent terminal, then has shown that above-mentioned intelligent terminal is before
In net state can not be gone up, the process of HTTP detections can be now skipped, directly determines that current above-mentioned intelligent terminal is currently at
Net state can not be gone up.
If step 205, the first network testing result determined for continuous N2 times indicate network and not connected and above-mentioned second
Network testing result indicates that network is not connected, it is determined that above-mentioned intelligent terminal, which is currently at, can not go up net state;
In the embodiment of the present invention, above-mentioned N2 is more than N1.
It should be noted that if the continuous N2 times first network testing result determined indicates that network is not connected, and this
Shi Wei obtains above-mentioned second network testing result (such as in being detected also in HTTP), then may wait for the second network testing result
After acquisition, judge whether the second network testing result obtained indicates that network is not connected, if the second network testing result obtained
Indicate that network is not connected, it is determined that above-mentioned intelligent terminal, which is currently at, can not go up net state.Further, if second network is detected
As a result network-in-dialing is indicated, then the statistical number of first network testing result can be reset, step 201 is returned to afterwards, according to
The initial cycle obtains the connection status of each socket of above-mentioned intelligent terminal.Or, obtaining above-mentioned second network detection
As a result after, if the second network testing result indicates that network is not connected, monitor and whether obtained again after triggering HTTP detections
(N2-N1) individual first network testing result, if not obtaining (N2-N1) individual first network testing result, is waited, if obtaining again
(N2-N1) individual first network testing result, then judge whether that the first network testing result determined for continuous N2 times indicates net
Network is not connected, if judging, the first network testing result determined for continuous N2 times indicates that network is not connected, it is determined that above-mentioned intelligence
Energy terminal, which is currently at, can not go up net state.When the second network testing result instruction network-in-dialing, or judge not continuous
, can be clear by the statistical number of first network testing result when the first network testing result determined for N2 times indicates that network is not connected
Zero, step 201 is returned to afterwards, and the connection status of each socket of above-mentioned intelligent terminal is obtained according to the initial cycle.
Step 206, when it is determined that above-mentioned intelligent terminal is currently at when can not go up net state, in the state of above-mentioned intelligent terminal
The above-mentioned configured information that can not surf the Net is shown in column;
In the embodiment of the present invention, in order to allow users to the network for knowing the current network that networks of above-mentioned intelligent terminal in time
State, when determine every time above-mentioned intelligent terminal be currently at can not go up net state when, in the status bar of above-mentioned intelligent terminal show
Show the above-mentioned configured information that can not surf the Net, so that the real-time network state of above-mentioned intelligent terminal can be known in time by obtaining user.
Specifically, net state can not be gone up when determining that above-mentioned intelligent terminal is currently at, and the status bar of above-mentioned intelligent terminal
It is middle can not surf the Net configured information when, the above-mentioned configured information that can not surf the Net is shown in the status bar of above-mentioned intelligent terminal;When true
Fixed above-mentioned intelligent terminal, which is currently to go up, has shown the instruction that can not surf the Net in net state, and the status bar of above-mentioned intelligent terminal
During information, the display of the above-mentioned configured information that can not surf the Net is kept in the status bar of above-mentioned intelligent terminal.
Further, the network detecting method in the embodiment of the present invention can also include:Record the result of each network detection
(such as above-mentioned first network testing result and/or above-mentioned second network testing result), to facilitate user or technical staff to call
The result of network detection is analyzed 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 means, it is above-mentioned
Network detection means can be independent equipment, or can also be integrated in intelligent terminal (such as mobile phone, tablet personal computer) or
In miscellaneous equipment, it is not construed as limiting herein.
Therefore, in embodiments of the present invention, under the networking state of intelligent terminal, periodically obtain the intelligent terminal
The connection status of each socket and the connection status of each socket based on acquisition determine when time first network detection
As a result, and when the first network testing result determined for continuous N1 times indicates that network is not connected, based on Hyper text transfer association
View carries out network detection to the intelligent terminal, obtains the second network testing result, the first network inspection determined at continuous N2 times
When survey result indicates that network is not connected and the second network testing result indicates that network is not connected, determine that the intelligent terminal is current
In net state can not be gone up.Examined by combining the network detection mode based on socket and the network based on HTTP
Survey mode, can avoid causing the inaccurate situation of testing result using single network detection mode, improve network detection
Accuracy, in addition, the present invention it is determined that the intelligent terminal be currently at can not on net state when, export default can not surf the Net refer to
Show information, so that the network state of current connected network can be known in time by obtaining user.In addition, the embodiment of the present invention is continuous
The first network testing result determined for N1 times indicates that network is not connected, and do not shown in the status bar of intelligent terminal can not on
Under the networking state of net configured information intelligent terminal, HTTP detections are just further carried out, mistake on the one hand can be reduced under the scene
The possibility sentenced, on the other hand can also show that the configured information that can not surf the Net skips HTTP inspections in the status bar of intelligent terminal
Survey, improve detection efficiency.
Embodiment three
The embodiment of the present invention also provides a kind of network detection means, as shown in figure 3, the network detection in the embodiment of the present invention
Device 300 includes:
Acquiring unit 301, each set under the networking state of intelligent terminal, periodically obtaining the intelligent terminal
The connection status of word is connect, wherein, the networking state is the state for having connected wireless network;
First determining unit 302, the connection shape for each socket according to being obtained when time acquiring unit 301
State, it is determined that when secondary first network testing result, wherein, the first network testing result indicates that network is not connected or network connects
It is logical;
Http detection units 303, for being detected when the first network that the first determining unit 302 is determined for continuous N1 time
When as a result indicating that network is not connected, network detection is carried out to the intelligent terminal based on HTTP, second is obtained
Network testing result, wherein, the second network testing result indicates that network is not connected or network-in-dialing, wherein, the N1 is
Natural number not less than 1;
Second determining unit 304, for being detected when the first network that the first determining unit 302 is determined for continuous N2 time
When as a result indicating that network is not connected, and the second network testing result that the http detection units are obtained indicates network not
During connection, net state can not be gone up by determining that the intelligent terminal is currently at, wherein, the N2 is more than N1;
Network state indicating member 305, for when the second determining unit 304 determines that the intelligent terminal is currently at can not
During upper net state, the default configured information that can not surf the Net is exported, net state can not be gone up to indicate that the intelligent terminal is currently at.
Optionally, network state indicating member 305 specifically for:When the second determining unit 304 determines the intelligent terminal
It is currently at when can not go up net state, can not surf the Net configured information in the status bar of the intelligent terminal described in display.
Optionally, http detection units 303 specifically for:Described in being determined for continuous N1 times when the first determining unit 302
First network testing result indicates that network is not connected, and do not shown in the current status bar of the intelligent terminal it is described can not on
During net configured information, network detection is carried out to the intelligent terminal based on HTTP;Second determining unit 304 is additionally operable to:When first
The first network testing result that determining unit 302 is determined for continuous N1 times indicates that network is not connected, and the intelligence is eventually
During the configured information that can not be surfed the Net described in having been shown in the current status bar in end, determining that the intelligent terminal is currently at can not surf the Net
State.
Optionally, acquiring unit 301 is additionally operable to:The first network testing result determined when continuous N1 times is indicated
When network is not connected, the connection status of each socket of the intelligent terminal is obtained with default another cycle, is obtained with improving
Take the frequency of the connection status of each socket of the intelligent terminal.
Optionally, http detection units 303 specifically for:Described in being determined for continuous N1 times when the first determining unit 302
When first network testing result indicates that network is not connected, HTTP connection requests are sent respectively to default N number of server;Work as base
When above-mentioned HTTP connection requests and any server in above-mentioned N number of server are successfully established and be connected, above-mentioned second net is determined
Network testing result is network-in-dialing;When can not be with any server in above-mentioned N number of server based on above-mentioned HTTP connection requests
When being successfully established connection, determine that above-mentioned second network testing result does not connect for network.
It should be noted that the network detection means in the embodiment of the present invention can be independent equipment, or can also
It is integrated in intelligent terminal (such as mobile phone, tablet personal computer) or miscellaneous equipment, is not construed as limiting herein.
Therefore, in embodiments of the present invention, under the networking state of intelligent terminal, periodically obtain the intelligent terminal
The connection status of each socket and the connection status of each socket based on acquisition determine when time first network detection
As a result, and when the first network testing result determined for continuous N1 times indicates that network is not connected, based on Hyper text transfer association
View carries out network detection to the intelligent terminal, obtains the second network testing result, the first network inspection determined at continuous N2 times
When survey result indicates that network is not connected and the second network testing result indicates that network is not connected, determine that the intelligent terminal is current
In net state can not be gone up.Examined by combining the network detection mode based on socket and the network based on HTTP
Survey mode, can avoid causing the inaccurate situation of testing result using single network detection mode, improve network detection
Accuracy, in addition, the present invention it is determined that the intelligent terminal be currently at can not on net state when, export default can not surf the Net refer to
Show information, so that the network state of current connected network can be known in time by obtaining user.
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 used to store software program and module, and processor 402 is deposited by operation
The software program and unit in memory 401 are stored up, so as to perform various function application and data processing.Specifically, handle
Device 402 realizes following steps when being stored in the above computer program of memory 401 by operation:
Under the networking state of intelligent terminal, the connection status of each socket of the intelligent terminal is periodically obtained,
Wherein, the networking state is the state for having connected wireless network;
The connection status of each socket according to when time acquisition, it is determined that work as secondary first network testing result, its
In, the first network testing result indicates that network is not connected or network-in-dialing;
If continuous N1 times the first network testing result determined indicates that network is not connected, passed based on hypertext
Defeated agreement carries out network detection to the intelligent terminal, obtains the second network testing result, wherein, the second network detection knot
Fruit indicates that network is not connected or network-in-dialing, wherein, the N1 is the natural number not less than 1;
If continuous N2 times the first network testing result determined indicates that network is not connected and second network
Testing result indicates that network is not connected, it is determined that the intelligent terminal, which is currently at, can not go up net state, wherein, the N2 is more than
N1;
When it is determined that the intelligent terminal is currently at when can not go up net state, exporting the default configured information that can not surf the Net,
Net state can not be gone up to indicate that the 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, the default configured information that can not surf the Net of the output, including:
Can not surf the Net configured information in the status bar of the intelligent terminal described in display.
It is described in the third the possible embodiment provided based on above-mentioned second possible embodiment
If continuous N1 times the first network testing result determined indicates that network is not connected, based on HTTP pair
The intelligent terminal carries out network detection, is:
If continuous N1 times the first network testing result determined indicates that network is not connected, and the intelligent terminal
The configured information that can not surf the Net is not shown in current status bar, then the intelligent terminal is entered based on HTTP
Row network is detected;
If continuous N1 times the first network testing result determined indicates that network is not connected, and the intelligent terminal
The configured information that can not surf the Net has been shown in current status bar, it is determined that the intelligent terminal be currently at can not go up it is netted
State.
In the first above-mentioned possible implementation, either above-mentioned second possible implementation or the above-mentioned 3rd
In the 4th kind of possible embodiment provided based on the possible implementation of kind, processor 402, which passes through to run, to be stored
Following steps are also realized in the above computer program of memory 401:
If continuous N1 times the first network testing result determined indicates that network is not connected, with default another
Cycle obtains the connection status of each socket of the intelligent terminal, to improve each socket for obtaining the intelligent terminal
Connection status frequency.
In the first above-mentioned possible implementation, either above-mentioned second possible implementation or the above-mentioned 3rd
It is described to be based on HTTP in the 5th kind of possible embodiment provided based on the possible implementation of kind
Network detection is carried out to the intelligent terminal, the second network testing result is obtained, including:
HTTP connection request is sent respectively to default N number of server;
It is successfully established when based on the HTTP connection request with any server in N number of server
During connection, it is network-in-dialing to determine the second network testing result;
It can not succeed when based on the HTTP connection request with any server in N number of server
When setting up connection, determine that the second network testing result does not connect for network.
Further, as shown in figure 4, above-mentioned intelligent terminal may also include:One or more input equipments 403 (only show in Fig. 4
Go out one) 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 CPU (Central
Processing Unit, CPU), the processor can also be other general processors, digital signal processor (Digital
Signal Processor, DSP), application specific integrated circuit (Application Specific Integrated Circuit,
ASIC), ready-made programmable gate array (Field-Programmable Gate Array, FPGA) or other FPGAs
Device, discrete gate or transistor logic, discrete hardware components etc..General processor can be microprocessor or this at
It can also be any conventional processor etc. to manage device.
Input equipment 403 can include keyboard, Trackpad, fingerprint adopt sensor (finger print information that is used to gathering user and
The directional information of fingerprint), microphone etc., output equipment 404 can include display, loudspeaker etc..
Memory 404 can include read-only storage and random access memory, and provide instruction sum 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 networking state of intelligent terminal, periodically obtain the intelligent terminal
The connection status of each socket and the connection status of each socket based on acquisition determine when time first network detection knot
Really, and when the first network testing result determined for continuous N1 times indicates that network is not connected, based on HTTP
Network detection is carried out to the intelligent terminal, the second network testing result is obtained, the first network detection determined at continuous N2 times
When as a result indicating that network is not connected and the second network testing result indicates that network is not connected, determine that the intelligent terminal is currently located
In net state can not be gone up.Detected by combining the network detection mode based on socket and the network based on HTTP
Mode, can avoid causing the inaccurate situation of testing result using single network detection mode, improve the standard of network detection
True property, in addition, the present invention it is determined that the intelligent terminal be currently at can not on net state when, export the default instruction that can not surf the Net
Information, so that the network state of current connected network can be known in time by obtaining user.
It is apparent to those skilled in the art that, for convenience of description and succinctly, only with above-mentioned each work(
Energy unit, the division progress of module are for example, in practical application, as needed can distribute above-mentioned functions by different
Functional unit, module are completed, i.e., the internal structure of said apparatus is divided into different functional unit or module, more than completion
The all or part of function of description.Each functional unit, module in embodiment can be integrated in a processing unit, also may be used
To be that unit is individually physically present, can also two or more units it is integrated in a unit, it is above-mentioned integrated
Unit can both be realized in the form of hardware, it would however also be possible to employ the form of SFU software functional unit is realized.In addition, each function list
Member, the specific name of module are also only to facilitate mutually differentiation, is not limited to the protection domain of the application.Said system
The specific work process of middle unit, module, may be referred to the corresponding process in preceding method embodiment, will not be repeated here.
In the above-described embodiments, the description to each embodiment all emphasizes particularly on different fields, without detailed description or note in some embodiment
The part of load, may refer to the associated description of other embodiments.
Those of ordinary skill in the art are it is to be appreciated that the list of each example described with reference to the embodiments described herein
Member and algorithm steps, can be realized with the combination of electronic hardware or computer software and electronic hardware.These functions are actually
Performed with hardware or software mode, depending on the application-specific and design constraint of technical scheme.Professional and technical personnel
Described function can be realized using distinct methods to each specific application, 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 apparatus and method, others can be passed through
Mode is realized.For example, system embodiment described above is only schematical, for example, the division of above-mentioned module or unit,
It is only a kind of division of logic function, there can be other dividing mode when actually realizing, such as multiple units or component can be with
With reference to or be desirably integrated into another system, or some features can be ignored, or not perform.It is another, it is shown or discussed
Coupling each other or direct-coupling or communication connection can be by some interfaces, the INDIRECT COUPLING of device or unit or
Communication connection, can be electrical, machinery or other forms.
The above-mentioned unit illustrated as separating component can be or may not be it is physically separate, it is aobvious as unit
The part shown can be or may not be physical location, you can with positioned at a place, or can also be distributed to multiple
On NE.Some or all of unit therein can be selected to realize the mesh of this embodiment scheme according to the actual needs
's.
If above-mentioned integrated unit is realized using in the form of SFU software functional unit and as independent production marketing or used
When, it can be stored in a computer read/write memory medium.Understood based on such, the present invention realizes above-described embodiment side
All or part of flow in method, can also instruct the hardware of correlation to complete, above-mentioned computer by computer program
Program can be stored in a computer-readable recording medium, and the computer program can be achieved above-mentioned each when being executed by processor
The step of individual embodiment of the method.Wherein, above computer program includes computer program code, and above computer program code can
Think source code form, object identification code form, executable file or some intermediate forms etc..Above computer computer-readable recording medium can be with
Including:Any entity or device, recording medium, USB flash disk, mobile hard disk, magnetic disc, light of above computer program code can be carried
Disk, computer storage, read-only storage (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 computer
The content that computer-readable recording medium is included can carry out appropriate increase and decrease according to legislation in jurisdiction and the requirement of patent practice, for example
In some jurisdictions, according to legislation and patent practice, computer-readable medium does not include being 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 with reference to foregoing reality
Example is applied the present invention is described in detail, it will be understood by those within the art that:It still can be to foregoing each
Technical scheme described in embodiment is modified, or carries out equivalent substitution to which part technical characteristic;And these are changed
Or replace, the essence of appropriate technical solution is departed from the spirit and scope of various embodiments of the present invention technical scheme, all should
Within protection scope of the present invention.
Claims (10)
1. a kind of network detecting method, it is characterised in that including:
Under the networking state of intelligent terminal, the connection status of each socket of the intelligent terminal is periodically obtained, wherein,
The networking state is the state for having connected wireless network;
The connection status of each socket according to when time acquisition, it is determined that when secondary first network testing result, wherein, institute
State first network testing result and indicate that network is not connected or network-in-dialing;
If continuous N1 times the first network testing result determined indicates that network is not connected, based on Hyper text transfer association
View carries out network detection to the intelligent terminal, obtains the second network testing result, wherein, the second network testing result refers to
Show that network is not connected or network-in-dialing, wherein, the N1 is the natural number not less than 1;
If the continuous N2 times first network testing result determined indicates that network is not connected and second network is detected
As a result indicate that network is not connected, it is determined that the intelligent terminal, which is currently at, can not go up net state, wherein, the N2 is more than N1;
When it is determined that the intelligent terminal is currently at when can not go up net state, exporting the default configured information that can not surf the Net, to refer to
Net state can not be gone up by showing that the intelligent terminal is currently at.
2. network detecting method according to claim 1, it is characterised in that the default instruction letter that can not surf the Net of the output
Breath, including:
Can not surf the Net configured information in the status bar of the intelligent terminal described in display.
3. network detecting method according to claim 2, it is characterised in that if determine for described continuous N1 times described the
One network testing result indicates that network is not connected, then carries out network inspection to the intelligent terminal based on HTTP
Survey, be:
If continuous N1 times the first network testing result determined indicates that network is not connected, and the intelligent terminal is current
Status bar in do not show the configured information that can not surf the Net, then net is carried out to the intelligent terminal based on HTTP
Network is detected;
If continuous N1 times the first network testing result determined indicates that network is not connected, and the intelligent terminal is current
Status bar in shown the configured information that can not surf the Net, it is determined that the intelligent terminal, which is currently at, can not go up net state.
4. the network detecting method according to any one of claims 1 to 3, it is characterised in that if determine for continuous N1 times
The first network testing result indicates that network is not connected, then the network detecting method also includes:
The connection status of each socket of the intelligent terminal is obtained with default another cycle, the intelligence is obtained to improve
The frequency of the connection status of each socket of terminal.
5. the network detecting method according to any one of claims 1 to 3, it is characterised in that described to be based on Hyper text transfer
Agreement carries out network detection to the intelligent terminal, obtains the second network testing result, including:
HTTP connection request is sent respectively to default N number of server;
It is connected when being successfully established based on the HTTP connection request with any server in N number of server
When, it is network-in-dialing to determine the second network testing result;
It can not be successfully established when based on the HTTP connection request with any server in N number of server
During connection, determine that the second network testing result does not connect for network.
6. a kind of network detection means, it is characterised in that including:
Acquiring unit, under the networking state of intelligent terminal, periodically obtaining each socket of the intelligent terminal
Connection status, wherein, the networking state is the state for having connected wireless network;
First determining unit, for the connection status of each socket according to being obtained when time acquiring unit, it is determined that
When secondary first network testing result, wherein, the first network testing result indicates that network is not connected or network-in-dialing;
Http detection units, the first network testing result for determining for continuous N1 times when first determining unit is equal
When indicating that network is not connected, network detection is carried out to the intelligent terminal based on HTTP, the inspection of the second network is obtained
Result is surveyed, wherein, the second network testing result indicates that network is not connected or network-in-dialing, wherein, the N1 is not less than 1
Natural number;
Second determining unit, the first network testing result for determining for continuous N2 times when first determining unit is equal
When indicating that network is not connected, and the second network testing result that the http detection units are obtained indicates that network is not connected
When, net state can not be gone up by determining that the intelligent terminal is currently at, wherein, the N2 is more than N1;
Network state indicating member, for when second determining unit determine the intelligent terminal be currently at can not go up it is netted
During state, the default configured information that can not surf the Net is exported, net state can not be gone up to indicate that the intelligent terminal is currently at.
7. network detection means according to claim 6, it is characterised in that the network state indicating member is specifically used
In:When second determining unit determine the intelligent terminal be currently at can not go up net state when, in the intelligent terminal
Can not surf the Net configured information in status bar described in display.
8. network detection means according to claim 7, it is characterised in that
The http detection units specifically for:The first network inspection determined for continuous N1 times when first determining unit
Survey result and indicate that network is not connected, and do not show the configured information that can not surf the Net in the current status bar of the intelligent terminal
When, network detection is carried out to the intelligent terminal based on HTTP;
Second determining unit is additionally operable to:The first network detection determined for continuous N1 times when first determining unit
As a result indicate that network is not connected, and the configured information that can not surf the Net has been shown in the current status bar of the intelligent terminal
When, net state can not be gone up by determining that the intelligent terminal is currently at.
9. a kind of intelligent terminal, including memory, processor and it is stored in the memory and can be on the processor
The computer program of operation, it is characterised in that realize such as claim 1 to 5 described in the computing device during computer program
The step of any one methods described.
10. a kind of computer-readable recording medium, the computer-readable recording medium storage has computer program, its feature exists
In the step of realizing such as any one of claim 1 to 5 methods described when the computer program is executed by processor.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710630935.1A CN107332739B (en) | 2017-07-28 | 2017-07-28 | Network detecting method, network detection device and intelligent terminal |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710630935.1A CN107332739B (en) | 2017-07-28 | 2017-07-28 | Network detecting method, network detection device and intelligent terminal |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107332739A true CN107332739A (en) | 2017-11-07 |
CN107332739B CN107332739B (en) | 2019-01-15 |
Family
ID=60226382
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710630935.1A Active CN107332739B (en) | 2017-07-28 | 2017-07-28 | Network detecting method, network detection device and intelligent terminal |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107332739B (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109831359A (en) * | 2019-02-01 | 2019-05-31 | 维沃移动通信有限公司 | A kind of detection method and its terminal device of data network connection state |
CN112822740A (en) * | 2020-12-28 | 2021-05-18 | 广州绿怡信息科技有限公司 | Hotspot emission control method and device |
CN114338461A (en) * | 2021-12-30 | 2022-04-12 | 武汉斗鱼鱼乐网络科技有限公司 | Network connection monitoring method and related equipment |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120072544A1 (en) * | 2011-06-06 | 2012-03-22 | Precision Networking, Inc. | Estimating application performance in a networked environment |
CN103001835A (en) * | 2012-12-29 | 2013-03-27 | 电信科学技术第一研究所 | Network bandwidth test method and system based on data transmission |
CN103067777A (en) * | 2012-12-24 | 2013-04-24 | 深圳Tcl新技术有限公司 | Method and device of prompting of network state |
CN104734908A (en) * | 2006-03-02 | 2015-06-24 | 诺基亚公司 | Mode supporting target network access through wireless access networks |
US20160359681A1 (en) * | 2015-06-03 | 2016-12-08 | Openwave Mobility Inc. | Method & apparatus for managing connections in a communication network |
-
2017
- 2017-07-28 CN CN201710630935.1A patent/CN107332739B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104734908A (en) * | 2006-03-02 | 2015-06-24 | 诺基亚公司 | Mode supporting target network access through wireless access networks |
US20120072544A1 (en) * | 2011-06-06 | 2012-03-22 | Precision Networking, Inc. | Estimating application performance in a networked environment |
CN103067777A (en) * | 2012-12-24 | 2013-04-24 | 深圳Tcl新技术有限公司 | Method and device of prompting of network state |
CN103001835A (en) * | 2012-12-29 | 2013-03-27 | 电信科学技术第一研究所 | Network bandwidth test method and system based on data transmission |
US20160359681A1 (en) * | 2015-06-03 | 2016-12-08 | Openwave Mobility Inc. | Method & apparatus for managing connections in a communication network |
Non-Patent Citations (1)
Title |
---|
陆倩: "《联网嵌入式系统可用性检测机制的研究与实现》", 《中国优秀硕士学位论文全文数据库信息科技辑》 * |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109831359A (en) * | 2019-02-01 | 2019-05-31 | 维沃移动通信有限公司 | A kind of detection method and its terminal device of data network connection state |
CN112822740A (en) * | 2020-12-28 | 2021-05-18 | 广州绿怡信息科技有限公司 | Hotspot emission control method and device |
CN112822740B (en) * | 2020-12-28 | 2022-09-27 | 广州绿怡信息科技有限公司 | Hotspot emission control method and device |
CN114338461A (en) * | 2021-12-30 | 2022-04-12 | 武汉斗鱼鱼乐网络科技有限公司 | Network connection monitoring method and related equipment |
Also Published As
Publication number | Publication date |
---|---|
CN107332739B (en) | 2019-01-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10644962B2 (en) | Continuous monitoring for performance evaluation of service interfaces | |
CN110445653B (en) | Network state prediction method, device, equipment and medium | |
WO2020037918A1 (en) | Risk control strategy determining method based on predictive model, and related device | |
CN103905447B (en) | Service link selects control method and equipment | |
CN107231647A (en) | Network detecting method, network detection means and intelligent terminal | |
CN107294811A (en) | Network detecting method, network detection means and intelligent terminal | |
CN107682397A (en) | Customer resources acquisition methods, device, terminal device and storage medium | |
CN107332739A (en) | Network detecting method, network detection means and intelligent terminal | |
CN110225104A (en) | Data capture method, device and terminal device | |
CN108718347A (en) | A kind of domain name analytic method, system, device and storage medium | |
CN107396287A (en) | The choosing method and device of a kind of working frequency points | |
CN107484190B (en) | Method for connecting network, mobile terminal and computer readable storage medium | |
CN107276856A (en) | Network detecting method, network detection means and intelligent terminal | |
CN107333287A (en) | Network detecting method, network detection means and intelligent terminal | |
CN110380925A (en) | A kind of network equipment detection middle port selection method and system | |
CN107332741B (en) | A kind of network detecting method, network detection device and intelligent terminal | |
CN109640379A (en) | Link aggregation implementation method and Related product | |
CN107360059B (en) | Network detecting method, network detection device and intelligent terminal | |
CN107294812B (en) | Network detecting method, network detection device and intelligent terminal | |
CN107241758A (en) | Network control method, network control unit and intelligent terminal | |
CN107277896A (en) | Wifi hotspot management method, device and terminal device | |
CN111147330A (en) | Network quality evaluation method and device, storage medium and processor | |
CN107528677A (en) | Information sends failure way to play for time and device | |
Folino et al. | Automatic offloading of mobile applications into the cloud by means of genetic programming | |
CN111786898B (en) | Monitoring equipment information acquisition method, device, equipment and 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 |