CN109152094B - Wireless network connection method for terminal - Google Patents

Wireless network connection method for terminal Download PDF

Info

Publication number
CN109152094B
CN109152094B CN201811317985.5A CN201811317985A CN109152094B CN 109152094 B CN109152094 B CN 109152094B CN 201811317985 A CN201811317985 A CN 201811317985A CN 109152094 B CN109152094 B CN 109152094B
Authority
CN
China
Prior art keywords
network
wireless network
information
terminal
target wireless
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811317985.5A
Other languages
Chinese (zh)
Other versions
CN109152094A (en
Inventor
王飞
童小林
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Shangxiang Network Technology Co.,Ltd.
Original Assignee
Shanghai Shangxiang Network Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Shangxiang Network Technology Co ltd filed Critical Shanghai Shangxiang Network Technology Co ltd
Priority to CN201811317985.5A priority Critical patent/CN109152094B/en
Publication of CN109152094A publication Critical patent/CN109152094A/en
Priority to PCT/CN2019/115885 priority patent/WO2020094035A1/en
Application granted granted Critical
Publication of CN109152094B publication Critical patent/CN109152094B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • 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
    • H04W28/00Network traffic management; Network resource management
    • H04W28/02Traffic management, e.g. flow control or congestion control
    • H04W28/10Flow control between communication endpoints
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/18Selecting a network or a communication service

Landscapes

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

Abstract

The embodiment of the application discloses a wireless network connection method for a terminal. One embodiment of the method comprises: monitoring the consumption state of data flow in response to the data network of the terminal being in a connection state; triggering a network connection application to acquire network information of a wifi network near a terminal in response to monitoring that the consumption of the current data flow reaches a preset limit; and selecting a wifi network from the acquired network information as a target wireless network and connecting the target wireless network. The embodiment can adjust the connection state of the wireless network by monitoring the consumption state of the data flow in real time. Thereby, the use control of the data flow can be realized. This is advantageous in reducing or avoiding overuse of data traffic. Meanwhile, the networking requirements of the user can be effectively guaranteed by flexibly and quickly switching from the data network to the wifi network.

Description

Wireless network connection method for terminal
Technical Field
The embodiment of the application relates to the technical field of computers, in particular to a wireless network connection method for a terminal.
Background
With the rapid development of internet technology and intelligent terminals, more and more people are used to acquire network resources by using terminals. In general, people need to purchase data traffic to implement the internet access function of the terminal.
Meanwhile, with the popularization of wifi (wireless broadband) technology, a terminal within the range of a wireless local area network can also realize the networking function by connecting a wireless network, so that the use of data traffic can be reduced.
Disclosure of Invention
The embodiment of the application provides a wireless network connection method for a terminal.
In a first aspect, an embodiment of the present application provides a wireless network connection method for a terminal, including: monitoring the consumption state of data flow in response to the data network of the terminal being in a connection state; triggering a network connection application to acquire network information of a wifi network near a terminal in response to monitoring that the consumption of the current data flow reaches a preset limit; and selecting a wifi network from the acquired network information as a target wireless network and connecting the target wireless network.
In some embodiments, monitoring the consumption status of the data traffic comprises: capturing a data packet which is transmitted and received by a terminal in real time through a packet capturing tool, and performing statistical analysis on the captured data packet to obtain the total size of the data packet; and determining the consumption of the data flow of the terminal according to the total size of the data message.
In some embodiments, if an application tool for managing traffic is installed on the terminal, monitoring a consumption state of the data traffic includes: and monitoring the consumption of the data flow of the terminal in real time through the application tool.
In some embodiments, monitoring the consumption status of the data traffic comprises: and counting real-time traffic consumption data of each third-party application installed on the terminal based on the communication protocol, and determining the consumption of the data traffic of the terminal.
In some embodiments, monitoring the consumption status of the data traffic comprises: sending a flow query request to an operator server and receiving feedback information of the operator server, wherein the feedback information is used for describing the current flow consumption state of the terminal; and determining the consumption of the data flow of the terminal according to the feedback information.
In some embodiments, the network information includes identification information of a wifi network; and according to the acquired network information, selecting a wifi network from the network information as a target wireless network, and connecting the target wireless network, wherein the method comprises the following steps: receiving selection operation of a user on the identification information of the obtained wifi network, taking the wifi network indicated by the selection operation as a target wireless network, and sending network information of the target wireless network to a server; and receiving the connection key sent by the server, and connecting the target wireless network according to the connection key.
In some embodiments, sending the network information of the target wireless network to the server includes: determining whether the target wireless network is a connected wifi network; and if the target wireless network is not the connected wifi network, sending the network information of the target wireless network to the server.
In some embodiments, selecting a wifi network from the obtained network information as a target wireless network, and connecting the target wireless network, includes: sending the acquired network information to a server and receiving response information of the server, wherein the response information comprises identification information and a connection key of an available wifi network; and taking the wifi network indicated by the identification information in the response information as a target wireless network, and connecting the target wireless network according to the connection key in the response information.
In some embodiments, before triggering the network connection application to acquire network information of a wifi network in the vicinity of the terminal, the method further includes: determining whether a wifi network switch of the terminal is in an open state; and if the wifi network switch is in a closed state, the wifi network switch is started.
In a second aspect, an embodiment of the present application provides a wireless network connection apparatus for a terminal, including: a monitoring unit configured to monitor a consumption state of data traffic in response to a data network of the terminal being in a connected state; the acquisition unit is configured to trigger the network connection application to acquire network information of a wifi network near the terminal in response to monitoring that the consumption of the current data traffic reaches a preset limit; and the connecting unit is configured to select a wifi network from the acquired network information as a target wireless network and connect the target wireless network.
In a third aspect, an embodiment of the present application provides an electronic device, including: one or more processors; a storage device having one or more programs stored thereon; when executed by one or more processors, cause the one or more processors to implement a method as described in any one of the embodiments of the first aspect above.
In a fourth aspect, the present application provides a computer-readable medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the method as described in any one of the embodiments of the first aspect.
According to the wireless network connection method for the terminal, when the data network of the terminal is in a connection state, the consumption state of data flow can be monitored in real time. And under the condition that the consumption of the current data flow is monitored to reach the preset limit, the network connection application on the network connection device can be triggered. Therefore, the network information of the wifi network near the terminal can be obtained. And then selecting a wifi network from the target wireless networks to serve as the target wireless network and connecting the target wireless network. That is, the connection state of the wireless network can be adjusted by monitoring the consumption state of the data traffic in real time. Thereby, the use control of the data flow can be realized. This advantageously reduces or avoids the excessive use of data traffic, thereby reducing the economic cost to the user. Meanwhile, the networking requirements of the user can be effectively guaranteed by flexibly and quickly switching from the data network to the wifi network.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:
FIG. 1 is an exemplary system architecture diagram in which one embodiment of the present application may 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 block diagram of a computer system suitable for use in implementing an electronic device according to embodiments of the present application.
Detailed Description
The present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant invention and not restrictive of the invention. It should be noted that, for convenience of description, only the portions related to the related invention are shown in the drawings.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
Fig. 1 illustrates an exemplary system architecture 100 to which a wireless network connection method for a terminal according to an embodiment of the present application may be applied.
As shown in fig. 1, the system architecture 100 may include terminals 101, 102, 103, networks 104, 105, and a server 106. The network 104 may be the medium used to provide communication links between the terminals 101, 102, 103. The network 105 may be the medium used to provide communication links 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, among others.
The users may interact with each other via the network 104 using the terminals 101, 102, 103 to receive or send messages or the like. Meanwhile, 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. The terminals 101, 102, 103 may have various client applications installed thereon, such as a network connection application, a traffic management application, a video application, a browser, an instant messenger, and the like.
In the case where the data network of the terminal 101, 102, 103 is in a connected state and the wifi network is in an unconnected state, the user can use various applications installed on the terminal with data traffic. Meanwhile, the terminals 101, 102, 103 may monitor the consumption state of the data traffic in real time. If the consumption of the current data flow reaches the preset limit, the network connection application on the current data flow can be triggered to acquire the network information of the wifi network nearby the current data flow. And a wifi network can be selected from the target wireless network to be used as the target wireless network, so that the target wireless network is connected.
Here, the terminals 101, 102, and 103 may be hardware or software. When the terminals 101, 102, 103 are hardware, they may be various electronic devices with network connection function, including but not limited to smart phones, tablet computers, wearable devices, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III, mpeg Audio Layer 3), laptop portable computers, desktop computers, and the like. When the terminals 101, 102, 103 are software, they can be installed in the electronic devices listed above. It may be implemented as multiple pieces of software or software modules (e.g., to provide distributed services) or as a single piece of software or software module. And is not particularly limited herein.
The server 106 may be a server providing various services, for example, a background server providing support for various applications installed on the terminals 101, 102, 103. The background server may analyze wifi network connection requests sent by the terminals 101, 102, 103. And may send the analysis result (e.g., a connection key of a wifi network) to the terminal. Therefore, the terminal can realize the connection of the wifi network by using the connection key, thereby being beneficial to reducing the use of data flow.
Here, the server 106 may be hardware or software. When the server 106 is hardware, it may be implemented as a distributed server cluster composed of multiple servers, or may be implemented as a single server. When the server 106 is software, it may be implemented as multiple pieces of software or software modules (e.g., to provide distributed services), or as a single piece of software or software module. And is not particularly limited herein.
It should be noted that the wireless network connection method for the terminal provided in the embodiment of the present application may be generally performed by the terminals 101, 102, and 103.
It should be understood that the number of terminals, networks and servers in fig. 1 is merely illustrative. There may be any number of terminals, networks, and servers, as desired for an implementation.
With continued reference to fig. 2, a flow 200 of a first embodiment of a wireless network connection method for a terminal according to the present application is shown. The wireless network connection method may include the steps of:
step 201, in response to the data network being in a connected state, monitoring a consumption state of the data traffic.
In this embodiment, if the data network of the electronic device (for example, the terminals 101, 102, 103 shown in fig. 1) is in a connected state, the consumption state of the data traffic can be monitored in real time. Wherein the data network is generally referred to as a mobile network. Such as may include (but is not limited to) at least one of: a 3G (third generation mobile communication system) network, a 4G (fourth generation mobile communication system) network, a 5G (fifth generation mobile communication system) network, and the like.
It should be noted that, at this time, the wifi network of the electronic device is in an unconnected state. That is, the electronic device needs to communicate using data traffic. Among them, a wifi (wireless fidelity) network generally refers to a wireless connection network different from a data network. For example, may include, but is not limited to, a wireless local area network based on the IEEE 802.11b standard.
It can be understood that, in the existing communication cards (such as a telephone card, a flow card, etc.), the data flow contained in the communication card is different according to different packages transacted by a user. For example, the communication card may have 1GB of data traffic per month, or 100MB of data traffic per day, etc.
In this embodiment, the consumption status of the data traffic can be generally used to describe the consumption of the data traffic. Such as may include data traffic consumed and/or remaining data traffic for a predetermined period of time (e.g., a natural month, a day, an hour, etc.) by the electronic device. Here, the electronic device may implement the monitoring of the consumption state of the data traffic in various ways.
In some optional implementations of this embodiment, the electronic device may capture the data packet transmitted and received by the electronic device in real time through a packet capture tool. Therefore, the captured data packets can be subjected to statistical analysis to obtain the total size of the data message. And further, according to the total size of the data message, the consumption of the data flow of the user can be determined. The bale plucking tool and the plucking manner are not limited in this application. For example, tcpdump bale plucking tool is commonly used on Android systems.
It is understood that when an electronic device (e.g., a mobile phone) accesses the internet through a network of an operator, the operator generally forwards a data message instead of the electronic device. The total size (number of bytes) of the data packet is the data traffic used by the electronic device. The data message may include uplink and downlink (receiving and transmitting) messages of the electronic device. Since the data packet is transmitted by using the IP (internet protocol) protocol, the data traffic calculated by the operator is generally the size of the data packet including the IP header.
Alternatively, if an application tool for managing traffic is installed on the electronic device, the electronic device may monitor consumption of data traffic in real time through the application tool. Therefore, the use requirements of different users can be met, and the method is beneficial to expanding the application range of the method.
Further, the electronic device may also count real-time traffic consumption data of each third-party application installed thereon based on the communication protocol, thereby determining the consumption amount of the data traffic of the electronic device. As an example, the Android system generally provides a function of counting a TCP (Transmission Control Protocol) transceiving length. And 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 the statistical function. This may further enrich and refine the way in which the consumption state of the data traffic is monitored.
It should be noted that the statistical function provided by the Android system is often counted according to the application latitude, that is, the data traffic consumed by each application. After the real-time traffic consumption data of each application is acquired, the electronic device may determine the consumption of its own total data traffic.
In some application scenarios, the electronic device may also send a traffic query request to the operator server. And can receive feedback information corresponding to the traffic query request sent by the operator service end. The feedback information may be used to describe a current traffic consumption state of the electronic device. For example, the feedback information may include at least one of: traffic type (e.g., normal monthly flow, video directed exempt flow or pay for traffic, etc.), remaining traffic or traffic purchase record, etc. In this way, the electronic device can determine the consumption of its data traffic based on the feedback information.
It should be noted that the traffic query request may generally include a mobile phone number corresponding to a communication card (e.g., a SIM card) used by the electronic device.
Step 202, in response to monitoring that the consumption of the current data traffic reaches a preset limit, triggering a network connection application to acquire network information of a nearby wifi network.
In this embodiment, if the electronic device monitors that the consumption of the current data traffic reaches the preset limit, the network connection application may be triggered. So that the network information of the wifi network in its vicinity (i.e. the current location is within the coverage of the wifi network) can be obtained. Wherein, predetermine the quota and can set up according to actual conditions. For example, the predetermined amount may (but is not limited to) be at least one of the following: a monthly total flow rate credit, 90% of the total flow rate credit, an upper limit credit for daily flow consumption, etc. The user can set the preset quota in the system of the electronic equipment or the application tool.
In this embodiment, the network connection application may be an application for implementing wifi network connection. For example, the application may be a third-party network connection application installed on the electronic device, or an application in the electronic device system (such as a wifi network switch). The network information can be used to describe relevant information of the wifi network. For example, may include (but is not limited to) at least one of: the name of the wifi network, the signal strength, whether a connection key, etc. are set.
It is understood that the reason why the wifi network of the electronic device is in the unconnected state may be that the network connection application of the electronic device is in the closed state. I.e. the function of connecting to the wifi network is not turned on. It is also possible that the network connected application of the electronic device is in an on state but not connected to a wifi network, or there is no wifi network available nearby, etc. Accordingly, the above-described triggering operation is not limited in this application. For example, the electronic device may start a network connection application that is not already running. For another example, the electronic device may open a network connection application running in the background to the front-end running.
And step 203, selecting a wifi network from the acquired network information as a target wireless network and connecting the target wireless network.
In this embodiment, the electronic device may select a wifi network as the target wireless network according to the network information acquired in step 202. And the electronic device may acquire a connection key of the target wireless network, thereby connecting the target wireless network. This may reduce or prevent the electronic device from continuing to use the data traffic. Thereby helping to reduce or avoid the excessive use of data traffic and thereby reducing the cost incurred by the excessive data traffic.
The selecting operation may be performed by the electronic device, or may be performed by the user or other devices. In addition, the connection key may be pre-stored locally by the electronic device, may be input by the user, or may be obtained by the electronic device from another device. In general, the electronic device may present the acquired network information of the wifi network to the user. In this way, the user can review and/or select the wifi network to which the user needs to connect.
The wireless network connection method for the terminal provided by the embodiment can monitor the consumption state of the data traffic in real time when the data network of the terminal is in a connection state. And under the condition that the consumption of the current data flow is monitored to reach the preset limit, the network connection application on the network connection device can be triggered. Therefore, the network information of the wifi network near the terminal can be obtained. And then selecting a wifi network from the target wireless networks to serve as the target wireless network and connecting the target wireless network. That is, the connection state of the wireless network can be adjusted by monitoring the consumption state of the data traffic in real time. Thereby, the use control of the data flow can be realized. This advantageously reduces or avoids the excessive use of data traffic, thereby reducing the economic cost to the user. Meanwhile, the networking requirements of the user can be effectively guaranteed by flexibly and quickly switching from the data network to the wifi network.
With further reference to fig. 3, a flow 300 of a second embodiment of a wireless network connection method for a terminal according to the present application is shown. The wireless network connection method may include the steps of:
step 301, in response to the data network being in a connected state, monitoring a consumption state of the data traffic.
In this embodiment, if the data network of the electronic device (for example, the terminals 101, 102, 103 shown in fig. 1) is in a connected state, the consumption state of the data traffic can be monitored in real time. Specifically, reference may be made to the relevant description in step 201 in the embodiment of fig. 2, and details are not repeated here.
Step 302, in response to monitoring that the consumption of the current data traffic reaches a preset limit, triggering a network connection application to acquire network information of a nearby wifi network. Reference may be made to the related description in step 202 of the embodiment in fig. 2, and details are not repeated here.
In this embodiment, the network connection application may include a third party network connection application. That is, in a case where the third-party network connection application is installed on the electronic device, the electronic device may trigger the third-party network connection application. And network information of a nearby wifi network can be acquired through it. Wherein, the network information may include identification information of the wifi network. The identification information here can be used to uniquely represent the wifi network. Which may include at least one of a number, letter, symbol, etc. character. For example, the identification information may be, but is not limited to, an SSID (Service Set Identifier, i.e., name of a wireless network) or a bssid (basic Service Set), etc.
It should be noted that, in order to obtain the network information of the wifi network, the electronic device further needs to ensure that the wifi network switch thereon is in an on state. That is, before triggering the third-party network connection application to acquire network information of a wifi network nearby, the electronic device may determine whether a wifi network switch thereon is in an on state. If the wifi network switch is in the off state, the wifi network switch can be turned on.
Step 303, receiving a selection operation of the user on the obtained identification information of the wifi network, taking the wifi network indicated by the selection operation as a target wireless network, and sending the network information of the target wireless network to the server.
In this embodiment, the electronic device may present the acquired network information of the wifi network to the user, so as to prompt the user to select the wifi network to be connected. In this way, the electronic device can receive the selection operation of the user on the obtained identification information of the wifi network. And the wifi network indicated by the selection operation may be taken as the target wireless network. And the electronic device may send the network information of the target wireless network to a server (e.g., the server 106 shown in fig. 1) through the third-party network connection application. In this way, the server may determine the connection key of the target wireless network by using the prior art or other methods, and return the connection key to the electronic device. And will not be described in detail herein.
It is understood that, in general, the electronic device may store identification information of the connected wifi network and a connection key. Therefore, in order to improve the connection efficiency of the network, optionally, the electronic device may first determine whether the target wireless network is a connected wifi network. And if the target wireless network is the connected wifi network, connecting the target wireless network according to the stored connection key. And if the target wireless network is not the connected wifi network, the network information of the target wireless network can be sent to the server.
Furthermore, the manner of presentation herein is not limiting in this application. The network information may be displayed to the user, for example, at an application interface of a third party network connection application. For another example, the network information may be displayed to the user on a page of a wifi network switch. And/or the network information can be presented to the user in a voice broadcast mode.
And step 304, receiving the connection key sent by the server, and connecting the target wireless network according to the connection key.
In this embodiment, when receiving the connection key sent by the server, the electronic device may connect to the application through the third-party network, and connect to the target wireless network according to the connection key, thereby reducing consumption of data traffic. It is understood that the electronic device may also store the identification information and connection key of the target wireless network in case of successful connection to the target wireless network.
In the wireless network connection method for the terminal provided in this embodiment, when it is monitored that the consumption of the current data traffic reaches the preset limit, the network information of a wireless network nearby the terminal can be acquired by triggering the third-party network connection application installed on the terminal. Therefore, the connection of the wifi network selected by the user can be realized, and the use of data flow is reduced. Therefore, the process of the wireless network connection method can be enriched and perfected, the use requirements of different users can be met, and the method is beneficial to expanding the use range.
In some application scenarios, the network information may also include a connection key of the wifi network. At this time, when receiving the selection operation of the user on the identification information of the obtained 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 to improve the connection efficiency of the network. And even if communication between the electronic equipment and the server is in problem, the connection of the wifi network cannot be influenced.
Optionally, the electronic device may also perform selection of the wifi network instead of the user. For example, the electronic device may connect to an application through a third-party network, and select the obtained identification information of the wifi network. And the automatically selected wifi network can be used as the target wireless network. And then the network information of the target wireless network is sent to the server side to obtain the connection key of the server side. Or the connection is realized according to the connection key in the network information. This can simplify or reduce user operations and improve connection efficiency. Meanwhile, the above process may be executed in the back end of the electronic device. Therefore, interference influence on the operation of the front end can not be generated, and the user experience is improved.
It should be noted that the above selection is not limited in the present application. For example, the electronic device may employ (but is not limited to) at least one of the following: selecting a wifi network with stronger signal intensity, more stable selection signal, faster selection network, closer selection distance to the electronic equipment, more connection times, and more or less equipment connected currently. Here, the electronic device may acquire the data from the network information.
Referring to fig. 4, a flow 400 of a third embodiment of a wireless network connection method for a terminal according to the present application is shown. The wireless network connection method may include the steps of:
step 401, in response to the data network being in a connected state, monitoring a consumption state of the data traffic. Reference may be made to the related description in step 301 in the embodiment of fig. 3, and details are not repeated here.
Step 402, in response to monitoring that the consumption of the current data traffic reaches a preset limit, triggering a network connection application to acquire network information of a nearby wifi network. The network information herein may include at least one of: identification information, signal strength, stability or network speed of the wifi network, and the like. Reference may be made to the related description in step 302 of the embodiment in fig. 3, and details are not repeated here.
Step 403, sending the acquired network information to the server, and receiving response information of the server.
In this embodiment, the electronic device may also send the acquired network information to a server (e.g., the server 106 shown in fig. 1) through a third-party network connection application. Therefore, the service end can select an available wifi network from the network information. If the wifi network connected with the secret key can be determined, or the wifi network with stronger signal strength and better stability. And the server can determine the connection key of the available wifi network. Thereby generating response information to be returned to the electronic device. Wherein, the response information may include identification information and connection key of the available wifi network. In this way, the electronic device may receive the response information.
And step 404, taking the wifi network indicated by the identification information in the response information as a target wireless network, and connecting the target wireless network according to the connection key in the response information.
In this embodiment, 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. And the target wireless network can be connected through the third-party network connection application according to the connection key of the wifi network in the response information.
According to the wireless network connection method for the terminal, under the condition that it is monitored that the consumption of the current data flow reaches the preset limit, the network information of the wifi network nearby the terminal can be obtained by triggering the third-party network connection application installed on the terminal. And the network information can be sent to the server side so as to select an available wifi network. Thereby realizing the connection of the available wifi network. Therefore, the process of the wireless network connection method is further enriched, and the application range of the method is expanded. User operations may also be reduced or simplified. It also helps to make the connected wireless network more consistent with the needs of the user.
With further reference to fig. 5, a flow 500 of a fourth embodiment of a wireless network connection method for a terminal according to the present application is shown. The wireless network connection method may include the steps of:
step 501, in response to the data network being in a connected state, monitoring a consumption state of data traffic. Reference may be made to the related description in step 201 of the embodiment in fig. 2, and details are not repeated here.
Step 502, in response to monitoring that the consumption of the current data traffic reaches a preset limit, triggering a network connection application to acquire network information of a nearby wifi network. Reference may be made to the related description in step 202 of the embodiment in fig. 2, and details are not repeated here.
Here, the network connection application may include an application in the electronic device system. The application can be used for realizing connection of a wifi network, such as a wifi network switch. Therefore, the electronic equipment can acquire the network information of the wifi network nearby through the wifi network switch. Wherein, the network information may include identification information of the wifi network.
Step 503, determining whether the obtained identification information of the wifi network contains identification information of the connected wifi network.
In this embodiment, in order to improve the connection efficiency, the electronic device may match the stored identification information of the connected wifi network with the acquired identification information of the wifi network. So that it can be determined whether identification information of the connected wifi network is contained therein. If the identification information of the connected wifi network is included, the electronic device may continue to perform step 504.
And step 504, taking the connected wifi network as a target wireless network.
In this embodiment, if the obtained identification information of the wifi network includes the identification information of the connected wifi network, the electronic device may use the obtained wifi network as the target wireless network.
Optionally, the network information may further include at least one of: signal strength, stability, or network speed of the wifi network. At this time, if the obtained identification information of the wifi network includes identification information of at least two connected wifi networks, the electronic device may determine the target wireless network through at least one of the following manners: if the wifi networks are connected in at least two, the wifi network with stronger signal intensity can be used as a target wireless network; or the wifi network with better stability can be used as a target wireless network; or a wifi network with higher network speed can be used as the target wireless network. Therefore, the method better accords with the practical application condition and is also beneficial to enabling the target wireless network to better meet the use requirement of the user.
And step 505, connecting the target wireless network according to the stored connection key.
In this embodiment, the electronic device may search for a connection key corresponding to the target wireless network from among the stored connection keys. Therefore, the target wireless network can be connected through the wifi network switch according to the connection key.
It is to be understood that the above-described connection process may be run in the background of the electronic device. Therefore, interference and influence on the front-end operation of the user can not be generated, and the use experience of the user can be improved. In some application scenarios, if the obtained identification information of the wifi network does not contain the identification information of the connected wifi network, if the connection of the wifi network is set for the first time, the electronic device may present the obtained network information of the wifi network to the user on a page of the wifi network switch. So that the user can select the wifi network to be connected. Or, under the condition that the third-party network connection application is installed, the electronic device can also start the third-party network connection application on the electronic device, so that the connection of the wifi network is realized. Reference may be specifically made to the description related to fig. 3 and fig. 4, and details are not repeated here.
According to the wireless network connection method for the terminal, under the condition that it is monitored that the consumption of the current data flow reaches the preset limit, the network information of a wifi network nearby the terminal can be acquired by triggering a wifi network switch on the terminal. Therefore, the connected wifi network is connected, and the use of data flow is reduced. This can enrich and improve the process of the wireless network connection method.
It is understood that, for the above embodiments, the acquiring process of the network information, the selecting process of the target wireless network, and the connecting process of the target wireless network may be performed by a third-party network connection and/or a wifi network switch on the electronic device. And are not limiting in this application. For example, in some application systems, a third-party network application may obtain network information of a nearby wifi network. And the pages of the wifi network switch can present the network information and select the target wireless network. The third party network application may then make a connection to the target wireless network.
Referring now to FIG. 6, a block diagram of a computer system 600 suitable for use in implementing an electronic device (e.g., terminals 101, 102, 103 shown in FIG. 1) of an embodiment of the present application is shown. The electronic device shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in fig. 6, the computer system 600 includes a Central Processing Unit (CPU)601 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)602 or a program loaded from a storage section 608 into a Random Access Memory (RAM) 603. In the RAM 603, 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 via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
The following components are connected to the I/O interface 605: an input portion 606 including a touch screen, keys, a microphone, a camera, and the like; an output portion 607 including a display such as a Liquid Crystal Display (LCD) and/or a speaker; a storage section 608 including a hard disk and the like; and a communication section 609 including a network interface card such as a LAN card, a modem, or the like. 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 mounted on the drive 610 as necessary, so that a computer program read out therefrom is mounted in the storage section 608 as necessary.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 609, and/or installed from the removable medium 611. The computer program performs the above-described functions defined in the method of the present application when executed by a Central Processing Unit (CPU) 601. It should be noted that the computer readable medium of the present application can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present application, a computer readable medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In this application, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present application may be implemented by software or hardware. The described units may also be provided in a processor, and may be described as: a processor includes a monitoring unit, an acquisition unit, and a connection unit. The names of these units do not in some cases form a limitation on the unit itself, for example, a monitoring unit may also be described as a "unit that monitors the consumption state of data traffic".
As another aspect, the present application also provides a computer-readable medium, which may be contained in the electronic device described in the above embodiments; or may exist separately without being assembled into the electronic device. For example, the computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: monitoring a consumption state of data traffic in response to a data network thereon being in a connected state; triggering a network connection application to acquire network information of a wifi network nearby in response to monitoring that the consumption of the current data flow reaches a preset limit; and selecting a wifi network from the acquired network information as a target wireless network and connecting the target wireless network.
The above description is only a preferred embodiment of the application and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention herein disclosed is not limited to the particular combination of features described above, but also encompasses other arrangements formed by any combination of the above features or their equivalents without departing from the spirit of the invention. For example, the above features may be replaced with (but not limited to) features having similar functions disclosed in the present application.

Claims (7)

1. A wireless network connection method for a terminal, comprising:
responding to the connection state of a data network of the terminal, and monitoring the consumption state of data flow in real time;
responding to the monitored consumption of the current data flow reaching a preset limit, and triggering a network connection application to acquire network information of a wifi network near the terminal, wherein the network information comprises at least one of the following items: the name and the signal strength of the wifi network, and whether a connection key is set;
according to the acquired network information, selecting a wifi network from the network information as a target wireless network, and connecting the target wireless network;
wherein, the monitoring the consumption state of the data flow comprises:
capturing a data packet which is transmitted and received by the terminal in real time through a packet capturing tool, and performing statistical analysis on the captured data packet to obtain the total size of the data packet; determining the consumption of the data flow of the terminal according to the total size of the data message; and/or
If the terminal is provided with an application tool for managing the flow, the monitoring of the consumption state of the data flow comprises the following steps: monitoring consumption of data flow of the terminal in real time through the application tool, wherein the preset limit is arranged in a system of the terminal or the application tool; and/or
The monitoring of the consumption state of the data traffic comprises: counting real-time traffic consumption data of each third-party application installed on the terminal based on a communication protocol, and determining the consumption of data traffic of the terminal;
the network information comprises identification information of a wifi network; and
the method for connecting the target wireless network to the wifi network comprises the following steps:
receiving selection operation of a user on the identification information of the obtained wifi network, taking the wifi network indicated by the selection operation as a target wireless network, and sending network information of the target wireless network to a server; and receiving a connection key sent by the server, connecting the application through a third-party network, and connecting the target wireless network according to the connection key.
2. The method of claim 1, wherein the monitoring a consumption state of data traffic comprises:
sending a flow query request to an operator server, and receiving feedback information of the operator server, wherein the feedback information is used for describing the current flow consumption state of a terminal; and determining the consumption of the data flow of the terminal according to the feedback information.
3. The method of claim 2, wherein the transmitting the network information of the target wireless network to a server comprises:
determining whether the target wireless network is a connected wifi network; and if the target wireless network is not the connected wifi network, sending the network information of the target wireless network to a server.
4. The method of claim 1, wherein the selecting a wifi network from the obtained network information as a target wireless network and connecting the target wireless network comprises:
sending the acquired network information to a server and receiving response information of the server, wherein the response information comprises identification information and a connection key of an available wifi network; and taking the wifi network indicated by the identification information in the response information as a target wireless network, and connecting the target wireless network according to the connection key in the response information.
5. The method according to any one of claims 1-4, wherein before the triggering the network connection application to obtain network information of a wifi network in the vicinity of the terminal, the method further comprises:
determining whether a wifi network switch of the terminal is in an on state; and if the wifi network switch is in a closed state, the wifi network switch is started.
6. An electronic device, comprising:
one or more processors;
a storage device having one or more programs stored thereon;
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-5.
7. A computer-readable medium, on which a computer program is stored, wherein the computer program, when being executed by a processor, carries out the method according to any one of claims 1-5.
CN201811317985.5A 2018-11-07 2018-11-07 Wireless network connection method for terminal Active CN109152094B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201811317985.5A CN109152094B (en) 2018-11-07 2018-11-07 Wireless network connection method for terminal
PCT/CN2019/115885 WO2020094035A1 (en) 2018-11-07 2019-11-06 Wireless network connection method for terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811317985.5A CN109152094B (en) 2018-11-07 2018-11-07 Wireless network connection method for terminal

Publications (2)

Publication Number Publication Date
CN109152094A CN109152094A (en) 2019-01-04
CN109152094B true CN109152094B (en) 2021-10-22

Family

ID=64807864

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811317985.5A Active CN109152094B (en) 2018-11-07 2018-11-07 Wireless network connection method for terminal

Country Status (2)

Country Link
CN (1) CN109152094B (en)
WO (1) WO2020094035A1 (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109152094B (en) * 2018-11-07 2021-10-22 上海尚往网络科技有限公司 Wireless network connection method for terminal
CN113170305B (en) * 2019-01-09 2023-02-28 深圳市欢太科技有限公司 Application downloading and installing method and related product
CN109842759B (en) * 2019-01-21 2020-01-24 北京健康之家科技有限公司 Network service operation control platform
CN112929825B (en) * 2021-03-18 2022-08-05 惠州Tcl移动通信有限公司 Terminal WiFi control method and device, storage medium and mobile terminal
CN113766543B (en) * 2021-09-14 2024-04-30 青岛中科英泰商用系统股份有限公司 Method, system, electronic equipment and medium for improving WiFi stability
CN114143855A (en) * 2021-12-21 2022-03-04 西安易朴通讯技术有限公司 Network automatic connection method and device
CN114666857A (en) * 2022-04-27 2022-06-24 中国电信股份有限公司 Communication networking control method, device, medium and electronic equipment
CN115002186B (en) * 2022-05-17 2024-07-09 深信服科技股份有限公司 Network information acquisition method and device, electronic equipment and readable storage medium
CN116016239B (en) * 2023-01-03 2024-07-09 重庆长安汽车股份有限公司 Service interface testing method, device, equipment and storage medium
CN118102351B (en) * 2024-04-18 2024-07-09 深圳市迅优电子科技有限公司 Mobile signal enhancement method and system based on multi-parameter dynamic adjustment strategy

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104144415A (en) * 2014-07-10 2014-11-12 深圳市螺光科技有限公司 Method for connecting WiFi access point and mobile communication terminal
CN104918298A (en) * 2014-03-10 2015-09-16 中国移动通信集团广东有限公司 Network connection control method and apparatus, and mobile terminal

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8750188B2 (en) * 2010-12-01 2014-06-10 Deutsche Telekom Ag System support for accessing and switching among multiple wireless interfaces on mobile devices
CN102448187B (en) * 2011-10-29 2015-10-07 华为终端有限公司 The method of automatic access Wi-Fi network and terminal
CN102438289A (en) * 2011-12-26 2012-05-02 中国电信股份有限公司 Wi-Fi flow guiding method and device and mobile terminal
CN103686899A (en) * 2012-09-25 2014-03-26 东莞宇龙通信科技有限公司 A switching method between a mobile data service network and a wifi network and a mobile terminal thereof
CN102984812A (en) * 2012-11-22 2013-03-20 中兴通讯股份有限公司 Method for connecting terminal with wireless local area network (WLAN) and terminal
CN104105167A (en) * 2013-04-15 2014-10-15 中兴通讯股份有限公司 Terminal Wi-Fi hotspot access processing method and device
CN106576294B (en) * 2014-08-26 2020-06-26 华为技术有限公司 Network communication method and device
US20160095156A1 (en) * 2014-09-29 2016-03-31 Qualcomm Incorporated Out-of-service scan optimization using broadcast neighbor list information in wireless communications
US10412014B2 (en) * 2015-11-16 2019-09-10 Qualcomm Incorporated Latency enhancement in a wireless communication system
CN106231579A (en) * 2016-07-27 2016-12-14 宇龙计算机通信科技(深圳)有限公司 The acquisition methods of Internet resources, the acquisition device of Internet resources and terminal
CN109152094B (en) * 2018-11-07 2021-10-22 上海尚往网络科技有限公司 Wireless network connection method for terminal

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104918298A (en) * 2014-03-10 2015-09-16 中国移动通信集团广东有限公司 Network connection control method and apparatus, and mobile terminal
CN104144415A (en) * 2014-07-10 2014-11-12 深圳市螺光科技有限公司 Method for connecting WiFi access point and mobile communication terminal

Also Published As

Publication number Publication date
CN109152094A (en) 2019-01-04
WO2020094035A1 (en) 2020-05-14

Similar Documents

Publication Publication Date Title
CN109152094B (en) Wireless network connection method for terminal
CN109152095B (en) Wireless network connection method for terminal
CN109246741B (en) Wireless network connection method for terminal
CN104935744A (en) Verification code display method, verification code display device and mobile terminal
CN108810123B (en) Method and apparatus for provisioning mobile cellular network services
CN102904959A (en) Network accelerating method and gateway
US11758087B2 (en) Multimedia conference data processing method and apparatus, and electronic device
CN104253714A (en) Monitoring method, system, browser and server
CN105611422A (en) Online live broadcast method based on multi-media list and apparatus thereof
CN110399578A (en) Page access method and device
US20170171339A1 (en) Advertisement data transmission method, electrnoic device and system
CN109218370A (en) Message method and device, electronic equipment
WO2016101446A1 (en) Data analysis method, apparatus, system, and terminal, and server
CN108880923A (en) The method and apparatus that policer operation applied to application server is requested
CN104426685A (en) Information management method and apparatus
CN112016280B (en) File editing method and device and computer readable medium
CN113055348B (en) Cross-platform data request method and device and electronic equipment
CN116781782A (en) Request processing method, request processing device, electronic equipment and storage medium
CN105915611A (en) Cross-terminal data processing method and device
CN110457089A (en) Collecting method, device, computer readable storage medium and computer equipment
CN112637795A (en) On-hook short message transmission method, server, terminal equipment, system and storage medium
CN113179322A (en) Remote interaction method and device, electronic equipment and storage medium
CN105897681A (en) Information push method, device and system
CN105681054A (en) Intelligent aggregating content and voice input traffic-fee-free APP system and method
CN112069437A (en) Webpage request processing method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20210420

Address after: 200131 Zone E, 9th floor, No.1 Lane 666, zhangheng Road, Pudong New Area pilot Free Trade Zone, Shanghai

Applicant after: Shanghai Shangxiang Network Technology Co.,Ltd.

Address before: 201306, N2025 building, 24 building, Xincheng Road, 2 mud town, Shanghai, Pudong New Area

Applicant before: SHANGHAI LIANSHANG NETWORK TECHNOLOGY Co.,Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant