CN106713522A - Wireless fidelity (Wi-Fi) connection method and mobile terminal - Google Patents

Wireless fidelity (Wi-Fi) connection method and mobile terminal Download PDF

Info

Publication number
CN106713522A
CN106713522A CN201611117289.0A CN201611117289A CN106713522A CN 106713522 A CN106713522 A CN 106713522A CN 201611117289 A CN201611117289 A CN 201611117289A CN 106713522 A CN106713522 A CN 106713522A
Authority
CN
China
Prior art keywords
address
mobile terminal
host configuration
configuration protocol
dynamic host
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.)
Granted
Application number
CN201611117289.0A
Other languages
Chinese (zh)
Other versions
CN106713522B (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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201611117289.0A priority Critical patent/CN106713522B/en
Publication of CN106713522A publication Critical patent/CN106713522A/en
Priority to PCT/CN2017/101462 priority patent/WO2018103400A1/en
Application granted granted Critical
Publication of CN106713522B publication Critical patent/CN106713522B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5007Internet protocol [IP] addresses
    • H04L61/5014Internet protocol [IP] addresses using dynamic host configuration protocol [DHCP] or bootstrap protocol [BOOTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5053Lease time; Renewal aspects
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/20Manipulation of established connections
    • H04W76/25Maintenance of established connections
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W84/00Network topologies
    • H04W84/02Hierarchically pre-organised networks, e.g. paging networks, cellular networks, WLAN [Wireless Local Area Network] or WLL [Wireless Local Loop]
    • H04W84/10Small scale networks; Flat hierarchical networks
    • H04W84/12WLAN [Wireless Local Area Networks]

Landscapes

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

Abstract

The embodiment of the invention provides a wireless fidelity (Wi-Fi) connection method and a mobile terminal. The method comprises the following steps: when the time length between a valid period of an IP address of the mobile terminal to an end time is smaller than a preset threshold, sending an IP address renewal request to a first DHCP server within a preset time length; in the case of IP address renewal failure of the mobile terminal, reporting no IP address renewal failure message to the system of the mobile terminal, but broadcasting an IP address acquisition request; and receiving at least one IP address allocated by at least one DHCP server, and selecting one IP address. By adoption of the wireless fidelity (Wi-Fi) connection method provided by the embodiment of the invention, in an IP address renewal process of the mobile terminal, connection of the Wi-Fi network is kept.

Description

A kind of Wireless Fidelity Wi-Fi connection method and mobile terminal
Technical field
The present invention relates to Internet technical field, and in particular to a kind of Wireless Fidelity Wi-Fi connection method and mobile terminal.
Background technology
With the fast development of information technology, mobile terminal (such as mobile phone, panel computer) is used using increasingly popularizing Requirement of the family to mobile terminal also more and more higher, not only needs processing speed higher, also to Wireless Fidelity (Wireless Fidelity, Wi-Fi) propose requirement.
In the prior art, although DHCP (Dynamic Host Configuration Protocol, DHCP clear and definite agreement) specifies, but, mobile terminal user can still encounter Internet protocol in actually used equipment Re-rent the situation of failure in (Internet Protocol Address, IP) address.For example, the Dynamic Host Configuration Protocol server of some networks is not Response IP address re-rents request (DHCP Request), or, it is likely to re-rent when mobile terminal is connected to different sub-network Less than IP address, the Wi-Fi network connection of current connection is caused to disconnect or cannot continue to access Wi-Fi network.
The content of the invention
A kind of Wireless Fidelity Wi-Fi connection method and mobile terminal are the embodiment of the invention provides, in mobile terminal Carry out during IP address re-rents, keeping Wi-Fi network not turn off.
Embodiment of the present invention first aspect provides a kind of Wireless Fidelity Wi-Fi connection method, including:
Mobile terminal IP address the term of validity apart from the end time be less than predetermined threshold value when, in predetermined time period IP address is sent to the first Dynamic Host Configuration Protocol server re-rent request;
When the mobile terminal is re-rented IP address and failed, do not reported to the system of the mobile terminal and re-rent IP address mistake Message is lost, and Broadcast IP address obtains request;
At least one IP address distributed by least one Dynamic Host Configuration Protocol server is received, and selects one of IP address.
Embodiment of the present invention second aspect provides a kind of mobile terminal, including:
Transmitting element, for the IP address in mobile terminal the term of validity apart from the end time be less than predetermined threshold value when, IP address is sent to the first Dynamic Host Configuration Protocol server re-rent request in predetermined time period;
Radio unit, for the mobile terminal re-rent IP address fail when, not in the system to the mobile terminal Report re-rents IP address failed message, and Broadcast IP address obtains request;
Receiving unit, for receiving at least one IP address distributed by least one Dynamic Host Configuration Protocol server, and selects wherein One IP address.
The embodiment of the present invention third aspect provides a kind of mobile terminal, including:
Processor and memory;Wherein, the processor is by calling code in the memory or instruction to perform The some or all of step of the method described by first aspect.
Implement the embodiment of the present invention, have the advantages that:
By the embodiment of the present invention, predetermined threshold value is less than apart from the end time in the term of validity of the IP address of mobile terminal When, request is re-rented to the first Dynamic Host Configuration Protocol server transmission IP address in predetermined time period, re-rent IP address in mobile terminal and lose When losing, do not reported to the system of mobile terminal and re-rent IP address failed message, and Broadcast IP address obtains request, receives by least One at least one IP address of Dynamic Host Configuration Protocol server distribution, and select one of IP address.Due to re-renting IP in mobile terminal After the failure of address, do not reported to the system of mobile terminal and re-rent IP address failed message, so that, mobile terminal is in connection State, therefore, can carry out during IP address re-rents, keeping Wi-Fi network not turn off in mobile terminal.
Brief description of the drawings
Technical scheme in order to illustrate more clearly the embodiments of the present invention, below will be to that will make needed for embodiment description Accompanying drawing is briefly described, it should be apparent that, drawings in the following description are some embodiments of the present invention, for ability For the those of ordinary skill of domain, on the premise of not paying creative work, can also obtain other attached according to these accompanying drawings Figure.
Fig. 1 is that a kind of first embodiment flow of Wireless Fidelity Wi-Fi connection method provided in an embodiment of the present invention is illustrated Figure;
Fig. 1 a are a kind of Wi-Fi lists demonstration schematic diagrames provided in an embodiment of the present invention;
Fig. 2 is that a kind of second embodiment flow of Wireless Fidelity Wi-Fi connection method provided in an embodiment of the present invention is illustrated Figure;
Fig. 3 a are a kind of first embodiment structural representations of mobile terminal provided in an embodiment of the present invention;
Fig. 3 b are the another structural representations of the mobile terminal described by Fig. 3 a provided in an embodiment of the present invention;
Fig. 4 is a kind of second embodiment structural representation of mobile terminal provided in an embodiment of the present invention.
Specific embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete Site preparation is described, it is clear that described embodiment is a part of embodiment of the invention, rather than whole embodiments.Based on this hair Embodiment in bright, the every other implementation that those of ordinary skill in the art are obtained under the premise of creative work is not made Example, belongs to the scope of protection of the invention.
Term " first ", " second ", " the 3rd " in description and claims of this specification and the accompanying drawing and " Four " it is etc. for distinguishing different objects, rather than for describing particular order.Additionally, term " comprising " and " having " and it Any deformation, it is intended that covering non-exclusive is included.For example contain the process of series of steps or unit, method, be System, product or equipment are not limited to the step of having listed or unit, but alternatively also include the step of not listing or list Unit, or alternatively also include for these processes, method, product or other intrinsic steps of equipment or unit.
Referenced herein " embodiment " is it is meant that the special characteristic, structure or the characteristic that describe can be wrapped in conjunction with the embodiments Containing at least one embodiment of the present invention.It is identical that each position in the description shows that the phrase might not each mean Embodiment, nor the independent or alternative embodiment with other embodiments mutual exclusion.Those skilled in the art explicitly and Implicitly understand, embodiment described herein can be combined with other embodiments.
Mobile terminal described by the embodiment of the present invention can include smart mobile phone (such as Android phone, iOS mobile phones, Windows Phone mobile phones etc.), panel computer, mobile unit, palm PC, notebook computer, mobile internet device (MID, Mobile Internet Devices) or Wearable etc., above-mentioned is only citing, and non exhaustive, comprising but do not limit In above-mentioned mobile terminal.
It should be noted that under normal circumstances, router is provided with Dynamic Host Configuration Protocol server, Dynamic Host Configuration Protocol server is used for movement Terminal distribution IP address, the IP address has a term of validity, and before the deadline, mobile terminal can keep Wi-Fi with router Connection status, at the end of the term of validity, then mobile terminal can disconnect the Wi-Fi connection and router between.Have in IP address Before the effect phase terminates, IP address can be sent to Dynamic Host Configuration Protocol server and re-rent request, Dynamic Host Configuration Protocol server can respond the IP address to be re-rented and ask Ask as mobile terminal distributes IP address.
It should be noted that the interaction flow between above-mentioned mobile terminal and Dynamic Host Configuration Protocol server can be comprising following 4 steps Suddenly:
1st, the outside Broadcast IP address of mobile terminal obtains request;
2nd, at least one Dynamic Host Configuration Protocol server provides IP address and obtains request to respond the IP address;
3rd, mobile terminal chooses an IP address, and disappears to the corresponding target Dynamic Host Configuration Protocol server transmission confirmation of the IP address Breath;
4th, the target Dynamic Host Configuration Protocol server sends ACK message to mobile terminal.
Further, mobile terminal re-rent IP address failure (re-rent time-out or receive Dynamic Host Configuration Protocol server hair without should Answer (Negative Acknowledgment, NAK)), it is main during re-renting to perform step 3~4, it is generally the case that this is re-rented The sustainable system of process specifies time span, and (system specifies time span by the system default of mobile terminal, and it is one Individual fixed value).Specified in time span in the system, mobile terminal continuously carries out above-mentioned steps 3~4, the time is specified in system After length terminates, if not receiving the ACK message of Dynamic Host Configuration Protocol server transmission, then mobile terminal can then report DHCP_FAILURE Message, the system of mobile terminal would generally break current network connection when this message is processed, and then, re-establish connection And reselect Dynamic Host Configuration Protocol server (performing above-mentioned steps 1~4).If during IP address is re-rented, user perceives network Disconnect, then can cannot use network for some time, thus, user may think that experience is poor.
Therefore, the embodiment of the present invention proposes a kind of Wireless Fidelity Wi-Fi connection method, comprises the following steps:
Mobile terminal IP address the term of validity apart from the end time be less than predetermined threshold value when, in predetermined time period IP address is sent to the first Dynamic Host Configuration Protocol server re-rent request;
When the mobile terminal is re-rented IP address and failed, do not reported to the system of the mobile terminal and re-rent IP address mistake Message is lost, and Broadcast IP address obtains request;
At least one IP address distributed by least one Dynamic Host Configuration Protocol server is received, and selects one of IP address.
In this way, when IP address is re-rented unsuccessfully, can not be reported to the system of mobile terminal and re-rent IP address failed message, move Dynamic terminal just will not disconnect current Wi-Fi network, and Broadcast IP address obtains request, so, it is convenient to receive by DHCP The IP address of server-assignment, so that, when IP address is re-rented unsuccessfully, it is also possible to keep Wi-Fi connection status.
Fig. 1 is referred to, is a kind of first embodiment stream of Wireless Fidelity Wi-Fi connection method provided in an embodiment of the present invention Journey schematic diagram.Wireless Fidelity Wi-Fi connection method described in the present embodiment, comprises the following steps:
101st, mobile terminal IP address the term of validity apart from the end time be less than predetermined threshold value when, it is long in Preset Time Spend introversive first Dynamic Host Configuration Protocol server transmission IP address and re-rent request.
Wherein, in above-mentioned steps 101, mobile terminal is in Wi-Fi connection status.Above-mentioned predetermined threshold value can be by user voluntarily Set or system default.Predetermined time period is voluntarily set by user.Above-mentioned first Dynamic Host Configuration Protocol server can work as mobile terminal Before the built-in Dynamic Host Configuration Protocol server of the router that is connected to.
Specifically, when mobile terminal is in Wi-Fi connection status, mainly by gateway ip address and Dynamic Host Configuration Protocol server point Route is formed between the IP address (i.e. the IP address of mobile terminal) matched somebody with somebody, mobile terminal is set up according between the route and router Communication connection.But, due to the IP address of Dynamic Host Configuration Protocol server distribution, it has certain term of validity, it is then desired in DHCP clothes Before the term of validity of the IP address of business device distribution not yet terminates, carry out IP address to Dynamic Host Configuration Protocol server from mobile terminal and re-rent.Move Dynamic terminal the IP address of the mobile terminal the term of validity apart from the end time be less than predetermined threshold value when, can be in predetermined time period Introversive first Dynamic Host Configuration Protocol server sends IP address and re-rents request.
For example, when mobile terminal disconnects Wi-Fi connection status, when mobile terminal is again introduced into the covering model of router Enclose, then can distribute an IP address (i.e. the IP address of mobile terminal), mobile terminal by the built-in Dynamic Host Configuration Protocol server of the router IP address and the IP address of the gateway between can form route, mobile terminal communicates according to being set up between the route and router Connection.Similarly, due to the IP address of Dynamic Host Configuration Protocol server distribution, it has certain term of validity, it is then desired in DHCP service Before the term of validity of the IP address of device distribution not yet terminates, carry out IP address to Dynamic Host Configuration Protocol server from mobile terminal and re-rent.It is mobile Terminal the IP address of the mobile terminal the term of validity apart from the end time be less than predetermined threshold value when, can be in predetermined time period IP address is sent to the first Dynamic Host Configuration Protocol server re-rent request.
Alternatively, the predetermined time period specifies time span less than by the system of the mobile terminal.Wherein, it is mobile It can be a fixed value that the system of terminal specifies time span, for example, 30s.And predetermined time period can for a fixed value or One value range of person, for example, 15s, i.e. mobile terminal can send IP address in 15s to the first Dynamic Host Configuration Protocol server obtains request. When predetermined time period specifies time span less than the system of mobile terminal, can just know that IP address is re-rented within a short period of time Whether fail.Under normal circumstances, when IP address is re-rented cannot once succeed, the probability that IP address is re-rented is carried out again It is not high, thus, the specified time (i.e. system specifies time span) that IP address is re-rented can be shortened, and then, step can be performed quickly Rapid 102, have using the efficiency for optimizing access network.
Alternatively, when mobile terminal re-rents IP address success, then the IP address term of validity of above-mentioned gateway can continue.Example Such as, the term of validity of current IP address there remains 10 minutes apart from the end time, if re-rent IP address success, IP address it is effective Phase is 1 hour, then can extend the effective storage life of the current IP address.
102nd, when the mobile terminal is re-rented IP address and failed, do not reported to the system of the mobile terminal and re-rent IP ground Location failed message, and Broadcast IP address obtains request.
Wherein, mobile terminal is when IP address failure is re-rented, it is generally the case that can be reported to the system of mobile terminal and re-rented IP address failed message (i.e. DHCP_FAILURE message), the DHCP_FAILURE message is received in the system of mobile terminal Afterwards, then current Wi-Fi network can be disconnected.And in the embodiment of the present invention, in mobile terminal when IP address failure is re-rented, then not The DHCP_FAILURE message can be reported (for example, in Android operation system, then not to mobile terminal to the system of mobile terminal System in system framework layer report DHCP_FAILURE message), in this way, the system of mobile terminal just will not be received DHCP_FAILURE message, and then, current Wi-Fi network just will not be disconnected, but outwards Broadcast IP address obtains request.
Alternatively, above-mentioned Broadcast IP address obtains request, can implement as follows:
The Wi-Fi lists scanned according to last time Wi-Fi in the preset range centered on the mobile terminal to broadcasting IP Address acquisition is asked.
Wherein, the Wi-Fi lists of last time Wi-Fi scannings are obtained apart from the recent Wi-Fi scannings of current time Wi-Fi lists, as shown in Figure 1a, it is the demonstration schematic diagram of Wi-Fi lists.Above-mentioned " last time " can be regarded as apart from current time Recent Wi-Fi scannings.Above-mentioned preset range can voluntarily be set or system default by user, it is generally the case that mobile The Wi-Fi chips of terminal have a hunting zone for maximum, i.e., beyond the router or heat of the maximum hunting zone Point is then searched for less than certainly, the maximum hunting zone is realized in the ideal case, under specific environment, if running into barrier Hinder thing (such as door, window, wall), be then unable to reach the maximum hunting zone.Under normal circumstances, router is apart from mobile terminal Distance it is more remote, the signal of the router that possible mobile terminal is detected is weaker, in this way, mobile terminal to search router can be reduced Hunting zone.The Wi-Fi lists scanned according to last time Wi-Fi in mobile terminal are to the default model centered on the mobile terminal When enclosing interior Broadcast IP address acquisition request, then signal intensity is may search for compared with strong or near with mobile terminal access point (each built-in Dynamic Host Configuration Protocol server of access point).The IP address is have received in any Dynamic Host Configuration Protocol server obtain request, An IP address is distributed to the mobile terminal, and the IP address is sent to the mobile terminal, certainly, the IP address can also have one The individual specific term of validity.
Alternatively, above-mentioned Broadcast IP address obtains request, can comprise the following steps:
21) multiple Dynamic Host Configuration Protocol server of LAN where the mobile terminal, are obtained;
22), obtained to the multiple Dynamic Host Configuration Protocol server Broadcast IP address and asked.
Wherein, mobile terminal is under Wi-Fi connection status, and in fact, the mobile terminal is also in a LAN, because This, the LAN where the mobile terminal can be got, certainly, the LAN (may have comprising more than one Dynamic Host Configuration Protocol server Several access points, it is possible to comprising several Dynamic Host Configuration Protocol server), in this way, mobile terminal can be to all Dynamic Host Configuration Protocol server broadcast IP Address acquisition is asked.For example, the LAN of mobile terminal includes N number of Dynamic Host Configuration Protocol server, wherein, the N is the integer more than 1, then N number of Dynamic Host Configuration Protocol server of LAN where mobile terminal can be obtained, and please to N number of Dynamic Host Configuration Protocol server Broadcast IP address acquisition Ask.
103rd, at least one IP address distributed by least one Dynamic Host Configuration Protocol server is received, and selects one of IP ground Location.
Wherein, mobile terminal can receive at least one IP address distributed by least one Dynamic Host Configuration Protocol server, and select it In an IP address, the IP address as mobile terminal IP address.Mobile terminal have the mobile terminal IP address it Afterwards, mobile terminal just can access Wi-Fi network, you can form the IP address of gateway and by between the IP address of the mobile terminal Routed path.
Alternatively, in above-mentioned steps 103, at least one IP address distributed by least one Dynamic Host Configuration Protocol server is received, and One of IP address is selected, can be comprised the following steps:
Receive the IP address distributed by first Dynamic Host Configuration Protocol server.
Specifically, even if after mobile terminal is re-rented unsuccessfully to the first Dynamic Host Configuration Protocol server, can be obtained with Broadcast IP address please Ask, receive the IP address of first Dynamic Host Configuration Protocol server distribution, the IP address and is accessed again as the new IP address of mobile terminal First Dynamic Host Configuration Protocol server, i.e., set up communication connection between first Dynamic Host Configuration Protocol server.The new IP address of mobile terminal and step The IP address of the mobile terminal in rapid 101 may be different, because Dynamic Host Configuration Protocol server is randomly assigned IP address, the IP of gateway A new routed path can be then formed between address and the new IP address of mobile terminal, in this way, being moved by the routed path Terminal can be communicatively coupled between the first Dynamic Host Configuration Protocol server, whole process, and mobile terminal will not disconnect current Wi-Fi nets Network.
Alternatively, above-mentioned at least one Dynamic Host Configuration Protocol server at least includes the first Dynamic Host Configuration Protocol server and the second Dynamic Host Configuration Protocol server, In above-mentioned steps 103, at least one IP address distributed by least one Dynamic Host Configuration Protocol server is received, and select one of IP ground Location, can comprise the following steps:
Receive the IP address distributed by second Dynamic Host Configuration Protocol server.
Alternatively, second Dynamic Host Configuration Protocol server can be the Dynamic Host Configuration Protocol server different from the first Dynamic Host Configuration Protocol server.So, even if After mobile terminal is re-rented unsuccessfully to the first Dynamic Host Configuration Protocol server, can be obtained with Broadcast IP address and asked, receive the second DHCP service The IP address of device distribution, the IP address and accesses second Dynamic Host Configuration Protocol server as the new IP address of mobile terminal, i.e., with this Communication connection is set up between two Dynamic Host Configuration Protocol server.I.e. after IP address is re-rented unsuccessfully, the second Dynamic Host Configuration Protocol server point can also be received The IP address matched somebody with somebody, so that, communication connection is set up between the second Dynamic Host Configuration Protocol server.In the IP address and step 101 of mobile terminal The IP address of mobile terminal may be the same because the process of different Dynamic Host Configuration Protocol server distribution IP address is random, by the A new routed path can be then formed between the IP address and the IP address of mobile terminal of the corresponding gateway of two Dynamic Host Configuration Protocol server, In this way, can be communicatively coupled between the second Dynamic Host Configuration Protocol server by the routed path mobile terminal, whole process, it is mobile whole End will not disconnect current Wi-Fi network.
Still optionally further, any Dynamic Host Configuration Protocol server can respond IP ground after IP address acquisition request is received Location obtains request, and distributes an IP address to the mobile terminal, and sends the IP address to mobile terminal.Assuming that having N number of Dynamic Host Configuration Protocol server, N is the integer more than or equal to 1, thus, mobile terminal may at most receive N number of IP address, certainly, often One IP address, one Dynamic Host Configuration Protocol server of correspondence, mobile terminal can not possibly access N number of Dynamic Host Configuration Protocol server, can only choose N number of IP ground An IP address in location, as long as in this way, have chosen an IP address, then can be sent to the corresponding Dynamic Host Configuration Protocol server of the IP address Confirmation message.Above-mentioned second Dynamic Host Configuration Protocol server can be the built-in DHCP of the router that mobile terminal was once connected, because The password of the built-in DHCP of the router for once connecting would generally be preserved in mobile terminal, then, as long as scanning is to the Two Dynamic Host Configuration Protocol server, then can automatically enter password, and access second Dynamic Host Configuration Protocol server.
As can be seen that by the embodiment of the present invention, being less than apart from the end time in the term of validity of the IP address of mobile terminal During predetermined threshold value, request is re-rented to the first Dynamic Host Configuration Protocol server transmission IP address in predetermined time period, re-rented in mobile terminal When IP address fails, do not reported to the system of mobile terminal and re-rent IP address failed message, and Broadcast IP address obtains request, connects At least one IP address distributed by least one Dynamic Host Configuration Protocol server is received, and selects one of IP address.In this way, in IP address When re-renting unsuccessfully, can not be reported to the system of mobile terminal and re-rent IP address failed message, mobile terminal just will not disconnect currently Wi-Fi network, and Broadcast IP address obtain request, so, it is convenient to receive by Dynamic Host Configuration Protocol server distribute IP address, from And, when IP address is re-rented unsuccessfully, it is also possible to keep Wi-Fi connection status.
Consistent with the abovely, Fig. 2 is referred to, is a kind of Wireless Fidelity Wi-Fi connection method provided in an embodiment of the present invention Second embodiment schematic flow sheet.Wireless Fidelity Wi-Fi connection method described in the present embodiment, comprises the following steps:
201st, mobile terminal IP address the term of validity apart from the end time be less than predetermined threshold value when, it is long in Preset Time Spend introversive first Dynamic Host Configuration Protocol server transmission IP address and re-rent request.
202nd, when the mobile terminal is re-rented IP address and failed, do not reported to the system of the mobile terminal and re-rent IP ground Location failed message, and Broadcast IP address obtains request.
203rd, at least one IP address distributed by least one Dynamic Host Configuration Protocol server is received, and selects one of IP ground Location.
Wherein, above-mentioned steps 201- steps 203 can refer to the correspondence of the Wireless Fidelity Wi-Fi connection method described by Fig. 1 Step.
204th, the IP address of gateway is obtained.
Wherein, mobile terminal can obtain the IP address of the mobile terminal.
Alternatively, when the second Dynamic Host Configuration Protocol server and the first Dynamic Host Configuration Protocol server are same server, it is also possible to obtain movement Terminal carries out the routed path before IP address is re-rented, IP address and mobile terminal comprising mobile terminal in the routed path The IP address of the gateway before IP address is re-rented is carried out, the IP address of gateway can be directly read from the routed path.
Alternatively, when the second Dynamic Host Configuration Protocol server and the first Dynamic Host Configuration Protocol server are not same server, the IP address of gateway It is mobile terminal when IP address is obtained to the second Dynamic Host Configuration Protocol server, the Offer messages or ACK messages replied by Dynamic Host Configuration Protocol server Middle carrying, it is only necessary to Offer messages or ACK messages are parsed, the IP address of gateway just can be obtained.
205th, the routed path set up between the IP address of the gateway and one of IP address.
Wherein, at least one IP address distributed by least one Dynamic Host Configuration Protocol server is received in mobile terminal, and is selected During one of IP address, the IP address as mobile terminal new IP address, the mobile terminal can be corresponding with the new IP address Dynamic Host Configuration Protocol server between establish communication connection, but, current route not yet updates, then, can set up gateway IP ground Routed path between location and above-mentioned new IP address, and can be shown on the display screen of mobile terminal.
As can be seen that by the embodiment of the present invention, being less than apart from the end time in the term of validity of the IP address of mobile terminal During predetermined threshold value, request is re-rented to the first Dynamic Host Configuration Protocol server transmission IP address in predetermined time period, re-rented in mobile terminal When IP address fails, do not reported to the system of mobile terminal and re-rent IP address failed message, and Broadcast IP address obtains request, connects At least one IP address distributed by least one Dynamic Host Configuration Protocol server is received, and selects one of IP address, also, net can be obtained The IP address of pass, the routed path set up between the IP address of gateway and above-mentioned one of IP address.Due in mobile terminal After re-renting IP address failure, do not reported to the system of mobile terminal and re-rent IP address failed message, so that, mobile terminal is still located In connection status, therefore, can carry out during IP address re-rents, keeping Wi-Fi network not turn off in mobile terminal, also, can After mobile terminal accesses Wi-Fi network, more new routing information.
Consistent with the abovely, it is below the device of the above-mentioned Wireless Fidelity Wi-Fi connection method of implementation, it is specific as follows:
Fig. 3 a are referred to, is a kind of first embodiment structural representation of mobile terminal provided in an embodiment of the present invention.This Mobile terminal described in embodiment, including:Transmitting element 301, radio unit 302 and receiving unit 303, it is specific as follows:
Transmitting element 301, for the IP address in mobile terminal the term of validity apart from the end time be less than predetermined threshold value when, IP address is sent to the first Dynamic Host Configuration Protocol server re-rent request in predetermined time period;
Radio unit 302, for when the mobile terminal is re-rented IP address and failed, not to the system of the mobile terminal Report and re-rent IP address failed message, and Broadcast IP address obtains request;
Receiving unit 303, for receiving at least one IP address distributed by least one Dynamic Host Configuration Protocol server, and selects it In an IP address.
Alternatively, the predetermined time period specifies time span less than by the system of the mobile terminal.
Alternatively, above-mentioned radio unit 302 specifically for:
The Wi-Fi lists scanned according to last time Wi-Fi in the preset range centered on the mobile terminal to broadcasting IP Address acquisition is asked.
Alternatively, the receiving unit 303 specifically for:
Receive the IP address distributed by first Dynamic Host Configuration Protocol server.
Alternatively, at least one Dynamic Host Configuration Protocol server at least includes the first Dynamic Host Configuration Protocol server and the second Dynamic Host Configuration Protocol server, The receiving unit 303 specifically for:
Receive the IP address distributed by second Dynamic Host Configuration Protocol server.
Alternatively, a kind of modification structures of the mobile terminal as described by Fig. 3 b, Fig. 3 b are Fig. 3 a, it also includes:Obtain Unit 304 and unit 305 is set up, it is specific as follows:
Acquiring unit 304, at least one IP distributed by least one Dynamic Host Configuration Protocol server is received in the receiving unit 303 Address, and after selecting one of IP address, obtain the IP address of the gateway;
Unit 305 is set up, for setting up the route road between the IP address of the gateway and one of IP address Footpath.
As can be seen that by the mobile terminal described by the embodiment of the present invention, in the term of validity of the IP address of mobile terminal When being less than predetermined threshold value apart from the end time, being re-rented to the first Dynamic Host Configuration Protocol server transmission IP address in predetermined time period please Ask, when mobile terminal is re-rented IP address and failed, do not reported to the system of mobile terminal and re-rent IP address failed message, and broadcast IP address obtains request, receives at least one IP address distributed by least one Dynamic Host Configuration Protocol server, and select one of IP Address.In this way, when IP address is re-rented unsuccessfully, can not be reported to the system of mobile terminal and re-rent IP address failed message, it is mobile Terminal just will not disconnect current Wi-Fi network, and Broadcast IP address obtains request, so, it is convenient to receive and taken by DHCP The IP address of business device distribution, so that, when IP address is re-rented unsuccessfully, it is also possible to keep Wi-Fi connection status.
Consistent with the abovely, Fig. 4 is referred to, is a kind of second embodiment knot of mobile terminal provided in an embodiment of the present invention Structure schematic diagram.Mobile terminal described in the present embodiment, including:At least one input equipment 1000;At least one output sets Standby 2000;At least one processor 3000, such as CPU;With memory 4000, above-mentioned input equipment 1000, output equipment 2000, Processor 3000 and memory 4000 are connected by bus 5000.
Wherein, above-mentioned input equipment 1000 concretely contact panel, physical button or mouse.
The concretely display screen of above-mentioned output equipment 2000.
Above-mentioned memory 4000 can be high-speed RAM memory, or nonvolatile storage (non-volatile Memory), such as magnetic disk storage.Above-mentioned memory 4000 is used to store batch processing code, above-mentioned input equipment 1000, defeated Going out equipment 2000 and processor 3000 is used to call the program code stored in memory 4000, performs following operation:
Above-mentioned processor 3000, is used for:
Mobile terminal IP address the term of validity apart from the end time be less than predetermined threshold value when, in predetermined time period IP address is sent to the first Dynamic Host Configuration Protocol server re-rent request;
When the mobile terminal is re-rented IP address and failed, do not reported to the system of the mobile terminal and re-rent IP address mistake Message is lost, and Broadcast IP address obtains request;
At least one IP address distributed by least one Dynamic Host Configuration Protocol server is received, and selects one of IP address.
Alternatively, the predetermined time period specifies time span less than by the system of the mobile terminal.
Alternatively, the Broadcast IP address of above-mentioned processor 3000 obtains request, including:
The Wi-Fi lists scanned according to last time Wi-Fi in the preset range centered on the mobile terminal to broadcasting IP Address acquisition is asked.
Alternatively, above-mentioned processor 3000 receives at least one IP address distributed by least one Dynamic Host Configuration Protocol server, and One of IP address is selected, including:
Alternatively, above-mentioned processor 3000 receives at least one IP address distributed by least one Dynamic Host Configuration Protocol server, and One of IP address is selected, including:
Receive the IP address distributed by first Dynamic Host Configuration Protocol server.
Alternatively, at least one Dynamic Host Configuration Protocol server at least includes the first Dynamic Host Configuration Protocol server and the second Dynamic Host Configuration Protocol server, Above-mentioned processor 3000 receives at least one IP address distributed by least one Dynamic Host Configuration Protocol server, and selects one of IP ground Location, including:
Receive the IP address distributed by second Dynamic Host Configuration Protocol server.
Alternatively, above-mentioned processor 3000 receives at least one IP address distributed by least one Dynamic Host Configuration Protocol server, and After selecting one of IP address, also particularly useful for:
Obtain the IP address of gateway;
The routed path set up between the IP address of the gateway and one of IP address.
The embodiment of the present invention also provides a kind of computer-readable storage medium, wherein, the computer-readable storage medium can be stored with journey Sequence, the part including any Wireless Fidelity Wi-Fi connection method described in the above method embodiment when program is performed Or Overall Steps.
Although invention has been described to combine each embodiment herein, however, implementing the present invention for required protection During, those skilled in the art are by checking the accompanying drawing, disclosure and appended claims, it will be appreciated that and it is real Other changes of the existing open embodiment.In the claims, " including " (comprising) one word be not excluded for other composition Part or step, "a" or "an" are not excluded for the situation of multiple.Single processor or other units can realize claim In some functions enumerating.Mutually different has been recited in mutually different dependent some measures, it is not intended that these are arranged Apply to combine and produce good effect.
It will be understood by those skilled in the art that embodiments of the invention can be provided as method, device (equipment) or computer journey Sequence product.Therefore, in terms of the present invention can be using complete hardware embodiment, complete software embodiment or combination software and hardware The form of embodiment.And, the present invention can be used and wherein include the calculating of computer usable program code at one or more The computer program implemented in machine usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) The form of product.Computer program is stored/distributed in suitable medium, is provided together with other hardware or as the one of hardware Part, it would however also be possible to employ other distribution forms, such as passes through Internet or other wired or wireless telecommunication systems.
The present invention be with reference to the embodiment of the present invention method, device (equipment) and computer program product flow chart with/ Or block diagram is described.It should be understood that each flow during flow chart and/or block diagram can be realized by computer program instructions and/ Or the combination of the flow and/or square frame in square frame and flow chart and/or block diagram.These computer program instructions can be provided To the processor of all-purpose computer, special-purpose computer, Embedded Processor or other programmable data processing devices producing one Individual machine so that produced for realizing by the instruction of computer or the computing device of other programmable data processing devices The device of the function of being specified in one flow of flow chart or multiple one square frame of flow and/or block diagram or multiple square frames.
These computer program instructions may be alternatively stored in can guide computer or other programmable data processing devices with spy In determining the computer-readable memory that mode works so that instruction of the storage in the computer-readable memory is produced and include finger Make the manufacture of device, the command device realize in one flow of flow chart or multiple one square frame of flow and/or block diagram or The function of being specified in multiple square frames.
These computer program instructions can be also loaded into computer or other programmable data processing devices so that in meter Series of operation steps is performed on calculation machine or other programmable devices to produce computer implemented treatment, so as in computer or The instruction performed on other programmable devices is provided for realizing in one flow of flow chart or multiple flows and/or block diagram one The step of function of being specified in individual square frame or multiple square frames.
Although with reference to specific features and embodiment, invention has been described, it is clear that, do not departing from this hair In the case of bright spirit and scope, various modifications and combinations can be carried out to it.Correspondingly, the specification and drawings are only institute The exemplary illustration of the invention that attached claim is defined, and be considered as covered in the scope of the invention any and all and repair Change, change, combining or equivalent.Obviously, those skilled in the art the present invention can be carried out it is various change and modification without Depart from the spirit and scope of the present invention.So, if it is of the invention these modification and modification belong to the claims in the present invention and its Within the scope of equivalent technologies, then the present invention is also intended to comprising these changes and modification.

Claims (13)

1. a kind of Wireless Fidelity Wi-Fi connection method, it is characterised in that including:
Mobile terminal IP address the term of validity apart from the end time be less than predetermined threshold value when, to the in predetermined time period One Dynamic Host Configuration Protocol server sends IP address and re-rents request;
When the mobile terminal is re-rented IP address and failed, do not reported to the system of the mobile terminal and re-rent IP address and unsuccessfully disappear Breath, and Broadcast IP address obtains request;
At least one IP address distributed by least one Dynamic Host Configuration Protocol server is received, and selects one of IP address.
2. method according to claim 1, it is characterised in that the predetermined time period is less than by the mobile terminal System specifies time span.
3. method according to claim 1, it is characterised in that the Broadcast IP address obtains request, including:
According to the Wi-Fi lists of last time Wi-Fi scannings to Broadcast IP address in the preset range centered on the mobile terminal Obtain request.
4. the method according to any one of claims 1 to 3, it is characterised in that the reception is by least one DHCP service At least one IP address of device distribution, and one of IP address is selected, including:
Receive the IP address distributed by first Dynamic Host Configuration Protocol server.
5. the method according to any one of claims 1 to 3, it is characterised in that at least one Dynamic Host Configuration Protocol server is at least Including the first Dynamic Host Configuration Protocol server and the second Dynamic Host Configuration Protocol server, the reception distributed by least one Dynamic Host Configuration Protocol server at least one IP address, and one of IP address is selected, including:
Receive the IP address distributed by second Dynamic Host Configuration Protocol server.
6. the method according to any one of claims 1 to 3, it is characterised in that the reception is by least one DHCP service At least one IP address of device distribution, and after selecting one of IP address, methods described also includes:
Obtain the IP address of gateway;
The routed path set up between the IP address of the gateway and one of IP address.
7. a kind of mobile terminal, it is characterised in that including:
Transmitting element, for the IP address in mobile terminal the term of validity apart from the end time be less than predetermined threshold value when, default IP address is sent to the first Dynamic Host Configuration Protocol server re-rent request in time span;
Radio unit, for when the mobile terminal is re-rented IP address and failed, not reported to the system of the mobile terminal continuous IP address failed message is rented, and Broadcast IP address obtains request;
Receiving unit, for receiving at least one IP address distributed by least one Dynamic Host Configuration Protocol server, and selects one of them IP address.
8. mobile terminal according to claim 7, it is characterised in that the predetermined time period be less than by it is described it is mobile eventually The system at end specifies time span.
9. mobile terminal according to claim 7, it is characterised in that the radio unit specifically for:
According to the Wi-Fi lists of last time Wi-Fi scannings to Broadcast IP address in the preset range centered on the mobile terminal Obtain request.
10. the mobile terminal according to any one of claim 7 to 9, it is characterised in that the receiving unit specifically for:
Receive the IP address distributed by first Dynamic Host Configuration Protocol server.
11. mobile terminal according to any one of claim 7 to 9, it is characterised in that at least one Dynamic Host Configuration Protocol server At least include the first Dynamic Host Configuration Protocol server and the second Dynamic Host Configuration Protocol server, the receiving unit specifically for:
Receive the IP address distributed by second Dynamic Host Configuration Protocol server.
12. mobile terminal according to any one of claim 7 to 9, it is characterised in that the mobile terminal also includes:
Acquiring unit, at least one IP address distributed by least one Dynamic Host Configuration Protocol server is received in the receiving unit, and select Select after one of IP address, obtain the IP address of the gateway;
Unit is set up, for setting up the routed path between the IP address of the gateway and one of IP address.
A kind of 13. mobile terminals, it is characterised in that including:
Processor and memory;Wherein, the processor is by calling code in the memory or instruction to perform such as power Profit requires the method described in 1 to 6 any one.
CN201611117289.0A 2016-12-07 2016-12-07 Wireless fidelity Wi-Fi connection method and mobile terminal Active CN106713522B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201611117289.0A CN106713522B (en) 2016-12-07 2016-12-07 Wireless fidelity Wi-Fi connection method and mobile terminal
PCT/CN2017/101462 WO2018103400A1 (en) 2016-12-07 2017-09-12 Wireless fidelity wifi connection method and related product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611117289.0A CN106713522B (en) 2016-12-07 2016-12-07 Wireless fidelity Wi-Fi connection method and mobile terminal

Publications (2)

Publication Number Publication Date
CN106713522A true CN106713522A (en) 2017-05-24
CN106713522B CN106713522B (en) 2020-01-14

Family

ID=58936234

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611117289.0A Active CN106713522B (en) 2016-12-07 2016-12-07 Wireless fidelity Wi-Fi connection method and mobile terminal

Country Status (2)

Country Link
CN (1) CN106713522B (en)
WO (1) WO2018103400A1 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108063840A (en) * 2018-01-23 2018-05-22 广东欧珀移动通信有限公司 Access the method and Related product of network
CN108064071A (en) * 2018-02-13 2018-05-22 广东欧珀移动通信有限公司 Method for connecting network, device, storage medium and electronic equipment
WO2018103400A1 (en) * 2016-12-07 2018-06-14 广东欧珀移动通信有限公司 Wireless fidelity wifi connection method and related product
WO2019006761A1 (en) * 2017-07-07 2019-01-10 华为技术有限公司 Method and apparatus for local area network device to restore internet access
WO2019110005A1 (en) * 2017-12-07 2019-06-13 捷开通讯(深圳)有限公司 Smart power saving method for terminal, terminal, and device having memory function

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109660411B (en) * 2019-02-25 2022-03-01 北京云中融信网络科技有限公司 Method and device for optimizing link connection of instant messaging network

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101202767A (en) * 2006-12-29 2008-06-18 深圳市同洲电子股份有限公司 Method and device for hiring IP address
CN101227356A (en) * 2007-12-12 2008-07-23 深圳市同洲电子股份有限公司 Equipment, system and method for network access based on dynamic state host computer collocation protocol
KR20110070444A (en) * 2009-12-18 2011-06-24 주식회사 케이티 A triple dhcp system and dhcp message processing method
CN103312708A (en) * 2013-06-07 2013-09-18 福建联迪商用设备有限公司 Lease file based IP (internet protocol) setting method and system
CN105813056A (en) * 2016-05-06 2016-07-27 广东欧珀移动通信有限公司 Network access method and terminal

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101098346B (en) * 2006-06-28 2010-10-27 华为技术有限公司 Method for initiating lease period renewal process of protocol address network
CN101729610A (en) * 2009-12-15 2010-06-09 中兴通讯股份有限公司 Method and system for backing up DHCP SERVER
CN102685265A (en) * 2012-05-14 2012-09-19 中国科学院计算机网络信息中心 IP (Internet Protocol) address managing method, equipment and system
CN105812505A (en) * 2016-05-06 2016-07-27 上海斐讯数据通信技术有限公司 Method and device for renewing lease of IP address of terminal equipment
CN106713522B (en) * 2016-12-07 2020-01-14 Oppo广东移动通信有限公司 Wireless fidelity Wi-Fi connection method and mobile terminal

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101202767A (en) * 2006-12-29 2008-06-18 深圳市同洲电子股份有限公司 Method and device for hiring IP address
CN101227356A (en) * 2007-12-12 2008-07-23 深圳市同洲电子股份有限公司 Equipment, system and method for network access based on dynamic state host computer collocation protocol
KR20110070444A (en) * 2009-12-18 2011-06-24 주식회사 케이티 A triple dhcp system and dhcp message processing method
CN103312708A (en) * 2013-06-07 2013-09-18 福建联迪商用设备有限公司 Lease file based IP (internet protocol) setting method and system
CN105813056A (en) * 2016-05-06 2016-07-27 广东欧珀移动通信有限公司 Network access method and terminal

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018103400A1 (en) * 2016-12-07 2018-06-14 广东欧珀移动通信有限公司 Wireless fidelity wifi connection method and related product
WO2019006761A1 (en) * 2017-07-07 2019-01-10 华为技术有限公司 Method and apparatus for local area network device to restore internet access
CN110870289A (en) * 2017-07-07 2020-03-06 华为技术有限公司 Method and device for restoring surfing Internet of local area network equipment
WO2019110005A1 (en) * 2017-12-07 2019-06-13 捷开通讯(深圳)有限公司 Smart power saving method for terminal, terminal, and device having memory function
CN108063840A (en) * 2018-01-23 2018-05-22 广东欧珀移动通信有限公司 Access the method and Related product of network
CN108064071A (en) * 2018-02-13 2018-05-22 广东欧珀移动通信有限公司 Method for connecting network, device, storage medium and electronic equipment
CN108064071B (en) * 2018-02-13 2020-06-16 Oppo广东移动通信有限公司 Network connection method, device, storage medium and electronic equipment

Also Published As

Publication number Publication date
WO2018103400A1 (en) 2018-06-14
CN106713522B (en) 2020-01-14

Similar Documents

Publication Publication Date Title
CN106713522A (en) Wireless fidelity (Wi-Fi) connection method and mobile terminal
CN104142862B (en) The overload protection method of server and device
CN105357740A (en) Wireless network access method and wireless access node
CN106851632A (en) A kind of smart machine accesses the method and device of WLAN
CN107360184B (en) Terminal equipment authentication method and device
US20180048633A1 (en) Perception-free authentication method and system, and control method and system based on the same
CN106921963A (en) A kind of smart machine accesses the method and device of WLAN
CN104144420A (en) Wireless access method and related equipment and system
CN106856609A (en) A kind of network collocating method and device
CN104168625A (en) Intelligent device, method for connecting intelligent device to wireless routing device, and wireless routing device
CN103297468A (en) Operation method for group resources and group server
CN104348686A (en) Method and device for interconnecting terminal equipment and gateway equipment
CN105991600A (en) Identity authentication and apparatus, server and terminal
CN102739684A (en) Portal authentication method based on virtual IP address, and server thereof
CN111263338A (en) Network distribution method of Bluetooth Mesh network and related network distribution equipment and system
CN105306320A (en) Method and device for binding clients to intelligent device
CN103581351A (en) Method and device for having access to network
CN107370685A (en) A kind of internet-of-things terminal cut-in method and device
EP2672758A1 (en) Methods and apparatuses for easing Internet access by mobile stations associated with a mobile access point
CN105557045A (en) Access network node, core network node and paging method
CN106230788A (en) The reorientation method of a kind of portal certification, radio reception device, portal server
CN107659999A (en) WIFI connection methods and equipment
CN102752752B (en) base station maintenance method and apparatus
CN104702678A (en) Document transmission method and device
CN107483084B (en) Broadband carrier networking method, site and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant after: OPPO Guangdong Mobile Communications Co., Ltd.

Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant before: Guangdong Opel Mobile Communications Co., Ltd.

GR01 Patent grant
GR01 Patent grant