WO2019037005A1 - Network switching terminal and related product - Google Patents

Network switching terminal and related product Download PDF

Info

Publication number
WO2019037005A1
WO2019037005A1 PCT/CN2017/098768 CN2017098768W WO2019037005A1 WO 2019037005 A1 WO2019037005 A1 WO 2019037005A1 CN 2017098768 W CN2017098768 W CN 2017098768W WO 2019037005 A1 WO2019037005 A1 WO 2019037005A1
Authority
WO
WIPO (PCT)
Prior art keywords
internet
wifi network
terminal
network
cellular network
Prior art date
Application number
PCT/CN2017/098768
Other languages
French (fr)
Chinese (zh)
Inventor
苏红
Original Assignee
深圳双创科技发展有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳双创科技发展有限公司 filed Critical 深圳双创科技发展有限公司
Priority to PCT/CN2017/098768 priority Critical patent/WO2019037005A1/en
Publication of WO2019037005A1 publication Critical patent/WO2019037005A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W36/00Hand-off or reselection arrangements

Definitions

  • the present invention relates to electronic communication, and in particular to a network switching terminal and related products.
  • a very important advantage of smart terminals and tablets is that they can be moved to any location (the desktop is difficult to move, the laptop is generally not as light as the smart terminal and tablet), which further facilitates the user. usage of.
  • the wireless network which, thanks to wireless network support, ensures that users can still access the Internet while moving their tablets and smart terminals.
  • the wireless network has a cellular network and a wireless fidelity (WiFi) network.
  • WiFi wireless fidelity
  • the cellular network is provided by the mobile operator, it is basically based on the flow rate, and the use cost is relatively high. So unless necessary, more users may use the WiFi network to access the Internet. Only one wireless router is needed, and users can extend a WiFi network based on the wired network. The cost of using the wired network is much lower than that of the cellular. Network, so many users will use the WiFi network where there is coverage of the WiFi network, thus reducing the cost of the network.
  • the processing logic of the smart terminal generally uses the WiFi network to access the Internet as long as the user accesses the WiFi network, and accesses the Internet through the cellular network only when the WiFi network is not connected.
  • the connection between the WiFi network and the Internet is disconnected, that is, although the user user is involved in the WiFi network, but does not access the Internet, and the processing of the intelligent terminal
  • the logic is that as long as the terminal accesses the WiFi network, it will not access the Internet through the cellular network, which results in the user not being able to access the Internet. If the user needs to access the Internet, the user needs to manually close the WiFi network to the user. The internet experience has caused inconvenience.
  • the embodiment of the invention provides a terminal access network switching method and a terminal, which can enable the terminal to automatically switch between the WiFi network and the cellular network, so that the terminal can always access the Internet.
  • An embodiment of the present invention provides a terminal access network switching method, including:
  • the terminal determines whether the WiFi network is currently connected
  • the terminal When the terminal is currently connected to the WiFi network, the terminal detects whether the WiFi network is connected to the Internet;
  • WiFi network is connected to the Internet, accessing the Internet through the WiFi network;
  • the Internet is accessed through the cellular network.
  • the detecting whether the WiFi network is connected to the Internet includes:
  • the WiFi network cannot be connected to the Internet.
  • the method before the accessing the Internet through the cellular network, the method further includes:
  • the Internet is accessed via the cellular network.
  • the method before the accessing the Internet through the cellular network, the method further includes:
  • the Internet is accessed through the cellular network.
  • the method before the accessing the Internet through the cellular network, the method further includes:
  • the Internet is accessed through the cellular network if the user's confirmation message is received.
  • Another embodiment of the present invention provides a terminal, including:
  • a determining unit configured to determine, by the terminal, whether a WiFi network is currently connected
  • a detecting unit configured to detect whether the WiFi network is connected to the Internet when the terminal is currently connected to the WiFi network
  • a connecting unit configured to access the Internet through the WiFi network when the WiFi network is connected to the Internet; and to access the Internet through the cellular network when the WiFi network cannot connect to the Internet.
  • the detecting unit is specifically configured to: when detecting whether the WiFi network is connected to the Internet:
  • the WiFi network cannot be connected to the Internet.
  • the determining unit is further configured to:
  • the connecting unit is specifically configured to access the Internet through the cellular network after the determining unit determines that the automatic switching switch has been turned on.
  • the terminal further includes:
  • the determining unit is further configured to determine whether the amount of data determined by the determining unit is greater than a preset number
  • the connecting unit is specifically configured to access the Internet through the cellular network when the determining unit determines that the amount of data is less than or equal to the preset quantity.
  • the terminal further includes:
  • a display unit configured to display selection information on the terminal display screen, so that the user can select whether to access the Internet through the cellular network;
  • the connecting unit is configured to access the Internet through the cellular network when receiving the confirmation information of the user.
  • Another embodiment of the present invention provides a computer readable storage medium storing program code, the program code including instructions for performing the following steps:
  • WiFi network is connected to the Internet, accessing the Internet through the WiFi network;
  • the Internet is accessed through the cellular network.
  • the detecting whether the WiFi network is connected to the Internet includes:
  • the WiFi network cannot be connected to the Internet.
  • the program code includes instructions for:
  • the Internet is accessed via the cellular network.
  • the program code includes instructions for: determining an amount of data that requires Internet interaction;
  • the Internet is accessed through the cellular network.
  • the program code includes instructions for:
  • the Internet is accessed through the cellular network if the user's confirmation message is received.
  • a terminal including: a processor and a memory coupled to each other; the processor is configured to perform the following steps: determining whether the terminal is currently connected to the WiFi network; when the terminal is currently connected to the WiFi network Detecting whether the WiFi network is connected to the Internet; accessing the Internet through the WiFi network when the WiFi network is connected to the Internet; and accessing the Internet through the cellular network when the WiFi network is unable to connect to the Internet.
  • the processor is specifically configured to: when detecting whether the WiFi network is connected to the Internet:
  • the WiFi network cannot be connected to the Internet.
  • the processor is further configured to: determine whether the preset automatic switch is turned on; and determine that the automatic switch is turned on before accessing the Internet through the cellular network.
  • the processor is further configured to: determine an amount of data that requires Internet interaction; determine whether the determined amount of data is greater than a preset quantity; and pass the cell when determining that the amount of data is less than or equal to the preset quantity.
  • the network accesses the Internet.
  • the processor is further configured to: display selection information on the display screen of the terminal, so that the user can select whether to access the Internet through the cellular network; and access the Internet through the cellular network when receiving the confirmation information of the user. .
  • the terminal can detect the connection between the WiFi network and the Internet, so that when the WiFi network connected to the terminal cannot be connected to the Internet, the terminal accesses through the cellular network.
  • the Internet enables the terminal to always access the Internet, improving the user experience of the user accessing the network using the terminal.
  • FIG. 1 is a flowchart of a method for switching a WiFi of a terminal according to an embodiment of the present invention
  • FIG. 2 is an application scenario diagram of a method for switching a WiFi of a terminal according to an embodiment of the present invention
  • FIG. 3 is a structural diagram of a terminal according to an embodiment of the present invention.
  • FIG. 4 is a structural diagram of a terminal according to another embodiment of the present invention.
  • FIG. 5 is a structural diagram of a terminal according to another embodiment of the present invention.
  • FIG. 1 is a flowchart of a terminal access network handover according to an embodiment of the present invention.
  • This embodiment describes a process flow of the terminal, where the terminal may be intelligent.
  • the terminal may be intelligent.
  • the terminal has both WiFi network access capability and cellular network access capability.
  • this embodiment includes:
  • the terminal determines whether the WiFi network is currently connected. If the WiFi network is connected, the process proceeds to step 102. If the WiFi network is not connected, the process proceeds to step 104.
  • the terminal may first determine whether the WiFi function is enabled. If the WiFi function is not enabled, it is determined that the terminal is not currently connected to the WiFi network.
  • the terminal If the terminal has turned on the WiFi function, it is further determined whether the terminal accesses any one of the access points (AP: Access Point). If the terminal does not access any of the access points, it can be determined that the terminal is not currently connected to the WiFi network.
  • AP Access Point
  • the terminal accesses any of the access points, it is determined that the terminal is currently connected to the WiFi network.
  • the wireless access point is a wireless network access point, commonly known as "hot spot.”
  • hot spot There are mainly routing switching access integrated devices and pure access point devices.
  • the integrated device performs access and routing work.
  • the pure access device is only responsible for wireless client access.
  • the pure access device is usually used as a wireless network extension, and other APs. Or the primary AP is connected to expand the wireless coverage, and the integrated device is generally the core of the wireless network.
  • a wireless AP is an access point that uses a wireless device (a mobile device such as a mobile device or a wireless device such as a notebook computer) to enter a wired network, and is mainly used in a broadband home, a building interior, a campus interior, a campus interior, and a warehouse, a factory, and the like that require wireless monitoring. Places, typical distances cover tens of meters to hundreds of meters, but also can be used for long-distance transmission, the farthest can reach about 30KM, the main technology is IEEE802.11 series. Most wireless APs also have an access point client mode (AP client) that can be wirelessly connected to other APs to extend the coverage of the network.
  • AP client access point client mode
  • the terminal detects whether the WiFi network is connected to the Internet; if yes, proceeds to step 103; if not, proceeds to step 104.
  • detecting whether the WiFi network is connected to the Internet can be performed in various ways, specifically, pinging a server located in the Internet, for example, ping www.***.com, at this time, if receiving a response from the server corresponding to www.***.com, It means that the current terminal can communicate with the server corresponding to www.***.com. Since the server corresponding to www.***.com is located on the Internet, it can be determined that the WiFi network is connected to the Internet. Of course, if there is no response, it can be proved that the WiFi network does not have an Internet connection.
  • a plurality of servers located on the Internet may communicate with each other, that is, a server fault located in the Internet may be excluded to cause an error to be detected.
  • the WiFi network is connected to the Internet, the WiFi network is used as a path for Internet connection, thereby accessing the Internet through the WiFi network, that is, all Internet traffic is transmitted through the WiFi network.
  • the WiFi network is not connected to the Internet, the Internet is accessed via the cellular network, ie all Internet traffic is transmitted over the cellular network.
  • the terminal can detect the connection between the WiFi network and the Internet, so that when the WiFi network connected to the terminal cannot be connected to the Internet, the terminal accesses the Internet through the cellular network, so that the terminal can always access the Internet and improve the user's use of the terminal. User experience of accessing the network.
  • FIG. 2 is a flowchart of a terminal access network handover according to another embodiment of the present invention. As shown in FIG. 2, the embodiment includes:
  • the terminal determines whether the WiFi network is currently connected. If the WiFi network is connected, the process proceeds to step 202. If the WiFi network is not connected, the process proceeds to step 205.
  • the terminal may first determine whether the WiFi function is enabled. If the WiFi function is not enabled, it is determined that the terminal is not currently connected to the WiFi network.
  • the terminal If the terminal has turned on the WiFi function, it is further determined whether the terminal accesses any one of the access points (AP: Access Point). If the terminal does not access any of the access points, it can be determined that the terminal is not currently connected to the WiFi network.
  • AP Access Point
  • the terminal accesses any of the access points, it is determined that the terminal is currently connected to the WiFi network.
  • the wireless access point is a wireless network access point, commonly known as "hot spot.”
  • hot spot There are mainly routing switching access integrated devices and pure access point devices.
  • the integrated device performs access and routing work.
  • the pure access device is only responsible for wireless client access.
  • the pure access device is usually used as a wireless network extension, and other APs. Or the primary AP is connected to expand the wireless coverage, and the integrated device is generally the core of the wireless network.
  • a wireless AP is an access point that uses a wireless device (a mobile device such as a mobile device or a wireless device such as a notebook computer) to enter a wired network, and is mainly used in a broadband home, a building interior, a campus interior, a campus interior, and a warehouse, a factory, and the like that require wireless monitoring. Places, typical distances cover tens of meters to hundreds of meters, but also can be used for long-distance transmission, the farthest can reach about 30KM, the main technology is IEEE802.11 series. Most wireless APs also have an access point client mode (AP client) that can be wirelessly connected to other APs to extend the coverage of the network.
  • AP client access point client mode
  • the detection request can be a ping request.
  • the detection server may be set by the terminal manufacturer itself or may be another server located in the Internet.
  • a ping method is used, for example, ping www.***.com.
  • the current terminal can be associated with www.***.
  • the server corresponding to com communicates, because the server corresponding to www.***.com is located on the Internet, It is then meaningless to determine that the WiFi network is connected to the Internet. Of course, if there is no response, it can be proved that the WiFi network does not have an Internet connection.
  • the WiFi network can be connected to the Internet, and the process proceeds to step 204; if the detection response of the detection server is not received within the preset time, the WiFi network cannot be connected to the Internet. Going to step 205;
  • a plurality of servers located on the Internet may communicate with each other, that is, a server fault located in the Internet may be excluded to cause an error to be detected.
  • steps 202 to 203 can be performed multiple times in a loop, and as long as the result of any one of the times is that the detection response of the detection server is received, it can be said that the WiFi network is connected to the Internet.
  • the WiFi network is connected to the Internet, the WiFi network is used as a path for Internet connection, thereby accessing the Internet through the WiFi network, that is, all Internet traffic is transmitted through the WiFi network.
  • the WiFi network is not connected to the Internet, the Internet is accessed via the cellular network, ie all Internet traffic is transmitted over the cellular network.
  • the terminal can detect the connection between the WiFi network and the Internet, so that when the WiFi network connected to the terminal cannot be connected to the Internet, the terminal accesses the Internet through the cellular network, so that the terminal can always access the Internet and improve the user's use of the terminal. User experience of accessing the network.
  • the user may pre-set whether to allow the terminal to automatically perform the switching of the access network, that is, an automatic switch can be set in the setting menu of the terminal system, and the user can set according to his own needs. Select whether to turn the automatic switch on. For example, if the user's Internet connection needs are relatively strong, and the user can also bear the cost of accessing the Internet through the cellular network, the user can choose to turn on the automatic switch; or, although the user's Internet connection needs are strong, but does not want to bear through the cellular network. The user may choose to turn off the automatic switch when the fee is generated by accessing the Internet; or the user's Internet connection demand is weak, the user may choose to turn off the automatic switch. It can be understood that in order to avoid the additional cost of using the cellular network to access the Internet for the user, the system should turn off the automatic switch by default.
  • the Internet is accessed via the cellular network.
  • the automatic switch is off, it means that the user does not want to access the Internet through the cellular network if there is a WiFi network, even if the current WiFi network is not connected to the Internet.
  • the user may further set how much data can be generated through the cellular network when the WiFi network is available, that is,
  • the data volume setting menu can be set in the setting menu of the terminal system, and the user can set the upper limit value of the data amount according to his own needs or withstand capability, and the data amount can also set a single upper limit value, and a certain time period. , for example, the upper limit of the cumulative amount of data for one day, one week, or one month.
  • the user can set the amount of data generated in a single generation to not exceed 10M, the amount of data in one week cannot exceed 100M, the amount of data in one month cannot exceed 1G, and so on. Understandably, in order to reduce the amount of user operations, the system can also set a default value, which should be a value that most users can end, for example, it can be 10M.
  • the terminal may further determine the amount of data that requires Internet interaction before accessing the Internet through the cellular network; and then determine whether the amount of data is greater than a preset amount; if the amount of data is less than or equal to the pre- It is only necessary to access the Internet through a cellular network. If the amount of data is greater than the preset amount, the Internet is not accessed through the cellular network.
  • the confirmation of the amount of data exchanged by the Internet may be confirmed by the size of the file to be sent or received. For example, if a file needs to be sent, the size of the file is 9M, and the amount of data to be interacted may be determined to be less than the preset number 10, thereby The Internet can be accessed through a cellular network. On the other hand, if it is necessary to receive a file whose size is 11M, it can be determined that the amount of data requiring Internet interaction is greater than the preset number 10, so that the Internet is not accessed through the cellular network.
  • the selection information may be displayed on the display of the terminal before the Internet is accessed through the cellular network, so that the user can select whether to access the Internet through the cellular network;
  • the Internet is accessed through the cellular network if the user's confirmation message is received. If the user's confirmation information is not received, or the user's rejection information is received, the Internet is not accessed through the cellular network.
  • the content of the selection information displayed on the display screen of the terminal may include: an Internet connection status of the current WiFi network, a situation of the amount of data required for Internet interaction, and the like, and the user is determined according to the content whether to allow access to the Internet through the cellular network.
  • Figure 3 is a diagram showing the structure of a terminal according to an embodiment of the present invention, including:
  • the determining unit 301 is configured to determine, by the terminal, whether a WiFi network is currently connected.
  • the terminal may first determine whether the WiFi function is enabled. If the WiFi function is not enabled, it is determined that the terminal is not currently connected to the WiFi network.
  • the terminal If the terminal has turned on the WiFi function, it is further determined whether the terminal accesses any one of the access points (AP: Access Point). If the terminal does not access any of the access points, it can be determined that the terminal is not currently connected to the WiFi network.
  • AP Access Point
  • the terminal accesses any of the access points, it is determined that the terminal is currently connected to the WiFi network.
  • the wireless access point is a wireless network access point, commonly known as "hot spot.”
  • hot spot There are mainly routing switching access integrated devices and pure access point devices.
  • the integrated device performs access and routing work.
  • the pure access device is only responsible for wireless client access.
  • the pure access device is usually used as a wireless network extension, and other APs. Or the primary AP is connected to expand the wireless coverage, and the integrated device is generally the core of the wireless network.
  • a wireless AP is an access point that uses a wireless device (a mobile device such as a mobile device or a wireless device such as a notebook computer) to enter a wired network, and is mainly used in a broadband home, a building interior, a campus interior, a campus interior, and a warehouse, a factory, and the like that require wireless monitoring. Places, typical distances cover tens of meters to hundreds of meters, but also can be used for long-distance transmission, the farthest can reach about 30KM, the main technology is IEEE802.11 series. Most wireless APs also have an access point client mode (AP client) that can be wirelessly connected to other APs to extend the coverage of the network.
  • AP client access point client mode
  • the detecting unit 302 is configured to detect, when the terminal is currently connected to the WiFi network, whether the WiFi network is connected to the Internet.
  • detecting whether the WiFi network is connected to the Internet can be performed in various ways, specifically, pinging a server located in the Internet, for example, ping www.***.com, at this time, if receiving a response from the server corresponding to www.***.com, It means that the current terminal can communicate with the server corresponding to www.***.com. Since the server corresponding to www.***.com is located on the Internet, it can be determined that the WiFi network is connected to the Internet. Of course, if there is no response, it can be proved that the WiFi network does not have an Internet connection.
  • a plurality of servers located on the Internet may communicate with each other, that is, a server fault located in the Internet may be excluded to cause an error to be detected.
  • the connecting unit 303 is configured to access the Internet through the WiFi network when the WiFi network is connected to the Internet, and to access the Internet through the cellular network when the WiFi network cannot connect to the Internet.
  • the WiFi network is connected to the Internet, the WiFi network is used as a path for Internet connection, thereby accessing the Internet through the WiFi network, that is, all Internet traffic is transmitted through the WiFi network.
  • the WiFi network is not connected to the Internet, the Internet is accessed via the cellular network, ie all Internet traffic is transmitted over the cellular network.
  • the terminal can detect the connection between the WiFi network and the Internet, so that when the WiFi network connected to the terminal cannot be connected to the Internet, the terminal accesses the Internet through the cellular network, so that the terminal can always access the Internet and improve the user's use of the terminal. User experience of accessing the network.
  • the detecting unit 302 may be specifically configured to: when detecting whether the WiFi network is connected to the Internet:
  • the detection request can be a ping request.
  • the detection server may be set by the terminal manufacturer itself or may be another server located in the Internet.
  • a ping method is used, for example, ping www.***.com.
  • the current terminal can be associated with www.***.
  • the server corresponding to com communicates. Since the server corresponding to www.***.com is located on the Internet, it can be determined that the WiFi network is connected to the Internet. Of course, if there is no response, it can be proved that the WiFi network does not have an Internet connection. If the detection response of the detection server is received within the preset time, the WiFi network can be connected to the Internet; if the detection response of the detection server is not received within the preset time, the WiFi network cannot be connected to the Internet.
  • a plurality of servers located on the Internet may communicate with each other, that is, a server fault located in the Internet may be excluded to cause an error to be detected.
  • the detection by the detecting unit 302 can be performed multiple times, and as long as the result of any one of the times is that the detection response of the detecting server is received, it can be said that the WiFi network is connected to the Internet.
  • the user may pre-set whether to allow the terminal to automatically perform the switching of the access network, that is, an automatic switch can be set in the setting menu of the terminal system, and the user can set according to his own needs. Select whether to turn the automatic switch on.
  • users have a strong Internet connection and can afford to access the Internet through a cellular network.
  • the user may choose to turn on the automatic switch; or, although the user's Internet connection needs are relatively strong, but does not want to bear the cost of accessing the Internet through the cellular network, the user may choose to turn off the automatic switch; or, the user's Internet connection needs are relatively high. Weak, the user can choose to turn off the automatic switch. It can be understood that in order to avoid the additional cost of using the cellular network to access the Internet for the user, the system should turn off the automatic switch by default.
  • the determining unit 302 is further configured to: determine whether the preset automatic switch is turned on; and the connecting unit is specifically configured to: after the determining unit determines that the automatic switch is turned on, The cellular network accesses the Internet. If the automatic switch is off, it means that the user does not want to access the Internet through the cellular network if there is a WiFi network, even if the current WiFi network is not connected to the Internet.
  • the user may further set how much data can be generated through the cellular network when the WiFi network is available, that is,
  • the data volume setting menu can be set in the setting menu of the terminal system, and the user can set the upper limit value of the data amount according to his own needs or withstand capability, and the data amount can also set a single upper limit value, and a certain time period. , for example, the upper limit of the cumulative amount of data for one day, one week, or one month.
  • the user can set the amount of data generated in a single generation to not exceed 10M, the amount of data in one week cannot exceed 100M, the amount of data in one month cannot exceed 1G, and so on. Understandably, in order to reduce the amount of user operations, the system can also set a default value, which should be a value that most users can end, for example, it can be 10M.
  • the terminal may further include: a determining unit 304, configured to determine an amount of data that requires Internet interaction; the determining unit 302 may further be configured to determine the The determining unit 303 is configured to: when the determining unit determines that the amount of data is less than or equal to the preset quantity, accessing the Internet through the cellular network.
  • the confirmation of the amount of data exchanged by the Internet may be confirmed by the size of the file to be sent or received. For example, if a file needs to be sent, the size of the file is 9M, and the amount of data to be interacted may be determined to be less than the preset number 10, thereby The Internet can be accessed through a cellular network. On the other hand, if it is necessary to receive a file whose size is 11M, it can be determined that the amount of data requiring Internet interaction is greater than the preset number 10, so that the Internet is not accessed through the cellular network.
  • the terminal may further include:
  • the display unit 305 is configured to display the selection information on the display screen of the terminal, so that the user can select whether to access the Internet through the cellular network.
  • the connection unit 303 can also be configured to pass the cellular when receiving the confirmation information of the user.
  • the network accesses the Internet.
  • the Internet is accessed through the cellular network if the user's confirmation message is received. If the user's confirmation information is not received, or the user's rejection information is received, the Internet is not accessed through the cellular network.
  • the content of the selection information displayed on the display screen of the terminal may include: an Internet connection status of the current WiFi network, a situation of the amount of data required for Internet interaction, and the like, and the user is determined according to the content whether to allow access to the Internet through the cellular network.
  • the content is based on the same concept as the method embodiment of the present invention.
  • the description in the method embodiment of the present invention and details are not described herein again.
  • Another embodiment of the present invention provides a computer readable storage medium storing program code, the program code including instructions for performing the following steps:
  • WiFi network is connected to the Internet, accessing the Internet through the WiFi network;
  • the Internet is accessed through the cellular network.
  • the detecting whether the WiFi network is connected to the Internet includes:
  • the WiFi network cannot be connected to the Internet.
  • the program code includes instructions for:
  • the Internet is accessed via the cellular network.
  • the program code includes instructions for:
  • the Internet is accessed through the cellular network.
  • the program code includes instructions for:
  • the Internet is accessed through the cellular network if the user's confirmation message is received.
  • another embodiment of the present invention provides a terminal 500, including: a processor 510 and a memory 520 coupled to each other; the processor 510 is configured to perform the following steps: determining whether the terminal is currently connected to the WiFi network; When the WiFi network is connected, detecting whether the WiFi network is connected to the Internet; when the WiFi network is connected to the Internet, accessing the Internet through the WiFi network; when the WiFi network cannot be connected to the Internet, connecting through the cellular network Into the Internet.
  • the processor is specifically configured to: when detecting whether the WiFi network is connected to the Internet:
  • the WiFi network cannot be connected to the Internet.
  • the processor is further configured to: determine whether the preset automatic switch is turned on; and determine that the automatic switch is turned on before accessing the Internet through the cellular network.
  • the processor is further configured to: determine an amount of data that requires Internet interaction; determine whether the determined amount of data is greater than a preset quantity; and pass the cell when determining that the amount of data is less than or equal to the preset quantity.
  • the network accesses the Internet.
  • the processor is further configured to: display selection information on the display screen of the terminal, so that the user can select whether to access the Internet through the cellular network; and access the Internet through the cellular network when receiving the confirmation information of the user. .
  • the embodiment of the present invention further provides another mobile terminal.
  • the mobile terminal can be a mobile phone, a tablet computer, a PDA (Personal Digital Assistant), a POS (Point of Sales), a car computer, etc.
  • PDA Personal Digital Assistant
  • POS Point of Sales
  • car computer etc.
  • any terminal device take the mobile terminal as a mobile phone as an example:
  • FIG. 5 is a block diagram showing a partial structure of a mobile phone related to a mobile terminal provided by an embodiment of the present invention.
  • the mobile phone includes: a radio frequency (RF) circuit 910, a memory 920, an input unit 930, a sensor 950, an audio circuit 960, a Wireless Fidelity (WiFi) module 970, a processor 980, and a power supply 990.
  • RF radio frequency
  • the structure of the handset shown in FIG. 5 does not constitute a limitation to the handset, and may include more or less components than those illustrated, or some components may be combined, or different components may be arranged.
  • the input unit 930 can be configured to receive input numeric or character information and to generate key signal inputs related to user settings and function controls of the handset.
  • the input unit 930 can include a touch display screen 933, a biometric device 931, and other input devices 932.
  • the biometric device 931 can be a fingerprint recognition device, or a face recognition device, or an iris recognition device or the like.
  • the input unit 930 can also include other input devices 932.
  • other input devices 932 may include, but are not limited to, one or more of physical buttons, function keys (such as volume control buttons, switch buttons, etc.), trackballs, mice, joysticks, and the like.
  • the processor 980 is configured to acquire an image to be processed, the target area of the image to be processed is used to add a watermark pattern, determine first color information of the first image corresponding to the target area, and determine the first color.
  • the processor 980 is the control center of the handset, which connects various portions of the entire handset using various interfaces and lines, by executing or executing software programs and/or modules stored in the memory 920, and invoking data stored in the memory 920, executing The phone's various functions and processing data, so that the overall monitoring of the phone.
  • the processor 980 may include one or more processing units; optionally, the processor 980 may integrate a processor and a modem processor, where the processor mainly processes an operating system, a user interface, an application, and the like.
  • the modem processor primarily handles wireless communications. It will be appreciated that the above described modem processor may also not be integrated into the processor 980.
  • memory 920 can include high speed random access memory, and can also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
  • the RF circuit 910 can be used for receiving and transmitting information.
  • RF circuit 910 includes, but is not limited to, Antenna, at least one amplifier, transceiver, coupler, Low Noise Amplifier (LNA), duplexer, etc.
  • RF circuitry 910 can also communicate with the network and other devices via wireless communication.
  • the above wireless communication may use any communication standard or protocol, including but not limited to Global System of Mobile communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (Code Division). Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), E-mail, Short Messaging Service (SMS), and the like.
  • GSM Global System of Mobile communication
  • GPRS General Packet Radio Service
  • CDMA Code Division Multiple Access
  • WCDMA Wideband Code Division Multiple Access
  • LTE Long Term Evolution
  • E-mail Short Messaging Service
  • the handset may also include at least one type of sensor 950, such as a light sensor, motion sensor, and other sensors.
  • the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor can adjust the brightness of the touch display screen according to the brightness of the ambient light, and the proximity sensor can turn off the touch display when the mobile phone moves to the ear. And / or backlight.
  • the accelerometer sensor can detect the magnitude of acceleration in all directions (usually three axes). When it is stationary, it can detect the magnitude and direction of gravity.
  • the mobile phone can be used to identify the gesture of the mobile phone (such as horizontal and vertical screen switching, related Game, magnetometer attitude calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for the mobile phone can also be configured with gyroscopes, barometers, hygrometers, thermometers, infrared sensors and other sensors, no longer Narration.
  • the gesture of the mobile phone such as horizontal and vertical screen switching, related Game, magnetometer attitude calibration
  • vibration recognition related functions such as pedometer, tapping
  • the mobile phone can also be configured with gyroscopes, barometers, hygrometers, thermometers, infrared sensors and other sensors, no longer Narration.
  • the audio circuit 960, the speaker 961, and the microphone 962 can provide an audio interface between the user and the mobile phone.
  • the audio circuit 960 can transmit the converted electrical data of the received audio data to the speaker 961 for conversion to the sound signal by the speaker 961; on the other hand, the microphone 962 converts the collected sound signal into an electrical signal by the audio circuit 960. After receiving, it is converted into audio data, and then processed by the audio data playback processor 980, sent to the other mobile phone via the RF circuit 910, or played back to the memory 920 for further processing.
  • WiFi is a short-range wireless transmission technology
  • the mobile phone can help users to send and receive emails, browse web pages, and access streaming media through the WiFi module 970, which provides users with wireless broadband Internet access.
  • FIG. 5 shows the WiFi module 970, it can be understood that it does not belong to the essential configuration of the mobile phone, and may be omitted as needed within the scope of not changing the essence of the invention.
  • the handset also includes a power supply 990 (such as a battery) that supplies power to the various components.
  • a power supply 990 (such as a battery) that supplies power to the various components.
  • the power supply can be logically coupled to the processor 980 via a power management system to manage charging, discharging, and power management functions through the power management system.
  • the mobile phone may further include a camera, a Bluetooth module, and the like, and details are not described herein again.
  • each step method flow may be implemented based on the structure of the mobile phone.
  • each unit function can be implemented based on the structure of the mobile phone.
  • the storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

Landscapes

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

Abstract

A terminal. A processor comprised in the terminal is used for: determining whether a WiFi network is currently connected; when a terminal is currently connected to the WiFi network, detecting whether the WiFi network is connected to the Internet; if the WiFi network is connected to the Internet, accessing the Internet through the WiFi network; and if the WiFi network fails to be connected to the Internet, accessing the Internet through a cellular network. By using the method, the terminal can automatically switch between the WiFi network and the cellular network.

Description

网络切换终端和相关产品Network switching terminal and related products 技术领域Technical field
本发明涉及电子通信,具体涉及一种网络切换终端和相关产品。The present invention relates to electronic communication, and in particular to a network switching terminal and related products.
背景技术Background technique
随着智能终端和平板电脑的飞速发展,越来越多的用户会使用智能终端和平板电脑来获取资讯,玩游戏甚至工作,而笔记本电脑,台式机等传统个人电脑的使用频率越来越低了。With the rapid development of smart terminals and tablets, more and more users will use smart terminals and tablets to get information, play games and even work, while traditional PCs such as laptops and desktops are used less frequently. It is.
智能终端和平板电脑的一个很重要的优势就是轻便,用户可以将其拿在手上移动到任何位置(台式机很难移动,笔记本电脑一般也不及智能终端和平板电脑轻便),进一步方便了用户的使用。A very important advantage of smart terminals and tablets is that they can be moved to any location (the desktop is difficult to move, the laptop is generally not as light as the smart terminal and tablet), which further facilitates the user. usage of.
支撑平板电脑和智能终端能够如此受欢迎的另一个因素就是无线网络,由于无线网络的支持,能够确保用户在移动平板电脑和智能终端时仍然能够有因特网的接入。其中,无线网络有蜂窝网络和无线保真(WiFi:Wireless Fidelity)网络,其中,由于蜂窝网络是移动运营商提供的,基本上是按流量计费,使用成本比较高。所以除非必要,更多的用户可能更多的是采用WiFi网络接入因特网,只需要一个无线路由器,用户就可以在有线网络的基础上扩展一个WiFi网络,由于有线网络的使用成本远低于蜂窝网络,因此很多用户在有WiFi网络覆盖的地方就会使用WiFi网络,从而降低网络的使用成本。Another factor that supports the popularity of tablets and smart terminals is the wireless network, which, thanks to wireless network support, ensures that users can still access the Internet while moving their tablets and smart terminals. Among them, the wireless network has a cellular network and a wireless fidelity (WiFi) network. Among them, since the cellular network is provided by the mobile operator, it is basically based on the flow rate, and the use cost is relatively high. So unless necessary, more users may use the WiFi network to access the Internet. Only one wireless router is needed, and users can extend a WiFi network based on the wired network. The cost of using the wired network is much lower than that of the cellular. Network, so many users will use the WiFi network where there is coverage of the WiFi network, thus reducing the cost of the network.
现在智能终端的处理逻辑一般是只要用户接入了WiFi网络,就会使用WiFi网络接入因特网,只有在没有接入WiFi网络的时候才会通过蜂窝网络接入因特网。Nowadays, the processing logic of the smart terminal generally uses the WiFi network to access the Internet as long as the user accesses the WiFi network, and accesses the Internet through the cellular network only when the WiFi network is not connected.
但是在某些情况下,用户虽然能够接入WiFi网络,但是WiFi网络与因特网的连接是断开的,也就是说用户用户虽然介入了WiFi网络,但是并不能接入因特网,而智能终端的处理逻辑却又是只要终端接入了WiFi网络就不会通过蜂窝网络接入因特网,这就导致用户不能够接入因特网,如果用户需要接入因特网,则需要由用户手动关闭WiFi网络,给用户的上网体验带来了不便。 However, in some cases, although the user can access the WiFi network, the connection between the WiFi network and the Internet is disconnected, that is, although the user user is involved in the WiFi network, but does not access the Internet, and the processing of the intelligent terminal The logic is that as long as the terminal accesses the WiFi network, it will not access the Internet through the cellular network, which results in the user not being able to access the Internet. If the user needs to access the Internet, the user needs to manually close the WiFi network to the user. The internet experience has caused inconvenience.
发明内容Summary of the invention
本发明实施例提供了终端接入网络切换方法及终端,可以使得终端能够在WiFi网络和蜂窝网络之间自动切换,让终端总能接入因特网。The embodiment of the invention provides a terminal access network switching method and a terminal, which can enable the terminal to automatically switch between the WiFi network and the cellular network, so that the terminal can always access the Internet.
本发明实施例的目的是通过以下技术方案实现的:The purpose of the embodiment of the present invention is achieved by the following technical solutions:
本发明一个实施例提供了一种终端接入网络切换方法,包括:An embodiment of the present invention provides a terminal access network switching method, including:
终端判断当前是否连接了WiFi网络;The terminal determines whether the WiFi network is currently connected;
在所述终端当前连接了WiFi网络时,终端检测所述WiFi网络是否与因特网连接;When the terminal is currently connected to the WiFi network, the terminal detects whether the WiFi network is connected to the Internet;
如果所述WiFi网络与因特网连接,则通过所述WiFi网络接入因特网;If the WiFi network is connected to the Internet, accessing the Internet through the WiFi network;
如果所述WiFi网络不能与因特网连接,则通过蜂窝网络接入因特网。If the WiFi network cannot be connected to the Internet, the Internet is accessed through the cellular network.
可选的,所述检测WiFi网络是否与因特网连接包括:Optionally, the detecting whether the WiFi network is connected to the Internet includes:
向位于因特网的检测服务器发送检测请求;Sending a detection request to a detection server located on the Internet;
如果接收到所述检测服务器针对所述检测请求的检测响应,则确定所述WiFi网络与因特网连接;If the detection response of the detection server for the detection request is received, determining that the WiFi network is connected to the Internet;
如果在预置时间内没有接收到所述检测服务器针对所述检测请求的检测响应,则确定所述WiFi网络不能与因特网连接。If the detection response of the detection server for the detection request is not received within a preset time, it is determined that the WiFi network cannot be connected to the Internet.
可选的,所述通过蜂窝网络接入因特网前,所述方法还包括:Optionally, before the accessing the Internet through the cellular network, the method further includes:
判断预设的自动切换开关是否打开;Determine whether the preset automatic switch is turned on;
如果所述自动切换开关已经打开,才通过蜂窝网络接入因特网。If the automatic switch is already open, the Internet is accessed via the cellular network.
可选的,所述通过蜂窝网络接入因特网前,所述方法还包括:Optionally, before the accessing the Internet through the cellular network, the method further includes:
确定需要因特网交互的数据量;Determine the amount of data that requires Internet interaction;
判断所述数据量是否大于预设数量;Determining whether the amount of data is greater than a preset amount;
如果所述数据量小于或等于所述预设数量,才通过蜂窝网络接入因特网。If the amount of data is less than or equal to the preset amount, the Internet is accessed through the cellular network.
可选的,所述通过蜂窝网络接入因特网前,所述方法还包括:Optionally, before the accessing the Internet through the cellular network, the method further includes:
在终端显示屏上显示选择信息,以使得用户可以选择是否通过蜂窝网络接入因特网;Displaying selection information on the terminal display so that the user can select whether to access the Internet through the cellular network;
如果接收到用户的确认信息,才通过蜂窝网络接入因特网。The Internet is accessed through the cellular network if the user's confirmation message is received.
本发明的另一个实施例提供了一种终端,包括:Another embodiment of the present invention provides a terminal, including:
判断单元,用于终端判断当前是否连接了WiFi网络;a determining unit, configured to determine, by the terminal, whether a WiFi network is currently connected;
检测单元,用于在所述终端当前连接了WiFi网络时,检测所述WiFi网络是否与因特网连接; a detecting unit, configured to detect whether the WiFi network is connected to the Internet when the terminal is currently connected to the WiFi network;
连接单元,用于在所述WiFi网络与因特网连接时,通过所述WiFi网络接入因特网;用于在所述WiFi网络不能与因特网连接时,通过蜂窝网络接入因特网。And a connecting unit, configured to access the Internet through the WiFi network when the WiFi network is connected to the Internet; and to access the Internet through the cellular network when the WiFi network cannot connect to the Internet.
可选的,所述检测单元在检测WiFi网络是否与因特网连接时具体用于:Optionally, the detecting unit is specifically configured to: when detecting whether the WiFi network is connected to the Internet:
向位于因特网的检测服务器发送检测请求;Sending a detection request to a detection server located on the Internet;
如果接收到所述检测服务器针对所述检测请求的检测响应,则确定所述WiFi网络与因特网连接;If the detection response of the detection server for the detection request is received, determining that the WiFi network is connected to the Internet;
如果在预置时间内没有接收到所述检测服务器针对所述检测请求的检测响应,则确定所述WiFi网络不能与因特网连接。If the detection response of the detection server for the detection request is not received within a preset time, it is determined that the WiFi network cannot be connected to the Internet.
可选的,所述判断单元还用于:Optionally, the determining unit is further configured to:
判断预设的自动切换开关是否打开;Determine whether the preset automatic switch is turned on;
所述连接单元,具体用于在所述判断单元判断所述自动切换开关已经打开,才通过蜂窝网络接入因特网。The connecting unit is specifically configured to access the Internet through the cellular network after the determining unit determines that the automatic switching switch has been turned on.
可选的,所述终端还包括:Optionally, the terminal further includes:
确定单元,用于确定需要因特网交互的数据量;a determining unit for determining the amount of data that requires Internet interaction;
所述判断单元,还用于判断所述确定单元确定的数据量是否大于预设数量;The determining unit is further configured to determine whether the amount of data determined by the determining unit is greater than a preset number;
所述连接单元,具体用于在所述判断单元判断所述数据量小于或等于所述预设数量时,才通过蜂窝网络接入因特网。The connecting unit is specifically configured to access the Internet through the cellular network when the determining unit determines that the amount of data is less than or equal to the preset quantity.
可选的,所述终端还包括:Optionally, the terminal further includes:
显示单元,用于在终端显示屏上显示选择信息,以使得用户可以选择是否通过蜂窝网络接入因特网;a display unit, configured to display selection information on the terminal display screen, so that the user can select whether to access the Internet through the cellular network;
所述连接单元,用于在接收到用户的确认信息时,才通过蜂窝网络接入因特网。The connecting unit is configured to access the Internet through the cellular network when receiving the confirmation information of the user.
本发明的另一个实施例提供一种计算机可读存储介质,所述计算机可读存储介质存储了程序代码,所述程序代码包括的指令用于执行如下步骤:Another embodiment of the present invention provides a computer readable storage medium storing program code, the program code including instructions for performing the following steps:
判断终端当前是否连接了WiFi网络;Determine whether the terminal is currently connected to the WiFi network;
在所述终端当前连接了WiFi网络时,检测所述WiFi网络是否与因特网连接;Detecting whether the WiFi network is connected to the Internet when the terminal is currently connected to the WiFi network;
如果所述WiFi网络与因特网连接,则通过所述WiFi网络接入因特网;If the WiFi network is connected to the Internet, accessing the Internet through the WiFi network;
如果所述WiFi网络不能与因特网连接,则通过蜂窝网络接入因特网。If the WiFi network cannot be connected to the Internet, the Internet is accessed through the cellular network.
可选的,所述检测WiFi网络是否与因特网连接包括: Optionally, the detecting whether the WiFi network is connected to the Internet includes:
向位于因特网的检测服务器发送检测请求;Sending a detection request to a detection server located on the Internet;
如果接收到所述检测服务器针对所述检测请求的检测响应,则确定所述WiFi网络与因特网连接;If the detection response of the detection server for the detection request is received, determining that the WiFi network is connected to the Internet;
如果在预置时间内没有接收到所述检测服务器针对所述检测请求的检测响应,则确定所述WiFi网络不能与因特网连接。If the detection response of the detection server for the detection request is not received within a preset time, it is determined that the WiFi network cannot be connected to the Internet.
可选的,所述通过蜂窝网络接入因特网前,所述程序代码包括的指令还用于:Optionally, before the accessing the Internet through the cellular network, the program code includes instructions for:
判断预设的自动切换开关是否打开;Determine whether the preset automatic switch is turned on;
如果所述自动切换开关已经打开,才通过蜂窝网络接入因特网。If the automatic switch is already open, the Internet is accessed via the cellular network.
可选的,所述通过蜂窝网络接入因特网前,所述程序代码包括的指令还用于:确定需要因特网交互的数据量;Optionally, before the accessing the Internet through the cellular network, the program code includes instructions for: determining an amount of data that requires Internet interaction;
判断所述数据量是否大于预设数量;Determining whether the amount of data is greater than a preset amount;
如果所述数据量小于或等于所述预设数量,才通过蜂窝网络接入因特网。If the amount of data is less than or equal to the preset amount, the Internet is accessed through the cellular network.
可选的,所述通过蜂窝网络接入因特网前,所述程序代码包括的指令还用于:Optionally, before the accessing the Internet through the cellular network, the program code includes instructions for:
在终端显示屏上显示选择信息,以使得用户可以选择是否通过蜂窝网络接入因特网;Displaying selection information on the terminal display so that the user can select whether to access the Internet through the cellular network;
如果接收到用户的确认信息,才通过蜂窝网络接入因特网。The Internet is accessed through the cellular network if the user's confirmation message is received.
本发明的另一个实施例提供一种终端,包括:相互耦合的处理器和存储器;所述处理器用于执行如下步骤:判断终端当前是否连接了WiFi网络;在所述终端当前连接了WiFi网络时,检测所述WiFi网络是否与因特网连接;在所述WiFi网络与因特网连接时,通过所述WiFi网络接入因特网;在所述WiFi网络不能与因特网连接时,通过蜂窝网络接入因特网。Another embodiment of the present invention provides a terminal, including: a processor and a memory coupled to each other; the processor is configured to perform the following steps: determining whether the terminal is currently connected to the WiFi network; when the terminal is currently connected to the WiFi network Detecting whether the WiFi network is connected to the Internet; accessing the Internet through the WiFi network when the WiFi network is connected to the Internet; and accessing the Internet through the cellular network when the WiFi network is unable to connect to the Internet.
可选的,所述处理器在检测WiFi网络是否与因特网连接时具体用于:Optionally, the processor is specifically configured to: when detecting whether the WiFi network is connected to the Internet:
向位于因特网的检测服务器发送检测请求;Sending a detection request to a detection server located on the Internet;
如果接收到所述检测服务器针对所述检测请求的检测响应,则确定所述WiFi网络与因特网连接;If the detection response of the detection server for the detection request is received, determining that the WiFi network is connected to the Internet;
如果在预置时间内没有接收到所述检测服务器针对所述检测请求的检测响应,则确定所述WiFi网络不能与因特网连接。If the detection response of the detection server for the detection request is not received within a preset time, it is determined that the WiFi network cannot be connected to the Internet.
可选的,所述处理器还用于:判断预设的自动切换开关是否打开;在判断所述自动切换开关已经打开,才通过蜂窝网络接入因特网。 Optionally, the processor is further configured to: determine whether the preset automatic switch is turned on; and determine that the automatic switch is turned on before accessing the Internet through the cellular network.
可选的,所述处理器还用于:确定需要因特网交互的数据量;判断确定的数据量是否大于预设数量;在判断所述数据量小于或等于所述预设数量时,才通过蜂窝网络接入因特网。Optionally, the processor is further configured to: determine an amount of data that requires Internet interaction; determine whether the determined amount of data is greater than a preset quantity; and pass the cell when determining that the amount of data is less than or equal to the preset quantity. The network accesses the Internet.
可选的,所述处理器还用于:在终端显示屏上显示选择信息,以使得用户可以选择是否通过蜂窝网络接入因特网;在接收到用户的确认信息时,才通过蜂窝网络接入因特网。Optionally, the processor is further configured to: display selection information on the display screen of the terminal, so that the user can select whether to access the Internet through the cellular network; and access the Internet through the cellular network when receiving the confirmation information of the user. .
从本发明实施例提供的以上技术方案可以看出,由于本发明实施例中终端可以检测WiFi网络与因特网的连接,从而在终端所连接的WiFi网络不能够与因特网连接时,通过蜂窝网络接入因特网,使得终端始终能够接入因特网,提高用户使用终端接入网络的用户体验。It can be seen from the above technical solutions provided by the embodiments of the present invention that, in the embodiment of the present invention, the terminal can detect the connection between the WiFi network and the Internet, so that when the WiFi network connected to the terminal cannot be connected to the Internet, the terminal accesses through the cellular network. The Internet enables the terminal to always access the Internet, improving the user experience of the user accessing the network using the terminal.
附图说明DRAWINGS
为了更清楚地说明本发明实施例的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly described below. It is obvious that the drawings in the following description are only some embodiments of the present invention, Those skilled in the art can also obtain other drawings based on these drawings without paying for creative labor.
图1为本发明一个实施例提供的终端WiFi切换方法的流程图;FIG. 1 is a flowchart of a method for switching a WiFi of a terminal according to an embodiment of the present invention;
图2位本发明一个实施例提供的终端WiFi切换方法的应用场景图;FIG. 2 is an application scenario diagram of a method for switching a WiFi of a terminal according to an embodiment of the present invention;
图3为本发明一个实施例提供的终端的结构图;FIG. 3 is a structural diagram of a terminal according to an embodiment of the present invention;
图4为本发明另一个实施例提供的终端的结构图;4 is a structural diagram of a terminal according to another embodiment of the present invention;
图5为本发明另一个实施例提供的终端的结构图。FIG. 5 is a structural diagram of a terminal according to another embodiment of the present invention.
具体实施方式Detailed ways
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present invention. It is obvious that the described embodiments are only a part of the embodiments of the present invention, but not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
先介绍本发明实施例提供的终端接入网络切换方法,图1描述了本发明一个实施例提供的终端接入网络切换的流程,该实施例描述的是终端的处理流程,该终端可以是智能终端或平板电脑等,该终端同时具有WiFi网络接入能力和蜂窝网络接入能力。如图1所示,该实施例包括:The terminal access network switching method provided by the embodiment of the present invention is described first. FIG. 1 is a flowchart of a terminal access network handover according to an embodiment of the present invention. This embodiment describes a process flow of the terminal, where the terminal may be intelligent. Such as a terminal or a tablet, the terminal has both WiFi network access capability and cellular network access capability. As shown in FIG. 1, this embodiment includes:
101、终端判断当前是否连接了WiFi网络;如果连接了WiFi网络,进入步骤102;如果没有连接WiFi网络,进入步骤104。 101. The terminal determines whether the WiFi network is currently connected. If the WiFi network is connected, the process proceeds to step 102. If the WiFi network is not connected, the process proceeds to step 104.
其中,终端可以先判断是否打开了WiFi功能,如果没有打开WiFi功能则确定终端当前没有连接WiFi网络。The terminal may first determine whether the WiFi function is enabled. If the WiFi function is not enabled, it is determined that the terminal is not currently connected to the WiFi network.
如果终端打开了WiFi功能,则进一步确定终端是否接入了任何一个接入点(AP:Access Point),如果终端没有接入任何一个接入点,则可以确定终端当前没有连接WiFi网络。If the terminal has turned on the WiFi function, it is further determined whether the terminal accesses any one of the access points (AP: Access Point). If the terminal does not access any of the access points, it can be determined that the terminal is not currently connected to the WiFi network.
如果终端接入了任何一个接入点,则确定终端当前连接了WiFi网络。If the terminal accesses any of the access points, it is determined that the terminal is currently connected to the WiFi network.
其中,无线接入点是一个无线网络的接入点,俗称“热点”。主要有路由交换接入一体设备和纯接入点设备,一体设备执行接入和路由工作,纯接入设备只负责无线客户端的接入,纯接入设备通常作为无线网络扩展使用,与其他AP或者主AP连接,以扩大无线覆盖范围,而一体设备一般是无线网络的核心。无线AP是使用无线设备(手机等移动设备及笔记本电脑等无线设备)用户进入有线网络的接入点,主要用于宽带家庭、大楼内部、校园内部、园区内部以及仓库、工厂等需要无线监控的地方,典型距离覆盖几十米至上百米,也有可以用于远距离传送,目前最远的可以达到30KM左右,主要技术为IEEE802.11系列。大多数无线AP还带有接入点客户端模式(AP client),可以和其它AP进行无线连接,延展网络的覆盖范围。Among them, the wireless access point is a wireless network access point, commonly known as "hot spot." There are mainly routing switching access integrated devices and pure access point devices. The integrated device performs access and routing work. The pure access device is only responsible for wireless client access. The pure access device is usually used as a wireless network extension, and other APs. Or the primary AP is connected to expand the wireless coverage, and the integrated device is generally the core of the wireless network. A wireless AP is an access point that uses a wireless device (a mobile device such as a mobile device or a wireless device such as a notebook computer) to enter a wired network, and is mainly used in a broadband home, a building interior, a campus interior, a campus interior, and a warehouse, a factory, and the like that require wireless monitoring. Places, typical distances cover tens of meters to hundreds of meters, but also can be used for long-distance transmission, the farthest can reach about 30KM, the main technology is IEEE802.11 series. Most wireless APs also have an access point client mode (AP client) that can be wirelessly connected to other APs to extend the coverage of the network.
102、终端检测所述WiFi网络是否与因特网连接;如果是,进入步骤103;如果否,进入步骤104。102. The terminal detects whether the WiFi network is connected to the Internet; if yes, proceeds to step 103; if not, proceeds to step 104.
其中,检测WiFi网络是否与因特网连接可以由多种方式,具体可以ping位于因特网中的服务器,例如,ping www.***.com,此时,如果接收到www.***.com对应的服务器的回应,则说明当前终端可以与www.***.com对应的服务器进行通信,由于www.***.com对应的服务器是位于因特网的,则可以毫无意义地确定WiFi网络与因特网连接了。当然,如果没有响应,则可以证明WiFi网络没有因特网连接。Wherein, detecting whether the WiFi network is connected to the Internet can be performed in various ways, specifically, pinging a server located in the Internet, for example, ping www.***.com, at this time, if receiving a response from the server corresponding to www.***.com, It means that the current terminal can communicate with the server corresponding to www.***.com. Since the server corresponding to www.***.com is located on the Internet, it can be determined that the WiFi network is connected to the Internet. Of course, if there is no response, it can be proved that the WiFi network does not have an Internet connection.
需要说明的是,在某些实施方式中,为了确保判断终端与因特网是否连接的准确性,会与多个位于因特网的服务器进行通信,即可以排除位于因特网中的一个服务器故障导致检测出现错误的情况。It should be noted that, in some embodiments, in order to ensure the accuracy of determining whether the terminal is connected to the Internet, a plurality of servers located on the Internet may communicate with each other, that is, a server fault located in the Internet may be excluded to cause an error to be detected. Happening.
103、通过所述WiFi网络接入因特网。103. Access the Internet through the WiFi network.
如果WiFi网络与因特网有连接,则将WiFi网络作为因特网连接的通路,从而通过WiFi网络接入因特网,即所有的因特网流量都通过WiFi网络传输。If the WiFi network is connected to the Internet, the WiFi network is used as a path for Internet connection, thereby accessing the Internet through the WiFi network, that is, all Internet traffic is transmitted through the WiFi network.
104、通过蜂窝网络接入因特网。 104. Accessing the Internet through a cellular network.
如果WiFi网络没有与因特网连接,则通过蜂窝网络接入因特网,即所有的因特网流量都通过蜂窝网络传输。If the WiFi network is not connected to the Internet, the Internet is accessed via the cellular network, ie all Internet traffic is transmitted over the cellular network.
由于本发明实施例中终端可以检测WiFi网络与因特网的连接,从而在终端所连接的WiFi网络不能够与因特网连接时,通过蜂窝网络接入因特网,使得终端始终能够接入因特网,提高用户使用终端接入网络的用户体验。In the embodiment of the present invention, the terminal can detect the connection between the WiFi network and the Internet, so that when the WiFi network connected to the terminal cannot be connected to the Internet, the terminal accesses the Internet through the cellular network, so that the terminal can always access the Internet and improve the user's use of the terminal. User experience of accessing the network.
图2描述了本发明另一个实施例提供的终端接入网络切换的流程,如图2所示,该实施例包括:FIG. 2 is a flowchart of a terminal access network handover according to another embodiment of the present invention. As shown in FIG. 2, the embodiment includes:
201、终端判断当前是否连接了WiFi网络;如果连接了WiFi网络,进入步骤202;如果没有连接WiFi网络,进入步骤205。201. The terminal determines whether the WiFi network is currently connected. If the WiFi network is connected, the process proceeds to step 202. If the WiFi network is not connected, the process proceeds to step 205.
其中,终端可以先判断是否打开了WiFi功能,如果没有打开WiFi功能则确定终端当前没有连接WiFi网络。The terminal may first determine whether the WiFi function is enabled. If the WiFi function is not enabled, it is determined that the terminal is not currently connected to the WiFi network.
如果终端打开了WiFi功能,则进一步确定终端是否接入了任何一个接入点(AP:Access Point),如果终端没有接入任何一个接入点,则可以确定终端当前没有连接WiFi网络。If the terminal has turned on the WiFi function, it is further determined whether the terminal accesses any one of the access points (AP: Access Point). If the terminal does not access any of the access points, it can be determined that the terminal is not currently connected to the WiFi network.
如果终端接入了任何一个接入点,则确定终端当前连接了WiFi网络。If the terminal accesses any of the access points, it is determined that the terminal is currently connected to the WiFi network.
其中,无线接入点是一个无线网络的接入点,俗称“热点”。主要有路由交换接入一体设备和纯接入点设备,一体设备执行接入和路由工作,纯接入设备只负责无线客户端的接入,纯接入设备通常作为无线网络扩展使用,与其他AP或者主AP连接,以扩大无线覆盖范围,而一体设备一般是无线网络的核心。无线AP是使用无线设备(手机等移动设备及笔记本电脑等无线设备)用户进入有线网络的接入点,主要用于宽带家庭、大楼内部、校园内部、园区内部以及仓库、工厂等需要无线监控的地方,典型距离覆盖几十米至上百米,也有可以用于远距离传送,目前最远的可以达到30KM左右,主要技术为IEEE802.11系列。大多数无线AP还带有接入点客户端模式(AP client),可以和其它AP进行无线连接,延展网络的覆盖范围。Among them, the wireless access point is a wireless network access point, commonly known as "hot spot." There are mainly routing switching access integrated devices and pure access point devices. The integrated device performs access and routing work. The pure access device is only responsible for wireless client access. The pure access device is usually used as a wireless network extension, and other APs. Or the primary AP is connected to expand the wireless coverage, and the integrated device is generally the core of the wireless network. A wireless AP is an access point that uses a wireless device (a mobile device such as a mobile device or a wireless device such as a notebook computer) to enter a wired network, and is mainly used in a broadband home, a building interior, a campus interior, a campus interior, and a warehouse, a factory, and the like that require wireless monitoring. Places, typical distances cover tens of meters to hundreds of meters, but also can be used for long-distance transmission, the farthest can reach about 30KM, the main technology is IEEE802.11 series. Most wireless APs also have an access point client mode (AP client) that can be wirelessly connected to other APs to extend the coverage of the network.
202、通过WiFi网络向位于因特网的检测服务器发送检测请求。202. Send a detection request to a detection server located on the Internet through a WiFi network.
在一个实施例中,该检测请求可以是ping请求。该检测服务器可以由终端厂商自己设置,也可以是位于因特网中的别的服务器。例如,在一种实施方式中,采用了ping方式,例如,ping www.***.com,此时,如果接收到www.***.com对应的服务器的回应,则说明当前终端可以与www.***.com对应的服务器进行通信,由于www.***.com对应的服务器是位于因特网的, 则可以毫无意义地确定WiFi网络与因特网连接了。当然,如果没有响应,则可以证明WiFi网络没有因特网连接。In one embodiment, the detection request can be a ping request. The detection server may be set by the terminal manufacturer itself or may be another server located in the Internet. For example, in one embodiment, a ping method is used, for example, ping www.***.com. At this time, if a response from the server corresponding to www.***.com is received, the current terminal can be associated with www.***. The server corresponding to com communicates, because the server corresponding to www.***.com is located on the Internet, It is then meaningless to determine that the WiFi network is connected to the Internet. Of course, if there is no response, it can be proved that the WiFi network does not have an Internet connection.
203、判断是否在预置时间内接收到了检测服务器的检测响应。203. Determine whether the detection response of the detection server is received within the preset time.
如果在预置时间内接收到了检测服务器的检测响应,则说明WiFi网络可以与因特网连接,进入步骤204;如果在预置时间内没有接收到检测服务器的检测响应,则说明WiFi网络不能与因特网连接,进入步骤205;If the detection response of the detection server is received within the preset time, the WiFi network can be connected to the Internet, and the process proceeds to step 204; if the detection response of the detection server is not received within the preset time, the WiFi network cannot be connected to the Internet. Going to step 205;
需要说明的是,在某些实施方式中,为了确保判断终端与因特网是否连接的准确性,会与多个位于因特网的服务器进行通信,即可以排除位于因特网中的一个服务器故障导致检测出现错误的情况。即,步骤202至203可以循环执行多次,只要任何一次的结果是收到了检测服务器的检测响应,都可以说明WiFi网络是与因特网连接的。It should be noted that, in some embodiments, in order to ensure the accuracy of determining whether the terminal is connected to the Internet, a plurality of servers located on the Internet may communicate with each other, that is, a server fault located in the Internet may be excluded to cause an error to be detected. Happening. That is, steps 202 to 203 can be performed multiple times in a loop, and as long as the result of any one of the times is that the detection response of the detection server is received, it can be said that the WiFi network is connected to the Internet.
204、通过所述WiFi网络接入因特网。结束流程。204. Access the Internet through the WiFi network. End the process.
如果WiFi网络与因特网有连接,则将WiFi网络作为因特网连接的通路,从而通过WiFi网络接入因特网,即所有的因特网流量都通过WiFi网络传输。If the WiFi network is connected to the Internet, the WiFi network is used as a path for Internet connection, thereby accessing the Internet through the WiFi network, that is, all Internet traffic is transmitted through the WiFi network.
205、通过蜂窝网络接入因特网。205. Accessing the Internet through a cellular network.
如果WiFi网络没有与因特网连接,则通过蜂窝网络接入因特网,即所有的因特网流量都通过蜂窝网络传输。If the WiFi network is not connected to the Internet, the Internet is accessed via the cellular network, ie all Internet traffic is transmitted over the cellular network.
由于本发明实施例中终端可以检测WiFi网络与因特网的连接,从而在终端所连接的WiFi网络不能够与因特网连接时,通过蜂窝网络接入因特网,使得终端始终能够接入因特网,提高用户使用终端接入网络的用户体验。In the embodiment of the present invention, the terminal can detect the connection between the WiFi network and the Internet, so that when the WiFi network connected to the terminal cannot be connected to the Internet, the terminal accesses the Internet through the cellular network, so that the terminal can always access the Internet and improve the user's use of the terminal. User experience of accessing the network.
在本发明的另一个实施例中,可以由用户预先设定是否允许终端自动进行接入网络的切换,也就是说可以在终端***的设置菜单中设置一个自动切换开关,由用户根据自己的需要选择是否将该自动切换开关打开。例如,用户的因特网连接需求比较强,而且也能够承受通过蜂窝网络接入因特网产生的费用,则用户可以选择打开自动切换开关;或者,虽然用户的因特网连接需求比较强,但是不想承受通过蜂窝网络接入因特网产生的费用,则用户可以选择关闭自动切换开关;或者,用户的因特网连接需求较弱,则用户可以选择关闭自动切换开关。可以理解的是,为了避免为用户产生额外的使用蜂窝网络接入因特网的费用,***默认应该是关闭该自动切换开关。In another embodiment of the present invention, the user may pre-set whether to allow the terminal to automatically perform the switching of the access network, that is, an automatic switch can be set in the setting menu of the terminal system, and the user can set according to his own needs. Select whether to turn the automatic switch on. For example, if the user's Internet connection needs are relatively strong, and the user can also bear the cost of accessing the Internet through the cellular network, the user can choose to turn on the automatic switch; or, although the user's Internet connection needs are strong, but does not want to bear through the cellular network. The user may choose to turn off the automatic switch when the fee is generated by accessing the Internet; or the user's Internet connection demand is weak, the user may choose to turn off the automatic switch. It can be understood that in order to avoid the additional cost of using the cellular network to access the Internet for the user, the system should turn off the automatic switch by default.
在这种情况下,终端在通过蜂窝网络接入因特网前,还应该判断预设的自动切换开关是否打开; In this case, before the terminal accesses the Internet through the cellular network, it should also judge whether the preset automatic switch is turned on;
如果所述自动切换开关已经打开,才通过蜂窝网络接入因特网。If the automatic switch is already open, the Internet is accessed via the cellular network.
如果所述自动切换开关是关闭的,则表示用户不想在有WiFi网络的情况下通过蜂窝网络接入因特网,即便当前的WiFi网络与因特网并不是连通的。If the automatic switch is off, it means that the user does not want to access the Internet through the cellular network if there is a WiFi network, even if the current WiFi network is not connected to the Internet.
在本发明的另一个实施例中,可以由用户预先设定允许终端自动进行接入网络的切换后,还可以进一步设置在有WiFi网络的情况下可以通过蜂窝网络产生多少数据量,也就是说可以在终端***的设置菜单中设置数据量设置菜单,用户可以根据自己的需求或者承受能力设置数据量的上限值,并且该数据量还可以设置单次的上限值,以及某一时间周期,例如一天,一个星期或者一个月的累积数据量的上限值。例如,用户可以设置单次产生的数据量不超过10M,一个星期的数据量不能超过100M,一个月的数据量不能超过1G等等。可以理解的是,为了减少用户的操作量,***也可以设置一个默认值,该默认值应该是绝大多数用户都能够结束的一个数值,例如可以是10M。In another embodiment of the present invention, after the user is preset to allow the terminal to automatically perform the handover of the access network, the user may further set how much data can be generated through the cellular network when the WiFi network is available, that is, The data volume setting menu can be set in the setting menu of the terminal system, and the user can set the upper limit value of the data amount according to his own needs or withstand capability, and the data amount can also set a single upper limit value, and a certain time period. , for example, the upper limit of the cumulative amount of data for one day, one week, or one month. For example, the user can set the amount of data generated in a single generation to not exceed 10M, the amount of data in one week cannot exceed 100M, the amount of data in one month cannot exceed 1G, and so on. Understandably, in order to reduce the amount of user operations, the system can also set a default value, which should be a value that most users can end, for example, it can be 10M.
在这种情况下,终端在通过蜂窝网络接入因特网前,还可以进一步确定需要因特网交互的数据量;然后判断所述数据量是否大于预设数量;如果所述数据量小于或等于所述预设数量,才通过蜂窝网络接入因特网。如果数据量大于预设数量,则不通过蜂窝网络接入因特网。In this case, the terminal may further determine the amount of data that requires Internet interaction before accessing the Internet through the cellular network; and then determine whether the amount of data is greater than a preset amount; if the amount of data is less than or equal to the pre- It is only necessary to access the Internet through a cellular network. If the amount of data is greater than the preset amount, the Internet is not accessed through the cellular network.
其中,因特网交互的数据量的确认,可以通过需要发送或者接收的文件的大小来确认,例如需要发送一个文件,文件的大小是9M,则可以确定需要交互的数据量小于预设数量10,从而可以通过蜂窝网络接入因特网。反之,如果需要接收一个文件,文件的大小是11M,则可以确定需要因特网交互的数据量大于预设数量10,从而不通过蜂窝网络接入因特网。The confirmation of the amount of data exchanged by the Internet may be confirmed by the size of the file to be sent or received. For example, if a file needs to be sent, the size of the file is 9M, and the amount of data to be interacted may be determined to be less than the preset number 10, thereby The Internet can be accessed through a cellular network. On the other hand, if it is necessary to receive a file whose size is 11M, it can be determined that the amount of data requiring Internet interaction is greater than the preset number 10, so that the Internet is not accessed through the cellular network.
在某些实施例中,为了提高用户的使用体现,可以在通过蜂窝网络接入因特网前,在终端显示屏上显示选择信息,以使得用户可以选择是否通过蜂窝网络接入因特网;In some embodiments, in order to improve the usage of the user, the selection information may be displayed on the display of the terminal before the Internet is accessed through the cellular network, so that the user can select whether to access the Internet through the cellular network;
如果接收到用户的确认信息,才通过蜂窝网络接入因特网。如果没有接收到用户的确认信息,或者接收到用户的拒绝信息,则不通过蜂窝网络接入因特网。The Internet is accessed through the cellular network if the user's confirmation message is received. If the user's confirmation information is not received, or the user's rejection information is received, the Internet is not accessed through the cellular network.
其中,在终端显示屏上显示的选择信息的内容可以包括:当前WiFi网络的因特网连接情况,需要因特网交互的数据量的情况等等,让用户根据这些内容确定是否允许通过蜂窝网络接入因特网。The content of the selection information displayed on the display screen of the terminal may include: an Internet connection status of the current WiFi network, a situation of the amount of data required for Internet interaction, and the like, and the user is determined according to the content whether to allow access to the Internet through the cellular network.
图3描述了本发明一个实施例提供的终端的结构,包括: Figure 3 is a diagram showing the structure of a terminal according to an embodiment of the present invention, including:
判断单元301,用于终端判断当前是否连接了WiFi网络。The determining unit 301 is configured to determine, by the terminal, whether a WiFi network is currently connected.
其中,终端可以先判断是否打开了WiFi功能,如果没有打开WiFi功能则确定终端当前没有连接WiFi网络。The terminal may first determine whether the WiFi function is enabled. If the WiFi function is not enabled, it is determined that the terminal is not currently connected to the WiFi network.
如果终端打开了WiFi功能,则进一步确定终端是否接入了任何一个接入点(AP:Access Point),如果终端没有接入任何一个接入点,则可以确定终端当前没有连接WiFi网络。If the terminal has turned on the WiFi function, it is further determined whether the terminal accesses any one of the access points (AP: Access Point). If the terminal does not access any of the access points, it can be determined that the terminal is not currently connected to the WiFi network.
如果终端接入了任何一个接入点,则确定终端当前连接了WiFi网络。If the terminal accesses any of the access points, it is determined that the terminal is currently connected to the WiFi network.
其中,无线接入点是一个无线网络的接入点,俗称“热点”。主要有路由交换接入一体设备和纯接入点设备,一体设备执行接入和路由工作,纯接入设备只负责无线客户端的接入,纯接入设备通常作为无线网络扩展使用,与其他AP或者主AP连接,以扩大无线覆盖范围,而一体设备一般是无线网络的核心。无线AP是使用无线设备(手机等移动设备及笔记本电脑等无线设备)用户进入有线网络的接入点,主要用于宽带家庭、大楼内部、校园内部、园区内部以及仓库、工厂等需要无线监控的地方,典型距离覆盖几十米至上百米,也有可以用于远距离传送,目前最远的可以达到30KM左右,主要技术为IEEE802.11系列。大多数无线AP还带有接入点客户端模式(AP client),可以和其它AP进行无线连接,延展网络的覆盖范围。Among them, the wireless access point is a wireless network access point, commonly known as "hot spot." There are mainly routing switching access integrated devices and pure access point devices. The integrated device performs access and routing work. The pure access device is only responsible for wireless client access. The pure access device is usually used as a wireless network extension, and other APs. Or the primary AP is connected to expand the wireless coverage, and the integrated device is generally the core of the wireless network. A wireless AP is an access point that uses a wireless device (a mobile device such as a mobile device or a wireless device such as a notebook computer) to enter a wired network, and is mainly used in a broadband home, a building interior, a campus interior, a campus interior, and a warehouse, a factory, and the like that require wireless monitoring. Places, typical distances cover tens of meters to hundreds of meters, but also can be used for long-distance transmission, the farthest can reach about 30KM, the main technology is IEEE802.11 series. Most wireless APs also have an access point client mode (AP client) that can be wirelessly connected to other APs to extend the coverage of the network.
检测单元302,用于在所述终端当前连接了WiFi网络时,终端检测所述WiFi网络是否与因特网连接。The detecting unit 302 is configured to detect, when the terminal is currently connected to the WiFi network, whether the WiFi network is connected to the Internet.
其中,检测WiFi网络是否与因特网连接可以由多种方式,具体可以ping位于因特网中的服务器,例如,ping www.***.com,此时,如果接收到www.***.com对应的服务器的回应,则说明当前终端可以与www.***.com对应的服务器进行通信,由于www.***.com对应的服务器是位于因特网的,则可以毫无意义地确定WiFi网络与因特网连接了。当然,如果没有响应,则可以证明WiFi网络没有因特网连接。Wherein, detecting whether the WiFi network is connected to the Internet can be performed in various ways, specifically, pinging a server located in the Internet, for example, ping www.***.com, at this time, if receiving a response from the server corresponding to www.***.com, It means that the current terminal can communicate with the server corresponding to www.***.com. Since the server corresponding to www.***.com is located on the Internet, it can be determined that the WiFi network is connected to the Internet. Of course, if there is no response, it can be proved that the WiFi network does not have an Internet connection.
需要说明的是,在某些实施方式中,为了确保判断终端与因特网是否连接的准确性,会与多个位于因特网的服务器进行通信,即可以排除位于因特网中的一个服务器故障导致检测出现错误的情况。It should be noted that, in some embodiments, in order to ensure the accuracy of determining whether the terminal is connected to the Internet, a plurality of servers located on the Internet may communicate with each other, that is, a server fault located in the Internet may be excluded to cause an error to be detected. Happening.
连接单元303,用于在所述WiFi网络与因特网连接时,通过所述WiFi网络接入因特网;用于在所述WiFi网络不能与因特网连接时,通过蜂窝网络接入因特网。 The connecting unit 303 is configured to access the Internet through the WiFi network when the WiFi network is connected to the Internet, and to access the Internet through the cellular network when the WiFi network cannot connect to the Internet.
如果WiFi网络与因特网有连接,则将WiFi网络作为因特网连接的通路,从而通过WiFi网络接入因特网,即所有的因特网流量都通过WiFi网络传输。If the WiFi network is connected to the Internet, the WiFi network is used as a path for Internet connection, thereby accessing the Internet through the WiFi network, that is, all Internet traffic is transmitted through the WiFi network.
如果WiFi网络没有与因特网连接,则通过蜂窝网络接入因特网,即所有的因特网流量都通过蜂窝网络传输。If the WiFi network is not connected to the Internet, the Internet is accessed via the cellular network, ie all Internet traffic is transmitted over the cellular network.
由于本发明实施例中终端可以检测WiFi网络与因特网的连接,从而在终端所连接的WiFi网络不能够与因特网连接时,通过蜂窝网络接入因特网,使得终端始终能够接入因特网,提高用户使用终端接入网络的用户体验。In the embodiment of the present invention, the terminal can detect the connection between the WiFi network and the Internet, so that when the WiFi network connected to the terminal cannot be connected to the Internet, the terminal accesses the Internet through the cellular network, so that the terminal can always access the Internet and improve the user's use of the terminal. User experience of accessing the network.
在本发明的另一个实施例中,检测单元302在检测WiFi网络是否与因特网连接时可以具体用于:In another embodiment of the present invention, the detecting unit 302 may be specifically configured to: when detecting whether the WiFi network is connected to the Internet:
向位于因特网的检测服务器发送检测请求;如果接收到所述检测服务器针对所述检测请求的检测响应,则确定所述WiFi网络与因特网连接;如果在预置时间内没有接收到所述检测服务器针对所述检测请求的检测响应,则确定所述WiFi网络不能与因特网连接。Sending a detection request to a detection server located at the Internet; if receiving a detection response of the detection server for the detection request, determining that the WiFi network is connected to the Internet; if the detection server is not received within a preset time The detection response of the detection request determines that the WiFi network cannot be connected to the Internet.
在一个实施例中,该检测请求可以是ping请求。该检测服务器可以由终端厂商自己设置,也可以是位于因特网中的别的服务器。例如,在一种实施方式中,采用了ping方式,例如,ping www.***.com,此时,如果接收到www.***.com对应的服务器的回应,则说明当前终端可以与www.***.com对应的服务器进行通信,由于www.***.com对应的服务器是位于因特网的,则可以毫无意义地确定WiFi网络与因特网连接了。当然,如果没有响应,则可以证明WiFi网络没有因特网连接。如果在预置时间内接收到了检测服务器的检测响应,则说明WiFi网络可以与因特网连接;如果在预置时间内没有接收到检测服务器的检测响应,则说明WiFi网络不能与因特网连接。In one embodiment, the detection request can be a ping request. The detection server may be set by the terminal manufacturer itself or may be another server located in the Internet. For example, in one embodiment, a ping method is used, for example, ping www.***.com. At this time, if a response from the server corresponding to www.***.com is received, the current terminal can be associated with www.***. The server corresponding to com communicates. Since the server corresponding to www.***.com is located on the Internet, it can be determined that the WiFi network is connected to the Internet. Of course, if there is no response, it can be proved that the WiFi network does not have an Internet connection. If the detection response of the detection server is received within the preset time, the WiFi network can be connected to the Internet; if the detection response of the detection server is not received within the preset time, the WiFi network cannot be connected to the Internet.
需要说明的是,在某些实施方式中,为了确保判断终端与因特网是否连接的准确性,会与多个位于因特网的服务器进行通信,即可以排除位于因特网中的一个服务器故障导致检测出现错误的情况。检测单元302的检测可以执行多次,只要任何一次的结果是收到了检测服务器的检测响应,都可以说明WiFi网络是与因特网连接的。It should be noted that, in some embodiments, in order to ensure the accuracy of determining whether the terminal is connected to the Internet, a plurality of servers located on the Internet may communicate with each other, that is, a server fault located in the Internet may be excluded to cause an error to be detected. Happening. The detection by the detecting unit 302 can be performed multiple times, and as long as the result of any one of the times is that the detection response of the detecting server is received, it can be said that the WiFi network is connected to the Internet.
在本发明的另一个实施例中,可以由用户预先设定是否允许终端自动进行接入网络的切换,也就是说可以在终端***的设置菜单中设置一个自动切换开关,由用户根据自己的需要选择是否将该自动切换开关打开。例如,用户的因特网连接需求比较强,而且也能够承受通过蜂窝网络接入因特网产生的费用, 则用户可以选择打开自动切换开关;或者,虽然用户的因特网连接需求比较强,但是不想承受通过蜂窝网络接入因特网产生的费用,则用户可以选择关闭自动切换开关;或者,用户的因特网连接需求较弱,则用户可以选择关闭自动切换开关。可以理解的是,为了避免为用户产生额外的使用蜂窝网络接入因特网的费用,***默认应该是关闭该自动切换开关。In another embodiment of the present invention, the user may pre-set whether to allow the terminal to automatically perform the switching of the access network, that is, an automatic switch can be set in the setting menu of the terminal system, and the user can set according to his own needs. Select whether to turn the automatic switch on. For example, users have a strong Internet connection and can afford to access the Internet through a cellular network. The user may choose to turn on the automatic switch; or, although the user's Internet connection needs are relatively strong, but does not want to bear the cost of accessing the Internet through the cellular network, the user may choose to turn off the automatic switch; or, the user's Internet connection needs are relatively high. Weak, the user can choose to turn off the automatic switch. It can be understood that in order to avoid the additional cost of using the cellular network to access the Internet for the user, the system should turn off the automatic switch by default.
在这种情况下,所述判断单元302还可以用于:判断预设的自动切换开关是否打开;所述连接单元,具体用于在所述判断单元判断所述自动切换开关已经打开,才通过蜂窝网络接入因特网。如果所述自动切换开关是关闭的,则表示用户不想在有WiFi网络的情况下通过蜂窝网络接入因特网,即便当前的WiFi网络与因特网并不是连通的。In this case, the determining unit 302 is further configured to: determine whether the preset automatic switch is turned on; and the connecting unit is specifically configured to: after the determining unit determines that the automatic switch is turned on, The cellular network accesses the Internet. If the automatic switch is off, it means that the user does not want to access the Internet through the cellular network if there is a WiFi network, even if the current WiFi network is not connected to the Internet.
在本发明的另一个实施例中,可以由用户预先设定允许终端自动进行接入网络的切换后,还可以进一步设置在有WiFi网络的情况下可以通过蜂窝网络产生多少数据量,也就是说可以在终端***的设置菜单中设置数据量设置菜单,用户可以根据自己的需求或者承受能力设置数据量的上限值,并且该数据量还可以设置单次的上限值,以及某一时间周期,例如一天,一个星期或者一个月的累积数据量的上限值。例如,用户可以设置单次产生的数据量不超过10M,一个星期的数据量不能超过100M,一个月的数据量不能超过1G等等。可以理解的是,为了减少用户的操作量,***也可以设置一个默认值,该默认值应该是绝大多数用户都能够结束的一个数值,例如可以是10M。In another embodiment of the present invention, after the user is preset to allow the terminal to automatically perform the handover of the access network, the user may further set how much data can be generated through the cellular network when the WiFi network is available, that is, The data volume setting menu can be set in the setting menu of the terminal system, and the user can set the upper limit value of the data amount according to his own needs or withstand capability, and the data amount can also set a single upper limit value, and a certain time period. , for example, the upper limit of the cumulative amount of data for one day, one week, or one month. For example, the user can set the amount of data generated in a single generation to not exceed 10M, the amount of data in one week cannot exceed 100M, the amount of data in one month cannot exceed 1G, and so on. Understandably, in order to reduce the amount of user operations, the system can also set a default value, which should be a value that most users can end, for example, it can be 10M.
如图3中的虚线部分所示,在这种情况下,所述终端还可以包括:确定单元304,用于确定需要因特网交互的数据量;所述判断单元302,还可以用于判断所述确定单元确定的数据量是否大于预设数量;所述连接单元303,具体可以用于在所述判断单元判断所述数据量小于或等于所述预设数量时,才通过蜂窝网络接入因特网。As shown in the dotted line in FIG. 3, the terminal may further include: a determining unit 304, configured to determine an amount of data that requires Internet interaction; the determining unit 302 may further be configured to determine the The determining unit 303 is configured to: when the determining unit determines that the amount of data is less than or equal to the preset quantity, accessing the Internet through the cellular network.
其中,因特网交互的数据量的确认,可以通过需要发送或者接收的文件的大小来确认,例如需要发送一个文件,文件的大小是9M,则可以确定需要交互的数据量小于预设数量10,从而可以通过蜂窝网络接入因特网。反之,如果需要接收一个文件,文件的大小是11M,则可以确定需要因特网交互的数据量大于预设数量10,从而不通过蜂窝网络接入因特网。The confirmation of the amount of data exchanged by the Internet may be confirmed by the size of the file to be sent or received. For example, if a file needs to be sent, the size of the file is 9M, and the amount of data to be interacted may be determined to be less than the preset number 10, thereby The Internet can be accessed through a cellular network. On the other hand, if it is necessary to receive a file whose size is 11M, it can be determined that the amount of data requiring Internet interaction is greater than the preset number 10, so that the Internet is not accessed through the cellular network.
在某些实施例中,为了提高用户的使用体现,如图3中的虚线部分所示,所述终端还可以包括: In some embodiments, in order to improve the usage of the user, as shown by the dotted line in FIG. 3, the terminal may further include:
显示单元305,用于在终端显示屏上显示选择信息,以使得用户可以选择是否通过蜂窝网络接入因特网;所述连接单元303,还可以用于在接收到用户的确认信息时,才通过蜂窝网络接入因特网。The display unit 305 is configured to display the selection information on the display screen of the terminal, so that the user can select whether to access the Internet through the cellular network. The connection unit 303 can also be configured to pass the cellular when receiving the confirmation information of the user. The network accesses the Internet.
如果接收到用户的确认信息,才通过蜂窝网络接入因特网。如果没有接收到用户的确认信息,或者接收到用户的拒绝信息,则不通过蜂窝网络接入因特网。The Internet is accessed through the cellular network if the user's confirmation message is received. If the user's confirmation information is not received, or the user's rejection information is received, the Internet is not accessed through the cellular network.
其中,在终端显示屏上显示的选择信息的内容可以包括:当前WiFi网络的因特网连接情况,需要因特网交互的数据量的情况等等,让用户根据这些内容确定是否允许通过蜂窝网络接入因特网。The content of the selection information displayed on the display screen of the terminal may include: an Internet connection status of the current WiFi network, a situation of the amount of data required for Internet interaction, and the like, and the user is determined according to the content whether to allow access to the Internet through the cellular network.
上述装置和***内的各模块之间的信息交互、执行过程等内容,由于与本发明方法实施例基于同一构思,具体内容可参见本发明方法实施例中的叙述,此处不再赘述。For the information exchange, the execution process, and the like between the above-mentioned devices and the modules in the system, the content is based on the same concept as the method embodiment of the present invention. For details, refer to the description in the method embodiment of the present invention, and details are not described herein again.
本发明的另一个实施例提供一种计算机可读存储介质,所述计算机可读存储介质存储了程序代码,所述程序代码包括的指令用于执行如下步骤:Another embodiment of the present invention provides a computer readable storage medium storing program code, the program code including instructions for performing the following steps:
判断终端当前是否连接了WiFi网络;Determine whether the terminal is currently connected to the WiFi network;
在所述终端当前连接了WiFi网络时,检测所述WiFi网络是否与因特网连接;Detecting whether the WiFi network is connected to the Internet when the terminal is currently connected to the WiFi network;
如果所述WiFi网络与因特网连接,则通过所述WiFi网络接入因特网;If the WiFi network is connected to the Internet, accessing the Internet through the WiFi network;
如果所述WiFi网络不能与因特网连接,则通过蜂窝网络接入因特网。If the WiFi network cannot be connected to the Internet, the Internet is accessed through the cellular network.
可选的,所述检测WiFi网络是否与因特网连接包括:Optionally, the detecting whether the WiFi network is connected to the Internet includes:
向位于因特网的检测服务器发送检测请求;Sending a detection request to a detection server located on the Internet;
如果接收到所述检测服务器针对所述检测请求的检测响应,则确定所述WiFi网络与因特网连接;If the detection response of the detection server for the detection request is received, determining that the WiFi network is connected to the Internet;
如果在预置时间内没有接收到所述检测服务器针对所述检测请求的检测响应,则确定所述WiFi网络不能与因特网连接。If the detection response of the detection server for the detection request is not received within a preset time, it is determined that the WiFi network cannot be connected to the Internet.
可选的,所述通过蜂窝网络接入因特网前,所述程序代码包括的指令还用于:Optionally, before the accessing the Internet through the cellular network, the program code includes instructions for:
判断预设的自动切换开关是否打开;Determine whether the preset automatic switch is turned on;
如果所述自动切换开关已经打开,才通过蜂窝网络接入因特网。If the automatic switch is already open, the Internet is accessed via the cellular network.
可选的,所述通过蜂窝网络接入因特网前,所述程序代码包括的指令还用于: Optionally, before the accessing the Internet through the cellular network, the program code includes instructions for:
确定需要因特网交互的数据量;Determine the amount of data that requires Internet interaction;
判断所述数据量是否大于预设数量;Determining whether the amount of data is greater than a preset amount;
如果所述数据量小于或等于所述预设数量,才通过蜂窝网络接入因特网。If the amount of data is less than or equal to the preset amount, the Internet is accessed through the cellular network.
可选的,所述通过蜂窝网络接入因特网前,所述程序代码包括的指令还用于:Optionally, before the accessing the Internet through the cellular network, the program code includes instructions for:
在终端显示屏上显示选择信息,以使得用户可以选择是否通过蜂窝网络接入因特网;Displaying selection information on the terminal display so that the user can select whether to access the Internet through the cellular network;
如果接收到用户的确认信息,才通过蜂窝网络接入因特网。The Internet is accessed through the cellular network if the user's confirmation message is received.
参见图4,本发明的另一个实施例提供一种终端500,包括:相互耦合的处理器510和存储器520;处理器510用于执行如下步骤:判断终端当前是否连接了WiFi网络;在终端当前连接了WiFi网络时,检测所述WiFi网络是否与因特网连接;在所述WiFi网络与因特网连接时,通过所述WiFi网络接入因特网;在所述WiFi网络不能与因特网连接时,通过蜂窝网络接入因特网。Referring to FIG. 4, another embodiment of the present invention provides a terminal 500, including: a processor 510 and a memory 520 coupled to each other; the processor 510 is configured to perform the following steps: determining whether the terminal is currently connected to the WiFi network; When the WiFi network is connected, detecting whether the WiFi network is connected to the Internet; when the WiFi network is connected to the Internet, accessing the Internet through the WiFi network; when the WiFi network cannot be connected to the Internet, connecting through the cellular network Into the Internet.
可选的,所述处理器在检测WiFi网络是否与因特网连接时具体用于:Optionally, the processor is specifically configured to: when detecting whether the WiFi network is connected to the Internet:
向位于因特网的检测服务器发送检测请求;Sending a detection request to a detection server located on the Internet;
如果接收到所述检测服务器针对所述检测请求的检测响应,则确定所述WiFi网络与因特网连接;If the detection response of the detection server for the detection request is received, determining that the WiFi network is connected to the Internet;
如果在预置时间内没有接收到所述检测服务器针对所述检测请求的检测响应,则确定所述WiFi网络不能与因特网连接。If the detection response of the detection server for the detection request is not received within a preset time, it is determined that the WiFi network cannot be connected to the Internet.
可选的,所述处理器还用于:判断预设的自动切换开关是否打开;在判断所述自动切换开关已经打开,才通过蜂窝网络接入因特网。Optionally, the processor is further configured to: determine whether the preset automatic switch is turned on; and determine that the automatic switch is turned on before accessing the Internet through the cellular network.
可选的,所述处理器还用于:确定需要因特网交互的数据量;判断确定的数据量是否大于预设数量;在判断所述数据量小于或等于所述预设数量时,才通过蜂窝网络接入因特网。Optionally, the processor is further configured to: determine an amount of data that requires Internet interaction; determine whether the determined amount of data is greater than a preset quantity; and pass the cell when determining that the amount of data is less than or equal to the preset quantity. The network accesses the Internet.
可选的,所述处理器还用于:在终端显示屏上显示选择信息,以使得用户可以选择是否通过蜂窝网络接入因特网;在接收到用户的确认信息时,才通过蜂窝网络接入因特网。Optionally, the processor is further configured to: display selection information on the display screen of the terminal, so that the user can select whether to access the Internet through the cellular network; and access the Internet through the cellular network when receiving the confirmation information of the user. .
本发明实施例还提供了另一移动终端,如图5所示,为了便于说明,仅示出了与本发明实施例相关的部分,具体技术细节未揭示的,请参照本发明实施例方法部分。该移动终端可以为包括手机、平板电脑、PDA(Personal Digital Assistant,个人数字助理)、POS(Point of Sales,销售终端)、车载电脑等 任意终端设备,以移动终端为手机为例:The embodiment of the present invention further provides another mobile terminal. As shown in FIG. 5, for the convenience of description, only parts related to the embodiment of the present invention are shown. If the specific technical details are not disclosed, please refer to the method part of the embodiment of the present invention. . The mobile terminal can be a mobile phone, a tablet computer, a PDA (Personal Digital Assistant), a POS (Point of Sales), a car computer, etc. For any terminal device, take the mobile terminal as a mobile phone as an example:
图5示出的是与本发明实施例提供的移动终端相关的手机的部分结构的框图。参考图5,手机包括:射频(Radio Frequency,RF)电路910、存储器920、输入单元930、传感器950、音频电路960、无线保真(Wireless Fidelity,WiFi)模块970、处理器980、以及电源990等部件。本领域技术人员可以理解,图5中示出的手机结构并不构成对手机的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。FIG. 5 is a block diagram showing a partial structure of a mobile phone related to a mobile terminal provided by an embodiment of the present invention. Referring to FIG. 5, the mobile phone includes: a radio frequency (RF) circuit 910, a memory 920, an input unit 930, a sensor 950, an audio circuit 960, a Wireless Fidelity (WiFi) module 970, a processor 980, and a power supply 990. And other components. It will be understood by those skilled in the art that the structure of the handset shown in FIG. 5 does not constitute a limitation to the handset, and may include more or less components than those illustrated, or some components may be combined, or different components may be arranged.
下面结合图5对手机的各个构成部件进行具体的介绍:The following describes the components of the mobile phone in detail with reference to FIG. 5:
输入单元930可用于接收输入的数字或字符信息,以及产生与手机的用户设置以及功能控制有关的键信号输入。具体地,输入单元930可包括触控显示屏933、生物识别装置931以及其他输入设备932。生物识别装置931可为指纹识别装置,或者,人脸识别装置,或者,虹膜识别装置等等。输入单元930还可以包括其他输入设备932。具体地,其他输入设备932可以包括但不限于物理按键、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆等中的一种或多种。其中,所述处理器980用于获取待处理图像,所述待处理图像的目标区域用于添加水印图案;确定所述目标区域对应的第一图像的第一颜色信息;确定所述第一颜色信息与所述水印图案的第二颜色信息之间的颜色差的绝对值;在所述绝对值小于预设阈值时,对所述第一图像和/或所述水印图案进行颜色调整,且调整后的所述第二颜色信息与所述第一颜色信息之间的颜色差处于预设范围;将调整后的所述待处理图像和所述水印图案进行合成,得到输出图像。The input unit 930 can be configured to receive input numeric or character information and to generate key signal inputs related to user settings and function controls of the handset. Specifically, the input unit 930 can include a touch display screen 933, a biometric device 931, and other input devices 932. The biometric device 931 can be a fingerprint recognition device, or a face recognition device, or an iris recognition device or the like. The input unit 930 can also include other input devices 932. Specifically, other input devices 932 may include, but are not limited to, one or more of physical buttons, function keys (such as volume control buttons, switch buttons, etc.), trackballs, mice, joysticks, and the like. The processor 980 is configured to acquire an image to be processed, the target area of the image to be processed is used to add a watermark pattern, determine first color information of the first image corresponding to the target area, and determine the first color. An absolute value of a color difference between the information and the second color information of the watermark pattern; when the absolute value is less than a preset threshold, performing color adjustment on the first image and/or the watermark pattern, and adjusting The color difference between the second color information and the first color information is in a preset range; and the adjusted image to be processed and the watermark pattern are combined to obtain an output image.
处理器980是手机的控制中心,利用各种接口和线路连接整个手机的各个部分,通过运行或执行存储在存储器920内的软件程序和/或模块,以及调用存储在存储器920内的数据,执行手机的各种功能和处理数据,从而对手机进行整体监控。可选的,处理器980可包括一个或多个处理单元;可选的,处理器980可集成处理器和调制解调处理器,其中,处理器主要处理操作***、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器980中。The processor 980 is the control center of the handset, which connects various portions of the entire handset using various interfaces and lines, by executing or executing software programs and/or modules stored in the memory 920, and invoking data stored in the memory 920, executing The phone's various functions and processing data, so that the overall monitoring of the phone. Optionally, the processor 980 may include one or more processing units; optionally, the processor 980 may integrate a processor and a modem processor, where the processor mainly processes an operating system, a user interface, an application, and the like. The modem processor primarily handles wireless communications. It will be appreciated that the above described modem processor may also not be integrated into the processor 980.
此外,存储器920可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。Moreover, memory 920 can include high speed random access memory, and can also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
RF电路910可用于信息的接收和发送。通常,RF电路910包括但不限于 天线、至少一个放大器、收发信机、耦合器、低噪声放大器(Low Noise Amplifier,LNA)、双工器等。此外,RF电路910还可以通过无线通信与网络和其他设备通信。上述无线通信可以使用任一通信标准或协议,包括但不限于全球移动通讯***(Global System of Mobile communication,GSM)、通用分组无线服务(General Packet Radio Service,GPRS)、码分多址(Code Division Multiple Access,CDMA)、宽带码分多址(Wideband Code Division Multiple Access,WCDMA)、长期演进(Long Term Evolution,LTE)、电子邮件、短消息服务(Short Messaging Service,SMS)等。The RF circuit 910 can be used for receiving and transmitting information. Generally, RF circuit 910 includes, but is not limited to, Antenna, at least one amplifier, transceiver, coupler, Low Noise Amplifier (LNA), duplexer, etc. In addition, RF circuitry 910 can also communicate with the network and other devices via wireless communication. The above wireless communication may use any communication standard or protocol, including but not limited to Global System of Mobile communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (Code Division). Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), E-mail, Short Messaging Service (SMS), and the like.
手机还可包括至少一种传感器950,比如光传感器、运动传感器以及其他传感器。具体地,光传感器可包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节触控显示屏的亮度,接近传感器可在手机移动到耳边时,关闭触控显示屏和/或背光。作为运动传感器的一种,加速计传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别手机姿态的应用(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等;至于手机还可配置的陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器,在此不再赘述。The handset may also include at least one type of sensor 950, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor can adjust the brightness of the touch display screen according to the brightness of the ambient light, and the proximity sensor can turn off the touch display when the mobile phone moves to the ear. And / or backlight. As a kind of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in all directions (usually three axes). When it is stationary, it can detect the magnitude and direction of gravity. It can be used to identify the gesture of the mobile phone (such as horizontal and vertical screen switching, related Game, magnetometer attitude calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for the mobile phone can also be configured with gyroscopes, barometers, hygrometers, thermometers, infrared sensors and other sensors, no longer Narration.
其中,音频电路960、扬声器961,传声器962可提供用户与手机之间的音频接口。音频电路960可将接收到的音频数据转换后的电信号,传输到扬声器961,由扬声器961转换为声音信号播放;另一方面,传声器962将收集的声音信号转换为电信号,由音频电路960接收后转换为音频数据,再将音频数据播放处理器980处理后,经RF电路910以发送给比如另一手机,或者将音频数据播放至存储器920以便进一步处理。Among them, the audio circuit 960, the speaker 961, and the microphone 962 can provide an audio interface between the user and the mobile phone. The audio circuit 960 can transmit the converted electrical data of the received audio data to the speaker 961 for conversion to the sound signal by the speaker 961; on the other hand, the microphone 962 converts the collected sound signal into an electrical signal by the audio circuit 960. After receiving, it is converted into audio data, and then processed by the audio data playback processor 980, sent to the other mobile phone via the RF circuit 910, or played back to the memory 920 for further processing.
WiFi属于短距离无线传输技术,手机通过WiFi模块970可以帮助用户收发电子邮件、浏览网页和访问流式媒体等,它为用户提供了无线的宽带互联网访问。虽然图5示出了WiFi模块970,但是可以理解的是,其并不属于手机的必须构成,完全可以根据需要在不改变发明的本质的范围内而省略。WiFi is a short-range wireless transmission technology, and the mobile phone can help users to send and receive emails, browse web pages, and access streaming media through the WiFi module 970, which provides users with wireless broadband Internet access. Although FIG. 5 shows the WiFi module 970, it can be understood that it does not belong to the essential configuration of the mobile phone, and may be omitted as needed within the scope of not changing the essence of the invention.
手机还包括给各个部件供电的电源990(比如电池),可选的,电源可以通过电源管理***与处理器980逻辑相连,从而通过电源管理***实现管理充电、放电、以及功耗管理等功能。The handset also includes a power supply 990 (such as a battery) that supplies power to the various components. Alternatively, the power supply can be logically coupled to the processor 980 via a power management system to manage charging, discharging, and power management functions through the power management system.
尽管未示出,手机还可以包括摄像头、蓝牙模块等,在此不再赘述。 Although not shown, the mobile phone may further include a camera, a Bluetooth module, and the like, and details are not described herein again.
前述图1-2所示的实施例中,各步骤方法流程可以基于该手机的结构实现。前述图3~图4所示的实施例中,各单元功能可以基于该手机的结构实现。In the foregoing embodiment shown in FIG. 1-2, each step method flow may be implemented based on the structure of the mobile phone. In the foregoing embodiments shown in FIGS. 3 to 4, each unit function can be implemented based on the structure of the mobile phone.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,上述的程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,上述的存储介质可为磁碟、光盘、只读存储记忆体(ROM:Read-Only Memory)或随机存储记忆体(RAM:Random Access Memory)等。A person skilled in the art can understand that all or part of the process of implementing the above embodiment method can be completed by a computer program to instruct related hardware, and the above program can be stored in a computer readable storage medium. When executed, the flow of an embodiment of the methods as described above may be included. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其思想;同时,对于本领域的一般技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本发明的限制。 The principles and embodiments of the present invention have been described herein with reference to specific examples. The foregoing description of the embodiments are merely for the purpose of understanding the method of the present invention and the concept thereof. Also, those skilled in the art in accordance with the present invention The present invention is not limited by the scope of the present invention.

Claims (10)

  1. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储了程序代码,所述程序代码包括的指令用于执行如下步骤:A computer readable storage medium, wherein the computer readable storage medium stores program code, the program code comprising instructions for performing the following steps:
    判断终端当前是否连接了WiFi网络;Determine whether the terminal is currently connected to the WiFi network;
    在所述终端当前连接了WiFi网络时,检测所述WiFi网络是否与因特网连接;Detecting whether the WiFi network is connected to the Internet when the terminal is currently connected to the WiFi network;
    如果所述WiFi网络与因特网连接,则通过所述WiFi网络接入因特网;If the WiFi network is connected to the Internet, accessing the Internet through the WiFi network;
    如果所述WiFi网络不能与因特网连接,则通过蜂窝网络接入因特网。If the WiFi network cannot be connected to the Internet, the Internet is accessed through the cellular network.
  2. 如权利要求1所述的介质,其特征在于,所述检测WiFi网络是否与因特网连接包括:The medium of claim 1 wherein said detecting whether the WiFi network is connected to the Internet comprises:
    向位于因特网的检测服务器发送检测请求;Sending a detection request to a detection server located on the Internet;
    如果接收到所述检测服务器针对所述检测请求的检测响应,则确定所述WiFi网络与因特网连接;If the detection response of the detection server for the detection request is received, determining that the WiFi network is connected to the Internet;
    如果在预置时间内没有接收到所述检测服务器针对所述检测请求的检测响应,则确定所述WiFi网络不能与因特网连接。If the detection response of the detection server for the detection request is not received within a preset time, it is determined that the WiFi network cannot be connected to the Internet.
  3. 如权利要求1所述的介质,其特征在于,所述通过蜂窝网络接入因特网前,所述程序代码包括的指令还用于:The medium of claim 1 wherein said program code includes instructions for: prior to said accessing the Internet through a cellular network:
    判断预设的自动切换开关是否打开;Determine whether the preset automatic switch is turned on;
    如果所述自动切换开关已经打开,才通过蜂窝网络接入因特网。If the automatic switch is already open, the Internet is accessed via the cellular network.
  4. 如权利要求1所述的介质,其特征在于,所述通过蜂窝网络接入因特网前,所述程序代码包括的指令还用于:The medium of claim 1 wherein said program code includes instructions for: prior to said accessing the Internet through a cellular network:
    确定需要因特网交互的数据量;Determine the amount of data that requires Internet interaction;
    判断所述数据量是否大于预设数量;Determining whether the amount of data is greater than a preset amount;
    如果所述数据量小于或等于所述预设数量,才通过蜂窝网络接入因特网。If the amount of data is less than or equal to the preset amount, the Internet is accessed through the cellular network.
  5. 如权利要求1所述的介质,其特征在于,所述通过蜂窝网络接入因特网前,所述程序代码包括的指令还用于:The medium of claim 1 wherein said program code includes instructions for: prior to said accessing the Internet through a cellular network:
    在终端显示屏上显示选择信息,以使得用户可以选择是否通过蜂窝网络接 入因特网;Display selection information on the terminal display so that the user can select whether to connect through the cellular network Into the Internet;
    如果接收到用户的确认信息,才通过蜂窝网络接入因特网。The Internet is accessed through the cellular network if the user's confirmation message is received.
  6. 一种终端,其特征在于,包括:相互耦合的处理器和存储器;所述处理器用于执行如下步骤:判断终端当前是否连接了WiFi网络;在所述终端当前连接了WiFi网络时,检测所述WiFi网络是否与因特网连接;在所述WiFi网络与因特网连接时,通过所述WiFi网络接入因特网;在所述WiFi网络不能与因特网连接时,通过蜂窝网络接入因特网。A terminal, comprising: a processor and a memory coupled to each other; the processor is configured to: determine whether the terminal is currently connected to the WiFi network; and when the terminal is currently connected to the WiFi network, detecting the Whether the WiFi network is connected to the Internet; when the WiFi network is connected to the Internet, the Internet is accessed through the WiFi network; and when the WiFi network is not connected to the Internet, the Internet is accessed through the cellular network.
  7. 如权利要求6所述的终端,其特征在于,所述处理器在检测WiFi网络是否与因特网连接时具体用于:The terminal according to claim 6, wherein the processor is specifically configured to: when detecting whether the WiFi network is connected to the Internet:
    向位于因特网的检测服务器发送检测请求;Sending a detection request to a detection server located on the Internet;
    如果接收到所述检测服务器针对所述检测请求的检测响应,则确定所述WiFi网络与因特网连接;If the detection response of the detection server for the detection request is received, determining that the WiFi network is connected to the Internet;
    如果在预置时间内没有接收到所述检测服务器针对所述检测请求的检测响应,则确定所述WiFi网络不能与因特网连接。If the detection response of the detection server for the detection request is not received within a preset time, it is determined that the WiFi network cannot be connected to the Internet.
  8. 如权利要求6所述的终端,其特征在于,所述处理器还用于:判断预设的自动切换开关是否打开;在判断所述自动切换开关已经打开,才通过蜂窝网络接入因特网。The terminal according to claim 6, wherein the processor is further configured to: determine whether the preset automatic switch is turned on; and determine that the automatic switch is turned on before accessing the Internet through the cellular network.
  9. 如权利要求6所述的终端,其特征在于,所述处理器还用于:确定需要因特网交互的数据量;判断确定的数据量是否大于预设数量;在判断所述数据量小于或等于所述预设数量时,才通过蜂窝网络接入因特网。The terminal according to claim 6, wherein the processor is further configured to: determine an amount of data that requires Internet interaction; determine whether the determined amount of data is greater than a preset amount; and determine that the amount of data is less than or equal to When the preset number is described, the Internet is accessed through the cellular network.
  10. 如权利要求6所述的终端,其特征在于,所述处理器还用于:在终端显示屏上显示选择信息,以使得用户可以选择是否通过蜂窝网络接入因特网;在接收到用户的确认信息时,才通过蜂窝网络接入因特网。 The terminal according to claim 6, wherein the processor is further configured to: display selection information on the display screen of the terminal, so that the user can select whether to access the Internet through the cellular network; and receive confirmation information of the user. Only when the Internet is connected to the Internet.
PCT/CN2017/098768 2017-08-24 2017-08-24 Network switching terminal and related product WO2019037005A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2017/098768 WO2019037005A1 (en) 2017-08-24 2017-08-24 Network switching terminal and related product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2017/098768 WO2019037005A1 (en) 2017-08-24 2017-08-24 Network switching terminal and related product

Publications (1)

Publication Number Publication Date
WO2019037005A1 true WO2019037005A1 (en) 2019-02-28

Family

ID=65439743

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/098768 WO2019037005A1 (en) 2017-08-24 2017-08-24 Network switching terminal and related product

Country Status (1)

Country Link
WO (1) WO2019037005A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104507132A (en) * 2014-12-23 2015-04-08 上海斐讯数据通信技术有限公司 Communication terminal and communication switching method implemented by same
CN105163355A (en) * 2015-09-29 2015-12-16 努比亚技术有限公司 Method and device for switching networks of mobile terminal
CN106302984A (en) * 2016-07-28 2017-01-04 努比亚技术有限公司 A kind of method and device controlling data cube computation
CN106535238A (en) * 2016-11-02 2017-03-22 青岛海信移动通信技术股份有限公司 Link switching method and device
CN106856617A (en) * 2016-11-30 2017-06-16 努比亚技术有限公司 A kind of terminal and residence reselecting

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104507132A (en) * 2014-12-23 2015-04-08 上海斐讯数据通信技术有限公司 Communication terminal and communication switching method implemented by same
CN105163355A (en) * 2015-09-29 2015-12-16 努比亚技术有限公司 Method and device for switching networks of mobile terminal
CN106302984A (en) * 2016-07-28 2017-01-04 努比亚技术有限公司 A kind of method and device controlling data cube computation
CN106535238A (en) * 2016-11-02 2017-03-22 青岛海信移动通信技术股份有限公司 Link switching method and device
CN106856617A (en) * 2016-11-30 2017-06-16 努比亚技术有限公司 A kind of terminal and residence reselecting

Similar Documents

Publication Publication Date Title
AU2021269359B2 (en) Display method and apparatus
US20220020339A1 (en) Display method and apparatus
US10649720B2 (en) Sound effect configuration method and system and related device
WO2018103492A1 (en) Method for setting wifi roaming, and terminal device
WO2017215649A1 (en) Sound effect adjustment method and user terminal
JP5916261B2 (en) File transmission method, system, and control apparatus
WO2019000411A1 (en) Method and device for establishing wireless communication connection
WO2021104230A1 (en) Synchronization method and electronic device
WO2018049886A1 (en) Hotspot establishment method and terminal device
WO2018103443A1 (en) Network positioning method and terminal device
WO2018103441A1 (en) Network positioning method and terminal device
WO2021104246A1 (en) Network connection method and electronic device
WO2020259446A1 (en) Communication control method and apparatus, and electronic device
WO2019015573A1 (en) Unlocking control method and related product
WO2021022720A1 (en) Bluetooth-based data transmission method, storage medium and terminal
WO2021057545A1 (en) Multi-network access method and terminal device
WO2017215661A1 (en) Scenario-based sound effect control method and electronic device
CN111901211A (en) Control method, apparatus and storage medium
WO2014094600A1 (en) Mobile terminal and method for reducing power consumption thereof
WO2020029723A1 (en) Positioning method, related device, and computer readable storage medium
WO2017020671A1 (en) Video interaction method and apparatus, and video source device
WO2021232814A1 (en) Cell measurement method based on frequency point optimization, and terminal device
WO2018219118A1 (en) Interface displaying method and related product
CN110891262A (en) Bluetooth pairing method, system and terminal equipment
WO2018219117A1 (en) Component display method and related product

Legal Events

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

Ref document number: 17922573

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17922573

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 28/09/2020)

122 Ep: pct application non-entry in european phase

Ref document number: 17922573

Country of ref document: EP

Kind code of ref document: A1