CN105517078A - Network connection switching method and device - Google Patents

Network connection switching method and device Download PDF

Info

Publication number
CN105517078A
CN105517078A CN201510811852.3A CN201510811852A CN105517078A CN 105517078 A CN105517078 A CN 105517078A CN 201510811852 A CN201510811852 A CN 201510811852A CN 105517078 A CN105517078 A CN 105517078A
Authority
CN
China
Prior art keywords
network
connected mode
data
access network
mode
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
CN201510811852.3A
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.)
Beijing Xiaomi Technology Co Ltd
Xiaomi Inc
Original Assignee
Xiaomi Inc
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 Xiaomi Inc filed Critical Xiaomi Inc
Priority to CN201510811852.3A priority Critical patent/CN105517078A/en
Publication of CN105517078A publication Critical patent/CN105517078A/en
Pending legal-status Critical Current

Links

Classifications

    • 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 relates to a network connection switching method and device, and the method comprises the steps: detecting whether a network can be accessed to in a current first connection mode or not when a network detection condition is detected; and switching the current first connection mode from a first connection mode to a second connection mode if the network cannot be accessed. The method and device solve a problem that a network is liable to be off in one connection mode in the related technologies, and can switch the connection mode to the other connection mode for network access when the current connection mode is detected.

Description

The changing method that network connects and device
Technical field
The disclosure relates to mobile network's technical field, particularly relates to changing method and the device of the connection of a kind of network.
Background technology
At present, the mode of intelligent terminal accesses network generally includes WLAN (wireless local area network) and data network.Wherein conventional WLAN (wireless local area network) is as Wi-Fi (WirelessFidelity, Wireless Fidelity), conventional data network is as 4G (The4thGenerationMobileCommunication, forth generation mobile phone mobile communication standard), 3G (The3rdGenerationMobileCommunication, third generation mobile mobile communication standard) etc.Wherein, Wi-Fi has free advantage, but can only conduct interviews in fixing scope, portable not, and due to a variety of causes, occur cannot the problem of accesses network and speed instability sometimes.And data network can use in most region, and stable and quick, and particularly after 4G network is universal, the speed of accesses network has exceeded most of Wi-Fi, but costly.Therefore, need reasonably to use WLAN (wireless local area network) and data network.
Summary of the invention
For overcoming Problems existing in correlation technique, the changing method that the disclosure provides a kind of network to connect and device.
According to the first aspect of disclosure embodiment, provide the changing method that a kind of network connects, described method comprises:
Whether when meeting described network testing conditions, detecting can access network;
When cannot access network time, current internetwork connection mode is switched to the second connected mode by described first connected mode.
Optionally, described first connected mode is WLAN (wireless local area network), and described second connected mode is data network; Or,
Described first connected mode is described data network, and described second connected mode is described WLAN (wireless local area network).
Optionally, when described first connected mode is described data network, when described second connected mode is described WLAN (wireless local area network), described method also comprises:
When can access network time, detect whether have transfer of data;
When defining transfer of data, keep current internetwork connection mode constant;
When determining there is no transfer of data, current internetwork connection mode is switched to described second connected mode by described first connected mode.
Optionally, described method also comprises:
Whether after switching to described second connected mode, detecting can access network;
When cannot access network time, current internetwork connection mode is switched back described first connected mode by described second connected mode;
When can access network time, keep current internetwork connection mode constant.
Optionally, whether described detection has transfer of data to comprise:
Obtain the variable quantity of the network card data in preset duration, described network card data comprises at least one in the quantity sending message and the quantity receiving message;
Judge whether the variable quantity of described network card data is greater than default variable quantity threshold value;
When the variable quantity of described network card data is greater than default variable quantity threshold value, define transfer of data;
When the variable quantity of described network card data is not more than default variable quantity threshold value, determine there is no transfer of data.
Optionally, when described first connected mode is described WLAN (wireless local area network), when described second connected mode is described data network, described method also comprises:
When can access network time, keep current internetwork connection mode constant.
Optionally, describedly the second connected mode is switched to comprise by described first connected mode current internetwork connection mode:
Routing table used for accesses network is switched to the routing table of described second connected mode by the routing table of described first connected mode.
Optionally, described when meeting network testing conditions, detect and whether can be comprised by access network by the first current connected mode:
Judge whether to arrive network detection time according to the sense cycle preset;
Whether when arriving network detection time, determine to meet described network testing conditions, detecting can access network by described first connected mode;
When not arriving network detection time, determine not meet described network testing conditions.
Optionally, whether described detection meets network testing conditions and comprises:
When receiving network and detecting instruction, whether determine to meet described network testing conditions, detecting can access network by described first connected mode.
According to the second aspect of disclosure embodiment, provide the switching device shifter that a kind of network connects, described device comprises:
Detection module, is configured to when by the first connected mode interconnection network, detects whether meet network testing conditions;
Network detection module, is configured to when meeting described network testing conditions, and whether detect can access network;
Network handover module, be configured to when cannot access network time, current internetwork connection mode is switched to the second connected mode by described first connected mode.
Optionally, described first connected mode is WLAN (wireless local area network), and described second connected mode is data network; Or,
Described first connected mode is described data network, and described second connected mode is described WLAN (wireless local area network).
Optionally, described first connected mode is described data network, and described second connected mode is described WLAN (wireless local area network), and described device also comprises: data detection module;
Described data detection module, be configured to when can access network time, detect whether have transfer of data;
Described network handover module, is configured to when defining transfer of data, keeps current internetwork connection mode constant;
Described network handover module, is configured to when determining do not have transfer of data, and current internetwork connection mode is switched to described second connected mode by described first connected mode.
Optionally, described network detection module, is configured to after switching to described second connected mode, and whether detect can access network;
Described network handover module, be configured to when cannot access network time, current internetwork connection mode is switched back described first connected mode by described second connected mode;
Described network handover module, be configured to when can access network time, keep current internetwork connection mode constant.
Optionally, described data detection module comprises:
Data acquisition submodule, is configured to the variable quantity of the network card data obtained in preset duration, and described network card data comprises at least one in the quantity sending message and the quantity receiving message;
Judge submodule, be configured to judge whether the variable quantity of described network card data is greater than default variable quantity threshold value;
Described judgement submodule, is configured to, when the variable quantity of described network card data is greater than default variable quantity threshold value, define transfer of data;
Described judgement submodule, is configured to, when the variable quantity of described network card data is not more than default variable quantity threshold value, determine do not have transfer of data.
Optionally, described first connected mode is described WLAN (wireless local area network), and described second connected mode is described data network, described network handover module be configured to when can access network time, keep current internetwork connection mode constant.
Optionally, described network handover module is configured to:
Routing table used for accesses network is switched to the routing table of described second connected mode by the routing table of described first connected mode.
Optionally, described network detection module is configured to:
Judge whether to arrive network detection time according to the sense cycle preset;
Whether when arriving network detection time, determine to meet described network testing conditions, detecting can access network by described first connected mode;
When not arriving network detection time, determine not meet described network testing conditions.
Optionally, described network detection module is configured to:
When receiving network and detecting instruction, whether determine to meet described network testing conditions, detecting can access network by described first connected mode.
According to the third aspect of disclosure embodiment, provide the switching device shifter that a kind of network connects, described device comprises:
Processor;
For the memory of storage of processor executable instruction;
Wherein, described processor is configured to:
Whether when meeting network testing conditions, detecting can access network by the first current connected mode;
When cannot access network time, current internetwork connection mode is switched to the second connected mode by described first connected mode.
The technical scheme that embodiment of the present disclosure provides can comprise following beneficial effect: when meeting network testing conditions, and whether detect can access network by the first current connected mode; When cannot access network time, current internetwork connection mode is switched to the second connected mode by described first connected mode.The disclosure solves in correlation technique, the problem of the easy suspension usually only keeping a kind of connected mode to cause, can detecting that current connected mode is switched to another kind of connected mode accesses network when going wrong.
Should be understood that, it is only exemplary and explanatory that above general description and details hereinafter describe, and can not limit the disclosure.
Accompanying drawing explanation
Accompanying drawing to be herein merged in specification and to form the part of this specification, shows and meets embodiment of the present disclosure, and is used from specification one and explains principle of the present disclosure.
Fig. 1 is the structural representation of a kind of implementation environment involved by each embodiment of the disclosure.
Fig. 2 is the flow chart of the changing method that a kind of network according to an exemplary embodiment connects.
Fig. 3 is the flow chart of the changing method that a kind of network according to an exemplary embodiment connects.
Fig. 4 is the block diagram of the switching device shifter that a kind of network according to an exemplary embodiment connects.
Fig. 5 A is the block diagram of the switching device shifter that a kind of network according to an exemplary embodiment connects.
Fig. 5 B is the block diagram of the switching device shifter that the another kind of network according to an exemplary embodiment connects.
Fig. 5 C is the block diagram of a kind of data detection module shown in the embodiment according to Fig. 5 B.
Fig. 6 is the block diagram of a kind of switching device shifter for network connection according to an exemplary embodiment.
Embodiment
Here will be described exemplary embodiment in detail, its sample table shows in the accompanying drawings.When description below relates to accompanying drawing, unless otherwise indicated, the same numbers in different accompanying drawing represents same or analogous key element.Execution mode described in following exemplary embodiment does not represent all execution modes consistent with the disclosure.On the contrary, they only with as in appended claims describe in detail, the example of apparatus and method that aspects more of the present disclosure are consistent.
Before the method introducing the RMI that the disclosure provides, be first introduced application scenarios involved by the disclosure, Fig. 1 is the structural representation of a kind of implementation environment involved by each embodiment of the disclosure.See Fig. 1, this implementation environment can comprise: terminal 100, wireless local network connecting point 200 and the Internet 300, wherein terminal 100 can access the Internet 300 by data network, the WLAN (wireless local area network) that also can be provided by accessing WLAN access point 200 visits the Internet 300, but in correlation technique, terminal 100 only has access to netwoks and a kind of mode in WLAN (wireless local area network) to keep being connected (time such as terminal access Wi-Fi at synchronization usually, data network can be disconnected), the connected mode of instant current employing still can not can keep the connected mode of current employing during accesses network.In the disclosed embodiments, data network and WLAN (wireless local area network) can keep being connected by terminal 100 simultaneously, but connecting Internet 300 can be carried out (such as by adopting a kind of mode in data network and WLAN (wireless local area network) at synchronization, when being connected by WLAN (wireless local area network), data network can disconnect), and current internetwork connection mode is monitored, when detecting that current internetwork connection mode can not access the Internet 300, another kind of internetwork connection mode can be switched to immediately.
Wherein, terminal 100 can be the electronic equipment of supported data network and WLAN networking, can be such as smart mobile phone, panel computer, intelligent television, intelligent watch, PDA (PersonalDigitalAssistant, personal digital assistant), the mobile terminal such as pocket computer, also can be the fixed terminals such as desktop computer.
Fig. 2 is the flow chart of the changing method that a kind of network according to an exemplary embodiment connects, as shown in Figure 1, the present embodiment is applied to terminal to illustrate with the changing method that this network connects, this terminal can for the terminal 100 in implementation environment shown in Fig. 1, and the method can comprise the following steps:
Whether in step 201, when meeting network testing conditions, detecting can access network by the first current connected mode.
Illustratively, timing can being realized by default sense cycle and detect, such as, according to the time that the last time is detected, judge whether to arrive network detection time according to the sense cycle preset, when arriving network detection time, can determine to meet network testing conditions; When not arriving network detection time, can determine not meet network testing conditions.The duration of this sense cycle can be arranged according to actual needs, does not limit in the present embodiment.
Or, can also initiatively detect, such as, when the network speed that the user of terminal feels current is slow by trigger network, initiatively can carry out the operation of trigger network detection, thus producing network detection instruction, terminal, receiving when receiving network and detecting instruction, can be determined to meet network testing conditions.
Wherein, the first connected mode can be WLAN (wireless local area network), such as Wi-Fi, also can be data network, such as 4G.When the first connected mode is WLAN (wireless local area network), the second connected mode is data network, and when the first connected mode is data network, the second connected mode is WLAN (wireless local area network).
In addition, whether can access network, illustratively if detecting, ping (PacketInternetGroper can be passed through, the Internet bag survey meter) order realizes, and ping is a kind of program of test network connection amount, can be used for checking the whether unobstructed or network connection speed of network.
In step 202., when cannot access network time, current internetwork connection mode is switched to the second connected mode by the first connected mode.
Certainly, if can access network, then can determine whether switching according to the priority of the first connected mode and the second connected mode, the priority of such as WLAN (wireless local area network) can higher than data network.
Illustratively, if current internetwork connection mode is WLAN (wireless local area network), when by ping command determination cannot access network time, then internetwork connection mode is switched to data network; When by ping command determination can access network time, then current internetwork connection mode can be kept constant.
If current internetwork connection mode is data network, when by ping command determination cannot access network time, then internetwork connection mode is switched to WLAN (wireless local area network); When by ping command determination can access network time, because the priority of WLAN (wireless local area network) is higher than data network, therefore can judge current whether by these data network transmission data, when defining transfer of data, current internetwork connection mode can be kept constant, when determining there is no transfer of data, current internetwork connection mode can be attempted to switch to WLAN (wireless local area network).Current internetwork connection mode switches to WLAN (wireless local area network) can be first internetwork connection mode is switched to WLAN (wireless local area network) by trial here, and whether can access network by ping command determination, when can access network time, keep the internetwork connection mode of current WLAN (wireless local area network), when cannot access network time, internetwork connection mode is switched back data network.
In sum, the changing method that disclosure embodiment provides a kind of network to connect, whether when meeting network testing conditions, detecting can access network by the first current connected mode; When cannot access network time, current internetwork connection mode is switched to the second connected mode by the first connected mode.The disclosure solves in correlation technique, the problem of the easy suspension usually only keeping a kind of connected mode to cause, can detecting that current connected mode is switched to another kind of connected mode accesses network when going wrong.
Fig. 3 is the flow chart of the changing method that a kind of network according to an exemplary embodiment connects, as shown in Figure 3, the present embodiment is applied to terminal to illustrate with the changing method that this network connects, this terminal can for the terminal 100 in implementation environment shown in Fig. 1, and be illustratively described for WLAN (wireless local area network) and data network two kinds of internetwork connection modes, the method can comprise the following steps:
In the present embodiment, WLAN (wireless local area network), data network can be remain connection by terminal simultaneously, but wherein a kind of network access mode connecting Internet can be selected at synchronization, if the current internetwork connection mode of terminal is WLAN (wireless local area network), then can perform step 301 ~ step 304.
In step 301, when by WLAN (wireless local area network) interconnection network, detect this WLAN (wireless local area network) and whether meet network testing conditions.
Illustratively, timing can being realized by default sense cycle and detect, such as, according to the time that the last time is detected, judge whether to arrive network detection time according to the sense cycle preset, when arriving network detection time, can determine to meet network testing conditions; When not arriving network detection time, can determine not meet network testing conditions.Illustratively, above-mentioned timing detection operation can be realized by NetworkManagerDaemon (network management is guarded) process in terminal.In addition, the duration of this sense cycle can be arranged according to actual needs, does not limit in the present embodiment.
Or, can also initiatively detect, such as, when the network speed that the user of terminal feels current is slow by trigger network, initiatively can carry out the operation of trigger network detection, thus producing network detection instruction, terminal, receiving when receiving network and detecting instruction, can be determined to meet network testing conditions.
Wherein, WLAN (wireless local area network) can be Wi-Fi.When determining to meet network testing conditions, performing step 302, when determining not meet network testing conditions, continuing to perform step 301.
In step 302, whether detect can access network by WLAN (wireless local area network).
Illustratively, whether detection can be realized by ping order by above-mentioned NetworkManagerDaemon by access network.When cannot access network time, can step 303 be performed; When can access network time, can step 304 be performed.
In step 303, current internetwork connection mode is switched to data network by WLAN (wireless local area network).
Illustratively, this data network can be 4G, 3G or GPRS (GeneralPacketRadioService, general packet radio service technology) etc.
The switching of internetwork connection mode can realize by switching routing table, such as, switch to data network can be by by WLAN (wireless local area network) internetwork connection mode: routing table routing table used for accesses network being switched to data network by the routing table of WLAN (wireless local area network) (such as Wi-Fi).Exemplary, in Android system, this routing table can be the file under path "/prco/net/route ".
In step 304, keep current internetwork connection mode constant.
If the current internetwork connection mode of terminal is data network, then step 305 ~ step 312 can be performed.
In step 305, when by data network interconnection network, detect this data network and whether meet network testing conditions.
Wherein, detect the Methods and steps 301 whether meeting network testing conditions identical, can refer to step 301, repeat no more.When determining to meet network testing conditions, performing step 306, when determining not meet network testing conditions, continuing to perform step 305.
Within step 306, whether detect can access network by data network.
Wherein, detect whether can the Methods and steps 302 of access network identical, can refer to step 302, repeat no more.When cannot access network time, can step 307 be performed; When can access network time, can step 308 ~ step 311 be performed.
In step 307, current internetwork connection mode is switched to WLAN (wireless local area network) by data network.
Similar to step 304, switch to WLAN (wireless local area network) can by routing table used for accesses network is switched to the routing table of WLAN (wireless local area network) to realize by the routing table of data network by data network internetwork connection mode.
In step 308, detect whether have transfer of data.When defining transfer of data, perform step 309; When determining there is no transfer of data, perform step 310 ~ 311.
Illustratively, detect the variable quantity whether having transfer of data can pass through the network card data obtained in preset duration, and judge whether this variable quantity is greater than default variable quantity threshold value and has judged whether transfer of data.
Such as, the current network card data of network interface card can be obtained at moment T1, the transmission message amount of such as moment T1 and reception message amount, the current network card data of network interface card is again obtained in the T2 moment of the interval time of presetting after T, the transmission message amount of such as moment T2 and reception message amount, just can judge whether transfer of data according to the transmission message amount of moment T1 and moment T2 and the variable quantity of reception message amount.When this variable quantity is greater than default variable quantity threshold value, transfer of data can be defined; When this variable quantity is not more than default variable quantity threshold value, can determine there is no transfer of data.Wherein, preset interval time T duration can arrange according to actual needs, such as T can be 5 seconds.
Because the priority of WLAN (wireless local area network) is generally higher than data network, therefore, when by data network can access network, whether can have transfer of data to judge whether and need to be switched to WLAN (wireless local area network) by detecting.Even if data network can accesses network like this, also preferentially can use WLAN (wireless local area network) when WLAN (wireless local area network) can be used, such benefit can save flow cost for the user of terminal.
In a step 309, keep current internetwork connection mode constant.
In the step 310, current internetwork connection mode is switched to WLAN (wireless local area network) by data network.
In step 311, whether detect can access network by WLAN (wireless local area network).When cannot access network time, perform step 312; When can access network time, perform step 313.
In step 312, current internetwork connection mode is switched back data network by WLAN (wireless local area network).
In step 313, keep current internetwork connection mode constant.
Namely when data network does not have transfer of data, taste trial cut and change to WLAN (wireless local area network), and detect WLAN (wireless local area network) whether can interconnection network, if can interconnection network, preferentially use WLAN to carry out access network, if WLAN (wireless local area network) is unavailable, then switch back data network.
In sum, the changing method that disclosure embodiment provides a kind of network to connect, whether by when meeting network testing conditions, detecting current first network connected mode can access network; When cannot access network time, current internetwork connection mode is switched to the second connected mode by described first connected mode, and wherein the first connected mode is WLAN (wireless local area network), and the second connected mode is data network; Or the first connected mode is data network, the second connected mode is WLAN (wireless local area network).The disclosure solves in correlation technique, the problem of the easy suspension usually only keeping a kind of connected mode to cause, can detecting that current connected mode is switched to another kind of connected mode accesses network when going wrong, and, preferentially WLAN (wireless local area network) can be used when WLAN (wireless local area network) is available, flow cost can be saved for user, thus can reasonably use WLAN (wireless local area network) and data network.
Fig. 4 is the block diagram of the switching device shifter that a kind of network according to an exemplary embodiment connects.The switching device shifter 400 that network shown in Fig. 4 connects may be used for the changing method performing the network connection shown in Fig. 2 or Fig. 3, with reference to Fig. 4, and network detection module 410 and network handover module 420.
Network detection module 410, is configured to when meeting network testing conditions, and whether detect can access network by the first current connected mode;
Network handover module 420, be configured to when cannot access network time, current internetwork connection mode is switched to the second connected mode by the first connected mode.
In sum, the switching device shifter that disclosure embodiment provides a kind of network to connect, whether by when meeting network testing conditions, detecting can access network by current first network connected mode; When cannot access network time, current internetwork connection mode is switched to the second connected mode by the first connected mode.The disclosure solves in correlation technique, the problem of the easy suspension usually only keeping a kind of connected mode to cause, can detecting that current connected mode is switched to another kind of connected mode accesses network when going wrong.
Fig. 5 A is the block diagram of the switching device shifter that a kind of network according to an exemplary embodiment connects.The switching device shifter 500 that network shown in Fig. 5 A connects may be used for the changing method performing the network connection shown in Fig. 2 or Fig. 3, with reference to Fig. 5 A, and network detection module 510 and network handover module 520.
Network detection module 510, is configured to when meeting network testing conditions, and whether detect can access network by the first current connected mode;
Network handover module 520, be configured to when cannot access network time, current internetwork connection mode is switched to the second connected mode by the first connected mode.
Optionally, the first connected mode is WLAN (wireless local area network), and the second connected mode is data network; Or,
First connected mode is data network, and the second connected mode is WLAN (wireless local area network).
Optionally, the first connected mode is data network, and the second connected mode is WLAN (wireless local area network), and Fig. 5 B is the block diagram of the switching device shifter that the another kind of network according to an exemplary embodiment connects, and see Fig. 5 B, device 500 also comprises: data detection module 530;
Data detection module 530, be configured to when can access network time, detect whether have transfer of data;
Network handover module 520, is configured to when defining transfer of data, keeps current internetwork connection mode constant;
Network handover module 520, is configured to, when determining do not have transfer of data, current internetwork connection mode be switched to the second connected mode by the first connected mode.
Optionally, network detection module 510, is configured to after switching to the second connected mode, and whether detect can access network;
Network handover module 520, be configured to when cannot access network time, current internetwork connection mode is switched back the first connected mode by the second connected mode;
Network handover module 520, be configured to when can access network time, keep current internetwork connection mode constant.
Optionally, Fig. 5 C is the block diagram of a kind of data detection module shown in the embodiment according to Fig. 5 B, and see Fig. 5 C, data detection module 530 comprises:
Data acquisition submodule 531, is configured to the variable quantity of the network card data obtained in preset duration, and network card data comprises at least one in the quantity sending message and the quantity receiving message;
Judge submodule 532, be configured to judge whether the variable quantity of network card data is greater than default variable quantity threshold value;
Judge submodule 532, be configured to, when the variable quantity of network card data is greater than default variable quantity threshold value, define transfer of data;
Judge submodule 532, be configured to, when the variable quantity of network card data is not more than default variable quantity threshold value, determine there is no transfer of data.
Optionally, the first connected mode is WLAN (wireless local area network), and the second connected mode is data network, network handover module 520 be configured to when can access network time, keep current internetwork connection mode constant.
Optionally, network handover module 520 is configured to:
Routing table used for accesses network is switched to the routing table of the second connected mode by the routing table of the first connected mode.
Optionally, network detection module 510 is configured to:
Judge whether to arrive network detection time according to the sense cycle preset;
Whether when arriving network detection time, determine to meet network testing conditions, detecting can access network by the first connected mode;
When not arriving network detection time, whether determine not meet network testing conditions, detecting can access network by the first connected mode.
Optionally, network detection module 510 is configured to:
When receiving network and detecting instruction, whether determine to meet network testing conditions, detecting can access network by the first connected mode.
In sum, the switching device shifter that disclosure embodiment provides a kind of network to connect, whether by when meeting network testing conditions, detecting current first network connected mode can access network; When cannot access network time, current internetwork connection mode is switched to the second connected mode by described first connected mode, and wherein the first connected mode is WLAN (wireless local area network), and the second connected mode is data network; Or the first connected mode is data network, the second connected mode is WLAN (wireless local area network).The disclosure solves in correlation technique, the problem of the easy suspension usually only keeping a kind of connected mode to cause, can detecting that current connected mode is switched to another kind of connected mode accesses network when going wrong, and, preferentially WLAN (wireless local area network) can be used when WLAN (wireless local area network) is available, flow cost can be saved for user, thus can reasonably use WLAN (wireless local area network) and data network.
About the device in above-described embodiment, wherein the concrete mode of modules executable operations has been described in detail in about the embodiment of the method, will not elaborate explanation herein.
Fig. 6 is the block diagram of the switching device shifter 600 that a kind of network according to an exemplary embodiment connects.Such as, device 600 can be mobile phone, computer, digital broadcast terminal, messaging devices, game console, flat-panel devices, Medical Devices, body-building equipment, personal digital assistant etc.
With reference to Fig. 6, device 600 can comprise following one or more assembly: processing components 602, memory 604, electric power assembly 606, multimedia groupware 608, audio-frequency assembly 610, the interface 612 of I/O (I/O), sensor cluster 614, and communications component 616.
The integrated operation of the usual control device 600 of processing components 602, such as with display, call, data communication, camera operation and record operate the operation be associated.Processing components 602 can comprise one or more processor 620 to perform instruction, to complete all or part of step of the changing method that the network shown in above-mentioned Fig. 2 or Fig. 3 connects.In addition, processing components 602 can comprise one or more module, and what be convenient between processing components 602 and other assemblies is mutual.Such as, processing components 602 can comprise multi-media module, mutual with what facilitate between multimedia groupware 608 and processing components 602.
Memory 604 is configured to store various types of data to be supported in the operation of device 600.The example of these data comprises for any application program of operation on device 600 or the instruction of method, contact data, telephone book data, message, picture, video etc.Memory 604 can be realized by the volatibility of any type or non-volatile memory device or their combination, as static RAM (SRAM), Electrically Erasable Read Only Memory (EEPROM), Erasable Programmable Read Only Memory EPROM (EPROM), programmable read only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, disk or CD.
The various assemblies that electric power assembly 606 is device 600 provide electric power.Electric power assembly 606 can comprise power-supply management system, one or more power supply, and other and the assembly generating, manage and distribute electric power for device 600 and be associated.
Multimedia groupware 608 is included in the screen providing an output interface between described device 600 and user.In certain embodiments, screen can comprise liquid crystal display (LCD) and touch panel (TP).If screen comprises touch panel, screen may be implemented as touch-screen, to receive the input signal from user.Touch panel comprises one or more touch sensor with the gesture on sensing touch, slip and touch panel.Described touch sensor can the border of not only sensing touch or sliding action, but also detects the duration relevant to described touch or slide and pressure.In certain embodiments, multimedia groupware 608 comprises a front-facing camera and/or post-positioned pick-up head.When device 600 is in operator scheme, during as screening-mode or video mode, front-facing camera and/or post-positioned pick-up head can receive outside multi-medium data.Each front-facing camera and post-positioned pick-up head can be fixing optical lens systems or have focal length and optical zoom ability.
Audio-frequency assembly 610 is configured to export and/or input audio signal.Such as, audio-frequency assembly 610 comprises a microphone (MIC), and when device 600 is in operator scheme, during as call model, logging mode and speech recognition mode, microphone is configured to receive external audio signal.The audio signal received can be stored in memory 604 further or be sent via communications component 616.In certain embodiments, audio-frequency assembly 610 also comprises a loud speaker, for output audio signal.
I/O interface 612 is for providing interface between processing components 602 and peripheral interface module, and above-mentioned peripheral interface module can be keyboard, some striking wheel, button etc.These buttons can include but not limited to: home button, volume button, start button and locking press button.
Sensor cluster 614 comprises one or more transducer, for providing the state estimation of various aspects for device 600.Such as, sensor cluster 614 can detect the opening/closing state of device 600, the relative positioning of assembly, such as described assembly is display and the keypad of device 600, the position of all right checkout gear 600 of sensor cluster 614 or device 600 1 assemblies changes, the presence or absence that user contacts with device 600, the variations in temperature of device 600 orientation or acceleration/deceleration and device 600.Sensor cluster 614 can comprise proximity transducer, be configured to without any physical contact time detect near the existence of object.Sensor cluster 614 can also comprise optical sensor, as CMOS or ccd image sensor, for using in imaging applications.In certain embodiments, this sensor cluster 614 can also comprise acceleration transducer, gyro sensor, Magnetic Sensor, pressure sensor or temperature sensor.
Communications component 616 is configured to the communication being convenient to wired or wireless mode between device 600 and other equipment.Device 600 can access the wireless network based on communication standard, as WiFi, 2G or 3G, or their combination.In one exemplary embodiment, communications component 616 receives from the broadcast singal of external broadcasting management system or broadcast related information via broadcast channel.In one exemplary embodiment, described communications component 616 also comprises near-field communication (NFC) module, to promote junction service.Such as, can based on radio-frequency (RF) identification (RFID) technology in NFC module, Infrared Data Association (IrDA) technology, ultra broadband (UWB) technology, bluetooth (BT) technology and other technologies realize.
In the exemplary embodiment, device 600 can be realized by one or more application specific integrated circuit (ASIC), digital signal processor (DSP), digital signal processing appts (DSPD), programmable logic device (PLD), field programmable gate array (FPGA), controller, microcontroller, microprocessor or other electronic components, for performing the changing method that the network shown in above-mentioned Fig. 2 or Fig. 3 connects.
In the exemplary embodiment, additionally provide a kind of non-transitory computer-readable recording medium comprising instruction, such as comprise the memory 604 of instruction, above-mentioned instruction can have been performed the changing method of the network connection shown in above-mentioned Fig. 2 or Fig. 3 by the processor 620 of device 600.Such as, described non-transitory computer-readable recording medium can be ROM, random access memory (RAM), CD-ROM, tape, floppy disk and optical data storage devices etc.
A kind of non-transitory computer-readable recording medium, when the instruction in described storage medium is performed by the processing components 602 of device 600, the switching device shifter 600 that network is connected can perform the changing method that a kind of network connects, and described method comprises the changing method that the network shown in Fig. 2 or Fig. 3 connects.
Those skilled in the art, at consideration specification and after putting into practice the disclosure, will easily expect other embodiment of the present disclosure.The application is intended to contain any modification of the present disclosure, purposes or adaptations, and these modification, purposes or adaptations are followed general principle of the present disclosure and comprised the undocumented common practise in the art of the disclosure or conventional techniques means.Specification and embodiment are only regarded as exemplary, and true scope of the present disclosure and spirit are pointed out by claim below.
Should be understood that, the disclosure is not limited to precision architecture described above and illustrated in the accompanying drawings, and can carry out various amendment and change not departing from its scope.The scope of the present disclosure is only limited by appended claim.

Claims (19)

1. a changing method for network connection, it is characterized in that, described method comprises:
Whether when meeting network testing conditions, detecting can access network by the first current connected mode;
When cannot access network time, current internetwork connection mode is switched to the second connected mode by described first connected mode.
2. method according to claim 1, is characterized in that,
Described first connected mode is WLAN (wireless local area network), and described second connected mode is data network; Or,
Described first connected mode is described data network, and described second connected mode is described WLAN (wireless local area network).
3. method according to claim 2, is characterized in that, when described first connected mode is described data network, when described second connected mode is described WLAN (wireless local area network), described method also comprises:
When can access network time, detect whether have transfer of data;
When defining transfer of data, keep current internetwork connection mode constant;
When determining there is no transfer of data, current internetwork connection mode is switched to described second connected mode by described first connected mode.
4. method according to claim 3, is characterized in that, described method also comprises:
Whether after switching to described second connected mode, detecting can access network;
When cannot access network time, current internetwork connection mode is switched back described first connected mode by described second connected mode;
When can access network time, keep current internetwork connection mode constant.
5. the method according to claim 3 or 4, is characterized in that, whether described detection has transfer of data to comprise:
Obtain the variable quantity of the network card data in preset duration, described network card data comprises at least one in the quantity sending message and the quantity receiving message;
Judge whether the variable quantity of described network card data is greater than default variable quantity threshold value;
When the variable quantity of described network card data is greater than default variable quantity threshold value, define transfer of data;
When the variable quantity of described network card data is not more than default variable quantity threshold value, determine there is no transfer of data.
6. method according to claim 2, is characterized in that, when described first connected mode is described WLAN (wireless local area network), when described second connected mode is described data network, described method also comprises:
When can access network time, keep current internetwork connection mode constant.
7. method according to claim 1, is characterized in that, describedly switches to the second connected mode to comprise by described first connected mode current internetwork connection mode:
Routing table used for accesses network is switched to the routing table of described second connected mode by the routing table of described first connected mode.
8. whether method according to claim 1, is characterized in that, described when meeting network testing conditions, detect and can be comprised by access network by the first current connected mode:
Judge whether to arrive network detection time according to the sense cycle preset;
Whether when arriving network detection time, determine to meet described network testing conditions, detecting can access network by described first connected mode;
When not arriving network detection time, determine not meet described network testing conditions.
9. whether method according to claim 1, is characterized in that, described when meeting network testing conditions, detect and can be comprised by access network by the first current connected mode:
When receiving network and detecting instruction, whether determine to meet described network testing conditions, detecting can access network by described first connected mode.
10. a switching device shifter for network connection, it is characterized in that, described device comprises:
Network detection module, is configured to when meeting network testing conditions, and whether detect can access network by the first current connected mode;
Network handover module, be configured to when cannot access network time, current internetwork connection mode is switched to the second connected mode by described first connected mode.
11. devices according to claim 10, is characterized in that,
Described first connected mode is WLAN (wireless local area network), and described second connected mode is data network; Or,
Described first connected mode is described data network, and described second connected mode is described WLAN (wireless local area network).
12. devices according to claim 11, is characterized in that, described first connected mode is described data network, and described second connected mode is described WLAN (wireless local area network), and described device also comprises: data detection module;
Described data detection module, be configured to when can access network time, detect whether have transfer of data;
Described network handover module, is configured to when defining transfer of data, keeps current internetwork connection mode constant;
Described network handover module, is configured to when determining do not have transfer of data, and current internetwork connection mode is switched to described second connected mode by described first connected mode.
13. devices according to claim 12, is characterized in that,
Described network detection module, is configured to after switching to described second connected mode, and whether detect can access network;
Described network handover module, be configured to when cannot access network time, current internetwork connection mode is switched back described first connected mode by described second connected mode;
Described network handover module, be configured to when can access network time, keep current internetwork connection mode constant.
14. devices according to claim 12 or 13, it is characterized in that, described data detection module comprises:
Data acquisition submodule, is configured to the variable quantity of the network card data obtained in preset duration, and described network card data comprises at least one in the quantity sending message and the quantity receiving message;
Judge submodule, be configured to judge whether the variable quantity of described network card data is greater than default variable quantity threshold value;
Described judgement submodule, is configured to, when the variable quantity of described network card data is greater than default variable quantity threshold value, define transfer of data;
Described judgement submodule, is configured to, when the variable quantity of described network card data is not more than default variable quantity threshold value, determine do not have transfer of data.
15. devices according to claim 11, it is characterized in that, described first connected mode is described WLAN (wireless local area network), and described second connected mode is described data network, described network handover module be configured to when can access network time, keep current internetwork connection mode constant.
16. devices according to claim 10, is characterized in that, described network handover module is configured to:
Routing table used for accesses network is switched to the routing table of described second connected mode by the routing table of described first connected mode.
17. devices according to claim 10, is characterized in that, described network detection module is configured to:
Judge whether to arrive network detection time according to the sense cycle preset;
Whether when arriving network detection time, determine to meet described network testing conditions, detecting can access network by described first connected mode;
When not arriving network detection time, determine not meet described network testing conditions.
18. devices according to claim 10, is characterized in that, described network detection module is configured to:
When receiving network and detecting instruction, whether determine to meet described network testing conditions, detecting can access network by described first connected mode.
The switching device shifter that 19. 1 kinds of networks connect, it is characterized in that, described device comprises:
Processor;
For the memory of storage of processor executable instruction;
Wherein, described processor is configured to:
Whether when meeting network testing conditions, detecting can access network by the first current connected mode;
When cannot access network time, current internetwork connection mode is switched to the second connected mode by described first connected mode.
CN201510811852.3A 2015-11-20 2015-11-20 Network connection switching method and device Pending CN105517078A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510811852.3A CN105517078A (en) 2015-11-20 2015-11-20 Network connection switching method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510811852.3A CN105517078A (en) 2015-11-20 2015-11-20 Network connection switching method and device

Publications (1)

Publication Number Publication Date
CN105517078A true CN105517078A (en) 2016-04-20

Family

ID=55724632

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510811852.3A Pending CN105517078A (en) 2015-11-20 2015-11-20 Network connection switching method and device

Country Status (1)

Country Link
CN (1) CN105517078A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107148059A (en) * 2017-05-09 2017-09-08 惠州Tcl移动通信有限公司 A kind of switching method of network connection, storage device and mobile terminal
CN107948989A (en) * 2016-10-13 2018-04-20 北京国双科技有限公司 A kind of computational methods and device of mobile terminal networking duration
CN108255091A (en) * 2016-12-29 2018-07-06 佛山市顺德区美的电热电器制造有限公司 A kind of control method and device
CN108718458A (en) * 2018-06-11 2018-10-30 奇酷互联网络科技(深圳)有限公司 Method for connecting network, device, readable storage medium storing program for executing and intelligent terminal
CN112087352A (en) * 2019-06-13 2020-12-15 佛山市顺德区美的电热电器制造有限公司 Method and device for protecting broken net of cooking equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006100184A1 (en) * 2005-03-24 2006-09-28 Nokia Siemens Networks Gmbh & Co. Kg Optimum selection of a communication network in the location area of a terminal
CN101668322A (en) * 2009-09-17 2010-03-10 深圳华为通信技术有限公司 Network switching method of terminal and terminal equipment
CN102111853A (en) * 2009-12-25 2011-06-29 联想(北京)有限公司 Method and device for automatically switching network connection as well as mobile terminal
CN103024874A (en) * 2011-09-21 2013-04-03 中国移动通信集团山东有限公司 Method and device for selecting network access
CN104735736A (en) * 2013-12-24 2015-06-24 中国移动通信集团公司 Network access method and user terminal
CN104902526A (en) * 2015-05-25 2015-09-09 广东欧珀移动通信有限公司 Method and device for switching network, and mobile terminal

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006100184A1 (en) * 2005-03-24 2006-09-28 Nokia Siemens Networks Gmbh & Co. Kg Optimum selection of a communication network in the location area of a terminal
CN101668322A (en) * 2009-09-17 2010-03-10 深圳华为通信技术有限公司 Network switching method of terminal and terminal equipment
CN102111853A (en) * 2009-12-25 2011-06-29 联想(北京)有限公司 Method and device for automatically switching network connection as well as mobile terminal
CN103024874A (en) * 2011-09-21 2013-04-03 中国移动通信集团山东有限公司 Method and device for selecting network access
CN104735736A (en) * 2013-12-24 2015-06-24 中国移动通信集团公司 Network access method and user terminal
CN104902526A (en) * 2015-05-25 2015-09-09 广东欧珀移动通信有限公司 Method and device for switching network, and mobile terminal

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107948989A (en) * 2016-10-13 2018-04-20 北京国双科技有限公司 A kind of computational methods and device of mobile terminal networking duration
CN107948989B (en) * 2016-10-13 2021-02-12 北京国双科技有限公司 Method and device for calculating networking time of mobile terminal
CN108255091A (en) * 2016-12-29 2018-07-06 佛山市顺德区美的电热电器制造有限公司 A kind of control method and device
CN107148059A (en) * 2017-05-09 2017-09-08 惠州Tcl移动通信有限公司 A kind of switching method of network connection, storage device and mobile terminal
CN108718458A (en) * 2018-06-11 2018-10-30 奇酷互联网络科技(深圳)有限公司 Method for connecting network, device, readable storage medium storing program for executing and intelligent terminal
CN112087352A (en) * 2019-06-13 2020-12-15 佛山市顺德区美的电热电器制造有限公司 Method and device for protecting broken net of cooking equipment
CN112087352B (en) * 2019-06-13 2022-05-24 佛山市顺德区美的电热电器制造有限公司 Method and device for protecting broken net of cooking equipment

Similar Documents

Publication Publication Date Title
CN106028375A (en) Method and device for prompting network switching and terminal device
CN105101330A (en) Connection switching method and device
CN105117033A (en) Connection method and device of external equipment
CN104640166A (en) Communication method and device
CN104703252A (en) Terminal device accessing into wireless network method and device
CN105163366A (en) Wireless network connection method and device
CN105068958A (en) Switching control method and device
CN104968007A (en) Test method and device of intelligent device
CN104468971A (en) Method and device for connecting playing source
CN105407473A (en) Wireless local area network discovery method and apparatus
CN105282809A (en) Network model switching method and apparatus, and terminal equipment
CN105517078A (en) Network connection switching method and device
CN104506443A (en) Router setting interface display method and device
CN105162889A (en) Device finding method and apparatus
CN104601815A (en) Answer device determining method and device
CN104683248A (en) Method and device for switching working mode
CN105224494A (en) Method for handover control and device
CN105120505A (en) Method, apparatus and system for making intelligent equipment accessed to router
CN105472706A (en) Method and device for connection establishment
CN105636176A (en) Network sharing method and device
CN105677338A (en) Application program display method and device
CN106231640A (en) Wireless access point switching method and device
CN105376144A (en) Information processing method and device
CN105262512A (en) Method and device for host switching
CN105246068A (en) Method and device for selecting SIM (Subscriber Identity Module) card

Legal Events

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

Application publication date: 20160420

RJ01 Rejection of invention patent application after publication