The content of the invention
In view of this, the present invention is directed to propose a kind of method that WiFi and cellular mo-bile data network automatically switch, to solveThe certainly existing terminal based on single channel communications, when selecting network, intelligence degree is low, it is impossible to the situation of automatic preferred network.
To reach above-mentioned purpose, the technical proposal of the invention is realized in this way:
A kind of method that WiFi automatically switches with cellular mo-bile data network, comprises the following steps:
S1, WiFi network and cellular mo-bile data network are detected, detection content include signal intensity, stability,Service ability;
S2, according to detection content, carry out comprehensive analysis, select optimal network.
Further, in the step S1, the detection specific method of stability is as follows:
Stability disconnects with network in the unit interval or signal intensity is inversely proportional less than the number of times of certain threshold value, therefore fixedAdopted coefficient of stability δ:
δ=1/ (1+n/t)
Wherein n is that network disconnects in time t or signal intensity is less than the number of times of certain thresholding, if δ, which is more than, stablizes doorWhen limiting ζ, it is believed that network stabilization.
Further, the detection method of the service ability is the average data energy that client is supplied in certain time of detectionPower.
Further, the evaluation method of the average data ability, specific as follows:
If CtargetRepresent objective network average data ability, CservingThe average data ability of service network is represented, specificallyIt is analyzed as follows formula:
Ctarget-Cserving>τ1orCtarget>τ2
The only C of target candidate network is more than the certain thresholding τ of current service network1Or more than a certain fixed threshold τ2When,Just think that target candidate network average data ability is up to standard.
Further, in step S2, the comprehensive analysis, the method for selecting optimal network is specific as follows:
Whether S201, first detection networking gear open WiFi network and LTE data network functions simultaneously, if not sameShi Kaiqi, then directly terminate;If opened simultaneously, next step is performed;
S202, detection WiFi network and cellular mo-bile data network whether and deposit, if it is not, return to step S201;If so, then continuing executing with next step;
S203, the objective network signal intensity according to detection, judge whether the network signal intensity that will switch is higher than doorLimit, if less than setting thresholding, return to step S202;If above setting thresholding, then next step is continued executing with;
The objective network stability that S204, basis are detected, judges whether the network stabilization that will switch is higher than thresholding,If less than setting thresholding, return to step S202;If above setting thresholding, then next step is continued executing with;
S205, the network data services ability that will be switched according to the objective network data service capabilities detected, judgementIt is whether up to standard, if not up to standard, return to step S202;If up to standard, network switching is performed.
Relative to prior art, WiFi of the present invention and the method that cellular mo-bile data network automatically switches have withLower advantage:
The method that WiFi of the present invention automatically switches with cellular mo-bile data network can effectively solve traditional dataThe defect of switching, improves the stability after data switching, it is to avoid user data is frequently switched in heterogeneous networks;ProtectDemonstrate,prove after data switching, may provide the user with higher than the data service quality of current data network or higher than certain serviceThe data, services of quality, improve Consumer's Experience;Simultaneously as reducing switching times, and then reduce the power consumption of terminal;InstituteMethod is stated without the variation on hardware, it is only necessary to which adding software module can complete, the simplification with implementation.
Embodiment
It should be noted that in the case where not conflicting, the embodiment in the present invention and the feature in embodiment can phasesMutually combination.
In the description of the invention, it is to be understood that term " " center ", " longitudinal direction ", " transverse direction ", " on ", " under ",The orientation or position relationship of the instruction such as "front", "rear", "left", "right", " vertical ", " level ", " top ", " bottom ", " interior ", " outer " areBased on orientation shown in the drawings or position relationship, it is for only for ease of the description present invention and simplifies description, rather than indicate or darkSpecific orientation must be had, with specific azimuth configuration and operation by showing the device or element of meaning, therefore it is not intended that rightThe limitation of the present invention.In addition, term " first ", " second " etc. are only used for describing purpose, and it is not intended that indicating or implying phaseTo importance or the implicit quantity for indicating indicated technical characteristic.Thus, the feature for defining " first ", " second " etc. canTo express or implicitly include one or more this feature.In the description of the invention, unless otherwise indicated, " multiple "It is meant that two or more.
In the description of the invention, it is necessary to illustrate, unless otherwise clearly defined and limited, term " installation ", " phaseEven ", " connection " should be interpreted broadly, for example, it may be being fixedly connected or being detachably connected, or be integrally connected;CanTo be mechanical connection or electrical connection;Can be joined directly together, can also be indirectly connected to by intermediary, Ke YishiThe connection of two element internals.For the ordinary skill in the art, above-mentioned term can be understood by concrete conditionConcrete meaning in the present invention.
Describe the present invention in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
A kind of method that WiFi automatically switches with cellular mo-bile data network, comprises the following steps:
S1, WiFi network and cellular mo-bile data network are detected, detection content include signal intensity, stability,Service ability;
S2, according to detection content, carry out comprehensive analysis, select optimal network.
Wherein, in the step S1, the detection of stability and analysis specific method are as follows:
Stability disconnects with network in the unit interval or signal intensity is inversely proportional less than the number of times of certain threshold value, therefore fixedAdopted coefficient of stability δ:
δ=1/ (1+n/t)
Wherein n is that network disconnects in time t or signal intensity is less than the number of times of certain thresholding, if δ, which is more than, stablizes doorWhen limiting ζ, it is believed that network stabilization.
Wherein, the detection method of the service ability is the average data ability that client is supplied in certain time.
Wherein, it is necessary to measure the average data ability for the network to be switched in advance before network switching.Network switchingBefore measure, current cellular network is exactly using this mechanism, to be improved using this technology, formed it is this at present in advanceThe instrument of measurement data ability, is repeated no more here.
Wherein, the analysis method of the service ability, specific as follows:
If CtargetRepresent target web service ability, CservingRepresent the data service capabilities of service network, concrete analysisSuch as following formula:
Ctarget-Cserving>τ1orCtarget>τ2
The only C of target candidate network is more than the certain thresholding τ of current service network1Or more than a certain fixed threshold τ2When,Just think that target candidate network service ability is qualified., it is necessary to open timer during detection data service capabilities, a period of time is calculatedInterior data service capabilities.
As shown in figure 1, in the step S2, the comprehensive analysis, the method for selecting optimal network is specific as follows:
Whether S201, first detection networking gear open WiFi network and LTE data network functions simultaneously, if not sameShi Kaiqi, then directly terminate;If opened simultaneously, next step is performed;
S202, detection WiFi network and cellular mo-bile data network whether and deposit, if it is not, return to step S201;If so, then continuing executing with next step;Detection WiFi network and cellular mo-bile data network whether and deposit, be mainly in differenceSwitched between the data network of species;If what is connected at that time is WiFi network, the software will automatic detection whether have LTEData network, is then selected according to signal intensity, stability, service ability;If getting LTE data networks continuously at that time, justIt can detect whether there is WiFi network, then be selected according to signal intensity, stability, service ability;
S203, the objective network signal intensity according to detection, judge whether the network signal intensity that will switch is higher than doorLimit, if less than setting thresholding, return to step S202;If above setting thresholding, then next step is continued executing with;
The objective network stability that S204, basis are detected, judges whether the network stabilization that will switch is higher than thresholding,If less than setting thresholding, return to step S202;If above setting thresholding, then next step is continued executing with;
S205, the network data services ability that will be switched according to the objective network data service capabilities detected, judgementIt is whether up to standard, if not up to standard, return to step S202;If up to standard, network switching is performed.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the invention, all essences in the present inventionGod is with principle, and any modification, equivalent substitution and improvements made etc. should be included in the scope of the protection.