[go: up one dir, main page]

CN108551429A - Flow control method of application program, electronic device and computer readable storage medium - Google Patents

Flow control method of application program, electronic device and computer readable storage medium Download PDF

Info

Publication number
CN108551429A
CN108551429A CN201810367518.7A CN201810367518A CN108551429A CN 108551429 A CN108551429 A CN 108551429A CN 201810367518 A CN201810367518 A CN 201810367518A CN 108551429 A CN108551429 A CN 108551429A
Authority
CN
China
Prior art keywords
application program
application
terminal
traffic
flow
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.)
Pending
Application number
CN201810367518.7A
Other languages
Chinese (zh)
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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201810367518.7A priority Critical patent/CN108551429A/en
Publication of CN108551429A publication Critical patent/CN108551429A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/24Traffic characterised by specific attributes, e.g. priority or QoS
    • H04L47/2475Traffic characterised by specific attributes, e.g. priority or QoS for supporting traffic characterised by the type of applications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0876Network utilisation, e.g. volume of load or congestion level
    • 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

Landscapes

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

Abstract

A flow control method of an application program, an electronic device and a computer-readable storage medium are provided, wherein the flow control method of the application program comprises the following steps: responding to a wireless fidelity WiFi hotspot created by connecting a first terminal with a second terminal, and establishing an application program flow monitoring table of the first terminal, wherein the application program flow monitoring table is used for respectively counting the data flow of the WiFi hotspot used by each application program in the first terminal; acquiring a network data packet transmitted and received by the first terminal; extracting a unique identifier of a first application program in the network data packet and data traffic used by the first application program; and updating the application program flow monitoring table according to the unique identifier of the first application program and the data flow used by the first application program.

Description

应用程序的流量控制方法、电子装置及计算机可读存储介质Application program flow control method, electronic device, and computer-readable storage medium

技术领域technical field

本申请涉及电子技术领域,尤其涉及一种应用程序的流量控制方法、电子装置及计算机可读存储介质。The present application relates to the field of electronic technology, and in particular to an application flow control method, an electronic device, and a computer-readable storage medium.

背景技术Background technique

随着移动互联网的飞速发展,用户对移动网络的需求也随之增大,受限于现有的移动网络数据的定量套餐,用户总会遇到移动网络流量用完且暂无宽带无线保真(Wireless Fidelity,WiFi)网络可以连接的场景,此时很多用户会通过连接WiFi热点来解决上网流量不足的问题。但是,被连接WiFi热点的终端同样也存在流量有限的问题,其他移动设备连接WiFi热点后,可能会由于某些应用程序的自发性下载,或后台自运行,导致消耗大量流量,使得被连接WiFi热点的终端的流量告紧。With the rapid development of the mobile Internet, users' demand for mobile networks is also increasing. Limited by the existing quantitative packages of mobile network data, users will always run out of mobile network traffic and there is no broadband wireless fidelity for the time being. (Wireless Fidelity, WiFi) network can be connected to the scene, at this time, many users will solve the problem of insufficient Internet traffic by connecting to WiFi hotspots. However, the terminal connected to the WiFi hotspot also has the problem of limited traffic. After other mobile devices connect to the WiFi hotspot, it may consume a large amount of traffic due to the spontaneous download of some applications or the self-running in the background, making the connected WiFi The traffic of the terminal of the hotspot is tight.

在现有技术中,为了防止被连接WiFi热点的终端的流量被过度的使用,通过移动终端的系统对每个连接WiFi热点的终端进行流量监控和流量限制;但是,在实际应用中,某些应用程序的自发性下载往往不是WiFi热点的使用者的初衷,在现有技术中直接中断或限制了相应移动终端的流量使用,使得WiFi热点的使用者在使用其他正常程序时也无法使用流量,给用户带来了不便。In the prior art, in order to prevent the traffic of the terminal connected to the WiFi hotspot from being excessively used, the system of the mobile terminal carries out flow monitoring and flow limitation on each terminal connected to the WiFi hotspot; however, in practical applications, some Spontaneous downloading of applications is often not the original intention of users of WiFi hotspots. In the prior art, the traffic usage of corresponding mobile terminals is directly interrupted or limited, so that users of WiFi hotspots cannot use traffic when using other normal programs. Inconvenience to the user.

发明内容Contents of the invention

本申请实施例提供一种应用程序的流量控制方法、电子装置及计算机可读存储介质,可简化应用程序声音效果的关闭操作。Embodiments of the present application provide a flow control method for application programs, an electronic device, and a computer-readable storage medium, which can simplify the operation of closing sound effects of application programs.

本申请实施例第一方面提供的应用程序的流量控制方法,包括:The application flow control method provided in the first aspect of the embodiment of the present application includes:

响应于第一终端连接第二终端创建的无线保真WiFi热点,建立所述第一终端的应用程序流量监控表,所述应用程序流量监控表用于分别统计所述第一终端中各个应用程序使用的所述WiFi热点的数据流量;In response to the first terminal connecting to the wireless fidelity WiFi hotspot created by the second terminal, an application flow monitoring table of the first terminal is established, and the application flow monitoring table is used to count each application in the first terminal respectively The data traffic of the WiFi hotspot used;

获取所述第一终端收发的网络数据包;Obtaining network data packets sent and received by the first terminal;

提取所述网络数据包中第一应用程序的唯一标识符以及所述第一应用程序使用的数据流量;extracting the unique identifier of the first application program in the network data packet and the data flow used by the first application program;

根据所述第一应用程序的唯一标识符以及所述第一应用程序使用的数据流量更新所述应用程序流量监控表。The application flow monitoring table is updated according to the unique identifier of the first application and the data flow used by the first application.

本申请实施例第二方面提供一种电子装置,包括:The second aspect of the embodiment of the present application provides an electronic device, including:

监控表建立单元,用于响应于第一终端连接第二终端创建的无线保真WiFi热点,建立所述第一终端的应用程序流量监控表,所述应用程序流量监控表用于分别统计所述第一终端中各个应用程序使用的所述WiFi热点的数据流量;A monitoring table establishing unit, configured to establish an application flow monitoring table of the first terminal in response to the first terminal connecting to the wireless fidelity WiFi hotspot created by the second terminal, and the application flow monitoring table is used to separately count the The data traffic of the WiFi hotspot used by each application program in the first terminal;

数据包接收单元,用于获取所述第一终端收发的网络数据包;a data packet receiving unit, configured to obtain network data packets sent and received by the first terminal;

数据提取单元,用于提取所述网络数据包中第一应用程序的唯一标识符以及所述第一应用程序使用的数据流量;a data extraction unit, configured to extract the unique identifier of the first application program in the network data packet and the data traffic used by the first application program;

流量监控单元,用于根据所述第一应用程序的唯一标识符以及所述第一应用程序使用的数据流量更新所述应用程序流量监控表。A flow monitoring unit, configured to update the application flow monitoring table according to the unique identifier of the first application and the data flow used by the first application.

本申请实施例第三方面提供另一种电子装置,包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时,实现上述本申请实施例第一方面提供的应用程序的流量控制方法。The third aspect of the embodiment of the present application provides another electronic device, including: a memory, a processor, and a computer program stored on the memory and operable on the processor. When the processor executes the computer program, , implementing the flow control method for the application program provided in the first aspect of the embodiment of the present application.

本申请实施例第四方面提供一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时,实现上述本申请实施例第一方面提供的应用程序的流量控制方法。The fourth aspect of the embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the method for controlling the flow of the application program provided in the first aspect of the above-mentioned embodiment of the present application is implemented. .

由上可见,本申请方案在第一终端连接上第二终端创建的WiFi热点之后,建立了第一终端的应用程序流量监控表,当获取到第一终端收发的网络数据包时,提取所述网络数据包中第一应用程序的唯一标识符以及所述第一应用程序使用的数据流量,根据所述第一应用程序的唯一标识符以及所述第一应用程序使用的数据流量更新所述应用程序流量监控表,实现了对第一终端中的应用程序分别进行流量监控,使得应用程序的流量监控更加精确。It can be seen from the above that after the first terminal connects to the WiFi hotspot created by the second terminal, the solution of this application establishes the application flow monitoring table of the first terminal, and when the network data packets sent and received by the first terminal are obtained, the The unique identifier of the first application program and the data flow used by the first application program in the network data packet, and the application is updated according to the unique identifier of the first application program and the data flow used by the first application program The program traffic monitoring table realizes the traffic monitoring of the application programs in the first terminal respectively, so that the traffic monitoring of the application programs is more accurate.

附图说明Description of drawings

图1-a为本申请实施例提供的应用程序的流量控制方法的一个流程示意图;Fig. 1-a is a schematic flow chart of the flow control method of the application program provided by the embodiment of the present application;

图1-b为本申请实施例提供的应用程序的流量控制方法的另一个流程示意图;Fig. 1-b is another schematic flowchart of the flow control method of the application program provided by the embodiment of the present application;

图2为本申请一实施例提供的电子装置结构示意图;FIG. 2 is a schematic structural diagram of an electronic device provided by an embodiment of the present application;

图3为本申请另一实施例提供的电子装置硬件结构示意图。FIG. 3 is a schematic diagram of a hardware structure of an electronic device provided by another embodiment of the present application.

具体实施方式Detailed ways

为使得本申请的发明目的、特征、优点能够更加的明显和易懂,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而非全部实施例。基于本申请中的实施例,本领域技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。In order to make the purpose, features and advantages of the present application more obvious and understandable, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described The embodiments are only some of the embodiments of the present application, but not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without making creative efforts belong to the scope of protection of this application.

实施例一Embodiment one

本申请实施例提供一种应用程序的流量控制方法,该应用程序的流量控制方法应用于电子装置,该电子装置可以为智能手机、平板电脑、可穿戴设备等可安装应用程序的设备,上述电子装置的操作系统可以为ios、android、windows系统或其它操作系统,此处不作限定。An embodiment of the present application provides a flow control method for an application program. The flow control method for an application program is applied to an electronic device. The operating system of the device may be ios, android, windows system or other operating systems, which are not limited here.

请参阅图1-a,该应用程序的流量控制方法主要包括以下步骤:Please refer to Figure 1-a, the flow control method of this application mainly includes the following steps:

101、建立所述第一终端的应用程序流量监控表;101. Establish an application traffic monitoring table of the first terminal;

响应于第一终端连接第二终端创建的无线保真WiFi热点,第二终端建立所述第一终端的应用程序流量监控表,所述应用程序流量监控表用于分别统计所述第一终端中各个应用程序使用的所述WiFi热点的数据流量。In response to the first terminal connecting to the wireless fidelity WiFi hotspot created by the second terminal, the second terminal establishes an application traffic monitoring table of the first terminal, and the application traffic monitoring table is used to respectively count The data traffic of the WiFi hotspot used by each application.

本发明实施例中的第一终端为连接WiFi热点的终端设备,第二终端为创建WiFi热点的终端设备。In the embodiment of the present invention, the first terminal is a terminal device that connects to a WiFi hotspot, and the second terminal is a terminal device that creates a WiFi hotspot.

本发明实施例中的应用程序流量监控表包括:各个应用程序的标识信息(如,应用程序的唯一标识符或应用程序的名称),各个应用程序的流量统计信息;进一步的,应用程序流量监控表还可以包括应用程序所连接的域名系统(Domain Name System,DNS)服务器的信息,以便于后续可以直接限制应用程序与DNS服务器之间的数据交互。The application program traffic monitoring table in the embodiment of the present invention includes: the identification information of each application program (such as the unique identifier of the application program or the name of the application program), the traffic statistics information of each application program; further, the application program traffic monitoring The table may also include information about a domain name system (Domain Name System, DNS) server to which the application program is connected, so that the subsequent data exchange between the application program and the DNS server can be directly restricted.

102、获取所述第一终端收发的网络数据包;102. Acquire network data packets sent and received by the first terminal;

第二终端获取所述第一终端收发的网络数据包。具体的,网络数据包包括第一终端的访问互联网产生的所有交互数据。The second terminal acquires the network data packets sent and received by the first terminal. Specifically, the network data packet includes all interaction data generated when the first terminal accesses the Internet.

由于第一终端连接了第二终端建立的WiFi热点,因此,第一终端的访问互联网所产生的所有网络数据包都会经过第二终端,因此第二终端可获取所述第一终端收发的网络数据包。Since the first terminal is connected to the WiFi hotspot established by the second terminal, all network data packets generated by the first terminal's access to the Internet will pass through the second terminal, so the second terminal can obtain the network data sent and received by the first terminal Bag.

103、提取所述网络数据包中第一应用程序的唯一标识符以及所述第一应用程序使用的数据流量;103. Extract the unique identifier of the first application program in the network data packet and the data traffic used by the first application program;

第二终端提取所述网络数据包中第一应用程序的唯一标识符以及所述第一应用程序使用的数据流量。The second terminal extracts the unique identifier of the first application program and the data traffic used by the first application program in the network data packet.

示例性的,所述唯一标识符可以为应用程序的名称,序列号或数字代码。Exemplarily, the unique identifier may be the name of the application program, a serial number or a digital code.

示例性的,数据流量可以为所述网络数据包中记录的关于数据流量的信息,也可以为第二终端通过自身的流量监控系统统计到的,获取该网络数据包所产生的数据流量;可以理解的是,数据流量的获取以及统计方式在实际应用中可以有多种的实现方式,此处具体不做限定。Exemplarily, the data flow may be the information about the data flow recorded in the network data packet, or may be the data flow generated by the network data packet obtained by the second terminal through its own flow monitoring system; It should be understood that there may be various ways of obtaining and counting data traffic in practical applications, which are not specifically limited here.

104、根据所述第一应用程序的唯一标识符以及所述第一应用程序使用的数据流量更新所述应用程序流量监控表。104. Update the application traffic monitoring table according to the unique identifier of the first application and the data traffic used by the first application.

第二终端根据所述第一应用程序的唯一标识符以及所述第一应用程序使用的数据流量更新所述应用程序流量监控表。The second terminal updates the application flow monitoring table according to the unique identifier of the first application and the data flow used by the first application.

示例性的,第二终端可以判断所述第一应用程序是否已经在该应用程序流量监控表中建立监控信息,若没有,则在该应用程序流量监控表中建立所述第一应用程序的监控项目,并根据该数据流量初始话所述第一应用程序的流量统计数据;若有,则在应用程序流量监控表中第一应用程序的流量统计数字上累加所述数据流量,以完成第一应用程序的流量统计。Exemplarily, the second terminal may determine whether the first application has established monitoring information in the application traffic monitoring table, and if not, establish the monitoring information of the first application in the application traffic monitoring table project, and based on the data traffic, initially report the traffic statistics data of the first application program; if there is, then add the data traffic to the traffic statistics data of the first application program in the application program traffic monitoring table, so as to complete the first Application traffic statistics.

在现有技术中,为了防止被连接WiFi热点的终端的流量被过度的使用,往往通过断开某一终端的WiFi热点连接来实现流量控制;但是,在实际应用中,某些应用程序的自发性下载往往不是WiFi热点的使用者的初衷,既然建立WiFi热点的用户选择通过移动WiFi热点来共享流量,就一定程度意味着对热点使用者的信任,若直接断开连接,热点使用者又要跟热点建立者联系,重新执行热点连接的操作,造成不必要的重复劳动。In the prior art, in order to prevent the traffic of the terminal connected to the WiFi hotspot from being excessively used, flow control is often realized by disconnecting the WiFi hotspot connection of a certain terminal; however, in practical applications, the spontaneous Free downloading is often not the original intention of users of WiFi hotspots. Since users who set up WiFi hotspots choose to share traffic through mobile WiFi hotspots, it means to a certain extent that they trust the hotspot users. If they disconnect directly, the hotspot users will have to Contact the hotspot creator and re-execute the operation of the hotspot connection, resulting in unnecessary duplication of labor.

而在本发明实施例中,在第一终端连接上第二终端创建的WiFi热点之后,建立了第一终端的应用程序流量监控表,当获取到第一终端收发的网络数据包时,提取所述网络数据包中第一应用程序的唯一标识符以及所述第一应用程序使用的数据流量,根据所述第一应用程序的唯一标识符以及所述第一应用程序使用的数据流量更新所述应用程序流量监控表,实现了对第一终端中的应用程序分别进行流量监控,使得应用程序的流量监控更加精确。在防止一些自发性应用消耗流量的同时,也避免了无断开第一终端的WiFi热点连接。However, in the embodiment of the present invention, after the first terminal connects to the WiFi hotspot created by the second terminal, the application flow monitoring table of the first terminal is established. The unique identifier of the first application program in the network data packet and the data flow used by the first application program, and update the The application flow monitoring table realizes the flow monitoring of the application programs in the first terminal respectively, so that the flow monitoring of the application programs is more accurate. While preventing some spontaneous applications from consuming traffic, it also avoids not disconnecting the WiFi hotspot connection of the first terminal.

实施例二Embodiment two

请参阅图1-b,本发明实施例中应用程序的流量控制方法的另一个实施例包括:Please refer to Fig. 1-b, another embodiment of the application flow control method in the embodiment of the present invention includes:

201、建立所述第一终端的应用程序流量监控表;201. Establish an application traffic monitoring table of the first terminal;

202、获取所述第一终端收发的网络数据包;202. Acquire network data packets sent and received by the first terminal;

203、提取所述网络数据包中第一应用程序的唯一标识符以及所述第一应用程序使用的数据流量;203. Extract the unique identifier of the first application program in the network data packet and the data traffic used by the first application program;

204、根据所述第一应用程序的唯一标识符以及所述第一应用程序使用的数据流量更新所述应用程序流量监控表;204. Update the application traffic monitoring table according to the unique identifier of the first application and the data traffic used by the first application;

本发明实施例中步骤201至204与实施例一中的步骤101至104一致,此处不再赘述。Steps 201 to 204 in this embodiment of the present invention are consistent with steps 101 to 104 in Embodiment 1, and will not be repeated here.

205、监控到应用程序流量监控表中第二应用程序的数据流量超过流量限制阈值;205. It is monitored that the data flow of the second application in the application flow monitoring table exceeds the flow limit threshold;

第二终端监控到应用程序流量监控表中第二应用程序的数据流量超过流量限制阈值,其中,所述流量限制阈值可由用户根据自身的流量套餐设置,此处不做限定。The second terminal monitors that the data traffic of the second application program in the application program traffic monitoring table exceeds the traffic limit threshold, wherein the traffic limit threshold can be set by the user according to his/her own traffic package, which is not limited here.

进一步的,在监控过程中,还可以加入时间维度的参考,如,若所述应用程序流量监控表中第二应用程序在预设时间内使用的数据流量超过流量限制阈值,再触发后续操作。Further, during the monitoring process, a reference to the time dimension can also be added, for example, if the data traffic used by the second application in the application traffic monitoring table exceeds the traffic limit threshold within a preset time, subsequent operations are triggered.

可以理解的是,在实际应用中,响应于所述应用程序流量监控表中第二应用程序在预设时间内使用的数据流量超过流量限制阈值之后,可以直接执行步骤207或直接执行步骤208,具体视需求而定,此处不做限定。It can be understood that, in practical applications, step 207 or step 208 may be directly executed in response to the fact that the data traffic used by the second application in the application traffic monitoring table exceeds the traffic limit threshold within a preset time, It depends on the specific needs and is not limited here.

206、确定所述第二应用程序是否为白名单程序;206. Determine whether the second application program is a whitelist program;

第二终端确定所述第二应用程序是否为白名单程序,若否,则执行步骤207,若是,则不响应所述应用程序流量监控表中第二应用程序的数据流量超过流量限制阈值之后的步骤,终止当前流程。The second terminal determines whether the second application program is a whitelist program, if not, execute step 207, and if so, does not respond to the data traffic of the second application program in the application program traffic monitoring table after the traffic limit threshold is exceeded. Step to terminate the current process.

可选的,所述白名单程序可以由用户自主设置,在白名单程序中的应用程序,就算超出流量限制阈值也不进行限制操作。Optionally, the white list program can be set by the user independently, and the application program in the white list program will not perform restriction operation even if the traffic restriction threshold is exceeded.

207、向所述第二终端发出所述第二应用程序的流量警示信息;207. Send traffic warning information of the second application program to the second terminal;

在确定第二应用程序超出流量限制阈值,且非白名单程序之后,可以在第二终端的显示界面中提示用户该第二应用程序的流量警示信息,并提供是否禁止该第二应用程序访问网络的选项,响应于用户反馈的操作指示信息,第二终端根据所述操作指示信息执行相应的操作。若所述操作指示信息为限制所述第二应用程序使用数据流量,则执行步骤208,禁止所述第二应用程序使用数据流量;若所述操作指示信息为不限制所述第二应用程序使用数据流量,则不响应所述用户反馈的操作指示信息之后的步骤,终止当前流程。After determining that the second application program exceeds the traffic limit threshold and is not a whitelist program, the user may be prompted with the traffic warning information of the second application program on the display interface of the second terminal, and whether to prohibit the second application program from accessing the network option, and in response to the operation indication information fed back by the user, the second terminal performs a corresponding operation according to the operation indication information. If the operation instruction information is to limit the data traffic used by the second application program, perform step 208 to prohibit the second application program from using data traffic; if the operation instruction information is not to restrict the use of the second application program data traffic, the steps after the operation indication information fed back by the user are not responded to, and the current process is terminated.

208、限制所述第二应用程序使用数据流量。208. Limit the data traffic used by the second application program.

示例性的,可以针对所述第二应用程序设置流量防火墙,若接收到的网络请求包中包含所述第二应用程序的唯一标识符,则拒绝包含所述网络请求包访问网络。Exemplarily, a traffic firewall may be set for the second application program, and if the received network request packet contains the unique identifier of the second application program, deny the network request packet containing the network request to access the network.

在本发明实施例中,在移动终端作为个人热点被连接后,开始统计连接设备访问服务器消耗的流量,当消耗的流量在特定时间内达到预设值时,则提醒用户是否禁止访问该服务器,用户选择禁止后,则连接设备无法访问该服务器,即对应的运行程序无法上网,但其他程序仍然可以上网。In the embodiment of the present invention, after the mobile terminal is connected as a personal hotspot, the traffic consumed by the connected device to access the server starts to be counted, and when the consumed traffic reaches a preset value within a certain period of time, the user is reminded whether to prohibit access to the server, After the user chooses to prohibit, the connected device cannot access the server, that is, the corresponding running program cannot access the Internet, but other programs can still access the Internet.

本发明实施例提供了在对第一终端的各个应用程序建立流量监控的各种可选操作,可基于实际情况灵活的选择相应的监控方式,以获得符合用户需求的监控效果,大大提高了对应用程序进行监控的灵活度和精确度。The embodiment of the present invention provides various optional operations for establishing traffic monitoring for each application program of the first terminal, and the corresponding monitoring mode can be flexibly selected based on the actual situation, so as to obtain a monitoring effect that meets the user's needs, which greatly improves the user experience. The flexibility and precision with which applications can be monitored.

实施例三Embodiment Three

请参阅图2,为本申请实施例提供一种电子装置。该电子装置可用于实现上述图1所示实施例提供的应用程序的流量控制方法。如图1-b所示,该电子装置主要包括:Please refer to FIG. 2 , which provides an electronic device according to the embodiment of the present application. The electronic device can be used to implement the flow control method of the application program provided by the embodiment shown in FIG. 1 above. As shown in Figure 1-b, the electronic device mainly includes:

监控表建立单元21,用于响应于第一终端连接第二终端创建的无线保真WiFi热点,建立所述第一终端的应用程序流量监控表,所述应用程序流量监控表用于分别统计所述第一终端中各个应用程序使用的所述WiFi热点的数据流量;The monitoring table establishing unit 21 is configured to establish an application traffic monitoring table of the first terminal in response to the first terminal connecting to the wireless fidelity WiFi hotspot created by the second terminal, and the application traffic monitoring table is used for respectively counting all The data flow of the WiFi hotspot used by each application program in the first terminal;

数据包接收单元22,用于获取所述第一终端收发的网络数据包;A data packet receiving unit 22, configured to obtain network data packets sent and received by the first terminal;

数据提取单元23,用于提取所述网络数据包中第一应用程序的唯一标识符以及所述第一应用程序使用的数据流量;A data extraction unit 23, configured to extract the unique identifier of the first application program in the network data packet and the data traffic used by the first application program;

流量监控单元24,用于根据所述第一应用程序的唯一标识符以及所述第一应用程序使用的数据流量更新所述应用程序流量监控表。The flow monitoring unit 24 is configured to update the application flow monitoring table according to the unique identifier of the first application and the data flow used by the first application.

可选的,所述流量监控单元24还用于:Optionally, the flow monitoring unit 24 is also used for:

响应于所述应用程序流量监控表中第二应用程序的数据流量超过流量限制阈值,则向所述第二终端发出所述第二应用程序的流量警示信息,或限制所述第二应用程序使用数据流量。In response to the data traffic of the second application program in the application program traffic monitoring table exceeding the traffic limit threshold, sending the traffic warning information of the second application program to the second terminal, or restricting the use of the second application program Data Flow.

需要说明的是,以上图2示例的电子装置的实施方式中,各功能模块的划分仅是举例说明,实际应用中可以根据需要,例如相应硬件的配置要求或者软件的实现的便利考虑,而将上述功能分配由不同的功能模块完成,即将电子装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。而且,在实际应用中,本实施例中的相应的功能模块可以是由相应的硬件实现,也可以由相应的硬件执行相应的软件完成。本说明书提供的各个实施例都可应用上述描述原则,以下不再赘述。It should be noted that, in the implementation of the electronic device illustrated in FIG. 2 above, the division of each functional module is only an example. In practical applications, it can be considered according to needs, such as the configuration requirements of corresponding hardware or the convenience of software implementation. The above function allocation is accomplished by different functional modules, that is, the internal structure of the electronic device is divided into different functional modules to complete all or part of the functions described above. Moreover, in practical applications, the corresponding functional modules in this embodiment may be realized by corresponding hardware, or may be completed by corresponding hardware executing corresponding software. Each of the embodiments provided in this specification can apply the above-mentioned description principle, which will not be described in detail below.

本实施例提供的电子装置中各功能模块实现各自功能的具体过程,请参见上述图1-a所示实施例中描述的具体内容,此处不再赘述。For the specific process of each functional module in the electronic device provided in this embodiment to realize their respective functions, please refer to the specific content described in the embodiment shown in FIG. 1-a above, which will not be repeated here.

由上可见,本申请方案在第一终端连接上第二终端创建的WiFi热点之后,建立了第一终端的应用程序流量监控表,当获取到第一终端收发的网络数据包时,提取所述网络数据包中第一应用程序的唯一标识符以及所述第一应用程序使用的数据流量,根据所述第一应用程序的唯一标识符以及所述第一应用程序使用的数据流量更新所述应用程序流量监控表,实现了对第一终端中的应用程序分别进行流量监控,使得应用程序的流量监控更加精确。It can be seen from the above that after the first terminal connects to the WiFi hotspot created by the second terminal, the solution of this application establishes the application flow monitoring table of the first terminal, and when the network data packets sent and received by the first terminal are obtained, the The unique identifier of the first application program and the data flow used by the first application program in the network data packet, and the application is updated according to the unique identifier of the first application program and the data flow used by the first application program The program traffic monitoring table realizes the traffic monitoring of the application programs in the first terminal respectively, so that the traffic monitoring of the application programs is more accurate.

实施例四Embodiment four

本申请实施例提供一种电子装置,请参阅图3,该电子装置包括:An embodiment of the present application provides an electronic device, please refer to Figure 3, the electronic device includes:

存储器301、处理器302及存储在存储器301上并可在处理器302上运行的计算机程序,处理器302执行该计算机程序时,实现前述图1-a所示实施例中描述的应用程序的流量控制方法。Memory 301, processor 302, and a computer program stored on the memory 301 and operable on the processor 302. When the processor 302 executes the computer program, it realizes the flow of the application program described in the embodiment shown in FIG. 1-a. Control Method.

进一步的,该电子装置还包括:Further, the electronic device also includes:

至少一个输入设备303以及至少一个输出设备304。At least one input device 303 and at least one output device 304 .

上述存储器301、处理器302、输入设备303以及输出设备304,通过总线305连接。The above-mentioned memory 301 , processor 302 , input device 303 and output device 304 are connected through a bus 305 .

其中,输入设备303具体可为摄像头、触控面板、物理按键或者鼠标等等。输出设备304具体可为显示屏。Wherein, the input device 303 may specifically be a camera, a touch panel, a physical button or a mouse, and the like. The output device 304 may specifically be a display screen.

存储器301可以是高速随机存取记忆体(RAM,Random Access Memory)存储器,也可为非不稳定的存储器(non-volatile memory),例如磁盘存储器。存储器301用于存储一组可执行程序代码,处理器302与存储器301耦合。The memory 301 may be a high-speed random access memory (RAM, Random Access Memory) memory, or a non-volatile memory (non-volatile memory), such as a disk memory. The memory 301 is used to store a set of executable program codes, and the processor 302 is coupled to the memory 301 .

进一步的,本申请实施例还提供了一种计算机可读存储介质,该计算机可读存储介质可以是设置于上述各实施例中的电子装置中,该计算机可读存储介质可以是前述图3所示实施例中的存储器。该计算机可读存储介质上存储有计算机程序,该程序被处理器执行时实现前述图1-a所示实施例中描述的应用程序的流量控制方法。进一步的,该计算机可存储介质还可以是U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、RAM、磁碟或者光盘等各种可以存储程序代码的介质。Further, the embodiment of the present application also provides a computer-readable storage medium, which can be set in the electronic device in each of the above-mentioned embodiments, and the computer-readable storage medium can be the memory in the example embodiment. A computer program is stored on the computer-readable storage medium, and when the program is executed by a processor, the flow control method of the application program described in the foregoing embodiment shown in FIG. 1-a is implemented. Further, the computer storage medium may also be various media capable of storing program codes such as a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), RAM, a magnetic disk or an optical disk.

在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个模块或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或模块的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed devices and methods may be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the modules is only a logical function division. In actual implementation, there may be other division methods. For example, multiple modules or components can be combined or May be integrated into another system, or some features may be ignored, or not implemented. In another point, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or modules may be in electrical, mechanical or other forms.

所述作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理模块,即可以位于一个地方,或者也可以分布到多个网络模块上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。The modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place, or may be distributed to multiple network modules. Part or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

另外,在本申请各个实施例中的各功能模块可以集成在一个处理模块中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。In addition, each functional module in each embodiment of the present application may be integrated into one processing module, each module may exist separately physically, or two or more modules may be integrated into one module. The above-mentioned integrated modules can be implemented in the form of hardware or in the form of software function modules.

所述集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个可读存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的可读存储介质包括:U盘、移动硬盘、ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。If the integrated modules are realized in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of software products, and the computer software products are stored in a readable memory The medium includes several instructions to enable a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The above-mentioned readable storage medium includes: various media capable of storing program codes such as U disk, mobile hard disk, ROM, RAM, magnetic disk or optical disk.

需要说明的是,对于前述的各方法实施例,为了简便描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本申请并不受所描述的动作顺序的限制,因为依据本申请,某些步骤可以采用其它顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定都是本申请所必须的。It should be noted that, for the sake of simplicity of description, the aforementioned method embodiments are expressed as a series of action combinations, but those skilled in the art should know that the present application is not limited by the described action sequence. Depending on the application, certain steps may be performed in other orders or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by this application.

在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其它实施例的相关描述。In the foregoing embodiments, the descriptions of each embodiment have their own emphases, and for parts not described in detail in a certain embodiment, reference may be made to relevant descriptions of other embodiments.

以上为对本申请所提供的应用程序的流量控制方法、电子装置及计算机可读存储介质的描述,对于本领域的技术人员,依据本申请实施例的思想,在具体实施方式及应用范围上均会有改变之处,综上,本说明书内容不应理解为对本申请的限制。The above is the description of the flow control method of the application program, the electronic device and the computer-readable storage medium provided by this application. For those skilled in the art, based on the idea of the embodiment of this application, they will understand both the specific implementation method and the scope of application. There are changes. In summary, the contents of this specification should not be construed as limiting the application.

Claims (10)

1. a kind of flow control methods of application program, which is characterized in that including:
In response to the wireless fidelity Wi-Fi hotspot that first terminal connection second terminal creates, the application journey of the first terminal is established Sequence traffic monitoring table, the application rs traffic monitoring table are used for counting each application program in the first terminal respectively The Wi-Fi hotspot data traffic;
Obtain the network packet of the first terminal transmitting-receiving;
Extract the number that the unique identifier of the first application program and first application program use in the network packet According to flow;
Institute is updated according to the data traffic that the unique identifier of first application program and first application program use State application rs traffic monitoring table.
2. according to the method described in claim 1, it is characterized in that, the application rs traffic prison for establishing the first terminal After controlling table, the method further includes:
In response to the application rs traffic monitor table in the second application program data traffic be more than flow restriction threshold value, then to The second terminal sends out the flow information warning of second application program, or limitation second application program uses data Flow.
3. according to the method described in claim 1, it is characterized in that, the application rs traffic prison for establishing the first terminal After controlling table, the method further includes:
The data traffic used in preset time in response to the second application program in the application rs traffic monitoring table is more than Flow restriction threshold value, then send out the flow information warning of second application program to the second terminal, or limitation described the Two application programs use data traffic.
4. according to the method described in claim 2, it is characterized in that, being answered in response in the application rs traffic monitoring table second It is more than flow restriction threshold value with the data traffic of program, in the flow police for sending out second application program to the second terminal Before showing information, or before limiting second application program using data traffic, the method further includes:
Determine whether second application program is white list program;
If it is not, the flow information warning that second application program is sent out to the second terminal is then executed, or limitation institute State the step of the second application program is using data traffic;
If so, the data traffic for being not responding to the second application program in the application rs traffic monitoring table is more than flow restriction threshold The step of after value.
5. according to the method in claim 2 or 3, which is characterized in that described to send out described second to the second terminal and answer After the flow information warning of program, including:
In response to the operation instruction information of user feedback, corresponding operation is executed according to the operation instruction information.
6. according to claim 2,3 or 4 any one of them methods, which is characterized in that if limitation second application program makes With data traffic, then limitation second application program includes using data traffic:
Flow fire wall is set for second application program, if being applied comprising described second in the network request packet received The unique identifier of program, then refusal includes that the network request packet accesses network.
7. a kind of electronic device, which is characterized in that including:
Monitoring table establishes unit, and the wireless fidelity Wi-Fi hotspot for being created in response to first terminal connection second terminal is established The application rs traffic of the first terminal monitors table, and the application rs traffic monitoring table for counting described first eventually respectively The data traffic for the Wi-Fi hotspot that each application program uses in end;
Data packet receiving unit, the network packet for obtaining the first terminal transmitting-receiving;
Data extracting unit, for extracting the unique identifier of the first application program and described first in the network packet The data traffic that application program uses;
Traffic monitoring unit, for being used according to the unique identifier of first application program and first application program Data traffic update the application rs traffic and monitor table.
8. electronic device according to claim 1, which is characterized in that the traffic monitoring unit is additionally operable to:
In response to the application rs traffic monitor table in the second application program data traffic be more than flow restriction threshold value, then to The second terminal sends out the flow information warning of second application program, or limitation second application program uses data Flow.
9. a kind of electronic device, including:It memory, processor and is stored on the memory and can transport on the processor Capable computer program, which is characterized in that when the processor executes the computer program, realize in claim 1 to 6 Any one the method.
10. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the computer program When being executed by processor, any one the method in claim 1 to 6 is realized.
CN201810367518.7A 2018-04-23 2018-04-23 Flow control method of application program, electronic device and computer readable storage medium Pending CN108551429A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810367518.7A CN108551429A (en) 2018-04-23 2018-04-23 Flow control method of application program, electronic device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810367518.7A CN108551429A (en) 2018-04-23 2018-04-23 Flow control method of application program, electronic device and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN108551429A true CN108551429A (en) 2018-09-18

Family

ID=63512291

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810367518.7A Pending CN108551429A (en) 2018-04-23 2018-04-23 Flow control method of application program, electronic device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN108551429A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110769423A (en) * 2018-09-26 2020-02-07 北京嘀嘀无限科技发展有限公司 Automobile data recorder control method and device and automobile data recorder
CN111031500A (en) * 2019-11-11 2020-04-17 深圳市麦谷科技有限公司 Method and device for separately charging intelligent terminal

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040010585A1 (en) * 2002-07-12 2004-01-15 Jones Jerome Kemple System and method for managing bandwidth utilization
US20070053290A1 (en) * 2005-09-02 2007-03-08 Broadcom Corporation Packet attribute based prioritization
CN103209439A (en) * 2013-03-14 2013-07-17 北京小米科技有限责任公司 Method, apparatus and device for monitoring data traffic
CN104486138A (en) * 2014-11-25 2015-04-01 北京奇虎科技有限公司 Flow monitoring method and device and monitoring server
CN105828352A (en) * 2015-01-06 2016-08-03 阿里巴巴集团控股有限公司 Flow use abnormity detection method, wireless network type recognition method and device
CN106658657A (en) * 2016-10-20 2017-05-10 青岛海信移动通信技术股份有限公司 Network access method and device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040010585A1 (en) * 2002-07-12 2004-01-15 Jones Jerome Kemple System and method for managing bandwidth utilization
US20070053290A1 (en) * 2005-09-02 2007-03-08 Broadcom Corporation Packet attribute based prioritization
CN103209439A (en) * 2013-03-14 2013-07-17 北京小米科技有限责任公司 Method, apparatus and device for monitoring data traffic
CN104486138A (en) * 2014-11-25 2015-04-01 北京奇虎科技有限公司 Flow monitoring method and device and monitoring server
CN105828352A (en) * 2015-01-06 2016-08-03 阿里巴巴集团控股有限公司 Flow use abnormity detection method, wireless network type recognition method and device
CN106658657A (en) * 2016-10-20 2017-05-10 青岛海信移动通信技术股份有限公司 Network access method and device

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110769423A (en) * 2018-09-26 2020-02-07 北京嘀嘀无限科技发展有限公司 Automobile data recorder control method and device and automobile data recorder
CN110769423B (en) * 2018-09-26 2021-12-14 北京嘀嘀无限科技发展有限公司 Automobile data recorder control method and device and automobile data recorder
CN111031500A (en) * 2019-11-11 2020-04-17 深圳市麦谷科技有限公司 Method and device for separately charging intelligent terminal

Similar Documents

Publication Publication Date Title
KR102116401B1 (en) Cross resource subscription to M2M service layer
JP7218447B2 (en) Policy control method, device and system
US10587544B2 (en) Message processing method, processing server, terminal, and storage medium
EP3742785B1 (en) Session management method and device
WO2019242574A1 (en) Method for routing internet of things service
CN103298072A (en) Method, system and mobile communication terminal for automatically connecting to WiFi access point
US20170264592A1 (en) Methods and systems for secure network service
CN109246688A (en) Equipment cut-in method, equipment and system
CN110943964B (en) Data checking method, device and storage medium
CN105338511B (en) Network topology hidden method and equipment
CN108551429A (en) Flow control method of application program, electronic device and computer readable storage medium
CN103581240B (en) Download method, user equipment and the application server of application program
CN111371896B (en) Network acceleration method, terminal and storage medium
WO2018058385A1 (en) Network interworking method, network element, and system
CN107465633A (en) Method for managing resource and device based on software defined network
CN113541981B (en) Member management method and system for network slicing
US10999729B2 (en) Discovery method and device
CN107465669A (en) The equipment safety partition method and device of a kind of multi-user
CN106302670B (en) Picture updating method, communication terminal and server
CN112383617A (en) Method, device, terminal equipment and medium for long connection
CN104270743B (en) A kind of method and device for the parameter information obtaining terminal
CN115568001B (en) A method, device and storage medium for establishing a session
CN110161985A (en) A kind of method and apparatus of the intelligent appliance security control based on CoAP agreement
CN106302671B (en) Download time setting method and server
CN111201806B (en) Method and device for reporting information by terminal and computer storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20180918

RJ01 Rejection of invention patent application after publication