CN103686595B - State switching method and electronic equipment - Google Patents

State switching method and electronic equipment Download PDF

Info

Publication number
CN103686595B
CN103686595B CN201210364447.8A CN201210364447A CN103686595B CN 103686595 B CN103686595 B CN 103686595B CN 201210364447 A CN201210364447 A CN 201210364447A CN 103686595 B CN103686595 B CN 103686595B
Authority
CN
China
Prior art keywords
wireless communication
communication module
electronic equipment
location information
access point
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.)
Active
Application number
CN201210364447.8A
Other languages
Chinese (zh)
Other versions
CN103686595A (en
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.)
Lenovo Beijing Ltd
Original Assignee
Lenovo Beijing Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Lenovo Beijing Ltd filed Critical Lenovo Beijing Ltd
Priority to CN201210364447.8A priority Critical patent/CN103686595B/en
Publication of CN103686595A publication Critical patent/CN103686595A/en
Application granted granted Critical
Publication of CN103686595B publication Critical patent/CN103686595B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Mobile Radio Communication Systems (AREA)

Abstract

The invention discloses a kind of state switching method and electronic equipments.The method is applied to electronic equipment comprising the first wireless communication module and the second wireless communication module.The method includes:The location information for obtaining electronic equipment from base station by the first wireless communication module, as the first location information to be compared;First location information to be compared is compared with the one or more preset position informations stored in the electronic device, each in preset position information is associated with access point;If the first location information to be compared is matched with the first preset position information in preset position information, generates the first connection and establish instruction;And instruction is established come so that the second wireless communication module and the first access point are established and connected, the first access point is associated with the first preset position information according to the first connection.Therefore, in the present invention it is possible to based on location information come the switch of the second wireless communication module in automatically control electronics, reduce user's manual operation.

Description

State switching method and electronic equipment
Technical field
The present invention relates to field of computer technology, more particularly it relates to which a kind of state switching method and electronics are set It is standby.
Background technology
In recent years, such as notebook computer, tablet computer(PAD), mobile phone, multimedia player, individual digital Assistant(PDA)Etc electronic equipment it is more universal.Also, with the continuous development of wireless communication technique, these electronic equipments It is provided with for realizing wireless communication function greatly(Such as, mobile communication function, WLAN(WLAN)Function etc.)Nothing Line communication module.This wireless communication function eliminates the hard wires between two or more electronic equipments, realizes them Light interconnection, greatly facilitated the use of user.
For example, in order to realize high-speed data communication, generally has the function of WLAN on current electronic equipment.With mobile communication Network is compared, and wireless data communication is realized using WLAN functions(For example, accessing internet(Internet))It can obtain more High bandwidth and more economical.
Currently, the switch of the WLAN functions on electronic equipment is required for user to switch over manually.For example, when user reaches After overlay area with WLAN, it is necessary to open the WLAN switches of electronic equipment manually first, then electronic equipment can just be searched The access point of rope WLAN simultaneously accesses the trust wlan network connected before.In other words, such method needs each hand of user The related application of operation WLAN is moved to open WLAN functions.
However, in actual use, user can usually occur to reach the region of WLAN and because of a variety of causes can not The case where opening WLAN switches in time, causes electronic equipment being also continuing with such as 3G (Third Generation) Moblie(3G)Or general point Group wireless service(GPRS)Etc mobile communications network come into row data communication.In this way, not only affecting the download speed of data Degree, also consumes the flow of mobile network in vain.Simultaneously as network speed is excessively slow and causes the time lengthening of task run, in turn Increase the power consumption of electronic equipment.
Similarly, it when user leaves the region of WLAN, also tends to initiatively close WLAN switches.It is opened in WLAN In the case of opening without connecting WLAN access points, when being lighted screen, electronic equipment can all search for neighbouring WLAN automatically Access point, and since the power of active search operation consumption is very big, it is equal to the battery electricity for consuming electronic equipment in vain in this way Amount.
In this regard, proposing a solution in the prior art, accessed using geographic coordinate information to identify WLAN Point.
However, such mode is needed by global positioning system(GPS)Or auxiliary global satellite positioning system (AGPS)Equal softwares, and this kind of soft locating speed is too slow cannot be satisfied and position immediately after the screen for lighting electronic equipment It is required that.In addition, this kind of software often itself needs the power consumption or network flow of bigger, if using excessive, can greatly shorten The service time of battery of electronic equipment and consume unnecessary flow.Furthermore since geographic coordinate information is generally with longitude and latitude Mark, storage and to calculate distance also more complicated, so the algorithm of the solution is it is difficult to ensure that the essence consistent with GPS positioning Degree.
Therefore, it is necessary to a kind of novel state switching methods and electronic equipment to solve the above problems.
Invention content
In order to solve the above-mentioned technical problem, according to an aspect of the invention, there is provided a kind of state switching method, described Method is applied to electronic equipment, and the electronic equipment includes the first wireless communication module and the second wireless communication module, and described the One wireless communication module is used to establish with base station and be wirelessly connected to carry out the first communication;Second wireless communication module be used for Access point, which is established, to be wirelessly connected to carry out the second communication, which is characterized in that the method includes:It is wirelessly communicated by described first Module obtains the location information of the electronic equipment from the base station, as the first location information to be compared;Described first is waited for Comparison position information is compared with the one or more preset position informations stored in the electronic equipment, the default position Each in confidence breath is associated with access point;If in first location information to be compared and the preset position information The first preset position information matching, then generate first connection establish instruction;And according to it is described first connection establish instruction come So that second wireless communication module and the first access point are established and are connected, first access point and first predeterminated position Information is associated.
In addition, according to another aspect of the present invention, providing a kind of electronic equipment, the electronic equipment includes first wireless Communication module and the second wireless communication module, first wireless communication module are used to establish with base station and be wirelessly connected to carry out the One communication;Second wireless communication module is used to establish with access point and be wirelessly connected to carry out the second communication, which is characterized in that The electronic equipment further includes:Acquiring unit obtains the electronics from the base station by first wireless communication module and sets Standby location information, as the first location information to be compared;Comparing unit, by the described first location information to be compared with described The one or more preset position informations stored in electronic equipment are compared, each in the preset position information with connect Access point is associated;Link order generation unit, if in first location information to be compared and the preset position information First preset position information matches, then generates the first connection and establish instruction;And connection unit, it is established according to first connection Instruction connects to make second wireless communication module and the first access point establish, and first access point is pre- with described first If location information is associated.
Compared with prior art, using state switching method according to the present invention and electronic equipment, the first nothing can be passed through Communication of the line communication module with base station obtains the location information of electronic equipment, by acquired location information with and access point phase Associated preset position information is compared, and when such a match occurs, judges that electronic equipment is in the access point covering trusted In range, and make the second wireless communication module is established with the access point to connect.Therefore, in the present invention it is possible to based on electricity The location information of sub- equipment carrys out the switch of the second wireless communication module in automatically control electronics, to reduce user Manual operation, and improve the user experience of data communication aspects.
Other features and advantages of the present invention will be illustrated in the following description, also, partly becomes from specification It obtains it is clear that understand through the implementation of the invention.The purpose of the present invention and other advantages can be by specification, rights Specifically noted structure is realized and is obtained in claim and attached drawing.
Description of the drawings
Attached drawing is used to provide further understanding of the present invention, and a part for constitution instruction, the reality with the present invention It applies example to be used to explain the present invention together, not be construed as limiting the invention.In the accompanying drawings:
Fig. 1 illustrates state switching methods according to the present invention.
Fig. 2 illustrates electronic equipment according to the present invention.
Fig. 3 illustrates state switching method according to the ... of the embodiment of the present invention.
Fig. 4 illustrates electronic equipment according to the ... of the embodiment of the present invention.
Fig. 5 illustrates the software realization of state switching method according to the ... of the embodiment of the present invention.
Specific implementation mode
It will be described in detail with reference to the accompanying drawings each embodiment according to the present invention.Here it is to be noted that it in the accompanying drawings, It assigns identical reference numeral to the substantially component part with same or like structure and function, and will omit about it Repeated description.
Hereinafter, state switching method and electronic equipment according to the present invention will be described with reference to figure 1 and Fig. 2.
Fig. 1 illustrates state switching methods according to the present invention, and Fig. 2 illustrates electronic equipment according to the present invention.
The illustrated state switching methods of Fig. 1 can be applied to the illustrated electronic equipments 100 of Fig. 2, the electronic equipment 100 include:Acquiring unit 110, comparing unit 120, link order generation unit 130, connection unit 140, first wirelessly communicate Module 210 and the second wireless communication module 220.
First wireless communication module 210 is used to establish with base station and be wirelessly connected to carry out the first communication;Described second Wireless communication module 220 is used to establish with access point and be wirelessly connected to carry out the second communication.
As illustrated in figure 1, the method includes:
In step s 110, described in acquiring unit 110 is obtained by first wireless communication module 210 from the base station The location information of electronic equipment 100, as the first location information to be compared;
In the step s 120, comparing unit 120 is by the described first location information to be compared and in the electronic equipment 100 One or more preset position informations of storage are compared, each in the preset position information is related to access point Connection;
In step s 130, if first location information to be compared and first in the preset position information are default Location information matches, then link order generation unit 130 generates the first connection and establishes instruction;And
In step S140, connection unit 140 establishes instruction come so that second channel radio according to first connection Believe that module 220 and the first access point are established to connect, first access point is associated with first preset position information.
It can be seen that using state switching method according to the present invention and electronic equipment, the first wireless communication can be passed through Communication of the module with base station obtains the location information of electronic equipment, by acquired location information with and access point it is associated Preset position information is compared, and when such a match occurs, judges that electronic equipment is in the access point coverage area trusted, And make the second wireless communication module is established with the access point to connect.Therefore, in the present invention it is possible to based on electronic equipment Location information carrys out the switch of the second wireless communication module in automatically control electronics, to reduce the manual behaviour of user Make, and improves the user experience of data communication aspects.
Hereinafter, state switching method and electronics according to the ... of the embodiment of the present invention will be described with reference to figure 3 and Fig. 4 to set It is standby.
Fig. 3 illustrates state switching method according to the ... of the embodiment of the present invention, and Fig. 4 illustrate it is according to the ... of the embodiment of the present invention Electronic equipment.
Fig. 3 method illustrated can be applied to the illustrated electronic equipments 100 of Fig. 4, this comes for sentencing mobile phone The electronic equipment 100 is illustrated.As illustrated in Figure 2, which may include:Acquiring unit 110, Comparing unit 120, link order generation unit 130, connection unit 140, the first wireless communication module 210 and second wireless communication Module 220.Moreover it is preferred that the electronic equipment 100 can also include:Third wireless communication module 230, display module 240, And it unshowned detection unit, judging unit, switching command generation unit, switch unit, counting unit, processing unit, deposits Store up instruction generation unit.
For example, above-mentioned acquiring unit 110, comparing unit 120, link order generation unit 130, connection unit 140, with And unshowned judging unit, switching command generation unit, switch unit, counting unit, processing unit, store instruction generate list Member can be as a unit of electronic equipment(Such as, central processing unit(CPU))And it is integrated in the inside of the electronic equipment. Alternatively, they can also form the state switching device detached with the electronic equipment by way of software and/or hardware, and And connect by wire or wirelessly to the electronic equipment.
Meanwhile above-mentioned the first wireless communication module 210, the second wireless communication module 220, third wireless communication module 230 and display module 240 can be electronic equipment independent hardware module.
For example, the first wireless communication module 210 can be moving speech communication module(Such as, global system for mobile communications (GSM)Module), it is wirelessly connected for being established with base station to carry out the first communication(Such as, GSM Speech Communications);Second channel radio Believe that module 220 can be wireless data communication module(Such as, WLAN module), it is wirelessly connected for being established with access point to carry out Second communication(Such as, WLAN data communicates);Third wireless communication module 230 can be mobile data communication module(Such as, GPRS module or 3G module), it is wirelessly connected for being established with base station to carry out the third communication(Such as, GPRS or 3G data are logical Letter);And display module 240 can be display screen(Such as, touch screen), for showing the various letters in electronic equipment to user Breath.
Although should be noted that come mobile phone as the example of electronic equipment in the following embodiment of the present invention It illustrates, but the invention is not restricted to this.But state switching method according to the ... of the embodiment of the present invention can also be applied to Net book, tablet computer(PAD), notebook computer, satellite phone, multimedia player, personal digital assistant(PDA)In Any one.
As illustrated in fig. 3, state switching method according to the ... of the embodiment of the present invention includes:
In step S210, when establishing wireless connection for the first time with access point, location information is stored as predeterminated position letter Breath.
For example, when user wants to realize the second radio communication mold using state switching method according to the ... of the embodiment of the present invention Block(For example, WLAN module)220 and/or third wireless communication module(For example, GPRS module)230 open and close automatically When, which can use electronic equipment according to the conventional method first(For example, mobile phone)100, and pass through the behaviour Make to be formed the list of a preset position information in the electronic device.
Specifically, when user wants efficiently to realize that data communicate using mobile phone(For example, accessing internet)When, The user is inevitable to use WLAN technologies in the region with WLAN coverage, to obtain the number that speed is fast but region is limited According to access, and GPRS technologies are used in the region of not WLAN coverage, to obtain region broadness but slow-footed data Access.
Thus, when user learns in the hot spot region for oneself having been introduced into and being covered with WLAN, for example, when user from Open air enters company and the user is from when the WLAN services that its company was not used, which passes through the correlation in mobile phone Configuration application, manually closes GPRS module 230, to disconnect the data connection carried out via mobile communications network, opens simultaneously WLAN module 220, and according to the relevant operation for accessing WLAN for the first time, by selecting appropriate access point, the correct IP of setting Network cipher etc. needed for address, input, come with the access point for providing the WLAN(AP)It establishes and is wirelessly connected.
At this point, within the mobile phone 100, judging unit(It is not shown)Detect WLAN module 220 whether with the access point at Establish to work(wireless connection.After judging that WLAN module 220 is successfully set up wireless connection with access point, list is judged Member notice acquiring unit 110 obtains the location information of mobile phone 100.Acquiring unit 110 passes through the first wireless communication module(Example Such as, gsm module)210 obtain the location information of the mobile phone from the base station for servicing the mobile phone 100 is currently used in, as Location information to be compared.
For example, the location information that acquiring unit 110 passes through the mobile phone acquired in gsm module 210 can be mobile electricity The identification information of base station belonging to words 100.Specifically, the identification information of the base station can be that mobile phone 100 is presently in In cellular cell identifier(CELLID).
Since the user is to use state switching method according to the present invention for the first time, so within the mobile phone 100 may be used It can not existence position information list.At this moment, mobile phone 100 creates a new blank position information list first.
Due to not yet including any preset position information in newly-built location information list, so store instruction generates list Member generates information storage instruction, is used for location information to be compared(That is, being currently used in the base station for servicing the mobile phone 100 CELLID)It stores in the location information list in storage unit.
Then, processing unit(It is not shown)It is instructed according to the information storage to store the current location information of mobile phone For a preset position information, and the preset position information is related to the access point that mobile phone 100 has been successfully connected Connection.
For example, at this point, an entry as shown in Table 1 will be included at least in the location information list.
Table 1
Number Preset position information Access Point Identifier
1 CELLID1 AP1
In step S220, the location information of electronic equipment is obtained, as the first location information to be compared.
For example, after mobile phone is successfully set up location information list in step S210, it should if user is hand-held Mobile phone is manoeuvred into again in the service range of the base station with preset position information, such as user is hand-held to be somebody's turn to do by working as Identical mobile phone 100 is again introduced into company from open air, then mobile phone 100 can by WLAN module 220 come automatically with The access point of user company, which is established, to be wirelessly connected.
Specifically, in the first example, within the mobile phone 100, the acquiring unit 110 can periodically, randomly, Or the instruction depending on user to communicate with the foundation of gsm module 210, and order gsm module 210 is fed back to it for servicing The location information of the current base station of mobile phone 100, such as CELLID.
In the second example, when the display module for including in the mobile phone 100(Such as, touch screen)(It is not shown)From When non-enabled state is switched to enabled state, for example, working as detection unit(It is not shown)Detect user by power supply etc by When button lights the touch screen of mobile phone, detection unit triggering acquiring unit 110 is acted, and is obtained with order gsm module 210 The location information of the mobile phone is taken, and the information is fed back to it.In this example, can the trigger action based on user come State switching method according to the ... of the embodiment of the present invention is executed, reduces the frequent movement of acquiring unit 110 etc. as a result, is saved The power consumption of mobile phone 100.
In the following, preferably being continued to explain with second example.
When user is again introduced into its company from open air, once user has lighted the touch screen of mobile phone 100, obtain single Member 110 just obtains the location information of mobile phone by gsm module 210 from base station, as the first location information to be compared.
In step S230, the first location information to be compared is carried out with the preset position information stored in the electronic device Compare.
For example, after receiving the accessed by acquiring unit 110 first location information to be compared, comparing unit 120 Read the location information list that stores within the mobile phone 100, and by the location information to be compared and the location information list In preset position information be compared, wherein each in the preset position information is related to one or more access points Connection.
If the location information to be compared is matched with a certain preset position information in location information list, this method Proceed to the step S240 that will be described later.If the location information to be compared and any preset position information are not Match, then this method terminates.
In step S240, generates the first connection and establish instruction.
When determining that the location information to be compared is matched with a certain preset position information, it is preferable that comparing unit 120 Notify judging unit(It is not shown)It is operated, is non-enabled state to judge that GPRS module 230 is currently at enabled state also, Judge whether GPRS module 230 is current in running order.If it is, the switching command in mobile phone 100 generates list Member(It is not shown)First state switching command is generated, the first state switching command is for notifying switch unit(It is not shown)It will GPRS module 230 is switched to non-enabled state from enabled state, that is, GPRS module 230 is closed, to save mobile phone 100 Unnecessary power consumption.
In addition, when determining that the location information to be compared is matched with a certain preset position information, it is preferable that judge single Member(It is not shown)Also operation is non-enabled state to judge that WLAN module 220 is currently at enabled state also.
If WLAN module 220 is currently at non-enabled state, judging unit notifies switching command generation unit to generate Second status switching instruction first switches WLAN module 220 from non-enabled state according to the instruction to trigger switch unit To enabled state, then link order generation unit 130 is notified to continue to operate.
If WLAN module 220 is currently at enabled state, which further judges that the WLAN module 220 is worked as It is preceding to be in connected status or not-connected status.If WLAN module 220 is current to establish connection simultaneously with a certain access point During data access, then illustrate user by WLAN into row data communication, and this method Terminate;And if current do not established with any access point of WLAN module 220 connects, judging unit notifies link order to generate Unit 130 continues to operate.
After above-mentioned judgement operation is finished, link order generation unit 130 generates the first connection and establishes instruction, uses It is wirelessly connected in being established in WLAN module 220 and access point corresponding with matched preset position information.
In step s 250 so that the second wireless communication module and the first access point are established and connected.
After receiving the first connection foundation instruction from link order generation unit 130, the triggering of connection unit 140 is in Enabled state(That is, working condition)WLAN module 220 operated, call store before with the relevant configuration of the access point Information, the configuration information include it is following in it is one or more:The IP address of access point, the password of access point, the IP of itself Location etc..Then, which can be based on configuration information trial and corresponding access point is established and connected.
In step S260, judge whether connection is successfully established.
Subsequently, preferably, judging unit can be also used in connection unit 140 so that WLAN module 220 connects with corresponding Access point is established after connection, judges whether be successfully set up connection therebetween within the first time that can be arranged.If It is that then this method proceeds to step S270.
The foundation connection if it is determined that unit judges go out to fail both in the given time, then illustrate that network connection occurs Problem, this may be due to the configuration of mobile phone and/or access point changes or software and hardware break down etc. a variety of causes Caused by.
At this moment, judging unit can preferably notify comparing unit 120 to arrange the location information to be compared and location information Other preset position informations in table are compared, and whether there is other match conditions in lists to check.
For example, if there is also a matching preset address, step S240 and S250 can be repeated to make WLAN moulds Block 220 reattempts to connection.In addition, if there is multiple matching preset address, then it can select and connect by various criterion The associated preset position information of access point.The various criterion include:Minimum default position is numbered in selection location information list Confidence breath, the maximum preset position information of radiation intensity of selection access point, prompt user manually select etc..
However, if it is determined that going out other preset position informations in location information and the location information list to be compared not Matching, or determine that other preset position informations are not present in location information list, then the notice of comparing unit 120 switching refers to Generation unit is enabled to generate third state switching command.Then, switch unit according to the third state switching command come by WLAN moulds Block 220 switches back to non-enabled state from enabled state, and neighbouring WLAN access points are continually searched for avoid mobile phone 100 Power is consumed in vain with connection is attempted.
Preferably, if user it is expected long-term holding network connection, after switch unit closes WLAN module 220, The switching command generation unit can also generate the 4th status switching instruction, to notify switch unit by GPRS module 230 from non- Enabled state is switched to enabled state, then, the link order generation unit can also generate the second connection establish instruction, with Make the GPRS module 230 is established with base station to connect in control connection unit.In this way, user can by GPRS module 230 come With the GPRS network of low rate come continue access internet.
It is connected in addition, if causing user that can not all be established again with the access point in the future due to access point failure, then The considerations of for resource optimization, it should will be deleted from location information list with the relevant entry of the access point.For this purpose, it is preferred that Ground, which can also include counting unit, for not built successfully with a certain access point to WLAN module 220 The number of vertical connection is counted, and notifies the count value to processing unit.Then, when processing unit judges connection failure Number be more than threshold value when, processing unit deletes this preset position information stored from location information list.In this way, can To discharge the memory space of the storage unit in mobile phone 100, and it is permanent to promote the reply access point of WLAN module 220 The ability of failure.
In step S270, when location information mismatches, location information is stored as preset position information.
It is successfully set up between WLAN module 220 and corresponding access point in the given time if it is determined that unit judges go out Connection, then user can provide every data access service to this explanation by WLAN at this time(For example, browsing net Page, instant messaging, online game etc.).
It should be noted that in general, the coverage area of WLAN is covered with the base station for providing mobile communication service Lid range may and differ, that is to say, that there may be multiple WLAN in the coverage area of same base station, similarly, same Multiple base stations are also likely to be present in the coverage area of one WLAN.
In the case of the former, after WLAN module 220 and the access point are established and be wirelessly connected, if WLAN module 220 It was found that the wireless connection is interrupted, and connection can not be re-established in the given time, then as described above, WLAN module 220 can To notify judging unit, so that comparing unit 120 is checked with the presence or absence of other match conditions in location information list, and Attempt connection.If comparing unit 120 determines the location information to be compared and other predeterminated positions in location information list Information all mismatches, or determines that other preset position informations are not present in location information list, then on the one hand, can incite somebody to action WLAN module 220 closes and opens GRPS modules 230, to keep the connection of data communication in the case where saving power consumption;Separately On the one hand, if user selects to connect other access points manually at this time, mobile phone 100 repeats step S210, so as to will It is updated into location information list with the relevant entry of the new access point.
For example, at this point, two entries as shown in Table 2 will be included at least in the location information list.
Table 2
Number Preset position information Access Point Identifier
1 CELLID1 AP1
2 CELLID1 AP2
In addition, in the case of being also likely to be present multiple base stations in the coverage area of same WLAN, in order to enable position is believed Breath list can more accurately reflect the coverage area of WLAN, it is preferable that be established in WLAN module 220 and the access point wireless After connection, acquiring unit 110 can continue to obtain the location information of mobile phone 100, as new location information to be compared. For example, acquiring unit 110 can periodically, randomly, the instruction depending on user or the touch screen when mobile phone 100 When being lit, the CELLID of the current base station for servicing mobile phone 100 is obtained via gsm module 210.Then, compare One or more preset position informations that unit 120 is stored by the location information to be compared newly obtained and within the mobile phone 100 It is compared.
In one example, if each in the location information and preset position information to be compared mismatches, Illustrate that mobile phone 100 may have occurred and that change in location, enters positioned at same for example, user holds the mobile phone 100 WLAN coverage but from another base station to the mobile phone 100 provide mobile communication service region.Storage refers at this time Generation unit is enabled to generate information storage instruction, and processing unit is instructed according to the information storage come by the current position of mobile phone Confidence breath is stored as new preset position information, and the preset position information is associated with the same access point.
For example, at this point, will be including at least two entries as shown in table 3 in the location information list.
Table 3
Number Preset position information Access Point Identifier
1 CELLID1 AP1
2 CELLID2 AP1
In another example, the physical location of the mobile phone 100 may also not change, but be in two bees The overlapping region of nest cell.At this moment, the location information of the mobile phone 100 accessed by the acquiring unit 110(CELLID) It due to base station signal strength etc. and and may differ at place in different times.At this moment, due within the mobile phone 100 Through there is the location information list created before, so comparing unit 120 arranges the location information to be compared and the location information Preset position information in table is compared.
If the location information to be compared and the preset position information being present in the list mismatch, store instruction life It generates information storage instruction again at unit, it is pre- that the new location information of mobile phone is stored as by another with notifier processes unit If location information, and another preset position information is associated with the access point that mobile phone 100 has been successfully connected.
For example, when the WLAN coverage for the access point for establishing connection with mobile phone 100 is in two base stations simultaneously When coverage, two entries as shown in Table 2 will be included at least in the location information list.
During the location information that acquiring unit 110 obtains mobile phone 100, preferably, acquiring unit 110 can be pre- Fixed interval obtains the location information of mobile phone by means of gsm module 210, judge current location information with previously Location information whether change.In case of change, then further WLAN module 220 is judged and the access point that currently connect Keep whether the time being wirelessly connected is greater than or equal to the scheduled time;Only it is greater than or equal to when the retention time of wireless connection When the predetermined time, i.e., only when the wireless connection is sufficiently stable, then 110 ability of acquiring unit using current location information as Second location information to be compared.
It can be seen that using state switching method according to the ... of the embodiment of the present invention and electronic equipment, can be set based on electronics Standby location information carrys out the wireless communication module in automatically control electronics(For example, mobile communication module, WLAN Module, bluetooth module, near-field communication(NFC)Module, infrared module etc.)Switch.
Specifically, in an embodiment of the present invention, such as GSM or CDMA can be used(CDMA)The base station of system Identifier(For example, CELLID)Area identification as WLAN.When mobile phone accesses some WLAN access point for the first time, when even After being connected into work(, mobile phone automatically records the CELLID of GSM or CDMA at this time and meets the CELLID and this WLAN Access point associates, the station location marker as this wlan network.When next mobile phone is connected to this associated CELLID, just It can be that user opens WLAN automatically, remove the manual labor of user from, and can ensure to open in time in the overlay area of WLAN WLAN。
In addition, during user is using WLAN, in case of the switching of CELLID, meeting certain Connection Time Under the premise of, new CELLID can also be increased in CELLID lists.When the mobile phone of user has gone out the regions CELLID When, if WLAN can be closed without available WLAN AP at this time, to save unnecessary electric quantity consumption.Moreover, because The positioning of CELLID may be inaccurate, after automatically opening mobile phone WLAN, if it find that being not intended to access Then WLAN can be automatically closed according to certain strategy in WLAN access points.
In addition, when fault open WLAN repeatedly occurring at CELLID for one, can automatically be deleted by certain strategy Except this CELLID, to ensure the correctness of CELLID lists, the relationship of equilbrium position recognition efficiency and power consumption.
Therefore, in the mobile phone using state switching method according to the ... of the embodiment of the present invention, WLAN module does not need It is opened and closed manually by user again, but the fiber crops of user's manual operation is eliminated by mobile phone automatic control and management completely It is tired.
Hereinafter, the example of state switching method specific implementation according to the ... of the embodiment of the present invention will be described with reference to Figure 5.
Fig. 5 illustrates the software realization of state switching method according to the ... of the embodiment of the present invention.
As described above, the first wireless communication module 210, the second wireless communication module 220, third wireless communication module 230 Can be the independent hardware module of electronic equipment with display module 240.Acquiring unit 110, comparing unit 120, link order life It is single at unit 130, connection unit 140 and unshowned detection unit, judging unit, switching command generation unit, switching Member, counting unit, processing unit, store instruction generation unit can be integrated in the electronics by way of software and/or hardware The inside of equipment.
When being realized by software mode, for example, using Android(Android)The mobile phone 100 of operating system In the case of, which may include four software units(For example, Android installation kits, also known as APK), i.e.,:Work( Rate manager 301, positioner 302, mobile phone manager 303 and WLAN managers 304.
The power manager 301 can be made of detection unit, and with the display module of mobile phone 100 240(It is all Such as, touch screen)Connection, for detecting whether display module 240 is lighted by user, and when being lit, to positioner 302 transmission screens light information(Screen BL Info).
Positioner 302 can by comparing unit 120, link order generation unit 130, unshowned judging unit, Switching command generation unit, switch unit, counting unit, processing unit, store instruction generation unit are constituted, and are received for working as When screen lights information, the location information of base station is obtained from mobile phone manager 303(CELLID Info).
Mobile phone manager 303 can be made of acquiring unit 110, and with the first channel radio of mobile phone 100 Believe module(For example, gsm module or CDMA module)210 connections, the position of the base station for obtaining current service mobile phone 100 Information.
After receiving the location information, positioner 302 obtains the second radio communication mold from WLAN managers 304 Block(For example, WLAN module)220 current states(WLAN Status), and when based on the state obtained, managed to WLAN Device 304 sends control command(ControlCommand).
WLAN managers 304 can be made of connection unit 140, and with the second radio communication mold of mobile phone 100 Block(For example, WLAN module)220 connection, for according to the control command come open, close WLAN module, so that WLAN module and Access point establishes connection etc..
In addition, the WLAN managers 304 can also be with third wireless communication module(For example, GPRS module)230 connections, are used It opens, close GPRS module according to the control command, GPRS module and mobile communications network is made to establish connection etc..
Wherein, which is, for example, location-based WLAN control modules, can be used as individually application Program and exist.The positioner 302 needs to divide the WLAN managers 304 and mobile phone manager with mobile phone 303 interact, so as to detecting system on-screen message(Such as, the event of the bright screen of mobile phone), monitor for servicing mobile electricity The CELLID switch instances of the base station of words obtain CELLID information, detection WLAN status informations(Such as, wlan network connects/breaks The event opened), and transmitting order to lower levels carries out WLAN switching manipulations.
Although hereinbefore being illustrated by taking software application as an example for realizing state switching method according to the present invention Each unit realization, but the invention is not restricted to this, but, can they be embodied as one or more hardware on the contrary Unit.
It can be seen that when using the state switching method for example for realizing the present invention in traditional mobile phone, For users such as the life relatively-stationary working clans in track(They generally can use WLAN in company and family, and on the way Use 3G), the WLAN of their almost unnecessary oneself managing mobile phone again can be made to switch.In this way, it is possible to reach Module can be automatically turned on when needed and uses WLAN, also module can be automatically closed in the case where leaving the regions WLAN, be kept away Exempt from due to cyclic search access point and caused by battery consumption.
In addition, the mark using CELLID as location information more meets the feature that WLAN is hundred meters or so region overlays, Inquiry, matched algorithm are all very simple, and software development is also very easy to.In addition, CELLID is in Android mobile phones Or simple application programming interfaces can be passed through in the intelligent platform of other operating systems(API)Immediately it obtains, does not need Additional electricity and time are consumed, very time saving power saving.
Through the above description of the embodiments, those skilled in the art can be understood that the present invention can be by It is realized in the mode of software plus required hardware platform, naturally it is also possible to all be implemented by software or hardware.Based on this The understanding of sample, technical scheme of the present invention to background technology contribute in whole or in part can be in the form of software products It embodies, which can be stored in a storage medium, such as ROM/RAM, disk, CD, including several Instruction is used so that a computer equipment(Can be personal computer, server or the network equipment etc.)Execute the present invention Method described in certain parts of each embodiment or embodiment.
Each embodiment of the present invention has been described in detail above.However, it should be appreciated by those skilled in the art that not taking off In the case of from the principle and spirit of the invention, these embodiments can be carry out various modifications, combination or sub-portfolio, and in this way Modification should fall within the scope of the present invention.

Claims (12)

1. a kind of state switching method, the method is applied to electronic equipment, and the electronic equipment includes the first radio communication mold Block and the second wireless communication module, first wireless communication module is used to establish to be wirelessly connected with base station to be led to carrying out first Letter;Second wireless communication module is used to establish with access point and be wirelessly connected to carry out the second communication,
It is characterized in that, the method includes:
The location information for obtaining the electronic equipment from the base station by first wireless communication module waits comparing as first Compared with location information;
By the described first location information to be compared and one or more preset position informations for storing in the electronic equipment into Row compares, each in the preset position information is associated with access point;
If first location information to be compared is matched with the first preset position information in the preset position information, give birth to Instruction is established at the first connection;And
Instruction is established according to first connection to connect to make second wireless communication module and the first access point establish, institute It is associated with first preset position information to state the first access point;
It is characterized in that, it is described so that second wireless communication module and the first access point establish the step of connecting before, The method further includes:
It is non-enabled state to judge that second wireless communication module is currently at enabled state also;
If second wireless communication module is currently at non-enabled state, the second status switching instruction is generated;And
Second wireless communication module is switched to enabled shape from non-enabled state according to second status switching instruction State,
The electronic equipment further includes third wireless communication module, and the third wireless communication module is used to establish with base station wireless It connects to carry out the third communication, and
Before described the step of generating the first connection foundation instruction, the method further includes:
It is non-enabled state to judge that the third wireless communication module is currently at enabled state also;
If the third wireless communication module is currently at enabled state, first state switching command is generated;And
The third wireless communication module is switched to non-enabled shape from enabled state according to the first state switching command State,
Wherein
Described so that after the step of second wireless communication module and the first access point establish connection, the method is also wrapped It includes:
Judge that second wireless communication module is connect with whether the first access point is successfully set up within first time;
It connect, generates if second wireless communication module is not successfully set up with the first access point within first time Third state switching command;And
Second wireless communication module is switched to non-enabled shape from enabled state according to the third state switching command State,
Wherein, the electronic equipment further includes third wireless communication module, and the third wireless communication module with base station for building It is vertical to be wirelessly connected to carry out the third communication, and
After described the step of second wireless communication module is switched to non-enabled state from enabled state, the method Further include:
It generates the second connection and establishes instruction;And
Instruction is established come so that the third wireless communication module and base station are established and connected according to second connection.
2. the method according to claim 1, which is characterized in that the method further includes:
The number connecting is not successfully set up to second wireless communication module with the first access point to count;And
If the number is more than threshold value, first preset position information stored is deleted from electronic equipment.
3. the method according to claim 1, which is characterized in that the electronic equipment further includes display module, and
The step of location information for obtaining the electronic equipment includes:
When the display module is switched to enabled state from non-enabled state, the location information of the electronic equipment is obtained.
4. the method according to claim 1, which is characterized in that the method further includes:
When second wireless communication module and the second access point establish wireless connection for the first time, the position of the electronic equipment is obtained Confidence ceases;
Generate information storage instruction;
The location information of the electronic equipment is stored as the second preset position information according to described information store instruction;And
Second preset position information is associated with second access point.
5. the method according to claim 1, which is characterized in that the method further includes:
After second wireless communication module and the first access point are established and be wirelessly connected, the position of the electronic equipment is obtained Information, as the second location information to be compared;
By the described second location information to be compared and one or more preset position informations for storing in the electronic equipment into Row compares;
If each in second location information to be compared and the preset position information mismatches, information is generated Store instruction;
The location information of the electronic equipment is stored as third preset position information according to described information store instruction;And
The third preset position information is associated with first access point.
6. method according to claim 5, which is characterized in that described to be built with the first access point in second wireless communication module It is vertical be wirelessly connected after, the location information that obtains the electronic equipment, as the step of the second location information to be compared include:
After second wireless communication module and the first access point are established and be wirelessly connected, in scheduled interval, institute is obtained State the location information of electronic equipment;
Judge whether current location information changes with previous location information;
In case of change, then judge whether second wireless communication module and the first access point are kept for the time being wirelessly connected More than or equal to the second time;And
If it is greater than or be equal to the second time, then using current location information as the second location information to be compared.
7. a kind of electronic equipment, the electronic equipment includes the first wireless communication module and the second wireless communication module, described the One wireless communication module is used to establish with base station and be wirelessly connected to carry out the first communication;Second wireless communication module be used for Access point, which is established, to be wirelessly connected to carry out the second communication,
It is characterized in that, the electronic equipment further includes:
Acquiring unit, the position for obtaining the electronic equipment from the base station by first wireless communication module are believed Breath, as the first location information to be compared;
Comparing unit, for the described first location information to be compared and the one or more stored in the electronic equipment is pre- If location information is compared, each in the preset position information is associated with access point;
Link order generation unit, if for the described first location information to be compared and first in the preset position information Preset position information matches, then generates the first connection and establish instruction;And
Connection unit, for establishing instruction according to first connection come so that second wireless communication module and the first access Point establishes connection, and first access point is associated with first preset position information;
The electronic equipment further includes:
Judging unit, for making second wireless communication module and the first access point establish connection in the connection unit Before, it is non-enabled state to judge that second wireless communication module is currently at enabled state also;
Switching command generation unit generates if being currently at non-enabled state for second wireless communication module Two-state switching command;And
Switch unit, for according to second status switching instruction come by second wireless communication module from non-enabled state Enabled state is switched to,
The electronic equipment further includes third wireless communication module, and the third wireless communication module is used to establish with base station wireless It connects to carry out the third communication, and
The electronic equipment further includes:
Judging unit, for before the link order generation unit generates the first connection foundation instruction, judging the third It is non-enabled state that wireless communication module, which is currently at enabled state also,;
Switching command generation unit generates first if being currently at enabled state for the third wireless communication module Status switching instruction;And
Switch unit, for being cut the third wireless communication module from enabled state according to the first state switching command Non- enabled state is changed to,
Wherein, the electronic equipment further includes:
Judging unit, for making second wireless communication module and the first access point establish connection in the connection unit Afterwards, judge that second wireless communication module is connect with whether the first access point is successfully set up within first time;
Switching command generation unit, if within first time second wireless communication module do not have with the first access point It is successfully set up connection, then generates third state switching command;And
Switch unit, for being cut second wireless communication module from enabled state according to the third state switching command Non- enabled state is changed to,
Wherein, the electronic equipment further includes third wireless communication module, and the third wireless communication module with base station for building It is vertical to be wirelessly connected to carry out the third communication, and
The switch unit by second wireless communication module after enabled state is switched to non-enabled state, the company It connects instruction generation unit and generates the second connection foundation instruction;And
The connection unit establishes instruction come so that the third wireless communication module is established with base station according to second connection Connection.
8. electronic equipment according to claim 7, which is characterized in that the electronic equipment further includes:
Counting unit, for second wireless communication module and the first access point be not successfully set up the number connecting into Row counts;And
It is default to delete described first stored if being more than threshold value for the number from electronic equipment for processing unit Location information.
9. electronic equipment according to claim 7, which is characterized in that the electronic equipment further includes display module, and
When the display module is switched to enabled state from non-enabled state, the acquiring unit obtains the electronic equipment Location information.
10. electronic equipment according to claim 7, which is characterized in that
When second wireless communication module and the second access point establish wireless connection for the first time, described in the storage unit acquisition The location information of electronic equipment;
The electronic equipment further includes:
Store instruction generation unit, for generating information storage instruction;
Processing unit, for being preset according to described information store instruction the location information of the electronic equipment is stored as second Location information;And it is second preset position information is associated with second access point.
11. electronic equipment according to claim 7, which is characterized in that
After second wireless communication module and the first access point are established and be wirelessly connected, the acquiring unit obtains the electricity The location information of sub- equipment, as the second location information to be compared;
The comparing unit is pre- by the described second location information to be compared and the one or more stored in the electronic equipment If location information is compared;And
The electronic equipment further includes:
Store instruction generation unit, if for the described second location information to be compared with it is each in the preset position information It is a all to mismatch, then generate information storage instruction;
Processing unit, for being preset according to described information store instruction the location information of the electronic equipment is stored as third Location information;And it is the third preset position information is associated with first access point.
12. electronic equipment according to claim 11, which is characterized in that the acquiring unit is in second wireless communication module It is established with the first access point after being wirelessly connected, in scheduled interval, obtains the location information of the electronic equipment;Judgement is worked as Whether preceding location information changes with previous location information;In case of change, then second wireless communication is judged Module keeps whether the time being wirelessly connected was greater than or equal to for the second time with the first access point;When if it is greater than or equal to second Between, then using current location information as the second location information to be compared.
CN201210364447.8A 2012-09-26 2012-09-26 State switching method and electronic equipment Active CN103686595B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210364447.8A CN103686595B (en) 2012-09-26 2012-09-26 State switching method and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210364447.8A CN103686595B (en) 2012-09-26 2012-09-26 State switching method and electronic equipment

Publications (2)

Publication Number Publication Date
CN103686595A CN103686595A (en) 2014-03-26
CN103686595B true CN103686595B (en) 2018-10-12

Family

ID=50322624

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210364447.8A Active CN103686595B (en) 2012-09-26 2012-09-26 State switching method and electronic equipment

Country Status (1)

Country Link
CN (1) CN103686595B (en)

Families Citing this family (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104202721B (en) * 2014-08-25 2016-11-09 努比亚技术有限公司 The operational approach of mobile terminal and device
CN104507140B (en) * 2014-12-22 2018-04-27 联想(北京)有限公司 A kind of information processing method and electronic equipment
CN104811973A (en) * 2015-03-23 2015-07-29 北京数字天域科技有限责任公司 Network switch control method and device of intelligent terminal
CN105636089A (en) * 2015-04-23 2016-06-01 宇龙计算机通信科技(深圳)有限公司 Access control method and access control device for wireless local area network
CN104853393A (en) * 2015-04-29 2015-08-19 努比亚技术有限公司 Network switching method and network switching device for mobile terminals
CN106303940A (en) * 2015-05-20 2017-01-04 展讯通信(上海)有限公司 Mobile terminal WLAN cut-in method and device
CN105050045B (en) * 2015-07-23 2019-05-14 深圳市金立通信设备有限公司 A kind of control method and terminal of the SOT state of termination
CN105392178B (en) * 2015-10-29 2017-10-31 上海连尚网络科技有限公司 A kind of method and apparatus for being used to obtain the access information of WAP
CN105517192A (en) * 2016-01-27 2016-04-20 广东欧珀移动通信有限公司 Wireless network connecting method and device
CN105873172A (en) * 2016-05-31 2016-08-17 努比亚技术有限公司 Method and device for searching for wireless local area network signals
DE102016210772A1 (en) * 2016-06-16 2017-12-21 Robert Bosch Gmbh Method for a, in particular wireless, transmission of electronic data between at least two connection partners, in particular between a hand-held power tool and an external unit
CN106131780A (en) * 2016-06-16 2016-11-16 捷开通讯(深圳)有限公司 A kind of mobile terminal and resource control method thereof
CN108632796B (en) * 2018-04-16 2021-05-28 Oppo广东移动通信有限公司 Bluetooth connection method, device, terminal and computer readable storage medium
CN109040958A (en) * 2018-08-16 2018-12-18 Oppo广东移动通信有限公司 Method for connecting network, device, electronic equipment and computer readable storage medium
CN113660650B (en) * 2021-04-12 2023-01-10 荣耀终端有限公司 Method and related device for device reconnection

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1523801A (en) * 2003-09-03 2004-08-25 ����ͨѶ�ɷ����޹�˾ Method for switching between CDMA system and wireless LAN of mobile terminal
CN1606740A (en) * 2001-12-19 2005-04-13 汤姆森特许公司 Method and apparatus for handing off a mobile terminal between a mobile network and a wireless LAN
CN101754300A (en) * 2008-11-28 2010-06-23 英业达股份有限公司 Wireless signal switching method

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101107869A (en) * 2005-01-18 2008-01-16 交互数字技术公司 Method and system for system discovery and user selection
CN100372440C (en) * 2005-07-08 2008-02-27 清华大学 Wireless local-network discovering method based on honeycomb network positioning
US8073467B2 (en) * 2008-09-25 2011-12-06 Microsoft Corporation WiFi and GSM landmarks and neighborhoods for location based services
CN101951551B (en) * 2010-09-30 2013-06-05 上海顶竹通讯技术有限公司 Network having wireless local area network and method for accessing terminal to wireless local area network
CN102448187B (en) * 2011-10-29 2015-10-07 华为终端有限公司 The method of automatic access Wi-Fi network and terminal

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1606740A (en) * 2001-12-19 2005-04-13 汤姆森特许公司 Method and apparatus for handing off a mobile terminal between a mobile network and a wireless LAN
CN1523801A (en) * 2003-09-03 2004-08-25 ����ͨѶ�ɷ����޹�˾ Method for switching between CDMA system and wireless LAN of mobile terminal
CN101754300A (en) * 2008-11-28 2010-06-23 英业达股份有限公司 Wireless signal switching method

Also Published As

Publication number Publication date
CN103686595A (en) 2014-03-26

Similar Documents

Publication Publication Date Title
CN103686595B (en) State switching method and electronic equipment
CN107852410B (en) Dissect rogue access point
CN102907137B (en) The self-adaptive service quality of Wireless Telecom Equipment
US8570993B2 (en) Wi-Fi intelligent selection engine
US20070248032A1 (en) Method of providing route update messages and paging access terminals
CN105873178A (en) Method and device for recognizing pseudo base-station
US20150139074A1 (en) Adaptive Generation of Network Scores From Crowdsourced Data
CN107820331A (en) Call method, device, computer equipment and readable storage medium storing program for executing
WO2014025465A1 (en) Systems and methods for service set identifier-based location detection
CN103945478A (en) Cell reselection method and mobile terminal
US20070297358A1 (en) Efficient WLAN location in a wireless device
CN103475996A (en) Network connecting method, network sharing method and devices
CN108616922A (en) A kind of method, user equipment and network equipment for exempting from authorization resources distribution
CN104850434A (en) Method and apparatus for downloading multimedia resources
CN101784092A (en) Method and terminal for realizing wireless network access based on geographic information system
CN103037476A (en) Control method for wireless network access and control device for wireless network access
WO2017069842A1 (en) Power management in multi-technology wireless communication devices
CN103023981A (en) Cloud computation system
CN108804294A (en) Method, apparatus, equipment and the computer readable storage medium that electricity is reminded
CN106454976B (en) A kind of switching method of wireless network, device and terminal
CN107820301A (en) Control method, device, terminal and the storage medium of WLAN switch
CN106658623A (en) Hotspot network switching method and terminal equipment
CN107911822A (en) Pseudo-base station detection method and device, terminal and computer-readable recording medium
CN110178395A (en) Pseudo-base station recognition methods and terminal
CN107248890A (en) Wireless communications method, device, storage medium and terminal

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant