CN107277881A - Method for switching network, network switching device and intelligent terminal - Google Patents

Method for switching network, network switching device and intelligent terminal Download PDF

Info

Publication number
CN107277881A
CN107277881A CN201710659860.XA CN201710659860A CN107277881A CN 107277881 A CN107277881 A CN 107277881A CN 201710659860 A CN201710659860 A CN 201710659860A CN 107277881 A CN107277881 A CN 107277881A
Authority
CN
China
Prior art keywords
network
intelligent terminal
less
data network
wifi
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201710659860.XA
Other languages
Chinese (zh)
Inventor
胡亚东
宋永耀
刘铭
候祥
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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 CN201710659860.XA priority Critical patent/CN107277881A/en
Publication of CN107277881A publication Critical patent/CN107277881A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W36/00Hand-off or reselection arrangements
    • H04W36/24Reselection being triggered by specific parameters
    • H04W36/30Reselection being triggered by specific parameters by measured or perceived connection quality data
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W36/00Hand-off or reselection arrangements
    • H04W36/14Reselecting a network or an air interface

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention provides a kind of method for switching network, network switching device, intelligent terminal and computer-readable recording medium, the method for switching network includes:Under the networking state of intelligent terminal, detect whether the connectedness for the cellular data network that presently described intelligent terminal is supported is not less than default data network quality criteria, wherein, the networking state is the state for having connected WiFi network;If the connectedness for the cellular data network that presently described intelligent terminal is supported is not less than default data network quality criteria, the WiFi network currently used to the intelligent terminal carries out detection of connectivity;It is the cellular data network by the currently used network switching of the intelligent terminal if the result of the detection of connectivity indicates that the WiFi network is not connected.The technical scheme that the present invention is provided can realize the automatic switchover from WiFi network to cellular data network.

Description

Method for switching network, network switching device and intelligent terminal
Technical field
The invention belongs to net application technology field, more particularly to a kind of method for switching network, network switching device, 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, connected the situation of WiFi network in intelligent terminal Under, it is possible that the situation that the WiFi network connected can not be used, now only finds connected WiFi nets in user After network can not be used, other WiFi networks or cellular data network are manually switched to, is only possible to continue to surf the Net.
The content of the invention
In view of this, can the invention provides a kind of method for switching network, network switching device, intelligent terminal and computer Storage medium is read, to realize the automatic switchover from WiFi network to cellular data network.
The first aspect of the embodiment of the present invention provides a kind of method for switching network, including:
Under the networking state of intelligent terminal, the connectedness for the cellular data network that presently described intelligent terminal is supported is detected Whether default data network quality criteria is not less than, wherein, the networking state is the state for having connected WiFi network;
If the connectedness for the cellular data network that presently described intelligent terminal is supported is not less than default data network quality Benchmark, then the WiFi network currently used to the intelligent terminal carry out detection of connectivity;
If the result of the detection of connectivity indicates that the WiFi network is not connected, and the intelligent terminal is currently used Network switching be the cellular data network.
Based on first aspect present invention, in the first possible implementation, the presently described intelligent terminal of detection Whether the connectedness of the cellular data network of support is not less than default data network quality criteria, including:
The intelligent terminal is triggered to send out to the default network equipment based on the cellular data network and three-way handshake agreement TCP connections are played, wherein, the TCP is transmission control protocol;
If the TCP connections have been set up, judge whether this connection duration connects duration threshold value less than default, its In, it is a length of during the connection:The passed through duration of the TCP connections foundation is connected to from the TCP is initiated;
If this connection duration judges the honeycomb number that presently described intelligent terminal is supported less than the connection duration threshold value It is not less than the data network quality criteria according to the connectedness of network;
If the TCP connections can not be set up or this connection duration is not less than the connection duration threshold value, judge to work as The connectedness for the cellular data network that the preceding intelligent terminal is supported is less than the data network quality criteria.
The first possible implementation based on first aspect present invention or first aspect present invention, can at second In the implementation of energy, the method for switching network also includes:Under the networking state of intelligent terminal, the intelligent terminal is detected Whether currently used WiFi network is less than default first WiFi network quality criteria;
Whether the connectedness for the cellular data network that the presently described intelligent terminal of detection is supported is not less than default number According to network quality benchmark, it is:It is less than first WiFi network when detecting the currently used WiFi network of the intelligent terminal During quality criteria, detect whether the connectedness for the cellular data network that presently described intelligent terminal is supported is not less than default data Network quality benchmark.
Second of possible implementation based on first aspect present invention, in the third possible implementation, if The connectedness for the cellular data network that presently described intelligent terminal is supported is not less than the data network quality criteria, then the net Network switching method also includes:
Detect whether the currently used WiFi network of the intelligent terminal is less than default second WiFi network quality criteria;
, will be described if the currently used WiFi network of the intelligent terminal is less than the second WiFi network quality criteria The currently used network switching of intelligent terminal is the cellular data network;
Wherein, the network quality that the second WiFi network quality criteria is reflected is less than the first WiFi network quality The network quality reflected.
The second aspect of the embodiment of the present invention provides a kind of network switching device, including:First detection unit, for Under the networking state of intelligent terminal, detect whether the connectedness for the cellular data network that presently described intelligent terminal is supported is not less than Default data network quality criteria, wherein, the networking state is the state for having connected WiFi network;
Second detection unit, during for being when the result that first detection unit is detected, works as to the intelligent terminal The preceding WiFi network used carries out detection of connectivity;
Network switch unit, the result for being detected in second detection unit indicates that the WiFi network is not connected When, it is the cellular data network by the currently used network switching of the intelligent terminal.
Based on second aspect of the present invention, in the first possible implementation, second detection unit includes:
Trigger element, during for being when the result that first detection unit is detected, triggering the intelligent terminal and being based on Cellular data network and the three-way handshake agreement initiates TCP connections to the default network equipment, wherein, the TCP is transmission Control protocol;
Judging unit, for when the TCP connections it is built immediately, judge this connection duration whether be less than default connection Duration threshold value, wherein, it is a length of during the connection:The passed through duration of the TCP connections foundation is connected to from the TCP is initiated; If this connection duration judges the cellular data network that presently described intelligent terminal is supported less than the connection duration threshold value Connectedness is not less than the data network quality criteria;If the TCP connections can not be set up or this connection duration is not less than The connection duration threshold value, then judge that the connectedness for the cellular data network that presently described intelligent terminal is supported is less than the data Network quality benchmark.
Based on the first possible implementation of second aspect of the present invention, or second aspect of the present invention, at second In possible implementation, the network switching device also includes:
3rd detection unit, under the networking state of intelligent terminal, detecting that the intelligent terminal is currently used Whether WiFi network is less than default first WiFi network quality criteria;
First detection unit specifically for:Under the networking state of intelligent terminal, when the 3rd detection unit inspection The result of survey is when being, detects it is default whether the connectedness for the cellular data network that presently described intelligent terminal is supported is not less than Data network quality criteria.
Second of possible implementation based on second aspect of the present invention, in the third possible implementation, institute Stating network switching device also includes:
4th detection unit, during for being when the result that first detection unit is detected, detects the intelligent terminal Whether currently used WiFi network is less than default second WiFi network quality criteria;
The network switch unit is additionally operable to:When the result that the 4th detection unit is detected is to be, by the intelligence The currently used network switching of terminal is the cellular data network;
Wherein, the network quality that the second WiFi network quality criteria is reflected is less than the first WiFi network quality The network quality reflected.
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 method for switching network 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 method for switching network referred in possible implementation.
Therefore, in the present invention program, under the networking state of intelligent terminal, detect the honeybee that the intelligent terminal is supported Whether the connectedness of nest data network is not less than default data network quality criteria, if being not less than, further detects the intelligence The connectedness of the currently used WiFi network of energy terminal, it is when the WiFi network is not connected, the intelligent terminal is currently used Network switching is cellular data network, on the one hand, the network handover routines of the present invention program without user participate in, can be achieved from On the other hand WiFi network, is not less than to the automatic switchover of cellular data network in the connectedness for detecting cellular data network The detection of connectivity of WiFi network is carried out during default data network quality criteria, it can be ensured that in the net for using intelligent terminal Network, which is automatically switched to after cellular data network, can continue to online.
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.
Method for switching network one embodiment schematic flow sheet that Fig. 1-a provide for the present invention;
A kind of specific implementation schematic flow sheet of step 101 in Fig. 1-a that Fig. 1-b provide for the present invention;
Network switching device one embodiment structural representation that Fig. 2 provides for the present invention;
Intelligent terminal one embodiment structural representation that Fig. 3 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 method for switching network, refers to the network switching in Fig. 1-a, the embodiment of the present invention Method includes:
Step 101, under the networking state of intelligent terminal, the cellular data network that the current above-mentioned intelligent terminal of detection is supported Connectedness whether be not less than default data network quality criteria;
In the embodiment of the present invention, above-mentioned networking state is the state for having connected WiFi network.Above-mentioned cellular data network Type includes but is not limited to 2G networks, 3G network and 4G networks.The cellular data network that above-mentioned intelligent terminal is supported is on the one hand The type for the cellular data network itself supported depending on the intelligent terminal, on the other hand also depends on and accesses the intelligent terminal In the set meal opened of wireless network card.For example, when the type for the cellular data network that intelligent terminal itself is supported is 2G Network, 3G network and 4G networks, and the set meal that the wireless network card accessed in the intelligent terminal is opened only includes 2G networks Data traffic, the then cellular data network that above-mentioned intelligent terminal is supported is 2G networks.
Optionally, when above-mentioned intelligent terminal supports a variety of cellular data networks simultaneously, with transmission speed most fast honeycomb The cellular data network of data network by default, and the cellular data network that step 101 is detected also is above-mentioned intelligent terminal The cellular data network of acquiescence.For example, when above-mentioned intelligent terminal supports 2G networks and 4G networks simultaneously, step 101 table It is now:Under the networking state of intelligent terminal, whether the connectedness for the 4G networks that the current above-mentioned intelligent terminal of detection is supported is not low In default data network quality criteria.
Because transmission control protocol (TCP, Transmission Control Protocol) belongs to reliable protocol, therefore, Determine only perform a TCP connection during connectedness of network by TCP, relative to the detection mode based on non-reliable protocol, Data traffic can effectively be saved.For example, when using ping modes (ping modes be based on Internet Control Message Protocol (ICMP, Internet Control Message Protocol), and ICMP is based on UDP (UDP, User Datagram Protocol), UDP is a kind of non-reliable protocol) carry out needing ping just to can determine that network many times during the detection of connectivity of network Connectedness.Therefore it is optional, supported in the embodiment of the present invention using the TCP current above-mentioned intelligent terminal of three-way handshake protocol detection Cellular data network connectedness whether be not less than default data network quality criteria.Specifically, as shown in Fig. 1-b, on Whether the connectedness for stating the cellular data network that the current above-mentioned intelligent terminal of detection is supported is not less than default data network quality Benchmark, including:
Step 1011, the above-mentioned intelligent terminal of triggering are based on above-mentioned cellular data network and three-way handshake agreement to default net Network equipment initiates TCP connections;
In the embodiment of the present invention, the address information of the above-mentioned network equipment (such as server) can be pre-set, for example mutually Networking protocol (IP, Internet Protocol) address, domain name and port numbers etc.., can be according to default in step 1011 The address information of the above-mentioned network equipment, trigger cellular data network based on acquiescence of above-mentioned intelligent terminal and three-way handshake agreement to The network equipment initiates TCP connections.
If step 1012, above-mentioned TCP connections have been set up, judge whether this connection duration is less than default connection duration Threshold value;
In step 1012, it is a length of during above-mentioned connection:It is connected to above-mentioned TCP connections from the above-mentioned TCP of initiation and sets up and is passed through Duration.For example, triggering above-mentioned TCP connections when being located at time T1, above-mentioned TCP connections are successfully established in time T2, then on State connection duration as T2-T1.
If step 1013, this connection duration are less than above-mentioned connection duration threshold value, current above-mentioned intelligent terminal branch is judged The connectedness for the cellular data network held is not less than above-mentioned data network quality criteria;
In step 1013, when judging that this connection duration is less than the connection duration threshold value, it is believed that current data net Network it is connective good, now can determine that the connectedness for the cellular data network that current above-mentioned intelligent terminal is supported is not less than above-mentioned number According to network quality benchmark.
If step 1014, above-mentioned TCP connections can not be set up or this connection duration is not less than above-mentioned connection duration threshold value, Then judge that the connectedness for the cellular data network that current above-mentioned intelligent terminal is supported is less than above-mentioned data network quality criteria;
In step 1014, when the TCP connections that step 1011 is triggered can not be successfully established, it is believed that now above-mentioned honeycomb Data network can not be used, and now can determine that the connectedness for the cellular data network that current above-mentioned intelligent terminal is supported less than above-mentioned Data network quality criteria.When the TCP successful connections that step 1011 is triggered are set up, when this connection duration is not less than above-mentioned connection Duration threshold value, then be believed that the poor connectivity of now above-mentioned cellular data network, now also can determine that current above-mentioned intelligent terminal The connectedness of the cellular data network of support is less than above-mentioned data network quality criteria.
If the connectedness for the cellular data network that step 102, current above-mentioned intelligent terminal are supported is not less than default data Network quality benchmark, then the WiFi network currently used to above-mentioned intelligent terminal carry out detection of connectivity;
In the embodiment of the present invention, when step 101 detects the company for the cellular data network that current above-mentioned intelligent terminal is supported When the general character is not less than above-mentioned data network quality criteria, the cellular data network for showing current above-mentioned intelligent terminal is to be adapted to user Use.Now further the WiFi network currently used to above-mentioned intelligent terminal carries out detection of connectivity.
, can be by the connection status of each socket for obtaining above-mentioned intelligent terminal in a kind of application scenarios;According to When the connection status of each socket of the secondary acquisition WiFi network currently used to above-mentioned intelligent terminal carries out detection of connectivity. Specifically, can be according to when time connection status of each socket of acquisition, detection connection status is the socket of not connected state Number whether be more than and default do not connect threshold value;If the number for detecting connection status for the not socket of connected state is more than This does not connect threshold value, then can determine that above-mentioned WiFi is not connected;If detecting of the connection status for the not socket of connected state Number is not more than this and does not connect threshold value, then can determine that above-mentioned WiFi connections.Can also be according to even in the case where above-mentioned WiFi is connected Connect state and judge whether the WiFi network is less than default WiFi network quality criteria for the number of the not socket of connected state. Or, also according to when time connection status of each socket of acquisition, detection connection status is the not socket of connected state Whether the ratio (such as M1/M2) of quantity (such as M1) and the quantity (such as M2) when secondary total socket is more than default ratio Threshold value;If detecting M1/M2 more than the fractional threshold, it can determine that above-mentioned WiFi is not connected;If detecting M1/M2 is not more than this Fractional threshold, then can determine that above-mentioned WiFi connections.For example, setting step 101 when the secondary connection shape for obtaining 10 sockets State, the quantity without the socket of connected state is 6, then M1/M2 is equal to 6/10, when the fractional threshold is not more than 6/10 When, above-mentioned WiFi connections are can determine that, when the fractional threshold is less than 6/10, can determine that above-mentioned WiFi is not connected.Further, upper It can also judge whether the WiFi network is less than default WiFi in the case of stating WiFi connections according to above-mentioned ratio (i.e. M1/M2) Network quality benchmark.
In the embodiment of the present invention, it can obtain each from the TCP kernels (such as TCP protocol stack information) of above-mentioned intelligent terminal The attribute information of individual socket (namely socket), it is corresponding based on the attribute information determination as time each socket of acquisition Socket connection status.In embodiments of the present invention, socket attribute include 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.The attribute information of each socket based on acquisition can be determined Corresponding socket connection status.For example, in a kind of application scenarios, for any socket, as the socket got State attributes value be TCP_SYN_SENT, and the RTT attributes of the socket value be 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.
Certainly, in the embodiment of the present invention, it would however also be possible to employ the other manner WiFi net currently used to above-mentioned intelligent terminal Network carries out detection of connectivity, mode, the ping modes detected for example with http, does not limit herein.
If step 103, the result of above-mentioned detection of connectivity indicate that above-mentioned WiFi network is not connected, by above-mentioned intelligent terminal Currently used network switching is above-mentioned cellular data network;
In the embodiment of the present invention, when the result that step 102 is detected indicates that above-mentioned WiFi network is not connected, show current use Family can not normally be surfed the Net based on the WiFi connected, now, and the currently used network of above-mentioned intelligent terminal is automatically switched to Above-mentioned cellular data network.
Specifically, the above-mentioned network switching that above-mentioned intelligent terminal is currently used is above-mentioned cellular data network to be: Enable the cellular data network of above-mentioned intelligent terminal and disconnect the WiFi network of above-mentioned intelligent terminal, or, enable above-mentioned intelligence The cellular data network of terminal and the WiFi function for closing above-mentioned intelligent terminal.
It should be noted that under the networking state of above-mentioned intelligent terminal, can periodically perform step 101, i.e. cycle Property the connectedness of cellular data network supported of the current above-mentioned intelligent terminal of detection whether be not less than default data network quality Benchmark.
Or, it can also work as and execution step 101 when preparatory condition is met is met under the networking state of above-mentioned intelligent terminal, For example, in a kind of application scenarios, the method for switching network in the embodiment of the present invention can also include:In the networking of intelligent terminal Under state, detect whether the currently used WiFi network of above-mentioned intelligent terminal is less than default first WiFi network quality criteria, When detecting the currently used WiFi network of above-mentioned intelligent terminal less than the first WiFi network quality criteria, step is just performed " whether the connectedness for the cellular data network that the current above-mentioned intelligent terminal of detection is supported is not less than default data network in 101 The action of quality criteria ".On the one hand the detection to cellular data network that taken place frequently in the case where WiFi network is unobstructed can be avoided Caused by power wastage, on the other hand, WiFi network be less than the first WiFi network quality criteria when perform step 101 in " whether the connectedness for the cellular data network that the current above-mentioned intelligent terminal of detection is supported is not less than default data network quality base The action of standard ", can perform the method for switching network flow shown in Fig. 1-a in time in the case where WiFi network is deteriorated, reach net The purpose that network switches in time.Under this application scenarios, if step 101 detects the cellular data that current above-mentioned intelligent terminal is supported The connectedness of network is not less than above-mentioned data network quality criteria, then can further detect that above-mentioned intelligent terminal is currently used Whether WiFi network is less than default second WiFi network quality criteria, when the currently used WiFi network of above-mentioned intelligent terminal is low It is above-mentioned honeycomb number equally by the currently used network switching of above-mentioned intelligent terminal when above-mentioned second WiFi network quality criteria According to network.Wherein, the network quality that above-mentioned second WiFi network quality criteria is reflected is less than above-mentioned first WiFi network quality The network quality reflected.Whether it is less than default first on the above-mentioned WiFi network for judging that above-mentioned intelligent terminal is currently used Whether WiFi network quality criteria and the above-mentioned WiFi network for judging that above-mentioned intelligent terminal is currently used are less than default second The specific implementation of WiFi network quality criteria is referred to the associated description in step 102, and here is omitted.
It should be noted that the method for switching network in the embodiment of the present invention can be applied in network switching device, it is above-mentioned Network switching device 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, detect what the intelligent terminal was supported Whether the connectedness of cellular data network is not less than default data network quality criteria, if being not less than, and further detection should The connectedness of the currently used WiFi network of intelligent terminal, it is when the WiFi network is not connected, the intelligent terminal is currently used Network switching be cellular data network, on the one hand, the network handover routines of the present invention program without user participate in, can be achieved from On the other hand WiFi network, is not less than to the automatic switchover of cellular data network in the connectedness for detecting cellular data network The detection of connectivity of WiFi network is carried out during default data network quality criteria, it can be ensured that in the net for using intelligent terminal Network, which is automatically switched to after cellular data network, can continue to online.
Embodiment two
The embodiment of the present invention also provides a kind of network switching device, as shown in Fig. 2 the network switching in the embodiment of the present invention Device 200 includes:
First detection unit 201, under the networking state of intelligent terminal, the current above-mentioned intelligent terminal of detection to be supported Whether the connectedness of cellular data network is not less than default data network quality criteria, wherein, above-mentioned networking state is to have connected Connect the state of WiFi network;
Second detection unit 202, during for being when the result that the first detection unit 201 is detected, to above-mentioned intelligent terminal Currently used WiFi network carries out detection of connectivity;
Network switch unit 203, the result for being detected in the second detection unit 202 indicates that above-mentioned WiFi network is not connected When, it is above-mentioned cellular data network by the currently used network switching of above-mentioned intelligent terminal.
Optionally, the second detection unit 202 includes:Trigger element, for being when the result that the first detection unit 201 is detected When being, trigger above-mentioned intelligent terminal and initiated based on above-mentioned cellular data network and three-way handshake agreement to the default network equipment TCP connections;Judging unit, for when above-mentioned TCP connections it is built immediately, judge this connection duration whether be less than default connection Duration threshold value, wherein, it is a length of during above-mentioned connection:The passed through duration of above-mentioned TCP connections foundation is connected to from above-mentioned TCP is initiated; If this connection duration is less than above-mentioned connection duration threshold value, the cellular data network that current above-mentioned intelligent terminal is supported is judged Connectedness is not less than above-mentioned data network quality criteria;If above-mentioned TCP connections can not be set up or this connection duration is not less than Above-mentioned connection duration threshold value, then judge that the connectedness for the cellular data network that current above-mentioned intelligent terminal is supported is less than above-mentioned data Network quality benchmark.
Optionally, the network switching device in the embodiment of the present invention also includes:3rd detection unit, in intelligent terminal Networking state under, detect whether the currently used WiFi network of above-mentioned intelligent terminal is less than default first WiFi network quality Benchmark;First detection unit 201 specifically for:Under the networking state of intelligent terminal, detected when above-mentioned 3rd detection unit As a result for when being, whether the connectedness for the cellular data network that the current above-mentioned intelligent terminal of detection is supported is not less than default data Network quality benchmark.
Further, the network switching device in the embodiment of the present invention can also include:4th detection unit, for when first The result that detection unit 201 is detected is when being, whether the currently used WiFi network of the above-mentioned intelligent terminal of detection is less than default Second WiFi network quality criteria;Network switch unit 203 is additionally operable to:The result detected in above-mentioned 4th detection unit is yes When, it is the cellular data network by the currently used network switching of above-mentioned intelligent terminal.Wherein, above-mentioned second WiFi network matter The network quality that amount benchmark is reflected is less than the network quality that above-mentioned first WiFi network quality is reflected.
It should be noted that the network switching device 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, detect what the intelligent terminal was supported Whether the connectedness of cellular data network is not less than default data network quality criteria, if being not less than, and further detection should The connectedness of the currently used WiFi network of intelligent terminal, it is when the WiFi network is not connected, the intelligent terminal is currently used Network switching be cellular data network, on the one hand, the network handover routines of the present invention program without user participate in, can be achieved from On the other hand WiFi network, is not less than to the automatic switchover of cellular data network in the connectedness for detecting cellular data network The detection of connectivity of WiFi network is carried out during default data network quality criteria, it can be ensured that in the net for using intelligent terminal Network, which is automatically switched to after cellular data network, can continue to online.
Embodiment three
The embodiment of the present invention provides a kind of intelligent terminal, referring to Fig. 3, the intelligent terminal in the embodiment of the present invention includes: Memory 301, one or more processors 302 (one is only shown in Fig. 3) and is stored on memory 301 and can be in processor The computer program of upper operation.Wherein:Memory 301 is used to store software program and module, and processor 302 is deposited by operation The software program and unit in memory 301 are stored up, so as to perform various function application and data processing.Specifically, handle Device 302 realizes following steps when being stored in the above computer program of memory 301 by operation:
Under the networking state of intelligent terminal, the connectedness for the cellular data network that presently described intelligent terminal is supported is detected Whether default data network quality criteria is not less than, wherein, the networking state is the state for having connected WiFi network;
If the connectedness for the cellular data network that presently described intelligent terminal is supported is not less than default data network quality Benchmark, then the WiFi network currently used to the intelligent terminal carry out detection of connectivity;
If the result of the detection of connectivity indicates that the WiFi network is not connected, and the intelligent terminal is currently used Network switching be the cellular data network.
Assuming that above-mentioned is the first possible embodiment, then provided based on the first possible embodiment Second of possible embodiment in, the connectedness for the cellular data network that the presently described intelligent terminal of the detection is supported is It is no to be not less than default data network quality criteria, including:
The intelligent terminal is triggered to send out to the default network equipment based on the cellular data network and three-way handshake agreement TCP connections are played, wherein, the TCP is transmission control protocol;
If the TCP connections have been set up, judge whether this connection duration connects duration threshold value less than default, its In, it is a length of during the connection:The passed through duration of the TCP connections foundation is connected to from the TCP is initiated;
If this connection duration judges the honeycomb number that presently described intelligent terminal is supported less than the connection duration threshold value It is not less than the data network quality criteria according to the connectedness of network;
If the TCP connections can not be set up or this connection duration is not less than the connection duration threshold value, judge to work as The connectedness for the cellular data network that the preceding intelligent terminal is supported is less than the data network quality criteria.
There is provided based on the first above-mentioned possible implementation, or above-mentioned second of possible implementation The third possible embodiment in, when processor 302 is stored in the above computer program of memory 301 by operation also Following steps can be achieved:
Under the networking state of intelligent terminal, detect the currently used WiFi network of the intelligent terminal whether less than default The first WiFi network quality criteria;
Whether the connectedness for the cellular data network that the presently described intelligent terminal of detection is supported is not less than default number According to network quality benchmark, it is:It is less than first WiFi network when detecting the currently used WiFi network of the intelligent terminal During quality criteria, detect whether the connectedness for the cellular data network that presently described intelligent terminal is supported is not less than default data Network quality benchmark.
In the 4th kind of possible embodiment provided based on the third above-mentioned possible implementation, if working as The connectedness for the cellular data network that the preceding intelligent terminal is supported is not less than the data network quality criteria, then processor 302 can also realize following steps when being stored in the above computer program of memory 301 by operation:
Detect whether the currently used WiFi network of the intelligent terminal is less than default second WiFi network quality criteria;
, will be described if the currently used WiFi network of the intelligent terminal is less than the second WiFi network quality criteria The currently used network switching of intelligent terminal is the cellular data network;
Wherein, the network quality that the second WiFi network quality criteria is reflected is less than the first WiFi network quality The network quality reflected.
Further, as shown in figure 3, above-mentioned intelligent terminal may also include:One or more input equipments 303 (only show in Fig. 3 Go out one) and one or more output equipments 304 (one is only shown in Fig. 3).Memory 301, processor 302, input equipment 303 and output equipment 304 connected by bus 305.
It should be appreciated that in embodiments of the present invention, alleged processor 302 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 303 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 304 can include display, loudspeaker etc..
Memory 304 can include read-only storage and random access memory, and provide instruction sum to processor 301 According to.Part or all of memory 304 can also include nonvolatile RAM.For example, memory 304 may be used also With the information of storage device type.
Therefore, in embodiments of the present invention, under the networking state of intelligent terminal, detect what the intelligent terminal was supported Whether the connectedness of cellular data network is not less than default data network quality criteria, if being not less than, and further detection should The connectedness of the currently used WiFi network of intelligent terminal, it is when the WiFi network is not connected, the intelligent terminal is currently used Network switching be cellular data network, on the one hand, the network handover routines of the present invention program without user participate in, can be achieved from On the other hand WiFi network, is not less than to the automatic switchover of cellular data network in the connectedness for detecting cellular data network The detection of connectivity of WiFi network is carried out during default data network quality criteria, it can be ensured that in the net for using intelligent terminal Network, which is automatically switched to after cellular data network, can continue to online.
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 method for switching network, it is characterised in that including:
Under the networking state of intelligent terminal, whether the connectedness for the cellular data network that the presently described intelligent terminal of detection is supported It is not less than default data network quality criteria, wherein, the networking state is the state for having connected WiFi network;
If the connectedness for the cellular data network that presently described intelligent terminal is supported is not less than default data network quality criteria, Then the WiFi network currently used to the intelligent terminal carries out detection of connectivity;
If the result of the detection of connectivity indicates that the WiFi network is not connected, by the currently used net of the intelligent terminal Network switches to the cellular data network.
2. method for switching network according to claim 1, it is characterised in that the presently described intelligent terminal of detection is supported Cellular data network connectedness whether be not less than default data network quality criteria, including:
Trigger the intelligent terminal and be based on the cellular data network and three-way handshake agreement to default network equipment initiation TCP Connection, wherein, the TCP is transmission control protocol;
If the TCP connections have been set up, whether this connection duration is judged less than default connection duration threshold value, wherein, institute State a length of during connection:The passed through duration of the TCP connections foundation is connected to from the TCP is initiated;
If this connection duration judges the cellular data net that presently described intelligent terminal is supported less than the connection duration threshold value The connectedness of network is not less than the data network quality criteria;
If the TCP connections can not be set up or this connection duration is not less than the connection duration threshold value, current institute is judged The connectedness for stating the cellular data network of intelligent terminal support is less than the data network quality criteria.
3. method for switching network according to claim 1 or 2, it is characterised in that the method for switching network also includes: Under the networking state of intelligent terminal, detect whether the currently used WiFi network of the intelligent terminal is less than default first WiFi Network quality benchmark;
Whether the connectedness for the cellular data network that the presently described intelligent terminal of detection is supported is not less than default data network Network quality criteria, be:It is less than the first WiFi network quality when detecting the currently used WiFi network of the intelligent terminal During benchmark, detect whether the connectedness for the cellular data network that presently described intelligent terminal is supported is not less than default data network Quality criteria.
4. method for switching network according to claim 3, it is characterised in that if the honeycomb that presently described intelligent terminal is supported The connectedness of data network is not less than the data network quality criteria, then the method for switching network also includes:
Detect whether the currently used WiFi network of the intelligent terminal is less than default second WiFi network quality criteria;
If the currently used WiFi network of the intelligent terminal is less than the second WiFi network quality criteria, by the intelligence The currently used network switching of terminal is the cellular data network;
Wherein, the network quality that the second WiFi network quality criteria is reflected is anti-less than the first WiFi network quality institute The network quality reflected.
5. a kind of network switching device, it is characterised in that including:
First detection unit, under the networking state of intelligent terminal, detecting the honeycomb number that presently described intelligent terminal is supported Whether it is not less than default data network quality criteria according to the connectedness of network, wherein, the networking state is to have connected WiFi The state of network;
Second detection unit, during for being when the result that first detection unit is detected, currently makes to the intelligent terminal WiFi network carries out detection of connectivity;
Network switch unit, for when the result that second detection unit is detected indicates that the WiFi network is not connected, inciting somebody to action The currently used network switching of the intelligent terminal is the cellular data network.
6. network switching device according to claim 5, it is characterised in that
Second detection unit includes:
Trigger element, during for being when the result that first detection unit is detected, triggers the intelligent terminal based on described Cellular data network and three-way handshake agreement initiate TCP connections to the default network equipment, wherein, the TCP controls for transmission Agreement;
Judging unit, for when the TCP connections it is built immediately, judge this connection duration whether be less than default connection duration Threshold value, wherein, it is a length of during the connection:The passed through duration of the TCP connections foundation is connected to from the TCP is initiated;If this Secondary connection duration then judges the connection for the cellular data network that presently described intelligent terminal is supported less than the connection duration threshold value Property is not less than the data network quality criteria;If the TCP connections can not be set up or this connection duration be not less than it is described Duration threshold value is connected, then judges that the connectedness for the cellular data network that presently described intelligent terminal is supported is less than the data network Quality criteria.
7. the network switching device according to claim 5 or 6, it is characterised in that the network switching device also includes:
3rd detection unit, under the networking state of intelligent terminal, detecting the currently used WiFi nets of the intelligent terminal Whether network is less than default first WiFi network quality criteria;
First detection unit specifically for:Under the networking state of intelligent terminal, detected when the 3rd detection unit As a result whether the connectedness of the cellular data network when being, to detect presently described intelligent terminal support is not less than default data Network quality benchmark.
8. network switching device according to claim 7, it is characterised in that the network switching device also includes:
4th detection unit, during for being when the result that first detection unit is detected, detects that the intelligent terminal is current Whether the WiFi network used is less than default second WiFi network quality criteria;
The network switch unit is additionally operable to:When the result that the 4th detection unit is detected is to be, by the intelligent terminal Currently used network switching is the cellular data network;
Wherein, the network quality that the second WiFi network quality criteria is reflected is anti-less than the first WiFi network quality institute The network quality reflected.
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 Claims 1-4 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 Claims 1-4 methods described when the computer program is executed by processor.
CN201710659860.XA 2017-08-04 2017-08-04 Method for switching network, network switching device and intelligent terminal Pending CN107277881A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710659860.XA CN107277881A (en) 2017-08-04 2017-08-04 Method for switching network, network switching device and intelligent terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710659860.XA CN107277881A (en) 2017-08-04 2017-08-04 Method for switching network, network switching device and intelligent terminal

Publications (1)

Publication Number Publication Date
CN107277881A true CN107277881A (en) 2017-10-20

Family

ID=60075580

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710659860.XA Pending CN107277881A (en) 2017-08-04 2017-08-04 Method for switching network, network switching device and intelligent terminal

Country Status (1)

Country Link
CN (1) CN107277881A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108391298A (en) * 2018-05-25 2018-08-10 四川斐讯全智信息技术有限公司 A kind of system and electronic equipment of network automatic switchover
CN108718458A (en) * 2018-06-11 2018-10-30 奇酷互联网络科技(深圳)有限公司 Method for connecting network, device, readable storage medium storing program for executing and intelligent terminal
CN111586782A (en) * 2020-05-25 2020-08-25 维沃移动通信有限公司 Network connection method and device
CN116390142A (en) * 2023-02-23 2023-07-04 荣耀终端有限公司 Network detection method and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104902526A (en) * 2015-05-25 2015-09-09 广东欧珀移动通信有限公司 Method and device for switching network, and mobile terminal
CN105657770A (en) * 2016-03-29 2016-06-08 广东欧珀移动通信有限公司 Data network switching method and device
CN105873157A (en) * 2015-11-13 2016-08-17 乐视移动智能信息技术(北京)有限公司 Automatic network switching method and device, and mobile terminal
CN106658588A (en) * 2016-12-21 2017-05-10 广东欧珀移动通信有限公司 Network quality detection method and device and computer equipment
CN106792953A (en) * 2016-12-14 2017-05-31 北京小米移动软件有限公司 The method and apparatus of network switching

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104902526A (en) * 2015-05-25 2015-09-09 广东欧珀移动通信有限公司 Method and device for switching network, and mobile terminal
CN105873157A (en) * 2015-11-13 2016-08-17 乐视移动智能信息技术(北京)有限公司 Automatic network switching method and device, and mobile terminal
CN105657770A (en) * 2016-03-29 2016-06-08 广东欧珀移动通信有限公司 Data network switching method and device
CN106792953A (en) * 2016-12-14 2017-05-31 北京小米移动软件有限公司 The method and apparatus of network switching
CN106658588A (en) * 2016-12-21 2017-05-10 广东欧珀移动通信有限公司 Network quality detection method and device and computer equipment

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108391298A (en) * 2018-05-25 2018-08-10 四川斐讯全智信息技术有限公司 A kind of system and electronic equipment of network automatic switchover
CN108718458A (en) * 2018-06-11 2018-10-30 奇酷互联网络科技(深圳)有限公司 Method for connecting network, device, readable storage medium storing program for executing and intelligent terminal
CN111586782A (en) * 2020-05-25 2020-08-25 维沃移动通信有限公司 Network connection method and device
CN116390142A (en) * 2023-02-23 2023-07-04 荣耀终端有限公司 Network detection method and electronic equipment
CN116390142B (en) * 2023-02-23 2023-11-28 荣耀终端有限公司 Network detection method and electronic equipment

Similar Documents

Publication Publication Date Title
CN107277881A (en) Method for switching network, network switching device and intelligent terminal
US20210211965A1 (en) Data Transmission Method, Electronic Device, and Computer Readable Storage Medium
EP3116189A1 (en) Service link selection control method and device
CN107333287B (en) Network detecting method, network detection device and intelligent terminal
CN105930191B (en) The overloaded method and device of system service
CN105516961A (en) Perception-free authentication method and system, control method and system based on same
CN106301998A (en) For detecting the system and method for People Near Me accessibility
CN109274596A (en) Data transmission method and relevant apparatus
CN107241758A (en) Network control method, network control unit and intelligent terminal
CN106793158A (en) A kind of SOT state of termination management method and device
CN107332741A (en) A kind of network detecting method, network detection means and intelligent terminal
CN107360247A (en) The method and the network equipment of processing business
CN106713454A (en) Network connection method and device
Sinky et al. Seamless handoffs in wireless HetNets: Transport-layer challenges and multi-path TCP solutions with cross-layer awareness
CN110505640A (en) The processing method of apparatus bound, apparatus and system, to distribution net equipment and terminal
CN107846715A (en) Access point switching method and device of the Internet of Things based on transmission rate
CN107332740B (en) A kind of network detecting method, network detection device and intelligent terminal
CN107332739B (en) Network detecting method, network detection device and intelligent terminal
CN107734556A (en) Data transfer control method and Related product
CN107277756A (en) A kind of data transmission method, device, terminal and computer-readable recording medium
CN107343326A (en) A kind of data transmission method and device
CN107276856A (en) Network detecting method, network detection means and intelligent terminal
CN107294812B (en) Network detecting method, network detection device and intelligent terminal
CN107360059A (en) Network detecting method, network detection means and intelligent terminal
CN107528929A (en) The processing method and processing device of arp entry

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20171020