CN106162831A - Method for connecting network and device - Google Patents

Method for connecting network and device Download PDF

Info

Publication number
CN106162831A
CN106162831A CN201610581689.0A CN201610581689A CN106162831A CN 106162831 A CN106162831 A CN 106162831A CN 201610581689 A CN201610581689 A CN 201610581689A CN 106162831 A CN106162831 A CN 106162831A
Authority
CN
China
Prior art keywords
network
application program
option
mode
speed
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.)
Pending
Application number
CN201610581689.0A
Other languages
Chinese (zh)
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.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software Co 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 Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN201610581689.0A priority Critical patent/CN106162831A/en
Publication of CN106162831A publication Critical patent/CN106162831A/en
Pending legal-status Critical Current

Links

Classifications

    • 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
    • H04W56/00Synchronisation arrangements
    • H04W56/0055Synchronisation arrangements determining timing error of reception due to propagation delay

Landscapes

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

Abstract

The disclosure is directed to a kind of method for connecting network and device, belong to field of terminal technology, described method comprises determining that in the network connectivity option of application program whether include specified option;When the network connectivity option of described application program includes described specified option, determine the magnitude relationship between the network connection speed of described application program spendable multiple network connected mode;Based on described magnitude relationship, from described multiple network connected mode, the internetwork connection mode selecting network connection speed maximum carries out network connection.The disclosure is determined by the magnitude relationship of the network connection speed of the spendable internetwork connection mode of application program, the internetwork connection mode selecting network connection speed maximum carries out network connection, so that the internetwork connection mode that the network currently carried out connects is most suitable internetwork connection mode, and then improve reliability and the efficiency that network connects.

Description

Method for connecting network and device
Technical field
It relates to field of terminal technology, particularly relate to a kind of method for connecting network and device.
Background technology
Along with the development of science and technology, network is more and more universal, when terminal connects after network, can carry out on network various respectively The network activity of sample, experiences to obtain more preferable network, and the method that network connects is increasingly becoming the main points of concern.
In correlation technique, terminal is generally by WIFI (Wireless Fidelity, Wireless Fidelity) or mobile data stream Amount carries out network connection.When terminal only opens WIFI, this terminal carries out network connection by WIFI;When terminal only opens movement During data traffic, this terminal moves data traffic by this and carries out network connection;When WIFI and the mobile data traffic of terminal are same Time when opening, if this terminal cannot by WIFI carry out network connect, this terminal can be carried out by mobile data traffic Network connects;If this terminal can carry out network connection by WIFI, then this terminal preferentially can carry out network by WIFI Connect.
Summary of the invention
For overcoming problem present in correlation technique, the disclosure provides a kind of method for connecting network and device.
First aspect according to disclosure embodiment, it is provided that a kind of method for connecting network, described method includes:
Determine in the network connectivity option of application program and whether include specified option;
When the network connectivity option of described application program includes described specified option, determine that described application program can make Multiple network connected mode network connection speed between magnitude relationship;
Based on described magnitude relationship, from described multiple network connected mode, select the network that network connection speed is maximum Connected mode carries out network connection.
Alternatively, described when the network connectivity option of described application program includes described specified option, determine described Magnitude relationship between the network connection speed of application program spendable multiple network connected mode, including:
Obtain described application program under every kind of internetwork connection mode, carry out the network delay of network connection;
The magnitude relationship between the network connection speed of described multiple network connected mode is determined by described network delay.
Alternatively, the described application program of described acquisition carries out the network of network connection under every kind of internetwork connection mode and prolongs Time, including:
For every kind of internetwork connection mode in described multiple network connected mode, entered by described internetwork connection mode When row network connects, send request message by described application program to corresponding application server;
Determine the transmission time of described request message;
When receiving the response message that described application server returns based on described request message, determine the described sound of reception Answer the reception time of information;
Calculate the time difference between described transmission time and described reception time;
Described time difference is defined as the network delay of described internetwork connection mode.
Alternatively, described when the network connectivity option of described application program includes described specified option, determine described Magnitude relationship between the network connection speed of application program spendable multiple network connected mode, including:
Judge whether to install network to test the speed application or network management-application;
Test the speed application or during network management-application when installing described network, tested the speed application or described net by described network Network management application determines that the size between the network connection speed of described application program spendable multiple network connected mode is closed System.
Alternatively, described internetwork connection mode includes Wireless Fidelity WIFI and mobile data traffic.
In conjunction with first aspect, in the 5th kind of possible implementation of above-mentioned first aspect, described determine application program Network connectivity option in whether include specified option before, also include:
Receive option and instruction is set;
Instruction is set based on described option, the network connectivity option of described application program is configured.
Second aspect according to disclosure embodiment, it is provided that a kind of network connection device, described device includes:
First determines module, whether includes specified option in the network connectivity option determining application program;
Second determines module, is used for when the network connectivity option of described application program includes described specified option, really Magnitude relationship between the network connection speed of fixed described application program spendable multiple network connected mode;
Select module, for based on described magnitude relationship, from described multiple network connected mode, select network to connect speed The internetwork connection mode of degree maximum carries out network connection.
Alternatively, described second determines that module includes:
Acquiring unit, the network carrying out network connection for obtaining described application program under every kind of internetwork connection mode prolongs Time;
First determines unit, for being determined that by described network delay the network of described multiple network connected mode connects speed Magnitude relationship between degree.
Alternatively, described acquiring unit includes:
Send subelement, for for every kind of internetwork connection mode in described multiple network connected mode, passing through State internetwork connection mode and carry out network when connecting, send request message by described application program to corresponding application server;
First determines subelement, for determining the transmission time of described request message;
Second determines subelement, for when receiving the response letter that described application server returns based on described request message During breath, determine the reception time receiving described response message;
Computation subunit, for calculating the time difference between described transmission time and described reception time;
3rd determines subelement, for described time difference is defined as the network delay of described internetwork connection mode.
Alternatively, described second determines that module includes:
Judging unit, is used for judging whether installing network and tests the speed application or network management-application;
Second determines unit, for testing the speed application or during network management-application, by described net when installing described network Network tests the speed application or described network management-application determines the network of described application program spendable multiple network connected mode even Connect the magnitude relationship between speed.
Alternatively, described internetwork connection mode includes Wireless Fidelity WIFI and mobile data traffic.
Alternatively, described device also includes:
Receiver module, is used for receiving option and arranges instruction;
Module is set, for arranging instruction based on described option, the network connectivity option of described application program is set Put.
The third aspect according to disclosure embodiment, it is provided that a kind of network connection device, described device includes:
Processor;
For storing the memorizer of processor executable;
Wherein, described processor is configured to:
Determine in the network connectivity option of application program and whether include specified option;
When the network connectivity option of described application program includes described specified option, determine that described application program can make Multiple network connected mode network connection speed between magnitude relationship;
Based on described magnitude relationship, from described multiple network connected mode, select the network that network connection speed is maximum Connected mode carries out network connection.
Embodiment of the disclosure that the technical scheme of offer can include following beneficial effect: in the disclosed embodiments, eventually End may determine that in the network connectivity option of application program whether include specified option, so that terminal is when carrying out network and connecting There is specific aim.And when the network connectivity option of this application program includes specified option, this terminal may determine that this should By the magnitude relationship of the network connection speed of program spendable multiple network connected mode, and from this multiple network connected mode The internetwork connection mode of middle selection network connection speed maximum carries out network connection, thus ensure that terminal carries out network connection Mode is current most suitable mode, improves the reliability that network connects, and also improves the efficiency that network connects simultaneously.
It should be appreciated that it is only exemplary and explanatory, not that above general description and details hereinafter describe The disclosure can be limited.
Accompanying drawing explanation
Accompanying drawing herein is merged in description and constitutes the part of this specification, it is shown that meet the enforcement of the present invention Example, and for explaining the principle of the present invention together with description.
Fig. 1 is the flow chart according to a kind of method for connecting network shown in an exemplary embodiment.
Fig. 2 is the flow chart according to the another kind of method for connecting network shown in an exemplary embodiment.
Fig. 3 A is the structured flowchart according to the first network connection device shown in an exemplary embodiment.
Fig. 3 B is the structured flowchart determining module according to a kind of second shown in an exemplary embodiment.
Fig. 3 C is the structured flowchart determining module according to the another kind second shown in an exemplary embodiment.
Fig. 3 D is the structured flowchart according to the second network connection device shown in an exemplary embodiment.
Fig. 4 is the structured flowchart according to the third network connection device shown in an exemplary embodiment.
Detailed description of the invention
Here will illustrate exemplary embodiment in detail, its example represents in the accompanying drawings.Explained below relates to During accompanying drawing, unless otherwise indicated, the same numbers in different accompanying drawings represents same or analogous key element.Following exemplary embodiment Described in embodiment do not represent all embodiments consistent with the present invention.On the contrary, they are only with the most appended The example of the apparatus and method that some aspects that described in detail in claims, the present invention are consistent.
Before disclosure embodiment is carried out detailed explanation, first the application scenarios of disclosure embodiment is given Introduce.At present, when the environment residing for terminal exists WIFI signal, and when terminal opens WIFI and mobile data traffic simultaneously Time, this terminal will carry out network connection by WIFI.But, when terminal carries out network connection by WIFI, it is likely that can go out Existing WIFI signal is fine, but the situation that network is the best, and such as, the WIFI signal of some LAN WIFI hot spot is unstable, makes Become network the best, or, can be networked by WIFI but some specific web page interlinkage is not opened, such as, public during spring transportation Department IP is provided official website envelope by ticket, and being carried out when network connects by the WIFI of company can not normal brush ticket etc..Simultaneously as mesh Front mobile data traffic uses forth generation mobile communication technology, therefore, is carried out the network of network connection by mobile data traffic Connection speed is increasingly faster, a lot of in the case of network connection speed poor unlike WIFI, but in the case of WIFI opens, end End but cannot carry out network connection by mobile data traffic, thus reduces the efficiency that network connects.Therefore, the disclosure is implemented Example provides a kind of method for connecting network, terminal can be made to select internetwork connection mode, thus ensure that network connects Reliability, improve simultaneously network connect motility and efficiency.
Fig. 1 is the flow chart according to a kind of method for connecting network shown in an exemplary embodiment, as it is shown in figure 1, the party Method, in terminal, comprises the following steps.
In a step 101, determine in the network connectivity option of application program and whether include specified option.
In a step 102, when the network connectivity option of this application program includes this specified option, determine this application journey Magnitude relationship between the network connection speed of sequence spendable multiple network connected mode.
In step 103, based on this magnitude relationship, from this multiple network connected mode, select network connection speed Big internetwork connection mode carries out network connection.
In the disclosed embodiments, whether terminal includes in may determine that the network connectivity option of application program specifying choosing , so that terminal has specific aim when carrying out network connection.And when the network connectivity option of this application program includes During specified option, this terminal may determine that the big of the network connection speed of this application program spendable multiple network connected mode Little relation, and select the internetwork connection mode of network connection speed maximum to carry out network even from this multiple network connected mode Connect, thus ensure that terminal carries out the mode of network connection be current most suitable mode, improve the reliability that network connects, Also improve the efficiency that network connects simultaneously.
Alternatively, when the network connectivity option of this application program includes this specified option, determine that this application program can Magnitude relationship between the network connection speed of the multiple network connected mode used, including:
Obtain this application program under every kind of internetwork connection mode, carry out the network delay of network connection;
The magnitude relationship between the network connection speed of this multiple network connected mode is determined by this network delay.
Alternatively, obtain this application program under every kind of internetwork connection mode, carry out the network delay of network connection, including:
For every kind of internetwork connection mode in this multiple network connected mode, carrying out net by this internetwork connection mode When network connects, send request message by this application program to corresponding application server;
Determine the transmission time of this request message;
When receiving the response message that this application server returns based on this request message, determine this response message of reception The reception time;
Calculate the time difference between this transmission time and this reception time;
This time difference is defined as the network delay of this internetwork connection mode.
Alternatively, when the network connectivity option of this application program includes this specified option, determine that this application program can Magnitude relationship between the network connection speed of the multiple network connected mode used, including:
Judge whether to install network to test the speed application or network management-application;
Test the speed application or during network management-application when installing this network, tested the speed application or this network management by this network Application determines the magnitude relationship between the network connection speed of this application program spendable multiple network connected mode.
Alternatively, internetwork connection mode includes Wireless Fidelity WIFI and mobile data traffic.
Optionally it is determined that before whether the network connectivity option of application program includes specified option, also include:
Receive option and instruction is set;
Instruction is set based on this option, the network connectivity option of this application program is configured.
Above-mentioned all optional technical schemes, all can be according to arbitrarily combining the alternative embodiment forming the disclosure, and the disclosure is real Execute example this is repeated the most one by one.
Fig. 2 is the flow chart according to a kind of method for connecting network shown in an example embodiments, sees Fig. 2, the method Including:
In step 201, whether terminal includes specified option in determining the network connectivity option of application program.
It should be noted that network connectivity option carries out the information of network connection, such as, this net for describing application program Network connectivity option may include whether to carry out the option of network connection, automatic connectivity option or manual connectivity option etc., this This is not specifically limited by open embodiment.
Wherein, whether terminal includes in determining the network connectivity option of application program that the operation of specified option can be: sentence Whether this specified option disconnected includes option tags, when this specified option includes option tags, determines this application program Network connectivity option includes specified option, otherwise, it determines do not include specified option in the network connectivity option of this application program.
It should be noted that option tags is selected for this specified option of uniquely tagged, and this option tags can be with thing First arranging, such as, this option tags can be symbol, expression, a letter etc., and this is not done concrete limit by disclosure embodiment Fixed.
Also, it should be noted specified option is for identifying the internetwork connection mode of this application program, such as this appointment choosing Can be " network speed is preferential " etc., this be not specifically limited by disclosure embodiment.
Whether the network connectivity option of application program includes specify it addition, terminal determines not only by aforesaid way Option, it is also possible to be determined by other means, such as, terminal can decide whether to choose this specified option, when determining Choose this specified option, it is determined that the network connectivity option of application program includes specified option, otherwise, it determines application program Network connectivity option in do not include that this is not specifically limited by specified option, disclosure embodiment.
Further, before whether terminal includes specified option in the network connectivity option determine application program, also may be used With reception option, instruction is set;And instruction is set based on this option, the network connectivity option of this application program is configured.
Instruct for network connectivity option is configured it should be noted that option is arranged, and this option arranges instruction Can be triggered by assigned operation by user, this assigned operation can be clicking operation, slide, voice operating etc., these public affairs Open embodiment this is not specifically limited.
Also, it should be noted internetwork connection mode includes WIFI and mobile data traffic, it is, of course, also possible to include other Mode, this is not specifically limited by disclosure embodiment.
It addition, in the disclosed embodiments, this terminal arranges instruction based on this option, can be for installing in the terminal One application program carries out the setting of network connectivity option, it is also possible to multiple application programs are carried out network connectivity option and sets Putting, that is to say, the arranging of network connectivity option being arranged on multiple application programs of this terminal can be identical, it is also possible to is Different, this is not specifically limited by disclosure embodiment.
It should be noted that different when arranging when the network connectivity option of the plurality of application program is carried out, the plurality of Application program carries out the mode of network connection and differs, such that it is able to make terminal carry out during network connection have specific aim.
It addition, when not including specified option during terminal determines the network connectivity option of this application program, this terminal is permissible Network connection is carried out by WIFI, by mobile data in the environment do not have WIFI signal in the environment have WIFI signal Flow carries out network connection.When terminal determines that the network connectivity option of this application program includes specified option, and this terminal institute When not having WIFI signal in the environment at place, this terminal carries out network connection by mobile data traffic;When terminal determines this application When the network connectivity option of program includes having WIFI signal in specified option, and this terminal local environment, terminal is held successively Row following step 202 and step 203.
In step 202., when the network connectivity option of this application program includes this specified option, terminal determines that this should By the magnitude relationship between the network connection speed of program spendable multiple network connected mode.
Wherein, what terminal determined between the network connection speed of this application program spendable multiple network connected mode is big The operation of little relation can be to include the following two kinds mode.
First kind of way, terminal obtains this application program and carries out the network of network connection under every kind of internetwork connection mode and prolong Time;The magnitude relationship between the network connection speed of this multiple network connected mode is determined by this network delay.
Wherein, terminal obtains this application program and carries out the network delay of network connection under every kind of internetwork connection mode, bag Include: for every kind of internetwork connection mode in this multiple network connected mode, carrying out network even by this internetwork connection mode When connecing, send request message by this application program to corresponding application server;Determine the transmission time of this request message;When When application server receives the request message that terminal sends, response message can be returned based on this request message to terminal, when When this terminal receives this response message, determine the reception time receiving this response message;Calculate this transmission time and this reception Time difference between time;This time difference is defined as the network delay of this internetwork connection mode.
Wherein, terminal can deduct the transmission time with the reception time, thus obtains between transmission time and reception time Time difference.
It should be noted that this request message can be arbitrary request message, such as, this request message be picture show please Ask, audio frequency playing request etc., this is not specifically limited by disclosure embodiment.Corresponding, response message is this request message pair The information answered, such as, when this request message is picture display request, this response message is to need the picture of display, the disclosure This is not specifically limited by embodiment equally.
Such as, when terminal by mobile data traffic carry out network connect time, this terminal can by this application program to Corresponding application server sends request message, determines that the transmission time of this request message is 12:01:05, works as application server When receiving the request message that this terminal sends, response message can be returned based on this request message to terminal;When terminal receives During to this response message, determine receive this response message reception time 12:01:10, calculate the transmission time and receive the time it Between time difference be 5 seconds, this time difference is defined as this network delay moving data traffic for 5 seconds.
In like manner, when terminal carries out network connection by WIFI, this terminal can be answered to corresponding by this application program Send request message with server, determine that the transmission time of this request message is 12:01:010, when application server receives this During the request message that terminal sends, response message can be returned based on this request message to terminal;When terminal receives this response During information, determine the reception time 12:01:17 receiving this response message, calculate the time between transmission time and reception time Difference is 7 seconds, and this time difference is defined as the network delay of this WIFI for 7 seconds.
It should be noted that in the disclosed embodiments, terminal can determine network delay by the way, it is also possible to Determining network delay by other means, such as, this terminal may determine that the transmission time sending request message, and passes through timing Device or other instruments with clocking capability start timing, when terminal receives what application server returned based on this request message During response message, stopping timing, the duration recorded by timer is defined as network delay, and this is not done by disclosure embodiment has Body limits.
Further, since the biggest then network connection speed of network delay is the least, therefore, this multiple network can be connected by terminal The network delay of mode compares, and determines the magnitude relationship between the network delay of this multiple network connected mode, and by net The internetwork connection mode of network time delay maximum is defined as the internetwork connection mode that network connection speed is minimum, by network delay minimum Internetwork connection mode is defined as the internetwork connection mode that network connection speed is maximum, so that it is determined that this multiple network connected mode Magnitude relationship between network connection speed.
The second way, terminal judges the most installed network test the speed application or network management-application;When installing this net Network tests the speed application or during network management-application, tests the speed application by this network or this network management-application determines that this application program can Magnitude relationship between the network connection speed of the multiple network connected mode used.
Wherein, terminal can be tested the speed by this network and apply or this network management-application net to multiple network connected mode Network connection speed measures, and compares according to measurement result, so that it is determined that the spendable multiple network of this application program Magnitude relationship between the network connection speed of connected mode.
It should be noted that the operation that terminal judges has installed network test application or network management-application the most can be joined Examining correlation technique, this is repeated by disclosure embodiment the most one by one.
Also, it should be noted terminal is possible not only to measure the network connection speed of multiple network connected mode, Can also measure the network bandwidth of multiple network connected mode, handling capacity etc., this is not done specifically by disclosure embodiment Limit.
It addition, based on any one in network connection speed, the network bandwidth or handling capacity, this terminal can determine that this should By the magnitude relationship between the network connection speed of program spendable multiple network connected mode, it is also possible to combine network and connect Speed, the network bandwidth and handling capacity, determine this application program spendable multiple network connected mode network connection speed it Between magnitude relationship, this is not specifically limited by disclosure embodiment equally.
Furthermore, during owing to carrying out network connection by a kind of internetwork connection mode, may be after network connects a period of time There is the problem such as network congestion, thus the phenomenon such as cause that network connection card pauses, therefore, this terminal can also determine that this is multiple in real time The magnitude relationship of the network connection speed of internetwork connection mode, it is also possible to determine that the plurality of network connects every specifying time interval The magnitude relationship of the network connection speed of mode, this is not specifically limited by disclosure embodiment.
It should be noted that this appointment time interval can be arranged in advance, and this appointment time interval can be 1 hour, 2 Hour etc., this is not specifically limited by disclosure embodiment.
Also, it should be noted this terminal determines the net of multiple network connected mode not only by above two mode Magnitude relationship between network connection speed, can also be determined equally by other means, and this is not done by disclosure embodiment Concrete restriction.
In step 203, terminal is based on this magnitude relationship, from this multiple network connected mode, selects network to connect speed The internetwork connection mode of degree maximum carries out network connection.
Such as, the relation between the network connection speed of this multiple network connected mode is determined by network delay when terminal Size, and the network delay that terminal carries out network connection by mobile terminal flow is 0.5 second, terminal carries out network by WIFI When the network delay connected is 0.7 second, this terminal can select to carry out network connection by mobile data traffic.
In the disclosed embodiments, whether terminal includes in may determine that the network connectivity option of application program specifying choosing , so that terminal has specific aim when carrying out network connection.And when the network connectivity option of this application program includes During specified option, this terminal may determine that the big of the network connection speed of this application program spendable multiple network connected mode Little relation, and select the internetwork connection mode of network connection speed maximum to carry out network even from this multiple network connected mode Connect.Simultaneously as this terminal can determine the network of this multiple network connected mode even in real time or being at the appointed time spaced Connect the magnitude relationship of speed, thus ensure that terminal carries out the mode of network connection is current most suitable mode, improves net The reliability that network connects, also improves the efficiency that network connects simultaneously.
Fig. 3 A is according to a kind of network connection device structured flowchart shown in an exemplary embodiment.With reference to Fig. 3 A, this dress Put include first determine module 301, second determine module 302 and select module 303.
First determines module 301, whether includes specified option in the network connectivity option determining application program;
Second determines module 302, is used for when the network connectivity option of described application program includes described specified option, Determine the magnitude relationship between the network connection speed of described application program spendable multiple network connected mode;
Select module 303, for based on described magnitude relationship, from described multiple network connected mode, select network even The internetwork connection mode connecing speed maximum carries out network connection.
Alternatively, seeing Fig. 3 B, described second determines that module 302 includes:
Acquiring unit 3021, carries out the net of network connection for obtaining described application program under every kind of internetwork connection mode Network time delay;
First determines unit 3022, for being determined the network of described multiple network connected mode by described network delay even Connect the magnitude relationship between speed.
Alternatively, described acquiring unit 3021 includes:
Send subelement 30211, for for every kind of internetwork connection mode in described multiple network connected mode, logical Cross described internetwork connection mode and carry out network when connecting, send request by described application program to corresponding application server and disappear Breath;
First determines subelement 30212, for determining the transmission time of described request message;
Second determines subelement 30213, for when receiving what described application server returned based on described request message During response message, determine the reception time receiving described response message;
Computation subunit 30214, for calculating the time difference between described transmission time and described reception time;
3rd determines subelement 30215, for described time difference is defined as the network delay of described internetwork connection mode.
Alternatively, seeing Fig. 3 C, described second determines that module 302 includes:
Judging unit 3023, is used for judging whether installing network and tests the speed application or network management-application;
Second determines unit 3024, for testing the speed application or during network management-application, by institute when installing described network State network and test the speed application or described network management-application determines the net of described application program spendable multiple network connected mode Magnitude relationship between network connection speed.
Alternatively, described internetwork connection mode includes Wireless Fidelity WIFI and mobile data traffic.
Alternatively, seeing Fig. 3 D, described device also includes:
Receiver module 304, is used for receiving option and arranges instruction;
Module 305 is set, for arranging instruction based on described option, the network connectivity option of described application program is carried out Arrange.
In the disclosed embodiments, whether terminal includes in may determine that the network connectivity option of application program specifying choosing , so that terminal has specific aim when carrying out network connection.And when the network connectivity option of this application program includes During specified option, this terminal may determine that the big of the network connection speed of this application program spendable multiple network connected mode Little relation, and select the internetwork connection mode of network connection speed maximum to carry out network even from this multiple network connected mode Connect.Simultaneously because this terminal can determine in real time or being at the appointed time spaced that this multiple network connects network connection speed Magnitude relationship, thus ensure that terminal carries out the mode of network connection is current most suitable mode, improves what network connected Reliability, also improves the efficiency that network connects simultaneously.
About the device in above-described embodiment, wherein modules performs the concrete mode of operation in relevant the method Embodiment in be described in detail, explanation will be not set forth in detail herein.
Fig. 4 is the block diagram according to a kind of device 400 connected for network shown in an exemplary embodiment.Such as, dress Putting 400 can be mobile phone, computer, digital broadcast terminal, messaging devices, game console, tablet device, medical treatment Equipment, body-building equipment, personal digital assistant etc..
With reference to Fig. 4, device 400 can include following one or more assembly: processes assembly 402, memorizer 404, power supply Assembly 406, multimedia groupware 408, audio-frequency assembly 410, the interface 412 of input/output (I/O), sensor cluster 414, and Communications component 416.
Process assembly 402 and generally control the integrated operation of device 400, such as with display, call, data communication, phase The operation that machine operation and record operation are associated.Process assembly 402 and can include that one or more processor 420 performs to refer to Order, to complete all or part of step of above-mentioned method.Additionally, process assembly 402 can include one or more module, just Mutual in process between assembly 402 and other assemblies.Such as, process assembly 402 and can include multi-media module, many to facilitate Media component 404 and process between assembly 402 mutual.
Memorizer 404 is configured to store various types of data to support the operation at device 400.Showing of these data Example includes any application program for operation on device 400 or the instruction of method, contact data, telephone book data, disappears Breath, picture, video etc..Memorizer 404 can be by any kind of volatibility or non-volatile memory device or their group Close and realize, such as static RAM (SRAM), Electrically Erasable Read Only Memory (EEPROM), erasable compile Journey read only memory (EPROM), programmable read only memory (PROM), read only memory (ROM), magnetic memory, flash Device, disk or CD.
The various assemblies that power supply module 406 is device 400 provide power supply.Power supply module 406 can include power management system System, one or more power supplys, and other generate, manage and distribute, with for device 400, the assembly that power supply is associated.
The screen of one output interface of offer that multimedia groupware 408 is included between described device 400 and user.One In a little embodiments, screen can include liquid crystal display (LCD) and touch panel (TP).If screen includes touch panel, screen Curtain may be implemented as touch screen, to receive the input signal from user.Touch panel includes one or more touch sensing Device is with the gesture on sensing touch, slip and touch panel.Described touch sensor can not only sense touch or sliding action Border, but also detect the persistent period relevant to described touch or slide and pressure.In certain embodiments, many matchmakers Body assembly 408 includes a front-facing camera and/or post-positioned pick-up head.When device 400 is in operator scheme, such as screening-mode or During video mode, front-facing camera and/or post-positioned pick-up head can receive the multi-medium data of outside.Each front-facing camera and Post-positioned pick-up head can be a fixing optical lens system or have focal length and optical zoom ability.
Audio-frequency assembly 410 is configured to output and/or input audio signal.Such as, audio-frequency assembly 410 includes a Mike Wind (MIC), when device 400 is in operator scheme, during such as call model, logging mode and speech recognition mode, mike is joined It is set to receive external audio signal.The audio signal received can be further stored at memorizer 404 or via communication set Part 416 sends.In certain embodiments, audio-frequency assembly 410 also includes a speaker, is used for exporting audio signal.
I/O interface 412 provides interface for processing between assembly 402 and peripheral interface module, above-mentioned peripheral interface module can To be keyboard, put striking wheel, button etc..These buttons may include but be not limited to: home button, volume button, start button and lock Set button.
Sensor cluster 414 includes one or more sensor, for providing the state of various aspects to comment for device 400 Estimate.Such as, what sensor cluster 414 can detect device 400 opens/closed mode, the relative localization of assembly, such as described Assembly is display and the keypad of device 400, and sensor cluster 414 can also detect device 400 or 400 1 assemblies of device Position change, the presence or absence that user contacts with device 400, device 400 orientation or acceleration/deceleration and device 400 Variations in temperature.Sensor cluster 414 can include proximity transducer, is configured to when not having any physical contact detect The existence of neighbouring object.Sensor cluster 414 can also include optical sensor, such as CMOS or ccd image sensor, is used for becoming Use as in application.In certain embodiments, this sensor cluster 414 can also include acceleration transducer, gyro sensors Device, Magnetic Sensor, pressure transducer or temperature sensor.
Communications component 416 is configured to facilitate the communication of wired or wireless mode between device 400 and other equipment.Device 400 can access wireless network based on communication standard, such as WiFi, 2G or 3G, or combinations thereof.An exemplary enforcement In example, communication component 416 receives the broadcast singal from external broadcasting management system or broadcast related information via broadcast channel. In one exemplary embodiment, described communications component 416 also includes near-field communication (NFC) module, to promote junction service.Example As, can be based on RF identification (RFID) technology in NFC module, Infrared Data Association (IrDA) technology, ultra broadband (UWB) technology, Bluetooth (BT) technology and other technologies realize.
In the exemplary embodiment, device 400 can be by one or more application specific integrated circuits (ASIC), numeral letter Number processor (DSP), digital signal processing appts (DSPD), PLD (PLD), field programmable gate array (FPGA), controller, microcontroller, microprocessor or other electronic components realize, be used for performing said method.
In the exemplary embodiment, a kind of non-transitory computer-readable recording medium including instruction, example are additionally provided As included the memorizer 404 of instruction, above-mentioned instruction can have been performed said method by the processor 420 of device 400.Such as, Described non-transitory computer-readable recording medium can be ROM, random access memory (RAM), CD-ROM, tape, floppy disk With optical data storage devices etc..
A kind of non-transitory computer-readable recording medium, when the instruction in described storage medium is by the process of mobile terminal When device performs so that mobile terminal is able to carry out a kind of method for connecting network, and described method includes:
Determine in the network connectivity option of application program and whether include specified option;
When the network connectivity option of this application program includes this specified option, determine that this application program is spendable many Plant the magnitude relationship between the network connection speed of internetwork connection mode;
Based on this magnitude relationship, from this multiple network connected mode, the network selecting network connection speed maximum connects Mode carries out network connection.
Alternatively, when the network connectivity option of this application program includes this specified option, determine that this application program can Magnitude relationship between the network connection speed of the multiple network connected mode used, including:
Obtain this application program under every kind of internetwork connection mode, carry out the network delay of network connection;
The magnitude relationship between the network connection speed of this multiple network connected mode is determined by this network delay.
Alternatively, obtain this application program under every kind of internetwork connection mode, carry out the network delay of network connection, including:
For every kind of internetwork connection mode in this multiple network connected mode, carrying out net by this internetwork connection mode When network connects, send request message by this application program to corresponding application server;
Determine the transmission time of this request message;
When receiving the response message that this application server returns based on this request message, determine this response message of reception The reception time;
Calculate the time difference between this transmission time and this reception time;
This time difference is defined as the network delay of this internetwork connection mode.
Alternatively, when the network connectivity option of this application program includes this specified option, determine that this application program can Magnitude relationship between the network connection speed of the multiple network connected mode used, including:
Judge whether to install network to test the speed application or network management-application;
Test the speed application or during network management-application when installing this network, tested the speed application or this network management by this network Application determines the magnitude relationship between the network connection speed of this application program spendable multiple network connected mode.
Alternatively, internetwork connection mode includes Wireless Fidelity WIFI and mobile data traffic.
Optionally it is determined that before whether the network connectivity option of application program includes specified option, also include:
Receive option and instruction is set;
Instruction is set based on this option, the network connectivity option of this application program is configured.
In the disclosed embodiments, whether terminal includes in may determine that the network connectivity option of application program specifying choosing , so that terminal has specific aim when carrying out network connection.And when the network connectivity option of this application program includes During specified option, this terminal may determine that the big of the network connection speed of this application program spendable multiple network connected mode Little relation, and select the internetwork connection mode of network connection speed maximum to carry out network even from this multiple network connected mode Connect, thus ensure that terminal carries out the mode of network connection be current most suitable mode, improve the reliability that network connects, Also improve the efficiency that network connects simultaneously.
Those skilled in the art, after considering description and putting into practice invention disclosed herein, will readily occur to its of the present invention Its embodiment.The application is intended to any modification, purposes or the adaptations of the present invention, these modification, purposes or Person's adaptations is followed the general principle of the present invention and includes the undocumented common knowledge in the art of the disclosure Or conventional techniques means.Description and embodiments is considered only as exemplary, and true scope and spirit of the invention are by following Claim is pointed out.
It should be appreciated that the invention is not limited in precision architecture described above and illustrated in the accompanying drawings, and And various modifications and changes can carried out without departing from the scope.The scope of the present invention is only limited by appended claim.

Claims (13)

1. a method for connecting network, it is characterised in that described method includes:
Determine in the network connectivity option of application program and whether include specified option;
When the network connectivity option of described application program includes described specified option, determine that described application program is spendable Magnitude relationship between the network connection speed of multiple network connected mode;
Based on described magnitude relationship, from described multiple network connected mode, the network selecting network connection speed maximum connects Mode carries out network connection.
2. the method for claim 1, it is characterised in that described include when the network connectivity option of described application program During described specified option, determine between the network connection speed of described application program spendable multiple network connected mode is big Little relation, including:
Obtain described application program under every kind of internetwork connection mode, carry out the network delay of network connection;
The magnitude relationship between the network connection speed of described multiple network connected mode is determined by described network delay.
3. method as claimed in claim 2, it is characterised in that the described application program of described acquisition is at every kind of internetwork connection mode Under carry out the network delay of network connection, including:
For every kind of internetwork connection mode in described multiple network connected mode, carrying out net by described internetwork connection mode When network connects, send request message by described application program to corresponding application server;
Determine the transmission time of described request message;
When receiving the response message that described application server returns based on described request message, determine reception described response letter The reception time of breath;
Calculate the time difference between described transmission time and described reception time;
Described time difference is defined as the network delay of described internetwork connection mode.
4. the method for claim 1, it is characterised in that described include when the network connectivity option of described application program During described specified option, determine between the network connection speed of described application program spendable multiple network connected mode is big Little relation, including:
Judge whether to install network to test the speed application or network management-application;
Test the speed application or during network management-application when installing described network, tested the speed application or described network pipe by described network Ought to be by the magnitude relationship determined between the network connection speed of described application program spendable multiple network connected mode.
5. the method as described in claim 1-4 is arbitrary, it is characterised in that described internetwork connection mode includes Wireless Fidelity WIFI With mobile data traffic.
6. the method for claim 1, it is characterised in that whether wrap in the described network connectivity option determining application program Before including specified option, also include:
Receive option and instruction is set;
Instruction is set based on described option, the network connectivity option of described application program is configured.
7. a network connection device, it is characterised in that described device includes:
First determines module, whether includes specified option in the network connectivity option determining application program;
Second determines module, for when the network connectivity option of described application program includes described specified option, determines institute State the magnitude relationship between the network connection speed of application program spendable multiple network connected mode;
Select module, for based on described magnitude relationship, from described multiple network connected mode, select network connection speed Big internetwork connection mode carries out network connection.
8. device as claimed in claim 7, it is characterised in that described second determines that module includes:
Acquiring unit, carries out the network delay of network connection for obtaining described application program under every kind of internetwork connection mode;
First determines unit, for by described network delay determine described multiple network connected mode network connection speed it Between magnitude relationship.
9. device as claimed in claim 8, it is characterised in that described acquiring unit includes:
Send subelement, for for every kind of internetwork connection mode in described multiple network connected mode, by described net When network connected mode carries out network connection, send request message by described application program to corresponding application server;
First determines subelement, for determining the transmission time of described request message;
Second determines subelement, for when receiving the response message that described application server returns based on described request message Time, determine the reception time receiving described response message;
Computation subunit, for calculating the time difference between described transmission time and described reception time;
3rd determines subelement, for described time difference is defined as the network delay of described internetwork connection mode.
10. device as claimed in claim 7, it is characterised in that described second determines that module includes:
Judging unit, is used for judging whether installing network and tests the speed application or network management-application;
Second determines unit, for testing the speed application or during network management-application when installing described network, is surveyed by described network Speed application or described network management-application determine that the network of described application program spendable multiple network connected mode connects speed Magnitude relationship between degree.
11. devices as described in claim 7-10 is arbitrary, it is characterised in that described internetwork connection mode includes Wireless Fidelity WIFI and mobile data traffic.
12. devices as claimed in claim 7, it is characterised in that described device also includes:
Receiver module, is used for receiving option and arranges instruction;
Module is set, for arranging instruction based on described option, the network connectivity option of described application program is configured.
13. 1 kinds of network connection devices, it is characterised in that described device includes:
Processor;
For storing the memorizer of processor executable;
Wherein, described processor is configured to:
Determine in the network connectivity option of application program and whether include specified option;
When the network connectivity option of described application program includes described specified option, determine that described application program is spendable Magnitude relationship between the network connection speed of multiple network connected mode;
Based on described magnitude relationship, from described multiple network connected mode, the network selecting network connection speed maximum connects Mode carries out network connection.
CN201610581689.0A 2016-07-21 2016-07-21 Method for connecting network and device Pending CN106162831A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610581689.0A CN106162831A (en) 2016-07-21 2016-07-21 Method for connecting network and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610581689.0A CN106162831A (en) 2016-07-21 2016-07-21 Method for connecting network and device

Publications (1)

Publication Number Publication Date
CN106162831A true CN106162831A (en) 2016-11-23

Family

ID=58059966

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610581689.0A Pending CN106162831A (en) 2016-07-21 2016-07-21 Method for connecting network and device

Country Status (1)

Country Link
CN (1) CN106162831A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107566473A (en) * 2017-08-28 2018-01-09 南京南瑞继保电气有限公司 A kind of electric power secondary system equipment check method
US10594568B2 (en) 2017-12-01 2020-03-17 Beijing Baidu Netcom Science And Technology Co., Ltd. Method and apparatus for measuring a data transmission speed, device and computer readable medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103607780A (en) * 2013-11-19 2014-02-26 惠州Tcl移动通信有限公司 Mobile device and network connection method thereof
US20140372592A1 (en) * 2013-06-14 2014-12-18 Tencent Technology (Shenzhen) Company Limited Method, System, and Device for Initializing a Media Equipment
CN104796956A (en) * 2015-04-23 2015-07-22 陆俊 Mobile terminal network switching method and mobile terminal
CN105246135A (en) * 2015-09-23 2016-01-13 小米科技有限责任公司 Wireless network accessing method and device, and mobile terminal
CN105472706A (en) * 2015-12-09 2016-04-06 小米科技有限责任公司 Method and device for connection establishment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140372592A1 (en) * 2013-06-14 2014-12-18 Tencent Technology (Shenzhen) Company Limited Method, System, and Device for Initializing a Media Equipment
CN103607780A (en) * 2013-11-19 2014-02-26 惠州Tcl移动通信有限公司 Mobile device and network connection method thereof
CN104796956A (en) * 2015-04-23 2015-07-22 陆俊 Mobile terminal network switching method and mobile terminal
CN105246135A (en) * 2015-09-23 2016-01-13 小米科技有限责任公司 Wireless network accessing method and device, and mobile terminal
CN105472706A (en) * 2015-12-09 2016-04-06 小米科技有限责任公司 Method and device for connection establishment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107566473A (en) * 2017-08-28 2018-01-09 南京南瑞继保电气有限公司 A kind of electric power secondary system equipment check method
US10594568B2 (en) 2017-12-01 2020-03-17 Beijing Baidu Netcom Science And Technology Co., Ltd. Method and apparatus for measuring a data transmission speed, device and computer readable medium

Similar Documents

Publication Publication Date Title
CN104159275B (en) Method for connecting network and device
CN104156233B (en) Light application off-line update method, device and terminal
CN105302727A (en) Testing method, device and system
CN104506443B (en) Router sets interface display method and device
CN105095081B (en) The function test method and device of application program
CN106254467A (en) Sharing files method and device
CN109493852A (en) A kind of evaluating method and device of speech recognition
CN106210797A (en) Live network broadcast method and device
CN104092808A (en) Number marking method, device and terminal
CN104915290A (en) Application testing method and device
CN109213683A (en) Method for generating test case and device
CN106293837A (en) Open the method and device at interface
CN107368233A (en) Switching method, device and the equipment of background picture
CN106096009A (en) Method for generating message and device
CN109246227A (en) A kind of data request method, device, terminal device and storage medium
CN106303198A (en) Photographing information acquisition methods and device
CN109560986A (en) Test method, device and the test macro of things-internet gateway equipment
CN105954706A (en) Intelligent device positioning method and device
CN105848287A (en) Method, device and system for processing terminal positioning and router
CN105335138A (en) Calendar event reminding method and device
CN105975038A (en) Prompt method and device of charging port detection result
CN105517078A (en) Network connection switching method and device
CN107819740A (en) Verification method, terminal device, audio amplifier and the server of terminal device
CN106162831A (en) Method for connecting network and device
CN106559479A (en) Multimedia file downloading method, designated equipment and terminal

Legal Events

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