WO2012174750A1 - Method, system and mobile terminal for controlling network access of applications - Google Patents

Method, system and mobile terminal for controlling network access of applications Download PDF

Info

Publication number
WO2012174750A1
WO2012174750A1 PCT/CN2011/076334 CN2011076334W WO2012174750A1 WO 2012174750 A1 WO2012174750 A1 WO 2012174750A1 CN 2011076334 W CN2011076334 W CN 2011076334W WO 2012174750 A1 WO2012174750 A1 WO 2012174750A1
Authority
WO
WIPO (PCT)
Prior art keywords
application
module
socket
network
instruction
Prior art date
Application number
PCT/CN2011/076334
Other languages
French (fr)
Chinese (zh)
Inventor
郭德英
李静
刘碧波
李俊
王文清
Original Assignee
宇龙计算机通信科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 宇龙计算机通信科技(深圳)有限公司 filed Critical 宇龙计算机通信科技(深圳)有限公司
Priority to PCT/CN2011/076334 priority Critical patent/WO2012174750A1/en
Publication of WO2012174750A1 publication Critical patent/WO2012174750A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/08Access security

Abstract

A method, a system and a mobile terminal for controlling network access of applications are provided, wherein the method, the system and the mobile terminal are suitable for the field of controlling network access. The method comprises: an application creates a Socket, and the application is associated with the Socket (S101); when the application needs to transmit data, the corresponding application is found according to the Socket (S102); and a user is prompted that the application needs to use network resources (S103). The method, the system and the mobile terminal effectively control the network access of applications to avoid a problem of generating a high traffic fee, and enhance the control of the user to applications which can access the network to enable the user to know about the usage of the current network. The method, the system and the mobile terminal can also examine the traffic status of the current network at any moment.

Description

一种控制应用程序接入网络的方法、系统及移动终端  Method, system and mobile terminal for controlling application access network 技术领域Technical field
本发明属于网络接入的控制领域,尤其涉及一种控制应用程序接入网络的方法、系统及移动终端。 The invention belongs to the field of network access control, and in particular relates to a method, a system and a mobile terminal for controlling an application access network.
背景技术Background technique
当前市面上的智能手机的数据业务大多属于长连接(长连接:即手机从开机开始则接入无线数据网络,应用程序不对网络连接进行操作,只负责数据收发。短连接:即手机正常模式下不接入无线数据网络,当应用程序请求上网时,才发起网络连接请求,建立数据网络连接后,才开始数据的收发。)。对于长连接的情况下,手机终端无法控制各个具有上网功能的应用程序的网络接入以及数据收发;对于短连接的情况下,手机终端无法控制各个具有上网功能的应用程序的数据收发。因此,不管是长连接还是短连接的情况下,由于无法有效控制数据收发,都会产生不必要的流量费用。另外,某些应用程序在后台不断访问网络,访问过程中产生大量数据,并不提示用户,用户无法了解当前网络使用情况,会导致用户在不知情的情况下,产生大量流量费用。 Currently, the data services of smart phones on the market mostly belong to long connections (long connection: that is, the mobile phone accesses the wireless data network from the start of the boot, the application does not operate on the network connection, and is only responsible for data transmission and reception. Short connection: that is, the mobile phone is in normal mode If the application does not access the wireless data network, the network connection request is initiated when the application requests the Internet access, and the data is transmitted and received only after the data network connection is established. In the case of a long connection, the mobile terminal cannot control the network access and data transmission and reception of each application having the Internet access function; in the case of a short connection, the mobile terminal cannot control the data transmission and reception of each application having the Internet access function. Therefore, in the case of a long connection or a short connection, unnecessary data charges are incurred because data transmission and reception cannot be effectively controlled. In addition, some applications continuously access the network in the background, and a large amount of data is generated during the access process, and the user is not prompted, and the user cannot understand the current network usage, which may cause the user to generate a large amount of traffic charges without knowing it.
技术问题technical problem
本发明的目的在于提供一种控制应用程序接入网络的方法、系统及移动终端,旨在解决现有技术中存在的无法有效地控制应用程序访问网络,从而导致产生大流量费用的问题。An object of the present invention is to provide a method, system, and mobile terminal for controlling application access to a network, and to solve the problem that the prior art cannot effectively control an application accessing the network, thereby causing a large traffic charge.
本发明的另一目的在于提供一种控制应用程序接入网络的系统。 Another object of the present invention is to provide a system for controlling an application access network.
本发明的另一目的在于提供一种包括上面所述的控制应用程序接入网络的系统的移动终端。Another object of the present invention is to provide a mobile terminal including the system for controlling an application access network described above.
技术解决方案Technical solution
本发明是这样实现的,一种控制应用程序接入网络的方法,所述方法包括以下步骤:The present invention is implemented in a method of controlling an application access network, the method comprising the steps of:
应用程序创建Socket,将所述应用程序与Socket进行关联;The application creates a Socket that associates the application with a Socket;
当应用程序需要进行数据传输时,根据Socket查找到对应的应用程序;When the application needs to perform data transmission, the corresponding application is found according to the Socket;
提示用户该应用程序需要使用网络资源。Prompt the user that the application needs to use network resources.
本发明提供了一种控制应用程序接入网络的系统,所述系统包括:The present invention provides a system for controlling an application access network, the system comprising:
关联模块,用于创建Socket,将应用程序与Socket进行关联;An association module for creating a Socket to associate an application with a Socket;
查找模块,用于当应用程序需要进行数据传输时,根据Socket查找到对应的应用程序;The search module is configured to find a corresponding application according to the Socket when the application needs to perform data transmission;
提示模块,用于提示用户该应用程序需要使用网络资源。A prompt module is used to prompt the user that the application needs to use network resources.
有益效果Beneficial effect
在本发明中,在建立数据通道之后,应用程序需要进行数据传输时,提示用户该应用程序需要使用网络资源,由用户决定是否进行数据传输,从而来有效地控制应用程序访问网络,避免产生大流量费用的问题。且增强用户对可上网的应用程序的控制,使用户得以了解当前网络使用情况。本发明还能随时查看当前网络的流量状态。 In the present invention, after the data channel is established, when the application needs to perform data transmission, the user is prompted to use the network resource, and the user decides whether to perform data transmission, thereby effectively controlling the application access network and avoiding large The problem of traffic costs. And enhance user control of Internet-enabled applications, so that users can understand the current network usage. The invention can also view the traffic status of the current network at any time.
附图说明DRAWINGS
图1及图2是本发明实施例提供的控制应用程序接入网络的方法的实现流程示意图。FIG. 1 and FIG. 2 are schematic diagrams showing an implementation process of a method for controlling an application to access a network according to an embodiment of the present invention.
图3是本发明实施例提供的数据网络接入的控制实现流程示意图。FIG. 3 is a schematic diagram of a control implementation process of data network access according to an embodiment of the present invention.
图4是本发明实施例提供的控制应用程序接入网络的方法的具体实现流程示意图。FIG. 4 is a schematic flowchart of a specific implementation process of a method for controlling an application to access a network according to an embodiment of the present invention.
图5至图8是本发明实施例提供的控制应用程序接入网络的系统的结构示意图。FIG. 5 is a schematic structural diagram of a system for controlling an application to access a network according to an embodiment of the present invention.
本发明的实施方式Embodiments of the invention
为了使本发明的目的、技术方案及有益效果更加清楚明白,以下结合附图及实施例,对本发明进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。The present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It is understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
在本发明实施例中,在建立数据通道之后,应用程序需要进行数据传输时,提示用户该应用程序需要使用网络资源,由用户决定是否进行数据传输,从而来有效地控制应用程序访问网络,避免产生大流量费用的问题。In the embodiment of the present invention, after the data channel is established, when the application needs to perform data transmission, the user is prompted to use the network resource, and the user decides whether to perform data transmission, thereby effectively controlling the application access network and avoiding The problem of generating large traffic costs.
请参阅图1,为本发明实施例提供的控制应用程序接入网络的方法的实现流程,其包括以下步骤:Referring to FIG. 1 , an implementation flow of a method for controlling an application to access a network according to an embodiment of the present invention includes the following steps:
在步骤S101中,应用程序创建Socket,将所述应用程序与Socket进行关联;In step S101, the application creates a Socket, and associates the application with a Socket;
在本发明实施例中,所述应用程序创建Socket,将所述应用程序与Socket进行关联的步骤,具体为:In the embodiment of the present invention, the application creates a Socket, and associates the application with a Socket, specifically:
应用程序创建一个或多个Socket;The application creates one or more Sockets;
向所述一个或多个Socket分配ID标识;Assigning an ID identifier to the one or more Sockets;
获取应用程序的进程ID;Get the process ID of the application;
建立Socket ID与进程ID间的映射表。Establish a mapping table between the Socket ID and the process ID.
在步骤S102中,当应用程序需要进行数据传输时,根据Socket查找到对应的应用程序;In step S102, when the application needs to perform data transmission, the corresponding application is found according to the Socket;
在步骤S103中,提示用户该应用程序需要使用网络资源。In step S103, the user is prompted to use the network resource.
在本发明实施例中,为了便于后续查询,还包括步骤:存储所述提示信息。In the embodiment of the present invention, in order to facilitate subsequent query, the method further includes the step of: storing the prompt information.
请参阅图2,作为本发明一优选实施例,所述方法还包括以下步骤:Referring to FIG. 2, as a preferred embodiment of the present invention, the method further includes the following steps:
在步骤S104中,接收用户输入的指令;In step S104, receiving an instruction input by a user;
在步骤S105中,判断所述指令是允许使用网络资源还是不允许使用网络资源;In step S105, it is determined whether the instruction is to allow use of network resources or not to use network resources;
在步骤S106中,若判断出是允许使用网络资源,则进行数据传输;In step S106, if it is determined that the network resource is allowed to be used, data transmission is performed;
在步骤S107中,若判断出不允许使用网络资源,则禁止进行数据传输。In step S107, if it is determined that the use of the network resource is not permitted, the data transmission is prohibited.
请参阅图3,在本发明实施例中,对于短连接的情况下,在所述应用程序需要进行数据传输之前,还包括以下步骤:Referring to FIG. 3, in the embodiment of the present invention, in the case of a short connection, before the application needs to perform data transmission, the following steps are also included:
在步骤S201中,应用程序发起拨号请求;In step S201, the application initiates a dialing request;
其中,应用程序在进行数据传输之前,需要发起PPP拨号连接,先将数据业务传输通道建立起来。The application needs to initiate a PPP dial-up connection before data transmission, and the data service transmission channel is first established.
在步骤S202中,提示用户所述应用程序需要建立数据通道;In step S202, the user is prompted to use the application to establish a data channel;
在步骤S203中,判断用户输入的指令是否是允许所述应用程序进行拨号上网;In step S203, it is determined whether the instruction input by the user is to allow the application to dial-up;
在步骤S204中,若判断出允许所述应用程序进行拨号上网,则建立数据通道;In step S204, if it is determined that the application is allowed to dial-up, the data channel is established;
在步骤S205中,若判断出不允许所述应用程序进行拨号上网,则退出所述应用程序。In step S205, if it is determined that the application is not allowed to dial-up, the application is exited.
请参阅图4,为本发明实施例提供的控制应用程序接入网络的方法的具体实现流程,其包括以下步骤:Referring to FIG. 4, a specific implementation process of a method for controlling an application to access a network according to an embodiment of the present invention includes the following steps:
在步骤S301中,应用程序创建Socket;In step S301, the application creates a Socket;
在步骤S302中,Socket管理模块分配一个Socket ID给所述应用程序,并记录应用程序进程ID与Socket ID的对应关系;In step S302, the Socket management module allocates a Socket. ID is given to the application, and the correspondence between the application process ID and the Socket ID is recorded;
在步骤S303中,所述应用程序调用Socket收/发函数;In step S303, the application calls a Socket receive/transmit function;
在步骤S304中,提示用户应用程序的Socket ID需要使用网络;In step S304, the Socket ID of the user application is prompted to use the network;
在步骤S305中,判断用户输入的指令是否是允许使用网络;In step S305, it is determined whether the instruction input by the user is to allow the use of the network;
在步骤S306中,若判断出是允许使用网络,则执行Socket收/发函数;In step S306, if it is determined that the network is allowed to be used, the Socket receive/transmit function is executed;
在步骤S307中,若判断出是不允许使用网络,则不执行Socket收/发函数。In step S307, if it is determined that the network is not allowed to be used, the Socket receive/transmit function is not executed.
在本发明实施例中,应用程序首先创建Socket,利用该Socket将http包或者ftp包等协议报文通过Socket进行发送,传递给传输层的TCP或者UDP,再向下传递给网络层的IP。In the embodiment of the present invention, the application first creates a Socket, and uses the Socket to send a protocol packet such as an http packet or an ftp packet to the TCP through the Socket, and then to the TCP or UDP of the transport layer, and then to the IP of the network layer.
传输层从应用层接收到的数据报文为http\ftp等应用层协议报文,单从报文结构上无法区分是哪个应用程序收发的,因此只能从应用层下发http或者ftp等报文的途径,也就是Socket的管理机制方面进行控制。The data packet received by the transport layer from the application layer is an application layer protocol packet such as http\ftp. It is impossible to distinguish which application is sent or received from the packet structure. Therefore, only the http or ftp packet can be sent from the application layer. The way of the text, that is, the management mechanism of the Socket is controlled.
应用程序进行数据传输前,都需要创建Socket,Socket管理模块会给应用程序返回一个Socket ID,也就是说应用程序创建的每个Socket都有一个ID作为标识,以便对指定Socket进行操作,如打开,关闭,绑定,发送数据,接收数据等操作,只要控制了应用程序创建的Socket,便可以对数据流量进行相应的控制。Before the application performs data transmission, it needs to create a Socket. The Socket Management Module will return a Socket to the application. ID, that is to say, each Socket created by the application has an ID as an identifier to operate on the specified Socket, such as opening, closing, binding, sending data, receiving data, etc., as long as the Socket created by the application is controlled. , you can control the data traffic accordingly.
应用程序创建Socket时,在Socket管理模块中获取该应用程序的进程ID,同时保存创建的Socket ID,这样就可以形成一个已创建的Socket表:
应用程序名称 进程 ID Socket ID
APP1 1905 1
APP1 1905 2
APP1 1905 3
APP2 1910 4
APP3 1911 5
APP4 1912 6
When the application creates a Socket, the process ID of the application is obtained in the Socket management module, and the created Socket ID is saved, so that a created Socket table can be formed:
Application name Process ID Socket ID
APP1 1905 1
APP1 1905 2
APP1 1905 3
APP2 1910 4
APP3 1911 5
APP4 1912 6
于应用程序来讲,进程ID可以作为该应用程序的唯一标识,一个应用程序可以创建多个ID不一样的Socket进行数据收发,这样就可以查找到指定进程ID的所有Socket。区分了各个Socket所属的应用程序后,控制各应用程序进行数据收发便成为可能。In the application, the process ID can be used as the unique identifier of the application. An application can create multiple Sockets with different IDs for data transmission and reception, so that all the sockets of the specified process ID can be found. After distinguishing the applications to which each Socket belongs, it is possible to control each application to perform data transmission and reception.
作为本发明一优选实施例,在完善了对数据收发管理后,可以将移动终端上各应用程序对网络的使用情况显示给用户,以提示用户当前网络流量的状态,所述控制应用程序接入网络的方法,还包括以下步骤:As a preferred embodiment of the present invention, after the data transmission and reception management is improved, the usage of the network by each application on the mobile terminal can be displayed to the user to prompt the user of the current network traffic status, and the control application accesses. The method of the network also includes the following steps:
接收指令,统计应用程序当前使用的网络流量;Receive instructions to count the network traffic currently used by the application;
根据所述映射表计算同一进程ID对应的Socket收发速度总和;Calculating, according to the mapping table, a sum of Socket transceiving speeds corresponding to the same process ID;
显示计算出的应用程序的收发速度总和。Displays the sum of the calculated and transmitted speeds of the calculated applications.
作为本发明另一优选实施例,所述方法还包括以下步骤:As another preferred embodiment of the present invention, the method further includes the following steps:
根据同一进程ID对应的Socket收发速度总和计算同一进程ID对应的Socket收发数据总和;Calculating the sum of the Socket transceiving data corresponding to the same process ID according to the sum of the Socket transceiving speeds corresponding to the same process ID;
显示计算出的应用程序的收发数据总和。Displays the sum of the transmitted and received data of the calculated application.
作为本发明一优选实施例,为了方便用户在应用程序正在传输数据时能随时禁止或重新允许某个应用程序使用网络进行数据传输,所述控制应用程序接入网络的方法,还包括以下步骤:As a preferred embodiment of the present invention, in order to facilitate the user to prohibit or re-allow an application to use the network for data transmission when the application is transmitting data, the method for controlling the application to access the network further includes the following steps:
接收用户输入的禁止或允许应用程序使用网络进行数据传输的指令;Receiving an instruction to disable user input or allowing an application to use the network for data transmission;
当接收的是禁止指令,则停止指定进程ID对应的所有Socket的数据收发功能;When receiving the prohibition instruction, stopping the data transceiving function of all the sockets corresponding to the specified process ID;
当接收的是允许指令,则开启指定进程ID对应的所有Socket的数据收发功能。When the instruction is allowed, the data transceiving function of all the Sockets corresponding to the specified process ID is turned on.
请参阅图5,为本发明实施例提供的控制应用程序接入网络的系统的结构,为了便于说明,仅示出了与本发明实施例相关的部分。所述控制应用程序接入网络的系统可以是内置于移动终端中的软件单元、硬件单元或者是软硬件结合的单元。Referring to FIG. 5, a structure of a system for controlling an application accessing a network according to an embodiment of the present invention is provided. For convenience of description, only parts related to the embodiment of the present invention are shown. The system in which the control application accesses the network may be a software unit, a hardware unit, or a combination of software and hardware built in the mobile terminal.
所述控制应用程序接入网络的系统包括:关联模块100、查找模块102、以及提示模块104。The system for controlling the application to access the network includes: an association module 100, a lookup module 102, and a prompting module 104.
关联模块100,用于创建Socket,将应用程序与Socket进行关联;The association module 100 is configured to create a Socket and associate the application with the Socket;
查找模块102,用于当应用程序需要进行数据传输时,根据Socket查找到对应的应用程序;The searching module 102 is configured to find a corresponding application according to the Socket when the application needs to perform data transmission;
提示模块104,用于提示用户该应用程序需要使用网络资源。The prompting module 104 is configured to prompt the user that the application needs to use network resources.
为了方便后续查询,所述系统还包括:存储模块,用于存储所述提示信息。In order to facilitate subsequent query, the system further includes: a storage module, configured to store the prompt information.
请参阅图6,在本发明实施例中,所述系统还包括:指令接收模块106、判断模块108、传输模块110、以及禁止模块112。Referring to FIG. 6, in the embodiment of the present invention, the system further includes: an instruction receiving module 106, a determining module 108, a transmitting module 110, and a prohibiting module 112.
指令接收模块106,用于接收用户输入的指令;The instruction receiving module 106 is configured to receive an instruction input by the user;
判断模块108,用于判断所述指令是允许使用网络资源还是不允许使用网络资源;The determining module 108 is configured to determine whether the instruction is to allow use of network resources or not to use network resources;
所述传输模块110,用于若判断出是允许使用网络资源,则进行数据传输;The transmission module 110 is configured to perform data transmission if it is determined that the network resource is allowed to be used;
禁止模块112,用于若判断出不允许使用网络资源,则禁止进行数据传输。The prohibition module 112 is configured to prohibit data transmission if it is determined that the network resource is not allowed to be used.
在本发明实施例中,所述系统还包括:In the embodiment of the present invention, the system further includes:
创建模块,用于创建一个或多个Socket;Create a module to create one or more Sockets;
分配模块,用于向所述一个或多个Socket分配ID标识;An allocating module, configured to allocate an ID identifier to the one or more Sockets;
获取模块,用于获取应用程序的进程ID;An acquisition module for obtaining a process ID of the application;
建立模块,用于建立Socket ID与进程ID间的映射表。A module is created for establishing a mapping table between the Socket ID and the process ID.
请参阅图7,在本发明实施例中,所述控制应用程序接入网络的系统还包括:发起模块202、第二提示模块204、第二判断模块206、通道建立模块208、以及第二退出模块210。Referring to FIG. 7, in the embodiment of the present invention, the system for controlling the application to access the network further includes: an initiating module 202, a second prompting module 204, a second judging module 206, a channel establishing module 208, and a second exit. Module 210.
发起模块202,用于发起拨号请求;The initiating module 202 is configured to initiate a dialing request;
第二提示模块204,用于提示用户所述应用程序需要建立数据通道;a second prompting module 204, configured to prompt the user that the application needs to establish a data channel;
第二判断模块206,用于判断用户输入的指令是否是允许所述应用程序进行拨号上网;The second determining module 206 is configured to determine whether the instruction input by the user is to allow the application to dial up;
通道建立模块208,用于如果判断出允许所述应用程序进行拨号上网,则建立数据通道;a channel establishing module 208, configured to establish a data channel if it is determined that the application is allowed to dial-up Internet access;
第二退出模块210,用于如果判断出不允许所述应用程序进行拨号上网,则退出所述应用程序。The second exiting module 210 is configured to exit the application if it is determined that the application is not allowed to dial up.
请参阅图8,在本发明实施例中,所述控制应用程序接入网络的系统还包括:创建模块301、Socket管理模块302、调用模块303、第三提示模块304、第三判断模块305、以及函数执行控制模块306。Referring to FIG. 8, in the embodiment of the present invention, the system for controlling the application to access the network further includes: a creating module 301, a Socket management module 302, a calling module 303, a third prompting module 304, and a third determining module 305. And a function execution control module 306.
创建模块301,用于创建Socket;a module 301 is created for creating a Socket;
Socket管理模块302,用于分配一个Socket ID给所述应用程序,并记录应用程序进程ID与Socket ID的对应关系;Socket management module 302 for allocating a Socket ID is given to the application, and the correspondence between the application process ID and the Socket ID is recorded;
调用模块303,用于调用Socket收/发函数;Calling module 303, used to call the Socket receive/transmit function;
第三提示模块304,用于提示用户应用程序的Socket ID需要使用网络;The third prompt module 304 is configured to prompt the user that the Socket ID of the application needs to use the network;
第三判断模块305,用于判断用户输入的指令是否是允许使用网络;The third determining module 305 is configured to determine whether the instruction input by the user is allowed to use the network;
函数执行控制模块306,用于如果判断出是允许使用网络,则执行Socket收/发函数;如果判断出是不允许使用网络,则不执行Socket收/发函数。The function execution control module 306 is configured to execute a Socket receive/transmit function if it is determined that the network is allowed to be used; if it is determined that the network is not allowed to be used, the Socket receive/transmit function is not executed.
在本发明实施例中,所述控制应用程序接入网络的系统还包括:In the embodiment of the present invention, the system for controlling the application to access the network further includes:
统计模块,用于接收指令,统计应用程序当前使用的网络流量;a statistics module, configured to receive an instruction to count network traffic currently used by the application;
计算模块,用于根据所述映射表计算同一进程ID对应的Socket收发速度总和;a calculation module, configured to calculate, according to the mapping table, a sum of Socket transceiving speeds corresponding to the same process ID;
显示模块,用于显示计算出的应用程序的收发速度总和。A display module for displaying the sum of the transceiving speeds of the calculated applications.
进一步地,所述系统还包括:Further, the system further includes:
第二计算模块,用于根据同一进程ID对应的Socket收发速度总和计算同一进程ID对应的Socket收发数据总和;a second calculating module, configured to calculate a sum of Socket transceiving data corresponding to the same process ID according to a sum of Socket transceiving speeds corresponding to the same process ID;
第二显示模块,用于显示计算出的应用程序的收发数据总和。The second display module is configured to display the sum of the transceived data of the calculated application.
在本发明实施例中,所述控制应用程序接入网络的系统还包括:接收模块、停止模块、以及开启模块。In the embodiment of the present invention, the system for controlling the application to access the network further includes: a receiving module, a stopping module, and an opening module.
所述接收模块,用于接收用户输入的禁止或允许应用程序使用网络进行数据传输的指令;The receiving module is configured to receive an instruction of a user input prohibiting or allowing an application to use a network for data transmission;
停止模块,用于当接收的是禁止指令,则停止指定进程ID对应的所有Socket的数据收发功能;Stopping the module, when receiving the prohibition instruction, stopping the data transceiving function of all the sockets corresponding to the specified process ID;
开启模块,用于当接收的是允许指令,则开启指定进程ID对应的所有Socket的数据收发功能。The module is enabled to enable the data transceiving function of all the Sockets corresponding to the specified process ID when the instruction is allowed.
综上所述,本发明实施例在建立数据通道之后,应用程序需要进行数据传输时,提示用户该应用程序需要使用网络资源,由用户决定是否进行数据传输,从而来有效地控制应用程序访问网络,避免产生大流量费用的问题。且增强用户对可上网的应用程序的控制,使用户得以了解当前网络使用情况。本发明还能随时查看当前网络的流量状态。In summary, after the data channel is established in the embodiment of the present invention, when the application needs to perform data transmission, the user is prompted to use the network resource, and the user decides whether to perform data transmission, thereby effectively controlling the application access network. To avoid the problem of large traffic costs. And enhance user control of Internet-enabled applications, so that users can understand the current network usage. The invention can also view the traffic status of the current network at any time.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,所述的程序可以在存储于一计算机可读取存储介质中,所述的存储介质,如ROM/RAM、磁盘、光盘等。A person skilled in the art can understand that all or part of the steps of implementing the above embodiments can be completed by a program instructing related hardware, and the program can be stored in a computer readable storage medium. Storage media such as ROM/RAM, magnetic disks, optical disks, etc.
以上所述仅为本发明的较佳实施例而已,并不用以限制本发明,凡在本发明的精神和原则之内所作的任何修改、等同替换和改进等,均应包含在本发明的保护范围之内。The above is only the preferred embodiment of the present invention, and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection of the present invention. Within the scope.

Claims (15)

  1. 一种控制应用程序接入网络的方法,其特征在于,所述方法包括以下步骤:A method of controlling an application access network, the method comprising the steps of:
    应用程序创建Socket,将所述应用程序与Socket进行关联;The application creates a Socket that associates the application with a Socket;
    当应用程序需要进行数据传输时,根据Socket查找到对应的应用程序;When the application needs to perform data transmission, the corresponding application is found according to the Socket;
    提示用户该应用程序需要使用网络资源。Prompt the user that the application needs to use network resources.
  2. 如权利要求1所述的方法,其特征在于,所述方法还包括以下步骤:The method of claim 1 wherein said method further comprises the steps of:
    接收用户输入的指令;Receiving an instruction input by a user;
    判断所述指令是允许使用网络资源还是不允许使用网络资源;Determining whether the instruction is to allow use of network resources or not to use network resources;
    若判断出是允许使用网络资源,则进行数据传输;If it is determined that the network resource is allowed to be used, data transmission is performed;
    若判断出不允许使用网络资源,则禁止进行数据传输。If it is determined that network resources are not allowed, data transmission is prohibited.
  3. 如权利要求1所述的方法,其特征在于,所述应用程序创建Socket,将所述应用程序与Socket进行关联的步骤,具体为:The method of claim 1, wherein the application creates a Socket, and associates the application with a Socket, specifically:
    应用程序创建一个或多个Socket;The application creates one or more Sockets;
    向所述一个或多个Socket分配ID标识;Assigning an ID identifier to the one or more Sockets;
    获取应用程序的进程ID;Get the process ID of the application;
    建立Socket ID与进程ID间的映射表。Establish a mapping table between the Socket ID and the process ID.
  4. 如权利要求3所述的方法,其特征在于,所述方法还包括以下步骤:The method of claim 3 wherein said method further comprises the steps of:
    接收指令,统计应用程序当前使用的网络流量;Receive instructions to count the network traffic currently used by the application;
    根据所述映射表计算同一进程ID对应的Socket收发速度总和;Calculating, according to the mapping table, a sum of Socket transceiving speeds corresponding to the same process ID;
    显示计算出的应用程序的收发速度总和。Displays the sum of the calculated and transmitted speeds of the calculated applications.
  5. 如权利要求3所述的方法,其特征在于,所述方法还包括以下步骤:The method of claim 3 wherein said method further comprises the steps of:
    接收用户输入的禁止或允许应用程序使用网络进行数据传输的指令;Receiving an instruction to disable user input or allowing an application to use the network for data transmission;
    当接收的是禁止指令,则停止指定进程ID对应的所有Socket的数据收发功能;When receiving the prohibition instruction, stopping the data transceiving function of all the sockets corresponding to the specified process ID;
    当接收的是允许指令,则开启指定进程ID对应的所有Socket的数据收发功能。When the instruction is allowed, the data transceiving function of all the Sockets corresponding to the specified process ID is turned on.
  6. 如权利要求4所述的方法,其特征在于,所述方法还包括以下步骤:The method of claim 4 wherein said method further comprises the steps of:
    根据同一进程ID对应的Socket收发速度总和计算同一进程ID对应的Socket收发数据总和;Calculating the sum of the Socket transceiving data corresponding to the same process ID according to the sum of the Socket transceiving speeds corresponding to the same process ID;
    显示计算出的应用程序的收发数据总和。Displays the sum of the transmitted and received data of the calculated application.
  7. 如权利要求1所述的方法,其特征在于,所述方法还包括以下步骤:The method of claim 1 wherein said method further comprises the steps of:
    存储所述提示信息。The prompt information is stored.
  8. 一种控制应用程序接入网络的系统,其特征在于,所述系统包括:A system for controlling an application access network, the system comprising:
    关联模块,用于创建Socket,将应用程序与Socket进行关联;An association module for creating a Socket to associate an application with a Socket;
    查找模块,用于当应用程序需要进行数据传输时,根据Socket查找到对应的应用程序;The search module is configured to find a corresponding application according to the Socket when the application needs to perform data transmission;
    提示模块,用于提示用户该应用程序需要使用网络资源。A prompt module is used to prompt the user that the application needs to use network resources.
  9. 如权利要求8所述的系统,其特征在于,所述系统还包括:The system of claim 8 wherein said system further comprises:
    指令接收模块,用于接收用户输入的指令;An instruction receiving module, configured to receive an instruction input by a user;
    判断模块,用于判断所述指令是允许使用网络资源还是不允许使用网络资源;a determining module, configured to determine whether the instruction is to allow use of network resources or not to use network resources;
    传输模块,用于若判断出是允许使用网络资源,则进行数据传输;a transmission module, configured to perform data transmission if it is determined that the network resource is allowed to be used;
    禁止模块,用于若判断出不允许使用网络资源,则禁止进行数据传输。The prohibition module is used to prohibit data transmission if it is determined that network resources are not allowed to be used.
  10. 如权利要求8所述的系统,其特征在于,所述系统还包括:The system of claim 8 wherein said system further comprises:
    创建模块,用于创建一个或多个Socket;Create a module to create one or more Sockets;
    分配模块,用于向所述一个或多个Socket分配ID标识;An allocating module, configured to allocate an ID identifier to the one or more Sockets;
    获取模块,用于获取应用程序的进程ID;An acquisition module for obtaining a process ID of the application;
    建立模块,用于建立Socket ID与进程ID间的映射表。A module is created for establishing a mapping table between the Socket ID and the process ID.
  11. 如权利要求10所述的系统,其特征在于,所述系统还包括:The system of claim 10, wherein the system further comprises:
    统计模块,用于接收指令,统计应用程序当前使用的网络流量;a statistics module, configured to receive an instruction to count network traffic currently used by the application;
    计算模块,用于根据所述映射表计算同一进程ID对应的Socket收发速度总和;a calculation module, configured to calculate, according to the mapping table, a sum of Socket transceiving speeds corresponding to the same process ID;
    显示模块,用于显示计算出的应用程序的收发速度总和。A display module for displaying the sum of the transceiving speeds of the calculated applications.
  12. 如权利要求10所述的系统,其特征在于,所述系统还包括:The system of claim 10, wherein the system further comprises:
    接收模块,用于接收用户输入的禁止或允许应用程序使用网络进行数据传输的指令;a receiving module, configured to receive an instruction of prohibiting user input or allowing an application to use a network for data transmission;
    停止模块,用于当接收的是禁止指令,则停止指定进程ID对应的所有Socket的数据收发功能;Stopping the module, when receiving the prohibition instruction, stopping the data transceiving function of all the sockets corresponding to the specified process ID;
    开启模块,用于当接收的是允许指令,则开启指定进程ID对应的所有Socket的数据收发功能。The module is enabled to enable the data transceiving function of all the Sockets corresponding to the specified process ID when the instruction is allowed.
  13. 如权利要求11所述的系统,其特征在于,所述系统还包括:The system of claim 11 wherein said system further comprises:
    第二计算模块,用于根据同一进程ID对应的Socket收发速度总和计算同一进程ID对应的Socket收发数据总和;a second calculating module, configured to calculate a sum of Socket transceiving data corresponding to the same process ID according to a sum of Socket transceiving speeds corresponding to the same process ID;
    第二显示模块,用于显示计算出的应用程序的收发数据总和。The second display module is configured to display the sum of the transceived data of the calculated application.
  14. 如权利要求8所述的系统,其特征在于,所述系统还包括:存储模块,用于存储所述提示信息。The system of claim 8 wherein said system further comprises: a storage module for storing said prompt information.
  15. 一种包括权利要求8至14任一项所述的控制应用程序接入网络的系统的移动终端。 A mobile terminal comprising a system for controlling an application access network according to any one of claims 8 to 14.
PCT/CN2011/076334 2011-06-24 2011-06-24 Method, system and mobile terminal for controlling network access of applications WO2012174750A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2011/076334 WO2012174750A1 (en) 2011-06-24 2011-06-24 Method, system and mobile terminal for controlling network access of applications

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2011/076334 WO2012174750A1 (en) 2011-06-24 2011-06-24 Method, system and mobile terminal for controlling network access of applications

Publications (1)

Publication Number Publication Date
WO2012174750A1 true WO2012174750A1 (en) 2012-12-27

Family

ID=47422009

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2011/076334 WO2012174750A1 (en) 2011-06-24 2011-06-24 Method, system and mobile terminal for controlling network access of applications

Country Status (1)

Country Link
WO (1) WO2012174750A1 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1561077A (en) * 2004-03-12 2005-01-05 海信集团有限公司 Moble terminal data communication method
US20110028124A1 (en) * 2009-07-28 2011-02-03 Xerox Corporation Software Switch for Separating Work and Personal Information on Cell Phone Devices
CN102065431A (en) * 2010-12-28 2011-05-18 上海华勤通讯技术有限公司 Method for applying network firewall of mobile phone

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1561077A (en) * 2004-03-12 2005-01-05 海信集团有限公司 Moble terminal data communication method
US20110028124A1 (en) * 2009-07-28 2011-02-03 Xerox Corporation Software Switch for Separating Work and Personal Information on Cell Phone Devices
CN102065431A (en) * 2010-12-28 2011-05-18 上海华勤通讯技术有限公司 Method for applying network firewall of mobile phone

Similar Documents

Publication Publication Date Title
WO2013025085A2 (en) Apparatus and method for supporting family cloud in cloud computing system
EP2697916A2 (en) Machine-to-machine node erase procedure
WO2013183971A1 (en) Method and system for selective protection of data exchanged between user equipment and network
WO2011129635A2 (en) Method and apparatus for providing application service in a mobile communication system
WO2015103954A1 (en) Information sharing method, information sharing apparatus, and electronic device
WO2013189134A1 (en) Information pushing method and system
WO2018153268A1 (en) Method and system for selecting volte according to sim card by mobile terminal, and mobile terminal
WO2010053272A2 (en) System and method for providing service to end-point terminal in cpns environment, and cpns server, mobile communication terminal and end-point terminal for the same
WO2018018816A1 (en) Remote control method, remote control device, and terminal
WO2016090775A1 (en) Synchronous operation method and system for short message data
WO2018076841A1 (en) Data sharing method, apparatus, storage medium and server
WO2018233352A1 (en) Data transmission method, device, terminal and computer-readable storage medium
WO2017128588A1 (en) Method and device for realizing real-time monitoring of digital television
WO2016192587A1 (en) Wireless communication method and apparatus
WO2016123926A1 (en) Remote control based subscriber identity module card terminal management method and system
WO2020224246A1 (en) Block chain-based data management method and apparatus, device and storage medium
EP2666256A2 (en) Method and apparatus for phone communication using home network
WO2018058835A1 (en) Call mode monitoring method, system and communication terminal
WO2021012490A1 (en) Service relay switching method and apparatus, terminal device, and storage medium
WO2017185647A1 (en) Softsim-based imsi number management and calling methods, server and network side device
WO2012144820A2 (en) Apparatus and method for transmitting and receiving ip information in a wireless communication network
WO2012174750A1 (en) Method, system and mobile terminal for controlling network access of applications
WO2010098527A1 (en) Method and system for connecting an end terminal to a plurality of mobile communication terminals to be provided with a service in a cpns environment, and cpns server and end terminal for same
WO2013189025A1 (en) Qos policy generation method, device and system
WO2019172717A1 (en) Method for controlling codec on basis of channel conditions and electronic device

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC OF 080414

122 Ep: pct application non-entry in european phase

Ref document number: 11868234

Country of ref document: EP

Kind code of ref document: A1