WO2020094036A1 - 用于终端的无线网络连接方法 - Google Patents

用于终端的无线网络连接方法 Download PDF

Info

Publication number
WO2020094036A1
WO2020094036A1 PCT/CN2019/115887 CN2019115887W WO2020094036A1 WO 2020094036 A1 WO2020094036 A1 WO 2020094036A1 CN 2019115887 W CN2019115887 W CN 2019115887W WO 2020094036 A1 WO2020094036 A1 WO 2020094036A1
Authority
WO
WIPO (PCT)
Prior art keywords
consumption
network
data
traffic
terminal
Prior art date
Application number
PCT/CN2019/115887
Other languages
English (en)
French (fr)
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 上海连尚网络科技有限公司
Publication of WO2020094036A1 publication Critical patent/WO2020094036A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/08Testing, supervising or monitoring using real traffic
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W36/00Hand-off or reselection arrangements
    • H04W36/0005Control or signalling for completing the hand-off
    • H04W36/0083Determination of parameters used for hand-off, e.g. generation or modification of neighbour cell lists
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W36/00Hand-off or reselection arrangements
    • H04W36/14Reselecting a network or an air interface

Definitions

  • the embodiments of the present application relate to the field of computer technology, and in particular to a wireless network connection method for a terminal.
  • terminals within the wireless local area network can also connect to a wireless network to achieve their Internet access function, thereby reducing the use of data traffic.
  • the embodiment of the present application proposes a wireless network connection method for a terminal.
  • an embodiment of the present application provides a wireless network connection method for a terminal, including: in response to the terminal's data network being connected, determining whether the data traffic consumption condition meets the high traffic consumption condition; in response to determining data The consumption of traffic meets the conditions of high traffic consumption. Turn on the wifi network switch on the terminal.
  • the high-traffic consumption condition includes the running third-party application including a high-traffic consumption third-party application; and determining whether the data traffic consumption condition meets the high-traffic consumption condition, including: obtaining the currently running third-party application To determine whether the application information meets the preset condition; if it is determined that the application information meets the preset condition, it is determined that the third-party application indicated by the application information belongs to a high-traffic consumption type application.
  • the application information includes at least one of the following: application name, application icon, or application type; and determining whether the application information satisfies the preset condition includes at least one of the following: determining whether the application name includes a preset keyword; Or determine whether the application icon matches the preset icon; or determine whether the application type belongs to the preset type.
  • the high-traffic consumption condition includes performing an operation with high-traffic consumption; and determining whether the data traffic consumption condition meets the high-traffic consumption condition includes: detecting the current operating state of the terminal and determining whether the high-traffic consumption operation is being performed Among them, the operations with high data consumption include at least one of the following: playing videos online, browsing pictures online, online games or voice videos.
  • the high traffic consumption condition includes the data traffic consumption rate reaching a preset threshold; and determining whether the data traffic consumption condition meets the high traffic consumption condition, including: acquiring data consumption data of the terminal within a certain period of time, Calculate the consumption rate of data traffic, and determine whether the statistical consumption rate reaches a preset threshold.
  • acquiring the data consumption data of the terminal within a certain period of time includes: capturing the data packets received and sent by the terminal within a certain period of time through a packet capture tool, performing statistical analysis on the captured data packets, and obtaining the data report The total size of the text; based on the total size of the data message, determine the data consumption of the terminal's data traffic; or based on the communication protocol to count the traffic consumption data of each third-party application installed on the terminal over a period of time to determine the data traffic Consume data.
  • the high traffic consumption condition includes the current data traffic consumption reaching a preset quota; and determining whether the data traffic consumption condition meets the high traffic consumption condition includes: monitoring the data traffic consumption to determine the current data Whether the consumption of traffic reaches the preset quota.
  • monitoring the consumption of data traffic includes: capturing the data packets sent and received by the terminal in real time through a packet capture tool, performing statistical analysis on the captured data packets to obtain the total size of the data packets; according to the data The total size of the packets determines the consumption of data traffic of the terminal; or based on the communication protocol to collect real-time traffic consumption data of each third-party application installed on the terminal to determine the consumption of data traffic of the terminal.
  • monitoring the consumption of data traffic includes: monitoring the consumption of data traffic of the terminal in real time through the application tool.
  • monitoring the consumption of data traffic includes: sending a traffic query request to the operator server, and receiving feedback information from the operator server, where the feedback information is used to describe the current traffic consumption state of the terminal; Based on the feedback information, determine the data consumption of the terminal.
  • the method further includes: acquiring network information of a wifi network near the terminal; selecting the wifi network from the acquired wireless network as the target wireless network, and connecting to the target wireless network.
  • a third-party network connection application is also installed on the terminal; and obtaining network information of a wifi network near the terminal includes: triggering a third-party network connection application on the terminal to obtain network information of the wifi network near the terminal.
  • the network information includes identification information of the wifi network; and selecting the wifi network as the target wireless network from the acquired network information and connecting to the target wireless network, including: receiving user identification information of the acquired wifi network , Select the wifi network indicated by the selection operation as the target wireless network, and send the network information of the target wireless network to the server; and receive the connection key sent by the server and connect to the target wireless network according to the connection key.
  • sending the network information of the target wireless network to the server includes: determining whether the target wireless network is a connected wifi network; if the target wireless network is not a connected wifi network, sending the network of the target wireless network The information is sent to the server.
  • selecting the wifi network as the target wireless network from the acquired network information and connecting to the target wireless network includes: sending the acquired network information to the server and receiving response information from the server, where the response The information includes identification information and connection key of the available wifi network; the wifi network indicated by the identification information in the response information is taken as the target wireless network, and the target wireless network is connected according to the connection key in the response information.
  • an embodiment of the present application provides a wireless network connection device for a terminal, including: a determining unit configured to determine whether the data traffic consumption situation meets high traffic consumption in response to the terminal's data network being connected Condition; the opening unit is configured to turn on the wifi network switch on the terminal in response to determining that the consumption of data traffic satisfies the high traffic consumption condition.
  • an embodiment of the present application provides an electronic device, including: one or more processors; a storage device on which one or more programs are stored; when one or more programs are used by one or more processors The execution causes one or more processors to implement the method as described in any one of the embodiments of the first aspect above.
  • an embodiment of the present application proposes a computer-readable medium on which a computer program is stored, where the computer program is executed by a processor to implement the method described in any one of the embodiments of the first aspect above.
  • the wireless network connection method for a terminal provided by an embodiment of the present application can determine whether the current data traffic consumption condition meets the high traffic consumption condition when the terminal's data network is in a connected state. And when it is determined that the consumption of data traffic satisfies the conditions of high traffic consumption, the WiFi network switch on the terminal can be turned on. Thus, the connection of the wifi network can be realized. In other words, by monitoring the consumption of data traffic in real time, you can control the opening of the wifi network switch to adjust the connection status of the wireless network. For example, adjust from the connection of the data network to the connection of the wifi network. In this way, the use control of the data flow can be realized. It is beneficial to reduce or avoid the excessive use of data traffic, thereby reducing the user's economic expenses. And by flexibly and quickly switching from the data network to the wifi network, it can also effectively protect the user's networking needs.
  • FIG. 1 is an exemplary system architecture diagram to which an embodiment of the present application can be applied;
  • FIG. 2 is a flowchart of a first embodiment of a wireless network connection method for a terminal according to the present application
  • FIG. 3 is a flowchart of a second embodiment of a wireless network connection method for a terminal according to the present application.
  • FIG. 4 is a flowchart of a third embodiment of a wireless network connection method for a terminal according to the present application.
  • FIG. 5 is a flowchart of a fourth embodiment of a wireless network connection method for a terminal according to the present application.
  • FIG. 6 is a schematic structural diagram of a computer system suitable for implementing an electronic device according to an embodiment of the present application.
  • FIG. 1 shows an exemplary system architecture 100 to which the wireless network connection method for a terminal of the embodiment of the present application can be applied.
  • the system architecture 100 may include terminals 101, 102, 103, networks 104, 105, and a server 106.
  • the network 104 may be used as a medium for providing communication links between the terminals 101, 102, and 103.
  • the network 105 may be used as a medium for providing a communication link between the terminals 101, 102, 103 and the server 106.
  • the networks 104, 105 may include various connection types, such as wired, wireless communication links, or fiber optic cables.
  • terminals 101, 102, and 103 Users can use terminals 101, 102, and 103 to interact through the network 104 to receive or send messages. At the same time, the user can also use the terminals 101, 102, 103 to interact with the server 106 through the network 105 to obtain information and the like.
  • client applications may be installed on the terminals 101, 102, and 103, such as network connection applications, game applications, video applications, shopping applications, browsers, and instant messaging tools.
  • the user can use data traffic to use various applications installed on the terminal.
  • the terminals 101, 102, and 103 can monitor the consumption of data traffic in real time. If the current data traffic consumption condition meets the high traffic consumption condition, the WiFi network switch on it can be turned on. So that you can connect to the wifi network.
  • the terminals 101, 102, and 103 may be hardware or software.
  • the terminals 101, 102, and 103 can be various electronic devices with network connection functions, including but not limited to smart phones, tablet computers, wearable devices, e-book readers, MP3 players (Moving Pictures Experts Group) Audio Layer III, motion picture expert compression standard audio layer 3), laptops and desktop computers, etc.
  • the terminals 101, 102, and 103 are software, they can be installed in the electronic devices listed above. It can be implemented as multiple software or software modules (for example to provide distributed services), or as a single software or software module. There is no specific limit here.
  • the server 106 may be a server that provides various services. For example, it may be a background server that supports various applications installed on the terminals 101, 102, and 103.
  • the background server can analyze the wifi network connection requests sent by the terminals 101, 102, and 103. And can send the analysis result (such as the connection key of wifi network) to the terminal. In this way, the terminal can use the connection key to realize the connection of the wifi network, thereby helping to reduce the use of data traffic.
  • the server 106 here may also be hardware or software.
  • the server 106 can be implemented as a distributed server cluster composed of multiple servers, or as a single server.
  • the server 106 is software, it may be implemented as multiple software or software modules (for example, to provide distributed services), or as a single software or software module. There is no specific limit here.
  • the wireless network connection method for a terminal provided by the embodiments of the present application may generally be executed by the terminals 101, 102, and 103.
  • terminals, networks, and servers in FIG. 1 are only schematic. According to the implementation needs, there can be any number of terminals, networks and servers.
  • FIG. 2 shows a flow 200 of the first embodiment of a wireless network connection method for a terminal according to the present application.
  • the wireless network connection method may include the following steps:
  • step 201 in response to the data network being connected, it is determined whether the data traffic consumption condition meets the high traffic consumption condition.
  • the data network of the electronic device for example, the terminals 101, 102, and 103 shown in FIG. 1
  • the consumption of data traffic can be monitored in real time. Therefore, it can be determined whether the consumption condition of the data flow satisfies the high flow consumption condition.
  • the data network usually refers to the mobile network.
  • it may include (but not limited to) at least one of the following: 3G (third generation mobile communication system) network, 4G (fourth generation mobile communication system) network, and 5G (fifth generation mobile communication system) network.
  • the wifi network of the electronic device is in a disconnected state.
  • electronic devices need to use data traffic to communicate.
  • the wifi (Wireless) Fidelity network usually refers to a wireless connection network different from the data network.
  • it may include (but not limited to) a wireless local area network based on the IEEE802.11b standard.
  • the high-traffic consumption condition usually means that there is a usage situation where the data traffic is consumed faster or more, and / or the data traffic consumption reaches a certain limit, etc.
  • the electronic device can determine whether the consumption condition of the data flow satisfies the high flow consumption condition in various ways.
  • the above high-traffic consumption condition may include that the running third-party application includes a high-traffic consumption third-party application.
  • the third-party applications with high traffic consumption generally refer to applications that consume relatively large amounts of traffic, such as video applications, shopping applications, and online game applications. It can be understood that the high-traffic-consumption third-party application may be set by a user, or may be statistically obtained by the electronic device according to the traffic consumption data of each application.
  • the electronic device can obtain application information of the third-party application currently running on it. Thus, it can be determined whether the application information satisfies the preset condition. If the electronic device determines that the application information satisfies the preset condition, it may determine that the third-party application indicated by the application information satisfying the preset condition belongs to a high-traffic consumption type application. In other words, the current data traffic consumption condition meets the high traffic consumption condition.
  • the application information can be used to describe relevant information of the application. For example, it may include (but not limited to) at least one of the following: application name, application icon, application type or application size, and so on. This can help reduce or avoid excessive use of data traffic, thereby reducing the cost of excess data traffic.
  • the preset conditions can be set according to the actual situation.
  • the electronic device may determine whether the application name of the currently running third-party application includes a preset keyword.
  • the electronic device may determine whether the application icon of the currently running third-party application matches the preset icon.
  • the electronic device may determine whether the application type of the currently running third-party application belongs to a preset type.
  • the preset keyword, preset icon, and preset type here may be the name, icon, and type of the high-traffic consumption application, respectively.
  • the calling interface API, Application, Programming Interface
  • the data packet sent by the application can be intercepted by calling the interface. Parse the data packet to obtain the Package Manager (PM) object.
  • Package Manager is one of the system service management classes provided by the Android system for developers. It is mainly used to help developers manage application installation packages. It can effectively obtain some data of APK (Android Package) installed on the device or uninstalled APK file.
  • PackageInfo is mainly used to store some information of the obtained Package, such as: package name (package name), version number (version) code, version name (version name), etc. That is to say, under normal circumstances, you can get most of the APK related information when you get the PackageInfo.
  • the above-mentioned high traffic consumption condition may also include performing an operation of high traffic consumption.
  • the operations with high traffic consumption here generally refer to operations that consume relatively large or fast traffic. For example, it may include (but not limited to) at least one of the following: playing videos online, browsing pictures online, online games, or voice and video.
  • the electronic device can detect its current operating state to determine whether it is performing an operation with high data consumption. If the operation with high traffic consumption is currently being performed, it can indicate that the current data traffic consumption condition meets the high traffic consumption condition. This not only enriches the content of the method, but also improves the accuracy of the determination results. It can be understood that electronic devices generally do not consume data when playing locally stored videos or browsing local pictures.
  • the Video control is generally used in the Android system to play videos. And use the Media Controller.Media Player Interface to control its playback state. At this time, the electronic device can obtain the video playback status data of VideoView by calling the Media Controller.Media Player Interface. In turn, it can be determined whether it is currently playing a video.
  • the above high traffic consumption condition may further include that the consumption rate of data traffic reaches a preset threshold.
  • the consumption rate generally refers to the consumption of data traffic per unit time.
  • the unit duration here can be set according to the actual situation, such as 1 second, 30 seconds or 1 minute.
  • the preset threshold can also be set according to the actual situation, such as 10MB per second.
  • the electronic device can obtain the consumption data of its data flow within a period of time, so as to count the consumption rate of the data flow. Furthermore, it can be determined whether the statistical consumption rate reaches a preset threshold. If it is determined that the consumption rate reaches a preset threshold, it may indicate that the current data flow consumption condition meets the high flow consumption condition. This can further enrich and improve the content of the method and help to expand the scope of the method.
  • the above period of time is not limited in this application. In order to better meet the actual needs, the period here is generally a period of time closer to the current time. And usually it can be no less than the above unit duration.
  • the statistical consumption rate may be the maximum value of each consumption rate within a period of time. In order to improve the accuracy of the statistical results, it may also be the average value of each consumption rate over a period of time.
  • the electronic device can obtain the consumption data of its data flow in a certain period of time in various ways.
  • the electronic device may use a packet capture tool to capture data packets that it receives and sends within a certain period of time. Therefore, statistical analysis can be performed on the captured data packets to obtain the total size of the data packets. Furthermore, according to the total size of the data packet, the consumption data of its own data flow can be determined.
  • the packet capture tool and the capture method are not limited in this application.
  • the tcpdump packet capture tool is commonly used on Android systems.
  • an electronic device such as a mobile phone
  • the operator when accesses the Internet through an operator's network, the operator generally forwards data packets for the electronic device.
  • the total size (bytes) of the data message is the data flow used by the electronic device.
  • the data message here may include the upstream and downstream (receive and send) messages of the electronic device. Since data packets are transmitted using the IP (Internet Protocol) protocol, the data flow calculated by the operator is generally the size of the data packet including the IP header.
  • IP Internet Protocol
  • the electronic device may also count the traffic consumption data of each third-party application installed on it based on the communication protocol over a period of time, so as to determine the consumption data of its own data traffic.
  • the Android system generally provides a statistical function of TCP (Transmission Control Protocol) transmission and reception length. The communication between the general application and the background server is based on the TCP protocol. Therefore, the statistical function can be used to count the data traffic consumed by itself.
  • TCP Transmission Control Protocol
  • the statistical function provided by the Android system is often calculated according to the latitude of the application, that is, the data traffic consumed by each application. After acquiring the traffic consumption data of each application within a certain period of time, the electronic device can count the rate of data traffic consumed by each application, or can also count the total data of its own consumption within a period of time. So you can get your own data consumption rate.
  • the above high traffic consumption condition may also include that the current data traffic consumption reaches a preset quota.
  • the electronic device can monitor the consumption of its own data flow in real time. Therefore, it can be determined whether the current data flow consumption reaches a preset amount.
  • the preset amount can be set according to the actual situation.
  • the preset quota may be (but not limited to) at least one of the following: a monthly total traffic quota, 90% of the total traffic quota, or an upper limit quota for daily traffic consumption, and so on.
  • an electronic device can monitor the consumption of data traffic in various ways.
  • an electronic device can also use a packet capture tool to capture data packets that it sends and receives in real time. Therefore, statistical analysis can be performed on the captured data packets to obtain the total size of the data packets. Furthermore, according to the total size of data packets, you can determine the consumption of your own data traffic.
  • the packet capture tool and the capture method are not limited in this application.
  • the electronic device may also calculate the real-time traffic consumption data of each third-party application installed on the electronic device based on the communication protocol to determine the consumption of its own data traffic. This can further enrich and improve the way of monitoring the consumption of data traffic.
  • the electronic device can use the application tool to monitor the consumption of data traffic in real time. This can meet the needs of different users and help expand the scope of the method.
  • the electronic device can also send a traffic query request to the operator server. And it can receive the feedback information corresponding to the traffic query request sent by the operator server.
  • the feedback information can be used to describe the current traffic consumption state of the electronic device.
  • the feedback information may include at least one of the following: traffic type (such as normal monthly traffic, video targeted free traffic, or paid traffic, etc.), remaining traffic, or traffic purchase records, etc. In this way, the electronic device can determine the consumption of its data traffic according to the feedback information.
  • the data flow included in the communication cards is also different.
  • the communication card can have 1GB of data traffic per month, or 100MB of data traffic per day.
  • the user can set a preset amount in the system of the electronic device or the above-mentioned application tool according to the package he manages.
  • the above flow query request process is usually implemented by using a mobile phone number corresponding to a communication card (such as a SIM card (Subscriber Identity Module, customer identification module)) used by an electronic device.
  • SIM card Subscriber Identity Module, customer identification module
  • Step 202 in response to determining that the data traffic consumption condition meets the high traffic consumption condition, turn on the wifi network switch.
  • the electronic device may determine whether the wifi network switch on it is in the on state. And when it is determined that the wifi network switch is not in the on state, the wifi network switch can be turned on. So that you can connect to the wifi network to reduce the use of data traffic.
  • the electronic device may also implement the above process through a corresponding interface.
  • the Android system it is generally necessary to use the system service wifi manager to control the switch status of the wifi network switch.
  • the electronic device can first obtain the service through the code; then, through the interface provided by the wifi manager, the switching state of the wifi network switch and the start-up process can be realized. That is, if the wifi network switch is currently off, the electronic device can call the interface to turn on the wifi network switch. If the wifi network switch is currently turned on, the electronic device can stop calling the interface.
  • the wireless network connection method for a terminal can determine whether the current data traffic consumption condition of the terminal satisfies the high traffic consumption condition when the terminal's data network is connected. And when it is determined that the consumption of data traffic satisfies the conditions of high traffic consumption, the WiFi network switch on the terminal can be turned on. Thus, the connection of the wifi network can be realized. In other words, by monitoring the consumption of data traffic in real time, you can control the opening of the wifi network switch to adjust the connection status of the wireless network. For example, adjust from the connection of the data network to the connection of the wifi network. In this way, the use control of the data flow can be realized. It is beneficial to reduce or avoid the excessive use of data traffic, thereby reducing the user's economic expenses. And by flexibly and quickly switching from the data network to the wifi network, it can also effectively protect the user's networking needs.
  • FIG. 3 shows a flow 300 of a second embodiment of a wireless network connection method for a terminal according to the present application.
  • the wireless network connection method may include the following steps:
  • step 301 in response to the data network being connected, it is determined whether the data traffic consumption condition meets the high traffic consumption condition. Reference may be made to the relevant description in step 201 of the embodiment in FIG. 2, and details are not described here.
  • Step 302 in response to determining that the data traffic consumption condition meets the high traffic consumption condition, turn on the wifi network switch.
  • Step 302 in response to determining that the data traffic consumption condition meets the high traffic consumption condition, turn on the wifi network switch.
  • Step 303 Obtain the network information of the nearby wifi network.
  • the electronic device can obtain the network information of the wifi network near it (that is, the current location is within the coverage of the wifi network) through the wifi network switch.
  • the network information here can be used to describe relevant information of the wifi network. For example, it may include (but not limited to) at least one of the following: identification information of the wifi network, signal strength, whether a connection key is set, a connection key, etc. Among them, the identification information can be used to uniquely represent the wifi network. It may include at least one of characters such as numbers, letters, and symbols.
  • the identification information may be (but not limited to) SSID (Service Set Identifier, Service Set Identifier, that is, the name of the wireless network) or BSSID (Basic Service Set).
  • Step 304 Select the wifi network as the target wireless network from the obtained network information, and connect to the target wireless network.
  • the electronic device may select the wifi network as the target wireless network according to the network information acquired in step 303. And the electronic device can acquire the connection key of the target wireless network, thereby connecting to the target wireless network. This can reduce or prevent electronic devices from continuing to use data traffic.
  • the selection operation here may be performed by an electronic device, or may be performed by a user or other devices.
  • the connection key may be pre-stored locally in the electronic device, or may be input by the user, or may be obtained by the electronic device from other devices.
  • the electronic device can store the identification information of the connected wifi network and the connection key. Therefore, in some embodiments, the electronic device may match the stored identification information of the connected wifi network with the acquired network information of the wifi network. Therefore, it can be determined whether the identification information of the connected wifi network is included. If the identification information of the connected wifi network is included, the electronic device can use the connected wifi network as the target wireless network. And the electronic device can search for the connection key corresponding to the target wireless network among the stored connection keys. Therefore, according to the connection key, the target wireless network can be connected through the wifi network switch. This helps improve the efficiency of the network connection.
  • the above network information may further include at least one of the following: the signal strength, stability or network speed of the wifi network.
  • the electronic device may determine the target wireless network in at least one of the following ways: for example, in at least two connected wifi networks In the network, the wifi network with stronger signal strength can be used as the target wireless network; or the wifi network with better stability can be used as the target wireless network; or the wifi network with faster network speed can be used as the target wireless network. This is more in line with the actual application situation, and also helps to make the target wireless network more meet the user's needs.
  • connection process may be run in the background of the electronic device. In this way, there will be no interference and impact on the user's front-end operation, which helps to improve the user's experience.
  • the electronic device can access the wifi network switch page The network information of the wifi network is presented to the user. In this way, the user can select the wifi network to be connected.
  • the electronic device can also start the third-party network connection application on it, thereby achieving the connection of the wifi network.
  • the wifi network switch near the terminal can be obtained by turning on the wifi network switch on the terminal information. In order to achieve the connection of the connected wifi network, and thus reduce the use of data traffic. This can enrich and improve the process of wireless network connection methods.
  • FIG. 4 shows a flow 400 of a third embodiment of a wireless network connection method for a terminal according to the present application.
  • the wireless network connection method may include the following steps:
  • step 401 in response to the data network being connected, it is determined whether the data traffic consumption condition meets the high traffic consumption condition. Reference may be made to the relevant description in step 201 of the embodiment in FIG. 2, and details are not described here.
  • Step 402 in response to determining that the data traffic consumption condition meets the high traffic consumption condition, turn on the wifi network switch.
  • Step 402 in response to determining that the data traffic consumption condition meets the high traffic consumption condition, turn on the wifi network switch.
  • Step 403 Trigger a third-party network connection application to obtain network information of a nearby wifi network.
  • the electronic device may trigger the third-party network connection application. And you can connect to the application through the third-party network to obtain the network information of the nearby wifi network.
  • the third-party network connection application may generally be an application for implementing wifi network connection.
  • the network information here may include identification information of the wifi network.
  • the electronic device may start a third-party network connection application that is not yet running.
  • the electronic device may enable the third-party network connection application running in the background to run on the front end.
  • Step 404 Receive a user's selection operation on the acquired identification information of the wifi network, use the wifi network indicated by the selection operation as the target wireless network, and send the network information of the target wireless network to the server.
  • the electronic device may present the acquired network information of the wifi network to the user to prompt the user to select the wifi network to be connected.
  • the electronic device can receive the user's selection operation on the acquired identification information of the wifi network.
  • the wifi network indicated by the selection operation can be used as the target wireless network.
  • the electronic device can connect to the application through a third-party network and send the network information of the target wireless network to the server (for example, the server 106 shown in FIG. 1).
  • the server can use the existing technology or other methods to determine the connection key of the target wireless network and return it to the electronic device. I won't repeat them here.
  • the electronic device can first determine whether the target wireless network is a connected wifi network. If the target wireless network is a connected wifi network, the target wireless network can be connected according to the stored connection key. If the target wireless network is not a connected wifi network, the network information of the target wireless network can be sent to the server.
  • Step 405 Receive the connection key sent by the server, and connect to the target wireless network according to the connection key.
  • the electronic device when receiving the connection key sent by the server, the electronic device can connect to the application through a third-party network and connect to the target wireless network according to the connection key, thereby reducing the consumption of data traffic. It can be understood that, in the case where the electronic device is successfully connected to the target wireless network, the identification information and the connection key of the target wireless network may also be stored.
  • the above network information may also include a connection key of the wifi network.
  • the electronic device when receiving the user's selection operation on the acquired identification information of the wifi network, the electronic device may use the wifi network indicated by the selection operation as the target wireless network. And the connection of the target wireless network can be realized according to the connection key in the network information of the target wireless network. This helps improve the efficiency of the network connection. And even if there is a problem in the communication between the electronic device and the server, it will not affect the connection of the wifi network.
  • the electronic device can also select the wifi network instead of the user.
  • the electronic device can connect to the application through a third-party network to select the acquired identification information of the wifi network. And you can use the automatically selected wifi network as the target wireless network.
  • the network information of the target wireless network is sent to the server to obtain its connection key. Or connect according to the connection key in the network information. This can simplify or reduce user operations and improve connection efficiency.
  • the above process may be run on the back end of the electronic device. This will not interfere with the operation of the front end and help improve the user experience.
  • the electronic device may adopt (but not limited to) at least one of the following methods: selecting a stronger signal strength, selecting a more stable signal, selecting a faster network, selecting closer to the electronic device, or selecting more connected 2. Select a wifi network with more or less connected devices.
  • the electronic device can obtain the above data from the network information.
  • the third-party network connection application installed on the terminal can be triggered to obtain the nearby Network information of wifi network. Therefore, the connection of the wifi network selected by the user can be realized, which is beneficial to reducing the use of data traffic. This can further enrich and improve the process of the wireless network connection method, so as to meet the needs of different users and help expand the use of the method.
  • FIG. 5 shows a flow 500 of a fourth embodiment of a wireless network connection method for a terminal according to the present application.
  • the wireless network connection method may include the following steps:
  • step 501 in response to the data network being connected, it is determined whether the data traffic consumption condition meets the high traffic consumption condition. Reference may be made to the relevant description in step 401 in the embodiment of FIG. 4, and details are not described herein again.
  • Step 502 in response to determining that the data traffic consumption condition meets the high traffic consumption condition, turn on the wifi network switch. Reference may be made to the relevant description in step 402 in the embodiment of FIG. 4, and details are not repeated here.
  • Step 503 trigger a third-party network connection application to obtain network information of a nearby wifi network.
  • the network information here may include at least one of the following: identification information of the wifi network, signal strength, stability or network speed, etc. Reference may be made to the relevant description in step 403 in the embodiment of FIG. 4, and details are not described herein again.
  • Step 504 Send the acquired network information to the server, and receive the response information from the server.
  • the electronic device may also connect to the application through a third-party network and send the acquired network information to the server (for example, the server 106 shown in FIG. 1).
  • the server can select the available wifi network from the network information.
  • the server can determine the connection key, or a wifi network with strong signal strength and good stability.
  • the server can determine the available wifi network connection key.
  • response information is generated and returned to the electronic device.
  • the response information may include identification information and connection key of the available wifi network. In this way, the electronic device can receive the response information.
  • Step 505 Use the wifi network indicated by the identification information in the response information as the target wireless network, and connect to the target wireless network according to the connection key in the response information.
  • the electronic device may use the wifi network indicated by the identification information of the wifi network in the response information as the target wireless network.
  • the application can be connected through a third-party network, and the target wireless network can be connected according to the connection key of the wifi network in the response information.
  • the third-party network connection application installed on the terminal can be triggered to obtain nearby Network information of wifi network. And can send the network information to the server to select the available wifi network. In order to achieve the connection of the available wifi network. This not only enriches the process of the wireless network connection method, but also expands the use of the method. It can also reduce or simplify user operations. It also helps to make the connected wireless network more in line with user needs.
  • the network information acquisition process, presentation process, target wireless network selection process, and target wireless network connection process may be connected by a third-party network on the electronic device and / or wifi Network switch to perform.
  • third-party network applications can obtain network information of nearby wifi networks.
  • the wifi network switch page can present these network information and select the target wireless network. Then the third-party network application can connect to the target wireless network.
  • the presentation of network information is not limited in this application.
  • the network information can be displayed to the user on the page of the third-party network connection application and / or wifi network switch.
  • / or network information can also be presented to the user through voice broadcast.
  • FIG. 6 shows a schematic structural diagram of a computer system 600 suitable for implementing electronic devices (for example, the terminals 101, 102, and 103 shown in FIG. 1) of the embodiments of the present application.
  • the electronic device shown in FIG. 6 is only an example, and should not bring any limitation to the functions and use scope of the embodiments of the present application.
  • the computer system 600 includes a central processing unit (CPU) 601 that can be loaded into a random access memory (RAM) 603 from a program stored in a read-only memory (ROM) 602 or from a storage section 608 Instead, perform various appropriate actions and processing.
  • RAM random access memory
  • ROM read-only memory
  • various programs and data necessary for the operation of the system 600 are also stored.
  • the CPU 601, ROM 602, and RAM 603 are connected to each other through a bus 604.
  • An input / output (I / O) interface 605 is also connected to the bus 604.
  • the following components are connected to the I / O interface 605: an input portion 606 including a touch screen, keys, microphone, camera, etc .; an output portion 607 including a liquid crystal display (LCD) and / or speakers, etc .; a storage portion 608 including a hard disk, etc .; and
  • the communication section 609 including a network interface card such as a LAN card, a modem, etc.
  • the communication section 609 performs communication processing via a network such as the Internet.
  • the driver 610 is also connected to the I / O interface 605 as needed.
  • a removable medium 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like, is installed on the drive 610 as necessary, so that the computer program read out therefrom is installed into the storage section 608 as needed.
  • the process described above with reference to the flowchart may be implemented as a computer software program.
  • embodiments of the present disclosure include a computer program product that includes a computer program carried on a computer-readable medium, the computer program containing program code for performing the method shown in the flowchart.
  • the computer program may be downloaded and installed from the network through the communication section 609, and / or installed from the removable medium 611.
  • the computer program is executed by the central processing unit (CPU) 601
  • the above-mentioned functions defined in the method of the present application are executed.
  • the computer-readable medium of the present application may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two.
  • the computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any combination of the above. More specific examples of computer readable storage media may include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), erasable removable Programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the foregoing.
  • the computer-readable medium may be any tangible medium that contains or stores a program, and the program may be used by or in combination with an instruction execution system, apparatus, or device.
  • the computer-readable signal medium may include a data signal that is propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried.
  • This propagated data signal can take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing.
  • the computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, and the computer-readable medium may send, propagate, or transmit a program for use by or in combination with an instruction execution system, apparatus, or device. .
  • the program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the foregoing.
  • each block in the flowchart or block diagram may represent a module, program segment, or part of code that contains one or more logic functions Executable instructions.
  • the functions noted in the block may occur out of the order noted in the figures. For example, two blocks represented in succession may actually be executed in parallel, and they may sometimes be executed in reverse order, depending on the functions involved.
  • each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts can be implemented with dedicated hardware-based systems that perform specified functions or operations Or, it can be realized by a combination of dedicated hardware and computer instructions.
  • the units described in the embodiments of the present application may be implemented in software or hardware.
  • the described unit may also be provided in the processor.
  • a processor includes a determination unit and an activation unit.
  • the names of these units do not constitute a limitation on the unit itself under certain circumstances.
  • the determination unit can also be described as "a unit that determines whether the consumption of data traffic satisfies the conditions of high traffic consumption".
  • the present application also provides a computer-readable medium, which may be included in the electronic device described in the foregoing embodiment; or may exist alone without being assembled into the electronic device in.
  • the computer-readable medium carries one or more programs, and when the one or more programs are executed by the electronic device, the electronic device: in response to the data network on it being connected, determine the consumption of data traffic Whether the condition satisfies the high traffic consumption condition; in response to determining that the data flow consumption condition satisfies the high traffic consumption condition, turn on the wifi network switch on it.

Abstract

本申请实施例公开了用于终端的无线网络连接方法。该方法的一具体实施方式包括:响应于终端的数据网络处于连接状态,确定数据流量的消耗情况是否满足高流量消耗条件;响应于确定数据流量的消耗情况满足高流量消耗条件,开启终端上的wifi网络开关。该实施方式通过对数据流量的消耗情况进行实时监测,可以控制wifi网络开关的开启,从而调整无线网络的连接状态。这样,可以实现数据流量的使用控制。有利于减少或避免数据流量的超额使用。且通过灵活、快速地从数据网络切换至wifi网络,还可以有效保障用户的连网需求。

Description

用于终端的无线网络连接方法 技术领域
本申请实施例涉及计算机技术领域,具体涉及用于终端的无线网络连接方法。
背景技术
随着互联网技术和智能终端的快速发展,越来越多的人们习惯使用终端来获取网络资源。通常情况下,人们需要购买数据流量来实现终端的上网功能。
与此同时,随着wifi(wireless fidelity,无线宽带)技术的普及,在无线局域网范围内的终端也可以通过连接无线网络,来实现其上网功能,从而可以减少数据流量的使用。
发明内容
本申请实施例提出了用于终端的无线网络连接方法。
第一方面,本申请实施例提出了一种用于终端的无线网络连接方法,包括:响应于终端的数据网络处于连接状态,确定数据流量的消耗情况是否满足高流量消耗条件;响应于确定数据流量的消耗情况满足高流量消耗条件,开启终端上的wifi网络开关。
在一些实施例中,高流量消耗条件包括运行的第三方应用中包括高流量消耗型的第三方应用;以及确定数据流量的消耗情况是否满足高流量消耗条件,包括:获取当前运行的第三方应用的应用信息,确定应用信息是否满足预设条件;若确定应用信息满足预设条件,则确定应用信息所指示的第三方应用属于高流量消耗型的应用。
在一些实施例中,应用信息包括以下至少一项:应用名称、应用图标或应用类型;以及确定应用信息是否满足预设条件,包括以下至少一种:确定应用名称中是否包括预设关键词;或者确定应用图标是否与预设图标相匹配;或者 确定应用类型是否属于预设类型。
在一些实施例中,高流量消耗条件包括执行高流量消耗的操作;以及确定数据流量的消耗情况是否满足高流量消耗条件,包括:检测终端的当前运行状态,确定是否正在执行高流量消耗的操作,其中,高流量消耗的操作包括以下至少一种:在线播放视频、在线浏览图片、在线游戏或语音视频。
在一些实施例中,高流量消耗条件包括数据流量的消耗速率达到预设阈值;以及确定数据流量的消耗情况是否满足高流量消耗条件,包括:获取终端在一段时长内的数据流量的消耗数据,统计数据流量的消耗速率,并确定统计的消耗速率是否达到预设阈值。
在一些实施例中,获取终端在一段时长内的数据流量的消耗数据,包括:通过抓包工具抓取终端在一段时长内收发的数据包,对抓取的数据包进行统计分析,获取数据报文的总大小;根据数据报文的总大小,确定终端的数据流量的消耗数据;或者基于通信协议统计终端上安装的各第三方应用在一段时长内的流量消耗数据,确定终端的数据流量的消耗数据。
在一些实施例中,高流量消耗条件包括当前数据流量的消耗量达到预设额度;以及确定数据流量的消耗情况是否满足高流量消耗条件,包括:对数据流量的消耗量进行监测,确定当前数据流量的消耗量是否达到预设额度。
在一些实施例中,对数据流量的消耗量进行监测,包括:通过抓包工具抓取终端实时收发的数据包,对抓取的数据包进行统计分析,获取数据报文的总大小;根据数据报文的总大小,确定终端的数据流量的消耗量;或者基于通信协议统计终端上安装的各第三方应用的实时流量消耗数据,确定终端的数据流量的消耗量。
在一些实施例中,若终端上安装有用于管理流量的应用工具,则对数据流量的消耗量进行监测,包括:通过应用工具实时监测终端的数据流量的消耗量。
在一些实施例中,对数据流量的消耗量进行监测,包括:向运营商服务端发送流量查询请求,以及接收运营商服务端的反馈信息,其中,反馈信息用于描述终端当前的流量消耗状态;根据反馈信息,确定终端的数据流量的消耗量。
在一些实施例中,该方法还包括:获取终端附近的wifi网络的网络信息;根据获取的网络信息,从中选取wifi网络以作为目标无线网络,并连接目标无 线网络。
在一些实施例中,终端上还安装有第三方网络连接应用;以及获取终端附近的wifi网络的网络信息,包括:触发终端上的第三方网络连接应用以获取终端附近的wifi网络的网络信息。
在一些实施例中,网络信息包括wifi网络的标识信息;以及根据获取的网络信息,从中选取wifi网络以作为目标无线网络,并连接目标无线网络,包括:接收用户对获取的wifi网络的标识信息的选择操作,将选择操作所指示的wifi网络作为目标无线网络,并将目标无线网络的网络信息发送给服务端;以及接收服务端发送的连接密钥,根据连接密钥连接目标无线网络。
在一些实施例中,将目标无线网络的网络信息发送给服务端,包括:确定目标无线网络是否为连接过的wifi网络;若目标无线网络不是连接过的wifi网络,则将目标无线网络的网络信息发送给服务端。
在一些实施例中,根据获取的网络信息,从中选取wifi网络以作为目标无线网络,并连接目标无线网络,包括:将获取的网络信息发送给服务端,并接收服务端的响应信息,其中,响应信息包括可用的wifi网络的标识信息和连接密钥;将响应信息中的标识信息所指示的wifi网络作为目标无线网络,并根据响应信息中的连接密钥连接目标无线网络。
第二方面,本申请实施例提出了一种用于终端的无线网络连接装置,包括:确定单元,被配置成响应于终端的数据网络处于连接状态,确定数据流量的消耗情况是否满足高流量消耗条件;开启单元,被配置成响应于确定数据流量的消耗情况满足高流量消耗条件,开启终端上的wifi网络开关。
第三方面,本申请实施例提出了一种电子设备,包括:一个或多个处理器;存储装置,其上存储有一个或多个程序;当一个或多个程序被一个或多个处理器执行,使得一个或多个处理器实现如上述第一方面中任一实施例所描述的方法。
第四方面,本申请实施例提出了一种计算机可读介质,其上存储有计算机程序,其中,该计算机程序被处理器执行时实现如上述第一方面中任一实施例所描述的方法。
本申请实施例提出的用于终端的无线网络连接方法,在终端的数据网络处 于连接状态的情况下,可以确定其当前数据流量的消耗情况是否满足高流量消耗条件。且在确定数据流量的消耗情况满足高流量消耗条件的情况下,可以开启终端上的wifi网络开关。从而可以实现wifi网络的连接。也就是说,通过对数据流量的消耗情况进行实时监测,可以控制wifi网络开关的开启,从而调整无线网络的连接状态。例如从数据网络的连接调整至wifi网络的连接。这样,可以实现数据流量的使用控制。有利于减少或避免数据流量的超额使用,从而降低用户的经济开销。且通过灵活、快速地从数据网络切换至wifi网络,还可以有效保障用户的连网需求。
附图说明
通过阅读参照以下附图所作的对非限制性实施例所作的详细描述,本申请的其它特征、目的和优点将会变得更明显:
图1是本申请的一个实施例可以应用于其中的示例性系统架构图;
图2是根据本申请的用于终端的无线网络连接方法的第一个实施例的流程图;
图3是根据本申请的用于终端的无线网络连接方法的第二个实施例的流程图;
图4是根据本申请的用于终端的无线网络连接方法的第三个实施例的流程图;
图5是根据本申请的用于终端的无线网络连接方法的第四个实施例的流程图;
图6是适于用来实现本申请实施例的电子设备的计算机系统的结构示意图。
具体实施方式
下面结合附图和实施例对本申请作进一步的详细说明。可以理解的是,此处所描述的具体实施例仅仅用于解释相关发明,而非对该发明的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与有关发明相关的部分。
需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。下面将参考附图并结合实施例来详细说明本申请。
图1示出了可以应用本申请实施例的用于终端的无线网络连接方法的示例性系统架构100。
如图1所示,系统架构100可以包括终端101、102、103,网络104、105和服务端106。网络104可以用以在终端101、102、103之间提供通信链路的介质。网络105可以用以在终端101、102、103与服务端106之间提供通信链路的介质。网络104、105可以包括各种连接类型,例如有线、无线通信链路或者光纤电缆等等。
用户之间可以使用终端101、102、103通过网络104进行交互,以接收或发送消息等。同时,用户还可以使用终端101、102、103通过网络105与服务端106进行交互,以获取信息等。终端101、102、103上可以安装有各种客户端应用,例如网络连接类应用、游戏类应用、视频类应用、购物类应用、浏览器和即时通讯工具等。
在终端101、102、103的数据网络处于连接状态,且wifi网络处于未连接状态的情况下,用户可以利用数据流量来使用终端上安装的各种应用。同时,终端101、102、103可以对数据流量的消耗情况进行实时监测。若当前数据流量的消耗情况满足高流量消耗条件,则可以开启其上的wifi网络开关。从而可以进行wifi网络的连接。
这里的终端101、102、103可以是硬件,也可以是软件。当终端101、102、103为硬件时,可以是具有网络连接功能的各种电子设备,包括但不限于智能手机、平板电脑、可穿戴设备、电子书阅读器、MP3播放器(Moving Picture Experts Group Audio Layer III,动态影像专家压缩标准音频层面3)、膝上型便携计算机和台式计算机等等。当终端101、102、103为软件时,可以安装在上述所列举的电子设备中。其可以实现成多个软件或软件模块(例如用来提供分布式服务),也可以实现成单个软件或软件模块。在此不做具体限定。
服务端106可以是提供各种服务的服务端,例如可以是对终端101、102、103上安装的各种应用提供支持的后台服务器。后台服务器可以对终端101、102、103发送的wifi网络连接请求进行分析。并可以将分析结果(如wifi网络的连接密钥)发送给终端。这样,终端可以利用该连接密钥实现wifi网络的连接,从而有利于减少数据流量的使用。
这里的服务端106同样可以是硬件,也可以是软件。当服务端106为硬件时,可以实现成多个服务端组成的分布式服务端集群,也可以实现成单个服务端。当服务端106为软件时,可以实现成多个软件或软件模块(例如用来提供分布式服务),也可以实现成单个软件或软件模块。在此不做具体限定。
需要说明的是,本申请实施例所提供的用于终端的无线网络连接方法一般可以由终端101、102、103执行。
应该理解,图1中的终端、网络和服务端的数目仅仅是示意性的。根据实现需要,可以具有任意数目的终端、网络和服务端。
继续参见图2,其示出了根据本申请的用于终端的无线网络连接方法的第一个实施例的流程200。该无线网络连接方法可以包括以下步骤:
步骤201,响应于数据网络处于连接状态,确定数据流量的消耗情况是否满足高流量消耗条件。
在本实施例中,若电子设备(例如图1所示的终端101、102、103)的数据网络处于连接状态,则可以对数据流量的消耗情况进行实时监测。从而可以确定数据流量的消耗情况是否满足高流量消耗条件。其中,数据网络通常是指移动网络。如可以包括(但不限于)以下至少一种:3G(第三代移动通讯系统)网络、4G(第四代移动通讯系统)网络和5G(第五代移动通讯系统)网络等。
需要说明的是,此时电子设备的wifi网络处于未连接状态。也就是说,电子设备需要使用数据流量进行通信。其中,wifi(Wireless Fidelity)网络通常是指有别于数据网络的无线连接网络。例如可以包括(但不限于)基于IEEE 802.11b标准的无线局域网。
在本实施例中,高流量消耗条件通常是指存在消耗数据流量较快或较多的使用情况,和/或数据流量的消耗达到一定的限额等。在这里,电子设备可以通过多种方式来确定数据流量的消耗情况是否满足高流量消耗条件。
在本实施例的一些可选地实现方式中,上述高流量消耗条件可以包括运行的第三方应用中包括高流量消耗型的第三方应用。这里的高流量消耗型的第三方应用一般是指消耗流量相对较多的应用,例如视频类应用、购物类应用、在线游戏类应用等。可以理解的是,高流量消耗型的第三方应用可以是用户设置的,也可以是电子设备根据各应用的流量消耗数据而统计得到的。
此时,电子设备可以获取其上当前运行的第三方应用的应用信息。从而可以确定应用信息是否满足预设条件。若电子设备确定应用信息满足预设条件,则可以确定满足预设条件的应用信息所指示的第三方应用属于高流量消耗型的应用。也就是说,当前数据流量的消耗情况满足高流量消耗条件。其中,应用信息可以用于描述应用的相关信息。例如可以包括(但不限于)以下至少一项:应用名称、应用图标、应用类型或应用大小等。这样可以有助于减少或避免数据流量的超额使用,从而降低超额数据流量产生的费用。
在这里,预设条件可以根据实际情况进行设置。例如,电子设备可以确定当前运行的第三方应用的应用名称中是否包括预设关键词。又例如,电子设备可以确定当前运行的第三方应用的应用图标是否与预设图标相匹配。再例如,电子设备可以确定当前运行的第三方应用的应用类型是否属于预设类型。这里的预设关键词、预设图标和预设类型可以分别是高流量消耗型应用的名称、图标及类型。
需要说明的是,当需要获取某个应用的各项信息时,首先可以获得该应用对应的调用接口(API,Application Programming Interface)。通过调用接口可以截取该应用发送的数据包。解析数据包,获取Package Manager(PM)对象。Package Manager(PM)是Android系统为开发者提供的系统服务管理类中的一个。其主要用于帮助开发者管理应用程序安装包。通过它可以有效的获取设备上安装的APK(Android Package,安卓安装包)或者未安装的APK文件的一些数据。
进一步地,通过操作Package Manager类,可以获取到PackageInfo对象、ApplicationInfo对象等。其中,PackageInfo主要用于存储获取到的Package的一些信息,如可以包括:包名(package name)、版本号(version code)、版本名(version name)等。也就是说,通常情况下,获取到PackageInfo,就可以获取到大部分APK的相关信息。
可选地,上述高流量消耗条件也可以包括执行高流量消耗的操作。这里的高流量消耗的操作一般是指消耗流量相对较多或较快的操作。例如可以包括(但不限于)以下至少一种:在线播放视频、在线浏览图片、在线游戏或语音视频等。此时,电子设备可以检测其当前运行状态,从而确定是否正在执行高 流量消耗的操作。若当前正在执行高流量消耗的操作,则可以说明当前数据流量的消耗情况满足高流量消耗条件。这样不仅可以丰富方法的内容,也可以提高确定结果的准确度。可以理解的是,电子设备在播放本地存储的视频或浏览本地图片时,通常不会消耗流量。
作为示例,Android系统中一般使用Video View控件来播放视频。并利用Media Controller.Media Player Controller接口来控制其播放状态。此时,电子设备可以通过调用Media Controller.Media Player Controller接口来获取Video View的视频播放状态数据。进而可以确定其当前是否正在播放视频。
进一步地,上述高流量消耗条件还可以包括数据流量的消耗速率达到预设阈值。其中,消耗速率一般是指单位时长内数据流量的消耗量。这里的单位时长可以根据实际情况进行设置,如1秒、30秒或1分钟等。而预设阈值也可以根据实际情况设置,如每秒10MB。
此时,电子设备可以获取其在一段时长内的数据流量的消耗数据,从而统计数据流量的消耗速率。进而可以确定统计的消耗速率是否达到预设阈值。若确定消耗速率达到预设阈值,则可以说明当前数据流量的消耗情况满足高流量消耗条件。这样可以进一步地丰富和完善方法的内容,有助于扩大方法的适用范围。
需要说明的是,上述一段时长在本申请中不限制。而为了更加符合实际需求,这里的一段时长一般是距离当前时间较近的时间段。而且通常可以不小于上述单位时长。而统计得到的消耗速率可以是一段时长内的各消耗速率的最大值。而为了提高统计结果的准确度,其也可以是一段时长内的各消耗速率的平均值。
在这里,电子设备可以通过多种方式,来获取其在一段时长内的数据流量的消耗数据。作为示例,电子设备可以通过抓包工具,来抓取其在一段时长内收发的数据包。从而可以对抓取的数据包进行统计分析,以获取数据报文的总大小。进而根据数据报文的总大小,可以确定自身数据流量的消耗数据。其中,抓包工具和抓取方式在本申请中并不限制。例如Android系统上常用tcpdump抓包工具。
可以理解的是,电子设备(如手机)在通过运营商的网络访问互联网时,运营商一般会替电子设备转发数据报文。数据报文的总大小(字节数)即为电子设备使用的数据流量。这里的数据报文可以包含电子设备上下行(接收和发送)的报文。由于数据报文采用IP(Internet Protocol)协议传输,所以运营商计算的数据流量一般都是包含IP头的数据报文大小。
又例如,电子设备也可以基于通信协议,来统计其上安装的各第三方应用在一段时长内的流量消耗数据,从而确定自身数据流量的消耗数据。作为示例,Android系统通常提供了TCP(Transmission Control Protocol,传输控制协议)收发长度的统计功能。而一般的应用与后台服务器之间的通信都是基于TCP协议。因此,可以利用该统计功能来统计自身消耗的数据流量。
需要说明的是,Android系统提供的该统计功能往往是按照应用纬度来统计,即每个应用所消耗的数据流量。在获取到各应用在一段时长内的流量消耗数据后,电子设备可以统计各应用消耗数据流量的速率,或者也可以统计自身在一段时长内总的流量消耗数据。从而可以得到自身数据流量的消耗速率。
在一些应用场景中,上述高流量消耗条件还可以包括当前数据流量的消耗量达到预设额度。此时,电子设备可以对自身数据流量的消耗量进行实时监测。从而可以确定当前数据流量的消耗量是否达到预设额度。其中,预设额度可以根据实际情况进行设置。例如预设额度可以(但不限于)是以下至少一种:每月的总流量额度、总流量额度的90%或每日流量消耗的上限额度等。
在这里,电子设备可以通过多种方式来实现数据流量的消耗量的监测。作为示例,电子设备同样可以通过抓包工具,来抓取其实时收发的数据包。从而可以对抓取的数据包进行统计分析,以获取数据报文的总大小。进而根据数据报文的总大小,可以确定自身数据流量的消耗量。其中,抓包工具和抓取方式在本申请中并不限制。或者,电子设备也可以基于通信协议,来统计其上安装的各第三方应用的实时流量消耗数据,从而确定自身数据流量的消耗量。这样可以进一步地丰富和完善监测数据流量的消耗量的方式。
又例如,若电子设备上安装有用于管理流量的应用工具,则电子设备可以通过该应用工具,来实时监测数据流量的消耗量。这样可以满足不同用户的使用需求,有助于扩大方法的适用范围。
再例如,电子设备还可以向运营商服务端发送流量查询请求。并可以接收运营商服务端发送的与流量查询请求对应的反馈信息。其中,反馈信息可以用于描述电子设备当前的流量消耗状态。例如反馈信息可以包括以下至少一项:流量类型(如正常包月流量、视频定向免流量或实施付费流量等)、剩余流量或流量购买记录等。这样,电子设备可以根据反馈信息,来确定其数据流量的消耗量。
可以理解的是,在现有的通讯卡(如电话卡、流量卡等)中,根据用户办理的套餐不同,通讯卡中包含的数据流量也不同。例如通讯卡中每月可以有1GB的数据流量,或者每天可以有100MB的数据流量等。用户可以根据自己所办理的套餐,在电子设备的系统中或上述应用工具中来设置预设额度。此外,上述流量查询请求过程通常是利用电子设备所使用的通讯卡(如SIM卡(Subscriber Identity Module,客户识别模块))对应的手机号码来实现的。
步骤202,响应于确定数据流量的消耗情况满足高流量消耗条件,开启wifi网络开关。
在本实施例中,在确定数据流量的消耗情况满足高流量消耗条件的情况下,电子设备可以确定其上的wifi网络开关是否处于开启状态。且在确定wifi网络开关不是处于开启状态时,可以开启该wifi网络开关。从而可以进行wifi网络的连接,以减少数据流量的使用。
作为示例,电子设备也可以通过相应的接口来实现上述过程。例如在Android系统中,控制wifi网络开关的开关状态一般需要使用wifi manager这一系统服务。此时,电子设备首先可以通过代码来获取该服务;然后通过wifi manager提供的接口,便可以实现wifi网络开关的开关状态的判断以及开启过程。即如果wifi网络开关当前是关闭状态,则电子设备可以调用接口,以开启wifi网络开关。如果wifi网络开关当前是开启状态,则电子设备可以停止调用接口。
本实施例提供的用于终端的无线网络连接方法,在终端的数据网络处于连接状态的情况下,可以确定其当前数据流量的消耗情况是否满足高流量消耗条件。且在确定数据流量的消耗情况满足高流量消耗条件的情况下,可以开启终端上的wifi网络开关。从而可以实现wifi网络的连接。也就是说,通过对数 据流量的消耗情况进行实时监测,可以控制wifi网络开关的开启,从而调整无线网络的连接状态。例如从数据网络的连接调整至wifi网络的连接。这样,可以实现数据流量的使用控制。有利于减少或避免数据流量的超额使用,从而降低用户的经济开销。且通过灵活、快速地从数据网络切换至wifi网络,还可以有效保障用户的连网需求。
进一步参见图3,其示出了根据本申请的用于终端的无线网络连接方法的第二个实施例的流程300。该无线网络连接方法可以包括以下步骤:
步骤301,响应于数据网络处于连接状态,确定数据流量的消耗情况是否满足高流量消耗条件。可以参见图2实施例的步骤201中的相关描述,此处不再赘述。
步骤302,响应于确定数据流量的消耗情况满足高流量消耗条件,开启wifi网络开关。可以参见图2实施例的步骤202中的相关描述,此处不再赘述。
步骤303,获取附近的wifi网络的网络信息。
在本实施例中,电子设备可以通过wifi网络开关,来获取其附近(即当前位置位于wifi网络覆盖范围内)的wifi网络的网络信息。这里的网络信息可以用于描述wifi网络的相关信息。例如可以包括(但不限于)以下至少一项:wifi网络的标识信息、信号强度、是否设置有连接密钥、连接密钥等。其中,标识信息可以用于唯一表示wifi网络。其可以包括数字、字母、符号等字符中的至少一种。例如标识信息可以(但不限于)是SSID(Service Set Identifier,服务集标识,即无线网络的名称)或BSSID(Basic Service Set)等。
步骤304,根据获取的网络信息,从中选取wifi网络以作为目标无线网络,并连接目标无线网络。
在本实施例中,电子设备可以根据步骤303中获取的网络信息,从中选取wifi网络以作为目标无线网络。并且电子设备可以获取目标无线网络的连接密钥,从而连接该目标无线网络。这样可以减少或避免电子设备继续使用数据流量。这里的选取操作可以是电子设备执行的,也可以是用户或其他设备执行的。此外,连接密钥可以是电子设备本地预先存储的,也可以是用户输入的,还可以是电子设备从其他设备中获取的。
可以理解的是,通常情况下,电子设备可以对连接过的wifi网络的标识 信息以及连接密钥进行存储。因此在一些实施例中,电子设备可以将存储的连接过的wifi网络的标识信息,在获取的wifi网络的网络信息中进行匹配。从而可以确定其中是否包含连接过的wifi网络的标识信息。若包含连接过的wifi网络的标识信息,则电子设备可以将连接过的wifi网络作为目标无线网络。并且电子设备可以在存储的连接密钥中,查找与目标无线网络对应的连接密钥。从而根据该连接密钥,可以通过wifi网络开关,来连接目标无线网络。这样有助于提高网络的连接效率。
可选地,上述网络信息还可以包括以下至少一项:wifi网络的信号强度、稳定性或网速。此时,若获取的wifi网络的网络信息中包含至少两个连接过的wifi网络的标识信息,则电子设备可以通过以下至少一种方式来确定目标无线网络:如在至少两个连接过的wifi网络中,可以将信号强度更强的wifi网络作为目标无线网络;或者可以将稳定性更好的wifi网络作为目标无线网络;再或者可以将网速更快的wifi网络作为目标无线网络。这样更加符合实际应用情况,也有助于使目标无线网络更加满足用户的使用需求。
需要说明的是,上述连接过程可以是在电子设备的后台运行的。这样对用户的前端操作不会产生干扰和影响,有助于提高用户的使用体验。在一些应用场景中,若获取的wifi网络的网络信息中不包含连接过的wifi网络的标识信息,如第一次设置wifi网络的连接,则电子设备可以在wifi网络开关的页面,将获取的wifi网络的网络信息呈现给用户。这样用户可以从中选取所需连接的wifi网络。或者,在安装有第三方网络连接应用的情况下,电子设备也可以开启其上的第三方网络连接应用,从而实现wifi网络的连接。具体可以参见图4和图5实施例中的相关描述,此处不再赘述。
本实施例提供的用于终端的无线网络连接方法,在确定当前数据流量的消耗情况满足高流量消耗条件的情况下,可以通过开启终端上的wifi网络开关,来获取其附近的wifi网络的网络信息。从而实现连接过的wifi网络的连接,进而减少数据流量的使用。这样可以丰富和完善无线网络连接方法的过程。
请参见图4,其示出了根据本申请的用于终端的无线网络连接方法的第三个实施例的流程400。该无线网络连接方法可以包括以下步骤:
步骤401,响应于数据网络处于连接状态,确定数据流量的消耗情况是否 满足高流量消耗条件。可以参见图2实施例的步骤201中的相关描述,此处不再赘述。
步骤402,响应于确定数据流量的消耗情况满足高流量消耗条件,开启wifi网络开关。可以参见图2实施例的步骤202中的相关描述,此处不再赘述。
步骤403,触发第三方网络连接应用以获取附近的wifi网络的网络信息。
在本实施例中,若电子设备上还安装有第三方网络连接应用,则电子设备可以触发该第三方网络连接应用。并可以通过该第三方网络连接应用,来获取其附近的wifi网络的网络信息。其中,第三方网络连接应用通常可以是用于实现wifi网络连接的应用。这里的网络信息可以包括wifi网络的标识信息。
需要说明的是,这里的触发操作在本申请中并不限制。例如可以是电子设备开启尚未运行的第三方网络连接应用。又例如可以是电子设备将后台运行的第三方网络连接应用开启至前端运行。
步骤404,接收用户对获取的wifi网络的标识信息的选择操作,将选择操作所指示的wifi网络作为目标无线网络,并将目标无线网络的网络信息发送给服务端。
在本实施例中,电子设备可以将获取的wifi网络的网络信息呈现给用户,以提示用户选取所需连接的wifi网络。这样,电子设备可以接收用户对获取的wifi网络的标识信息的选择操作。并且可以将选择操作所指示的wifi网络作为目标无线网络。以及电子设备可以通过第三方网络连接应用,将目标无线网络的网络信息发送给服务端(例如图1所示的服务端106)。这样,服务端可以采用现有技术或其他方式,来确定目标无线网络的连接密钥,并返回给电子设备。此处不再赘述。
可选地,为了提高网络的连接效率,电子设备首先可以确定目标无线网络是否为连接过的wifi网络。若目标无线网络为连接过的wifi网络,则可以根据存储的连接密钥连接该目标无线网络。若目标无线网络不是连接过的wifi网络,则可以将目标无线网络的网络信息发送给服务端。
步骤405,接收服务端发送的连接密钥,根据连接密钥连接目标无线网络。
在本实施例中,电子设备在接收到服务端发送的连接密钥时,可以通过第三方网络连接应用,根据该连接密钥连接目标无线网络,从而减少数据流量的 消耗。可以理解的是,电子设备在成功连接目标无线网络的情况下,也可以对目标无线网络的标识信息和连接密钥进行存储。
在一些应用场景中,上述网络信息也可以包括wifi网络的连接密钥。此时,电子设备在接收到用户对获取的wifi网络的标识信息的选择操作时,可以将选择操作所指示的wifi网络作为目标无线网络。并且可以根据目标无线网络的网络信息中的连接密钥,来实现目标无线网络的连接。这样有助于提高网络的连接效率。并且即使电子设备与服务端之间的通信出现问题,也不会对wifi网络的连接产生影响。
可选地,电子设备也可以代替用户进行wifi网络的选取。例如电子设备可以通过第三方网络连接应用,对获取的wifi网络的标识信息进行选取。并且可以将自动选取的wifi网络作为目标无线网络。进而将目标无线网络的网络信息发送给服务端,以获取其连接密钥。或者根据网络信息中的连接密钥实现连接。这样可以简化或减少用户操作,提高连接效率。同时,上述过程可以是在电子设备后端运行的。这样不会对前端的运行操作产生干扰影响,有助于提高用户体验。
需要说明的是,上述选取方式在本申请中并不限制。例如电子设备可以采用(但不限于)以下至少一种方式:选取信号强度更强的、选取信号更稳定的、选取网络更快的、选取距离电子设备更近的、选取被连接次数更多的、选取当前所连接的设备较多或较少的wifi网络。在这里,电子设备可以从网络信息中来获取上述数据。
本实施例提供的用于终端的无线网络连接方法,在确定当前数据流量的消耗情况满足高流量消耗条件的情况下,可以通过触发终端上所安装的第三方网络连接应用,来获取其附近的wifi网络的网络信息。从而可以实现用户所选取的wifi网络的连接,有利于减少数据流量的使用。这样可以进一步地丰富和完善无线网络连接方法的过程,从而可以满足不同用户的使用需求,有助于扩大方法的使用范围。
进一步参见图5,其示出了根据本申请的用于终端的无线网络连接方法的第四个实施例的流程500。该无线网络连接方法可以包括以下步骤:
步骤501,响应于数据网络处于连接状态,确定数据流量的消耗情况是否 满足高流量消耗条件。可以参见图4实施例的步骤401中的相关描述,此处不再赘述。
步骤502,响应于确定数据流量的消耗情况满足高流量消耗条件,开启wifi网络开关。可以参见图4实施例的步骤402中的相关描述,此处不再赘述。
步骤503,触发第三方网络连接应用以获取附近的wifi网络的网络信息。这里的网络信息可以包括以下至少一项:wifi网络的标识信息、信号强度、稳定性或网速等。可以参见图4实施例的步骤403中的相关描述,此处不再赘述。
步骤504,将获取的网络信息发送给服务端,并接收服务端的响应信息。
在本实施例中,电子设备也可以通过第三方网络连接应用,将获取的网络信息发送给服务端(例如图1所示的服务端106)。这样,服务端可以根据网络信息,从中选取可用的wifi网络。如能够确定连接密钥的wifi网络,或者信号强度较强且稳定性较好的wifi网络。并且服务端可以确定可用的wifi网络的连接密钥。从而生成响应信息返回给电子设备。其中,响应信息可以包括可用的wifi网络的标识信息和连接密钥。这样,电子设备可以接收该响应信息。
步骤505,将响应信息中的标识信息所指示的wifi网络作为目标无线网络,并根据响应信息中的连接密钥连接目标无线网络。
在本实施例中,电子设备可以将响应信息中的wifi网络的标识信息所指示的wifi网络作为目标无线网络。并且可以通过第三方网络连接应用,根据响应信息中的wifi网络的连接密钥,来连接该目标无线网络。
本实施例提出的用于终端的无线网络连接方法,在确定当前数据流量的消耗情况满足高流量消耗条件的情况下,可以通过触发终端上所安装的第三方网络连接应用,来获取其附近的wifi网络的网络信息。并可以将网络信息发送给服务端,以选取可用的wifi网络。从而实现可用的wifi网络的连接。这样不仅更加丰富了无线网络连接方法的过程,扩大方法的使用范围。还可以减少或简化用户的操作。也有助于使连接的无线网络更加符合用户的需求。
可以理解的是,对于上述各实施例中,网络信息的获取过程、呈现过程、目标无线网络的选取过程以及目标无线网络的连接过程,可以是由电子设备上的第三方网络连接和/或wifi网络开关来执行的。在本申请中并不限制。例如 在一些应用系统中,第三方网络应用可以获取附近的wifi网络的网络信息。而wifi网络开关的页面可以呈现这些网络信息,并进行目标无线网络的选取。之后第三方网络应用可以进行目标无线网络的连接。
此外,网络信息的呈现方式在本申请中并不限制。例如可以在第三方网络连接应用和/或wifi网络开关的页面将网络信息显示给用户。和/或也可以通过语音播报的方式将网络信息呈现给用户。
下面参见图6,其示出了适于用来实现本申请实施例的电子设备(例如图1所示的终端101、102、103)的计算机系统600的结构示意图。图6示出的电子设备仅仅是一个示例,不应对本申请实施例的功能和使用范围带来任何限制。
如图6所示,计算机系统600包括中央处理单元(CPU)601,其可以根据存储在只读存储器(ROM)602中的程序或者从存储部分608加载到随机访问存储器(RAM)603中的程序而执行各种适当的动作和处理。在RAM 603中,还存储有系统600操作所需的各种程序和数据。CPU 601、ROM 602以及RAM 603通过总线604彼此相连。输入/输出(I/O)接口605也连接至总线604。
以下部件连接至I/O接口605:包括触摸屏、按键、麦克风、摄像头等的输入部分606;包括诸如液晶显示器(LCD)和/或扬声器等的输出部分607;包括硬盘等的存储部分608;以及包括诸如LAN卡、调制解调器等的网络接口卡的通信部分609。通信部分609经由诸如因特网的网络执行通信处理。驱动器610也根据需要连接至I/O接口605。可拆卸介质611,诸如磁盘、光盘、磁光盘、半导体存储器等等,根据需要安装在驱动器610上,以便于从其上读出的计算机程序根据需要被安装入存储部分608。
特别地,根据本公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信部分609从网络上被下载和安装,和/或从可拆卸介质611被安装。在该计算机程序被中央处理单元(CPU)601执行时,执行本申请的方法中限定的上述功能。需要说明的是,本申请的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但 不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本申请中,计算机可读介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本申请中,计算机可读的信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读的信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:无线、电线、光缆、RF等等,或者上述的任意合适的组合。
附图中的流程图和框图,图示了按照本申请各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。
描述于本申请实施例中所涉及到的单元可以通过软件的方式实现,也可以通过硬件的方式来实现。所描述的单元也可以设置在处理器中,例如,可以描述为:一种处理器包括确定单元和开启单元。其中,这些单元的名称在某种情况下并不构成对该单元本身的限定,例如确定单元还可以被描述为“确定数据 流量的消耗情况是否满足高流量消耗条件的单元”。
作为另一方面,本申请还提供了一种计算机可读介质,该计算机可读介质可以是上述实施例中描述的电子设备中所包含的;也可以是单独存在,而未装配入该电子设备中。例如,上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被该电子设备执行时,使得该电子设备:响应于其上的数据网络处于连接状态,确定数据流量的消耗情况是否满足高流量消耗条件;响应于确定数据流量的消耗情况满足高流量消耗条件,开启其上的wifi网络开关。
以上描述仅为本申请的较佳实施例以及对所运用技术原理的说明。本领域技术人员应当理解,本申请中所涉及的发明范围,并不限于上述技术特征的特定组合而成的技术方案,同时也应涵盖在不脱离上述发明构思的情况下,由上述技术特征或其等同特征进行任意组合而形成的其它技术方案。例如上述特征与本申请中公开的(但不限于)具有类似功能的技术特征进行互相替换而形成的技术方案。

Claims (17)

  1. 一种用于终端的无线网络连接方法,包括:
    响应于终端的数据网络处于连接状态,确定数据流量的消耗情况是否满足高流量消耗条件;
    响应于确定数据流量的消耗情况满足高流量消耗条件,开启所述终端上的wifi网络开关。
  2. 根据权利要求1所述的方法,其中,所述高流量消耗条件包括运行的第三方应用中包括高流量消耗型的第三方应用;以及
    所述确定数据流量的消耗情况是否满足高流量消耗条件,包括:
    获取当前运行的第三方应用的应用信息,确定所述应用信息是否满足预设条件;若确定所述应用信息满足预设条件,则确定所述应用信息所指示的第三方应用属于高流量消耗型的应用。
  3. 根据权利要求2所述的方法,其中,所述应用信息包括以下至少一项:应用名称、应用图标或应用类型;以及
    所述确定所述应用信息是否满足预设条件,包括以下至少一种:
    确定应用名称中是否包括预设关键词;
    或者确定应用图标是否与预设图标相匹配;
    或者确定应用类型是否属于预设类型。
  4. 根据权利要求1-3中任一所述的方法,其中,所述高流量消耗条件包括执行高流量消耗的操作;以及
    所述确定数据流量的消耗情况是否满足高流量消耗条件,包括:
    检测所述终端的当前运行状态,确定是否正在执行高流量消耗的操作,其中,所述高流量消耗的操作包括以下至少一种:在线播放视频、在线浏览图片、在线游戏或语音视频。
  5. 根据权利要求1-4中任一所述的方法,其中,所述高流量消耗条件包括数据流量的消耗速率达到预设阈值;以及
    所述确定数据流量的消耗情况是否满足高流量消耗条件,包括:
    获取所述终端在一段时长内的数据流量的消耗数据,统计数据流量的消耗速率,并确定统计的消耗速率是否达到预设阈值。
  6. 根据权利要求5所述的方法,其中,所述获取所述终端在一段时长内的数据流量的消耗数据,包括:
    通过抓包工具抓取所述终端在一段时长内收发的数据包,对抓取的数据包进行统计分析,获取数据报文的总大小;根据数据报文的总大小,确定所述终端的数据流量的消耗数据;或者
    基于通信协议统计所述终端上安装的各第三方应用在一段时长内的流量消耗数据,确定所述终端的数据流量的消耗数据。
  7. 根据权利要求1-6中任一所述的方法,其中,所述高流量消耗条件包括当前数据流量的消耗量达到预设额度;以及
    所述确定数据流量的消耗情况是否满足高流量消耗条件,包括:
    对数据流量的消耗量进行监测,确定当前数据流量的消耗量是否达到预设额度。
  8. 根据权利要求7所述的方法,其中,所述对数据流量的消耗量进行监测,包括:
    通过抓包工具抓取所述终端实时收发的数据包,对抓取的数据包进行统计分析,获取数据报文的总大小;根据数据报文的总大小,确定所述终端的数据流量的消耗量;或者
    基于通信协议统计所述终端上安装的各第三方应用的实时流量消耗数据,确定所述终端的数据流量的消耗量。
  9. 根据权利要求7所述的方法,其中,若所述终端上安装有用于管理流量的 应用工具,则所述对数据流量的消耗量进行监测,包括:
    通过所述应用工具实时监测所述终端的数据流量的消耗量。
  10. 根据权利要求7所述的方法,其中,所述对数据流量的消耗量进行监测,包括:
    向运营商服务端发送流量查询请求,以及接收所述运营商服务端的反馈信息,其中,所述反馈信息用于描述终端当前的流量消耗状态;根据所述反馈信息,确定所述终端的数据流量的消耗量。
  11. 根据权利要求1-10中任一所述的方法,其中,所述方法还包括:
    获取所述终端附近的wifi网络的网络信息;
    根据获取的网络信息,从中选取wifi网络以作为目标无线网络,并连接所述目标无线网络。
  12. 根据权利要求11所述的方法,其中,所述终端上还安装有第三方网络连接应用;以及
    所述获取所述终端附近的wifi网络的网络信息,包括:触发所述终端上的第三方网络连接应用以获取所述终端附近的wifi网络的网络信息。
  13. 根据权利要求12所述的方法,其中,所述网络信息包括wifi网络的标识信息;以及
    所述根据获取的网络信息,从中选取wifi网络以作为目标无线网络,并连接所述目标无线网络,包括:
    接收用户对获取的wifi网络的标识信息的选择操作,将所述选择操作所指示的wifi网络作为目标无线网络,并将所述目标无线网络的网络信息发送给服务端;以及接收所述服务端发送的连接密钥,根据所述连接密钥连接所述目标无线网络。
  14. 根据权利要求13所述的方法,其中,所述将所述目标无线网络的网络信息发送给服务端,包括:
    确定所述目标无线网络是否为连接过的wifi网络;若所述目标无线网络不是连接过的wifi网络,则将所述目标无线网络的网络信息发送给服务端。
  15. 根据权利要求12所述的方法,其中,所述根据获取的网络信息,从中选取wifi网络以作为目标无线网络,并连接所述目标无线网络,包括:
    将获取的网络信息发送给服务端,并接收所述服务端的响应信息,其中,所述响应信息包括可用的wifi网络的标识信息和连接密钥;将所述响应信息中的标识信息所指示的wifi网络作为目标无线网络,并根据所述响应信息中的连接密钥连接所述目标无线网络。
  16. 一种电子设备,包括:
    一个或多个处理器;
    存储装置,其上存储有一个或多个程序;
    当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如权利要求1-15中任一所述的方法。
  17. 一种计算机可读介质,其上存储有计算机程序,其中,所述计算机程序被处理器执行时实现如权利要求1-15中任一所述的方法。
PCT/CN2019/115887 2018-11-07 2019-11-06 用于终端的无线网络连接方法 WO2020094036A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811317982.1A CN109246741B (zh) 2018-11-07 2018-11-07 用于终端的无线网络连接方法
CN201811317982.1 2018-11-07

Publications (1)

Publication Number Publication Date
WO2020094036A1 true WO2020094036A1 (zh) 2020-05-14

Family

ID=65077165

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/115887 WO2020094036A1 (zh) 2018-11-07 2019-11-06 用于终端的无线网络连接方法

Country Status (2)

Country Link
CN (1) CN109246741B (zh)
WO (1) WO2020094036A1 (zh)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109246741B (zh) * 2018-11-07 2021-08-27 上海尚往网络科技有限公司 用于终端的无线网络连接方法
CN110087270B (zh) * 2019-05-15 2021-09-17 深圳市沃特沃德信息有限公司 一种阅读的方法、装置、存储介质和计算机设备
CN110351711A (zh) * 2019-07-19 2019-10-18 深圳传音控股股份有限公司 网络切换方法、移动终端及计算机可读存储介质
CN110475133B (zh) * 2019-08-15 2023-11-03 北京拉近众博科技有限公司 一种权限分配方法、装置和存储介质
CN111918246B (zh) * 2020-05-07 2023-02-28 宁波大学 一种无线局域网共享服务提供方法
CN113286341B (zh) * 2021-05-20 2022-07-05 绍兴文理学院元培学院 自动切换网络的方法、系统、终端和存储介质
CN113993103B (zh) * 2021-10-22 2024-01-19 安徽江淮汽车集团股份有限公司 用于车载终端的网络自动互联方法
CN114158104B (zh) * 2021-12-15 2023-09-22 天翼电信终端有限公司 网络选择方法、装置、终端及存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102438289A (zh) * 2011-12-26 2012-05-02 中国电信股份有限公司 Wi-Fi导流方法、装置及移动终端
EP2461631A2 (en) * 2010-12-01 2012-06-06 Deutsche Telekom AG System support for accessing and switching among multiple wireless interfaces on mobile devices
CN103686899A (zh) * 2012-09-25 2014-03-26 东莞宇龙通信科技有限公司 移动数据业务网络与wifi网络切换的方法及移动终端
CN104918298A (zh) * 2014-03-10 2015-09-16 中国移动通信集团广东有限公司 一种网络连接控制方法、装置及移动终端
CN109246741A (zh) * 2018-11-07 2019-01-18 上海连尚网络科技有限公司 用于终端的无线网络连接方法

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7610057B2 (en) * 2004-04-23 2009-10-27 Microsoft Corporation Selecting a wireless networking technology on a device capable of carrying out wireless network communications via multiple wireless technologies
US8589541B2 (en) * 2009-01-28 2013-11-19 Headwater Partners I Llc Device-assisted services for protecting network capacity
CN103596215B (zh) * 2012-08-13 2018-03-23 中国移动通信集团设计院有限公司 第一网络侧设备、第二网络侧设备和wlan覆盖范围识别方法
CN102984812A (zh) * 2012-11-22 2013-03-20 中兴通讯股份有限公司 一种终端连接无线局域网的方法和终端
US9060293B1 (en) * 2013-01-25 2015-06-16 Sprint Spectrum L.P. Reducing wireless communication signaling overhead
CN103916975A (zh) * 2014-04-11 2014-07-09 小米科技有限责任公司 网络连接管理方法及装置
TWI573412B (zh) * 2014-10-23 2017-03-01 財團法人工業技術研究院 控制無線實體和用戶設備的通信模式的方法以及使用所述方法的通信系統
CN105792330A (zh) * 2014-12-25 2016-07-20 中国移动通信集团公司 一种移动终端访问网络的方法和装置
CN105263120B (zh) * 2015-11-27 2019-02-26 科大讯飞股份有限公司 一种提示可连接无线局域网络的方法及系统
US9906981B2 (en) * 2016-02-25 2018-02-27 Nvidia Corporation Method and system for dynamic regulation and control of Wi-Fi scans
CN106231579A (zh) * 2016-07-27 2016-12-14 宇龙计算机通信科技(深圳)有限公司 网络资源的获取方法、网络资源的获取装置和终端

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2461631A2 (en) * 2010-12-01 2012-06-06 Deutsche Telekom AG System support for accessing and switching among multiple wireless interfaces on mobile devices
CN102438289A (zh) * 2011-12-26 2012-05-02 中国电信股份有限公司 Wi-Fi导流方法、装置及移动终端
CN103686899A (zh) * 2012-09-25 2014-03-26 东莞宇龙通信科技有限公司 移动数据业务网络与wifi网络切换的方法及移动终端
CN104918298A (zh) * 2014-03-10 2015-09-16 中国移动通信集团广东有限公司 一种网络连接控制方法、装置及移动终端
CN109246741A (zh) * 2018-11-07 2019-01-18 上海连尚网络科技有限公司 用于终端的无线网络连接方法

Also Published As

Publication number Publication date
CN109246741B (zh) 2021-08-27
CN109246741A (zh) 2019-01-18

Similar Documents

Publication Publication Date Title
WO2020094034A1 (zh) 用于终端的无线网络连接方法
WO2020094036A1 (zh) 用于终端的无线网络连接方法
WO2020094035A1 (zh) 用于终端的无线网络连接方法
US10462245B2 (en) Method, terminal, and system for pushing information
US9686329B2 (en) Method and apparatus for displaying webcast rooms
WO2017101265A1 (zh) 一种消息处理方法、处理服务器、终端及存储介质
WO2014183427A1 (en) Method and apparatus for displaying webcast rooms
CA2968482A1 (en) Telecommunications call augmentation system
CN105611422B (zh) 基于多媒体榜单的在线直播方法及装置
CN112331202B (zh) 一种语音投屏方法及装置、电子设备和计算机可读存储介质
WO2021227785A1 (zh) 流媒体的指标采集处理方法、装置、计算机及存储介质
CN102904959A (zh) 网络加速方法和网关
US20220391354A1 (en) Information sharing method, apparatus, electronic device, and storage medium
WO2023116219A1 (zh) Cdn节点分配方法、装置、电子设备、介质及程序产品
CN106789413B (zh) 一种检测代理上网的方法和装置
WO2016101446A1 (zh) 数据分析方法、装置、系统及终端和服务器
US20170171339A1 (en) Advertisement data transmission method, electrnoic device and system
WO2015032334A1 (zh) 一种内容推荐的方法及移动终端
CN107493486A (zh) 一种视频播放终止的方法、系统及终端设备
WO2022057727A1 (zh) 网络质量确定方法、装置、电子设备和可读存储介质
WO2022041879A1 (zh) 通知触发消息的处理方法和装置
CN113139123A (zh) 资源推荐方法、装置、服务端以及存储介质
WO2017185632A1 (zh) 数据传输的方法及电子设备
CN105323270B (zh) 网络信息推送方法和系统
US10110963B1 (en) System, method, and computer program for media content playback management

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: 19882118

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: 19882118

Country of ref document: EP

Kind code of ref document: A1