CN108012308B - Network connection method, mobile terminal and computer readable storage medium - Google Patents

Network connection method, mobile terminal and computer readable storage medium Download PDF

Info

Publication number
CN108012308B
CN108012308B CN201711206035.0A CN201711206035A CN108012308B CN 108012308 B CN108012308 B CN 108012308B CN 201711206035 A CN201711206035 A CN 201711206035A CN 108012308 B CN108012308 B CN 108012308B
Authority
CN
China
Prior art keywords
network
wifi network
mobile terminal
networks
wifi
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201711206035.0A
Other languages
Chinese (zh)
Other versions
CN108012308A (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 CN201711206035.0A priority Critical patent/CN108012308B/en
Publication of CN108012308A publication Critical patent/CN108012308A/en
Application granted granted Critical
Publication of CN108012308B publication Critical patent/CN108012308B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/16Discovering, processing access restriction or access information

Landscapes

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

Abstract

The application is applicable to the technical field of network application, and provides a network connection method, a mobile terminal and a computer readable storage medium, which comprise: detecting whether IP configuration information of a disabled WiFi network is changed; acquiring a reason why the WiFi network is disabled; and if the fact that the IP configuration information of the WiFi network is changed and the reason that the WiFi network is forbidden is that the IP address acquisition fails is detected, the forbidden application of the WiFi network is removed. The problem that the mobile terminal cannot be connected with the forbidden WiFi network in time in the prior art can be solved through the method and the device.

Description

Network connection method, mobile terminal and computer readable storage medium
Technical Field
The present application belongs to the technical field of network applications, and in particular, relates to a network connection method, a mobile terminal, and a computer-readable storage medium.
Background
With the development of network technology, most mobile terminals (e.g., mobile phones, tablet computers, etc.) can access a network by connecting to a Wireless-Fidelity (WiFi) network, for example, the mobile phones perform web browsing or chatting operations under the WiFi network. At present, WiFi networks stored in a mobile terminal may be automatically connected, but if the WiFi networks fail to connect automatically for many times, they are disabled and the prohibition time is fixed, which may easily result in that the mobile terminal cannot connect to the disabled WiFi networks in time.
Therefore, a new technical solution is needed to solve the above technical problems.
Disclosure of Invention
In view of this, the present application provides a network connection method, a mobile terminal and a computer-readable storage medium to solve the problem that the mobile terminal cannot connect to a disabled WiFi network in time in the prior art.
A first aspect of the present application provides a network connection method, including:
detecting whether IP configuration information of a disabled WiFi network is changed;
acquiring a reason why the WiFi network is disabled;
and if the fact that the IP configuration information of the WiFi network is changed and the reason that the WiFi network is forbidden is that the IP address acquisition fails is detected, the forbidden application of the WiFi network is removed.
A second aspect of the present application provides a mobile terminal, characterized in that the mobile terminal includes:
the detection module is used for detecting whether the IP configuration information of the disabled WiFi network changes;
a reason acquisition module, configured to acquire a reason why the WiFi network is disabled;
and the release module is used for releasing the forbidding of the WiFi network if the change of the IP configuration information of the WiFi network is detected and the reason that the WiFi network is forbidden is failure in obtaining the IP address.
A third aspect of the present application provides a mobile terminal comprising a memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the steps of the network connection method according to the first aspect when executing the computer program.
A fourth aspect of the present application provides a computer-readable storage medium storing a computer program which, when executed by a processor, performs the steps of the network connection method as described in the first aspect above.
A fifth aspect of the present application provides a computer program product comprising a computer program which, when executed by one or more processors, performs the steps of the network connection method as described in the first aspect above.
Therefore, according to the scheme of the application, whether the WiFi network forbidden by the mobile terminal exists is detected, when the forbidden WiFi network exists, whether the IP configuration information of the WiFi network is changed is detected, the reason why the WiFi network is forbidden is obtained, and when the fact that the IP configuration information of the WiFi network is changed and the forbidden reason is failure in obtaining the IP address is detected, the mobile terminal can be triggered to remove the forbidden of the WiFi network. According to the scheme, when the fact that the IP configuration information of the forbidden WiFi network is changed and the forbidden IP address is failed to be obtained is detected, the forbidden WiFi network is removed, so that the mobile terminal can be quickly connected with the WiFi network after the mobile terminal detects that the user modifies the wrong IP configuration information into the correct IP configuration information, and the problem that the mobile terminal cannot be connected with the forbidden WiFi network in time in the prior art is solved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
Fig. 1 is a schematic flow chart illustrating an implementation of a network connection method according to an embodiment of the present application;
fig. 2 is a schematic flow chart illustrating an implementation of a network connection method according to a second embodiment of the present application;
fig. 3 is a schematic diagram of a mobile terminal according to a third embodiment of the present application;
fig. 4 is a schematic diagram of a mobile terminal according to a fourth embodiment of the present application;
fig. 5 is a schematic diagram of a mobile terminal according to a fifth embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the present application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in the specification of the present application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
As used in this specification and the appended claims, the term "if" may be interpreted contextually as "when", "upon" or "in response to a determination" or "in response to a detection". Similarly, the phrase "if it is determined" or "if a [ described condition or event ] is detected" may be interpreted contextually to mean "upon determining" or "in response to determining" or "upon detecting [ described condition or event ]" or "in response to detecting [ described condition or event ]".
In particular implementations, the mobile terminals described in embodiments of the present application include, but are not limited to, other portable devices such as mobile phones, laptop computers, or tablet computers having touch sensitive surfaces (e.g., touch screen displays and/or touch pads). It should also be understood that in some embodiments, the device is not a portable communication device, but is a desktop computer having a touch-sensitive surface (e.g., a touch screen display and/or touchpad).
In the discussion that follows, a mobile terminal that includes a display and a touch-sensitive surface is described. However, it should be understood that the mobile terminal may include one or more other physical user interface devices such as a physical keyboard, mouse, and/or joystick.
The mobile terminal supports various applications, such as one or more of the following: a drawing application, a presentation application, a word processing application, a website creation application, a disc burning application, a spreadsheet application, a gaming application, a telephone application, a video conferencing application, an email application, an instant messaging application, an exercise support application, a photo management application, a digital camera application, a web browsing application, a digital music player application, and/or a digital video player application.
Various applications that may be executed on the mobile terminal may use at least one common physical user interface device, such as a touch-sensitive surface. One or more functions of the touch-sensitive surface and corresponding information displayed on the terminal can be adjusted and/or changed between applications and/or within respective applications. In this way, a common physical architecture (e.g., touch-sensitive surface) of the terminal can support various applications with user interfaces that are intuitive and transparent to the user.
It should be understood that, the sequence numbers of the steps in this embodiment do not mean the execution sequence, and the execution sequence of each process should be determined by the function and the inherent logic of the process, and should not constitute any limitation to the implementation process of the embodiment of the present application.
In order to explain the technical solution described in the present application, the following description will be given by way of specific examples.
Referring to fig. 1, which is a schematic view illustrating an implementation flow of a network connection method provided in an embodiment of the present application, where the network connection method is applied to a mobile terminal, and as shown in the figure, the network connection method may include the following steps:
step S101, detecting whether the IP configuration information of the disabled WiFi network changes.
In the embodiment of the application, whether the mobile terminal scans a WiFi network in the current environment is detected, if the WiFi network is scanned, whether the WiFi network forbidden by the mobile terminal exists in the scanned WiFi network is detected, and if the WiFi network forbidden by the mobile terminal exists, whether the network Protocol (IP) configuration information of the forbidden WiFi network is changed is detected; if the WiFi network which is not forbidden by the mobile terminal exists in the scanned WiFi networks, the mobile terminal can automatically connect the WiFi network which is not forbidden; if the WiFi network is not scanned, the subsequent operation is not executed. The detecting whether the mobile terminal scans WiFi networks in the current environment may refer to detecting whether the mobile terminal is in a coverage area of some WiFi networks.
The disabled WiFi network is generally a WiFi network that is already stored in the mobile terminal, and before the WiFi network that is already stored in the mobile terminal is disabled, the mobile terminal may automatically establish a connection with the WiFi network at a preset time interval, but after the WiFi network is disabled, the mobile terminal cannot automatically establish a connection with the WiFi network, and when it is detected that the WiFi network is manually disabled by a user (for example, the user manually establishes a connection between the mobile terminal and the WiFi network), or the disabled time exceeds a preset disabled time threshold, the next automatic connection is performed. The preset disable time threshold may be a time for disabling the WiFi network preset by the user, and may be set by the user according to the need, which is not limited herein.
The detecting whether the IP configuration information of the disabled WiFi network changes may refer to recording the IP configuration information when the mobile terminal is automatically connected to the WiFi network for the last time before the WiFi network is disabled, detecting whether the user modifies the IP configuration information of the WiFi network after the WiFi network is disabled, and determining that the IP configuration information of the WiFi network changes if the user modifies the IP configuration information of the WiFi network; and if the user does not modify the IP configuration information of the WiFi network, determining that the IP configuration information of the WiFi network is not changed.
Optionally, the detecting whether the IP configuration information of the disabled WiFi network changes includes:
detecting whether the disabled WiFi network has a change in the manner of allocating IP addresses, wherein the manner of allocating IP addresses comprises statically allocating IP addresses and allocating IP addresses based on a Dynamic Host Configuration Protocol (DHCP).
In this embodiment of the application, detecting whether the manner in which the disabled WiFi network allocates the IP address changes may be recording a manner in which the WiFi network allocates the IP address when the mobile terminal connects to the WiFi network automatically for the last time before the WiFi network is disabled, detecting whether a user modifies the manner in which the WiFi network allocates the IP address after the WiFi network is disabled, determining that the manner in which the WiFi network allocates the IP address changes if the user modifies the manner in which the WiFi network allocates the IP address, and determining that the manner in which the WiFi network allocates the IP address does not change if the user does not modify the manner in which the IP address is allocated. For example, before the WiFi network is disabled, the mobile terminal automatically allocates an IP address using a Dynamic Host Configuration Protocol (DHCP) when the WiFi network is connected last time, and after the WiFi network is disabled, the user modifies the IP address to use a statically allocated IP address. The static allocation of the IP address may refer to a user manually setting the IP address, and the allocation of the IP address based on the DHCP may refer to an automatic acquisition of the IP address by a DHCP server.
Optionally, the detecting whether the IP configuration information of the disabled WiFi network changes includes:
if the mode of allocating the IP address is static allocation of the IP address and the IP address is not changed, whether the statically allocated IP address is changed or not is detected.
In the embodiment of the application, before the WiFi network is disabled, the method for allocating the IP address when the mobile terminal is automatically connected to the WiFi network for the last time is static allocation of the IP address, the statically allocated IP address is recorded, if the method for allocating the IP address by the WiFi network is not changed after the WiFi network is disabled, that is, the statically allocated IP address is always allocated, it is detected whether the user modifies the statically allocated IP address, and if the user modifies the statically allocated IP address, it is determined that the statically allocated IP address is changed, and if the user does not change the statically allocated IP address, it is determined that the statically allocated IP address is not changed. For example, before the WiFi network is disabled, the statically assigned IP address is 192.168.1.4 when the mobile terminal is automatically connected to the WiFi network for the last time, after the WiFi network is disabled, the user modifies the statically assigned IP address 192.168.1.4 to 192.168.1.5, and then it is determined that the statically assigned IP address changes after the WiFi network is disabled.
In this embodiment of the application, after the mobile terminal starts a function of connecting to the WiFi network (for example, clicking a wireless network icon in a cell phone), if it is detected that a network disabled by the mobile terminal exists in the scanned WiFi networks, it is detected whether IP configuration information of the disabled WiFi network changes. Or when the mobile terminal is connected to another network, the signal strength of the other network is obtained, and when the signal strength of the other network is smaller than a preset signal strength threshold, whether the IP configuration information of the disabled WiFi network changes or not is detected. The Signal Strength includes, but is not limited to, a Received Signal Strength Indication (RSSI) value, and is not limited herein.
And step S102, acquiring the reason why the WiFi network is disabled.
In the implementation of the present application, step S102 may be executed before or after step S101, or steps S101 and S102 may be executed simultaneously, which is not limited herein.
Step S102 is executed before step S101, specifically, when it is detected that there is a WiFi network that is disabled by the mobile terminal, the reason why the WiFi network is disabled is obtained, step S101 may be executed after the reason why the WiFi network is disabled is obtained, or step S101 may be executed when the reason why the WiFi network is disabled is that obtaining the IP address fails, which is not limited herein. Step S102 is executed after step S101, specifically, when it is detected that there is a WiFi network that is disabled by the mobile terminal, it is detected whether IP configuration information of the WiFi network changes, step S102 may be executed after it is detected that IP configuration information of the WiFi network changes, or step S102 may be executed when it is detected that IP configuration information of the WiFi network changes, which is not limited herein. And simultaneously executing the steps S101 and S102, when detecting that the WiFi network forbidden by the mobile terminal exists, detecting whether the IP configuration information of the WiFi network is changed, and acquiring the reason why the WiFi network is forbidden.
Step S103, if the change of the IP configuration information of the WiFi network is detected and the reason that the WiFi network is forbidden is failure in obtaining the IP address, the forbidden of the WiFi network is removed.
In the embodiment of the application, when it is detected that the IP configuration information of the WiFi network prohibited by the mobile terminal is changed and the reason that the WiFi network is prohibited is failure to acquire an IP address, the mobile terminal is triggered to release the prohibition of the WiFi network, that is, the mobile terminal can automatically connect to the WiFi network.
If the step S101 is executed when the reason for disabling the WiFi network is failure to acquire the IP address, the step S103 may specifically be: and if the change of the IP configuration information of the WiFi network is detected, the forbidding of the WiFi network is removed. If step S102 is executed after detecting that the IP configuration information of the disabled WiFi network is changed, step S103 may specifically be: and if the reason that the WiFi network is forbidden is failure in acquiring the IP address, the prohibition of the WiFi network is removed.
In the implementation of the present application, when the IP configuration information of the disabled WiFi network and the reason for disabling the WiFi network do not meet the requirement of step S103, the disabling of the WiFi network may not be released, and the disabling of the WiFi network is automatically released when it is detected that the time for the user to manually control the mobile terminal to connect to the WiFi network or the time for disabling the WiFi network exceeds a preset disabling time threshold.
According to the embodiment of the application, when the fact that the IP configuration information of the forbidden WiFi network is changed and the forbidden IP address is failed to be obtained is detected, the forbidden WiFi network is removed, so that the mobile terminal can be quickly connected with the WiFi network after the mobile terminal detects that the user modifies the wrong IP configuration information into the correct IP configuration information, and the problem that the mobile terminal cannot be connected with the forbidden WiFi network in time in the prior art is solved.
Referring to fig. 2, it is a schematic diagram of an implementation flow of a network connection method provided in the second embodiment of the present application, where the network connection method is applied to a mobile terminal, and as shown in the figure, the network connection method may include the following steps:
step S201, detecting whether the IP configuration information of the disabled WiFi network changes.
The step is the same as step S101, and reference may be made to the related description of step S101, which is not repeated herein.
Step S202, acquiring the reason why the WiFi network is disabled.
The step is the same as step S102, and reference may be made to the related description of step S102, which is not repeated herein.
Step S203, if it is detected that the IP configuration information of the WiFi network changes and the reason why the WiFi network is disabled is that acquiring an IP address fails, the disabling of the WiFi network is released.
The step is the same as step S103, and reference may be made to the related description of step S103, which is not described herein again.
And step S204, if the mobile terminal is connected with other networks, acquiring the signal intensity of the other networks and the signal intensity of the WiFi network.
Wherein the other network refers to a network other than the WiFi network.
Step S205, if the signal strength of the WiFi network is greater than the signal strength of the other network, switching the other network to the WiFi network.
In the embodiment of the application, after the WiFi network is disabled, whether the mobile terminal is connected to another network or not may be detected, if it is detected that the mobile terminal is connected to another network, the signal strength of the other network is obtained to determine the network state of the other network, and the signal strength of the WiFi network that is disabled is obtained to determine the network state of the WiFi network, and if the signal strength of the other network is greater than or equal to the signal strength of the WiFi network, that is, the network state of the WiFi network is not superior to that of the other network, the connection between the mobile terminal and the other network may be maintained, and the WiFi network does not need to be connected; if the signal intensity of other networks is less than that of the WiFi network, namely the network state of the WiFi network is superior to that of the other networks, the other networks can be switched to the WiFi network, namely the mobile terminal is changed from being connected with the other networks to being connected with the WiFi network, so that the mobile terminal is ensured to be connected with the network with the best network state, and the internet access requirement of a user is better met. The parameters for determining whether the mobile terminal is connected to the WiFi network include, but are not limited to, signal strength, and other parameters that can represent a network state are also within the scope of the present application.
Step S206, if the mobile terminal is not connected with other networks, the connection between the mobile terminal and the WiFi network is established.
In the embodiment of the application, when the mobile terminal is not connected with other networks, in order to meet the internet surfing requirement of a user, the connection between the mobile terminal and the disabled WiFi network can be established. The number of the WiFi networks which are released from being forbidden can be one or more, when the number of the WiFi networks which are released from being forbidden is multiple, the signal intensity of the WiFi networks can be obtained, the network with the largest signal intensity in the WiFi networks is used as a target network, and the connection between the mobile terminal and the target network is established.
Including but not limited to data networks and other WiFi networks other than the deactivated WiFi network. The data network may refer to a network provided by an operator to which a Subscriber Identity Module (SIM) card installed in the mobile terminal belongs, for example, a network provided by three operators, such as a General Packet Radio Service (GPRS) network, a third generation mobile communication network (i.e., a 3G network), a fourth generation mobile communication network (i.e., a 4G network), and the like, which are not limited herein.
According to the embodiment of the application, after the disablement of the WiFi network is removed, whether the mobile terminal is connected with other networks or not is detected, and which network the mobile terminal is connected with is determined according to the signal intensity of the network for network access, so that the mobile terminal is ensured to be connected with the network with the best network state, and the internet access requirement of a user is better met.
Referring to fig. 3, a schematic diagram of a mobile terminal provided in the third embodiment of the present application is shown, and for convenience of description, only the parts related to the embodiment of the present application are shown.
The mobile terminal includes:
a detecting module 31, configured to detect whether IP configuration information of a disabled WiFi network changes;
a reason acquiring module 32, configured to acquire a reason why the WiFi network is disabled;
a removing module 33, configured to remove the disabling of the WiFi network if it is detected that the IP configuration information of the WiFi network changes and the reason that the WiFi network is disabled is that the IP address acquisition fails.
Optionally, the detection module 31 includes:
the first detection unit is used for detecting whether the disabled WiFi network has a change in the mode of allocating the IP address, wherein the mode of allocating the IP address comprises statically allocating the IP address and allocating the IP address based on a Dynamic Host Configuration Protocol (DHCP);
and the second detection unit is used for detecting whether the statically allocated IP address is changed or not if the mode of allocating the IP address is that the statically allocated IP address is not changed.
Optionally, the mobile terminal further includes:
a signal strength obtaining module 34, configured to obtain, if the mobile terminal is connected to another network, a signal strength of the other network and a signal strength of the WiFi network, where the other network is a network other than the WiFi network;
a network switching module 35, configured to switch the other network to the WiFi network if the signal strength of the WiFi network is greater than the signal strength of the other network.
Optionally, the mobile terminal further includes:
a connection establishing module 36, configured to establish a connection between the mobile terminal and the WiFi network if the mobile terminal is not connected to another network, where the another network is a network other than the WiFi network.
The mobile terminal provided in the embodiment of the present application may be applied to the first method embodiment and the second method embodiment, and for details, reference is made to the description of the first method embodiment and the second method embodiment, and details are not repeated here.
Fig. 4 is a schematic diagram of a mobile terminal according to a fourth embodiment of the present application. The mobile terminal as shown in the figure may include: one or more processors 401 (only one shown); one or more input devices 402 (only one shown), one or more output devices 403 (only one shown), and memory 404. The processor 401, the input device 402, the output device 403, and the memory 404 are connected by a bus 405. The memory 404 is used for storing instructions and the processor 401 is used for executing the instructions stored by the memory 404. Wherein:
the processor 401 is configured to detect whether IP configuration information of a disabled WiFi network changes; acquiring a reason why the WiFi network is disabled; and if the fact that the IP configuration information of the WiFi network is changed and the reason that the WiFi network is forbidden is that the IP address acquisition fails is detected, the forbidden application of the WiFi network is removed.
Optionally, the processor 401 is specifically configured to detect whether a disabled manner of allocating an IP address by the WiFi network changes, where the manner of allocating an IP address includes statically allocating an IP address and allocating an IP address based on a dynamic host configuration protocol DHCP.
Optionally, the processor 401 is specifically configured to detect whether the statically allocated IP address changes or not if the IP address allocation manner is that the statically allocated IP address is statically allocated and does not change.
Optionally, in the state of removing the disable of the WiFi network, the processor 401 is further configured to obtain, if the mobile terminal is connected to another network, the signal strength of the other network and the signal strength of the WiFi network, where the other network is a network other than the WiFi network; and if the signal intensity of the WiFi network is greater than the signal intensity of the other networks, switching the other networks to the WiFi network.
Optionally, in the state of removing the disable of the WiFi network, the processor 401 is further configured to establish a connection between the mobile terminal and the WiFi network if the mobile terminal is not connected to another network, where the another network is a network other than the WiFi network.
It should be understood that, in the embodiment of the present Application, the Processor 401 may be a Central Processing Unit (CPU), and the Processor may also be other general processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, and the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The input device 402 may include a touch pad, a fingerprint sensor (for collecting fingerprint information of a user and direction information of the fingerprint), a microphone, a data receiving interface, and the like. The output devices 403 may include a display (LCD, etc.), speakers, a data transmission interface, and the like.
The memory 404 may include a read-only memory and a random access memory, and provides instructions and data to the processor 401. A portion of the memory 404 may also include non-volatile random access memory. For example, the memory 404 may also store device type information.
In a specific implementation, the processor 401, the input device 402, the output device 403, and the memory 404 described in this embodiment may execute the implementation described in the embodiment of the network connection method provided in this embodiment, or may execute the implementation described in the mobile terminal described in the third embodiment, which is not described herein again.
Fig. 5 is a schematic diagram of a mobile terminal according to a fifth embodiment of the present application. As shown in fig. 5, the mobile terminal 5 of this embodiment includes: a processor 50, a memory 51 and a computer program 52 stored in said memory 51 and executable on said processor 50. The processor 50, when executing the computer program 52, implements the steps in the above-described embodiments of the network connection method, such as the steps S101 to S103 shown in fig. 1. Alternatively, the processor 50, when executing the computer program 52, implements the functions of the modules/units in the mobile terminal embodiments, such as the modules 31 to 36 shown in fig. 3.
Illustratively, the computer program 52 may be partitioned into one or more modules/units, which are stored in the memory 51 and executed by the processor 50 to accomplish the present application. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution of the computer program 52 in the mobile terminal 5. For example, the computer program 52 may be divided into a detection module, a cause acquisition module, a release module, a signal strength acquisition module, a network switching module, and a connection establishment module, and each module has the following specific functions:
the detection module is used for detecting whether the IP configuration information of the disabled WiFi network changes;
a reason acquisition module, configured to acquire a reason why the WiFi network is disabled;
and the release module is used for releasing the forbidding of the WiFi network if the change of the IP configuration information of the WiFi network is detected and the reason that the WiFi network is forbidden is failure in obtaining the IP address.
Optionally, the detection module includes:
the first detection unit is used for detecting whether the disabled WiFi network has a change in the mode of allocating the IP address, wherein the mode of allocating the IP address comprises statically allocating the IP address and allocating the IP address based on a Dynamic Host Configuration Protocol (DHCP);
and the second detection unit is used for detecting whether the statically allocated IP address is changed or not if the mode of allocating the IP address is that the statically allocated IP address is not changed.
Optionally, the mobile terminal further includes:
the mobile terminal comprises a signal strength acquisition module, a signal strength acquisition module and a signal strength acquisition module, wherein the signal strength acquisition module is used for acquiring the signal strength of other networks and the signal strength of the WiFi network if the mobile terminal is connected with the other networks, and the other networks are networks except the WiFi network;
and the network switching module is used for switching the other networks to the WiFi network if the signal intensity of the WiFi network is greater than the signal intensity of the other networks.
Optionally, the mobile terminal further includes:
and the connection establishing module is used for establishing the connection between the mobile terminal and the WiFi network if the mobile terminal is not connected with other networks, wherein the other networks are networks except the WiFi network.
The mobile terminal 5 may be a desktop computer, a notebook, a palm computer, a cloud server, or other computing devices. The mobile terminal may include, but is not limited to, a processor 50, a memory 51. Those skilled in the art will appreciate that fig. 5 is merely an example of a mobile terminal 5 and does not constitute a limitation of the mobile terminal 5 and may include more or less components than those shown, or some of the components may be combined, or different components, e.g., the mobile terminal may also include input-output devices, network access devices, buses, etc.
The processor 50 may be a central processing unit CPU, but may also be other general purpose processors, digital signal processors DSP, application specific integrated circuits ASIC, off-the-shelf programmable gate arrays FPGA or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 51 may be an internal storage unit of the mobile terminal 5, such as a hard disk or a memory of the mobile terminal 5. The memory 51 may also be an external storage device of the mobile terminal 5, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, provided on the mobile terminal 5. Further, the memory 51 may also include both an internal storage unit and an external storage device of the mobile terminal 5. The memory 51 is used for storing the computer program and other programs and data required by the mobile terminal. The memory 51 may also be used to temporarily store data that has been output or is to be output. It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/terminal device and method may be implemented in other ways. For example, the above-described embodiments of the apparatus/terminal device are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated modules/units, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow in the method of the embodiments described above can be realized by a computer program, which can be stored in a computer-readable storage medium and can realize the steps of the embodiments of the methods described above when the computer program is executed by a processor. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.

Claims (7)

1. A network connection method, characterized in that the network connection method comprises:
detecting whether the IP configuration information of the disabled WiFi network changes, specifically: after the mobile terminal starts a function of connecting a WiFi network, if the fact that a network forbidden by the mobile terminal exists in the scanned WiFi network is detected, whether IP configuration information of the forbidden WiFi network changes or not is detected, or when the mobile terminal is connected with other networks, signal intensity of the other networks is obtained, and when the signal intensity of the other networks is smaller than a preset signal intensity threshold value, whether the IP configuration information of the forbidden WiFi network changes or not is detected;
acquiring a reason why the WiFi network is disabled;
if the change of the IP configuration information of the WiFi network is detected, and the reason that the WiFi network is forbidden is failure in obtaining an IP address, the forbidden of the WiFi network is removed, and the number of the forbidden WiFi networks is one or more;
if the mobile terminal is connected with other networks, acquiring the signal intensity of the other networks and the signal intensity of the WiFi network, wherein the other networks are networks except the WiFi network; if the signal intensity of the WiFi network is greater than the signal intensity of the other networks, switching the other networks to the WiFi network;
if the mobile terminal is not connected with other networks, establishing the connection between the mobile terminal and the WiFi networks, specifically, when the number of the WiFi networks which are forbidden to be released is multiple, acquiring the signal intensity of the multiple WiFi networks, taking the network with the maximum signal intensity in the multiple WiFi networks as a target network, and establishing the connection between the mobile terminal and the target network.
2. The network connection method of claim 1, wherein the detecting whether the IP configuration information of the WiFi network that is disabled has changed comprises:
detecting whether the disabled WiFi network has a change in the manner of allocating IP addresses, wherein the manner of allocating IP addresses comprises statically allocating IP addresses and allocating IP addresses based on a Dynamic Host Configuration Protocol (DHCP).
3. The network connection method of claim 2, wherein the detecting whether the IP configuration information of the WiFi network that is disabled has changed comprises:
if the mode of allocating the IP address is static allocation of the IP address and the IP address is not changed, whether the statically allocated IP address is changed or not is detected.
4. A mobile terminal, characterized in that the mobile terminal comprises:
a detection module, configured to detect whether IP configuration information of a disabled WiFi network changes, specifically: after the mobile terminal starts a function of connecting a WiFi network, if the fact that a network forbidden by the mobile terminal exists in the scanned WiFi network is detected, whether IP configuration information of the forbidden WiFi network changes or not is detected, or when the mobile terminal is connected with other networks, signal intensity of the other networks is obtained, and when the signal intensity of the other networks is smaller than a preset signal intensity threshold value, whether the IP configuration information of the forbidden WiFi network changes or not is detected;
a reason acquisition module, configured to acquire a reason why the WiFi network is disabled;
the release module is used for releasing the forbidding of the WiFi network if the IP configuration information of the WiFi network is detected to be changed and the reason that the WiFi network is forbidden is that the IP address acquisition fails, and the number of the forbidden WiFi networks is one or more;
the mobile terminal comprises a signal strength acquisition module, a signal strength acquisition module and a signal strength acquisition module, wherein the signal strength acquisition module is used for acquiring the signal strength of other networks and the signal strength of the WiFi network if the mobile terminal is connected with the other networks, and the other networks are networks except the WiFi network;
the network switching module is used for switching the other networks to the WiFi network if the signal intensity of the WiFi network is greater than the signal intensity of the other networks; or
The connection establishing module is configured to establish a connection between the mobile terminal and the WiFi networks if the mobile terminal is not connected to another network, specifically, when the number of the WiFi networks which are disabled is multiple, obtain signal strengths of the multiple WiFi networks, use a network with the largest signal strength among the multiple WiFi networks as a target network, and establish a connection between the mobile terminal and the target network.
5. The mobile terminal of claim 4, wherein the detection module comprises:
the first detection unit is used for detecting whether the disabled WiFi network has a change in the mode of allocating the IP address, wherein the mode of allocating the IP address comprises statically allocating the IP address and allocating the IP address based on a Dynamic Host Configuration Protocol (DHCP);
and the second detection unit is used for detecting whether the statically allocated IP address is changed or not if the mode of allocating the IP address is that the statically allocated IP address is not changed.
6. A mobile terminal comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the network connection method according to any of claims 1 to 3 when executing the computer program.
7. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the network connection method according to any one of claims 1 to 3.
CN201711206035.0A 2017-11-27 2017-11-27 Network connection method, mobile terminal and computer readable storage medium Active CN108012308B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711206035.0A CN108012308B (en) 2017-11-27 2017-11-27 Network connection method, mobile terminal and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711206035.0A CN108012308B (en) 2017-11-27 2017-11-27 Network connection method, mobile terminal and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN108012308A CN108012308A (en) 2018-05-08
CN108012308B true CN108012308B (en) 2020-03-17

Family

ID=62053787

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711206035.0A Active CN108012308B (en) 2017-11-27 2017-11-27 Network connection method, mobile terminal and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN108012308B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106851780A (en) * 2016-12-07 2017-06-13 广东欧珀移动通信有限公司 The method and terminal of a kind of network connection

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20130120709A (en) * 2012-04-26 2013-11-05 삼성전자주식회사 Method for managing information for network connection and an electronic device thereof
CN103874114B (en) * 2014-03-19 2018-06-12 新华三技术有限公司 A kind of AP fault handling methods, AP equipment and AC equipment
CN103997768B (en) * 2014-05-16 2018-01-16 广东欧珀移动通信有限公司 A kind of method and device for preventing from accessing invalid Wi Fi focuses
CN106301847B (en) * 2015-06-01 2020-01-17 中兴通讯股份有限公司 Access point interface configuration recovery method and device and home gateway
CN106603334B (en) * 2016-12-14 2019-10-18 北京启明星辰信息安全技术有限公司 A kind of IP address monitoring method and device

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106851780A (en) * 2016-12-07 2017-06-13 广东欧珀移动通信有限公司 The method and terminal of a kind of network connection

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
《手机无法连接wifi:正在获取IP地址》;晴空;《搜狗指南:https://zhinan.sogou.com/guide/detail/?id=1610011157》;20160723;第1-7页 *

Also Published As

Publication number Publication date
CN108012308A (en) 2018-05-08

Similar Documents

Publication Publication Date Title
CN108900770B (en) Method and device for controlling rotation of camera, smart watch and mobile terminal
US20190034443A1 (en) Data Processing Method and Device
CN108880700B (en) Frequency hopping method and frequency hopping device of clock signal and mobile terminal
CN107145386B (en) Data migration method, terminal device and computer readable storage medium
CN107368735B (en) Application installation method, mobile terminal and computer readable storage medium
WO2015030460A1 (en) Method, apparatus, and recording medium for interworking with external terminal
CN108270757B (en) User account switching method, device, client and system
US10419608B2 (en) Call forwarding method, terminal, and portable electronic device
CN107317928B (en) Information processing method, mobile terminal and computer readable storage medium
CN109358927B (en) Application program display method and device and terminal equipment
CN107045610B (en) Data migration method, terminal device and computer readable storage medium
CN114218560A (en) Resource access method, device, electronic equipment and storage medium
CN110245016B (en) Data processing method, system, device and terminal equipment
CN109271266B (en) File transmission method and device and terminal equipment
CN110874729B (en) Switching method and switching device for electronic red packet identification strategy and mobile terminal
CN107995645A (en) Method for connecting network, mobile terminal and computer-readable recording medium
CN108536512B (en) Interface switching method and device and terminal equipment
CN108012308B (en) Network connection method, mobile terminal and computer readable storage medium
CN108521460B (en) Information pushing method and device, mobile terminal and computer readable storage medium
CN107969012B (en) Network access method, mobile terminal and computer readable storage medium
CN108391281B (en) Bridging method of wireless network, terminal equipment and storage medium
CN107316197B (en) Payment protection method, mobile terminal and computer readable storage medium
CN107889193B (en) Network connection method, mobile terminal and computer readable storage medium
CN110162479B (en) Abnormal application detection method and device and terminal equipment
CN113852962A (en) Network connection control method, device, storage medium and software program product

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
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: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP., Ltd.

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

Applicant before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP., Ltd.

GR01 Patent grant
GR01 Patent grant