WO2018076613A1 - 无线网络连接的流量控制方法、装置及可读取存储介质 - Google Patents

无线网络连接的流量控制方法、装置及可读取存储介质 Download PDF

Info

Publication number
WO2018076613A1
WO2018076613A1 PCT/CN2017/079590 CN2017079590W WO2018076613A1 WO 2018076613 A1 WO2018076613 A1 WO 2018076613A1 CN 2017079590 W CN2017079590 W CN 2017079590W WO 2018076613 A1 WO2018076613 A1 WO 2018076613A1
Authority
WO
WIPO (PCT)
Prior art keywords
address
mac address
current
wireless network
file
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.)
Ceased
Application number
PCT/CN2017/079590
Other languages
English (en)
French (fr)
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.)
Wuhan Douyu Network Technology Co Ltd
Original Assignee
Wuhan Douyu 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 Wuhan Douyu Network Technology Co Ltd filed Critical Wuhan Douyu Network Technology Co Ltd
Publication of WO2018076613A1 publication Critical patent/WO2018076613A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • 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/16Discovering, processing access restriction or access information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W84/00Network topologies
    • H04W84/02Hierarchically pre-organised networks, e.g. paging networks, cellular networks, WLAN [Wireless Local Area Network] or WLL [Wireless Local Loop]
    • H04W84/10Small scale networks; Flat hierarchical networks
    • H04W84/12WLAN [Wireless Local Area Networks]

Definitions

  • the present invention relates to the field of mobile terminal technologies, and in particular, to a flow control method and apparatus for wireless network connection.
  • WIFI Wireless Fidelity
  • users can connect without anytime and anywhere.
  • WIFI Wireless Fidelity
  • users cannot connect to the Internet through WIFI; at the same time, with the rapid development of mobile Internet technology, when the user is in an environment without WIFI signals, it can be connected through a mobile network (for example, 3G/4G network) on the mobile terminal.
  • the Internet enables online access to network resources anytime and anywhere.
  • the tablet does not have the function of directly connecting to the mobile network.
  • the user converts the mobile network received by the device connected to the mobile network (for example, a smart phone) into a WIFI signal and then transmits it.
  • the WIFI signal is connected to the tablet Therefore, the tablet computer can realize online access to network resources.
  • the WIFI type of the wireless network connected to the tablet computer is a WIFI hotspot wireless network, and the smart phone is used as a WIFI hotspot.
  • the traffic consumed by the tablet computer to obtain network resources online is derived from the smart phone. Mobile network traffic.
  • the WIFI type is WIFI hotspot wireless network or ordinary WIFI solution.
  • the inventors have found that at least the following problems exist in the related art: related technologies It is impossible to quickly and accurately identify that the connected wireless network is a WIFI hotspot wireless network shared by the mobile terminal through the mobile network, or an ordinary WIFI transmitted by an ordinary router, so that the WIFI hotspot wireless network and the ordinary WIFI cannot be distinguished.
  • the user terminal When the user terminal is connected to the WIFI hotspot wireless network, the user terminal will consume a large amount of mobile traffic when connecting the to-be-accessed object with a large amount of traffic, which greatly increases the cost required for the user to access the network resource.
  • an object of the embodiments of the present invention is to provide a method and a device for controlling a traffic of a wireless network connection, so as to quickly and accurately identify a WIFI hotspot wireless network, and limit access to the WIFI hotspot wireless network. Therefore, it avoids a large amount of mobile traffic due to connecting a large amount of traffic to be accessed, thereby effectively reducing the cost required for the user to access the network resource.
  • an embodiment of the present invention provides a flow control method for a wireless network connection, where the method includes:
  • the current MAC address is consistent with any one of the address files, determining that the wireless network provided by the current network device is a WIFI hotspot wireless network, and performing access traffic on the current to-be-accessed object that meets the preset condition. Limit or display the corresponding prompt information;
  • the current MAC address is inconsistent with all the MAC addresses in the address file, it is determined that the wireless network provided by the current network device is a normal wireless network, and no access traffic restriction is performed on the current to-be-accessed object.
  • the embodiment of the present invention provides a first possible implementation manner of the first aspect, where the performing the traffic restriction on the current to-be-accessed object that meets the preset condition or displaying the corresponding prompt information includes:
  • the embodiment of the present invention provides a second possible implementation manner of the first aspect, where
  • the storing the plurality of the MAC addresses into an address file includes:
  • the method further includes:
  • the embodiment of the present invention provides a third possible implementation manner of the first aspect, wherein the remote address file includes a local address file to provide WIFI hotspot wireless The MAC address of the plurality of network devices of the network, and the MAC addresses of the plurality of other network devices providing the WIFI hotspot wireless network in addition to the MAC address in the local address file.
  • the embodiment of the present invention provides a fourth possible implementation manner of the first aspect, wherein the searching for the address file includes whether the current MAC address is included Keys, including:
  • the embodiment of the present invention provides the fifth possible implementation manner of the first aspect, wherein the method further includes:
  • the searching for the key in the address file that includes the current MAC address includes:
  • the embodiment of the present invention provides a sixth possible implementation manner of the first aspect, wherein the pre-acquiring the MAC addresses of the multiple network devices that provide the WIFI hotspot wireless network includes:
  • the embodiment of the present invention provides a seventh possible implementation manner of the first aspect, wherein the storing the plurality of the MAC addresses in an address file includes:
  • the MAC address is submitted and the MAC address is written to a local address file.
  • the embodiment of the present invention further provides a flow control device for wireless network connection, where the device includes:
  • a MAC address storage module configured to pre-fetch a MAC address of a plurality of network devices that provide a WIFI hotspot wireless network, and store the plurality of the MAC addresses in an address file, where the address file includes a local address file and/or a far End address file;
  • the current MAC address obtaining module is configured to obtain a current MAC address of a current network device that currently provides the wireless network;
  • the first flow control module is configured to: when the current MAC address is consistent with any one of the address files, determine that the wireless network provided by the current network device is a WIFI hotspot wireless network, and meet predetermined conditions.
  • the current to-be-accessed object performs access traffic restriction or displays corresponding prompt information;
  • the second flow control module is configured to: when the current MAC address is inconsistent with all the MAC addresses in the address file, determine that the wireless network provided by the current network device is a normal wireless network, and the current to-be-accessed object No access traffic restrictions are made.
  • the embodiment of the present invention provides a first possible implementation manner of the second aspect, where the first flow control module includes:
  • the access traffic judging sub-unit is configured to determine whether the required access traffic of the current to-be-accessed object is greater than a preset threshold, and if yes, perform an access traffic restriction on the current to-be-accessed object or display corresponding prompt information.
  • the embodiment of the present invention provides a second possible implementation manner of the second aspect, where the MAC address storage module includes:
  • a MAC address storage submodule configured to store a plurality of the MAC addresses in an address file in a key-value pair, wherein the key in the key-value pair is the MAC address, and the value in the key-value pair is Non-null value;
  • the apparatus further includes a MAC address matching module configured to search for a key in the address file that includes the current MAC address.
  • the embodiment of the present invention provides a third possible implementation manner of the second aspect, wherein the remote address file includes a local address file to provide WIFI hotspot wireless The MAC address of the plurality of network devices of the network, and the MAC addresses of the plurality of other network devices providing the WIFI hotspot wireless network in addition to the MAC address in the local address file.
  • the embodiment of the present invention provides the fourth possible implementation manner of the second aspect, wherein the MAC address matching module includes:
  • a first determining submodule configured to determine whether a key including the current MAC address exists in the local address file
  • a first determining submodule configured to determine, when the local address file contains a key that includes the current MAC address, that the current MAC address is consistent with any one of the address files;
  • a second determining submodule configured to: when the local address file does not have a key that includes the current MAC address, send the current MAC address to a specified remote server, so that the remote server determines Whether there is a key containing the current MAC address in the address file of the remote end; when the determination result returned by the remote server is yes, determining the current MAC address and all MAC addresses in the address file Both are inconsistent.
  • the embodiment of the present invention provides a fifth possible implementation manner of the second aspect, wherein the device further includes:
  • An address file receiving module configured to receive the remote address file sent by the specified remote server
  • An address file update module configured to update the local address file according to the remote address file
  • the MAC address matching module includes:
  • a second determining submodule configured to determine whether a key including the current MAC address exists in the updated local address file
  • a third determining submodule configured to: when the updated local address file contains a key that includes the current MAC address, determine that the current MAC address is consistent with any one of the address files;
  • a fourth determining submodule configured to: when the updated local address file does not have a key that includes the current MAC address, determine that the current MAC address is inconsistent with all MAC addresses in the address file .
  • the MAC address storage module includes:
  • the MAC address obtaining submodule is configured to invoke the WIFI information object interface, and receive the network address obtaining function to return the MAC address of each network device that provides the WIFI hotspot wireless network.
  • the embodiment of the present invention provides the seventh possible implementation manner of the second aspect, wherein the MAC address storage module includes:
  • Calling a submodule configured to call a string storage function in the information editing interface, and storing the MAC address in the information editing interface;
  • the present invention also provides a readable storage medium stored in a computer, comprising a plurality of instructions configured to implement the flow control method of the wireless network connection described above.
  • the method includes: pre-acquiring a MAC address of multiple network devices that provide a WIFI hotspot wireless network, and multiple MAC addresses.
  • the information is stored in the address file; the current MAC address of the current network device that provides the wireless network is obtained; when the current MAC address is consistent with any of the MAC addresses in the address file, it is determined that the wireless network provided by the current network device is a WIFI hotspot wireless network.
  • the access traffic is restricted or the corresponding prompt information is displayed for the current to-be-accessed object that meets the preset condition.
  • the embodiment of the invention can quickly and accurately identify the WIFI hotspot wireless network, and limit the access traffic of the WIFI hotspot wireless network, thereby avoiding a large amount of mobile traffic due to connecting a large amount of traffic to be accessed, thereby effectively Reduce the cost of users accessing network resources.
  • FIG. 1 is a schematic flowchart diagram of a flow control method for a wireless network connection according to an embodiment of the present invention
  • FIG. 2 is a schematic flow chart of another flow control method for a wireless network connection according to an embodiment of the present invention.
  • FIG. 3 is a schematic structural diagram of a flow control apparatus for wireless network connection according to an embodiment of the present invention.
  • FIG. 4 is a schematic structural diagram of flow control of another wireless network connection according to an embodiment of the present invention.
  • the connected wireless network is a WIFI hotspot wireless network shared by the mobile terminal through the mobile network, or an ordinary WIFI transmitted by a common router, thereby failing to perform WIFI hotspot wireless network and ordinary WIFI.
  • the WIFI hotspot wireless network connected to the user terminal the user terminal will cause a large amount of mobile traffic to be connected when the user terminal connects to the large-access object to be accessed, which greatly increases the cost required for the user to access the network resource.
  • an embodiment of the present invention provides a flow control method and apparatus for a wireless network connection, which are described below by way of embodiments.
  • an embodiment of the present invention provides a flow control method for a wireless network connection, where the method may include steps S102-S108, as follows:
  • Step S102 pre-acquiring a MAC address of a plurality of network devices that provide a WIFI hotspot wireless network, and storing the plurality of MAC addresses in an address file, where the address file includes a local address file and/or a remote address file;
  • Step S104 Acquire a current MAC address of a current network device that currently provides a wireless network.
  • Step S106 When the current MAC address is consistent with any MAC address in the address file, determine that the wireless network provided by the current network device is a WIFI hotspot wireless network, and perform access traffic restriction or display on the current to-be-accessed object that meets the preset condition. Corresponding prompt information;
  • Step S108 When the current MAC address is inconsistent with all the MAC addresses in the address file, it is determined that the wireless network provided by the current network device is a normal wireless network, and the access traffic is not restricted for the current to-be-accessed object.
  • the execution body of the foregoing steps S102 to S108 may be a user terminal that does not have a mobile network (eg, 4G network) communication function, such as a tablet computer, and accesses network resources by connecting to a wireless network, where the wireless network It can be an ordinary wireless network (a wireless network provided by a router), or a WIFI hotspot wireless network (a wireless network in which a network device converts a mobile network into a WIFI signal and then transmits it), which is consumed by accessing network resources by using a WIFI hotspot wireless network. It is a mobile network traffic.
  • a mobile network eg, 4G network
  • the MAC address of the network device is utilized. Uniquely, by acquiring and storing the MAC addresses of a plurality of network devices providing the WIFI hotspot wireless network, and then, the current MAC address of the current network device currently providing the wireless network and the pre-stored multiple networks providing the WIFI hotspot wireless network. The MAC address of the device is matched, if Successful, it indicates that the wireless network is a Wi-Fi hotspot WIFI; then, according to the corresponding flow restriction processing mode related art mobile network in use of the radio access network resources.
  • pre-acquiring the MAC addresses of multiple network devices that provide the WIFI hotspot wireless network may be implemented by the following steps:
  • the WifiManager interface is obtained by the getSystemService(Context.WIFI_SERVICE) function, and the instance corresponding to the WifiManager interface is a wifiManager; the getConnectionInfo() function in the wifiManager is called, and the instance wifiInfo of the WifiInfo is received; and the getMacAddress in the wifiInfo is called. () function, and receive string type MAC address information macAddr;
  • the storing the multiple MAC addresses in the address file may include:
  • the MAC address is submitted and the MAC address is written to a local address file.
  • the method may further include:
  • PreferenceManager.getDefaultSharedPreferences(Context) function SharedPreferences storage interface, the corresponding instance of the SharedPreferences storage interface is sharedPreferences;
  • the commit function is called, and the MAC address of the hotspot WIFI stored in the edit interface editor is written into the corresponding local MAC address storage file.
  • the wireless network that is pre-marked as a WIFI hotspot needs to be changed to a normal wireless network.
  • the MAC address of the network device needs to be deleted from the address file (local The address file and the remote address file need to be deleted synchronously.
  • the network device determines that the wireless network provided by the network device is changed from a WIFI hotspot wireless network to a normal wireless network, deleting a MAC address of the network device from the local address file, and marking the MAC address as a normal wireless
  • the network sends to the designated remote server so that the remote server deletes the MAC address from the remote address file.
  • the method may include: pre-acquiring the MAC addresses of the plurality of network devices that provide the WIFI hotspot wireless network, and storing the plurality of MAC addresses in the address file; The current MAC address of the current network device of the wireless network; when the current MAC address is consistent with any of the MAC addresses in the address file, determining that the wireless network provided by the current network device is a WIFI hotspot wireless network, and waiting for a preset condition Access objects to access traffic restrictions or display corresponding prompts.
  • the embodiment of the invention can quickly and accurately identify the WIFI hotspot wireless network, and limit the access traffic of the WIFI hotspot wireless network, thereby avoiding a large amount of mobile traffic due to connecting a large amount of traffic to be accessed, thereby effectively Reduce the cost of users accessing network resources.
  • the embodiment of the invention further provides a flow control device for wireless network connection.
  • the device includes:
  • the MAC address storage module 302 is configured to acquire a plurality of network devices that provide a WIFI hotspot wireless network in advance. a standby MAC address, and storing the plurality of the MAC addresses in an address file, where the address file includes a local address file and/or a remote address file;
  • the current MAC address obtaining module 304 is configured to obtain a current MAC address of a current network device that currently provides a wireless network;
  • the first flow control module 306 is configured to: when the current MAC address is consistent with any one of the address files, determine that the wireless network provided by the current network device is a WIFI hotspot wireless network, and meet the preset The current pending object of the condition performs access traffic restriction or displays corresponding prompt information;
  • the second flow control module 308 is configured to: when the current MAC address is inconsistent with all the MAC addresses in the address file, determine that the wireless network provided by the current network device is a normal wireless network, and the current to-be-accessed Objects do not have access traffic restrictions.
  • first flow control module 306 can include:
  • the access traffic judging sub-unit is configured to determine whether the required access traffic of the current to-be-accessed object is greater than a preset threshold, and if yes, perform an access traffic restriction on the current to-be-accessed object or display corresponding prompt information.
  • the MAC address storage module 302 may include:
  • the MAC address storage sub-module 3022 is configured to pre-acquire the MAC addresses of the plurality of network devices that provide the WIFI hotspot wireless network, and store the plurality of the MAC addresses in the address file in the form of key-value pairs, the key-value pair The key in the key is the MAC address, and the value in the key value pair is a non-null value;
  • the device may further include: a MAC address matching module 402, configured to search whether a key including the current MAC address exists in the address file;
  • the first flow control module 306 may include: a first flow control sub-module 3062, configured to determine that the wireless network provided by the current network device is a WIFI hotspot wireless network when a key containing the current MAC address exists in the address file is found. And restricting the access traffic of the current to-be-accessed object that meets the preset condition or displaying corresponding prompt information;
  • the second flow control module 308 may include: a second flow control sub-module 3082, configured to determine that the wireless network provided by the current network device is a normal wireless network when a key that includes the current MAC address does not exist in the address file. No access traffic restriction is performed on the currently to-be-accessed object.
  • the remote address file includes the MAC address of a plurality of network devices that provide a WIFI hotspot wireless network in a local address file, and a WIFI hotspot wireless network other than the MAC address in the local address file.
  • the MAC address matching module may include:
  • a first determining submodule configured to determine whether a key including the current MAC address exists in the local address file
  • a first determining submodule configured to determine, when the local address file contains a key that includes the current MAC address, that the current MAC address is consistent with any one of the address files;
  • a second determining submodule configured to: when the local address file does not have a key that includes the current MAC address, send the current MAC address to a specified remote server, so that the remote server determines Whether there is a key containing the current MAC address in the address file of the remote end; when the determination result returned by the remote server is yes, determining the current MAC address and all MAC addresses in the address file Both are inconsistent.
  • the device may further include:
  • An address file receiving module configured to receive the remote address file sent by the specified remote server
  • An address file update module configured to update the local address file according to the remote address file
  • the MAC address matching module includes:
  • a second determining sub-module configured to determine whether a key including the current MAC address exists in the updated local address file
  • a third determining submodule configured to: when the updated local address file contains a key that includes the current MAC address, determine that the current MAC address is consistent with any one of the address files;
  • a fourth determining submodule configured to: when the updated local address file does not have a key that includes the current MAC address, determine that the current MAC address is inconsistent with all MAC addresses in the address file .
  • the MAC address storage module 302 can include:
  • the MAC address obtaining submodule is configured to invoke the WIFI information object interface, and receive the network address obtaining function to return the MAC address of each network device that provides the WIFI hotspot wireless network.
  • the MAC address storage module 302 can include:
  • the MAC address of the plurality of network devices providing the WIFI hotspot wireless network is obtained in advance by the MAC address storage module 302, and the plurality of MAC addresses are stored in the address file;
  • the MAC address obtaining module 304 obtains the current MAC address of the current network device that is currently providing the wireless network.
  • the first flow control module 306 determines the wireless network provided by the current network device. It is a WIFI hotspot wireless network, and restricts access traffic or displays corresponding prompt information for the currently to-be-accessed object that meets the preset condition.
  • the embodiment of the invention can quickly and accurately identify the WIFI hotspot wireless network, and limit the access traffic of the WIFI hotspot wireless network, thereby avoiding a large amount of mobile traffic due to connecting a large amount of traffic to be accessed, thereby effectively Reduce the cost of users accessing network resources.
  • the flow control device of the wireless network connection provided by the embodiment of the present invention may be specific hardware on the device or software or firmware installed on the device.
  • the implementation principle and the technical effects of the device provided by the embodiments of the present invention are the same as those of the foregoing method embodiments.
  • the device embodiment is not mentioned, reference may be made to the corresponding content in the foregoing method embodiments.
  • a person skilled in the art can clearly understand that for the convenience and brevity of the description, the specific working processes of the foregoing system, the device and the unit can refer to the corresponding processes in the foregoing method embodiments, and details are not described herein again.
  • the disclosed apparatus and method may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division.
  • multiple units or components may be combined or Can be integrated into another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some communication interface, device or unit, and may be electrical, mechanical or otherwise.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in the embodiment provided by the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the function can be implemented in the form of a software functional unit and sold or used as a stand-alone product. Stored in a computer readable storage medium.
  • a computer readable storage medium including: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like, which can store program codes. .

Landscapes

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

Abstract

本发明提供了一种无线网络连接的流量控制方法、装置及可读取存储介质,该方法包括:预先获取提供WIFI热点无线网络的多个网络设备的MAC地址,并将多个MAC地址存储至地址文件中;获取当前提供无线网络的当前网络设备的当前MAC地址;当当前MAC地址与地址文件中的任一MAC地址一致时,确定当前网络设备提供的无线网络为WIFI热点无线网络,并对满足预设条件的当前待访问对象进行访问流量限制或者显示相应的提示信息。本发明实施例能够实现快速、准确地识别出WIFI热点无线网络,并对该WIFI热点无线网络的访问流量进行限制,从而避免由于连接大流量的待访问对象而耗费大量的移动流量,进而有效地降低用户访问网络资源所需的成本。

Description

无线网络连接的流量控制方法、装置及可读取存储介质
本申请要求于2016年10月28日提交中国专利局的申请号为CN201610969475.0、名称为“一种无线网络连接的流量控制方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本发明涉及移动终端技术领域,具体而言,涉及一种无线网络连接的流量控制方法及装置。
背景技术
目前,在人们日常生活中,用户通常选择通过WIFI(无线网络,Wireless Fidelity)连接互联网,进而从互联网上获取相应的网络资源,但由于WIFI信号覆盖范围受限,用户并非随时随地都可以连接上WIFI,此时,用户不能通过WIFI连接互联网;同时,随着移动互联网技术的快速发展,在用户处于没有WIFI信号的环境时,可以通过移动终端上的移动网络(如,3G/4G网络)连接互联网,从而实现随时随地上网获取网络资源,另外,在人们日常生活中比较常用的上网设备还有平板电脑,由于平板电脑具有小型、便于携带且屏幕比较大的优点,使用平板电脑进行上网越来越得到大家的青睐,但是,平板电脑并不具有直接连接移动网络的功能,通常情况下,用户将具有连接移动网络的设备(如,智能手机)接收到的移动网络转化为WIFI信号再发射出去,该WIFI信号供平板电脑连接,从而平板电脑可以实现上网获取网络资源,此时,平板电脑连接的无线网络的WIFI类型为WIFI热点无线网络,智能手机作为一个WIFI热点,平板电脑上网获取网络资源所耗费的流量来源于智能手机的移动网络流量。
当前,为了减少用户使用移动网络进行上网时耗费的移动流量,降低用户上网所需支付的流量费,多数应用软件(如,直播平台的APP)具有自动识别当前连接的网络是移动网络还是WIFI的功能,当识别出当前连接的网络为移动网络时,将自动对大流量的访问进行一定的限制或者对大流量的访问进行相应的提示,然而,目前相关技术中并未给出自动识别无线网络的WIFI类型为WIFI热点无线网络还是普通WIFI的方案。
在实现本发明的过程中,发明人发现相关技术中至少存在以下问题:相关技术 中无法快速、准确地识别出连接的无线网络是由移动终端通过移动网络共享的WIFI热点无线网络,还是由普通路由器发射的普通WIFI,从而无法对WIFI热点无线网络和普通WIFI进行区分处理,在用户终端连接的是WIFI热点无线网络的情况下,将导致用户终端连接大流量的待访问对象时耗费大量的移动流量,大大增加了用户访问网络资源所需的成本。
发明内容
有鉴于此,本发明实施例的目的在于提供一种无线网络连接的流量控制方法及装置,以实现快速、准确地识别出WIFI热点无线网络,并对该WIFI热点无线网络的访问流量进行限制,从而避免由于连接大流量的待访问对象而耗费大量的移动流量,进而有效地降低用户访问网络资源所需的成本。
第一方面,本发明实施例提供了一种无线网络连接的流量控制方法,该方法包括:
预先获取提供WIFI热点无线网络的多个网络设备的MAC地址,并将多个所述MAC地址存储至地址文件中,所述地址文件包括本地的地址文件和/或远端的地址文件;
获取当前提供无线网络的当前网络设备的当前MAC地址;
当所述当前MAC地址与所述地址文件中的任一MAC地址一致时,确定所述当前网络设备提供的无线网络为WIFI热点无线网络,并对满足预设条件的当前待访问对象进行访问流量限制或者显示相应的提示信息;
当所述当前MAC地址与所述地址文件中的所有MAC地址均不一致时,确定所述当前网络设备提供的无线网络为普通无线网络,对所述当前待访问对象不进行访问流量限制。
结合第一方面,本发明实施例提供了第一方面的第一种可能的实施方式,其中,所述对满足预设条件的当前待访问对象进行访问流量限制或者显示相应的提示信息,包括:
判断当前待访问对象所需访问流量是否大于预设阈值,若是,则对所述当前待访问对象进行访问流量限制或者显示相应的提示信息。
结合第一方面,本发明实施例提供了第一方面的第二种可能的实施方式,其中, 所述将多个所述MAC地址存储至地址文件中,包括:
以键值对的形式将多个所述MAC地址存储至地址文件中,所述键值对中的键为所述MAC地址,所述键值对中的值为非空值;
所述获取当前提供无线网络的当前网络设备的当前MAC地址之后,还包括:
查找所述地址文件中是否存在包含所述当前MAC地址的键。
结合第一方面的第二种可能的实施方式,本发明实施例提供了第一方面的第三种可能的实施方式,其中,所述远端的地址文件包含本地的地址文件中提供WIFI热点无线网络的多个网络设备的所述MAC地址、以及除本地的地址文件中所述MAC地址以外的提供WIFI热点无线网络的多个其他网络设备的MAC地址。
结合第一方面的第三种可能的实施方式,本发明实施例提供了第一方面的第四种可能的实施方式,其中,所述查找所述地址文件中是否存在包含所述当前MAC地址的键,包括:
判断所述本地的地址文件中是否存在包含所述当前MAC地址的键;
若是,则确定所述当前MAC地址与所述地址文件中的任一MAC地址一致;
若否,则将所述当前MAC地址发送至指定的远端服务器,以使所述远端服务器判断所述远端的地址文件中是否存在包含所述当前MAC地址的键;当所述远端服务器返回的判断结果为是时,则确定所述当前MAC地址与所述地址文件中的所有MAC地址均不一致。
结合第一方面的第三种可能的实施方式,本发明实施例提供了第一方面的第五种可能的实施方式,其中,所述方法还包括:
接收指定的远端服务器发送的所述远端的地址文件;
根据所述远端的地址文件更新所述本地的地址文件;
所述查找所述地址文件中是否存在包含所述当前MAC地址的键,包括:
判断更新后的所述本地的地址文件中是否存在包含所述当前MAC地址的键;
若是,则确定所述当前MAC地址与所述地址文件中的任一MAC地址一致;
若否,则确定所述当前MAC地址与所述地址文件中的所有MAC地址均不一致。
结合第一方面,本发明实施例提供了第一方面的第六种可能的实施方式,其中,所述预先获取提供WIFI热点无线网络的多个网络设备的MAC地址,包括:
调用WIFI信息对象接口,并接收网络地址获取函数返回各个提供WIFI热点无 线网络的网络设备的MAC地址。
结合第一方面,本发明实施例提供了第一方面的第七种可能的实施方式,其中,所述将多个所述MAC地址存储至地址文件中,包括:
调用信息编辑接口中的字符串存储函数,并将所述MAC地址存储至所述信息编辑接口中;
提交所述MAC地址,并将所述MAC地址写入本地的地址文件中。
第二方面,本发明实施例还提供了一种无线网络连接的流量控制装置,该装置包括:
MAC地址存储模块,配置为预先获取提供WIFI热点无线网络的多个网络设备的MAC地址,并将多个所述MAC地址存储至地址文件中,所述地址文件包括本地的地址文件和/或远端的地址文件;
当前MAC地址获取模块,配置为获取当前提供无线网络的当前网络设备的当前MAC地址;
第一流量控制模块,配置为当所述当前MAC地址与所述地址文件中的任一MAC地址一致时,确定所述当前网络设备提供的无线网络为WIFI热点无线网络,并对满足预设条件的当前待访问对象进行访问流量限制或者显示相应的提示信息;
第二流量控制模块,配置为当所述当前MAC地址与所述地址文件中的所有MAC地址均不一致时,确定所述当前网络设备提供的无线网络为普通无线网络,对所述当前待访问对象不进行访问流量限制。
结合第二方面,本发明实施例提供了第二方面的第一种可能的实施方式,其中,所述第一流量控制模块包括:
访问流量判断子单元,配置为判断当前待访问对象所需访问流量是否大于预设阈值,若是,则对所述当前待访问对象进行访问流量限制或者显示相应的提示信息。
结合第二方面,本发明实施例提供了第二方面的第二种可能的实施方式,其中,所述MAC地址存储模块包括:
MAC地址存储子模块,配置为以键值对的形式将多个所述MAC地址存储至地址文件中,所述键值对中的键为所述MAC地址,所述键值对中的值为非空值;
所述装置还包括:MAC地址匹配模块,配置为查找所述地址文件中是否存在包含所述当前MAC地址的键。
结合第二方面的第二种可能的实施方式,本发明实施例提供了第二方面的第三种可能的实施方式,其中,所述远端的地址文件包含本地的地址文件中提供WIFI热点无线网络的多个网络设备的所述MAC地址、以及除本地的地址文件中所述MAC地址以外的提供WIFI热点无线网络的多个其他网络设备的MAC地址。
结合第二方面的第三种可能的实施方式,本发明实施例提供了第二方面的第四种可能的实施方式,其中,所述MAC地址匹配模块包括:
第一判断子模块,配置为判断所述本地的地址文件中是否存在包含所述当前MAC地址的键;
第一确定子模块,配置为当所述本地的地址文件中存在包含所述当前MAC地址的键时,确定所述当前MAC地址与所述地址文件中的任一MAC地址一致;
第二确定子模块,配置为当所述本地的地址文件中不存在包含所述当前MAC地址的键时,将所述当前MAC地址发送至指定的远端服务器,以使所述远端服务器判断所述远端的地址文件中是否存在包含所述当前MAC地址的键;当所述远端服务器返回的判断结果为是时,则确定所述当前MAC地址与所述地址文件中的所有MAC地址均不一致。
结合第二方面的第三种可能的实施方式,本发明实施例提供了第二方面的第五种可能的实施方式,其中,所述装置还包括:
地址文件接收模块,配置为接收指定的远端服务器发送的所述远端的地址文件;
地址文件更新模块,配置为根据所述远端的地址文件更新所述本地的地址文件;
所述MAC地址匹配模块包括:
第二判断子模块,配置为判断更新后的所述本地的地址文件中是否存在包含所述当前MAC地址的键;
第三确定子模块,配置为当更新后的所述本地的地址文件中存在包含所述当前MAC地址的键时,则确定所述当前MAC地址与所述地址文件中的任一MAC地址一致;
第四确定子模块,配置为当更新后的所述本地的地址文件中不存在包含所述当前MAC地址的键时,则确定所述当前MAC地址与所述地址文件中的所有MAC地址均不一致。
结合第二方面,本发明实施例提供了第二方面的第六种可能的实施方式,其中, 所述MAC地址存储模块包括:
MAC地址获取子模块,配置为调用WIFI信息对象接口,并接收网络地址获取函数返回各个提供WIFI热点无线网络的网络设备的MAC地址。
结合第二方面,本发明实施例提供了第二方面的第七种可能的实施方式,其中,所述MAC地址存储模块包括:
调用子模块,配置为调用信息编辑接口中的字符串存储函数,并将所述MAC地址存储至所述信息编辑接口中;
提交子模块,配置为提交所述MAC地址,并将所述MAC地址写入本地的地址文件中。
另一方面,本发明还提供了一种存储于计算机的可读取存储介质,包括多条指令,所述多条指令被配置成实现上述无线网络连接的流量控制方法。
在本发明实施例提供的无线网络连接的流量控制方法、装置及可读取存储介质中,该方法包括:预先获取提供WIFI热点无线网络的多个网络设备的MAC地址,并将多个MAC地址存储至地址文件中;获取当前提供无线网络的当前网络设备的当前MAC地址;当当前MAC地址与地址文件中的任一MAC地址一致时,确定当前网络设备提供的无线网络为WIFI热点无线网络,并对满足预设条件的当前待访问对象进行访问流量限制或者显示相应的提示信息。本发明实施例能够实现快速、准确地识别出WIFI热点无线网络,并对该WIFI热点无线网络的访问流量进行限制,从而避免由于连接大流量的待访问对象而耗费大量的移动流量,进而有效地降低用户访问网络资源所需的成本。
为使本发明的上述目的、特征和优点能更明显易懂,下文特举较佳实施例,并配合所附附图,作详细说明如下。
附图说明
为了更清楚地说明本发明实施例的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,应当理解,以下附图仅示出了本发明的某些实施例,因此不应被看作是对范围的限定,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他相关的附图。
图1示出了本发明实施例所提供的一种无线网络连接的流量控制方法的流程示意图;
图2示出了本发明实施例所提供的另一种无线网络连接的流量控制方法流程示意图;
图3示出了本发明实施例所提供的一种无线网络连接的流量控制装置的结构示意图;
图4示出了本发明实施例所提供的另一种无线网络连接的流量控制的结构示意图。
具体实施方式
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。通常在此处附图中描述和示出的本发明实施例的组件可以以各种不同的配置来布置和设计。因此,以下对在附图中提供的本发明的实施例的详细描述并非旨在限制要求保护的本发明的范围,而是仅仅表示本发明的选定实施例。基于本发明的实施例,本领域技术人员在没有做出创造性劳动的前提下所获得的所有其他实施例,都属于本发明保护的范围。
考虑到相关技术中无法快速、准确地识别出连接的无线网络是由移动终端通过移动网络共享的WIFI热点无线网络,还是由普通路由器发射的普通WIFI,从而无法对WIFI热点无线网络和普通WIFI进行区分处理,在用户终端连接的是WIFI热点无线网络的情况下,将导致用户终端连接大流量的待访问对象时耗费大量的移动流量,大大增加了用户访问网络资源所需的成本。基于此,本发明实施例提供了一种无线网络连接的流量控制方法及装置,下面通过实施例进行描述。
如图1所示,本发明实施例提供了一种无线网络连接的流量控制方法,该方法可包括步骤S102-S108,具体如下:
步骤S102:预先获取提供WIFI热点无线网络的多个网络设备的MAC地址,并将多个MAC地址存储至地址文件中,该地址文件包括本地的地址文件和/或远端的地址文件;
步骤S104:获取当前提供无线网络的当前网络设备的当前MAC地址;
步骤S106:当当前MAC地址与地址文件中的任一MAC地址一致时,确定当前网络设备提供的无线网络为WIFI热点无线网络,并对满足预设条件的当前待访问对象进行访问流量限制或者显示相应的提示信息;
步骤S108:当当前MAC地址与地址文件中的所有MAC地址均不一致时,确定当前网络设备提供的无线网络为普通无线网络,对当前待访问对象不进行访问流量限制。
可选地,上述步骤S102至S108的执行主体可以是不具有移动网络(如,4G网络)通信功能的用户终端,如平板电脑,通过连接无线网络来进行网络资源的访问,其中,该无线网络可以是普通无线网络(路由器提供的无线网络),也可以是WIFI热点无线网络(网络设备将移动网络转化为WIFI信号再发射出去的无线网络),由于利用WIFI热点无线网络访问网络资源所消耗的是移动网络流量,为了实现对WIFI热点无线网络进行有效的流量控制,因此,首先需要识别出当前连接的无线网络是普通无线网络还是WIFI热点无线网络,该识别过程中,利用网络设备的MAC地址具有唯一性,通过获取并存储提供WIFI热点无线网络的多个网络设备的MAC地址,然后,将当前提供无线网络的当前网络设备的当前MAC地址与预先存储的提供WIFI热点无线网络的多个网络设备的MAC地址进行匹配,如果匹配成功,则说明该无线网络为WIFI热点无线网络;然后,在使用该无线网络访问资源时按照相关技术中移动网络的处理方式进行相应的流量限制。
可选地,预先获取提供WIFI热点无线网络的多个网络设备的MAC地址,可通过以下步骤来实现:
获取WIFI管理者接口;调用该WIFI管理者接口,并获取WIFI信息对象接口;
可选地,通过getSystemService(Context.WIFI_SERVICE)函数获取WifiManager接口,该WifiManager接口对应的实例为wifiManager;调用所述wifiManager中的getConnectionInfo()函数,并接收WifiInfo的实例wifiInfo;调用所述wifiInfo中的getMacAddress()函数,并接收字符串型的MAC地址信息macAddr;
可选地,所述将多个所述MAC地址存储至地址文件中,可包括:
调用信息编辑接口中的字符串存储函数,并将所述MAC地址存储至所述信息编辑接口中;
提交所述MAC地址,并将所述MAC地址写入本地的地址文件中。
其中,在调用WIFI信息对象接口之前还可包括:
获取信息存储接口;调用该信息存储接口,并获取信息编辑接口;
通过PreferenceManager.getDefaultSharedPreferences(Context)函数获取 SharedPreferences存储接口,该SharedPreferences存储接口对应的实例为sharedPreferences;
调用所述sharedPreferences中的edit()函数,并获取编辑接口editor;
调用所述编辑接口editor中的putString()函数,并将所述热点WIFI的MAC地址存储至所述编辑接口editor;
调用commit函数,并将存储至所述编辑接口editor中所述热点WIFI的MAC地址写入相应的本地MAC地址存储文件中。
进一步的,考虑到可能存在用户对网络设备标记错误的情况,需要将预先标记为WIFI热点无线网络改为普通无线网络,此时,需要将该网络设备的MAC地址从地址文件中删除(本地的地址文件和远端的地址文件需要同步删除),基于此,上述流量控制方法还包括:
当接收到普通无线网络标记请求或者WIFI热点无线网络修改请求时,获取提供普通无线网络的网络设备的MAC地址,并判断所述本地地址文件中是否存在所述网络设备的MAC地址;
若存在,则确定所述网络设备提供的无线网络由WIFI热点无线网络改为普通无线网络,从所述本地地址文件中删除所述网络设备的MAC地址,并将所述MAC地址标记为普通无线网络发送至指定的远端服务器,以使远端服务器将所述MAC地址从远端的地址文件中删除。
在本发明提供的无线网络连接的流量控制方法中,该方法可包括:预先获取提供WIFI热点无线网络的多个网络设备的MAC地址,并将多个MAC地址存储至地址文件中;获取当前提供无线网络的当前网络设备的当前MAC地址;当当前MAC地址与地址文件中的任一MAC地址一致时,确定当前网络设备提供的无线网络为WIFI热点无线网络,并对满足预设条件的当前待访问对象进行访问流量限制或者显示相应的提示信息。本发明实施例能够实现快速、准确地识别出WIFI热点无线网络,并对该WIFI热点无线网络的访问流量进行限制,从而避免由于连接大流量的待访问对象而耗费大量的移动流量,进而有效地降低用户访问网络资源所需的成本。
本发明实施例还提供一种无线网络连接的流量控制装置,如图3所示,该装置包括:
MAC地址存储模块302,用于预先获取提供WIFI热点无线网络的多个网络设 备的MAC地址,并将多个所述MAC地址存储至地址文件中,所述地址文件包括本地的地址文件和/或远端的地址文件;
当前MAC地址获取模块304,用于获取当前提供无线网络的当前网络设备的当前MAC地址;
第一流量控制模块306,用于当所述当前MAC地址与所述地址文件中的任一MAC地址一致时,确定所述当前网络设备提供的无线网络为WIFI热点无线网络,并对满足预设条件的当前待访问对象进行访问流量限制或者显示相应的提示信息;
第二流量控制模块308,用于当所述当前MAC地址与所述地址文件中的所有MAC地址均不一致时,确定所述当前网络设备提供的无线网络为普通无线网络,对所述当前待访问对象不进行访问流量限制。
进一步的,所述第一流量控制模块306可包括:
访问流量判断子单元,用于判断当前待访问对象所需访问流量是否大于预设阈值,若是,则对所述当前待访问对象进行访问流量限制或者显示相应的提示信息。
进一步的,如图4所示,所述MAC地址存储模块302可包括:
MAC地址存储子模块3022,用于预先获取提供WIFI热点无线网络的多个网络设备的MAC地址,并以键值对的形式将多个所述MAC地址存储至地址文件中,所述键值对中的键为所述MAC地址,所述键值对中的值为非空值;
所述装置还可包括:MAC地址匹配模块402,用于查找所述地址文件中是否存在包含所述当前MAC地址的键;
上述第一流量控制模块306可包括:第一流量控制子模块3062,用于当查找到地址文件中存在包含当前MAC地址的键时,确定所述当前网络设备提供的无线网络为WIFI热点无线网络,并对满足预设条件的当前待访问对象进行访问流量限制或者显示相应的提示信息;
上述第二流量控制模块308可包括:第二流量控制子模块3082,用于当查找到地址文件中不存在包含当前MAC地址的键时,确定所述当前网络设备提供的无线网络为普通无线网络,对所述当前待访问对象不进行访问流量限制。
进一步的,所述远端的地址文件包含本地的地址文件中提供WIFI热点无线网络的多个网络设备的所述MAC地址、以及除本地的地址文件中所述MAC地址以外的提供WIFI热点无线网络的多个其他网络设备的MAC地址。
进一步的,所述MAC地址匹配模块可包括:
第一判断子模块,用于判断所述本地的地址文件中是否存在包含所述当前MAC地址的键;
第一确定子模块,用于当所述本地的地址文件中存在包含所述当前MAC地址的键时,确定所述当前MAC地址与所述地址文件中的任一MAC地址一致;
第二确定子模块,用于当所述本地的地址文件中不存在包含所述当前MAC地址的键时,将所述当前MAC地址发送至指定的远端服务器,以使所述远端服务器判断所述远端的地址文件中是否存在包含所述当前MAC地址的键;当所述远端服务器返回的判断结果为是时,则确定所述当前MAC地址与所述地址文件中的所有MAC地址均不一致。
进一步的,所述装置还可包括:
地址文件接收模块,用于接收指定的远端服务器发送的所述远端的地址文件;
地址文件更新模块,用于根据所述远端的地址文件更新所述本地的地址文件;
所述MAC地址匹配模块包括:
第二判断子模块,用于判断更新后的所述本地的地址文件中是否存在包含所述当前MAC地址的键;
第三确定子模块,用于当更新后的所述本地的地址文件中存在包含所述当前MAC地址的键时,则确定所述当前MAC地址与所述地址文件中的任一MAC地址一致;
第四确定子模块,用于当更新后的所述本地的地址文件中不存在包含所述当前MAC地址的键时,则确定所述当前MAC地址与所述地址文件中的所有MAC地址均不一致。
进一步的,所述MAC地址存储模块302可包括:
MAC地址获取子模块,用于调用WIFI信息对象接口,并接收网络地址获取函数返回各个提供WIFI热点无线网络的网络设备的MAC地址。
进一步的,所述MAC地址存储模块302可包括:
调用子模块,用于调用信息编辑接口中的字符串存储函数,并将所述MAC地址存储至所述信息编辑接口中;
提交子模块,用于提交所述MAC地址,并将所述MAC地址写入本地的地址文 件中。
在本发明提供的无线网络连接的流量控制装置中,通过MAC地址存储模块302预先获取提供WIFI热点无线网络的多个网络设备的MAC地址,并将多个MAC地址存储至地址文件中;通过当前MAC地址获取模块304获取当前提供无线网络的当前网络设备的当前MAC地址;当当前MAC地址与地址文件中的任一MAC地址一致时,通过第一流量控制模块306确定当前网络设备提供的无线网络为WIFI热点无线网络,并对满足预设条件的当前待访问对象进行访问流量限制或者显示相应的提示信息。本发明实施例能够实现快速、准确地识别出WIFI热点无线网络,并对该WIFI热点无线网络的访问流量进行限制,从而避免由于连接大流量的待访问对象而耗费大量的移动流量,进而有效地降低用户访问网络资源所需的成本。
本发明实施例所提供的无线网络连接的流量控制装置可以为设备上的特定硬件或者安装于设备上的软件或固件等。本发明实施例所提供的装置,其实现原理及产生的技术效果和前述方法实施例相同,为简要描述,装置实施例部分未提及之处,可参考前述方法实施例中相应内容。所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,前述描述的系统、装置和单元的具体工作过程,均可以参考上述方法实施例中的对应过程,在此不再赘述。
在本发明所提供的实施例中,应该理解到,所揭露装置和方法,可以通过其它的方式实现。以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,又例如,多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些通信接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本发明提供的实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可 以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
应注意到:相似的标号和字母在下面的附图中表示类似项,因此,一旦某一项在一个附图中被定义,则在随后的附图中不需要对其进行进一步定义和解释,此外,术语“第一”、“第二”、“第三”等仅用于区分描述,而不能理解为指示或暗示相对重要性。
最后应说明的是:以上所述实施例,仅为本发明的具体实施方式,用以说明本发明的技术方案,而非对其限制,本发明的保护范围并不局限于此,尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,其依然可以对前述实施例所记载的技术方案进行修改或可轻易想到变化,或者对其中部分技术特征进行等同替换;而这些修改、变化或者替换,并不使相应技术方案的本质脱离本发明实施例技术方案的精神和范围。都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应所述以权利要求的保护范围为准。

Claims (17)

  1. 一种无线网络连接的流量控制方法,其特征在于,所述方法包括:
    预先获取提供WIFI热点无线网络的多个网络设备的MAC地址,并将多个所述MAC地址存储至地址文件中,所述地址文件包括本地的地址文件和/或远端的地址文件;
    获取当前提供无线网络的当前网络设备的当前MAC地址;
    当所述当前MAC地址与所述地址文件中的任一MAC地址一致时,确定所述当前网络设备提供的无线网络为WIFI热点无线网络,并对满足预设条件的当前待访问对象进行访问流量限制或者显示相应的提示信息;
    当所述当前MAC地址与所述地址文件中的所有MAC地址均不一致时,确定所述当前网络设备提供的无线网络为普通无线网络,对所述当前待访问对象不进行访问流量限制。
  2. 根据权利要求1所述的方法,其特征在于,所述对满足预设条件的当前待访问对象进行访问流量限制或者显示相应的提示信息,包括:
    判断当前待访问对象所需访问流量是否大于预设阈值,若是,则对所述当前待访问对象进行访问流量限制或者显示相应的提示信息。
  3. 根据权利要求1所述的方法,其特征在于,所述将多个所述MAC地址存储至地址文件中,包括:
    以键值对的形式将多个所述MAC地址存储至地址文件中,所述键值对中的键为所述MAC地址,所述键值对中的值为非空值;
    在所述获取当前提供无线网络的当前网络设备的当前MAC地址的步骤之后,该方法还包括:
    查找所述地址文件中是否存在包含所述当前MAC地址的键。
  4. 根据权利要求3所述的方法,其特征在于,所述远端的地址文件包含提供WIFI热点无线网络的多个网络设备的所述MAC地址、以及除所述MAC地址以外的提供WIFI热点无线网络的多个其他网络设备的MAC地址。
  5. 根据权利要求4所述的方法,其特征在于,所述查找所述地址文件中是否存在包含所述当前MAC地址的键,包括:
    判断所述本地的地址文件中是否存在包含所述当前MAC地址的键;
    若是,则确定所述当前MAC地址与所述地址文件中的任一MAC地址一致;
    若否,则将所述当前MAC地址发送至指定的远端服务器,以使所述远端服务器判断所述远端的地址文件中是否存在包含所述当前MAC地址的键;当所述远端服务器返回的判断结果为是时,则确定所述当前MAC地址与所述地址文件中的所有MAC地址均不一致。
  6. 根据权利要求4所述的方法,其特征在于,所述方法还包括:
    接收指定的远端服务器发送的所述远端的地址文件;
    根据所述远端的地址文件更新所述本地的地址文件;
    所述查找所述地址文件中是否存在包含所述当前MAC地址的键,包括:
    判断更新后的所述本地的地址文件中是否存在包含所述当前MAC地址的键;
    若是,则确定所述当前MAC地址与所述地址文件中的任一MAC地址一致;
    若否,则确定所述当前MAC地址与所述地址文件中的所有MAC地址均不一致。
  7. 根据权利要求1-6中任意一项所述的方法,其特征在于,所述预先获取提供WIFI热点无线网络的多个网络设备的MAC地址,包括:
    调用WIFI信息对象接口,并接收网络地址获取函数返回各个提供WIFI热点无线网络的网络设备的MAC地址。
  8. 根据权利要求1-6中任意一项所述的方法,其特征在于,所述将多个所述MAC地址存储至地址文件中,包括:
    调用信息编辑接口中的字符串存储函数,并将所述MAC地址存储至所述信息编辑接口中;
    提交所述MAC地址,并将所述MAC地址写入本地的地址文件中。
  9. 一种无线网络连接的流量控制装置,其特征在于,所述装置包括:
    MAC地址存储模块,配置为预先获取提供WIFI热点无线网络的多个网络设备的MAC地址,并将多个所述MAC地址存储至地址文件中,所述地址文件包括本地的地址文件和/或远端的地址文件;
    当前MAC地址获取模块,配置为获取当前提供无线网络的当前网络设备的 当前MAC地址;
    第一流量控制模块,配置为当所述当前MAC地址与所述地址文件中的任一MAC地址一致时,确定所述当前网络设备提供的无线网络为WIFI热点无线网络,并对满足预设条件的当前待访问对象进行访问流量限制或者显示相应的提示信息;
    第二流量控制模块,配置为当所述当前MAC地址与所述地址文件中的所有MAC地址均不一致时,确定所述当前网络设备提供的无线网络为普通无线网络,对所述当前待访问对象不进行访问流量限制。
  10. 根据权利要求9所述的装置,其特征在于,所述MAC地址存储模块包括:
    MAC地址存储子模块,配置为以键值对的形式将多个所述MAC地址存储至地址文件中,所述键值对中的键为所述MAC地址,所述键值对中的值为非空值;
    所述装置还包括:
    MAC地址匹配模块,配置为查找所述地址文件中是否存在包含所述当前MAC地址的键。
  11. 根据权利要求9所述的装置,其特征在于,所述第一流量控制模块包括:
    访问流量判断子单元,配置为判断当前待访问对象所需访问流量是否大于预设阈值,若是,则对所述当前待访问对象进行访问流量限制或者显示相应的提示信息。
  12. 根据权利要求10所述的装置,其特征在于:
    所述远端的地址文件包含提供WIFI热点无线网络的多个网络设备的所述MAC地址、以及除所述MAC地址以外的提供WIFI热点无线网络的多个其他网络设备的MAC地址。
  13. 根据权利要求12所述的装置,其特征在于,所述MAC地址匹配模块包括:
    第一判断子模块,配置为判断所述本地的地址文件中是否存在包含所述当前MAC地址的键;
    第一确定子模块,配置为当所述本地的地址文件中存在包含所述当前MAC地址的键时,确定所述当前MAC地址与所述地址文件中的任一MAC地址一致;
    第二确定子模块,配置为当所述本地的地址文件中不存在包含所述当前MAC 地址的键时,将所述当前MAC地址发送至指定的远端服务器,以使所述远端服务器判断所述远端的地址文件中是否存在包含所述当前MAC地址的键;当所述远端服务器返回的判断结果为是时,则确定所述当前MAC地址与所述地址文件中的所有MAC地址均不一致。
  14. 根据权利要求12所述的装置,其特征在于,所述装置还包括:
    地址文件接收模块,配置为接收指定的远端服务器发送的所述远端的地址文件;
    地址文件更新模块,配置为根据所述远端的地址文件更新所述本地的地址文件;
    所述MAC地址匹配模块包括:
    第二判断子模块,配置为判断更新后的所述本地的地址文件中是否存在包含所述当前MAC地址的键;
    第三确定子模块,配置为当更新后的所述本地的地址文件中存在包含所述当前MAC地址的键时,则确定所述当前MAC地址与所述地址文件中的任一MAC地址一致;
    第四确定子模块,配置为当更新后的所述本地的地址文件中不存在包含所述当前MAC地址的键时,则确定所述当前MAC地址与所述地址文件中的所有MAC地址均不一致。
  15. 根据权利要求9-14中任意一项所述的装置,其特征在于,所述MAC地址存储模块包括:
    MAC地址获取子模块,配置为调用WIFI信息对象接口,并接收网络地址获取函数返回各个提供WIFI热点无线网络的网络设备的MAC地址。
  16. 根据权利要求9-14中任意一项所述的装置,其特征在于,所述MAC地址存储模块包括:
    调用子模块,配置为调用信息编辑接口中的字符串存储函数,并将所述MAC地址存储至所述信息编辑接口中;
    提交子模块,配置为提交所述MAC地址,并将所述MAC地址写入本地的地址文件中。
  17. 一种存储于计算机的可读取存储介质,其特征在于,包括多条指令,所述 多条指令被配置成实现如权利要求1-8任一项所述的方法。
PCT/CN2017/079590 2016-10-28 2017-04-06 无线网络连接的流量控制方法、装置及可读取存储介质 Ceased WO2018076613A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610969475.0A CN106413001A (zh) 2016-10-28 2016-10-28 一种无线网络连接的流量控制方法及装置
CN201610969475.0 2016-10-28

Publications (1)

Publication Number Publication Date
WO2018076613A1 true WO2018076613A1 (zh) 2018-05-03

Family

ID=58014718

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/079590 Ceased WO2018076613A1 (zh) 2016-10-28 2017-04-06 无线网络连接的流量控制方法、装置及可读取存储介质

Country Status (2)

Country Link
CN (1) CN106413001A (zh)
WO (1) WO2018076613A1 (zh)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106413001A (zh) * 2016-10-28 2017-02-15 武汉斗鱼网络科技有限公司 一种无线网络连接的流量控制方法及装置
CN108882324A (zh) * 2018-09-27 2018-11-23 北京安云世纪科技有限公司 智能切换WiFi的处理方法、装置、计算机设备及存储介质
CN112312519B (zh) * 2019-07-31 2022-12-27 华为技术有限公司 一种设备识别的方法及相关装置

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110296354A1 (en) * 2010-05-04 2011-12-01 Qwest Communications International Inc. Content-Driven Navigation
CN104185294A (zh) * 2014-08-04 2014-12-03 广东欧珀移动通信有限公司 手机热点的识别方法与识别装置
CN104768154A (zh) * 2015-03-25 2015-07-08 广东顺德中山大学卡内基梅隆大学国际联合研究院 一种移动终端解锁方法
CN105307242A (zh) * 2015-11-13 2016-02-03 魅族科技(中国)有限公司 一种Wi-Fi网络使用方法及终端
CN105430713A (zh) * 2015-11-30 2016-03-23 东莞酷派软件技术有限公司 一种无线保真WiFi热点的识别方法及终端
CN106413001A (zh) * 2016-10-28 2017-02-15 武汉斗鱼网络科技有限公司 一种无线网络连接的流量控制方法及装置

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8600344B2 (en) * 2012-02-15 2013-12-03 Bright House Networks, Llc Integrating a mobile hotspot into a larger network environment
CN103415016A (zh) * 2013-07-05 2013-11-27 惠州Tcl移动通信有限公司 一种移动wifi热点连接处理方法及系统
CN103501333B (zh) * 2013-09-29 2017-03-22 小米科技有限责任公司 一种下载文件的方法、装置和终端设备
CN105451269A (zh) * 2014-07-04 2016-03-30 阿里巴巴集团控股有限公司 一种无线上网流量控制的方法和装置

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110296354A1 (en) * 2010-05-04 2011-12-01 Qwest Communications International Inc. Content-Driven Navigation
CN104185294A (zh) * 2014-08-04 2014-12-03 广东欧珀移动通信有限公司 手机热点的识别方法与识别装置
CN104768154A (zh) * 2015-03-25 2015-07-08 广东顺德中山大学卡内基梅隆大学国际联合研究院 一种移动终端解锁方法
CN105307242A (zh) * 2015-11-13 2016-02-03 魅族科技(中国)有限公司 一种Wi-Fi网络使用方法及终端
CN105430713A (zh) * 2015-11-30 2016-03-23 东莞酷派软件技术有限公司 一种无线保真WiFi热点的识别方法及终端
CN106413001A (zh) * 2016-10-28 2017-02-15 武汉斗鱼网络科技有限公司 一种无线网络连接的流量控制方法及装置

Also Published As

Publication number Publication date
CN106413001A (zh) 2017-02-15

Similar Documents

Publication Publication Date Title
CN105682015B (zh) 一种用于建立无线连接的方法与设备
CN104349423B (zh) 自动连接无线局域网的方法、系统及装置
CN108769972B (zh) 智能终端与蓝牙设备的连接控制方法及蓝牙连接控制系统
CN106912048B (zh) 接入点信息分享方法和装置
TWI698133B (zh) 無線網路類型的檢測方法、裝置及電子設備
US9888277B2 (en) Content playback method and electronic device implementing the same
WO2016101729A1 (zh) 无线网络接入的方法、装置及系统
CN104735814A (zh) 自动接入WiFi网络的接入方法、系统、和相关装置
CN105162768A (zh) 检测钓鱼Wi-Fi热点的方法及装置
US9602969B2 (en) Method and electronic device for recognizing area
US20150347377A1 (en) Method for processing contents and electronic device thereof
WO2014090052A1 (zh) 无线网络接入的控制方法及装置
WO2019114831A1 (zh) 一种连接无线接入点的方法
CN104582000A (zh) 一种无线热点处理的方法及移动终端
CN106162805B (zh) Wifi热点服务的接入控制方法和装置
WO2017071087A1 (zh) 信息的传输方法、装置和设备
CN104837179A (zh) 一种显示无线热点设备生产者信息的方法及装置
WO2016180210A1 (zh) 一种接入wifi网络的方法及装置
CN106686587A (zh) 一种无线保真Wi‑Fi连接方法及移动终端
CN105636173A (zh) 一种网络搜索控制方法与设备
CN106793011A (zh) Wifi热点接入方法及装置
WO2021072775A1 (zh) 终端支付方法、装置、终端设备及计算机可读取存储介质
WO2019196654A1 (zh) 终端的网络搜索方法、带网络搜索功能的终端
CN112888042B (zh) 基于移动终端的智能手表控制方法、装置、终端及介质
CN107453984B (zh) 回复消息的方法、设备及计算机可存储介质

Legal Events

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

Ref document number: 17864188

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17864188

Country of ref document: EP

Kind code of ref document: A1