CN105657711B - A kind of method for connecting network and electronic equipment - Google Patents
A kind of method for connecting network and electronic equipment Download PDFInfo
- Publication number
- CN105657711B CN105657711B CN201510131609.7A CN201510131609A CN105657711B CN 105657711 B CN105657711 B CN 105657711B CN 201510131609 A CN201510131609 A CN 201510131609A CN 105657711 B CN105657711 B CN 105657711B
- Authority
- CN
- China
- Prior art keywords
- network
- network type
- type
- electronic equipment
- operating system
- 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
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W12/00—Security arrangements; Authentication; Protecting privacy or anonymity
- H04W12/08—Access security
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W24/00—Supervisory, monitoring or testing arrangements
- H04W24/02—Arrangements for optimising operational condition
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Small-Scale Networks (AREA)
Abstract
The embodiment of the present invention provides a kind of method for connecting network and electronic equipment, and wherein method is applied to be provided with the electronic equipment of at least two operating systems, and method includes:Detect available network;Determine the network type of the available network;Judge whether the network type allows the connection network type corresponding with operating system that the electronic equipment is current;If so, connecting the available network;If it is not, cancelling the connection available network.The present invention is based on the angle for considering the current working condition of electronic equipment, and the network type for allowing connection by the operating system current to electronic equipment is limited, and is reduced electronic equipment and is used security risk during network.
Description
Technical field
The present invention relates to communication technical field, and in particular to a kind of method for connecting network and electronic equipment.
Background technology
With the development of network technology, the electronic equipment alternative access network network such as mobile phone, notebook computer is more and more,
As available WIFI (WIreless Fidelity, Wireless Fidelity) network nearby, or 3G (third generation movements may be selected in mobile phone
The communication technology), the mobile communications network such as 4G (forth generation mobile communication technology) carry out network insertion.Although electronic equipment may be selected
Access network it is more and more, but the security of heterogeneous networks also and differs;As under WIFI network scene, it is understood that there may be available for
The public network of arbitrary equipment access, also has and only limits home network, job network that the electronic equipment known the cipher is accessed etc., show
So it is available for home network, working net of the security significantly lower than only limit particular device access of the public network of arbitrary equipment access
Network etc..
The mode of current electronic equipment connection network is mainly:If there is available network near electronic equipment, electronics is set
The standby prompting for carrying out nearby having available network, user is after selected a certain network is attached, if the network selected is
Common network, then electronic equipment be directly accessed selected network;If the network selected is home network, job network
Deng, then electronic equipment will be prompted to be attached the input of password, only connect Password Input it is correct when, electronic equipment can just connect
Enter selected network.
The present inventor has found that the mode of the existing connection network of electronic equipment does not consider in research process
The current working condition of electronic equipment, this will be after electronic equipment connection network, and increase electronic equipment uses safety during network
Risk, increases the leaking data risk of electronic equipment;Such as current working condition of electronic equipment needs the higher network of security,
And now random access common network, or the relatively low home network of security etc., it can undoubtedly increase electronic equipment and use net
Security risk during network.Therefore how when electronic equipment carries out network connection, it is considered to the current working condition of electronic equipment, choosing
Select suitable network to be attached, to reduce electronic equipment using security risk during network, needed as those skilled in the art
The problem of considering.
The content of the invention
In view of this, the embodiment of the present invention provides a kind of method for connecting network and electronic equipment, to be carried out in electronic equipment
During network connection, it is considered to the current working condition of electronic equipment, select suitable network to be attached, reduce electronic equipment and use
Security risk during network.
To achieve the above object, the embodiment of the present invention provides following technical scheme:
A kind of method for connecting network, applied to the electronic equipment for being provided with least two operating systems, methods described includes:
Detect available network;
Determine the network type of the available network;
Judge the network type whether the operating system current with the electronic equipment allow be connected network type pair
Should;
If so, connecting the available network;
If it is not, cancelling the connection available network.
Wherein, the network type for determining the available network includes:
Determine the mailing address of the available network;
According to the mailing address of setting and the corresponding relation of network type, the network class corresponding to the mailing address is determined
Type.
Wherein, the mailing address and the corresponding relation of network type according to setting, determines that the mailing address institute is right
The network type answered includes:
The mailing address and the history corresponding relation of network type prestored according to the electronic equipment, it is determined that it is described communicatedly
Network type corresponding to location, wherein, the history corresponding relation according to the electronic equipment history connect network when, user
The network type of the network connected of setting is determined;
Or, obtain the mark that is stored of cloud server and have the data of corresponding network type, according to being obtained
The mark taken has the data of corresponding network type, determines the network type corresponding to the mailing address;
Or, the corresponding network type of the mailing address is asked to cloud server, server is according to being stored beyond the clouds
Mark have the data of corresponding network type, determine after the corresponding network type of the mailing address, obtain institute
The information for including the corresponding network type of the mailing address of cloud server transmission is stated, to determine that the mailing address institute is right
The network type answered.
Wherein, the mailing address and the corresponding relation of network type according to setting, determines that the mailing address institute is right
The network type answered includes:
In the history corresponding relation of the mailing address and network type prestored according to the electronic equipment, it is impossible to determine institute
When stating the network type corresponding to mailing address, the mark that acquisition cloud server is stored has corresponding network class
The data of type, the data for having corresponding network type according to acquired mark determine that the mailing address institute is right
The network type answered;
Or, in the history corresponding relation of the mailing address and network type prestored according to the electronic equipment, it is impossible to it is determined that
When going out the network type corresponding to the mailing address, the corresponding network type of the mailing address is asked to cloud server,
Server has the data of corresponding network type according to the mark stored beyond the clouds, determines the mailing address pair
After the network type answered, the information for including the corresponding network type of the mailing address that the cloud server is sent is obtained,
To determine the network type corresponding to the mailing address.
Wherein, it is described judge the network type whether the operating system current with the electronic equipment allow be connected net
Network type correspondence includes:
The mark of the current operating system of the electronic equipment is determined, wherein, one mark of an operating system correspondence, respectively
The corresponding mark of operating system is different;
According to the corresponding relation identified with allowing to be connected network type of operating system set in advance, it is determined that current behaviour
Make allowing connection network type corresponding to the mark of system, wherein, the mark of each operating system is to that should have respective permission
Connect network type;
Judge that the network type allows connection network type whether corresponding with identified.
Wherein, the current operating system of the electronic equipment allow connection network type include:Multiple connection priorities
Different network types;
The connection available network includes:
It is determined that allowing with operating system that the electronic equipment is current in the corresponding available network of connection network type, net
The connection priority highest network of network type;
Network determined by connection.
Wherein, the method for connecting network also includes:
After the available network is connected, if detect the operating system current with the electronic equipment allow be connected net
The corresponding new available network of network type, and the network type connection priority of detected new available network is higher than current connection
Network network type connection priority, then point out user to connect the new available network, or connect and described newly may be used automatically
Use network.
Wherein, a class of the current operating system of the electronic equipment allows under connection network type, is divided into connection preferential
The different sub-network of level;
The connection available network includes:
Choose allows to connect the corresponding available network of network type with a class of the operating system that the electronic equipment is current
In, connection priority highest sub-network is attached.
Wherein, the method for connecting network also includes:
After the available network is connected, if detect the operating system current with the electronic equipment allow be connected net
The corresponding new available network of network type, and the network type of the new available network and the network type phase for the network being currently connected
Together, and the connection priority of the new available network is higher than the network that currently connects, then point out user's connection the newly available net
Network, or the new available network is connected automatically.
The embodiment of the present invention also provides a kind of electronic equipment, and the electronic equipment is provided with the electricity of at least two operating systems
Sub- equipment, the electronic equipment includes:
Network detection module, for detecting available network;
Determination type module, the network type for determining the available network;
Correspondence judge module, for judge the network type whether the operating system current with the electronic equipment permit
Perhaps connection network type is corresponding;
Link block, during for the judged result in the correspondence judge module to be, connects the available network;
Cancel link block, for it is described correspondence judge module judged result for it is no when, cancel connection described in can use
Network.
Based on above-mentioned technical proposal, method for connecting network provided in an embodiment of the present invention, applied to being provided with least two
In the electronic equipment of operating system, and each operating system of electronic equipment each allows connection network type to that should have;In electricity
When sub- equipment carries out network connection, if detecting available network, the network type of the available network and electronic equipment are worked as
Preceding operating system allows the connection network type to be compared, the only network type and electronic equipment in the available network
Current operating system when allowing connection network type to correspondence just connects the available network, and in the available network
Network type and operating system that electronic equipment is current allow connection network type not to it is corresponding when then without network connection.
The embodiment of the present invention sets each operating system is corresponding to allow to connect by the electronic equipment to being provided with least two operating systems
Network type is connect, under the current operating system of electronic equipment, network type and the electricity of only currently detected available network
The current operating system of sub- equipment allow connection network type to correspondence when just connect the available network;Based on consideration electronics
The angle of the current working condition of equipment, the network type for allowing connection by the operating system current to electronic equipment is limited
System, it is to avoid electronic equipment allows to be connected network type not in connection under current operation system with current operating system
The situation of corresponding network occurs so that electronic equipment can only connect the net of specific network type under current operation system
Network, reduces electronic equipment and uses security risk during network.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing
There is the accompanying drawing used required in technology description to be briefly described, it should be apparent that, drawings in the following description are only this
The embodiment of invention, for those of ordinary skill in the art, on the premise of not paying creative work, can also basis
The accompanying drawing of offer obtains other accompanying drawings.
Fig. 1 is the flow chart of method for connecting network provided in an embodiment of the present invention;
Fig. 2 is the method flow diagram provided in an embodiment of the present invention for determining the network type corresponding to mailing address;
Fig. 3 is the another method flow chart provided in an embodiment of the present invention for determining the network type corresponding to mailing address;
Fig. 4 is another flow chart of method for connecting network provided in an embodiment of the present invention;
Fig. 5 is another flow chart of method for connecting network provided in an embodiment of the present invention;
Fig. 6 is the another flow chart of method for connecting network provided in an embodiment of the present invention;
Fig. 7 is another flow chart again of method for connecting network provided in an embodiment of the present invention;
Fig. 8 is the structured flowchart of electronic equipment provided in an embodiment of the present invention;
Fig. 9 is the structured flowchart of determination type module provided in an embodiment of the present invention;
Figure 10 is the structured flowchart of correspondence judge module provided in an embodiment of the present invention;
Figure 11 is the structured flowchart of link block provided in an embodiment of the present invention;
Figure 12 is another structured flowchart of electronic equipment provided in an embodiment of the present invention;
Figure 13 is another structured flowchart of link block provided in an embodiment of the present invention;
Figure 14 is another structured flowchart of electronic equipment provided in an embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete
Site preparation is described, it is clear that described embodiment is only a part of embodiment of the invention, rather than whole embodiments.It is based on
Embodiment in the present invention, it is every other that those of ordinary skill in the art are obtained under the premise of creative work is not made
Embodiment, belongs to the scope of protection of the invention.
Fig. 1 is the flow chart of method for connecting network provided in an embodiment of the present invention, and the method for connecting network can be applied to peace
Electronic equipment equipped with least two operating systems, the electronic equipment can switch over work at least two operating system
Make, smart mobile phone that electronic equipment can be such as with least two operating systems, tablet personal computer, notebook computer etc.;Reference picture 1,
This method can include:
Step S100, detection available network;
Optionally, electronic equipment can search for neighbouring available WIFI network, mobile communications network such as 3G, 4G etc.;Net can be used
Network refers to the network that can be accessed that electronic equipment is supported.
Step S110, the network type for determining the available network;
For the available network that each is detected, electronic equipment will determine the network type of each available network;Network class
Type can be the use environment type of network, such as common network (such as airport, the LAN of eating and drinking establishment's setting), working net
Network (LAN for the confession employee work online that such as certain company is set), the home network (LAN that such as a certain family is set
Network etc.), ad-hoc networks (network that such as vpn (VPN) is only used for professional etc.);Network type can also
For the standard of network, such as 2G (Generation Mobile Telecommunication System technology), 3G, 4G network.
Optionally, for the available network detected, the network type of available network can be set by user;As user for
The a certain LAN detected, can set the network type of currently available network according to network name;
Optionally, for the available network detected, electronic equipment also can be corresponding with network type according to mailing address
Relation, it is true by the mailing address (such as MAC (Media Access Control, media access control) address etc.) of available network
Fixed corresponding network type.
Step S120, judge the network type whether the operating system current with the electronic equipment allow be connected net
Network type correspondence, if so, step S130 is performed, if it is not, performing step S140;
Optionally, each operating system installed for electronic equipment, the embodiment of the present invention can be respectively provided with corresponding fair
Perhaps network type is connected;As electronic equipment is provided with two operating systems, it is divided into the first operating system and the second operating system, then
The embodiment of the present invention corresponding to the setting of the first operating system can allow to connect network type, and correspondence is set to the second operating system
Allow connect network type, the first operating system is corresponding to allow the permission corresponding with the second operating system of connection network type
Connect network type can part it is identical, also can be entirely different;
Optionally, the corresponding Web vector graphic environmental form for allowing to connect of each operating system can be set in the embodiment of the present invention,
Common network such as is set under the first operating system, and/or, job network, and/or, home network, and/or, ad-hoc networks are
Allow to connect network type;
Optionally, the corresponding network formats type for allowing to connect of each operating system can be set in the embodiment of the present invention, such as exists
3G, and/or 4G networks is set under first operating system to allow to connect network type.
Step S130, the connection available network;
Optionally, if in the available network detected, the allowing of the operating system current with electronic equipment is connected network class
The corresponding network of type has multiple, then the embodiment of the present invention can be randomly selected allows connection network type corresponding one with described
Available network is attached;It is current with electronic equipment such as the network type of network 1 and network 2 in the available network that is detected
Operating system allow connection network type it is corresponding, then electronic equipment can randomly select network 1 or network 2 is attached;
Obviously, the current operating system of the electronic equipment allow connection network type can have multiple, it is many for this
Individual to allow to connect network type, connection priority can be set in the embodiment of the present invention;In the available network detected, the present invention is real
Applying example and can choosing allows connection network type corresponding to described, and the connection priority highest network of network type is connected
Connect;Such as the network type of network 1 and network 2 in the available network that is detected, the permission of current operating system with electronic equipment
Connect network type corresponding, and the network type of network 1 is different from the network type of network 2, the company of the network type of network 1
Connection priority of the priority higher than the network type of network 2 is connect, then the optional network 1 of the embodiment of the present invention is attached.
Step S140, the cancellation connection available network.
For the network type of detected available network, current operating system allows company with the electronic equipment
The not corresponding situation of network type is connect, the embodiment of the present invention can be without network connection, even if the available network detected is to go through
Network after history connection;Such as a certain network electronic devices were connected in the past, but the network type of the network, with stating electronic equipment
Current operating system allow connection network type do not correspond to, then electronic equipment will not connect the network automatically.
Method for connecting network provided in an embodiment of the present invention, applied to the electronic equipment for being provided with least two operating systems
In, and each operating system of electronic equipment each allows connection network type to that should have;Network connection is carried out in electronic equipment
When, if detecting available network, by the permission of the network type of the available network and the current operating system of electronic equipment
Connection network type is compared, only in the network type of the available network and permitting for the current operating system of electronic equipment
The available network is just connected when connecting network type perhaps to correspondence, and in the network type and electronic equipment of the available network
Current operating system allow connection network type not to correspondence when then without network connection.It is right that the embodiment of the present invention passes through
The electronic equipment of at least two operating systems is installed, sets each operating system is corresponding to allow to connect network type, in electronics
Under the current operating system of equipment, network type and the operation system of electronic equipment currently of only currently detected available network
That unites just connects the available network when allowing connection network type to correspondence;The working condition current based on electronic equipment is considered
Angle, the network type for allowing connection by the operating system current to electronic equipment limits, it is to avoid electronic equipment
Under current operation system, sent out in connection with the situation for allowing to connect the not corresponding network of network type of current operating system
It is raw so that electronic equipment can only connect the network of specific network type under current operation system, and reducing electronic equipment makes
With security risk during network.
Optionally, it is determined that detected available network network type when, the embodiment of the present invention can pass through setting
The corresponding relation of mailing address and network type, determines the network type corresponding to the mailing address of available network, so as to realize
The determination of the network type of detected available network.
A kind of optional mailing address and the corresponding relation of network type according to setting, determines that the mailing address institute is right
The mode for the network type answered is:Locally prestore the history corresponding relation of mailing address and network type in electronic equipment, it is determined that
Network type corresponding to the mailing address of available network;Wherein, the history corresponding relation root of institute's mailing address and network type
According to electronic equipment when history connects network, the network type of the network connected of user's setting is determined;
Electronic equipment can eject prompting frame when accessing a certain network, point out user the net for the network that determination is currently connected
Network type, user after it have selected the network type of the network currently connected, the recordable network currently connected of electronic equipment
The network type that mailing address is selected with user, so as to set up corresponding relation and store;The mailing address of the network stored with
The corresponding relation for the network type that user selectes, can it is determined that detected available network network type when gone through as described
History corresponding relation is called, so that it is determined that the network type corresponding to the mailing address of detected available network.
Another optional mailing address and the corresponding relation of network type according to setting, determines the mailing address institute
The mode of corresponding network type is:Storage is marked with the data of the corresponding network type of mailing address in server beyond the clouds,
The mark that electronic equipment can be stored by obtaining cloud server has the data of corresponding network type, so that root
There are the data of corresponding network type according to acquired mark, determine the network class corresponding to the mailing address
Type;
Optionally, any user is after it marked the network type of a certain network, and the electronic equipment that the user is held can
The network address of the network of user's current markers and network type are uploaded to cloud server, cloud server collects many
The network address and network type that individual user is marked, so as to realize the data for being marked with the corresponding network type of mailing address
Storage;When user electronic equipment it is determined that currently detected available network network type when, can be by obtaining high in the clouds
Data stored in server, so as to realize network type corresponding to the mailing address of detected available network really
It is fixed.
Another optional mailing address and the corresponding relation of network type according to setting, determines the mailing address institute
The mode of corresponding network type is:Storage is marked with the data of the corresponding network type of mailing address in server beyond the clouds,
Electronic equipment it is determined that during the corresponding network type of detected available network, can ask detected to cloud server
The corresponding network type of mailing address of available network, cloud server has corresponding net according to the mark stored
The data of network type, are determined after the corresponding network type of the mailing address, can be sent to electronic equipment comprising described in communicatedly
The information of the corresponding network type in location, electronic equipment is after the information is got, it may be determined that detected available network it is logical
Believe the network type corresponding to address.
Optionally, three kinds be illustrated above determine the mode of the network type corresponding to the mailing address, and can combine makes
With;Fig. 2 shows the method flow diagram of the network type corresponding to determination mailing address provided in an embodiment of the present invention, reference picture
2, this method can include:
Step S200, the history corresponding relation for transferring mailing address that electronic equipment prestores and network type;
Step S210, judge whether the logical of currently detected available network can determine that according to the history corresponding relation
The network type corresponding to address is believed, if so, step S220 is performed, if it is not, performing step S230;
Step S220, the mailing address prestored according to the electronic equipment and network type history corresponding relation, it is determined that
Network type corresponding to the mailing address;
The mark that step S230, acquisition cloud server are stored has the data of corresponding network type, root
There are the data of corresponding network type according to acquired mark, determine the network class corresponding to the mailing address
Type.
As can be seen that the embodiment of the present invention is in the mailing address prestored according to the electronic equipment and the history of network type
Corresponding relation, it is impossible to when determining the network type corresponding to the mailing address, can obtain the mark that cloud server is stored
Note has the data of the corresponding network type of mailing address, there is the number of corresponding network type according to acquired mark
According to determining the network type corresponding to the mailing address.In this way, the acquisition of network data can be reduced as far as possible, subtracted
Few channel occupancy and flow are used.
Optionally, Fig. 3 shows the another of the network type corresponding to determination mailing address provided in an embodiment of the present invention
Method flow diagram, reference picture 3, this method can include:
Step S300, the history corresponding relation for transferring mailing address that electronic equipment prestores and network type;
Step S310, judge whether the logical of currently detected available network can determine that according to the history corresponding relation
The network type corresponding to address is believed, if so, step S320 is performed, if it is not, performing step S330;
Step S320, the mailing address prestored according to the electronic equipment and network type history corresponding relation, it is determined that
Network type corresponding to the mailing address;
Step S330, the corresponding network type of the mailing address is asked to cloud server, beyond the clouds server according to
The mark stored has the data of corresponding network type, determines after the corresponding network type of the mailing address,
Obtain the information for include the corresponding network type of the mailing address that the cloud server is sent, with described in determining communicatedly
Network type corresponding to location.
As can be seen that the embodiment of the present invention is in the mailing address prestored according to the electronic equipment and the history of network type
Corresponding relation, it is impossible to when determining the network type corresponding to the mailing address, electronic equipment can be asked to cloud server
The corresponding network type of the mailing address, beyond the clouds server corresponding network class is had according to the mark stored
The data of type, are determined after the corresponding network type of the mailing address, and electronic equipment can obtain what the cloud server was sent
The information of the corresponding network type of the mailing address is included, to determine the network type corresponding to the mailing address.Pass through
This mode, the acquisition of network data can be reduced as far as possible, channel occupancy is reduced and flow is used.
Optionally, method for connecting network provided in an embodiment of the present invention is connecting mobile radio communication suitable for electronic equipment
Network is, it is necessary to carry out the situation of LAN connection, in the case, can pass through mobile communications network and realize and cloud server
Communication;Optionally, method for connecting network provided in an embodiment of the present invention is equally applicable to electronic equipment and is connecting LAN,
Need the situation for moving communication network connection, in the case, can be realized by LAN logical with cloud server
Letter;Obviously, method for connecting network provided in an embodiment of the present invention is equally applicable to electronic equipment between mobile communications network
Communication switching, or the communication switching between LAN.
Optionally, judge the network type whether the operating system current with the electronic equipment allow be connected net
Network type to correspondence when the embodiment of the present invention can call current operation system set in advance allow connection network type (can root
Set according to practical situations), realize whether the network type of the available network currently detected is corresponding and judge;Specifically,
The embodiment of the present invention can set different marks for different operating system, be connected by setting up the mark of operating system with allowing
The corresponding relation of network type, realizes the corresponding setting for allowing to connect network type of each operating system.Fig. 4 shows this hair
Another flow chart for the method for connecting network that bright embodiment is provided, reference picture 4, this method can include:
Step S400, detection available network;
Step S410, the network type for determining the available network;
Step S420, the mark for determining the current operating system of the electronic equipment, wherein, an operating system correspondence one
Individual mark, each operating system is corresponding to identify difference;
Step S430, according to operating system set in advance mark and allow connect network type corresponding relation,
It is determined that allowing corresponding to the mark of current operating system connects network type, wherein, the mark of each operating system is corresponded to
Have it is respective allow connect network type;
Step S440, judge the network type with it is identified allow connection network type it is whether corresponding, if so, perform
Step S450, if it is not, performing step S460;
Step S450, the connection available network;
Step S460, the cancellation connection available network.
Optionally, for operating system allow connect network type, the embodiment of the present invention can be set it is multiple, and one
The multiple of individual operating system allow the connection priority for connecting network type different;I.e. for the current operating system of electronic equipment
Allow connection network type for, the different network type of multiple connection priorities can be included;Based on this situation, it is of the invention
Embodiment can allow the connection network type corresponding many when connecting available network from operating system that electronic equipment is current
In individual available network, the connection priority highest network for choosing network type is accessed.
Fig. 5 shows another flow chart of method for connecting network provided in an embodiment of the present invention, reference picture 5, and this method can
With including:
Step S500, detection available network;
Step S510, the network type for determining the available network;
Step S520, judge the network type whether the operating system current with the electronic equipment allow be connected net
Network type correspondence, if so, step S530 is performed, if it is not, performing step S550;
Step S530, determination allow connection network type corresponding available with operating system that the electronic equipment is current
In network, the connection priority highest network of network type;
Network determined by step S540, connection;
Step S550, the cancellation connection available network.
It is to be set with the electronics in available network it is worth noting that, the network type for the network that step S540 is connected
Allow connection network type corresponding for current operating system, and connection priority highest network;But the net connected
The network type of network, being not necessarily the connection priority highest of set current operating system allows to connect network class
Type.
As setting current operating system allow connect network type connection priority be from high to low:Class1,
Type 2, type 3;And in currently detected available network, the allowing of the operating system current with the electronic equipment is connected net
Corresponding network type is network 1 and network 2, and the network type of network 1 is type 2, and the network type of network 2 is type 3, then this
When choose network 2 connect.
Optionally, if after connection available network, electronic equipment detects permitting for the operating system current with electronic equipment
Perhaps connection network type correspondence, and situation of the connection priority higher than the network that electronic equipment is currently connected of network type, then
Electronic equipment will be prompted to carry out the connection of the available network of the high connection priority, or automatic connection.
Corresponding, method for connecting network provided in an embodiment of the present invention can also include following after connection available network
Step:If detect allows the corresponding new available network of connection network type with operating system that the electronic equipment is current,
And the network type connection priority of detected new available network is higher than the connection of the network type of the network currently connected
Priority, then point out user to connect the new available network, or connect the new available network automatically.
As setting current operating system allow connect network type connection priority be from high to low:Class1,
Type 2, type 3;And in currently detected available network, the allowing of the operating system current with the electronic equipment is connected net
The corresponding network of network type is network 1 and network 2, and the network type of network 1 is type 2, and the network type of network 2 is type 3,
Network 2 is then now chosen to connect;After connection network 2, it can use if detecting network 3, and the network type of network 3 is Class1,
Higher than the connection priority of network 2, then electronic equipment can point out connection that user carries out network 3 and point out the connection of network 3 excellent
First level is higher than network 2, or network connection is switched to network 3 by electronic equipment by network 2 automatically.
Optionally, the class for the current operating system of electronic equipment allows to connect network type, the embodiment of the present invention
The different sub-network of settable connection priority, can be to the several tools of certain under dedicated network type such as under dedicated network type
Body dedicated network is attached the setting of priority.Fig. 6 shows the another of method for connecting network provided in an embodiment of the present invention
Flow chart, reference picture 6, this method can include:
Step S600, detection available network;
Step S610, the network type for determining the available network;
Step S620, judge the network type whether the operating system current with the electronic equipment allow be connected net
Network type correspondence, if so, step S630 is performed, if it is not, performing step S640;
Step S630, selection allow connection network type corresponding with a class of the operating system that the electronic equipment is current
In available network, connection priority highest sub-network is attached;
Step S640, the cancellation connection available network.
Optionally, method shown in Fig. 5 and Fig. 6 may be used in combination, and the connection for allowing to connect network type by setting is preferential
Level, and a class allow to connect the different sub-network of connection priority under network type, realize the access of network.Fig. 7 is the present invention
Another flow chart again for the method for connecting network that embodiment is provided, reference picture 7, this method can include:
Step S700, detection available network;
Step S710, the network type for determining the available network;
Step S720, judge the network type whether the operating system current with the electronic equipment allow be connected net
Network type correspondence, if so, step S730 is performed, if it is not, performing step S760;
Step S730, determination allow connection network type corresponding available with operating system that the electronic equipment is current
In network, the connection priority highest network of network type;
Step S740, determine in the connection priority highest network of the network type, connection priority highest
Network;
Sub-network determined by step S750, connection;
Step S760, the cancellation connection available network.
It is worth noting that, the embodiment of the present invention is first in available network, it is determined that the operation with the electronic equipment currently
System allows connection network type correspondence, and the connection priority highest network of network type;If identified connection is excellent
The network of first level highest network type have it is multiple, then can be different according to connection priority under such network type of setting
Sub-network, chooses wherein connection priority highest sub-network and is attached.
Such as set the current operating system of electronic equipment allow connect network type connection priority be from high to low:
Class1, type 2, type 3;And the sub-network of connection priority from high to low is set under Class1:Network 11, network 12 etc.;Class
The sub-network of 2 times setting connection priorities of type from high to low:Network 21, network 22 etc.;By parity of reasoning.In the available of current detection
In network, the corresponding network of connection network type is allowed to be network 11, network with operating system that the electronic equipment is current
12, network 21, network 31;Connection priority highest network 11 and network 12 that network type is Class1 are then chosen, and in class
Connection priority highest network 11 is chosen under type 1 from network 11 and network 12 to be attached.
It is worth noting that, the current operating system of electronic equipment involved by the embodiment of the present invention allow connect network
Type (including:The situation of the different network-connectable type of multiple connection priorities, and/or, a class allows to connect network type
Under, it is divided into the situation of the different sub-network of connection priority), visual practical situations are set, such as by user according to making
Carried out with situation self-defined etc., the embodiment of the present invention is not restricted.
An application examples provided in an embodiment of the present invention is introduced below;The concrete operations system that hereafter application examples is related to
Unite title, specific network type, concrete application scene etc. is only for ease of example, and it should not cause limit to protection scope of the present invention
System.
Dual-system panel personal computer can be provided with Android system and WP (Windows Phone) system, WP systems due to suitable for
Office, therefore the higher network type of security can be set to allow to connect network type under WP systems, to reduce flat board electricity
Application risk when brain is handled official business under WP systems;And Android system is suitable to consumer entertainment, the requirement for security is relatively low, therefore
The relatively low network type of settable security is to allow to connect network type;Specifically, settable WP systems allow connect net
Network type is job network and dedicated network, and the connection priority of dedicated network is higher than job network, the permission of Android system
Connection network type is common network, home network and job network, and common network, the connection of home network and job network
Priority is from low to high;
When tablet personal computer is in WP systems, it is if detecting available network:The common network 1 of certain eating and drinking establishment, company
Job network 2, vpn dedicated networks 3;Then determine that the job network 2 of company and the network type of vpn dedicated networks 3 are WP systems
Allow connect network type, the common network 1 of certain eating and drinking establishment be not WP systems allow connect network type, and connect into height
The vpn dedicated networks 3 of connection priority;Obviously, if only detecting job network or dedicated network, it can choose detected
Job network or dedicated network access;
When tablet personal computer is in Android system, it is if detecting available network:The common network 1 of certain eating and drinking establishment, family
Network 3, then connect the home network 3 into high connection priority;Obviously, can if only detecting common network or home network
Home network or home network access detected by choosing.
The embodiment of the present invention is when electronic equipment connects network, it is considered to the current working condition of electronic equipment, by electricity
Sub- equipment current operating system allows the network type of connection to be limited, it is to avoid electronic equipment is in current operation system
Under, connect and occur with the situation for allowing to connect the not corresponding network of network type of current operating system so that electronic equipment
Under current operation system, the network of specific network type can only be connected, electronic equipment is reduced and uses safety during network
Risk.
Electronic equipment provided in an embodiment of the present invention is introduced below, electronic equipment described below can be with retouching above
The method for connecting network stated is mutually to should refer to.
Fig. 8 is the structured flowchart of electronic equipment provided in an embodiment of the present invention, and the electronic equipment can be provided with least two
The electronic equipment of operating system, the electronic equipment can switch over work, electronic equipment at least two operating system
Smart mobile phone that can be such as with least two operating systems, tablet personal computer, notebook computer etc.;Reference picture 1, the electronic equipment can
With including:
Network detection module 100, for detecting available network;
Determination type module 200, the network type for determining the available network;
Correspondence judge module 300, for judge the network type whether the operating system current with the electronic equipment
Allow connection network type correspondence;
Link block 400, during for the judged result in the correspondence judge module to be, connects the available network;
Cancel link block 500, for the judged result in the correspondence judge module for it is no when, cancelling that connection is described can
Use network.
Optionally, Fig. 9 shows a kind of alternative construction of determination type module 200 provided in an embodiment of the present invention, reference
Fig. 9, determination type module 200 can include:
Address determination unit 210, the mailing address for determining the available network;
Type determines execution unit 220, for the mailing address and the corresponding relation of network type according to setting, determines institute
State the network type corresponding to mailing address.
In the first implementation, type determines that execution unit 220 is particularly used in:Prestored according to the electronic equipment
Mailing address and network type history corresponding relation, determine the network type corresponding to the mailing address, wherein, it is described
History corresponding relation according to the electronic equipment history connect network when, user setting the network connected network type
It is determined that;
In second of implementation, type determines that execution unit 220 is particularly used in:Cloud server is obtained to be stored
Mark have the data of corresponding network type, corresponding network type is had according to acquired mark
Data, determine the network type corresponding to the mailing address;
In the third implementation, type determines that execution unit 220 is particularly used in:It is described to cloud server request
The corresponding network type of mailing address, beyond the clouds server corresponding network type is had according to the mark stored
Data, are determined after the corresponding network type of the mailing address, obtain that the cloud server sends comprising it is described communicatedly
The information of the corresponding network type in location, to determine the network type corresponding to the mailing address;
In the 4th kind of implementation, type determines that execution unit 220 is particularly used in:Pre- according to the electronic equipment
The mailing address and the history corresponding relation of network type deposited, it is impossible to determine the network type corresponding to the mailing address
When, the mark that acquisition cloud server is stored has the data of corresponding network type, according to acquired mark
There are the data of the corresponding network type of mailing address, determine the network type corresponding to the mailing address;
In the 5th kind of implementation, type determines that execution unit 220 is particularly used in:Pre- according to the electronic equipment
The mailing address and the history corresponding relation of network type deposited, it is impossible to determine the network type corresponding to the mailing address
When, ask the corresponding network type of the mailing address to cloud server, beyond the clouds server according to the mark stored has
The data of the corresponding network type of mailing address, are determined after the corresponding network type of the mailing address, obtain the high in the clouds clothes
The information for including the corresponding network type of the mailing address that business device is sent, to determine the network corresponding to the mailing address
Type.
Optionally, Figure 10 shows a kind of alternative construction of correspondence judge module 300 provided in an embodiment of the present invention, reference
Figure 10, correspondence judge module 300 can include:
Mark determining unit 310, the mark for determining the current operating system of the electronic equipment, wherein, a behaviour
Make one mark of system correspondence, each operating system is corresponding to identify difference;
Allow type determining units 320, network class is connected with allowing for the mark according to operating system set in advance
The corresponding relation of type, it is determined that allowing connection network type corresponding to the mark of current operating system, wherein, each operating system
Mark to should have it is respective allow connect network type;
Judge execution unit 330, whether right allow to be connected network type for judging the network type with identified
Should.
Optionally, the current operating system of the electronic equipment allow connection network type include:Multiple connections are preferential
The different network type of level;Corresponding, Figure 11 shows a kind of optional knot of link block 400 provided in an embodiment of the present invention
Structure, reference picture 11, link block 400 can include:
The first determining unit of priority 410, for determine the operating system current with the electronic equipment allow be connected
In the corresponding available network of network type, the connection priority highest network of network type;
First connection execution unit 411, for connecting identified network.
Optionally, Figure 12 shows another structured flowchart of electronic equipment provided in an embodiment of the present invention, with reference to Fig. 8 and figure
Shown in 12, the electronic equipment can also include:
First handover module 600, for after the available network is connected, if detecting current with the electronic equipment
Operating system allows the corresponding new available network of connection network type, and the network type of detected new available network connects
The connection priority that priority is higher than the network type of the network currently connected is connect, then points out user's connection the newly available net
Network, or the new available network is connected automatically.
Optionally, a class of the current operating system of the electronic equipment allows under connection network type, is divided into connection excellent
The different sub-network of first level;Corresponding, Figure 13 shows another optional knot of link block 400 provided in an embodiment of the present invention
Structure, reference picture 13, link block 400 can include:
Second connection execution unit 420, the class for choosing with the current operating system of the electronic equipment allows to connect
Connect in the corresponding available network of network type, connection priority highest sub-network is attached.
Optionally, Figure 14 shows another structured flowchart of electronic equipment provided in an embodiment of the present invention, with reference to Fig. 8 and figure
Shown in 14, the electronic equipment can also include:
Second handover module 700, for after the available network is connected, if detecting current with the electronic equipment
Operating system allows the corresponding new available network of connection network type, and the network type of the new available network is with currently connecting
The network type of the network connect is identical, and the connection priority of the new available network is higher than the network currently connected, then points out
User connects the new available network, or connects the new available network automatically.
Electronic equipment provided in an embodiment of the present invention is when connecting network, it is considered to current working condition, by current
Operating system allow the network type of connection to be limited, it is to avoid under the current operation system, connection and current operation
The situation for allowing to connect the not corresponding network of network type of system occurs so that under current operation system, can only connect spy
The network of fixed network type, is reduced using security risk during network.
The embodiment of each in this specification is described by the way of progressive, and what each embodiment was stressed is and other
Between the difference of embodiment, each embodiment identical similar portion mutually referring to.For device disclosed in embodiment
For, because it is corresponded to the method disclosed in Example, so description is fairly simple, related part is said referring to method part
It is bright.
Professional further appreciates that, with reference to the unit of each example of the embodiments described herein description
And algorithm steps, can be realized with electronic hardware, computer software or the combination of the two, in order to clearly demonstrate hardware and
The interchangeability of software, generally describes the composition and step of each example according to function in the above description.These
Function is performed with hardware or software mode actually, depending on the application-specific and design constraint of technical scheme.Specialty
Technical staff can realize described function to each specific application using distinct methods, but this realization should not
Think beyond the scope of this invention.
Directly it can be held with reference to the step of the method or algorithm that the embodiments described herein is described with hardware, processor
Capable software module, or the two combination are implemented.Software module can be placed in random access memory (RAM), internal memory, read-only deposit
Reservoir (ROM), electrically programmable ROM, electrically erasable ROM, register, hard disk, moveable magnetic disc, CD-ROM or technology
In any other form of storage medium well known in field.
The foregoing description of the disclosed embodiments, enables professional and technical personnel in the field to realize or using the present invention.
A variety of modifications to these embodiments will be apparent for those skilled in the art, as defined herein
General Principle can be realized in other embodiments without departing from the spirit or scope of the present invention.Therefore, it is of the invention
The embodiments shown herein is not intended to be limited to, and is to fit to and principles disclosed herein and features of novelty phase one
The most wide scope caused.
Claims (9)
1. a kind of method for connecting network, it is characterised in that described applied to the electronic equipment for being provided with least two operating systems
Method includes:
Detect available network;
Determine the network type of the available network;
Judge whether the network type allows the connection network type corresponding with operating system that the electronic equipment is current;
If so, connecting the available network;
If it is not, cancelling the connection available network;
Wherein, it is described judge the network type whether the operating system current with the electronic equipment allow be connected network class
Type correspondence includes:
The mark of the current operating system of the electronic equipment is determined, wherein, one mark of an operating system correspondence, each operation
The corresponding mark of system is different;
According to the corresponding relation identified with allowing to be connected network type of operating system set in advance, it is determined that current operation system
Allowing corresponding to the mark of system connects network type, wherein, the mark of each operating system respective allows connection to that should have
Network type;
Judge that the network type allows connection network type whether corresponding with identified.
2. method for connecting network according to claim 1, it is characterised in that the network class of the determination available network
Type includes:
Determine the mailing address of the available network;
According to the mailing address of setting and the corresponding relation of network type, the network type corresponding to the mailing address is determined.
3. method for connecting network according to claim 2, it is characterised in that the mailing address and network according to setting
The corresponding relation of type, determines that the network type corresponding to the mailing address includes:
The mailing address and the history corresponding relation of network type prestored according to the electronic equipment, determines the mailing address institute
Corresponding network type, wherein, the history corresponding relation is according to the electronic equipment when history connects network, and user sets
The network connected network type determine;
Or, obtain the mark that is stored of cloud server and have the data of corresponding network type, according to acquired
The data of the corresponding network type of mailing address are marked with, the network type corresponding to the mailing address is determined;
Or, the corresponding network type of the mailing address is asked to cloud server, server is according to the mark stored beyond the clouds
Note has the data of the corresponding network type of mailing address, determines after the corresponding network type of the mailing address, obtains the cloud
The information for including the corresponding network type of the mailing address for holding server to send, to determine corresponding to the mailing address
Network type.
4. method for connecting network according to claim 2, it is characterised in that the mailing address and network according to setting
The corresponding relation of type, determines that the network type corresponding to the mailing address includes:
In the history corresponding relation of the mailing address and network type prestored according to the electronic equipment, it is impossible to determine described logical
When believing the network type corresponding to address, the mark that acquisition cloud server is stored has corresponding network type
Data, the data for having corresponding network type according to acquired mark, are determined corresponding to the mailing address
Network type;
Or, in the history corresponding relation of the mailing address and network type prestored according to the electronic equipment, it is impossible to determine institute
When stating the network type corresponding to mailing address, the corresponding network type of the mailing address is asked to cloud server, in cloud
End server has the data of corresponding network type according to the mark stored, determines that the mailing address is corresponding
After network type, the information for including the corresponding network type of the mailing address that the cloud server is sent is obtained, with true
Network type corresponding to the fixed mailing address.
5. method for connecting network according to claim 1, it is characterised in that the current operating system of the electronic equipment
Connection network type is allowed to include:The different network type of multiple connection priorities;
The connection available network includes:
It is determined that allowing with operating system that the electronic equipment is current in the corresponding available network of connection network type, network class
The connection priority highest network of type;
Network determined by connection.
6. method for connecting network according to claim 5, it is characterised in that also include:
After the available network is connected, if detect the operating system current with the electronic equipment allow be connected network class
The corresponding new available network of type, and the network type connection priority of detected new available network is higher than the net currently connected
The connection priority of the network type of network, then point out user to connect the new available network, or connect the newly available net automatically
Network.
7. method for connecting network according to claim 1, it is characterised in that the current operating system of the electronic equipment
One class allows under connection network type, is divided into the different sub-network of connection priority;
The connection available network includes:
Choose allows in the corresponding available network of connection network type with a class of the operating system that the electronic equipment is current, company
The sub-network for connecing highest priority is attached.
8. method for connecting network according to claim 7, it is characterised in that also include:
After the available network is connected, if detect the operating system current with the electronic equipment allow be connected network class
The corresponding new available network of type, and the network type of network of the network type with currently connecting of the new available network is identical,
And the connection priority of the new available network is higher than the network currently connected, then user is pointed out to connect the new available network,
Or the new available network is connected automatically.
9. a kind of electronic equipment, it is characterised in that the electronic equipment is provided with the electronic equipment of at least two operating systems, institute
Stating electronic equipment includes:
Network detection module, for detecting available network;
Determination type module, the network type for determining the available network;
Correspondence judge module, for judge the network type whether the operating system current with the electronic equipment allow connect
Connect network type correspondence;
Link block, during for the judged result in the correspondence judge module to be, connects the available network;
Cancel link block, for the judged result in the correspondence judge module for it is no when, cancel the connection available network;
Wherein, the correspondence judge module includes:
Mark determining unit, the mark for determining the current operating system of the electronic equipment, wherein, an operating system pair
A mark is answered, each operating system is corresponding to identify difference;
Allow type determining units, the corresponding of network type is connected with allowing for the mark according to operating system set in advance
Relation, it is determined that allowing connection network type corresponding to the mark of current operating system, wherein, the mark of each operating system is equal
To should have it is respective allow connect network type;
Judge execution unit, for judge the network type with it is identified allow connection network type it is whether corresponding.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510131609.7A CN105657711B (en) | 2015-03-24 | 2015-03-24 | A kind of method for connecting network and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510131609.7A CN105657711B (en) | 2015-03-24 | 2015-03-24 | A kind of method for connecting network and electronic equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105657711A CN105657711A (en) | 2016-06-08 |
CN105657711B true CN105657711B (en) | 2017-10-17 |
Family
ID=56481581
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510131609.7A Active CN105657711B (en) | 2015-03-24 | 2015-03-24 | A kind of method for connecting network and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105657711B (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110139265B (en) * | 2018-02-09 | 2022-04-26 | 成都鼎桥通信技术有限公司 | Management method for double-system terminal double-SIM card data service |
CN110740288B (en) * | 2018-07-20 | 2022-02-01 | 钉钉控股(开曼)有限公司 | Management method, access method and device of screen projection network |
CN111132016A (en) * | 2020-03-31 | 2020-05-08 | 友刻(北京)通讯技术有限公司 | Method and device for selecting flow package |
CN112333161A (en) * | 2020-10-23 | 2021-02-05 | 浪潮电子信息产业股份有限公司 | Network security prevention method, system, device and computer readable storage medium |
CN114745228B (en) * | 2022-04-11 | 2023-11-03 | 中国南方电网有限责任公司 | Gateway request processing method, device, computer equipment and storage medium |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7894823B2 (en) * | 2004-06-07 | 2011-02-22 | Nokia Inc. | System for enhanced capacity and quality over WLAN |
CN101557590A (en) * | 2008-04-07 | 2009-10-14 | 华为技术有限公司 | Safety verifying method, system and device for connection of mobile terminal into network |
US20120327849A1 (en) * | 2011-06-24 | 2012-12-27 | Yung-Sen Lin | Method for controlling network connection of wireless network device and associated wireless network device |
CN104378758B (en) * | 2014-05-12 | 2016-08-17 | 腾讯科技(深圳)有限公司 | Access point method of attachment, terminal and server |
-
2015
- 2015-03-24 CN CN201510131609.7A patent/CN105657711B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN105657711A (en) | 2016-06-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105657711B (en) | A kind of method for connecting network and electronic equipment | |
US9420461B2 (en) | Access authentication method and device for wireless local area network hotspot | |
CN103891355B (en) | A kind of method of service register and discovery, equipment and system | |
CN101166133B (en) | Location limit method and system for home base station | |
CN102883449B (en) | A kind of realize the method for data sharing, associated terminal and system | |
CN104105155A (en) | Device discovery information receiving method, device discovery information transmitting method and user device | |
CN105530682B (en) | A kind of terminal access method and relevant device | |
CN106416331A (en) | Electronic subscriber identity module selection | |
CN104662966B (en) | The control method and equipment of service access | |
CN107396455A (en) | Connection processing method and device | |
CN101951665A (en) | Routing method of double-card mobile terminal and double-card mobile terminal | |
CN109660593B (en) | Internet of things platform access management method, device and system | |
EP1443711A1 (en) | Printer acces control | |
CN106130818A (en) | Network sharing, requesting terminal and network share flux monitoring method and system | |
CN107182098A (en) | For realizing the method and apparatus that user equipment switches between WAP | |
CN102932863A (en) | QOS (Quality of Service)-based method for selecting network connection mode by terminal equipment | |
CN102118831A (en) | Wireless access method and device | |
CN110891292A (en) | Method and device for automatically switching network for terminal | |
CN109743722A (en) | It is connected to the network treating method and apparatus | |
CN109246762A (en) | A kind of local service shunt method and device | |
CN106658509A (en) | Countering method and equipment for invalid wireless access points and wireless local area network | |
CN109818769A (en) | The method and apparatus for sending information | |
CN104270720A (en) | Method and device for accessing wireless local area network, and mobile terminal | |
CN105530198A (en) | Access control method and device for mobile terminal | |
CN103281692A (en) | Fast roaming method and equipment between ACs (Alternating Currents) |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |