Specific embodiment
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
The mobile terminal of each embodiment of the present invention is realized in description with reference to the drawings.In subsequent description, useFor indicate element such as " module ", " component " or " unit " suffix only for being conducive to explanation of the invention, itselfThere is no specific meanings.Therefore, " module " can be used mixedly with " component ".
Mobile terminal can be implemented in a variety of manners.For example, terminal described in the present invention may include such as movingPhone, smart phone, laptop, digit broadcasting receiver, PDA (personal digital assistant), PAD (tablet computer), PMPThe mobile terminal of (portable media player), navigation device etc. and such as number TV, desktop computer etc. are consolidatedDetermine terminal.Hereinafter it is assumed that terminal is mobile terminal, however, it will be understood by those skilled in the art that, in addition to being used in particular for movingExcept the element of purpose, the construction of embodiment according to the present invention can also apply to the terminal of fixed type.
The hardware structural diagram of Fig. 1 each embodiment one optional mobile terminal to realize the present invention.
Mobile terminal 100 may include wireless communication unit 110, A/V (audio/video) input unit 120, user's inputUnit 130, sensing unit 140, output unit 150, memory 160, interface unit 170, controller 180 and power supply unit 190Etc..Fig. 1 shows the mobile terminal with various assemblies, it should be understood that being not required for implementing all groups shownPart can alternatively implement more or fewer components, the element of mobile terminal will be discussed in more detail below.
Wireless communication unit 110 generally includes one or more components, allows mobile terminal 100 and wireless communication systemOr the radio communication between network.For example, wireless communication unit may include broadcasting reception module 111, mobile communication module112, at least one of wireless Internet module 113, short range communication module 114 and location information module 115.
Broadcasting reception module 111 receives broadcast singal and/or broadcast from external broadcast management server via broadcast channelRelevant information.Broadcast channel may include satellite channel and/or terrestrial channel.Broadcast management server, which can be, to be generated and sentThe broadcast singal and/or broadcast related information generated before the server or reception of broadcast singal and/or broadcast related informationAnd send it to the server of terminal.Broadcast singal may include TV broadcast singal, radio signals, data broadcastingSignal etc..Moreover, broadcast singal may further include the broadcast singal combined with TV or radio signals.Broadcast phaseClosing information can also provide via mobile communications network, and in this case, broadcast related information can be by mobile communication mouldBlock 112 receives.Broadcast singal can exist in a variety of manners, for example, it can be with the electronics of digital multimedia broadcasting (DMB)Program guide (EPG), digital video broadcast-handheld (DVB-H) electronic service guidebooks (ESG) etc. form and exist.BroadcastReceiving module 111 can receive signal broadcast by using various types of broadcast systems.Particularly, broadcasting reception module 111It can be wide by using such as multimedia broadcasting-ground (DMB-T), digital multimedia broadcasting-satellite (DMB-S), digital videoIt broadcasts-holds (DVB-H), the Radio Data System of forward link media (MediaFLO@), received terrestrial digital broadcasting integrated service(ISDB-T) etc. digit broadcasting system receives digital broadcasting.Broadcasting reception module 111, which may be constructed such that, to be adapted to provide for extensivelyBroadcast the various broadcast systems and above-mentioned digit broadcasting system of signal.Via the received broadcast singal of broadcasting reception module 111 and/Or broadcast related information can store in memory 160 (or other types of storage medium).
Mobile communication module 112 sends radio signals to base station (for example, access point etc.), exterior terminal and clothesBusiness at least one of device and/or receive from it radio signal.Such radio signal may include voice communication signal,It video calling signal or is sent according to text and/or Multimedia Message and/or received various types of data.
The Wi-Fi (Wireless Internet Access) of the support mobile terminal of wireless Internet module 113.The module can be internally or externallyIt is couple to terminal.Wi-Fi (Wireless Internet Access) technology involved in the module may include WLAN (Wireless LAN) (Wi-Fi), Wibro(WiMAX), Wimax (worldwide interoperability for microwave accesses), HSDPA (high-speed downlink packet access) etc..
Short range communication module 114 is the module for supporting short range communication.Some examples of short-range communication technology include indigo plantTooth TM, radio frequency identification (RFID), Infrared Data Association (IrDA), ultra wide band (UWB), purple honeybee TM etc..
Location information module 115 is the module for checking or obtaining the location information of mobile terminal.Location information moduleTypical case be GPS (global positioning system).According to current technology, GPS module 115, which calculates, comes from three or more satellitesRange information and correct time information and the Information application triangulation for calculating, thus according to longitude, latitudeHighly accurately calculate three-dimensional current location information.Currently, it is defended for the method for calculating position and temporal information using threeStar and the error that calculated position and temporal information are corrected by using an other satellite.In addition, GPS module 115It can be by Continuous plus current location information in real time come calculating speed information.
A/V input unit 120 is for receiving audio or video signal.
The order that user input unit 130 can be inputted according to user generates key input data to control each of mobile terminalKind operation.User input unit 130 allows user to input various types of information, and may include keyboard, metal dome, touchPlate (for example, the sensitive component of detection due to the variation of resistance, pressure, capacitor etc. caused by being contacted), idler wheel, rocking bar etc.Deng.Particularly, when touch tablet is superimposed on the display module in the form of layer, touch screen can be formed.
Sensing unit 140 detects the current state of mobile terminal 100, (for example, mobile terminal 100 opens or closes shapeState), the position of mobile terminal 100, user is for the presence or absence of contact (that is, touch input) of mobile terminal 100, mobile terminal100 orientation, the acceleration or deceleration movement of mobile terminal 100 and direction etc., and generate for controlling mobile terminal 100The order of operation or signal.For example, sensing unit 140 can sense when mobile terminal 100 is embodied as sliding-type mobile phoneThe sliding-type phone is to open or close.In addition, sensing unit 140 be able to detect power supply unit 190 whether provide electric power orWhether person's interface unit 170 couples with external device (ED).
Interface unit 170 be used as at least one external device (ED) connect with mobile terminal 100 can by interface.For example,External device (ED) may include wired or wireless headphone port, external power supply (or battery charger) port, wired or nothingLine data port, memory card port, the port for connecting the device with identification module, audio input/output (I/O) endMouth, video i/o port, ear port etc..Identification module can be storage and use each of mobile terminal 100 for verifying userIt plants information and may include subscriber identification module (UIM), client identification module (SIM), Universal Subscriber identification module (USIM)Etc..In addition, the device (hereinafter referred to as " identification device ") with identification module can take the form of smart card, therefore, knowOther device can be connect via port or other attachment devices with mobile terminal 100.Interface unit 170, which can be used for receiving, to be come fromThe input (for example, data information, electric power etc.) of external device (ED) and the input received is transferred in mobile terminal 100One or more elements can be used for transmitting data between mobile terminal and external device (ED).
In addition, when mobile terminal 100 is connect with external base, interface unit 170 may be used as allowing will be electric by itPower, which is provided from pedestal to the path or may be used as of mobile terminal 100, allows the various command signals inputted from pedestal to pass through itIt is transferred to the path of mobile terminal.The various command signals or electric power inputted from pedestal, which may be used as mobile terminal for identification, isThe no signal being accurately fitted on pedestal.Output unit 150 is configured to provide with vision, audio and/or tactile manner defeatedSignal (for example, audio signal, vision signal, alarm signal, vibration signal etc.) out.
Output unit 150 may include display module, audio output module, alarm modules etc..
Memory 160 can store the software program etc. of the processing and control operation that are executed by controller 180, Huo ZhekeTemporarily to store oneself data (for example, telephone directory, message, still image, video etc.) through exporting or will export.AndAnd memory 160 can store about the vibrations of various modes and audio signal exported when touching and being applied to touch screenData.
Memory 160 may include the storage medium of at least one type, and the storage medium includes flash memory, hard disk, moreMedia card, card-type memory (for example, SD or DX memory etc.), random access storage device (RAM), static random-access storageDevice (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read only memory(PROM), magnetic storage, disk, CD etc..Moreover, mobile terminal 100 can execute memory with by network connectionThe network storage device of 160 store function cooperates.
The overall operation of the usually control mobile terminal of controller 180.For example, controller 180 executes and voice communication, dataCommunication, video calling etc. relevant control and processing.In addition, controller 180 may include for reproducing (or playback) more matchmakersThe multi-media module 181 of volume data, multi-media module 181 can construct in controller 180, or can be structured as and controlDevice 180 separates.Controller 180 can be with execution pattern identifying processing, by the handwriting input executed on the touchscreen or pictureIt draws input and is identified as character or image.
Power supply unit 190 receives external power or internal power under the control of controller 180 and provides operation each memberElectric power appropriate needed for part and component.
Various embodiments described herein can be to use the calculating of such as computer software, hardware or any combination thereofMachine readable medium is implemented.Hardware is implemented, embodiment described herein can be by using application-specific IC(ASIC), digital signal processor (DSP), digital signal processing device (DSPD), programmable logic device (PLD), scene canProgramming gate array (FPGA), controller, microcontroller, microprocessor, is designed to execute function described herein processorAt least one of electronic unit is implemented, and in some cases, such embodiment can be implemented in controller 180.For software implementation, the embodiment of such as process or function can with allow to execute the individual of at least one functions or operationsSoftware module is implemented.Software code can by the software application (or program) write with any programming language appropriate LaiImplement, software code can store in memory 160 and be executed by controller 180.
Based on the hardware configuration of above-mentioned mobile terminal, the present invention provides a kind of WIFI hot spot scanning connection control method and endEnd.
It is described in detail below by way of specific embodiment.
First embodiment
To avoid blindly being scanned connection to all channels when terminal will be connected into a certain WIFI hot spot, to reduceTerminal is connected into the scanning Connection Time of a certain WIFI hot spot, and the embodiment of the present invention provides a kind of WIFI hot spot scanning connection controlling partyMethod specifically may refer to shown in Fig. 2, comprising:
S201: the environmental information that terminal is presently in is obtained.
It should be understood that when the environmental information in the present embodiment includes the location information that terminal is presently in and is currentBetween at least one of information.Such as the location information that can be only presently in comprising terminal, it can also only include current timeInformation, or can also both include.
Of course, the environmental information in the present embodiment other than it may include above-mentioned location information and temporal information,Can also include servicing base station information, the servicing base station information in the present embodiment may include base station IDs, base station operation standard andBase station signal strength.
It should be noted that the location information that terminal is presently in the present embodiment can be obtained by GPS positioning, due toThe GPS positioning time is comparatively long, and power consumption is larger, so can also be judged according to the servicing base station information of acquisitionThe approximate location that terminal is presently in.For example, when terminal has ready-made location position information, so that it may directly use the positionInformation obtains location information without actively opening GPS positioning.
S202: the matching degree of the historical status information of each hot spot in environmental information and default hotspot database is calculated.
Historical status information in the present embodiment S202, which corresponds to, to be included hot spot by the historical time information that terminal connects and goes throughAt least one of history location information.Such as the historical time information that can be only connected comprising hot spot by terminal, it can also only wrapContaining the historical position information that hot spot is connected by terminal, or can also both include.It should be understood that in the present embodimentThe quantity of hot spot in default hotspot database can be arbitrary, for example, it may be one, be also possible to it is multiple, when being oneWhen a, the matching degree for calculating the environmental information historical status information corresponding with the hot spot got may not need, it can be directPriority scan connection is carried out to the hot spot.It should be noted that the hot spot in the default hotspot database in the present embodiment canTo be to commonly use hot spot to be also possible to the safe hot spot that the terminal once connected.
It needs to say calculating environmental information and the mode of historical status information matches degree in the present embodiment S202 hereinIt is bright.When the historical status information in the present embodiment only includes historical time information, the present embodiment environmental information and historical statusThe matching degree of information can be equal to the matching degree of terminal current time information and historical time information, it should be noted that this implementationHistorical time information in example includes the time segment information that was once connected by the terminal of each hot spot, terminal current time information with go throughThe matching degree of history temporal information can once be connect by terminal according to terminal current time with each hot spot in default hotspot databasePeriod come calculate obtain;Correspondingly, when the historical status information in the present embodiment only includes historical position information, this realityThe matching degree for applying an environmental information and historical status information can be equal to the location information and history bit confidence that terminal is presently inThe matching degree of breath, it should be noted that the matching degree of location information and historical position information that terminal is presently in can be according to endEnd current location calculates acquisition at a distance from historical position, certainly, when terminal current location distance is preset in hotspot databaseMultiple hot spots historical position it is all close when, it may be considered that the location information that is presently in of terminal and multiple hot spot are gone throughThe matching degree of history location information is the same, is all 1;When the historical status information in the present embodiment include historical time information andWhen historical position information, the matching degree for calculating the historical status information of each hot spot in environmental information and default hotspot database canTo include:
Location matches degree and the terminal for calculating separately out location information and historical position information that terminal is presently in are currentThe history category of each hot spot in the time match degree of temporal information and historical time information, environmental information and default hotspot databaseProperty information matching degree be equal to the product of location matches degree and corresponding position weight value and add time match degree and corresponding timeThe product of weighted value.
S203: according to the sequence of matching degree from high to low, corresponding hot spot is selected to be swept from default hotspot databaseRetouch connection.
The channel information of each hot spot can also be saved in default hotspot database in the present embodiment, it is shown in Figure 3,Being scanned connection to the hot spot currently selected from default hotspot database includes:
S31: the channel information of the hot spot currently selected is obtained.
It should be understood that the quantity of the hot spot currently selected in the present embodiment S31 can be one, it can be two,Or it is also possible to multiple.
S32: priority scan is carried out to the channel in the non-overlapping region for including in channel information.
Shown in Figure 4, Fig. 4 is schematic diagram of each channel in different frequency scope, as seen from the figure, channel 1, channel 6It is not overlapped with channel 11, so if when in the channel information of the hot spot currently selected including channel 1, channel 2, channel 6, it can be withPriority scan first is carried out to channel 1 or channel 6.
S33: judging the hot spot currently selected whether is scanned on the channel in non-overlapping region, if so, S34 is gone to,If not.Then go to S35.
S34: the hot spot currently selected scanned on the channel in non-overlapping region is attached.
S35: is scanned to overlapped channels remaining in channel information
S36: judging the hot spot currently selected whether is scanned on the channel of overlapping region, if so, S37 is gone to, if it is not,Go to S38.
S37: the hot spot currently selected scanned on the channel of overlapping region is attached.
S38: connection is scanned according to the next hot spot of the sequential selection of matching degree from high to low.
In the present embodiment, the channel of the corresponding hot spot selected from default hotspot database can be carried out actively sweepingIt retouches, or drive sweep can also be carried out, certainly, when the scan channel to all hot spots in default hotspot database completes itIt, can also be to its other than channel used in all hot spots in default hotspot database when also accessing a certain hot spot not successfully afterwardsHe carries out active scan or drive sweep by channel.
Sequence according to matching degree from high to low in the present embodiment selects corresponding hot spot from default hotspot databaseBeing scanned connection may include: within a preset time, to select according to the sequence of matching degree from high to low from default hotspot databaseActive scan is carried out on the channel for the hot spot selected, if terminal also accesses a certain hot spot not successfully in the preset time, then according toThe sequence of matching degree from high to low carries out drive sweep from the channel for the hot spot that default hotspot database selects.Certainly, pre-If in the time, also accessing a certain hot spot not successfully after all channel active scans are completed in default hotspot databaseWhen, active scan can also be carried out to other channels other than channel used in all hot spots in default hotspot database, whenActive scan has all been carried out to all channels, and terminal also accesses hot spot not successfully, then it can be according to matching degree from high to lowSequence, to channel used in each hot spot in default hotspot database carry out drive sweep, in default hotspot databaseIt further include to default hot spot when channel drive sweep used in all hot spots also accesses a certain hot spot after completing not successfullyOther channels in database other than channel used in all hot spots carry out drive sweep.It should be understood that the present embodimentIn preset time can be by developer's flexible setting according to the actual situation.
It should be noted that in the present embodiment, after entering drive sweep, can also pass into dormant period, in suspend modeStop drive sweep in the state of phase, in this way, can achieve the purpose for saving power consumption, it should be appreciated that in the present embodimentDrive sweep time and period dormant period can be by developer's flexible settings.
In addition it is also necessary to explanation, it in the present embodiment, can also be in this process for being scanned connection to hot spotIn, the case where terminal connection hot spot, is detected.When detecting that terminal is successfully accessed a certain hot spot, and the hot spot is default heatWhen hot spot in point data base, the hot spot is obtained by temporal information that terminal connects and the hot spot and is presently in location information,And the historical status information of the hot spot in hotspot database is updated using the temporal information and location information got;WhenDetect that terminal is successfully accessed a certain hot spot, and the hot spot is when presetting hot spot not stored in hotspot database, to obtain the heatThe channel information and the hot spot put are incited somebody to action by the location information of temporal information and the hot spot that terminal connects being presently inChannel information, temporal information and the location information of the hot spot got are added in hotspot database.
Here, it should also be noted that, the fortune of each hot spot can also be stored in default hotspot database in the present embodimentAt least one of row status information and signal strength information, the running state information in the present embodiment include that hot spot is connected by terminalThe degree of stability information connect, the historical time information in the present embodiment include history duration connect by terminal, so when presetSequential selection in hotspot database there are the identical hot spot of at least two matching degrees and according to matching degree from high to low this extremelyWhen few two hot spots, being scanned connection to the hot spot of selection may include:
To at least two hot spots of selection, according to the degree of stability information of each hot spot, signal strength information and history durationAt least one of, priority ranking is carried out at least two hot spots of selection, according at least two hot spot priority of selectionSequence from high to low is successively scanned;Or at least two hot spot to selection, it is carried out successively according to random orderScanning.
For example, in the present embodiment, can be carried out according to the degree of stability of each hot spot at least two hot spots of selection excellentFirst grade sequence, the higher priority of degree of stability is higher, is also more first scanned connection;Or it can also be at least the two of selectionA hot spot carries out priority ranking according to the signal strength of each hot spot, and the priority of the higher correspondence hot spot of signal strength is alsoIt is higher;Or the sequence of priority is carried out according to the integrated value of the degree of stability of each hot spot, signal strength and history duration, according to excellentThe sequence of first grade from high to low is successively scanned;Or at least two hot spots of selection can be carried out according to random orderSuccessively scan.
It, can be with storage service base in default hotspot database in the present embodiment other than it can store above- mentioned informationIt stands information, wherein servicing base station information includes base station IDs, base station operation standard and base station signal strength, when default hot spot dataSequential selection in library there are the identical hot spot of at least two matching degrees and according to matching degree from high to low at least two heatWhen point, it also can choose the identical hot spot of or base station operation standard identical as the base station IDs of this terminal and carry out priority scan.
It should be understood that can also for each hot spot in the environmental information and default hotspot database in the present embodiment itThe matching degree of historical status information presets a minimum matching degree threshold value, when the environmental information and default hot spot data being calculatedThe matching degree of the historical status information of each hot spot in library be less than the minimum matching degree when can ignore to the corresponding hot spot intoRow scanning connection, when the matching degree that all hot spots calculate in default hotspot database is both less than the minimum matching degree threshold value, alsoThe Unrecorded hot spot of hotspot database can be preset to this and carries out priority scan, or all hot spots can also be carried out randomScanning.
Connection control method is scanned according to WIFI hot spot provided in this embodiment, end can be made by default hotspot databaseEnd can as far as possible priority scan connection with the most matched WIFI hot spot of current environment, can be improved scanning connection accuracy, fromAnd accelerate the connection speed of WIFI hot spot, the time of scanning connection this process of WIFI hot spot is saved, the user experience is improvedSatisfaction.
Second embodiment:
In order to better understand the present invention, the present embodiment provides a kind of more specifical WIFI hot spot scanning connection controlling partiesMethod, specifically, may refer to shown in Fig. 5, comprising:
S501: the environmental information that terminal is presently in is obtained, wherein the environmental information got is presently in comprising terminalLocation information and current time information.
In addition to this, the environmental information in the present embodiment can also include servicing base station information, the service in the present embodimentBase station information may include base station IDs, base station operation standard and base station signal strength.It should be noted that terminal in the present embodimentThe location information being presently in can be obtained by GPS positioning, since the GPS positioning time is comparatively long, and power consumptionIt is larger, so can also judge the approximate location that terminal is presently according to the servicing base station information of acquisition.
S502: the matching degree of the historical status information of each hot spot in environmental information and default hotspot database is calculated.
Historical status information in the present embodiment includes the historical time information and history bit confidence that hot spot is connected by terminalBreath is below illustrated calculating environmental information and the mode of historical status information matches degree in the present embodiment.It can divide firstThe matching of the historical position information of each hot spot in the location information and default hotspot database that terminal is presently in is not calculatedThe matching degree of the historical time information of each hot spot in degree and terminal current time information and default hotspot database;Wherein, eventuallyHold the matching degree of current time information and historical time information can be according to each in terminal current time and default hotspot databaseHot spot was once obtained by the period that terminal connects to calculate, of location information and historical position information that terminal is presently inAcquisition can be calculated at a distance from historical position according to terminal current location with degree, environmental information and default heat in the present embodimentThe calculation formula of the matching degree of the historical status information of each hot spot in point data base can be with are as follows: T=α * time_match_rate+ β * place_match_rate, wherein T is that environmental information and each hot spot in default hotspot database are gone through in the present embodimentThe matching degree of history attribute information, time_match_rate are the time match of terminal current time information and historical time informationDegree, α are corresponding time weighting value, and place_match_rate is the location information and historical position information that terminal is presently inLocation matches degree, β be corresponding position weight value, it should be appreciated that α and β in the present embodiment can be according to correspondingComputation model, which calculates, to be obtained.
Here, needing to be illustrated the information stored in the default hotspot database in the present embodiment, in the present embodimentDefault hotspot database can also store channel information, the SSID of each hot spot other than being stored with historical status information(Service Set Identifier, service set) title, signal strength information, running state information and serving BS letterBreath, certainly, each hot spot in default hotspot database in the present embodiment can also be carried out according to respective usage frequency situationOne static ordering, the format of the default hotspot database in the present embodiment may refer to as shown in following table one at this time:
Table one
The running state information of each hot spot in the present embodiment includes the degree of stability information that hot spot is connected by terminal, this realityApplying the historical time information in example includes the history duration connected by terminal, the channel used corresponding to each hot spot in the present embodimentIt can be for one or multiple.It should be noted that each hot spot in default hotspot database in the present embodiment is quietState sequence can also comprehensively consider according to the history duration duration of each hot spot, signal strength, operating status, servicing base station informationIt arrives.
S503: according to the sequence of matching degree from high to low, corresponding hot spot is selected to be swept from default hotspot databaseRetouch connection.
Herein, it should be noted that when there are the identical hot spot of at least two matching degrees and being pressed in default hotspot databaseIt, can be directly quiet in hotspot database according to presetting when according to the sequential selection of matching degree from high to low at least two hot spotState sequencing selection is preferentially scanned the hot spot of connection, and priority corresponding to the higher hot spot of static ordering is higher, is matchingIt spends in identical situation, can preferentially select the hot spot to be scanned connection.
After the hot spot of current pending scanning connection has been determined from default hotspot database, and it is each in the present embodimentWhen the channel used corresponding to hot spot has multiple, can channel to the non-overlapping region for including in channel information intoRow major scanning, if scanning is directly connected to this to the hot spot of current pending scanning connection on the channel in non-overlapping regionHot spot, if the hot spot of current pending scanning connection is not scanned on the channel in non-overlapping region, to the letter of overlapping regionRoad is scanned, if scanning is directly connected to the heat to the hot spot of current pending scanning connection on the channel of overlapping regionPoint, if not scanning the hot spot of current pending scanning connection on the channel of overlapping region, from high to low according to matching degreeThe next hot spot of sequential selection be scanned connection.
It in the present embodiment, can be in sequence of the preceding 30S according to matching degree from high to low, in default hotspot databaseThe channel of hot spot carries out active scan, in 30S, after all channels completion active scan in default hotspot databaseIt, can also be to its other than channel used in all hot spots in default hotspot database when also accessing a certain hot spot not successfullyHis channel carries out active scan, if the active scan all over all channels has been gone through within 30S, and terminal also access not successfully it is a certainHot spot then can passively be swept according to channel of the sequence of matching degree from high to low to the hot spot in default hotspot databaseIt retouches, likewise, if when all channels in default hotspot database are completed also to access a certain hot spot not successfully after drive sweep,Drive sweep can also be carried out to other channels other than channel used in all hot spots in default hotspot database.
It should be noted that in the present embodiment, after entering drive sweep, can also pass into dormant period, referring toShown in Fig. 6, stop drive sweep in the state of dormant period, in this way, can achieve the purpose for saving power consumption, it should be understood thatIt is that the drive sweep time and period dormant period in the present embodiment can be by developer's flexible settings.
In addition it is also necessary to explanation, it in the present embodiment, can also be in this process for being scanned connection to hot spotIn, the case where terminal connection hot spot, is detected.When detecting that terminal is successfully accessed a certain hot spot, and the hot spot is default heatWhen hot spot in point data base, the hot spot is obtained by temporal information that terminal connects, the hot spot and is presently in location information, letterRoad information, running state information, signal strength information, servicing base station information and SSID name, and using it is above-mentioned get it is eachKind information is updated the corresponding each information of the hot spot in default hotspot database;When detecting that terminal is successfully accessed a certain heatPoint, and the hot spot is when presetting hot spot not stored in hotspot database, to obtain the channel information of the hot spot, the hot spot is by terminalThe location information being presently in, SSID name, running state information, the signal strength information of the temporal information of connection, the hot spotAnd servicing base station information, and the above- mentioned information that will acquire are added in hotspot database.
It should be understood that can also for each hot spot in the environmental information and default hotspot database in the present embodiment itThe matching degree of historical status information presets a minimum matching degree threshold value, when the environmental information and default hot spot data being calculatedThe matching degree of the historical status information of each hot spot in library be less than the minimum matching degree when can ignore to the corresponding hot spot intoRow scanning connection, when the matching degree that all hot spots calculate in default hotspot database is both less than the minimum matching degree threshold value, alsoThe Unrecorded hot spot of hotspot database can be preset to this and carries out priority scan, or all hot spots can also be carried out randomScanning.
Connection control method is scanned according to WIFI hot spot provided in this embodiment, end can be made by default hotspot databaseEnd can as far as possible priority scan connection with the most matched WIFI hot spot of current environment, so as to improve scanning connection successRate has saved the time of scanning connection this process of WIFI hot spot, the satisfaction that the user experience is improved.
3rd embodiment:
In order to enable terminal priority scan connection and the most matched WIFI hot spot of current environment as far as possible, to improve scanningThe success rate of connection saves the time of scanning connection this process of WIFI hot spot, promotes the satisfaction of user experience, the present embodimentA kind of terminal is provided, it is shown in Figure 7.
Terminal 70 provided in this embodiment includes environment information acquisition module 71, computing module 72 and scanning link block73, wherein the environment information acquisition module 71 in the present embodiment is for obtaining the environmental information that terminal 70 is presently in, this implementationComputing module 72 in example is used to calculate of the historical status information of each hot spot in environmental information and default hotspot databaseWith degree, the scanning link block 73 in the present embodiment is used for the sequence according to matching degree from high to low, from default hotspot databaseIt is middle that corresponding hot spot is selected to be scanned connection.It should be noted that the environmental information in the present embodiment includes that terminal 70 is currentAt least one of location information and current time information;Historical status information in the present embodiment is corresponding comprising hotPut at least one of the historical time information connected by terminal 70 and historical position information.
It should be understood that the quantity of the hot spot in default hotspot database in the present embodiment can be arbitrary, exampleSuch as, it can be one, be also possible to multiple, when for one, computing module 72, which may not need, calculates the environmental information that getsThe matching degree of historical status information corresponding with the hot spot, scanning link block 73 directly can carry out priority scan to the hot spotConnection.It should also be noted that, the hot spot in default hotspot database in the present embodiment can be common hot spot and be also possible toThe safe hot spot that the terminal 70 once connected.
Here, needing to be illustrated the calculating environmental information of computing module 72 and the method for historical status information matches degree.When the historical status information in the present embodiment only includes historical time information, the present embodiment environmental information and historical status informationMatching degree can be equal to terminal 70 current time information and historical time information matching degree, it should be noted that the present embodimentIn historical time information include the time segment information that was once connected by the terminal 70 of each hot spot, 70 current time information of terminal withThe matching degree of historical time information can be according to each hot spot in 70 current time of terminal and default hotspot database once by terminalThe period of 70 connections obtains to calculate;Correspondingly, the historical status information in the present embodiment only includes historical position informationWhen, the matching degree of the present embodiment environmental information and historical status information can be equal to location information that terminal 70 is presently in and go throughThe matching degree of history location information, it should be noted that the matching degree of location information and historical position information that terminal 70 is presently inAcquisition can be calculated at a distance from historical position according to 70 current location of terminal, certainly, distance is pre- when 70 current location of terminalIf the historical position of multiple hot spots in hotspot database is all close, it may be considered that the location information that terminal 70 is presently inMatching degree with the historical position information of multiple hot spot is the same, is all 1;When the historical status packet in the present embodimentWhen information containing historical time and historical position information, the computing module 72 in the present embodiment calculates environmental information and default hot spot numberMatching degree according to the historical status information of each hot spot in library may include:
Calculate separately out the location matches degree and terminal 70 of location information and historical position information that terminal 70 is presently inThe time match degree of current time information and historical time information, location matches degree multiply corresponding position weight value plus the timeMultiply corresponding time weighting value equal to environmental information and the historical status information of each hot spot in default hotspot database with degreeMatching degree.
The channel information of each hot spot, sweeping in the present embodiment can also be saved in default hotspot database in the present embodimentLink block 73 is retouched for obtaining the channel information of the hot spot currently selected, and to the non-overlapping region for including in channel informationChannel carries out priority scan, is attached if scanning on the channel in non-overlapping region is to the hot spot currently selected;Otherwise, thenOverlapped channels remaining in channel information are scanned, if scanning on the channel in overlapping region is to the hot spot currently selectedIt is attached, otherwise, according to the next hot spot of the sequential selection of matching degree from high to low.It should be understood that in the present embodimentThe quantity of the hot spot currently selected can be one, can be two, or be also possible to multiple.
Scanning link block 73 in the present embodiment can to the corresponding hot spot selected from default hotspot database itChannel carries out active scan, or can also carry out drive sweep, certainly, when to all hot spots in default hotspot databaseWhen scan channel also accesses a certain hot spot after completing not successfully, the scanning link block 73 in the present embodiment can also be to defaultOther channels in hotspot database other than channel used in all hot spots carry out active scan or drive sweep.
For example, in preset time, scanning link block 73 in the present embodiment can be according to matching degree from high to low suitableSequence, the channel that the hot spot in hotspot database is preset to the present embodiment carry out active scan, if in the preset time, terminal 70Failed to access hot spot, the scanning link block 73 in the present embodiment can also be according to the sequence of matching degree from high to low to defaultThe channel of the hot spot of hotspot database selection carries out drive sweep.Certainly, within a preset time, when scanning link block 73 is completedIt, can also be to default hot spot data when to access hot spot failed after channel active scan all in default hotspot databaseOther channels in library other than channel used in all hot spots carry out active scan, when all having carried out to all channels activelyScanning, and terminal 70 also accesses hot spot not successfully, then it can be according to the sequence of matching degree from high to low, to default hotspot databaseIn channel used in each hot spot carry out drive sweep, the channel quilt used in all hot spots in default hotspot databaseAfter completing when failed access hot spot, the scanning link block 73 in the present embodiment can also be to default hot spot data for dynamic scanningOther channels in library other than channel used in all hot spots carry out drive sweep.It should be understood that in the present embodimentPreset time can be by developer's flexible setting according to the actual situation.
It should be noted that in the present embodiment, after entering drive sweep, can also pass into dormant period, in suspend modeStop drive sweep in the state of phase, in this way, can achieve the purpose for saving power consumption, it should be appreciated that in the present embodimentDrive sweep time and period dormant period can be by developer's flexible settings.
Terminal 70 in the present embodiment can also include detection module 74 and update module 75, specifically may refer to Fig. 8Shown, the detection module 74 in the present embodiment is for detecting whether terminal 70 is successfully accessed a certain hot spot, when in the present embodimentDetection module 74 detects that terminal 70 is successfully accessed a certain hot spot, and the hot spot is the hot spot in the default hotspot databaseWhen, update module 75 is used to obtain the hot spot and is presently in location information by temporal information that terminal 70 connects and the hot spot,And the historical status information of the hot spot in hotspot database is updated using the temporal information and location information got;WhenDetection module 74 detects that terminal 70 is successfully accessed a certain hot spot, and the hot spot is hot spot not stored in default hotspot databaseWhen, update module 75 is used to obtain the channel information of the hot spot and the hot spot is connected by terminal 70 temporal information and the heatThe location information of point being presently in, and the channel information for the hot spot that will acquire, temporal information and location information are added toIn default hotspot database.
Here, it should also be noted that, the fortune of each hot spot can also be stored in default hotspot database in the present embodimentAt least one of row status information and signal strength information, the running state information in the present embodiment include hot spot by terminal 70The degree of stability information of connection, the historical time information in the present embodiment includes the history duration connected by terminal 70, so working asIn default hotspot database there are the scanning link block 73 in the identical hot spot of at least two matching degrees and the present embodiment according toWhen the sequential selection of matching degree from high to low at least two hot spot, the scanning link block 73 in the present embodiment can be to choosingAt least two hot spots selected, according at least one of the degree of stability information of each hot spot, signal strength information and history duration,Priority ranking is carried out at least two hot spots of selection, according to the sequence of at least two hot spot priority of selection from high to lowSuccessively scanned;Or at least two hot spot to selection, it is successively scanned according to random order.
For example, the scanning link block 73 in the present embodiment, can carry out priority row according to the history duration of each hot spotSequence, the longer priority of history duration is higher, and is successively scanned according to the sequence of priority from high to low;Or it can also be withThe sequence that priority is carried out according to the integrated value of degree of stability and signal strength, according to priority sequence from high to low carry out according toSecondary scanning;Or it can also be at least two hot spots of selection, according to random order to successively being scanned.
It, can be with storage service base in default hotspot database in the present embodiment other than it can store above- mentioned informationIt stands information, wherein servicing base station information includes base station IDs, base station operation standard and base station signal strength, when default hot spot dataSequential selection in library there are the identical hot spot of at least two matching degrees and scanning link block 73 according to matching degree from high to lowWhen at least two hot spot, or base station operation standard identical heat identical as the base station IDs of this terminal 70 also can chooseClick through row major scanning.
It should be understood that can also for each hot spot in the environmental information and default hotspot database in the present embodiment itThe matching degree of historical status information presets a minimum matching degree threshold value, when the environmental information and default hot spot data being calculatedWhen the matching degree of the historical status information of each hot spot in library is less than the minimum matching degree, scanning link block 73 can be ignored pairThe corresponding hot spot is scanned connection, when the matching degree that all hot spots calculate in default hotspot database is both less than this minimumWhen with degree threshold value, scanning link block 73 can also preset the Unrecorded hot spot of hotspot database to this and carry out priority scan, orPerson can also carry out random scanning to all hot spots.
It should be noted that environment information acquisition module 71, computing module 72, scanning link block in the present embodiment73, the function of detection module 74 and update module 75 can be realized by processor in terminal 70 or controller, in realizationThe software code for stating functional module can store in memory and be executed by processor or controller.
Terminal provided in this embodiment, can be enable by default hotspot database terminal priority scan connection as far as possible withThe most matched WIFI hot spot of current environment improves user to save the time of scanning connection this process of WIFI hot spotThe satisfaction of experience.
Fourth embodiment:
In order to better understand the present invention, the present embodiment also provides a kind of more specific terminal 70, provided in this embodimentTerminal 70 includes environment information acquisition module 71, computing module 72, scanning link block 73, detection module 74 and update module75。
Environment information acquisition module 71 in the present embodiment is for obtaining the environmental information that terminal 70 is presently in, wherein obtainingThe environmental information got includes the location information and current time information that terminal 70 is presently in, in addition to this, in the present embodimentEnvironmental information can also include servicing base station information, the servicing base station information in the present embodiment may include base station IDs, base stationWorking form and base station signal strength.
Computing module 72 in the present embodiment is used to calculate going through for environmental information and each hot spot in default hotspot databaseThe matching degree of history attribute information.Historical status information in the present embodiment includes the historical time information that hot spot is connected by terminal 70And historical position information, environmental information and historical status information matches degree are calculated to the computing module 72 in the present embodiment belowMode is illustrated.Computing module 72 in the present embodiment can calculate separately out the location information that terminal 70 is presently in firstWith the matching degree and 70 current time information of terminal and default heat of the historical position information of each hot spot in default hotspot databaseThe matching degree of the historical time information of each hot spot in point data base;Wherein, 70 current time information of terminal and historical time are believedThe matching degree of breath can according to 70 current time of terminal and each hot spot in default hotspot database once by terminal 70 connect whenBetween section obtained to calculate, the matching degree of location information and historical position information that terminal 70 is presently in can work as according to terminal 70It is the location of preceding to be obtained at a distance from historical position to calculate, in the environmental information and default hotspot database in the present embodimentThe calculation formula of matching degree of historical status information of each hot spot can be with are as follows: T=α * time_match_rate+ β * place_Match_rate, wherein T is the historical status information of environmental information and each hot spot in default hotspot database in the present embodimentMatching degree, time_match_rate be 70 current time information of terminal and historical time information time match degree, α for pairThe time weighting value answered, place_match_rate are the position of location information and historical position information that terminal 70 is presently inMatching degree, β are corresponding position weight value, it should be appreciated that α and β in the present embodiment can calculate mould according to correspondingType, which calculates, to be obtained.
Here, needing to be illustrated the information stored in the default hotspot database in the present embodiment, in the present embodimentDefault hotspot database can also store channel information, the SSID of each hot spot other than being stored with historical status information(Service Set Identifier, service set) title, signal strength information, running state information and serving BS letterBreath, certainly, each hot spot in default hotspot database in the present embodiment can also be carried out according to respective usage frequency situationOne static ordering.The running state information of each hot spot in the present embodiment includes the degree of stability letter that hot spot is connected by terminal 70It ceases, the historical time information in the present embodiment includes the history duration connected by terminal 70, in the present embodiment corresponding to each hot spotThe channel used can be for one or multiple.It should be noted that in default hotspot database in the present embodimentThe static ordering of each hot spot can also be according to history duration duration, signal strength, the operating status, servicing base station information of each hot spotComprehensively consider to obtain.
Scanning link block 73 in the present embodiment is for the sequence according to matching degree from high to low, from default hot spot dataCorresponding hot spot is selected to be scanned connection in library.
It should be understood that there are the identical hot spot of at least two matching degrees and scanning connections in default hotspot databaseWhen sequential selection of the module 73 according to matching degree from high to low at least two hot spot, scanning link block 73 can direct rootThe hot spot of connection is preferentially scanned according to the static ordering selection in default hotspot database, the higher hot spot institute of static ordering is rightThe priority answered is higher, in the identical situation of matching degree, can preferentially select the hot spot to be scanned connection.
When the scanning link block 73 in the present embodiment has determined that current pending scanning connects from default hotspot databaseAfter the hot spot connect, and when the channel used corresponding to each hot spot in the present embodiment has multiple, channel can be believedThe channel in the non-overlapping region for including in breath carries out priority scan, if being scanned on the channel in non-overlapping region to current pendingThe hot spot for scanning connection, then be directly connected to the hot spot, if not scanning current pending scanning on the channel in non-overlapping regionThe hot spot of connection is then scanned the channel of overlapping region, if scanning is swept to currently pending on the channel of overlapping regionThe hot spot of connection is retouched, then is directly connected to the hot spot, if not scanning current pending scanning connection on the channel of overlapping regionHot spot, then be scanned connection according to the next hot spot of the sequential selection of matching degree from high to low.
Scanning link block 73 in the present embodiment can be in sequence of the preceding 40S according to matching degree from high to low, to defaultThe channel of hot spot in hotspot database carries out active scan, complete to all channels in default hotspot database in 40SWhen at also accessing a certain hot spot not successfully after active scan, the scanning link block 73 in the present embodiment can also be to default heatOther channels other than channel used in all hot spots in point data base carry out active scan, if having gone through within 40S timeThe active scan of all channels, and terminal 70 also accesses a certain hot spot not successfully, then scanning link block 73 can be according to matchingThe sequence of degree from high to low carries out drive sweep to the channel of the hot spot in default hotspot database, likewise, if default hot spotIt, can also be to default hot spot data when also accessing a certain hot spot not successfully after all channels completion drive sweep in databaseOther channels other than channel used in all hot spots in library carry out drive sweep.
It should be noted that in the present embodiment, after entering drive sweep, can also pass into dormant period, in suspend modeStop drive sweep in the state of phase, in this way, can achieve the purpose for saving power consumption, it should be appreciated that in the present embodimentDrive sweep time and period dormant period can be by developer's flexible settings.
Detection module 74 in the present embodiment is used for during scan module is scanned connection to hot spot to terminalThe case where 70 connection hot spot, is detected, when the detection module 74 in the present embodiment detects that terminal 70 is successfully accessed a certain heatPoint, and when the hot spot is the hot spot in default hotspot database, the update module 75 in the present embodiment is for obtaining the hot spot quiltTemporal information that terminal 70 connects, the hot spot are presently in location information, channel information, running state information, signal strengthInformation, servicing base station information and SSID name, and using the above-mentioned various information got to the heat in default hotspot databaseThe corresponding each information of point is updated;When detection module 74 detects that terminal 70 is successfully accessed a certain hot spot, and the hot spot is pre-If in hotspot database when not stored hot spot, update module 75 then obtains the channel information of the hot spot, the hot spot is by terminal 70The location information being presently in, SSID name, running state information, the signal strength information of the temporal information of connection, the hot spotAnd servicing base station information, and the above- mentioned information that will acquire are added in hotspot database.
It should be understood that can also for each hot spot in the environmental information and default hotspot database in the present embodiment itThe matching degree of historical status information presets a minimum matching degree threshold value, when the environmental information that computing module 72 is calculated and in advanceIf the matching degree of the historical status information of each hot spot in hotspot database is less than the minimum matching degree, link block 73 is scannedIt can ignore and connection is scanned to the corresponding hot spot, when the matching degree that all hot spots calculate in default hotspot database is all smallWhen the minimum matching degree threshold value, it is excellent that scanning link block 73 can also preset the Unrecorded hot spot progress of hotspot database to thisIt first scans, or random scanning can also be carried out to all hot spots.
It should be noted that environment information acquisition module 71, computing module 72, scanning link block in the present embodiment73, the function of detection module 74 and update module 75 can be realized by processor in terminal or controller, be realized above-mentionedThe software code of functional module can store in memory and be executed by processor or controller.
According to terminal provided in this embodiment, terminal priority scan as far as possible can be enable to connect by default hotspot databaseIt connects and has saved scanning connection WIFI with the most matched WIFI hot spot of current environment so as to improve the success rate of scanning connectionThe time of this process of hot spot, the satisfaction that the user experience is improved.
It should be noted that, in this document, the terms "include", "comprise" or its any other variant are intended to non-rowHis property includes, so that the process, method, article or the device that include a series of elements not only include those elements, andAnd further include other elements that are not explicitly listed, or further include for this process, method, article or device institute it is intrinsicElement.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including being somebody's turn to doThere is also other identical elements in the process, method of element, article or device.
The serial number of the above embodiments of the invention is only for description, does not represent the advantages or disadvantages of the embodiments.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment sideMethod can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but in many casesThe former is more preferably embodiment.Based on this understanding, technical solution of the present invention substantially in other words does the prior artThe part contributed out can be embodied in the form of software products, which is stored in a storage mediumIn (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that a terminal device (can be mobile phone, computer, clothesBusiness device, air conditioner or the network equipment etc.) execute method described in each embodiment of the present invention.
The embodiment of the present invention is described with above attached drawing, but the invention is not limited to above-mentioned specificEmbodiment, the above mentioned embodiment is only schematical, rather than restrictive, those skilled in the artUnder the inspiration of the present invention, without breaking away from the scope protected by the purposes and claims of the present invention, it can also make very muchForm, all of these belong to the protection of the present invention.