CN107484190B - Method for connecting network, mobile terminal and computer readable storage medium - Google Patents

Method for connecting network, mobile terminal and computer readable storage medium Download PDF

Info

Publication number
CN107484190B
CN107484190B CN201710667137.6A CN201710667137A CN107484190B CN 107484190 B CN107484190 B CN 107484190B CN 201710667137 A CN201710667137 A CN 201710667137A CN 107484190 B CN107484190 B CN 107484190B
Authority
CN
China
Prior art keywords
network
wlan
mobile terminal
data network
quality score
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
CN201710667137.6A
Other languages
Chinese (zh)
Other versions
CN107484190A (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 CN201710667137.6A priority Critical patent/CN107484190B/en
Publication of CN107484190A publication Critical patent/CN107484190A/en
Application granted granted Critical
Publication of CN107484190B publication Critical patent/CN107484190B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/02Arrangements for optimising operational condition
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/18Selecting a network or a communication service
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W88/00Devices specially adapted for wireless communication networks, e.g. terminals, base stations or access point devices
    • H04W88/02Terminal devices
    • H04W88/06Terminal devices adapted for operation in multiple networks or having at least two operational modes, e.g. multi-mode terminals

Landscapes

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

Abstract

The present invention is suitable for field of communication technology, provide a kind of method for connecting network, mobile terminal and computer readable storage medium, this method comprises: detecting the WLAN when mobile terminal connects WLAN WLAN and data network and whether the data network can be carried out network access;If the WLAN and the data network can be carried out network access, the network quality score of the WLAN and the data network is obtained respectively;According to the network quality score of the network quality score of the WLAN and the data network, used network when the mobile terminal carries out network access is determined.It can solve the problem of that the prior art can not connect WLAN and data network simultaneously and the selection of flexibility carries out network access using which kind of network through the invention.

Description

Method for connecting network, mobile terminal and computer readable storage medium
Technical field
The invention belongs to field of communication technology more particularly to a kind of method for connecting network, mobile terminal and computer-readable Storage medium.
Background technique
With the development of communication technology, most of mobile terminal (such as mobile phone, tablet computer etc.) can pass through company It connects WLAN (Wireless Local Area Networks, WLAN) or data network carries out network access, such as Mobile phone carries out the operation such as web page browsing or chat at connection WLAN or data network.However, in the prior art can not be same When connection WLAN and data network, and the selection of flexibility carries out network access using which kind of network.
Therefore it's necessary to propose a new technical scheme, to solve the above technical problems.
Summary of the invention
In view of this, the embodiment of the invention provides a kind of method for connecting network, mobile terminal and computer-readable storages Medium can not connect WLAN and data network to solve the prior art simultaneously, and the selection of flexibility is carried out using which kind of network The problem of network accesses.
The first aspect of the embodiment of the present invention provides a kind of method for connecting network, and the method for connecting network includes:
When mobile terminal connects WLAN WLAN and data network, detects the WLAN and the data network is It is no to can be carried out network access;
If the WLAN and the data network can be carried out network access, the WLAN and the data are obtained respectively The network quality score of network;
According to the network quality score of the network quality score of the WLAN and the data network, determine described mobile whole End carries out used network when network access.
The second aspect of the embodiment of the present invention provides a kind of mobile terminal, and the mobile terminal includes:
Detection module, for connecting WLAN WLAN in mobile terminal and when data network, detect the WLAN and Whether the data network can be carried out network access;
Module is obtained, if can be carried out network access for the WLAN and the data network, respectively described in acquisition The network quality score of WLAN and the data network;
Determining module, for according to the network quality score of the WLAN and the network quality score of the data network, Determine used network when the mobile terminal carries out network access.
The third aspect of the embodiment of the present invention provides a kind of mobile terminal, including memory, processor and is stored in In the memory and the computer program that can run on the processor, when the processor executes the computer program It realizes as described in above-mentioned first aspect the step of method for connecting network.
The fourth aspect of the embodiment of the present invention provides a kind of computer readable storage medium, the computer-readable storage Media storage has computer program, realizes that network connects as described in above-mentioned first aspect when the computer program is executed by processor The step of connecing method.
Existing beneficial effect is the embodiment of the present invention compared with prior art: the embodiment of the present invention mobile terminal simultaneously When connecting WLAN WLAN and data network, detects the WLAN and whether the data network can be carried out network access, And when the WLAN and the data network can be carried out network access, the WLAN and the data network are obtained respectively Network quality score, according to the network quality score of the network quality score of the WLAN and the data network, determine described in Mobile terminal carries out used network when network access.The embodiment of the present invention connects WLAN and data network in mobile terminal simultaneously When network, it can be connected according to the network quality score of WLAN and the network quality score of data network from mobile terminal The preferable network of network quality is selected to carry out network access in WLAN and data network, it can not be simultaneously so as to solve the prior art WLAN and data network are connected, and the problem of the selection of flexibility carries out network access using which kind of network.
Detailed description of the invention
It to describe the technical solutions in the embodiments of the present invention more clearly, below will be to embodiment or description of the prior art Needed in attached drawing be briefly described, it should be apparent that, the accompanying drawings in the following description is only of the invention some Embodiment for those of ordinary skill in the art without any creative labor, can also be according to these Attached drawing obtains other attached drawings.
Fig. 1 is the implementation process schematic diagram for the method for connecting network that the embodiment of the present invention one provides;
Fig. 2 is the implementation process schematic diagram of method for connecting network provided by Embodiment 2 of the present invention;
Fig. 3 is the schematic diagram for the mobile terminal that the embodiment of the present invention three provides;
Fig. 4 is the schematic diagram for the mobile terminal that the embodiment of the present invention four provides;
Fig. 5 is the schematic diagram for the mobile terminal that the embodiment of the present invention five provides.
Specific embodiment
In being described below, for illustration and not for limitation, the tool of such as particular system structure, technology etc is proposed Body details, to understand thoroughly the embodiment of the present invention.However, it will be clear to one skilled in the art that there is no these specific The present invention also may be implemented in the other embodiments of details.In other situations, it omits to well-known system, device, electricity The detailed description of road and method, in case unnecessary details interferes description of the invention.
It should be appreciated that ought use in this specification and in the appended claims, term " includes " instruction is described special Sign, entirety, step, operation, the presence of element and/or component, but be not precluded one or more of the other feature, entirety, step, Operation, the presence or addition of element, component and/or its set.
It is also understood that mesh of the term used in this description of the invention merely for the sake of description specific embodiment And be not intended to limit the present invention.As description of the invention and it is used in the attached claims, unless on Other situations are hereafter clearly indicated, otherwise " one " of singular, "one" and "the" are intended to include plural form.
It will be further appreciated that the term "and/or" used in description of the invention and the appended claims is Refer to any combination and all possible combinations of one or more of associated item listed, and including these combinations.
As used in this specification and in the appended claims, term " if " can be according to context quilt Be construed to " when ... " or " once " or " in response to determination " or " in response to detecting ".Similarly, phrase " if it is determined that " or " if detecting [described condition or event] " can be interpreted to mean according to context " once it is determined that " or " in response to true It is fixed " or " once detecting [described condition or event] " or " in response to detecting [described condition or event] ".
In the specific implementation, mobile terminal described in the embodiment of the present invention is including but not limited to such as with the sensitive table of touch Mobile phone, laptop computer or the tablet computer in face (for example, touch-screen display and/or touch tablet) etc it is other Portable device.It is to be further understood that in certain embodiments, the equipment is not portable communication device, but is had The desktop computer of touch sensitive surface (for example, touch-screen display and/or touch tablet).
In following discussion, the mobile terminal including display and touch sensitive surface is described.However, should manage Solution, mobile terminal may include that one or more of the other physical User of such as physical keyboard, mouse and/or control-rod connects Jaws equipment.
Mobile terminal supports various application programs, such as one of the following or multiple: drawing application program, demonstration application Program, word-processing application, website creation application program, disk imprinting application program, spreadsheet applications, game are answered With program, telephony application, videoconference application, email application, instant messaging applications, forging Refining supports application program, photo management application program, digital camera application program, digital camera application program, web-browsing to answer With program, digital music player application and/or video frequency player application program.
At least one of such as touch sensitive surface can be used in the various application programs that can be executed on mobile terminals Public physical user-interface device.It can be adjusted among applications and/or in corresponding application programs and/or change touch is quick Feel the corresponding information shown in the one or more functions and terminal on surface.In this way, terminal public physical structure (for example, Touch sensitive surface) it can support the various application programs with user interface intuitive and transparent for a user.
It should be understood that the size of the serial number of each step is not meant that the order of the execution order in the present embodiment, each process Execution sequence should be determined by its function and internal logic, and the implementation process of the embodiments of the invention shall not be constituted with any limitation.
In order to illustrate technical solutions according to the invention, the following is a description of specific embodiments.
It is the implementation process schematic diagram for the method for connecting network that the embodiment of the present invention one provides, the network connection referring to Fig. 1 Method is applied to mobile terminal, and the method for connecting network as shown in the figure may comprise steps of:
Step S101, connects WLAN WLAN in mobile terminal and when data network, detects the WLAN and described Whether data network can be carried out network access.
In embodiments of the present invention, the current connected network of detection mobile terminal, when detecting that the mobile terminal is same When connection WLAN and when data network of network, detect the WLAN and whether the data network can be carried out network access and (be It is no to surf the Internet).Specifically, can be mobile terminal described in when whether the detection WLAN can be carried out network access WLAN attempts to connect pre-set server (such as sending solicited message to the server), if receiving within a preset time The response message of the server feedback, it is determined that the WLAN can be carried out network access;If not receiving this within a preset time The response message of server feedback, it is determined that the WLAN not can be carried out network access.Whether can detecting the data network When carrying out network access, can be mobile terminal by the data network attempt to connect pre-set server (such as to The server sends solicited message), if receiving the response message of the server feedback within a preset time, it is determined that the number It can be carried out network access according to network;If not receiving the response message of the server feedback within a preset time, it is determined that described Data network not can be carried out network access.
In embodiments of the present invention, it is usually provided in the terminal and opens the switch of WLAN and opening for data network It closes, the mobile terminal can be determined described mobile whole by detecting the switch state of WLAN and the switch state of data network Holding current connected network is WLAN or data network.Specifically, being open state in the switch state for detecting WLAN When, determine that the current connected network of the mobile terminal is WLAN, in the switch state closed state for detecting WLAN, really The fixed mobile terminal current time is not connected with WLAN;When the switch state for detecting data network is open state, determine The current connected network of the mobile terminal is data network, is in off state in the switch state for detecting data network When, determine the mobile terminal current time unconnected data network.It should be noted that in the switch state for detecting WLAN When being open state with the switch state of data network, the prior art be usually preset network access privileges, such as Since the use of data network needs to pay corresponding expense, then in order to save cost, the priority that WLAN can be set is higher than Data network, then when the switch state of the switch state and data network that detect WLAN is open state, described in control Mobile terminal connects WLAN, and disconnects the connection with data network.And the embodiment of the present invention is in order to realize that the mobile terminal is same When connection WLAN and data network, be open state in the switch state of the switch state and data network that detect WLAN When, and do not turn off the connection of the mobile terminal and data network.
Wherein, the data network refers to the subscriber identification card (Subscriber that the mobile terminal is installed Identification Module, SIM card) belonging to operator provided by network, such as three big operator's connection, movement, The logical network provided of telecommunications, such as general packet radio service technology (General Packet Radio Service, GPRS) Network, 3 G mobile communication network (i.e. 3G network), forth generation mobile communications network (i.e. 4G network) etc., do not limit herein It is fixed.The WLAN includes but is not limited to Wireless Fidelity (Wireless Fidelity, WiFi) network.
Step S102 obtains the WLAN if the WLAN and the data network can be carried out network access respectively With the network quality score of the data network.
In embodiments of the present invention, if the WLAN and the data network that the mobile terminal is connected can be into The access of row network can then obtain the network quality point of the WLAN and the data network respectively by pre-set algorithm Number.Wherein, the pre-set algorithm is the intensity instruction for obtaining the reception signal of the mobile terminal connected network (Received Signal Strength Indication, RSSI) value, network delay and history network speed, by acquired three The weight of a parameter carries out the cumulative network quality score for obtaining the mobile terminal connected network.For example, described in the acquisition When the network quality score of WLAN, RSSI value, network delay and the history network speed of the WLAN are obtained, and is joined according to above three Corresponding weight is arranged in several values, the weight of above three parameter is added up, and using accumulated value as the WLAN's Network quality score.It can determine whether the mobile terminal according to the network quality score of the current connected WLAN of the mobile terminal The network quality of current connected WLAN is good or poor;According to the net of the current connected data network of the mobile terminal Network mass fraction can determine whether that the network quality of the current connected data network of the mobile terminal is good or poor.
In embodiments of the present invention, if only one net in the current connected WLAN and data network of the mobile terminal Network can be carried out network access, then controls the mobile terminal using the network that can be carried out network access and carry out network access, no The network that can be carried out network access still keeps connecting with the mobile terminal.For example, if detecting, WLAN can be carried out network access, Data network not can be carried out network access, then control mobile terminal using WLAN carry out network access, but data network still with shifting Dynamic terminal keeps connection, thus realize when data network also can be carried out network access and network quality better than WLAN, it can be fast Speed control mobile terminal switches to data network and carries out network access, the i.e. company without resettling data network and mobile terminal It connects, improves network switching speed.If the current connected WLAN of the mobile terminal and data network not can be carried out network Access can then issue the user with the current connected WLAN of the mobile terminal and data network and not can be carried out network access Prompt information.
Step S103 is determined according to the network quality score of the network quality score of the WLAN and the data network The mobile terminal carries out used network when network access.
It in embodiments of the present invention, can be according to the WLAN when mobile terminal connects WLAN and data network simultaneously Network quality score and the network quality score of the data network judge that the network quality of which network is more preferable, to control The mobile terminal carries out network access using the preferable network of network quality, when still keeping the mobile terminal and do not carry out net Connection between the network of network access, when the network so as to not carry out network access using this subsequent carries out network access, Network switching speed is improved, because can avoid the connection for establishing the network and mobile terminal that do not carry out network access again.Example Such as, when the network quality score of the WLAN connected in mobile terminal is less than the network quality score of data network, illustrate to move The network quality for the data network that terminal is connected is preferable, can control mobile terminal and connected data network is used to carry out net Network access, but the mobile terminal still keeps connecting with the WLAN, in order to improve the subsequent mobile terminal by the number According to network switching to the speed of the WLAN.It is greater than or equal to data in the network quality score for the WLAN that mobile terminal is connected When the network quality score of network, illustrates that the network quality for the WLAN that mobile terminal is connected is preferable, can control mobile terminal Connected WLAN is used to carry out network access, but the mobile terminal still keeps connecting with the data network, in order to mention The high subsequent mobile terminal is switched to the speed of the data network by the WLAN.It should be noted that mobile terminal can Multiple data networks (such as two SIM cards are installed in mobile phone) can be connected, it, can be with when mobile terminal connects multiple data networks Acquisition judges whether multiple data networks can be carried out network access, and there are at least two data networks in multiple data networks When can be carried out network access, the network quality score of at least two data network is obtained, and select network quality score most Big data network, according to the network quality score of the network score of the maximum data network of network quality score and WLAN, Determine used network when mobile terminal carries out network access.
The embodiment of the present invention, can be according to the network quality of WLAN when mobile terminal connects WLAN and data network simultaneously The network quality score of score and data network, from the WLAN and data network that mobile terminal is connected select network quality compared with Good network carries out network access, can not connect WLAN and data network simultaneously so as to solve the prior art, and flexibility The problem of selection carries out network access using which kind of network.
It referring to fig. 2, is the implementation process schematic diagram of method for connecting network provided by Embodiment 2 of the present invention, the network connection Method is applied to mobile terminal, and the method for connecting network as shown in the figure may comprise steps of:
Step S201, connects WLAN WLAN in mobile terminal and when data network, detects the WLAN and described Whether data network can be carried out network access.
The step is identical as step S101, and for details, reference can be made to the associated descriptions of step S101, and details are not described herein.
Step S202 obtains the WLAN if the WLAN and the data network can be carried out network access respectively With the network quality score of the data network.
The step is identical as step S102, and for details, reference can be made to the associated descriptions of step S102, and details are not described herein.
Step S203, if the network quality score of the WLAN is greater than the first preset threshold or the network matter of the WLAN It measures score and is less than or equal to the second default threshold less than or equal to the network quality score of the first preset threshold and the data network Value then controls the mobile terminal using the WLAN and carries out network access.
Wherein, the first preset threshold is less than or equal to the second preset threshold.
In embodiments of the present invention, the network quality score of the current connected WLAN of the mobile terminal and first is pre- If threshold value is compared, if the network quality score of the current connected WLAN of the mobile terminal is greater than the first preset threshold, Then determine that the network quality of the current connected WLAN of the mobile terminal is preferable, can control the mobile terminal use should WLAN carries out network access;If it is pre- that the network quality score of the current connected WLAN of the mobile terminal is less than or equal to first If threshold value, and the network quality score of the current connected data network of the mobile terminal is less than or equal to the second default threshold Value, it is determined that the network quality of the current connected WLAN of the mobile terminal and data network is poor, due to data network Need to pay corresponding expense, therefore in order to save the cost of access network, can control the mobile terminal using WLAN into The access of row network.
Optionally, the method for connecting network further include:
When the mobile terminal using the WLAN carry out network access when, control the mobile terminal from the background still with institute It states data network and keeps connection.
In embodiments of the present invention, when the mobile terminal uses connected WLAN to carry out network access, the shifting Dynamic terminal keeps connection in the link for the data network still being connect from the background with the mobile terminal, and according to prefixed time interval Step S201 and S202 are executed, when detecting S204, the mobile terminal is controlled and is rapidly switched to the data network progress Network access, that is, can avoid resettling the mobile terminal when mobile terminal switches to the data network by the WLAN With the connection of the data network, network switching speed is improved.
Step S204, if the network quality score of the WLAN is less than or equal to the first preset threshold, and the data network The network quality score of network is greater than the second preset threshold, then controls the mobile terminal using the data network and carry out network visit It asks.
In embodiments of the present invention, the network quality score of the current connected WLAN of the mobile terminal and first is pre- If threshold value is compared, if to be less than or equal to first default for the network quality score of the current connected WLAN of the mobile terminal Threshold value, and when the network quality score of the current connected data network of the mobile terminal is greater than the second preset threshold, can be with It controls the mobile terminal and carries out network access using the data network.
Optionally, the method for connecting network further include:
When the mobile terminal carries out network access using the data network, the mobile terminal is controlled from the background still It keeps connecting with the WLAN.
In embodiments of the present invention, when the mobile terminal uses connected data network to carry out network access, control The link that the mobile terminal is made in the WLAN still being connect from the background with the mobile terminal keeps connection, and according to preset time Interval executes step S201 and S202, when detecting S203, controls the mobile terminal and is rapidly switched to the WLAN progress Network access, that is, can avoid resettling the mobile terminal when mobile terminal switches to the WLAN by the data network With the connection of the WLAN, network switching speed is improved.
The embodiment of the present invention, can be according to the network quality of WLAN when mobile terminal connects WLAN and data network simultaneously The network quality score of score and data network, from the WLAN and data network that mobile terminal is connected select network quality compared with Good network carries out network access, can not connect WLAN and data network simultaneously so as to solve the prior art, and flexibility The problem of selection carries out network access using which kind of network.
It is that the schematic diagram for the mobile terminal that the embodiment of the present invention three provides illustrates only for ease of description referring to Fig. 3 Part related to the embodiment of the present invention.
The mobile terminal includes:
Detection module 31, for detecting the WLAN when mobile terminal connects WLAN WLAN and data network Whether can be carried out network access with the data network;
Module 32 is obtained, if can be carried out network access for the WLAN and the data network, obtains institute respectively State the network quality score of WLA and the data network;
Determining module 33, for according to the network quality score of the WLAN and the network quality point of the data network Number determines used network when the mobile terminal carries out network access.
Optionally, the determining module 33 is specifically used for:
If the network quality score of the WLAN is greater than the first preset threshold or the network quality score of the WLAN is less than Or be less than or equal to the second preset threshold equal to the network quality score of the first preset threshold and the data network, then control institute It states mobile terminal and carries out network access using the WLAN, wherein the first preset threshold is less than or equal to the second preset threshold.
Optionally, the mobile terminal further include:
First keeps module 34, is used for when the mobile terminal carries out network access using the WLAN, described in control Mobile terminal still is keeping connecting with the data network from the background.
Optionally, the determining module 33 is specifically used for:
If the network quality score of the WLAN is less than or equal to the first preset threshold, and the network matter of the data network It measures score and is greater than the second preset threshold, then control the mobile terminal using the data network and carry out network access, wherein the One preset threshold is less than or equal to the second preset threshold;
Optionally, the mobile terminal further include:
Second keeps module 35, for controlling when the mobile terminal carries out network access using the data network The mobile terminal still is keeping connecting with the WLAN from the background.
The embodiment of the present invention, can be according to the network quality of WLAN when mobile terminal connects WLAN and data network simultaneously The network quality score of score and data network, from the WLAN and data network that mobile terminal is connected select network quality compared with Good network carries out network access, can not connect WLAN and data network simultaneously so as to solve the prior art, and flexibility The problem of selection carries out network access using which kind of network.
Fig. 4 is the schematic diagram for the mobile terminal that the embodiment of the present invention four provides.The mobile terminal as shown in the figure can wrap Include: one or more processors 401 (only show one) in figure;One or more input equipments 402 (one is only shown in figure), One or more output equipments 403 (one is only shown in figure) and memory 404.It is above-mentioned processor 401, input equipment 402, defeated Equipment 403 and memory 404 are connected by bus 405 out.Memory 404 for storing instruction, deposit for executing by processor 401 The instruction that reservoir 404 stores.Wherein:
The processor 401 is used for when mobile terminal connects WLAN WLAN and data network, described in detection Whether WLAN and the data network can be carried out network access;If the WLAN and the data network can be carried out network visit It asks, then obtains the network quality score of the WLAN and the data network respectively by the input equipment 402;According to described The network quality score of WLAN and the network quality score of the data network, when determining that the mobile terminal carries out network access Used network.
Optionally, the processor 401, if the network quality score specifically for the WLAN is greater than the first default threshold The network quality score of value or the WLAN are less than or equal to the network quality score of the first preset threshold and the data network Less than or equal to the second preset threshold, then the mobile terminal is controlled using the WLAN and carries out network access, wherein first is pre- If threshold value is less than or equal to the second preset threshold.
Optionally, the processor 401 is also used to when the mobile terminal carries out network access using the WLAN, The mobile terminal is controlled still to keep connecting with the data network from the background.
Optionally, the processor 401, if the network quality score specifically for the WLAN is less than or equal to first in advance If threshold value, and the network quality score of the data network is greater than the second preset threshold, then controls the mobile terminal and use institute It states data network and carries out network access, wherein the first preset threshold is less than or equal to the second preset threshold.
Optionally, the processor 401 is also used to carry out network access using the data network when the mobile terminal When, it controls the mobile terminal and still is keeping connecting with the WLAN from the background.
The memory 404, for storing software program and module.The processor 401 is stored in institute by operation The software program and module of memory 404 are stated, thereby executing various function application and data processing, according to the WLAN Network quality score and the data network network quality score, determining is made when the mobile terminal carries out network access Network.
It should be appreciated that in embodiments of the present invention, the processor 401 can be central processing unit (Central Processing Unit, CPU), which can also be other general processors, digital signal processor (Digital Signal Processor, DSP), specific integrated circuit (Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic Device, discrete gate or transistor logic, discrete hardware components etc..General processor can be microprocessor or this at Reason device is also possible to any conventional processor etc..
Input equipment 402 may include that Trackpad, fingerprint adopt sensor (for acquiring the finger print information and fingerprint of user Directional information), microphone, data receiver interface etc..Output equipment 403 may include display (LCD etc.), loudspeaker, data Transmission interface etc..
The memory 404 may include read-only memory and random access memory, and to processor 401 provide instruction and Data.The a part of of memory 404 can also include nonvolatile RAM.For example, memory 404 can also be deposited Store up the information of device type.
In the specific implementation, processor 401 described in the embodiment of the present invention, input equipment 402,403 and of output equipment Implementation described in the embodiment of method for connecting network provided in an embodiment of the present invention can be performed in memory 404, can also Implementation described in mobile terminal described in embodiment three is executed, details are not described herein.
Fig. 5 is the schematic diagram for the mobile terminal that the embodiment of the present invention five provides.As shown in figure 5, the mobile end of the embodiment End 5 includes: processor 50, memory 51 and is stored in the meter that can be run in the memory 51 and on the processor 50 Calculation machine program 52.The processor 50 is realized when executing the computer program 52 in above-mentioned each information processing method embodiment The step of, such as step S101 to S103 shown in FIG. 1.Alternatively, reality when the processor 50 executes the computer program 52 The function of each module/unit in existing above-mentioned each Installation practice, such as the function of module 31 to 35 shown in Fig. 3.
Illustratively, the computer program 52 can be divided into one or more module/units, it is one or Multiple module/units are stored in the memory 51, and are executed by the processor 50, to complete the present invention.Described one A or multiple module/units can be the series of computation machine program instruction section that can complete specific function, which is used for Implementation procedure of the computer program 52 in the mobile terminal 5 is described.For example, the computer program 52 can be divided It is cut into detection module, obtains module, determining module, the first holding module and the second holding module, each module concrete function is such as Under:
Detection module, for connecting WLAN WLAN in mobile terminal and when data network, detect the WLAN and Whether the data network can be carried out network access;
Module is obtained, if can be carried out network access for the WLAN and the data network, respectively described in acquisition The network quality score of WLAN and the data network;
Determining module, for according to the network quality score of the WLAN and the network quality score of the data network, Determine used network when the mobile terminal carries out network access.
Optionally, the determining module is specifically used for:
If the network quality score of the WLAN is greater than the first preset threshold or the network quality score of the WLAN is less than Or be less than or equal to the second preset threshold equal to the network quality score of the first preset threshold and the data network, then control institute It states mobile terminal and carries out network access using the WLAN, wherein the first preset threshold is less than or equal to the second preset threshold.
Optionally, the mobile terminal further include:
First keeps module, for controlling the shifting when the mobile terminal carries out network access using the WLAN Dynamic terminal still is keeping connecting with the data network from the background.
Optionally, the determining module is specifically used for:
If the network quality score of the WLAN is less than or equal to the first preset threshold, and the network matter of the data network It measures score and is greater than the second preset threshold, then control the mobile terminal using the data network and carry out network access, wherein the One preset threshold is less than or equal to the second preset threshold;
Optionally, the mobile terminal further include:
Second keeps module, for controlling institute when the mobile terminal carries out network access using the data network Mobile terminal is stated still to keep connecting with the WLAN from the background.
The mobile terminal 5 can be the calculating such as desktop PC, notebook, palm PC and cloud server and set It is standby.The mobile terminal may include, but be not limited only to, processor 50, memory 51.It will be understood by those skilled in the art that Fig. 5 The only example of mobile terminal 5 does not constitute the restriction to mobile terminal 5, may include than illustrating more or fewer portions Part perhaps combines certain components or different components, such as the mobile terminal can also include input-output equipment, net Network access device, bus etc..
Alleged processor 50 can be central processing unit CPU, can also be other general processors, Digital Signal Processing Device DSP, application-specific integrated circuit ASIC, ready-made programmable gate array FPGA or other programmable logic device, discrete gate or Transistor logic, discrete hardware components etc..General processor can be microprocessor or the processor is also possible to appoint What conventional processor etc..
The memory 51 can be the internal storage unit of the mobile terminal 5, such as the hard disk or interior of mobile terminal 5 It deposits.The memory 51 is also possible to the External memory equipment of the mobile terminal 5, such as be equipped on the mobile terminal 5 Plug-in type hard disk, intelligent memory card (Smart Media Card, SMC), secure digital (Secure Digital, SD) card dodge Deposit card (Flash Card) etc..Further, the memory 51 can also both include the storage inside list of the mobile terminal 5 Member also includes External memory equipment.The memory 51 is for storing needed for the computer program and the mobile terminal Other programs and data.The memory 51 can be also used for temporarily storing the data that has exported or will export.Institute The technical staff in category field can be understood that, for convenience of description and succinctly, only with above-mentioned each functional unit, module Division progress for example, in practical application, can according to need and by above-mentioned function distribution by different functional units, mould Block is completed, i.e., the internal structure of the mobile terminal is divided into different functional unit or module, described above to complete All or part of function.Each functional unit in embodiment, module can integrate in one processing unit, be also possible to each A unit physically exists alone, and can also be integrated in one unit with two or more units, and above-mentioned integrated unit was both It can take the form of hardware realization, can also realize in the form of software functional units.In addition, each functional unit, module Specific name be also only for convenience of distinguishing each other, the protection scope being not intended to limit this application.Unit in above system, The specific work process of module, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, is not described in detail or remembers in some embodiment The part of load may refer to the associated description of other embodiments.
Those of ordinary skill in the art may be aware that list described in conjunction with the examples disclosed in the embodiments of the present disclosure Member and algorithm steps can be realized with the combination of electronic hardware or computer software and electronic hardware.These functions are actually It is implemented in hardware or software, the specific application and design constraint depending on technical solution.Professional technician Each specific application can be used different methods to achieve the described function, but this realization is it is not considered that exceed The scope of the present invention.
In embodiment provided by the present invention, it should be understood that disclosed mobile terminal and method can pass through it Its mode is realized.For example, mobile terminal embodiment described above is only schematical, for example, the module or list Member division, only a kind of logical function partition, there may be another division manner in actual implementation, for example, multiple units or Component can be combined or can be integrated into another system, or some features can be ignored or not executed.Another point is shown The mutual coupling or direct-coupling or communication connection shown or discussed can be through some interfaces, between device or unit Coupling or communication connection are connect, can be electrical property, mechanical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme 's.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unit It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list Member both can take the form of hardware realization, can also realize in the form of software functional units.
If the integrated module/unit be realized in the form of SFU software functional unit and as independent product sale or In use, can store in a computer readable storage medium.Based on this understanding, the present invention realizes above-mentioned implementation All or part of the process in example method, can also instruct relevant hardware to complete, the meter by computer program Calculation machine program can be stored in a computer readable storage medium, the computer program when being executed by processor, it can be achieved that on The step of stating each embodiment of the method.Wherein, the computer program includes computer program code, the computer program generation Code can be source code form, object identification code form, executable file or certain intermediate forms etc..The computer-readable medium It may include: any entity or device, recording medium, USB flash disk, mobile hard disk, magnetic that can carry the computer program code Dish, CD, computer storage, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium etc..It should be noted that described The content that computer-readable medium includes can carry out increasing appropriate according to the requirement made laws in jurisdiction with patent practice Subtract, such as does not include electric carrier signal and electricity according to legislation and patent practice, computer-readable medium in certain jurisdictions Believe signal.
Embodiment described above is merely illustrative of the technical solution of the present invention, rather than its limitations;Although referring to aforementioned reality Applying example, invention is explained in detail, those skilled in the art should understand that: it still can be to aforementioned each Technical solution documented by embodiment is modified or equivalent replacement of some of the technical features;And these are modified Or replacement, the spirit and scope for technical solution of various embodiments of the present invention that it does not separate the essence of the corresponding technical solution should all It is included within protection scope of the present invention.

Claims (10)

1. a kind of method for connecting network, which is characterized in that the method for connecting network includes:
When mobile terminal connects WLAN WLAN and data network, detects the WLAN and whether the data network can Carry out network access;Wherein, the mobile terminal sends solicited message to pre-set server by the WLAN, if The response message of the server feedback is received in preset time, it is determined that the WLAN can be carried out network access, if pre- If the response message of the server feedback is not received in the time, it is determined that the WLAN not can be carried out network access;It is described Mobile terminal sends solicited message to the server by the data network, if receiving the service within a preset time The response message of device feedback, it is determined that the data network can be carried out network access, if not receiving within a preset time described The response message of server feedback, it is determined that the data network not can be carried out network access;
If the WLAN and the data network can be carried out network access, the WLAN and the data network are obtained respectively Network quality score;Wherein, obtain respectively the reception signal of the WLAN and the data network intensity indicating RSSI value, Network delay and history network speed, by the corresponding weight of the RSSI value of the WLAN, the corresponding weight of network delay and history network speed Corresponding weight adds up, using the accumulated value as the network quality score of the WLAN, by the RSSI of the data network It is worth the corresponding weight of corresponding weight, network delay and the corresponding weight of history network speed adds up, using the accumulated value as institute State the network quality score of data network;
According to the network quality score of the network quality score of the WLAN and the data network, determine the mobile terminal into Row network used network when accessing.
2. method for connecting network as described in claim 1, which is characterized in that the network quality score according to the WLAN With the network quality score of the data network, determine that used network includes: when the mobile terminal carries out network access
If the network quality score of the WLAN is greater than the first preset threshold or the network quality score of the WLAN is less than or waits It is less than or equal to the second preset threshold in the network quality score of the first preset threshold and the data network, then controls the shifting Dynamic terminal carries out network access using the WLAN, wherein the first preset threshold is less than or equal to the second preset threshold.
3. method for connecting network as claimed in claim 2, which is characterized in that the method for connecting network further include:
When the mobile terminal using the WLAN carry out network access when, control the mobile terminal from the background still with the number It keeps connecting according to network.
4. method for connecting network as described in claim 1, which is characterized in that the network quality score according to the WLAN With the network quality score of the data network, determine that used network includes: when the mobile terminal carries out network access
If the network quality score of the WLAN is less than or equal to the first preset threshold, and the network quality of the data network point Number is greater than the second preset threshold, then controls the mobile terminal using the data network and carry out network access, wherein first is pre- If threshold value is less than or equal to the second preset threshold.
5. method for connecting network as claimed in claim 4, which is characterized in that the method for connecting network further include:
When the mobile terminal using the data network carry out network access when, control the mobile terminal from the background still with institute It states WLAN and keeps connection.
6. a kind of mobile terminal, which is characterized in that the mobile terminal includes:
Detection module detects the WLAN and described for connecting WLAN WLAN in mobile terminal and when data network Whether data network can be carried out network access;Wherein, the mobile terminal is sent out by the WLAN to pre-set server Solicited message is sent, if receiving the response message of the server feedback within a preset time, it is determined that the WLAN can be carried out Network access, if not receiving the response message of the server feedback within a preset time, it is determined that the WLAN cannot be into The access of row network;The mobile terminal sends solicited message to the server by the data network, if in preset time Inside receive the response message of the server feedback, it is determined that the data network can be carried out network access, if when default The interior response message for not receiving the server feedback, it is determined that the data network not can be carried out network access;
Module is obtained, if can be carried out network access for the WLAN and the data network, obtains the WLAN respectively With the network quality score of the data network;Wherein, the reception signal of the WLAN and the data network is obtained respectively Intensity indicating RSSI value, network delay and history network speed, the corresponding weight of the RSSI value of the WLAN, network delay is corresponding Weight and the corresponding weight of history network speed add up, will be described using the accumulated value as the network quality score of the WLAN The corresponding weight of the RSSI value of data network, the corresponding weight of network delay and the corresponding weight of history network speed add up, will Network quality score of the accumulated value as the data network;
Determining module, for determining according to the network quality score of the WLAN and the network quality score of the data network The mobile terminal carries out used network when network access.
7. mobile terminal as claimed in claim 6, which is characterized in that the determining module is specifically used for:
If the network quality score of the WLAN is greater than the first preset threshold or the network quality score of the WLAN is less than or waits It is less than or equal to the second preset threshold in the network quality score of the first preset threshold and the data network, then controls the shifting Dynamic terminal carries out network access using the WLAN, wherein the first preset threshold is less than or equal to the second preset threshold;
The mobile terminal further include:
First keeps module, is used for when the mobile terminal carries out network access using the WLAN, controls described mobile whole End still is keeping connecting with the data network from the background.
8. mobile terminal as claimed in claim 6, which is characterized in that the determining module is specifically used for:
If the network quality score of the WLAN is less than or equal to the first preset threshold, and the network quality of the data network point Number is greater than the second preset threshold, then controls the mobile terminal using the data network and carry out network access, wherein first is pre- If threshold value is less than or equal to the second preset threshold;
The mobile terminal further include:
Second keeps module, for controlling the shifting when the mobile terminal carries out network access using the data network Dynamic terminal still is keeping connecting with the WLAN from the background.
9. a kind of mobile terminal, including memory, processor and storage are in the memory and can be on the processor The computer program of operation, which is characterized in that the processor realizes such as claim 1 to 5 when executing the computer program The step of any one method for connecting network.
10. a kind of computer readable storage medium, the computer-readable recording medium storage has computer program, and feature exists In the step of realization method for connecting network as described in any one of claim 1 to 5 when the computer program is executed by processor Suddenly.
CN201710667137.6A 2017-08-07 2017-08-07 Method for connecting network, mobile terminal and computer readable storage medium Active CN107484190B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710667137.6A CN107484190B (en) 2017-08-07 2017-08-07 Method for connecting network, mobile terminal and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710667137.6A CN107484190B (en) 2017-08-07 2017-08-07 Method for connecting network, mobile terminal and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN107484190A CN107484190A (en) 2017-12-15
CN107484190B true CN107484190B (en) 2019-04-12

Family

ID=60598793

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710667137.6A Active CN107484190B (en) 2017-08-07 2017-08-07 Method for connecting network, mobile terminal and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN107484190B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108834221B (en) * 2018-06-01 2022-09-20 南昌黑鲨科技有限公司 Network connection control method, computer-readable storage medium, and mobile terminal
CN111356210A (en) * 2018-12-20 2020-06-30 阿里巴巴集团控股有限公司 Downlink base station selection method, device, equipment and storage medium
CN110267315B (en) * 2019-06-28 2021-03-09 南昌黑鲨科技有限公司 Network connection control method, system, intelligent terminal and computer readable storage medium
CN111770437A (en) * 2020-06-09 2020-10-13 Oppo广东移动通信有限公司 Method and device for determining data card, terminal and storage medium
CN112469099B (en) * 2020-11-25 2023-06-23 维沃移动通信有限公司 Networking control method, networking control device, electronic equipment and storage medium
CN112929942B (en) * 2021-02-09 2022-08-30 惠州Tcl移动通信有限公司 Intelligent routing method, system, storage medium and terminal equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101765186A (en) * 2008-12-24 2010-06-30 中兴通讯股份有限公司 Dual-mode mobile phone and method for selecting networks automatically thereof
CN102595544A (en) * 2012-03-21 2012-07-18 厦门市凌拓通信科技有限公司 Method for achieving automatic switching between WIFI and 4G network on mobile equipment
CN104902526A (en) * 2015-05-25 2015-09-09 广东欧珀移动通信有限公司 Method and device for switching network, and mobile terminal
CN105554831A (en) * 2016-01-28 2016-05-04 努比亚技术有限公司 Network switching device and method
WO2016161366A1 (en) * 2015-04-03 2016-10-06 Google Inc. Adaptive on-demand tethering

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102497659B (en) * 2011-12-05 2014-08-13 中国电信股份有限公司 Method and system for network selection under dual-network coverage, and dual-mode terminal
US9167511B2 (en) * 2012-07-31 2015-10-20 Hewlett-Packard Development Company, L.P. Utilizing client mobile devices for wireless network monitoring

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101765186A (en) * 2008-12-24 2010-06-30 中兴通讯股份有限公司 Dual-mode mobile phone and method for selecting networks automatically thereof
CN102595544A (en) * 2012-03-21 2012-07-18 厦门市凌拓通信科技有限公司 Method for achieving automatic switching between WIFI and 4G network on mobile equipment
WO2016161366A1 (en) * 2015-04-03 2016-10-06 Google Inc. Adaptive on-demand tethering
CN104902526A (en) * 2015-05-25 2015-09-09 广东欧珀移动通信有限公司 Method and device for switching network, and mobile terminal
CN105554831A (en) * 2016-01-28 2016-05-04 努比亚技术有限公司 Network switching device and method

Also Published As

Publication number Publication date
CN107484190A (en) 2017-12-15

Similar Documents

Publication Publication Date Title
CN107484190B (en) Method for connecting network, mobile terminal and computer readable storage medium
US20160357616A1 (en) Application management method and application management apparatus
CN107197489A (en) Method for switching network, mobile terminal and computer-readable recording medium
CN106776036A (en) A kind of resource allocation methods and device
CN107222898A (en) Method for switching network, mobile terminal and computer-readable recording medium
CN107404740B (en) Method for switching network, device and the terminal device of safety
CN110381130A (en) The long connection method of keep-alive, device, communication terminal and storage medium
CN106851779A (en) A kind of method and mobile terminal for recognizing access point and focus
CN106937258B (en) A kind of control method of broadcast, device and mobile terminal
CN107295592A (en) Method for switching network, mobile terminal and computer-readable recording medium
CN105848117A (en) Recharging method and recharging device
CN107506494B (en) Document handling method, mobile terminal and computer readable storage medium
CN107197493B (en) A kind of method for switching network, network switching device and intelligent terminal
CN105426192A (en) Information modification method and terminal
CN107872533B (en) Information-pushing method, device, server and storage medium
CN106953852A (en) Register method, device and the terminal device of radio receiver
CN106776040A (en) A kind of resource allocation methods and device
CN108337706A (en) A kind of switching method of wireless network, mobile terminal and storage medium
CN104065684B (en) Information processing method, electronic equipment and terminal device
CN112929254A (en) Message processing method and device and electronic equipment
CN107277877A (en) Method for switching network, mobile terminal and computer-readable recording medium
CN107995645A (en) Method for connecting network, mobile terminal and computer-readable recording medium
CN106793173B (en) The method and mobile terminal of information processing
CN107124719A (en) Method for switching network, mobile terminal and computer-readable recording medium
CN109495876A (en) A kind of transmission method and mobile terminal of mobile terminal data

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

Address after: 523860 No. 18, Wu Sha Beach Road, Changan Town, Dongguan, Guangdong

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

Address before: 523860 No. 18, Wu Sha Beach Road, Changan Town, Dongguan, Guangdong

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

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant