CN107040965B - Flow control method and device and mobile terminal - Google Patents
Flow control method and device and mobile terminal Download PDFInfo
- Publication number
- CN107040965B CN107040965B CN201710326138.4A CN201710326138A CN107040965B CN 107040965 B CN107040965 B CN 107040965B CN 201710326138 A CN201710326138 A CN 201710326138A CN 107040965 B CN107040965 B CN 107040965B
- Authority
- CN
- China
- Prior art keywords
- mobile terminal
- type
- determining
- connection
- network
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W28/00—Network traffic management; Network resource management
- H04W28/02—Traffic management, e.g. flow control or congestion control
- H04W28/10—Flow control between communication endpoints
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Mobile Radio Communication Systems (AREA)
- Telephone Function (AREA)
Abstract
The invention provides a flow control method, a flow control device and a mobile terminal, wherein the method comprises the following steps: when the mobile terminal is detected to be connected with an Access Point (AP), judging the type of the AP; when the type of the AP is a personal hotspot, the network connection type of the mobile terminal is set as mobile data, so that flow control can be realized quickly and conveniently, and the use experience of a user is enhanced.
Description
Technical Field
The present invention relates to the field of mobile terminal technologies, and in particular, to a flow control method and apparatus, and a mobile terminal.
Background
With the rapid development of mobile terminal technology, the mobile terminal can have the functions of a shared network such as a personal hotspot besides being connected to a routing wireless network, and the functions include: bluetooth sharing, personal WLAN hotspot sharing, etc. So that other mobile terminals can access the shared wireless network provided by the mobile terminal under the condition that the other mobile terminals can not be connected to the network.
However, in the WLAN environment, most applications of the mobile terminal automatically initiate some massive interactions, including: the system is silent to upgrade, version update, automatic download and play of files and videos, and when in a mobile data connection state, under a 3G/4G/5G high-speed mobile network, the default data interaction behavior can cause a large amount of mobile data traffic in a short time without being known, so that a large amount of traffic cost is brought to a mobile terminal user.
At present, in a shared wireless network provided by a mobile terminal, a method of limiting the number of connection terminals and limiting flow is generally adopted to control flow, so that the operation is complicated, and the user experience is poor.
Disclosure of Invention
The embodiment of the invention provides a flow control method, a flow control device and a mobile terminal, and aims to solve the problems that in the prior art, the flow control is carried out by a method for limiting the number of connected terminals and limiting the flow, the operation is complicated, and the user experience is poor.
In a first aspect, an embodiment of the present invention provides a flow control method, which is applied to a mobile terminal, and the method includes:
when the mobile terminal is detected to be connected with an Access Point (AP), judging the type of the AP;
and when the type of the AP is the personal hotspot, setting the network connection type of the mobile terminal as mobile data.
In a second aspect, an embodiment of the present invention further provides a flow control device, including:
the wireless network type judging module is used for judging the type of the AP when the mobile terminal is detected to be connected with the AP;
and the mobile data setting module is used for setting the network connection type of the mobile terminal as mobile data when the type of the AP is a personal hotspot.
In this way, in the embodiment of the present invention, when it is detected that the mobile terminal is connected to an AP, the type of the AP is determined; when the type of the AP is a personal hotspot, the network connection type of the mobile terminal is set as mobile data, so that flow control can be realized quickly and conveniently, and the use experience of a user is enhanced.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments of the present invention will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without inventive labor.
Fig. 1 is a flowchart illustrating a flow control method according to a first embodiment of the present invention;
fig. 2 is a flowchart illustrating a flow control method according to a second embodiment of the present invention;
fig. 2A is a schematic diagram of a dialog box for prompting a user to manually select a network connection manner according to a second embodiment of the present invention;
fig. 2B is a schematic diagram illustrating TCP connection establishment according to a second embodiment of the present invention;
fig. 2C is a schematic diagram illustrating IP address and gateway differences of different network types in the second embodiment of the present invention;
fig. 3 is a block diagram showing a flow control apparatus according to a third embodiment of the present invention;
fig. 4 is a block diagram showing a flow control apparatus according to a third embodiment of the present invention;
fig. 5 is a block diagram illustrating a mobile terminal according to a fourth embodiment of the present invention;
fig. 6 is a schematic structural diagram of a mobile terminal according to a fifth embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
Example one
Referring to fig. 1, a flowchart of a flow control method according to a first embodiment of the present invention is shown, which may specifically include the following steps:
and step 110, when the mobile terminal is detected to be connected with an access point AP, judging the type of the AP.
In the embodiment of the invention, when the mobile terminal is connected with the wireless network for the first time, the network name is manually selected, and the connection is further established, wherein a password or other identity authentication steps are required to be input, the wireless network type generally comprises wireless routing connection and wireless hotspot connection, and the mobile terminal can set a mode for detecting the wireless network connection and automatically determine the network connection type through user feedback.
And step 120, when the type of the AP is a personal hotspot, setting the network connection type of the mobile terminal as mobile data.
In the embodiment of the present invention, after the network connection type is determined, the downloading or updating operation of each network connection application on the mobile terminal is controlled according to whether the wireless connection mode is a routing connection or a hotspot link connection, and of course, in actual applications, the flow control policy for each application may also be specified according to specific applications and user requirements, which are not completely uniform, and it may also be determined according to manual settings of a user which applications are prohibited from being downloaded or updated under the hotspot connection, and which applications may normally use the downloading and updating functions, which is not limited in the embodiment of the present invention.
In the embodiment of the invention, when the mobile terminal is detected to be connected with a wireless network, the type of the wireless network is judged; and when the type of the wireless network is wireless hotspot connection, setting the network connection type of the mobile terminal as mobile data. The method has the advantages of quickly and conveniently realizing flow control and enhancing the use experience of users.
Example two
Referring to fig. 2, a flowchart of a flow control method according to a second embodiment of the present invention is shown, which may specifically include the following steps:
and step 210, when the mobile terminal is detected to be connected with the wireless network, displaying a network type interface.
In the embodiment of the present invention, when the user selects a wireless network to establish a connection, a dialog box pops up on the display interface of the mobile terminal, wherein the user can select the connection type of the current network to be detected, for example, the dialog box diagram shown in fig. 2A, and the user determines the network connection type by clicking the selection.
In the embodiment of the invention, when the mobile terminal is connected with the wireless network for the first time, the network name is manually selected, and the connection is further established, wherein a password or other identity authentication steps are required to be input.
In practical applications, as described with reference to fig. 2A, when the user clicks on the selection of the type of network connection in the pop-up dialog, the connection type of the wireless network is determined.
Of course, the way that the user selects the network type does not necessarily need to be in the form of a pop-up dialog box, and the detected wireless network may be marked, and the wireless network connection type may be actively determined in any way, which is not limited in the embodiment of the present invention. Therefore, the wireless network connection mode is judged manually by the user, and the method is simple and easy to implement.
Preferably, in another embodiment of the present invention, the method further comprises:
step A201, when detecting that the mobile terminal is connected with the AP, initiating a connection request to the AP according to the IP address and the port information of the AP.
In the embodiment of the invention, when the current wireless network connection mode is autonomously judged by a mobile terminal, under the condition that a user does not perform any manual intervention, taking an android system as an example, a relationship between a client and a server is added on a Framework layer, wherein the server represents a host initiating wireless network hotspot sharing, and the client represents a slave connecting to a wireless network, so that the network connection type can be judged by the connection attribute of the host, wherein an interaction Protocol can be preset between the slave and the host, and can follow a Transmission Control Protocol (TCP) Transmission Protocol, specifically, after a personal hotspot is started by the mobile terminal, the mobile terminal becomes a wireless Access Point (AP), a Transmission Control Protocol server (TCP client) process is started, a fixed port such as 3333 is set, and after the STA (Station, terminal) is accessed, a TCP client is started, and initiating a TCP connection according to the obtained IP address of the AP and the TCP server port.
Step A202, if the connection is successful, determining that the AP is a personal hotspot; otherwise, determining that the AP is not a personal hotspot.
In the embodiment of the present invention, as described in fig. 2B, first, the STA initiates a request, and after a three-way handshake protocol, if a client of the STA successfully connects to a server of the AP, the STA considers that a network shared by a personal hotspot is accessed. If the client connection of the STA is overtime, the accessed AP is not a personal hotspot but a router.
Certainly, in practical applications, the preset interaction protocol between the slave unit and the master unit is not limited to the TCP protocol described above, and may be any network data interaction connection protocol, which is not limited in this embodiment of the present invention.
In practical application, according to a preset protocol and a preset rule, if sending a connection request fails, an accessed wireless network is considered to be a router instead of a hot spot, and certainly, the preset rule can be adjusted according to user requirements, for example, if the connection fails, the wireless network is considered to be a hot spot, and the connection success is a route.
Preferably, in another embodiment of the present invention, the method further comprises:
step B201, obtaining the IP address and the gateway of the AP.
In the embodiment of the present invention, taking the android system as an example, the IP address and the gateway to be acquired from the current connection network may be acquired through a function getwayIpS ═ long2IP () and a function netmaskIpS ═ long2IP (). Of course, the method for acquiring the IP address and the gateway is not limited to the above description, and the embodiment of the present invention does not limit this.
Step B202, if the second low order of the IP address is greater than a first preset threshold value and the second low order of the gateway is greater than a second preset threshold value, determining that the AP is a personal hotspot.
In the embodiment of the present invention, the second lower order bits in the IP of most routers are smaller numbers, such as 192.168.0.1 or 192.168.1.1. In order to distinguish between individual hotspots and routers, terminal manufacturers set the values of the second lowest bits of the IP and the gateway to be relatively large, for example: 192.168.43.1. therefore, the WIFI connection type is determined by determining whether the second lower bit of the gateway is greater than or equal to the threshold (it seems that the threshold is set to be 2), as shown in fig. 2C, the IP address and the gateway are different under different network connection types.
In practical application, if the threshold of the second low value of the IP address and the gateway is set to 2, when the second low value of the IP address and the gateway is not greater than 2, it is determined that the network connection type is the wireless routing connection.
In the embodiment of the present invention, when determining that the current AP type is a personal hotspot according to the description method in the above step, the wireless network connection type of the current mobile terminal is set as mobile data, and the connection type is sent to each application through a preset interface, so that each application is notified to start a corresponding flow control mode.
In practical application, for an application installed on a mobile terminal, WIFI connection status is queried intermittently, specifically, by mainly querying an API of WIFI connection status, taking android as an example, a function onnmanager.getnetworklnfo (connectitvommanager.type _ WIFI). isConnect () is used to modify an existing interface without adding a network query interface, and obtain a connection status and a connection type of a current network, where a connection type of a network may be obtained by presetting a whole variable, for example, 0 indicates that a connection mode is hotspot connection, 1 indicates routing connection, and a network connection type is obtained by obtaining a variable value.
In practical application, after the mobile terminal detects the network connection type, the mobile terminal may also notify the connection types of all APPs of the current network in a manner of sending a message to an interface where each APP queries wifi connection types, so that each APP adjusts the flow control policy according to the preset.
And step 240, closing the automatic updating function and the automatic downloading function of the application program in the mobile terminal.
In the embodiment of the present invention, according to the method described in the above steps, if it is determined that the type of the wireless network is the hotspot connection, the automatic update and automatic download functions of the application having the network data transmission permission on the mobile terminal are closed.
In the embodiment of the invention, the selection operation of the network type when the user is connected in the wireless network is received; and determining the network type connected with the mobile terminal according to the selection operation. Or judging whether the connection request is successfully initiated by judging the IP address and the port information of the wireless hotspot starting end, and determining the connection type of the intangible network; and the IP address and the gateway of the current wireless network connection can be acquired, and whether the second low value of the gateway is greater than a preset threshold value or not is judged to determine the type of the wireless network connection. The method has the advantages of automatically identifying whether the wireless network connection type is a personal hotspot type or a router type and selecting a flow control method for a user.
EXAMPLE III
Referring to fig. 3, a block diagram of a flow control device according to a third embodiment of the present invention is shown.
The mobile terminal 300 includes: a wireless network type judging module 301 and a mobile data setting module 302.
Referring to fig. 4, the functions of the modules of the mobile terminal 400 and the interaction relationship between the modules are described in detail below.
A wireless network type determining module 401, configured to determine the type of the AP when it is detected that the mobile terminal is connected to the AP.
Preferably, the wireless network type determining module 401 specifically includes:
a network type interface display sub-module 4011, configured to display a network type interface when it is detected that the mobile terminal is connected to a wireless network;
the network type determining sub-module 4012 is configured to, when a selection operation performed by a user on the network type interface is detected, determine the type of the AP according to the selection operation.
Preferably, in another embodiment of the present invention, the wireless network type determining module 401 further includes:
a connection request sub-module, configured to initiate a connection request to an AP according to an IP address and port information of the AP when it is detected that the mobile terminal is connected to the AP;
the hot spot connection determining submodule is used for determining the AP as a personal hot spot if the connection is successful; otherwise, determining that the AP is not a personal hotspot.
Preferably, in another embodiment of the present invention, the wireless network type determining module 401 further includes:
an IP address and gateway obtaining submodule for obtaining the IP address and gateway of the AP;
and the hotspot network determining submodule is used for determining that the AP is a personal hotspot if the second low order of the IP address is greater than a first preset threshold and the second low order value of the gateway is greater than a second preset threshold.
A mobile data setting module 402, configured to set a network connection type of the mobile terminal as mobile data when the type of the AP is a personal hotspot.
Preferably, the method further comprises the following steps:
and a flow control module 403, configured to close an automatic update function and an automatic download function of the application program in the mobile terminal.
In the embodiment of the invention, when the mobile terminal is detected to be connected with an Access Point (AP), the type of the AP is judged; and when the type of the AP is the personal hotspot, setting the network connection type of the mobile terminal as mobile data. Or judging whether the connection request is successfully initiated by judging the IP address and the port information of the wireless hotspot starting end, and determining the connection type of the intangible network; and the IP address and the gateway of the current wireless network connection can be acquired, and whether the second low value of the gateway is greater than a preset threshold value or not is judged to determine the type of the wireless network connection. After the network connection type is determined to be set as mobile data, the automatic updating function and the automatic downloading function of the application program in the mobile terminal are closed, and the method has the advantages of automatically identifying whether the wireless network connection type is a personal hotspot type or a router type and selecting a flow control method for a user.
Example four
Referring to fig. 5, a block diagram of a mobile terminal according to a fourth embodiment of the present invention is shown.
The mobile terminal 500 shown in fig. 5 includes: at least one processor 501, memory 502, at least one network interface 504 and user interface 503, and a photographing component 506. The various components in the mobile terminal 500 are coupled together by a bus system 505. It is understood that the bus system 505 is used to enable connection communications between these components. The bus system 505 includes a power bus, a control bus, and a status signal bus in addition to a data bus. For clarity of illustration, however, the various buses are labeled as bus system 505 in FIG. 5.
The user interface 503 may include, among other things, a display, a keyboard, or a pointing device (e.g., a mouse, trackball, touch pad, or touch screen, among others.
It is to be understood that the memory 502 in embodiments of the present invention may be either volatile memory or nonvolatile memory, or may include both volatile and nonvolatile memory. The non-volatile memory may be a Read-only memory (ROM), a programmable Read-only memory (PROM), an erasable programmable Read-only memory (erasabprom, EPROM), an electrically erasable programmable Read-only memory (EEPROM), or a flash memory. The volatile memory may be a Random Access Memory (RAM) which functions as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (staticiram, SRAM), dynamic random access memory (dynamic RAM, DRAM), synchronous dynamic random access memory (syncronous DRAM, SDRAM), Double Data Rate Synchronous Dynamic Random Access Memory (DDRSDRAM), Enhanced synchronous SDRAM (ESDRAM), synchronous link SDRAM (SLDRAM), and direct memory bus SDRAM (DRRAM). The memory 502 of the subject systems and methods described in connection with the embodiments of the invention is intended to comprise, without being limited to, these and any other suitable types of memory.
In some embodiments, memory 502 stores elements, executable modules or data structures, or a subset thereof, or an expanded set thereof as follows: an operating system 5021 and application programs 5022.
The operating system 5021 includes various system programs, such as a framework layer, a core library layer, a driver layer, and the like, and is used for implementing various basic services and processing hardware-based tasks. The application 5022 includes various applications, such as a media player (MediaPlayer), a Browser (Browser), and the like, for implementing various application services. The program for implementing the method according to the embodiment of the present invention may be included in the application program 5022.
In the embodiment of the present invention, by calling a program or an instruction stored in the memory 502, specifically, a program or an instruction stored in the application 5022, the processor 501 is configured to determine the type of the AP when detecting that the mobile terminal is connected to the AP; and when the type of the AP is the personal hotspot, setting the network connection type of the mobile terminal as mobile data. The method disclosed by the above-mentioned embodiments of the present invention may be applied to the processor 501, or implemented by the processor 501. The processor 501 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 501. The processor 501 may be a general-purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, or discrete hardware components. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in the memory 502, and the processor 501 reads the information in the memory 502 and completes the steps of the method in combination with the hardware.
It is to be understood that the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or any combination thereof. For a hardware implementation, the processing units may be implemented within one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), general purpose processors, controllers, micro-controllers, microprocessors, other electronic units configured to perform the functions described herein, or a combination thereof.
For a software implementation, the techniques described in this disclosure may be implemented with modules (e.g., procedures, functions, and so on) that perform the functions described in this disclosure. The software codes may be stored in a memory and executed by a processor. The memory may be implemented within the processor or external to the processor.
Optionally, when detecting that the mobile terminal is connected to an AP, and determining the type of the AP, the processor 501 is further configured to: when the mobile terminal is detected to be connected with a wireless network, displaying a network type interface; and when the selection operation executed by the user on the network type interface is detected, determining the type of the AP according to the selection operation.
Optionally, when detecting that the mobile terminal is connected to an AP and determining the type of the AP, the processor 501 is further configured to: when detecting that the mobile terminal is connected with an AP, initiating a connection request to the AP according to the IP address and the port information of the AP; if the connection is successful, determining the AP as a personal hotspot; otherwise, determining that the AP is not a personal hotspot.
Optionally, when detecting that the mobile terminal is connected to an AP and determining the type of the AP, the processor 501 is further configured to: acquiring an IP address and a gateway of the AP; and if the second low order of the IP address is greater than a first preset threshold value and the second low order of the gateway is greater than a second preset threshold value, determining that the AP is a personal hotspot.
Optionally, the processor 501, after setting the network connection type of the mobile terminal as mobile data when the type of the AP is a personal hotspot, is further configured to: and closing the automatic updating function and the automatic downloading function of the application program in the mobile terminal.
Therefore, in the embodiment of the invention, when the mobile terminal is detected to be connected with the AP, the type of the AP is judged; and when the type of the AP is the personal hotspot, setting the network connection type of the mobile terminal as mobile data. Or judging whether the data transmission service request is successful or not by judging the IP address and the port information of the wireless hotspot starting end, and determining the connection type of the intangible network; and the IP address and the gateway of the current wireless network connection can be acquired, and whether the second low value of the gateway is greater than a preset threshold value or not is judged to determine the type of the wireless network connection. After the network connection type is determined to be set as mobile data, the automatic updating function and the automatic downloading function of the application program in the mobile terminal are closed, and the method has the advantages of automatically identifying whether the wireless network connection type is a personal hotspot type or a router type and selecting a flow control method for a user.
EXAMPLE five
Fig. 6 shows a schematic structural diagram of a mobile terminal according to a fifth embodiment of the present invention.
The mobile terminal of the embodiment of the invention can be a mobile phone, a tablet computer, a Personal Digital Assistant (PDA), or a vehicle-mounted computer.
The mobile terminal in fig. 6 includes a Radio Frequency (RF) circuit 610, a memory 620, an input unit 630, a display unit 640, a processor 660, an audio circuit 670, a wifi (wireless fidelity) module 680, and a power supply 690.
The input unit 630 may be used, among other things, to receive numeric or character information input by a user and to generate signal inputs related to user settings and function control of the mobile terminal 600. Specifically, in the embodiment of the present invention, the input unit 630 may include a touch panel 631. The touch panel 631, also referred to as a touch screen, may collect touch operations of a user (e.g., operations of the user on the touch panel 631 by using a finger, a stylus, or any other suitable object or accessory) thereon or nearby, and drive the corresponding connection device according to a preset program. Alternatively, the touch panel 631 may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 660, and can receive and execute commands sent by the processor 660. In addition, the touch panel 631 may be implemented using various types, such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch panel 631, the input unit 630 may also include other input devices 632, and the other input devices 632 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
Among other things, the display unit 640 may be used to display information input by a user or information provided to the user and various menu interfaces of the mobile terminal 600. The display unit 640 may include a display panel 641, and optionally, the display panel 641 may be configured in the form of an LCD or an organic light-emitting diode (OLED).
It should be noted that the touch panel 631 may cover the display panel 641 to form a touch display screen, and when the touch display screen detects a touch operation thereon or nearby, the touch display screen is transmitted to the processor 660 to determine the type of the touch event, and then the processor 660 provides a corresponding visual output on the touch display screen according to the type of the touch event.
The touch display screen comprises an application program interface display area and a common control display area. The arrangement modes of the application program interface display area and the common control display area are not limited, and can be an arrangement mode which can distinguish two display areas, such as vertical arrangement, left-right arrangement and the like. The application interface display area may be used to display an interface of an application. Each interface may contain at least one interface element such as an icon and/or widget desktop control for an application. The application interface display area may also be an empty interface that does not contain any content. The common control display area is used for displaying controls with high utilization rate, such as application icons like setting buttons, interface numbers, scroll bars, phone book icons and the like.
The processor 660 is a control center of the mobile terminal 600, connects various parts of the entire mobile phone by using various interfaces and lines, and performs various functions of the mobile terminal 600 and processes data by operating or executing software programs and/or modules stored in the first memory 621 and calling data stored in the second memory 622, thereby integrally monitoring the mobile terminal 600. Optionally, processor 660 may include one or more processing units.
In the embodiment of the present invention, the processor 660 is configured to determine the type of the AP when detecting that the mobile terminal is connected to the AP by invoking a software program and/or a module stored in the first memory 621 and/or data stored in the second memory 622; and when the type of the AP is the personal hotspot, setting the network connection type of the mobile terminal as mobile data.
Optionally, when detecting that the mobile terminal is connected to an AP and determining the type of the AP, the processor 660 is further configured to: when the mobile terminal is detected to be connected with a wireless network, displaying a network type interface; and when the selection operation executed by the user on the network type interface is detected, determining the type of the AP according to the selection operation.
Optionally, when detecting that the mobile terminal is connected to an AP and determining the type of the AP, the processor 660 is further configured to: when detecting that the mobile terminal is connected with an AP, initiating a connection request to the AP according to the IP address and the port information of the AP; if the connection is successful, determining the AP as a personal hotspot; otherwise, determining that the AP is not a personal hotspot.
Optionally, when detecting that the mobile terminal is connected to an AP and determining the type of the AP, the processor 660 is further configured to: acquiring an IP address and a gateway of the AP; and if the second low order of the IP address is greater than a first preset threshold value and the second low order of the gateway is greater than a second preset threshold value, determining that the AP is a personal hotspot.
Optionally, the processor 660, after setting the network connection type of the mobile terminal as mobile data when the AP type is a personal hotspot, is further configured to: and closing the automatic updating function and the automatic downloading function of the application program in the mobile terminal.
Therefore, in the embodiment of the invention, when the mobile terminal is detected to be connected with the AP, the type of the AP is judged; and when the type of the AP is the personal hotspot, setting the network connection type of the mobile terminal as mobile data. Or judging whether the data transmission service request is successful or not by judging the IP address and the port information of the wireless hotspot starting end, and determining the connection type of the intangible network; and the IP address and the gateway of the current wireless network connection can be acquired, and whether the second low value of the gateway is greater than a preset threshold value or not is judged to determine the type of the wireless network connection. After the network connection type is determined to be set as mobile data, the automatic updating function and the automatic downloading function of the application program in the mobile terminal are closed, and the method has the advantages of automatically identifying whether the wireless network connection type is a personal hotspot type or a router type and selecting a flow control method for a user.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
The algorithms and displays presented herein are not inherently related to any particular computer, virtual machine, or other apparatus. Various general purpose systems may also be used with the teachings herein. The required structure for constructing such a system will be apparent from the description above. Moreover, the present invention is not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and any descriptions of specific languages are provided above to disclose the best mode of the invention.
In the description provided herein, numerous specific details are set forth. It is understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.
The various component embodiments of the invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art will appreciate that a microprocessor or Digital Signal Processor (DSP) may be used in practice to implement embodiments in accordance with the inventionShootingSome or all of the functions of some or all of the components in the device. The present invention may also be embodied as apparatus or device programs (e.g., computer programs and computer program products) for performing a portion or all of the methods described herein. Such programs implementing the present invention may be stored on computer-readable media or may be in the form of one or more signals. Such a signal may be downloaded from an internet website or provided on a carrier signal or in any other form.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a U disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims (6)
1. A flow control method is applied to a mobile terminal, and is characterized by comprising the following steps:
when the mobile terminal is detected to be connected with an Access Point (AP), judging the type of the AP;
when the type of the AP is a personal hotspot, setting the network connection type of the mobile terminal as mobile data;
wherein, after the step of setting the network connection type of the mobile terminal as the mobile data when the type of the AP is the personal hotspot, the method further includes:
closing an automatic updating function and an automatic downloading function of the application program in the mobile terminal;
wherein, when detecting that the mobile terminal is connected with an AP, the step of determining the type of the AP includes:
when detecting that the mobile terminal is connected with an AP, initiating a connection request to the AP according to the IP address and the port information of the AP;
if the connection is successful, determining the AP as a personal hotspot; otherwise, determining that the AP is not a personal hotspot.
2. The method according to claim 1, wherein the step of determining the type of the AP when detecting that the mobile terminal is connected to the AP comprises:
when the mobile terminal is detected to be connected with a wireless network, displaying a network type interface;
and when the selection operation executed by the user on the network type interface is detected, determining the type of the AP according to the selection operation.
3. The method according to claim 1, wherein the step of determining the type of the AP when detecting that the mobile terminal is connected to the AP comprises:
acquiring an IP address and a gateway of the AP;
and if the second low order of the IP address is greater than a first preset threshold value and the second low order of the gateway is greater than a second preset threshold value, determining that the AP is a personal hotspot.
4. A flow control device applied to a mobile terminal is characterized by comprising:
the wireless network type judging module is used for judging the type of the AP when the mobile terminal is detected to be connected with the AP;
the mobile data setting module is used for setting the network connection type of the mobile terminal as mobile data when the type of the AP is a personal hotspot;
wherein the apparatus further comprises:
the flow control module is used for closing the automatic updating function and the automatic downloading function of the application program in the mobile terminal;
the wireless network type judging module comprises:
a connection request sub-module, configured to initiate a connection request to an AP according to an IP address and port information of the AP when it is detected that the mobile terminal is connected to the AP;
the hot spot connection determining submodule is used for determining the AP as a personal hot spot if the connection is successful; otherwise, determining that the AP is not a personal hotspot.
5. The apparatus of claim 4, wherein the wireless network type determining module comprises:
the network type interface display submodule is used for displaying a network type interface when the mobile terminal is detected to be connected with a wireless network;
and the network type determining submodule is used for determining the type of the AP according to the selection operation when the selection operation executed by the user on the network type interface is detected.
6. The apparatus of claim 4, wherein the wireless network type determining module comprises:
an IP address and gateway obtaining submodule for obtaining the IP address and gateway of the AP;
and the hotspot network determining submodule is used for determining that the AP is a personal hotspot if the second low order of the IP address is greater than a first preset threshold and the second low order value of the gateway is greater than a second preset threshold.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710326138.4A CN107040965B (en) | 2017-05-10 | 2017-05-10 | Flow control method and device and mobile terminal |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710326138.4A CN107040965B (en) | 2017-05-10 | 2017-05-10 | Flow control method and device and mobile terminal |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107040965A CN107040965A (en) | 2017-08-11 |
CN107040965B true CN107040965B (en) | 2020-05-05 |
Family
ID=59537588
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710326138.4A Active CN107040965B (en) | 2017-05-10 | 2017-05-10 | Flow control method and device and mobile terminal |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107040965B (en) |
Families Citing this family (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107493243A (en) * | 2017-08-25 | 2017-12-19 | 海南智媒云图科技股份有限公司 | The method and device that a kind of fixed network and focus WIFI is distinguished |
CN107734471A (en) * | 2017-09-30 | 2018-02-23 | 上海爱优威软件开发有限公司 | Flow uses based reminding method and network mode querying method |
CN109327865B (en) * | 2018-11-21 | 2022-02-18 | Oppo(重庆)智能科技有限公司 | Network sharing method and network sharing device |
CN109743745B (en) * | 2019-02-19 | 2021-01-22 | 北京三快在线科技有限公司 | Mobile network access type identification method and device, electronic equipment and storage medium |
CN110337136A (en) * | 2019-06-18 | 2019-10-15 | 特斯联(北京)科技有限公司 | It is connected to the network strategy adjusting method, device, equipment and storage medium |
CN111726849B (en) * | 2020-06-29 | 2022-07-08 | 西安易朴通讯技术有限公司 | WiFi hotspot type identification method and device and storage medium |
CN114173338A (en) * | 2020-09-10 | 2022-03-11 | 宇龙计算机通信科技(深圳)有限公司 | Control method and device of wireless access point, storage medium and terminal |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104185294A (en) * | 2014-08-04 | 2014-12-03 | 广东欧珀移动通信有限公司 | Identification method and identification apparatus of mobile phone hot spots |
CN105007602A (en) * | 2015-07-16 | 2015-10-28 | 福建天晴数码有限公司 | Method for flow control of mobile terminal and flow control mobile terminal |
CN105451269A (en) * | 2014-07-04 | 2016-03-30 | 阿里巴巴集团控股有限公司 | Wireless internet access traffic control method and device |
CN106255086A (en) * | 2015-11-18 | 2016-12-21 | 小米科技有限责任公司 | A kind of method and device controlling network data transmission |
CN106302824A (en) * | 2016-10-31 | 2017-01-04 | 努比亚技术有限公司 | wireless WiFi control method, device and mobile terminal |
CN106358237A (en) * | 2016-11-10 | 2017-01-25 | 捷开通讯(深圳)有限公司 | Mobile terminal and traffic sharing control method thereof |
CN106413003A (en) * | 2016-11-30 | 2017-02-15 | 惠州Tcl移动通信有限公司 | Flow control method and system of mobile terminal in connection to wireless hotspot |
-
2017
- 2017-05-10 CN CN201710326138.4A patent/CN107040965B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105451269A (en) * | 2014-07-04 | 2016-03-30 | 阿里巴巴集团控股有限公司 | Wireless internet access traffic control method and device |
CN104185294A (en) * | 2014-08-04 | 2014-12-03 | 广东欧珀移动通信有限公司 | Identification method and identification apparatus of mobile phone hot spots |
CN105007602A (en) * | 2015-07-16 | 2015-10-28 | 福建天晴数码有限公司 | Method for flow control of mobile terminal and flow control mobile terminal |
CN106255086A (en) * | 2015-11-18 | 2016-12-21 | 小米科技有限责任公司 | A kind of method and device controlling network data transmission |
CN106302824A (en) * | 2016-10-31 | 2017-01-04 | 努比亚技术有限公司 | wireless WiFi control method, device and mobile terminal |
CN106358237A (en) * | 2016-11-10 | 2017-01-25 | 捷开通讯(深圳)有限公司 | Mobile terminal and traffic sharing control method thereof |
CN106413003A (en) * | 2016-11-30 | 2017-02-15 | 惠州Tcl移动通信有限公司 | Flow control method and system of mobile terminal in connection to wireless hotspot |
Also Published As
Publication number | Publication date |
---|---|
CN107040965A (en) | 2017-08-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107040965B (en) | Flow control method and device and mobile terminal | |
CN106304276B (en) | A kind of wireless network processing method and mobile terminal | |
JP6588017B2 (en) | Seamless call transition | |
CN107171874B (en) | Voice engine switching method, mobile terminal and server | |
WO2018082542A1 (en) | Method for configuring discontinuous reception parameter, mobile terminal and base station | |
CN106095250B (en) | Application icon layout method and mobile terminal | |
CN106998367A (en) | A kind of document down loading method and mobile terminal | |
CN108139915B (en) | Operation method of application program group and terminal | |
JP6306606B2 (en) | File sharing method, apparatus and mobile device | |
US20130045715A1 (en) | Method for Transmitting Files and Receiving Files Based on Mobile Terminals, and Mobile Terminal | |
CN107566622B (en) | Temperature control method and mobile terminal | |
US9258841B2 (en) | Method of reducing a waiting time when cancelling a connection and an electronic device therefor | |
WO2015032249A1 (en) | Method, system, device and terminal for network initialization of multimedia playing device | |
CN107333325B (en) | Network searching method and mobile terminal | |
CN105868617B (en) | Application program encryption method and mobile terminal | |
JP2014503926A (en) | Apparatus and method for providing automatic application installation function in digital device | |
WO2020168561A1 (en) | Device network distribution method and apparatus, electronic device, and storage medium | |
JP2017501517A (en) | Method, apparatus, and system for pushing an application program, and device | |
US9686819B2 (en) | Methods, devices and systems for router access control | |
CN106250146B (en) | Application demand processing method and device | |
US20140282058A1 (en) | Electronic device with a funiction of applying applications of different operating systems, system and method thereof | |
US10757692B2 (en) | Method for determining network standard in wireless communications network, access point device, terminal device, and radio network controller | |
CN107124713B (en) | Customized updating method and mobile terminal | |
JP2019523941A (en) | Data access method and associated device | |
CN107659716B (en) | Resource sharing method and mobile terminal |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |