WO2018103400A1 - 无线保真Wi-Fi连接方法及相关产品 - Google Patents

无线保真Wi-Fi连接方法及相关产品 Download PDF

Info

Publication number
WO2018103400A1
WO2018103400A1 PCT/CN2017/101462 CN2017101462W WO2018103400A1 WO 2018103400 A1 WO2018103400 A1 WO 2018103400A1 CN 2017101462 W CN2017101462 W CN 2017101462W WO 2018103400 A1 WO2018103400 A1 WO 2018103400A1
Authority
WO
WIPO (PCT)
Prior art keywords
address
dhcp server
mobile terminal
gateway
dhcp
Prior art date
Application number
PCT/CN2017/101462
Other languages
English (en)
French (fr)
Inventor
黄园
Original Assignee
广东欧珀移动通信有限公司
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 广东欧珀移动通信有限公司 filed Critical 广东欧珀移动通信有限公司
Publication of WO2018103400A1 publication Critical patent/WO2018103400A1/zh

Links

Images

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]

Definitions

  • the present invention relates to the field of Internet technologies, and in particular, to a wireless fidelity Wi-Fi connection method and related products.
  • Wi-Fi Wireless Fidelity
  • DHCP Dynamic Host Configuration Protocol
  • IP Internet Protocol Address
  • the embodiment of the invention provides a wireless fidelity Wi-Fi connection method and related products, so as to keep the Wi-Fi network not disconnected during the IP address renewal process of the mobile terminal.
  • a first aspect of the embodiments of the present invention provides a wireless fidelity Wi-Fi connection method, including:
  • the IP address renewal request is sent to the first DHCP server within a preset time length
  • the system does not report the renewal of the IP address failure message to the system of the mobile terminal, but broadcasts the IP address acquisition request;
  • a second aspect of the embodiments of the present invention provides a wireless fidelity Wi-Fi connection apparatus, including:
  • a sending unit configured to send an IP address renewal request to the first DHCP server within a preset time length when the validity period end time of the IP address of the mobile terminal is less than a preset threshold
  • a broadcast unit configured to not report a failure to renew an IP address to the system of the mobile terminal when the mobile terminal fails to renew the IP address, and broadcast a request for obtaining an IP address
  • a receiving unit configured to receive at least one IP address allocated by the at least one DHCP server, and select one of the IP addresses.
  • an embodiment of the present invention provides a mobile terminal, including: a processor and a memory; and one or more programs, where the one or more programs are stored in the memory, and configured to be The processor executes, the program including instructions for some or all of the steps as described in the first aspect.
  • an embodiment of the present invention provides a computer readable storage medium, wherein the computer readable storage medium is configured to store a computer program, wherein the computer program causes a computer to perform the first aspect of the embodiment of the present invention. Instructions for some or all of the steps described in the section.
  • an embodiment of the present invention provides a computer program product, wherein the computer program product comprises a non-transitory computer readable storage medium storing a computer program, the computer program being operative to cause a computer to execute Some or all of the steps described in the first aspect of the invention.
  • the computer program product can be a software installation package.
  • FIG. 1 is a schematic flowchart of a first embodiment of a method for connecting a wireless fidelity Wi-Fi according to an embodiment of the present invention
  • 1a is a schematic diagram of a Wi-Fi list presentation according to an embodiment of the present invention.
  • FIG. 2 is a schematic flowchart of a second embodiment of a method for connecting a wireless fidelity Wi-Fi according to an embodiment of the present invention
  • FIG. 3a is a schematic structural diagram of an embodiment of a wireless fidelity Wi-Fi connection apparatus according to an embodiment of the present invention. schematic diagram;
  • FIG. 3b is another schematic structural diagram of the wireless fidelity Wi-Fi connection apparatus described in FIG. 3a according to an embodiment of the present invention
  • FIG. 4 is a schematic structural diagram of an embodiment of a mobile terminal according to an embodiment of the present invention.
  • DHCP Request IP address renewal requests
  • mobile terminals may renew the IP address, resulting in the current Wi- connection.
  • the Fi network connection is lost or you cannot continue to access the Wi-Fi network.
  • the embodiment of the invention provides a wireless fidelity Wi-Fi connection method and related products, which can keep the Wi-Fi network disconnected during the IP address renewal process of the mobile terminal.
  • references to "an embodiment” herein mean that a particular feature, structure, or characteristic described in connection with the embodiments can be included in at least one embodiment of the invention.
  • the appearances of the phrases in various places in the specification are not necessarily referring to the same embodiments, and are not exclusive or alternative embodiments that are mutually exclusive. Those skilled in the art will understand and implicitly understand that the embodiments described herein can be combined with other embodiments.
  • the mobile terminal described in the embodiments of the present invention may include a smart phone (such as an Android mobile phone, an iOS mobile phone, a Windows Phone mobile phone, etc.), a tablet computer, an in-vehicle device, a palmtop computer, a notebook computer, a mobile Internet device (MID, Mobile Internet Devices), or wearable. Equipment, etc., above It is by way of example and not limitation, and is not limited to the above-described mobile terminal.
  • the router is provided with a DHCP server, and the DHCP server is configured to allocate an IP address to the mobile terminal.
  • the IP address has an expiration date, and the mobile terminal can maintain a Wi-Fi connection state with the router during the validity period. At the end of the validity period, the mobile terminal will disconnect the Wi-Fi connection with the router.
  • an IP address renewal request may be sent to the DHCP server, and the DHCP server may allocate an IP address to the mobile terminal in response to the IP address renewal request.
  • interaction process between the foregoing mobile terminal and the DHCP server may include the following four steps:
  • the mobile terminal broadcasts an IP address acquisition request to the outside;
  • At least one DHCP server provides an IP address in response to the IP address acquisition request
  • the mobile terminal selects an IP address and sends an acknowledgement message to the target DHCP server corresponding to the IP address.
  • the target DHCP server sends an ACK message to the mobile terminal.
  • the main process is to perform the steps 3 to 4 in the process of renewing the lease.
  • the process can last for a specified length of time (the system specifies the length of time by the mobile terminal's system default, which is a fixed value).
  • the mobile terminal continues to perform the above steps 3 to 4.
  • the mobile terminal reports the DHCP_FAILURE message to the mobile terminal system.
  • the current network connection is usually broken, and then the connection is re-established and the DHCP server is reselected (perform steps 1 to 4 above). If the user perceives that the network is disconnected during the IP address renewal process, the network will not be available for a while, and the user may feel that the experience is poor.
  • the embodiment of the present invention provides a wireless fidelity Wi-Fi connection method, including the following steps:
  • the IP address renewal request is sent to the first DHCP server within a preset time length
  • the system does not report the renewal of the IP address failure message to the system of the mobile terminal, but broadcasts the IP address acquisition request;
  • the mobile terminal cannot report the failure to renew the IP address failure message, and the mobile terminal does not disconnect the current Wi-Fi network and broadcasts the IP address acquisition request.
  • the IP address assigned by the DHCP server is received, so that the Wi-Fi connection state can also be maintained when the IP address renewal fails.
  • FIG. 1 is a schematic flowchart diagram of a first embodiment of a method for connecting a wireless fidelity Wi-Fi according to an embodiment of the present invention.
  • the wireless fidelity Wi-Fi connection method described in this embodiment includes the following steps:
  • the mobile terminal is in a Wi-Fi connection state.
  • the above preset threshold can be set by the user or the system defaults.
  • the preset length of time is set by the user.
  • the first DHCP server may be a DHCP server built in a router currently connected to the mobile terminal.
  • a route is formed between the IP address of the gateway and the IP address assigned by the DHCP server (that is, the IP address of the mobile terminal), and the mobile terminal establishes a route with the router according to the route. Communication connection.
  • the mobile terminal needs to renew the IP address to the DHCP server before the validity period of the IP address assigned by the DHCP server has not ended.
  • the mobile terminal may send an IP address renewal request to the first DHCP server within a preset time length when the end time of the validity period of the IP address of the mobile terminal is less than a preset threshold.
  • the IP address (ie, the IP address of the mobile terminal) of the mobile terminal can be assigned by the DHCP server built in the router.
  • a route may be formed between the IP address of the gateway and the mobile terminal establishes a communication connection with the router according to the route.
  • the mobile terminal's IP address validity period end time is less than a preset threshold, the mobile terminal may Send an IP address renewal request to the first DHCP server within a preset length of time.
  • the preset time length is less than a length of time specified by a system of the mobile terminal.
  • the system specified time length of the mobile terminal may be a fixed value, for example, 30 s.
  • the preset time length may be a fixed value or a range value, for example, 15s, that is, the mobile terminal may send an IP address acquisition request to the first DHCP server within 15s.
  • the IP address renewal may fail in a short time. Normally, when the IP address cannot be renewed once, the probability of re-enrolling the IP address is not high. Therefore, the specified time for renewing the IP address (that is, the specified length of time) can be shortened. Quickly, step 102 is performed to optimize the efficiency of accessing the network.
  • the IP address validity period of the gateway may be continued.
  • the current IP address has a validity period of 10 minutes remaining. If the IP address is successfully renewed and the IP address is valid for 1 hour, the effective use time of the current IP address can be extended.
  • the system does not report the renewal of the IP address failure message to the system of the mobile terminal, but broadcasts the IP address acquisition request.
  • the mobile terminal When the mobile terminal fails to renew the IP address, the mobile terminal usually reports the renewal of the IP address failure message (ie, the DHCP_FAILURE message) to the system of the mobile terminal, and after the mobile terminal's system receives the DHCP_FAILURE message, it will be disconnected. Open your current Wi-Fi network.
  • the DHCP_FAILURE message when the mobile terminal fails to renew the IP address, the DHCP_FAILURE message is not reported to the system of the mobile terminal (for example, in the Android operating system, the system framework in the system not to the mobile terminal)
  • the layer reports the DHCP_FAILURE message. In this way, the system of the mobile terminal does not receive the DHCP_FAILURE message, and instead, the current Wi-Fi network is not disconnected, but the IP address acquisition request is broadcasted.
  • the foregoing broadcast IP address obtaining request may be implemented as follows:
  • a broadcast IP address acquisition request is made within a preset range centered on the mobile terminal.
  • the Wi-Fi list of the last Wi-Fi scan is a Wi-Fi list obtained by a Wi-Fi scan closest to the current time, as shown in FIG. 1a, which is a schematic diagram of a Wi-Fi list.
  • the above "last time” can be understood as a Wi-Fi scan that is closest to the current time.
  • the above preset range can be self-user Line setting or system default.
  • the Wi-Fi chip of the mobile terminal has a maximum search range, that is, a router or hotspot that exceeds the maximum search range cannot be searched. Of course, the maximum search range is Under ideal circumstances, in the specific environment, if obstacles (such as doors, windows, walls, etc.) are encountered, the maximum search range cannot be reached.
  • the mobile terminal broadcasts an IP address acquisition request within a preset range centered on the mobile terminal according to the Wi-Fi list of the last Wi-Fi scan, the mobile terminal may search for a signal strength or a proximity to the mobile terminal.
  • Incoming point a DHCP server is built into each access point.
  • any DHCP server receives the IP address acquisition request, it may assign an IP address to the mobile terminal and send the IP address to the mobile terminal.
  • the IP address may also have a specific validity period.
  • the foregoing broadcast IP address obtaining request may include the following steps:
  • the mobile terminal is in a Wi-Fi connection state.
  • the mobile terminal is also in a local area network. Therefore, the local area network where the mobile terminal is located may be obtained.
  • the local area network may include more than one DHCP server (there are several connections). In the point of entry, it is possible to include several DHCP servers.
  • the mobile terminal can broadcast an IP address acquisition request to all the DHCP servers.
  • the local area network of the mobile terminal includes N DHCP servers, where the N is an integer greater than 1, the N DHCP servers of the local area network where the mobile terminal is located can be obtained, and an IP address acquisition request is broadcast to the N DHCP servers.
  • the mobile terminal can receive at least one IP address assigned by at least one DHCP server and select one of the IP addresses, and the IP address is used as the IP address of the mobile terminal. After the mobile terminal has the IP address of the mobile terminal, the mobile terminal can access the Wi-Fi network to form a routing path between the IP address of the gateway and the IP address of the mobile terminal.
  • receiving at least one IP address allocated by the at least one DHCP server, and selecting one of the IP addresses may include the following steps:
  • the IP address acquisition request may be broadcasted, and the IP address assigned by the first DHCP server is received, and the IP address is used as the new IP address of the mobile terminal, and is accessed again.
  • the first DHCP server establishes a communication connection with the first DHCP server.
  • the new IP address of the mobile terminal may be different from the IP address of the mobile terminal in step 101. Because the DHCP server randomly assigns an IP address, a new route may be formed between the IP address of the gateway and the new IP address of the mobile terminal. The path is such that the mobile terminal can communicate with the first DHCP server through the routing path, and the mobile terminal does not disconnect the current Wi-Fi network.
  • the at least one DHCP server includes at least a first DHCP server and a second DHCP server.
  • receiving at least one IP address assigned by the at least one DHCP server, and selecting one of the IP addresses may include the following steps. :
  • the second DHCP server may be a different DHCP server than the first DHCP server. Then, even if the mobile terminal fails to renew the lease to the first DHCP server, the IP address acquisition request may be broadcasted, and the IP address assigned by the second DHCP server is received, the IP address is used as the new IP address of the mobile terminal, and the second IP address is accessed.
  • the DHCP server establishes a communication connection with the second DHCP server. That is, after the IP address renewal fails, the IP address assigned by the second DHCP server may also be received, thereby establishing a communication connection with the second DHCP server.
  • the IP address of the mobile terminal may be the same as the IP address of the mobile terminal in step 101, because the process of assigning an IP address by a different DHCP server is random, and the IP address of the gateway corresponding to the second DHCP server and the IP address of the mobile terminal are In the meantime, a new routing path can be formed, so that the mobile terminal can communicate with the second DHCP server through the routing path, and the mobile terminal does not disconnect the current Wi-Fi network.
  • any DHCP server may respond to the IP address obtaining request, and allocate an IP address to the mobile terminal, and send the IP address to the mobile terminal.
  • N is an integer greater than or equal to 1. Therefore, the mobile terminal may receive at most N IP addresses.
  • each IP address corresponds to one DHCP server, and the mobile terminal cannot access N DHCP servers. , can only select the N IP addresses An IP address, so that if an IP address is selected, an acknowledgment message can be sent to the DHCP server corresponding to the IP address.
  • the second DHCP server may be a built-in DHCP server of a router to which the mobile terminal has been connected, because the password of the built-in DHCP server of the router that has been connected is usually saved in the mobile terminal, so that only the second DHCP server is scanned. The password is automatically entered and accessed to the second DHCP server.
  • the IP address renewal request is sent to the first DHCP server within the preset time length, and the IP address is renewed in the mobile terminal.
  • the mobile terminal does not report the renewal of the IP address failure message, but the broadcast IP address acquisition request receives at least one IP address assigned by at least one DHCP server, and selects one of the IP addresses.
  • the mobile terminal cannot report the failure to renew the IP address failure message, and the mobile terminal does not disconnect the current Wi-Fi network and broadcasts the IP address acquisition request.
  • the IP address assigned by the DHCP server is received, so that the Wi-Fi connection state can also be maintained when the IP address renewal fails.
  • FIG. 2 it is a schematic flowchart of a second embodiment of a wireless fidelity Wi-Fi connection method according to an embodiment of the present invention.
  • the wireless fidelity Wi-Fi connection method described in this embodiment includes the following steps:
  • the system does not report the renewal of the IP address failure message to the system of the mobile terminal, but broadcasts the IP address acquisition request.
  • the above steps 201-203 may refer to the corresponding steps of the wireless fidelity Wi-Fi connection method described in FIG.
  • the mobile terminal can obtain the IP address of the mobile terminal.
  • obtaining an IP address of the gateway may be implemented as follows:
  • the second DHCP server and the first DHCP server are the same server, obtain And obtaining, by the mobile terminal, a routing path before the IP address is renewed, and acquiring an IP address of the gateway according to the routing path.
  • the routing path before the mobile terminal renews the IP address may be obtained, where the routing path includes the IP address of the mobile terminal and the mobile terminal renews the IP address.
  • obtaining an IP address of the gateway may be implemented as follows:
  • the IP address of the gateway is carried in the Offer message or the ACK message replied by the DHCP server when the mobile terminal obtains the IP address from the second DHCP server. You only need to parse the Offer message or the ACK message to get the IP address of the gateway.
  • the mobile terminal when the mobile terminal receives at least one IP address assigned by at least one DHCP server and selects one of the IP addresses, the IP address is used as a new IP address of the mobile terminal, and the mobile terminal can be DHCP corresponding to the new IP address.
  • a communication connection is established between the servers, but the current route has not been updated, so a routing path between the IP address of the gateway and the new IP address can be established and displayed on the display screen of the mobile terminal.
  • the IP address renewal request is sent to the first DHCP server within the preset time length, and the IP address is renewed in the mobile terminal.
  • the mobile terminal does not report the renewal of the IP address failure message, but the broadcast IP address acquisition request receives at least one IP address assigned by at least one DHCP server, selects one of the IP addresses, and obtains the gateway.
  • the IP address the routing path between the IP address of the gateway and one of the above IP addresses. Therefore, after the mobile terminal fails to renew the IP address, the mobile terminal does not report the failure to renew the IP address to the mobile terminal, and thus the mobile terminal is still in the connected state. Therefore, the mobile terminal can maintain the IP address renewal process.
  • the Wi-Fi network is not disconnected, and the route can be updated after the mobile terminal accesses the Wi-Fi network. information.
  • FIG. 3 is a schematic structural diagram of an embodiment of a wireless fidelity Wi-Fi connection apparatus according to an embodiment of the present invention.
  • the wireless fidelity Wi-Fi connection device described in this embodiment includes: a sending unit 301, a broadcasting unit 302, and a receiving unit 303, as follows:
  • the sending unit 301 is configured to send an IP address renewal request to the first DHCP server within a preset time length when the validity period end time of the IP address of the mobile terminal is less than a preset threshold;
  • the broadcasting unit 302 is configured to: when the mobile terminal fails to renew the IP address, fail to report the renewal of the IP address failure message to the system of the mobile terminal, and broadcast the IP address acquisition request;
  • the receiving unit 303 is configured to receive at least one IP address allocated by the at least one DHCP server, and select one of the IP addresses.
  • the preset time length is less than a length of time specified by a system of the mobile terminal.
  • the foregoing broadcast unit 302 is specifically configured to:
  • a broadcast IP address acquisition request is made within a preset range centered on the mobile terminal.
  • the foregoing broadcast unit 302 is specifically configured to:
  • FIG. 3b is a modified structure of the wireless fidelity Wi-Fi connection device described in FIG. 3a, further comprising: an obtaining unit 304 and an establishing unit 305, as follows:
  • the obtaining unit 304 after receiving the at least one IP address allocated by the at least one DHCP server, and selecting one of the IP addresses, acquiring the IP address of the gateway;
  • the establishing unit 305 is configured to establish a routing path between the IP address of the gateway and the one of the IP addresses.
  • the receiving unit 303 is specifically configured to:
  • the at least one DHCP server includes at least a first DHCP server and a second The DHCP server, the receiving unit 303 is specifically configured to:
  • the obtaining unit 304 is specifically configured to:
  • the second DHCP server and the first DHCP server are the same server, obtain a routing path before the mobile terminal performs IP address renewal, and obtain an IP address of the gateway according to the routing path.
  • the obtaining unit 304 is specifically configured to:
  • the wireless fidelity Wi-Fi connection device when the validity period end time of the IP address of the mobile terminal is less than a preset threshold, the IP address is sent to the first DHCP server within a preset time length.
  • the address renewal request fails to report the renewal of the IP address failure message to the mobile terminal system when the mobile terminal fails to renew the IP address, and the broadcast IP address acquisition request receives the at least one IP address assigned by the at least one DHCP server, and Select one of the IP addresses.
  • the mobile terminal cannot report the failure to renew the IP address failure message, and the mobile terminal does not disconnect the current Wi-Fi network and broadcasts the IP address acquisition request.
  • the IP address assigned by the DHCP server is received, so that the Wi-Fi connection state can also be maintained when the IP address renewal fails.
  • the wireless fidelity Wi-Fi connection device described in the device embodiment of the present invention is presented in the form of a functional unit.
  • the term "unit” as used herein shall be understood to mean the broadest possible meaning, and the object for implementing the functions described for each "unit” may be, for example, an integrated circuit ASIC, a single circuit for executing one or more software or firmware.
  • a processor shared, dedicated or chipset
  • memory of the program combinatorial logic, and/or other suitable components that perform the functions described above.
  • the sending unit 301 when the sending unit 301 is configured to send an IP address renewal request to the first DHCP server within a preset time length when the validity period end time of the IP address of the mobile terminal is less than a preset threshold, the sending unit 301 may be configured by using FIG.
  • the mobile terminal is implemented by using the executable program code in the memory 4000 by the processor 3000, and the first DHCP server is within a preset time length when the end time of the validity period of the IP address of the mobile terminal is less than a preset threshold.
  • Send IP address Renewal request when the sending unit 301 is configured to send an IP address renewal request to the first DHCP server within a preset time length when the validity period end time of the IP address of the mobile terminal is less than a preset threshold.
  • FIG. 4 it is a schematic structural diagram of an embodiment of a mobile terminal according to an embodiment of the present invention.
  • the mobile terminal described in this embodiment includes: at least one input device 1000; at least one output device 2000; at least one processor 3000, such as a CPU; and a memory 4000, the input device 1000, the output device 2000, the processor 3000, and The memory 4000 is connected by a bus 5000.
  • the input device 1000 may be a touch panel, a physical button, or a mouse.
  • the output device 2000 described above may specifically be a display screen.
  • the above memory 4000 may be a high speed RAM memory or a non-volatile memory such as a magnetic disk memory.
  • the above memory 4000 is used to store a set of program codes, and the input device 1000, the output device 2000, and the processor 3000 are used to call the program code stored in the memory 4000, and perform the following operations:
  • the processor 3000 is configured to:
  • the IP address renewal request is sent to the first DHCP server within a preset time length
  • the system does not report the renewal of the IP address failure message to the system of the mobile terminal, but broadcasts the IP address acquisition request;
  • the preset time length is less than a length of time specified by a system of the mobile terminal.
  • the foregoing processor 3000 broadcasts an IP address acquisition request, including:
  • a broadcast IP address acquisition request is made within a preset range centered on the mobile terminal.
  • the foregoing processor 3000 broadcasts an IP address acquisition request, including:
  • the processor 3000 receives at least one IP address allocated by the at least one DHCP server, and after selecting one of the IP addresses, is further specifically used to:
  • the processor 3000 receives at least one IP address allocated by the at least one DHCP server, and selects one of the IP addresses, including:
  • the processor 3000 receives at least one IP address allocated by the at least one DHCP server, and selects one of the IP addresses, including:
  • the at least one DHCP server includes at least a first DHCP server and a second DHCP server, where the processor 3000 receives at least one IP address allocated by the at least one DHCP server, and selects one of the IP addresses, including:
  • the processor 3000 receives at least one IP address allocated by the at least one DHCP server, and after selecting one of the IP addresses, is further specifically used to:
  • the foregoing processor 3000 acquires an IP address of the gateway, including:
  • the second DHCP server and the first DHCP server are the same server, obtain a routing path before the mobile terminal performs IP address renewal, and obtain an IP address of the gateway according to the routing path.
  • the foregoing processor 3000 acquires an IP address of the gateway, including:
  • the embodiment of the present invention further provides a computer storage medium, wherein the computer storage medium may store a program, where the program includes some or all of the wireless fidelity Wi-Fi connection methods described in the foregoing method embodiments. step.
  • Embodiments of the present invention also provide a computer program product comprising a non-transitory computer readable storage medium storing a computer program operable to cause The computer performs some or all of the steps of any of the wireless fidelity Wi-Fi connection methods described in the above method embodiments.
  • embodiments of the present invention can be provided as a method, apparatus (device), or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or a combination of software and hardware. Moreover, the invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
  • the computer program is stored/distributed in a suitable medium, provided with other hardware or as part of the hardware, or in other distributed forms, such as over the Internet or other wired or wireless telecommunication systems.
  • the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
  • the apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.

Landscapes

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

Abstract

本发明实施例提供了一种无线保真Wi-Fi连接方法及相关产品,所述方法包括:在移动终端的IP地址的有效期距离结束时间小于预设阈值时,在预设时间长度内向第一DHCP服务器发送IP地址续租请求;在所述移动终端续租IP地址失败时,不向所述移动终端的系统上报续租IP地址失败消息,而广播IP地址获取请求;接收由至少一个DHCP服务器分配的至少一个IP地址,并选择其中一个IP地址。通过本发明实施例可在移动终端进行IP地址续租过程中,保持Wi-Fi网络不断开。

Description

无线保真Wi-Fi连接方法及相关产品
本发明要求2016年12月7日递交的发明名称为“一种无线保真Wi-Fi连接方法及移动终端”的申请号201611117289.0的在先申请优先权,上述在先申请的内容以引入的方式并入本文本中。
技术领域
本发明涉及互联网技术领域,具体涉及一种无线保真Wi-Fi连接方法及相关产品。
背景技术
随着信息技术的快速发展,移动终端(如手机、平板电脑等等)使用越来越普及,用户对移动终端的要求也越来越高,不仅需要较高的处理速度,还对无线保真(Wireless Fidelity,Wi-Fi)提出了要求。
现有技术中,虽然动态主机配置协议(Dynamic Host Configuration Protocol,DHCP)有明确的协议规定,但是,移动终端用户在实际使用设备时仍会碰到互联网协议(Internet Protocol Address,IP)地址续租失败的情况。
发明内容
本发明实施例提供了一种无线保真Wi-Fi连接方法及相关产品,以期在移动终端进行IP地址续租过程中,保持Wi-Fi网络不断开。
本发明实施例第一方面提供了一种无线保真Wi-Fi连接方法,包括:
在移动终端的IP地址的有效期距离结束时间小于预设阈值时,在预设时间长度内向第一DHCP服务器发送IP地址续租请求;
在所述移动终端续租IP地址失败时,不向所述移动终端的系统上报续租IP地址失败消息,而广播IP地址获取请求;
接收由至少一个DHCP服务器分配的至少一个IP地址,并选择其中一个IP地址。
本发明实施例第二方面提供了一种无线保真Wi-Fi连接装置,包括:
发送单元,用于在移动终端的IP地址的有效期距离结束时间小于预设阈值时,在预设时间长度内向第一DHCP服务器发送IP地址续租请求;
广播单元,用于在所述移动终端续租IP地址失败时,不向所述移动终端的系统上报续租IP地址失败消息,而广播IP地址获取请求;
接收单元,用于接收由至少一个DHCP服务器分配的至少一个IP地址,并选择其中一个IP地址。
第三方面,本发明实施例提供了一种移动终端,包括:处理器和存储器;以及一个或多个程序,所述一个或多个程序被存储在所述存储器中,并且被配置成由所述处理器执行,所述程序包括用于如第一方面中所描述的部分或全部步骤的指令。
第四方面,本发明实施例提供了一种计算机可读存储介质,其中,所述计算机可读存储介质用于存储计算机程序,其中,所述计算机程序使得计算机执行如本发明实施例第一方面中所描述的部分或全部步骤的指令。
第五方面,本发明实施例提供了一种计算机程序产品,其中,所述计算机程序产品包括存储了计算机程序的非瞬时性计算机可读存储介质,所述计算机程序可操作来使计算机执行如本发明实施例第一方面中所描述的部分或全部步骤。该计算机程序产品可以为一个软件安装包。
附图说明
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是本发明实施例提供的一种无线保真Wi-Fi连接方法的第一实施例流程示意图;
图1a是本发明实施例提供的一种Wi-Fi列表演示示意图;
图2是本发明实施例提供的一种无线保真Wi-Fi连接方法的第二实施例流程示意图;
图3a是本发明实施例提供的一种无线保真Wi-Fi连接装置的实施例结构 示意图;
图3b是本发明实施例提供的图3a所描述的无线保真Wi-Fi连接装置的又一结构示意图;
图4是本发明实施例提供的一种移动终端的实施例结构示意图。
具体实施方式
通常情况下,例如,有些网络的DHCP服务器不响应IP地址续租请求(DHCP Request),或者,在移动终端连接到不同子网时也可能会续租不到IP地址,导致当前连接的Wi-Fi网络连接断开或无法继续访问Wi-Fi网络。本发明实施例提供了一种无线保真Wi-Fi连接方法及相关产品,可以在移动终端进行IP地址续租过程中,保持Wi-Fi网络不断开。
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
本发明的说明书和权利要求书及所述附图中的术语“第一”、“第二”、“第三”和“第四”等是用于区别不同对象,而不是用于描述特定顺序。此外,术语“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、系统、产品或设备没有限定于已列出的步骤或单元,而是可选地还包括没有列出的步骤或单元,或可选地还包括对于这些过程、方法、产品或设备固有的其它步骤或单元。
在本文中提及“实施例”意味着,结合实施例描述的特定特征、结构或特性可以包含在本发明的至少一个实施例中。在说明书中的各个位置展示该短语并不一定均是指相同的实施例,也不是与其它实施例互斥的独立的或备选的实施例。本领域技术人员显式地和隐式地理解的是,本文所描述的实施例可以与其它实施例相结合。
本发明实施例所描述移动终端可以包括智能手机(如Android手机、iOS手机、Windows Phone手机等)、平板电脑、车载设备、掌上电脑、笔记本电脑、移动互联网设备(MID,Mobile Internet Devices)或穿戴式设备等,上述 仅是举例,而非穷举,包含但不限于上述移动终端。
需要说明的是,通常情况下,路由器均设置有DHCP服务器,DHCP服务器用于给移动终端分配IP地址,该IP地址具有一个有效期,在有效期内,移动终端可与路由器保持Wi-Fi连接状态,在该有效期结束时,则移动终端会断开与路由器之间的Wi-Fi连接。在IP地址有效期结束之前,可向DHCP服务器发送IP地址续租请求,DHCP服务器可响应该IP地址续租请求为移动终端分配IP地址。
需要说明的是,上述移动终端与DHCP服务器的之间的交互流程可包含如下4个步骤:
1、移动终端向外广播IP地址获取请求;
2、至少一个DHCP服务器提供IP地址以响应该IP地址获取请求;
3、移动终端选取一个IP地址,并向该IP地址对应的目标DHCP服务器发送确认消息;
4、该目标DHCP服务器向移动终端发送ACK消息。
进一步地,在移动终端续租IP地址失败(续租超时或收到DHCP服务器发的没有应答(Negative Acknowledgment,NAK)),续租过程中主要执行步骤3~4,通常情况下,该续租过程可持续一个系统指定时间长度(该系统指定时间长度由移动终端的系统默认,其为一个固定值)。在该系统指定时间长度内,移动终端持续执行上述步骤3~4,在系统指定时间长度结束后,倘若未接收到DHCP服务器发送的ACK消息,则移动终端则会上报DHCP_FAILURE消息,移动终端的系统在处理这一消息时通常会断掉当前的网络连接,然后,重新建立连接并重新选择DHCP服务器(执行上述步骤1~4)。倘若在IP地址续租过程中,用户感知到网络断开,则会有一段时间无法使用网络,因而,用户可能会觉得体验较差。
因此,本发明实施例提出了一种无线保真Wi-Fi连接方法,包括如下步骤:
在移动终端的IP地址的有效期距离结束时间小于预设阈值时,在预设时间长度内向第一DHCP服务器发送IP地址续租请求;
在所述移动终端续租IP地址失败时,不向所述移动终端的系统上报续租IP地址失败消息,而广播IP地址获取请求;
接收由至少一个DHCP服务器分配的至少一个IP地址,并选择其中一个IP地址。
如此,在IP地址续租失败时,可不向移动终端的系统上报续租IP地址失败消息,移动终端便不会断开当前的Wi-Fi网络,并广播IP地址获取请求,如此,可方便地接收由DHCP服务器分配的IP地址,从而,在IP地址续租失败时,也可以保持Wi-Fi连接状态。
请参阅图1,为本发明实施例提供的一种无线保真Wi-Fi连接方法的第一实施例流程示意图。本实施例中所描述的无线保真Wi-Fi连接方法,包括以下步骤:
101、在移动终端的IP地址的有效期距离结束时间小于预设阈值时,在预设时间长度内向第一DHCP服务器发送IP地址续租请求。
其中,上述步骤101中,移动终端处于Wi-Fi连接状态。上述预设阈值可由用户自行设置或者系统默认。预设时间长度由用户自行设置。上述第一DHCP服务器可为移动终端当前连接着的路由器内置的DHCP服务器。
具体地,在移动终端处于Wi-Fi连接状态时,主要是由网关IP地址与DHCP服务器分配的IP地址(即移动终端的IP地址)之间形成路由,移动终端根据该路由与路由器之间建立通信连接。但是,由于DHCP服务器分配的IP地址,其具有一定的有效期,因而,需要在DHCP服务器分配的IP地址的有效期尚未结束之前,由移动终端向DHCP服务器进行IP地址续租。移动终端在该移动终端的IP地址的有效期距离结束时间小于预设阈值时,可在预设时间长度内向第一DHCP服务器发送IP地址续租请求。
例如,在移动终端断开Wi-Fi连接状态时,当移动终端再次进入路由器的覆盖范围,则可由该路由器内置的DHCP服务器分配一个IP地址(即移动终端的IP地址),移动终端的IP地址与该网关的IP地址之间可形成路由,移动终端根据该路由与路由器之间建立通信连接。同样地,由于DHCP服务器分配的IP地址,其具有一定的有效期,因而,需要在DHCP服务器分配的IP地址的有效期尚未结束之前,由移动终端向DHCP服务器进行IP地址续租。移动终端在该移动终端的IP地址的有效期距离结束时间小于预设阈值时,可在 预设时间长度内向第一DHCP服务器发送IP地址续租请求。
可选地,所述预设时间长度小于由所述移动终端的系统指定时间长度。其中,移动终端的系统指定时间长度可为一个固定值,例如,30s。而预设时间长度可为一个固定值或者一个范围值,例如,15s,即移动终端可在15s内向第一DHCP服务器发送IP地址获取请求。在预设时间长度小于移动终端的系统指定时间长度时,可在较短时间内便知晓IP地址续租是否失败。通常情况下,当IP地址续租一次无法成功的时候,再次进行IP地址续租的概率也不高,因而,可缩短IP地址续租的指定时间(即系统指定时间长度),进而,可较快地,执行步骤102,有利用优化接入网络的效率。
可选地,在移动终端续租IP地址成功时,则上述网关的IP地址有效期可以延续。例如,当前IP地址的有效期距离结束时间还剩下10分钟,倘若续租IP地址成功,IP地址的有效期为1个小时,则可延长该当前IP地址的有效使用时间。
102、在所述移动终端续租IP地址失败时,不向所述移动终端的系统上报续租IP地址失败消息,而广播IP地址获取请求。
其中,移动终端在续租IP地址失败时,通常情况下,会向移动终端的系统上报续租IP地址失败消息(即DHCP_FAILURE消息),在移动终端的系统接收到该DHCP_FAILURE消息后,则会断开当前的Wi-Fi网络。而本发明实施例中,在移动终端在续租IP地址失败时,则不会向移动终端的系统上报该DHCP_FAILURE消息(例如,在安卓操作系统中,则不向移动终端的系统中的系统框架层上报DHCP_FAILURE消息),如此,移动终端的系统便不会接收到DHCP_FAILURE消息,进而,便不会断开当前的Wi-Fi网络,而是向外广播IP地址获取请求。
可选地,上述广播IP地址获取请求,可按照如下方式实施:
按照上次Wi-Fi扫描的Wi-Fi列表向以所述移动终端为中心的预设范围内广播IP地址获取请求。
其中,上次Wi-Fi扫描的Wi-Fi列表为距离当前时间最近的一次Wi-Fi扫描得到的Wi-Fi列表,如图1a所示,其为Wi-Fi列表的演示示意图。上述“上次”可理解为距离当前时刻最近的一次Wi-Fi扫描。上述预设范围可由用户自 行设置或者系统默认,通常情况下,移动终端的Wi-Fi芯片均有一个最大的搜索范围,即超出了该最大的搜索范围的路由器或者热点则搜索不到,当然,该最大的搜索范围是在理想情况下实现的,在具体环境下,若遇到障碍物(如门、窗户、墙等),则无法达到该最大的搜索范围。通常情况下,路由器距离移动终端的距离越远,可能移动终端检测到的路由器的信号越弱,如此,可缩小移动终端搜索路由器的搜索范围。在移动终端按照上次Wi-Fi扫描的Wi-Fi列表向以该移动终端为中心的预设范围内广播IP地址获取请求时,则可以搜索到信号强度较强或者与该移动终端近的接入点(每一接入点内置一个DHCP服务器)。在任一DHCP服务器接收到了该IP地址获取请求,均可向该移动终端分配一个IP地址,并向该移动终端发送该IP地址,当然,该IP地址也可以有一个具体的有效期。
可选地,上述广播IP地址获取请求,可包含如下步骤:
21)、获取所述移动终端所在局域网的多个DHCP服务器;
22)、向所述多个DHCP服务器广播IP地址获取请求。
其中,移动终端处于Wi-Fi连接状态下,其实,该移动终端也处于一个局域网中,因此,可获取到该移动终端所在的局域网,当然,该局域网可能包含不止一个DHCP服务器(有几个接入点,就可能包含几个DHCP服务器),如此,移动终端可向该所有DHCP服务器广播IP地址获取请求。例如,移动终端的局域网包含N个DHCP服务器,其中,该N为大于1的整数,则可获取移动终端所在局域网的N个DHCP服务器,并向该N个DHCP服务器广播IP地址获取请求。
103、接收由至少一个DHCP服务器分配的至少一个IP地址,并选择其中一个IP地址。
其中,移动终端可接收由至少一个DHCP服务器分配的至少一个IP地址,并选择其中一个IP地址,该IP地址作为移动终端的IP地址。在移动终端有了该移动终端的IP地址之后,移动终端便可以接入Wi-Fi网络,即可形成网关的IP地址与由该移动终端的IP地址之间的路由路径。
可选地,上述步骤103中,接收由至少一个DHCP服务器分配的至少一个IP地址,并选择其中一个IP地址,可包含如下步骤:
接收由所述第一DHCP服务器分配的IP地址。
具体地,即使移动终端向第一DHCP服务器续租失败后,还可以广播IP地址获取请求,接收该第一DHCP服务器分配的IP地址,该IP地址作为移动终端的新IP地址,并再次接入该第一DHCP服务器,即与该第一DHCP服务器之间建立通信连接。移动终端的新IP地址与步骤101中的移动终端的IP地址可能不一样,因为DHCP服务器是随机分配IP地址的,网关的IP地址与移动终端的新IP地址之间则可形成一条新的路由路径,如此,通过该路由路径移动终端可与第一DHCP服务器之间进行通信连接,整个过程,移动终端不会断开当前的Wi-Fi网络。
可选地,上述至少一个DHCP服务器至少包括第一DHCP服务器和第二DHCP服务器,上述步骤103中,接收由至少一个DHCP服务器分配的至少一个IP地址,并选择其中一个IP地址,可包含如下步骤:
接收由所述第二DHCP服务器分配的IP地址。
可选地,该第二DHCP服务器可为与第一DHCP服务器不同的DHCP服务器。那么,即使移动终端向第一DHCP服务器续租失败后,还可以广播IP地址获取请求,接收第二DHCP服务器分配的IP地址,该IP地址作为移动终端的新IP地址,并接入该第二DHCP服务器,即与该第二DHCP服务器之间建立通信连接。即在IP地址续租失败后,还可以接收第二DHCP服务器分配的IP地址,从而,与第二DHCP服务器之间建立通信连接。移动终端的IP地址与步骤101中的移动终端的IP地址可能一样,因为不同的DHCP服务器分配IP地址的过程是随机的,由第二DHCP服务器对应的网关的IP地址与移动终端的IP地址之间则可形成一条新的路由路径,如此,通过该路由路径移动终端可与第二DHCP服务器之间进行通信连接,整个过程,移动终端不会断开当前的Wi-Fi网络。
进一步可选地,任一DHCP服务器在接收到IP地址获取请求后,均可以响应该IP地址获取请求,并向该移动终端分配一个IP地址,并向移动终端发送该IP地址。假设有N个DHCP服务器,N为大于或等于1的整数,因而,移动终端可能最多接收到N个IP地址,当然,每一IP地址对应一个DHCP服务器,移动终端不可能接入N个DHCP服务器,只能选取该N个IP地址中 的一个IP地址,如此,只要选取了一个IP地址,则可向该IP地址对应的DHCP服务器发送确认消息。上述第二DHCP服务器可为移动终端曾连接过的路由器的内置DHCP服务器,因为移动终端中通常会保存曾连接过的路由器的内置DHCP服务器的密码,于是,只要扫描到第二DHCP服务器,则可自动输入密码,并接入该第二DHCP服务器。
可以看出,通过本发明实施例,在移动终端的IP地址的有效期距离结束时间小于预设阈值时,在预设时间长度内向第一DHCP服务器发送IP地址续租请求,在移动终端续租IP地址失败时,不向移动终端的系统上报续租IP地址失败消息,而广播IP地址获取请求,接收由至少一个DHCP服务器分配的至少一个IP地址,并选择其中一个IP地址。如此,在IP地址续租失败时,可不向移动终端的系统上报续租IP地址失败消息,移动终端便不会断开当前的Wi-Fi网络,并广播IP地址获取请求,如此,可方便地接收由DHCP服务器分配的IP地址,从而,在IP地址续租失败时,也可以保持Wi-Fi连接状态。
与上述一致地,请参阅图2,为本发明实施例提供的一种无线保真Wi-Fi连接方法的第二实施例流程示意图。本实施例中所描述的无线保真Wi-Fi连接方法,包括以下步骤:
201、在移动终端的IP地址的有效期距离结束时间小于预设阈值时,在预设时间长度内向第一DHCP服务器发送IP地址续租请求。
202、在所述移动终端续租IP地址失败时,不向所述移动终端的系统上报续租IP地址失败消息,而广播IP地址获取请求。
203、接收由至少一个DHCP服务器分配的至少一个IP地址,并选择其中一个IP地址。
其中,上述步骤201-步骤203可参照图1所描述的无线保真Wi-Fi连接方法的对应步骤。
204、获取网关的IP地址。
其中,移动终端可获取该移动终端的IP地址。
可选地,上述步骤102中,获取网关的IP地址,可按照如下方式实施:
在所述第二DHCP服务器与所述第一DHCP服务器为同一服务器时,获 取所述移动终端进行IP地址续租之前的路由路径,并根据所述路由路径获取网关的IP地址。
其中,在第二DHCP服务器与第一DHCP服务器为同一服务器时,也可以获取移动终端进行IP地址续租之前的路由路径,该路由路径中包含移动终端的IP地址以及移动终端进行IP地址续租之前的网关的IP地址,从该路由路径中可直接读取网关的IP地址。
可选地,上述步骤102中,获取网关的IP地址,可按照如下方式实施:
在所述第二DHCP服务器与所述第一DHCP服务器为不同一服务器时,对由被选择的IP地址对应的DHCP服务器发送的所述Offer报文或者ACK报文进行解析,得到所述网关的IP地址。
其中,在第二DHCP服务器与第一DHCP服务器为不同一服务器时,网关的IP地址是移动终端在向第二DHCP服务器获取IP地址时,由DHCP服务器回复的Offer报文或ACK报文中携带的,只需要对Offer报文或者ACK报文进行解析,便可以得到网关的IP地址。
205、建立所述网关的IP地址与所述其中一个IP地址之间的路由路径。
其中,在移动终端接收到由至少一个DHCP服务器分配的至少一个IP地址,并选择其中一个IP地址时,该IP地址作为移动终端的新IP地址,该移动终端可与该新IP地址对应的DHCP服务器之间建立了通信连接,但是,当前的路由尚未更新,于是,可建立网关的IP地址与上述新IP地址之间的路由路径,并可在移动终端的显示屏上进行展示。
可以看出,通过本发明实施例,在移动终端的IP地址的有效期距离结束时间小于预设阈值时,在预设时间长度内向第一DHCP服务器发送IP地址续租请求,在移动终端续租IP地址失败时,不向移动终端的系统上报续租IP地址失败消息,而广播IP地址获取请求,接收由至少一个DHCP服务器分配的至少一个IP地址,并选择其中一个IP地址,并且,可获取网关的IP地址,建立网关的IP地址与上述其中一个IP地址之间的路由路径。由于,在移动终端续租IP地址失败后,不向移动终端的系统上报续租IP地址失败消息,从而,移动终端还是处于连接状态,因此,可在移动终端进行IP地址续租过程中,保持Wi-Fi网络不断开,并且,可在移动终端接入Wi-Fi网络之后,更新路由 信息。
与上述一致地,以下为实施上述无线保真Wi-Fi连接方法的装置,具体如下:
请参阅图3a,为本发明实施例提供的一种无线保真Wi-Fi连接装置的实施例结构示意图。本实施例中所描述的无线保真Wi-Fi连接装置,包括:发送单元301、广播单元302和接收单元303,具体如下:
发送单元301,用于在移动终端的IP地址的有效期距离结束时间小于预设阈值时,在预设时间长度内向第一DHCP服务器发送IP地址续租请求;
广播单元302,用于在所述移动终端续租IP地址失败时,不向所述移动终端的系统上报续租IP地址失败消息,而广播IP地址获取请求;
接收单元303,用于接收由至少一个DHCP服务器分配的至少一个IP地址,并选择其中一个IP地址。
可选地,所述预设时间长度小于由所述移动终端的系统指定时间长度。
可选地,上述广播单元302具体用于:
按照上次Wi-Fi扫描的Wi-Fi列表向以所述移动终端为中心的预设范围内广播IP地址获取请求。
可选地,上述广播单元302具体用于:
获取所述移动终端所在局域网的多个DHCP服务器,向所述多个DHCP服务器广播IP地址获取请求。
可选地,如图3b,图3b为图3a所描述的无线保真Wi-Fi连接装置的一种变型结构,其还包括:获取单元304和建立单元305,具体如下:
获取单元304,在所述接收单元303接收由至少一个DHCP服务器分配的至少一个IP地址,并选择其中一个IP地址之后,获取所述网关的IP地址;
建立单元305,用于建立所述网关的IP地址与所述其中一个IP地址之间的路由路径。
可选地,所述接收单元303具体用于:
接收由所述第一DHCP服务器分配的IP地址。
可选地,所述至少一个DHCP服务器至少包括第一DHCP服务器和第二 DHCP服务器,所述接收单元303具体用于:
接收由所述第二DHCP服务器分配的IP地址。
可选地,获取单元304具体用于:
在所述第二DHCP服务器与所述第一DHCP服务器为同一服务器时,获取所述移动终端进行IP地址续租之前的路由路径,并根据所述路由路径获取网关的IP地址。
可选地,获取单元304具体用于:
在所述第二DHCP服务器与所述第一DHCP服务器为不同一服务器时,对由被选择的IP地址对应的DHCP服务器发送的所述Offer报文或者ACK报文进行解析,得到所述网关的IP地址。
可以看出,通过本发明实施例所描述的无线保真Wi-Fi连接装置,在移动终端的IP地址的有效期距离结束时间小于预设阈值时,在预设时间长度内向第一DHCP服务器发送IP地址续租请求,在移动终端续租IP地址失败时,不向移动终端的系统上报续租IP地址失败消息,而广播IP地址获取请求,接收由至少一个DHCP服务器分配的至少一个IP地址,并选择其中一个IP地址。如此,在IP地址续租失败时,可不向移动终端的系统上报续租IP地址失败消息,移动终端便不会断开当前的Wi-Fi网络,并广播IP地址获取请求,如此,可方便地接收由DHCP服务器分配的IP地址,从而,在IP地址续租失败时,也可以保持Wi-Fi连接状态。
需要注意的是,本发明装置实施例所描述的无线保真Wi-Fi连接装置是以功能单元的形式呈现。这里所使用的术语“单元”应当理解为尽可能最宽的含义,用于实现各个“单元”所描述功能的对象例如可以是集成电路ASIC,单个电路,用于执行一个或多个软件或固件程序的处理器(共享的、专用的或芯片组)和存储器,组合逻辑电路,和/或提供实现上述功能的其他合适的组件。
举例来说,发送单元301用于在移动终端的IP地址的有效期距离结束时间小于预设阈值时,在预设时间长度内向第一DHCP服务器发送IP地址续租请求的功能可以由图4所示的移动终端来实现,具体可以通过处理器3000通过调用存储器4000中的可执行程序代码,在移动终端的IP地址的有效期距离结束时间小于预设阈值时,在预设时间长度内向第一DHCP服务器发送IP地 址续租请求。
与上述一致地,请参阅图4,为本发明实施例提供的一种移动终端的实施例结构示意图。本实施例中所描述的移动终端,包括:至少一个输入设备1000;至少一个输出设备2000;至少一个处理器3000,例如CPU;和存储器4000,上述输入设备1000、输出设备2000、处理器3000和存储器4000通过总线5000连接。
其中,上述输入设备1000具体可为触控面板、物理按键或者鼠标。
上述输出设备2000具体可为显示屏。
上述存储器4000可以是高速RAM存储器,也可为非易失存储器(non-volatile memory),例如磁盘存储器。上述存储器4000用于存储一组程序代码,上述输入设备1000、输出设备2000和处理器3000用于调用存储器4000中存储的程序代码,执行如下操作:
上述处理器3000,用于:
在移动终端的IP地址的有效期距离结束时间小于预设阈值时,在预设时间长度内向第一DHCP服务器发送IP地址续租请求;
在所述移动终端续租IP地址失败时,不向所述移动终端的系统上报续租IP地址失败消息,而广播IP地址获取请求;
接收由至少一个DHCP服务器分配的至少一个IP地址,并选择其中一个IP地址。
可选地,所述预设时间长度小于由所述移动终端的系统指定时间长度。
可选地,上述处理器3000广播IP地址获取请求,包括:
按照上次Wi-Fi扫描的Wi-Fi列表向以所述移动终端为中心的预设范围内广播IP地址获取请求。
可选地,上述处理器3000广播IP地址获取请求,包括:
获取所述移动终端所在局域网的多个DHCP服务器,向所述多个DHCP服务器广播IP地址获取请求。
可选地,上述处理器3000接收由至少一个DHCP服务器分配的至少一个IP地址,并选择其中一个IP地址之后,还具体用于:
获取网关的IP地址;
建立所述网关的IP地址与所述其中一个IP地址之间的路由路径。
可选地,上述处理器3000接收由至少一个DHCP服务器分配的至少一个IP地址,并选择其中一个IP地址,包括:
可选地,上述处理器3000接收由至少一个DHCP服务器分配的至少一个IP地址,并选择其中一个IP地址,包括:
接收由所述第一DHCP服务器分配的IP地址。
可选地,所述至少一个DHCP服务器至少包括第一DHCP服务器和第二DHCP服务器,上述处理器3000接收由至少一个DHCP服务器分配的至少一个IP地址,并选择其中一个IP地址,包括:
接收由所述第二DHCP服务器分配的IP地址。
可选地,上述处理器3000接收由至少一个DHCP服务器分配的至少一个IP地址,并选择其中一个IP地址之后,还具体用于:
获取网关的IP地址;
建立所述网关的IP地址与所述其中一个IP地址之间的路由路径。
可选地,上述处理器3000获取网关的IP地址,包括:
在所述第二DHCP服务器与所述第一DHCP服务器为同一服务器时,获取所述移动终端进行IP地址续租之前的路由路径,并根据所述路由路径获取网关的IP地址。
可选地,上述处理器3000获取网关的IP地址,包括:
在所述第二DHCP服务器与所述第一DHCP服务器为不同一服务器时,对由被选择的IP地址对应的DHCP服务器发送的所述Offer报文或者ACK报文进行解析,得到所述网关的IP地址。
本发明实施例还提供一种计算机存储介质,其中,该计算机存储介质可存储有程序,该程序执行时包括上述方法实施例中记载的任何一种无线保真Wi-Fi连接方法的部分或全部步骤。
本发明实施例还提供一种计算机程序产品,所述计算机程序产品包括存储了计算机程序的非瞬时性计算机可读存储介质,所述计算机程序可操作来使计 算机执行如上述方法实施例中记载的任何一种无线保真Wi-Fi连接方法的部分或全部步骤。
尽管在此结合各实施例对本发明进行了描述,然而,在实施所要求保护的本发明过程中,本领域技术人员通过查看所述附图、公开内容、以及所附权利要求书,可理解并实现所述公开实施例的其他变化。在权利要求中,“包括”(comprising)一词不排除其他组成部分或步骤,“一”或“一个”不排除多个的情况。单个处理器或其他单元可以实现权利要求中列举的若干项功能。相互不同的从属权利要求中记载了某些措施,但这并不表示这些措施不能组合起来产生良好的效果。
本领域技术人员应明白,本发明的实施例可提供为方法、装置(设备)、或计算机程序产品。因此,本发明可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。计算机程序存储/分布在合适的介质中,与其它硬件一起提供或作为硬件的一部分,也可以采用其他分布形式,如通过Internet或其它有线或无线电信系统。
本发明是参照本发明实施例的方法、装置(设备)和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处 理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
尽管结合具体特征及其实施例对本发明进行了描述,显而易见的,在不脱离本发明的精神和范围的情况下,可对其进行各种修改和组合。相应地,本说明书和附图仅仅是所附权利要求所界定的本发明的示例性说明,且视为已覆盖本发明范围内的任意和所有修改、变化、组合或等同物。显然,本领域的技术人员可以对本发明进行各种改动和变型而不脱离本发明的精神和范围。这样,倘若本发明的这些修改和变型属于本发明权利要求及其等同技术的范围之内,则本发明也意图包含这些改动和变型在内。

Claims (20)

  1. 一种无线保真Wi-Fi连接方法,其特征在于,包括:
    在移动终端的IP地址的有效期距离结束时间小于预设阈值时,在预设时间长度内向第一DHCP服务器发送IP地址续租请求;
    在所述移动终端续租IP地址失败时,不向所述移动终端的系统上报续租IP地址失败消息,而广播IP地址获取请求;
    接收由至少一个DHCP服务器分配的至少一个IP地址,并选择其中一个IP地址。
  2. 根据权利要求1所述的方法,其特征在于,所述预设时间长度小于由所述移动终端的系统指定时间长度。
  3. 根据权利要求1或2所述的方法,其特征在于,所述广播IP地址获取请求,包括:
    按照上次Wi-Fi扫描的Wi-Fi列表向以所述移动终端为中心的预设范围内广播IP地址获取请求。
  4. 根据权利要求1或2所述的方法,其特征在于,所述广播IP地址获取请求,包括:
    获取所述移动终端所在局域网的多个DHCP服务器,向所述多个DHCP服务器广播IP地址获取请求。
  5. 根据权利要求1至4任一项所述的方法,其特征在于,所述接收由至少一个DHCP服务器分配的至少一个IP地址,并选择其中一个IP地址之后,所述方法还包括:
    获取网关的IP地址;
    建立所述网关的IP地址与所述其中一个IP地址之间的路由路径。
  6. 根据权利要求1至5任一项所述的方法,其特征在于,所述接收由至少一个DHCP服务器分配的至少一个IP地址,并选择其中一个IP地址,包括:
    接收由所述第一DHCP服务器分配的IP地址。
  7. 根据权利要求1至5任一项所述的方法,其特征在于,所述至少一个DHCP服务器至少包括第一DHCP服务器和第二DHCP服务器,所述接收由至少一个DHCP服务器分配的至少一个IP地址,并选择其中一个IP地址,包括:
    接收由所述第二DHCP服务器分配的IP地址。
  8. 根据权利要求7所述的方法,其特征在于,所述获取网关的IP地址,包括:
    在所述第二DHCP服务器与所述第一DHCP服务器为同一服务器时,获取所述移动终端进行IP地址续租之前的路由路径,并根据所述路由路径获取网关的IP地址。
  9. 根据权利要求7所述的方法,其特征在于,所述获取网关的IP地址,包括:
    在所述第二DHCP服务器与所述第一DHCP服务器为不同一服务器时,对由被选择的IP地址对应的DHCP服务器发送的所述Offer报文或者ACK报文进行解析,得到所述网关的IP地址。
  10. 一种无线保真Wi-Fi连接装置,其特征在于,包括:
    发送单元,用于在移动终端的IP地址的有效期距离结束时间小于预设阈值时,在预设时间长度内向第一DHCP服务器发送IP地址续租请求;
    广播单元,用于在所述移动终端续租IP地址失败时,不向所述移动终端的系统上报续租IP地址失败消息,而广播IP地址获取请求;
    接收单元,用于接收由至少一个DHCP服务器分配的至少一个IP地址,并选择其中一个IP地址。
  11. 根据权利要求10所述的装置,其特征在于,所述预设时间长度小于由所述移动终端的系统指定时间长度。
  12. 根据权利要求10所述的装置,其特征在于,所述广播单元具体用于:
    按照上次Wi-Fi扫描的Wi-Fi列表向以所述移动终端为中心的预设范围内广播IP地址获取请求。
  13. 根据权利要求10至12任一项所述的装置,其特征在于,所述装置还包括:
    获取单元,在所述接收单元接收由至少一个DHCP服务器分配的至少一个IP地址,并选择其中一个IP地址之后,获取所述网关的IP地址;
    建立单元,用于建立所述网关的IP地址与所述其中一个IP地址之间的路由路径。
  14. 根据权利要求10至13任一项所述的装置,其特征在于,所述接收单元具体用于:
    接收由所述第一DHCP服务器分配的IP地址。
  15. 根据权利要求10至13任一项所述的装置,其特征在于,所述至少一个DHCP服务器至少包括第一DHCP服务器和第二DHCP服务器,所述接收单元具体用于:
    接收由所述第二DHCP服务器分配的IP地址。
  16. 根据权利要求15所述的装置,其特征在于,所述获取单元具体用于:
    在所述第二DHCP服务器与所述第一DHCP服务器为同一服务器时,获取所述移动终端进行IP地址续租之前的路由路径,并根据所述路由路径获取网关的IP地址。
  17. 根据权利要求15所述的装置,其特征在于,所述获取单元具体用于:
    在所述第二DHCP服务器与所述第一DHCP服务器为不同一服务器时,对由被选择的IP地址对应的DHCP服务器发送的所述Offer报文或者ACK报文进行解析,得到所述网关的IP地址。
  18. 一种移动终端,其特征在于,包括:
    处理器和存储器;其中,所述处理器通过调用所述存储器中的代码或指令以执行如权利要求1至9任意一项所述的方法。
  19. 一种计算机存储介质,其特征在于,其用于存储计算机程序,其中,所述计算机程序使得计算机执行如权利要求1-9任一项所述的方法。
  20. 一种计算机程序产品,其特征在于,所述计算机程序产品包括存储了计算机程序的非瞬时性计算机可读存储介质,所述计算机程序可操作来使计算机执行如权利要求1-9任一项所述的方法。
PCT/CN2017/101462 2016-12-07 2017-09-12 无线保真Wi-Fi连接方法及相关产品 WO2018103400A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201611117289.0A CN106713522B (zh) 2016-12-07 2016-12-07 一种无线保真Wi-Fi连接方法及移动终端
CN201611117289.0 2016-12-07

Publications (1)

Publication Number Publication Date
WO2018103400A1 true WO2018103400A1 (zh) 2018-06-14

Family

ID=58936234

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/101462 WO2018103400A1 (zh) 2016-12-07 2017-09-12 无线保真Wi-Fi连接方法及相关产品

Country Status (2)

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

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109660411A (zh) * 2019-02-25 2019-04-19 北京云中融信网络科技有限公司 一种优化即时通信网络链路连接的方法及装置

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106713522B (zh) * 2016-12-07 2020-01-14 Oppo广东移动通信有限公司 一种无线保真Wi-Fi连接方法及移动终端
CN110870289B (zh) * 2017-07-07 2021-06-01 华为技术有限公司 一种局域网设备恢复上网的方法和装置
CN108566669B (zh) * 2017-12-07 2021-05-04 惠州Tcl移动通信有限公司 一种终端智能省电的方法、终端及具有存储功能的装置
CN108063840A (zh) * 2018-01-23 2018-05-22 广东欧珀移动通信有限公司 接入网络的方法及相关产品
CN108064071B (zh) * 2018-02-13 2020-06-16 Oppo广东移动通信有限公司 网络连接方法、装置、存储介质及电子设备

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101098346A (zh) * 2006-06-28 2008-01-02 华为技术有限公司 发起网际协议地址租约期更新过程的方法及装置
CN101202767A (zh) * 2006-12-29 2008-06-18 深圳市同洲电子股份有限公司 一种ip地址租用方法及装置
CN101729610A (zh) * 2009-12-15 2010-06-09 中兴通讯股份有限公司 一种dhcp server的备份方法及系统
WO2013170613A1 (zh) * 2012-05-14 2013-11-21 中国科学院计算机网络信息中心 Ip地址管理方法、设备及系统
CN105812505A (zh) * 2016-05-06 2016-07-27 上海斐讯数据通信技术有限公司 一种终端设备的ip地址续租的方法及装置
CN106713522A (zh) * 2016-12-07 2017-05-24 广东欧珀移动通信有限公司 一种无线保真Wi‑Fi连接方法及移动终端

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101227356A (zh) * 2007-12-12 2008-07-23 深圳市同洲电子股份有限公司 基于动态主机配置协议的网络接入方法、系统和设备
KR101190475B1 (ko) * 2009-12-18 2012-10-12 주식회사 케이티 삼중화 동적호스트구성프로토콜 시스템 및 동적호스트구성프로토콜 메시지 처리방법
CN103312708B (zh) * 2013-06-07 2016-06-01 福建联迪商用设备有限公司 一种基于租约文件的ip设定方法及系统
CN105813056A (zh) * 2016-05-06 2016-07-27 广东欧珀移动通信有限公司 一种接入网络的方法及终端

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101098346A (zh) * 2006-06-28 2008-01-02 华为技术有限公司 发起网际协议地址租约期更新过程的方法及装置
CN101202767A (zh) * 2006-12-29 2008-06-18 深圳市同洲电子股份有限公司 一种ip地址租用方法及装置
CN101729610A (zh) * 2009-12-15 2010-06-09 中兴通讯股份有限公司 一种dhcp server的备份方法及系统
WO2013170613A1 (zh) * 2012-05-14 2013-11-21 中国科学院计算机网络信息中心 Ip地址管理方法、设备及系统
CN105812505A (zh) * 2016-05-06 2016-07-27 上海斐讯数据通信技术有限公司 一种终端设备的ip地址续租的方法及装置
CN106713522A (zh) * 2016-12-07 2017-05-24 广东欧珀移动通信有限公司 一种无线保真Wi‑Fi连接方法及移动终端

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109660411A (zh) * 2019-02-25 2019-04-19 北京云中融信网络科技有限公司 一种优化即时通信网络链路连接的方法及装置

Also Published As

Publication number Publication date
CN106713522B (zh) 2020-01-14
CN106713522A (zh) 2017-05-24

Similar Documents

Publication Publication Date Title
WO2018103400A1 (zh) 无线保真Wi-Fi连接方法及相关产品
US20150281947A1 (en) Method and apparatus for fast ip address assignment
JP6726426B2 (ja) 端末間のログイン不要方法及び装置
US10104700B2 (en) Message processing method, MME selection method, and apparatuses
US11212226B2 (en) Data processing method and apparatus, and device
US11240198B2 (en) Session management method and apparatus
CN107113892B (zh) 一种网关设备自动组网的方法及装置
US20120076072A1 (en) System and method for maintaining privacy in a wireless network
WO2018058636A1 (zh) 一种传输响应消息的方法和装置
US10097505B2 (en) Method for initiating local routing communication, base station apparatus, and terminal apparatus
US9781579B2 (en) Method and device for realizing terminal WIFI talkback
WO2018103405A1 (zh) 识别接入点和热点的方法及相关产品
US9661493B2 (en) Apparatus and method for providing a wireless communication in a portable terminal
US11343667B2 (en) Method for discovering bluetooth device and bluetooth device
JP5551805B2 (ja) インターネットにアクセスする方法および装置
US10505890B2 (en) Network access method, system and terminal device, and computer storage medium
US10863555B2 (en) Access method, apparatus, device, and system
WO2015186281A1 (ja) 位置情報サービスのための端末、無線信号検知装置及びサーバー
US10708967B2 (en) Establishment of a connection between two local devices connected to different networks
US20140136597A1 (en) Relay enabled dynamic virtual private network
CN105451367A (zh) 一种无线网络连接方法、设备及系统
CN111669309A (zh) 一种建立VxLAN的方法及无线控制器、交换机
WO2016074398A1 (zh) Ip冲突检测及处理方法、无线热点设备、计算机存储介质
KR102297934B1 (ko) 단말 장치 및 이에 의한 무선 통신 연결 방법,및 비콘 장치 및 이에 의한 ap 정보의 제공 방법
WO2015157945A1 (zh) 一种信息传输方法、设备及系统

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17877806

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17877806

Country of ref document: EP

Kind code of ref document: A1