WO2019144803A1 - 流量统计方法、装置、存储介质及电子装置 - Google Patents

流量统计方法、装置、存储介质及电子装置 Download PDF

Info

Publication number
WO2019144803A1
WO2019144803A1 PCT/CN2019/070936 CN2019070936W WO2019144803A1 WO 2019144803 A1 WO2019144803 A1 WO 2019144803A1 CN 2019070936 W CN2019070936 W CN 2019070936W WO 2019144803 A1 WO2019144803 A1 WO 2019144803A1
Authority
WO
WIPO (PCT)
Prior art keywords
predetermined
sim card
traffic
virtual
user
Prior art date
Application number
PCT/CN2019/070936
Other languages
English (en)
French (fr)
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 中兴通讯股份有限公司
Publication of WO2019144803A1 publication Critical patent/WO2019144803A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/02Details
    • H04L12/14Charging, metering or billing arrangements for data wireline or wireless communications
    • 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
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/08Testing, supervising or monitoring using real traffic
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W8/00Network data management
    • H04W8/18Processing of user or subscriber data, e.g. subscribed services, user preferences or user profiles; Transfer of user or subscriber data
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W8/00Network data management
    • H04W8/18Processing of user or subscriber data, e.g. subscribed services, user preferences or user profiles; Transfer of user or subscriber data
    • H04W8/183Processing at user equipment or user record carrier

Definitions

  • the present application relates to the field of communications, for example, to a traffic statistics method, apparatus, storage medium, and electronic device.
  • the terminal for example, mobile phone
  • the terminal integrates the traffic statistics function. Specifically, the system periodically periodically obtains the time through the device according to the Subscriber Identity Module (SIM) card device number. All the number of network bytes, and update records to achieve traffic statistics, so users do not need to query the operator, you can use your mobile phone to view the Internet traffic usage, very convenient.
  • SIM Subscriber Identity Module
  • the operating system can be divided into a single-user operating system and a multi-user operating system.
  • a single-user operating system means that it can only be used by one user at a time.
  • One user enjoys all the hardware and software resources of the system by himself, and if multiple users are allowed to use at the same time, it is called a multi-user operating system.
  • multi-user systems have begun to enter a large number of formal use stages. Multi-users in mobile terminals are similar to multi-users in PC operating systems, and can support multiple users to use the system. Different users have different settings and different User-installed applications and application data are also different. However, the hardware-related settings in the system are shared, such as network settings, and the background process running by the user before the user switches can continue to run.
  • the data network used by each user actually corresponds to the same SIM card device on the mobile phone. Therefore, when the user counts the traffic usage of a SIM card in the multi-user mode, the statistics obtained by each user from the system are the same, and the accurate segmentation statistics of the actual usage traffic of each user system cannot be realized, especially in the case of It is necessary to accurately control the usage threshold of each user traffic and refine the analysis of the online behavior of each user.
  • the embodiment of the present application provides a traffic statistics method, device, storage medium, and electronic device, so as to at least avoid the situation that the multi-user system in the related art cannot accurately count the traffic when each user system uses the same SIM card for networking.
  • a method for collecting traffic statistics includes: receiving a traffic statistics request sent by a sender; determining, according to the traffic statistics request, a predetermined user from a pre-stored traffic usage record to connect to the network through a predetermined SIM card.
  • a traffic statistics apparatus including: a receiving module, configured to receive a traffic statistics request sent by a sending end; and a first determining module configured to pre-store according to the traffic statistics request The traffic usage record determines traffic information used by a predetermined user to connect to the network through a predetermined SIM card, wherein the traffic usage record is used to record traffic used by two or more users when connecting to the network through the predetermined SIM card; And a sending module, configured to send the determined used traffic information to the sending end.
  • a storage medium having stored therein a computer program, wherein the computer program is configured to execute the steps of any one of the method embodiments described above.
  • an electronic device comprising a memory and a processor, wherein the memory stores a computer program, the processor being configured to run the computer program to perform any of the above The steps in the method embodiments.
  • FIG. 1 is a block diagram showing a hardware structure of a mobile terminal according to a message processing method according to an embodiment of the present application
  • FIG. 2 is a flowchart of a traffic statistics method according to an embodiment of the present application.
  • FIG. 3 is a block diagram showing the structure of a system according to an embodiment of the present application.
  • FIG. 4 is a flowchart of processing performed by a SIM card virtualization processing module according to an embodiment of the present application
  • FIG. 5 is a flowchart of processing performed by a traffic data collection module according to an embodiment of the present application.
  • FIG. 6 is a flowchart of processing performed by a virtual SIM card traffic data recording module according to an embodiment of the present application
  • FIG. 7 is a structural block diagram of a traffic statistics apparatus according to an embodiment of the present application.
  • the key point in the embodiment of the present application is to accurately calculate the actual traffic of each user system in the related art, and propose a traffic statistics method, which can accurately calculate the traffic usage of each user under the multi-user system.
  • the present application will be described below in conjunction with the embodiments.
  • FIG. 1 is a hardware structural block diagram of a mobile terminal according to a message processing method according to an embodiment of the present application.
  • mobile terminal 10 may include one or more (only one shown in FIG. 1) processor 102 (processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA. ), a memory 104 configured to store data, and a transmission device 106 for communication functions.
  • processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA.
  • memory 104 configured to store data
  • a transmission device 106 for communication functions.
  • the structure shown in FIG. 1 is merely illustrative, and does not limit the structure of the above mobile terminal.
  • the mobile terminal 10 may also include more or fewer components than those shown in FIG. 1, or have a different configuration than that shown in FIG.
  • the memory 104 can be configured as a software program and a module for storing application software, such as a program instruction/module corresponding to the message processing method in the embodiment of the present application, and the processor 102 executes by executing a software program and a module stored in the memory 104.
  • application software such as a program instruction/module corresponding to the message processing method in the embodiment of the present application
  • the processor 102 executes by executing a software program and a module stored in the memory 104.
  • Various functional applications and data processing, that is, the above methods are implemented.
  • Memory 104 may include high speed random access memory, and may also include non-volatile memory such as one or more magnetic storage devices, flash memory, or other non-volatile solid state memory.
  • memory 104 may further include memory remotely located relative to processor 102, which may be connected to mobile terminal 10 over a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
  • Transmission device 106 is arranged to receive or transmit data via a network.
  • the above-described network specific example may include a wireless network provided by a communication provider of the mobile terminal 10.
  • the transmission device 106 includes a Network Interface Controller (NIC) that can be connected to other network devices through a base station to communicate with the Internet.
  • the transmission device 106 can be a Radio Frequency (RF) module configured to communicate with the Internet wirelessly.
  • NIC Network Interface Controller
  • RF Radio Frequency
  • FIG. 2 is a flowchart of a traffic statistics method according to an embodiment of the present application. As shown in FIG. 2, the method includes step S202, step S204. And step S206.
  • step S202 a traffic statistics request sent by the sender is received.
  • step S204 the traffic information used by the predetermined user to connect to the network through the predetermined SIM card is determined from the pre-stored traffic usage record according to the traffic statistics request, wherein the traffic usage record is used to record that more than two users are passing The traffic used by the predetermined SIM card when connecting to the network.
  • step S206 the determined used flow rate information is transmitted to the above-mentioned transmitting end.
  • the main body performing the above steps may be a terminal, and specifically, may be executed by a traffic control device in the terminal.
  • the above-mentioned sender and the terminal may be the same terminal or different terminals.
  • the terminal When the terminal is the same terminal, it may be a traffic statistics request triggered by the user.
  • the terminal can support multiple SIM cards, and each SIM card can correspond to one traffic usage record. When the same user is connected through different SIM cards, the total traffic used can be used according to each traffic. The recorded traffic in the record is added to get the total traffic used by the same user.
  • the traffic used by different users when connecting to the network through the same SIM card can be separately collected, thereby realizing the statistical traffic of the user, which effectively avoids the inaccurate statistics of the multi-user system existing in the related technology.
  • the user system uses the traffic of the same SIM card when it is connected to the network, thereby realizing the traffic when each user system under the multi-user system uses the same SIM card for networking.
  • determining the traffic information used by the predetermined user to connect to the network through the predetermined SIM card according to the foregoing traffic statistics request includes: determining the identifier of the predetermined user carried in the traffic statistics request, and the predetermined SIM. Identification of the card; determining, according to the identifier of the predetermined user and the identifier of the predetermined SIM card, a virtual predetermined SIM card corresponding to the predetermined SIM card, which is pre-created by the predetermined user, wherein the virtual predetermined SIM card is set to forward the predetermined user through the predetermined The data of the SIM card interacting with the network; determining the flow information of the data transferred by the virtual predetermined SIM card from the above traffic usage record.
  • the virtual SIM cards created for different users corresponding to the same SIM card are different, and the virtual SIM cards created by the same user corresponding to different SIM cards are different.
  • the SIM card device virtualization support is introduced, and the mapping between the virtual SIM and the user system and the SIM card (ie, the real SIM card in the terminal, and the virtual user identification card provided by the operator) is implemented, and each user is The data on the Internet needs to be transferred through the corresponding virtual SIM card, and finally the transmission/reception is completed through the real SIM card device.
  • the traffic that is transferred on each virtual SIM card can be counted, so that when the traffic consumed by a single user to access the Internet through a single SIM card needs to be obtained, the traffic transferred on the corresponding virtual SIM can be directly obtained.
  • the traffic data collection module can obtain the traffic information of the data transferred by each virtual SIM card.
  • the method before determining, according to the traffic statistics request, the traffic information used by the predetermined user to connect to the network through the predetermined SIM card, the method further includes: first, at the predetermined user When the network is connected through the predetermined SIM card, a virtual predetermined SIM card corresponding to the predetermined SIM card is created for the predetermined user.
  • the virtual SIM card can be created for the user when the network is connected to the network for the first time.
  • the creation of the virtual SIM card may also be performed according to actual conditions. For example, after the user uses the SIM card for more than a predetermined number of times or exceeds a predetermined length of time, the corresponding virtual SIM card may be created.
  • the data forwarding between the virtual predetermined SIM card and the predetermined SIM satisfies a predetermined network protocol IP forwarding rule, wherein the IP forwarding rule is determined according to a related protocol, or may be performed according to actual conditions. Set. So as to ensure that users can access the Internet.
  • the method further includes: determining a plurality of virtual SIM cards respectively corresponding to the predetermined SIM cards, and real-time counting traffic information of data forwarded by each virtual SIM card, and recording the traffic usage records to the traffic usage records.
  • the traffic information of the data transferred by each virtual SIM card may be collected by using a virtual SIM card traffic data recording module.
  • the present application is mainly implemented by three modules: a SIM card device virtualization processing module, a traffic data collection module, and a virtual SIM card traffic data recording module.
  • a SIM card device virtualization processing module a traffic data collection module
  • a virtual SIM card traffic data recording module a virtual SIM card traffic data recording module.
  • the relationship between the modules is shown in FIG. 3, and each module is shown in FIG. The function is roughly as follows.
  • the SIM card virtualization processing module is configured to create a virtual device.
  • the module automatically creates a corresponding virtual SIM card device (also referred to as a virtual SIM card) for the user, and simultaneously constructs a virtual device. IP packet forwarding rules between the SIM card and the real SIM card.
  • the traffic data collection module when the system periodically obtains the traffic bytes of each NIC device of the kernel, does not acquire the traffic data of the real SIM card, but automatically performs device conversion, and obtains traffic statistics of all corresponding virtual SIM card devices. data.
  • the virtual SIM card traffic data recording module is configured to sort and record the statistical traffic data collection module to obtain data from the kernel, mainly by finding the corresponding SIM card device and the user identity (Identity, ID) according to the virtual device name, and then updating and Record the network byte data used by each SIM card under each user.
  • the subsequent user initiates a request for acquiring a SIM card data, it directly returns the traffic statistics of the virtual SIM card under the user.
  • the processing performed by the SIM card virtualization processing module includes step S401, step S402, and step S403.
  • step S401 the monitoring system user turns on the data switch event, wherein the listening event is turned on, which can be implemented by triggering the monitoring signal.
  • the opened SIM card device creates a corresponding virtual SIM card device, and constructs and records a mapping relationship between the virtual device ID, the real SIM ID, and the user ID.
  • step S403 an IP forwarding rule between the IP of the virtual SIM card and the real SIM card is constructed to ensure that the online behavior of the user system is normal.
  • the processing performed by the traffic data collection module includes step S501, step S502, and step S503.
  • step S501 the network traffic byte data of all network card devices of the current system is obtained from the kernel at a timing.
  • step S502 according to the real SIM card device that the system has currently loaded, all the virtual SIM card devices corresponding to the virtual SIM card device are found.
  • step S503 the traffic byte data of all virtual SIM card devices is acquired and transmitted to the virtual SIM card traffic data recording module for storage.
  • the processing performed by the virtual SIM card traffic data recording module includes steps S601 to S604.
  • step S601 the system virtual SIM card device traffic data to be classified is received from the traffic data collection module.
  • step S602 the corresponding real SIM card ID and the user ID to which it belongs are found according to the virtual device ID in the data record.
  • step S603 the user and the sub-SIM are updated and recorded the traffic data that has been used.
  • step S604 when the subsequent user initiates a request for acquiring a SIM card traffic data, the recorded virtual SIM card traffic is returned.
  • the technical solution of the present application may be embodied in the form of a software product in essence or in a form of a software product stored in a storage medium such as a read-only memory/random memory (Read Only Memory/Random Access Memory (ROM/RAM), a magnetic disk, and an optical disk include instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the embodiments of the present application.
  • a terminal device which may be a mobile phone, a computer, a server, or a network device, etc.
  • a traffic statistics device is provided, which is configured to implement the foregoing embodiments and example embodiments, and details are not described herein.
  • the term "module” may implement a combination of software and/or hardware of a predetermined function.
  • the devices described in the following embodiments may be implemented in software, hardware, or a combination of software and hardware, is also possible and contemplated.
  • FIG. 7 is a structural block diagram of a traffic statistics apparatus according to an embodiment of the present application. As shown in FIG. 7, the apparatus includes a receiving module 72, a first determining module 74, and a returning module 76.
  • the receiving module 72 is configured to receive a traffic statistics request sent by the sending end.
  • the first determining module 74 (corresponding to the traffic data collecting module described above) is connected to the receiving module 72, and is configured to determine, according to the traffic statistics request, the pre-stored traffic usage record, used by the predetermined user to connect to the network through the predetermined SIM card. Traffic information, wherein the traffic usage record is used to record traffic used by two or more users when connecting to the network through a predetermined SIM card.
  • module 76 (a function corresponding to the corresponding virtual SIM card traffic of the return record of the virtual SIM card traffic data recording module), connected to the first determining module 74, configured to send the determined used traffic information to the transmitting end .
  • the first determining module 74 further includes a first determining unit, configured to determine an identifier of the predetermined user carried in the traffic statistics request and an identifier of the predetermined SIM card; and a second determining unit, setting Determining, according to the identifier of the predetermined user and the identifier of the predetermined SIM card, a virtual predetermined SIM card corresponding to the SIM card pre-created by the predetermined user, wherein the virtual predetermined SIM card is set to forward the predetermined user through the predetermined SIM card
  • the data of the network interaction is different for the virtual SIM card created by the different users corresponding to the same SIM.
  • the third determining unit is configured to determine the traffic information of the data forwarded by the virtual predetermined SIM card from the traffic usage record.
  • the apparatus further includes a creating module (corresponding to the SIM card virtualization processing module described above), configured to determine, by the first determining module, that the predetermined user passes the pre-stored traffic usage record according to the traffic statistics request.
  • a creating module corresponding to the SIM card virtualization processing module described above, configured to determine, by the first determining module, that the predetermined user passes the pre-stored traffic usage record according to the traffic statistics request.
  • a virtual predetermined SIM card corresponding to the predetermined SIM card is created for the predetermined user when the predetermined user first connects to the network through the predetermined SIM card.
  • the data forwarding between the virtual predetermined SIM card and the predetermined SIM satisfies a predetermined network protocol IP forwarding rule.
  • the apparatus further includes a second determining module (corresponding to a traffic recording function in the SIM card traffic data recording module), configured to determine each virtual SIM card that has been created corresponding to the predetermined SIM card;
  • the statistics module is configured to collect real-time statistics on traffic information of data forwarded by each virtual SIM card, and record the traffic information in the traffic usage record.
  • each of the above modules may be implemented by software or hardware.
  • the foregoing may be implemented by, but not limited to, the foregoing modules are all located in the same processor; or, the above modules are in any combination.
  • the forms are located in different processors.
  • Embodiments of the present application also provide a storage medium having stored therein a computer program, wherein the computer program is configured to perform the steps of any one of the above method embodiments at runtime.
  • the foregoing storage medium may include, but is not limited to, a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.
  • ROM read-only memory
  • RAM random access memory
  • mobile hard disk a magnetic disk
  • optical disk a variety of media that can store program code.
  • Embodiments of the present application also provide an electronic device including a memory and a processor having stored therein a computer program configured to execute the computer program to perform the steps of any of the above method embodiments.
  • the electronic device may further include a transmission device and an input and output device, wherein the transmission device is connected to the processor, and the input and output device is connected to the processor.
  • modules or steps of the present application described above can be implemented in a general-purpose computing device that can be centralized on a single computing device or distributed across a network of multiple computing devices. For example, they may be implemented in program code executable by a computing device such that they may be stored in a storage device for execution by a computing device and, in some instances, may be performed in a different order than that illustrated herein. Or the steps described, either separately as individual integrated circuit modules, or as a plurality of modules or steps in a single integrated circuit module. Thus, the application is not limited to any particular combination of hardware and software.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Environmental & Geological Engineering (AREA)
  • Telephonic Communication Services (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本申请提供了一种流量统计方法、装置、存储介质及电子装置,该方法包括:接收发送端发送的流量统计请求;根据所述流量统计请求从预先存储的流量使用记录中确定预定用户通过预定SIM卡连接网络时所使用的流量信息,其中,所述流量使用记录用于记录两个以上用户在通过所述预定的SIM卡连接网络时所分别使用的流量;将确定的所使用的流量信息发送给发送端。

Description

流量统计方法、装置、存储介质及电子装置
本申请要求在2018年01月25日提交中国专利局、申请号为201810074642.4的中国专利申请的优先权,该申请的全部内容通过引用结合在本申请中。
技术领域
本申请涉及通信领域,例如涉及一种流量统计方法、装置、存储介质及电子装置。
背景技术
目前的终端(例如,手机)系统均集成了流量统计功能,具体地,就是系统会周期性根据客户识别模块(Subscriber Identity Module,SIM)卡设备号去内核获取某一时间段内流经该设备的所有网络字节数,并予以更新记录来实现流量统计功能,这样用户无需向运营商查询,使用自己的手机就能查看上网流量使用情况,非常方便。
根据同一时间使用系统的用户多少,操作系统可分为单用户操作系统和多用户操作系统。单用户操作系统是指在同一时间只能由一个用户使用,一个用户独自享用系统的全部硬件和软件资源,而如果在同一时间允许多个用户同时使用,则称为多用户操作系统。随着科技的发展,多用户系统已经开始进入大量正式使用阶段,移动终端中的多用户与PC操作系统的多用户类似,可以支持多个用户使用系统,不同用户的设置各不相同,并且不同用户安装的应用及应用数据也不相同。但是系统中和硬件相关的设置则是共用的,例如网络设置等,且用户切换后前面用户运行的后台进程还可以继续运行。
但相关多用户系统模式下,各用户使用的数据网络实际上都是对应于手机上的同一张SIM卡设备。所以,多用户模式下用户在统计某一SIM卡的流量使用情况时,每个用户从系统的获得的统计数值都是一样的,无法实现各用户系统实际使用流量的精准分割统计,特别是在需要精准控制各个用户流量使用阈值、细化分析各用户上网行为等场景时。
针对相关技术中存在的多用户系统下无法精准统计各用户系统使用同一 SIM卡联网时的流量的情况,目前尚未提出有效的解决方案。
发明内容
以下是对本文详细描述的主题的概述。本概述并非是为了限制权利要求的保护范围。
本申请实施例提供了一种流量统计方法、装置、存储介质及电子装置,以至少避免相关技术中多用户系统下无法精准统计各用户系统使用同一SIM卡联网时的流量的情况。
根据本申请的一个实施例,提供了一种流量统计方法,包括:接收发送端发送的流量统计请求;根据所述流量统计请求从预先存储的流量使用记录中确定预定用户通过预定SIM卡连接网络时所使用的流量信息,其中,所述流量使用记录用于记录两个以上用户在通过所述预定SIM卡连接网络时所分别使用的流量;将确定的所述所使用的流量信息发送给所述发送端。
根据本申请的另一个实施例,提供了一种流量统计装置,包括:接收模块,设置为接收发送端发送的流量统计请求;第一确定模块,设置为根据所述流量统计请求从预先存储的流量使用记录中确定预定用户通过预定SIM卡连接网络时所使用的流量信息,其中,所述流量使用记录用于记录两个以上用户在通过所述预定SIM卡连接网络时所分别使用的流量;发送模块,设置为将确定的所述所使用的流量信息发送给所述发送端。
根据本申请的又一个实施例,还提供了一种存储介质,所述存储介质中存储有计算机程序,其中,所述计算机程序被设置为运行时执行上述任一项方法实施例中的步骤。
根据本申请的又一个实施例,还提供了一种电子装置,包括存储器和处理器,所述存储器中存储有计算机程序,所述处理器被设置为运行所述计算机程序以执行上述任一项方法实施例中的步骤。
在阅读并理解了附图和详细描述后,可以明白其他方面。
附图说明
此处所说明的附图用来提供对本申请的进一步理解,构成本申请的一部分,本申请的示意性实施例及其说明用于解释本申请,并不构成对本申请的不当限 定。在附图中:
图1是根据本申请实施例的报文处理方法的移动终端的硬件结构框图;
图2是根据本申请实施例的流量统计方法的流程图;
图3是根据本申请实施例的系统结构框图;
图4是根据本申请实施例的SIM卡虚拟化处理模块所执行的处理流程图;
图5是根据本申请实施例的流量数据收集模块所执行的处理流程图;
图6是根据本申请实施例的虚拟SIM卡流量数据记录模块所执行的处理流程图;
图7是根据本申请实施例的流量统计装置的结构框图。
具体实施方式
下文中将参考附图并结合实施例来详细说明本申请。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。
需要说明的是,本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。
本申请实施例中的关键是针对相关技术中无法实现各用户系统实际流量的精准分割统计,提出一种流量统计方法,能够实现在多用户系统下对各用户使用流量情况作出精准的统计。下面结合实施例对本申请进行说明。
在本申请实施例中所提供的方法是可以在移动终端、计算机终端或者类似的运算装置中执行的。以运行在移动终端上为例,图1是根据本申请实施例的报文处理方法的移动终端的硬件结构框图。如图1所示,移动终端10可以包括一个或多个(图1中仅示出一个)处理器102(处理器102可以包括但不限于微处理器MCU或可编程逻辑器件FPGA等的处理装置)、设置为存储数据的存储器104、以及用于通信功能的传输装置106。本领域普通技术人员可以理解,图1所示的结构仅为示意,其并不对上述移动终端的结构造成限定。例如,移动终端10还可包括比图1中所示更多或者更少的组件,或者具有与图1所示不同的配置。
存储器104可设置为存储应用软件的软件程序以及模块,如本申请实施例中的报文处理方法对应的程序指令/模块,处理器102通过运行存储在存储器104内的软件程序以及模块,从而执行各种功能应用以及数据处理,即实现上述的 方法。存储器104可包括高速随机存储器,还可包括非易失性存储器,如一个或者多个磁性存储装置、闪存、或者其他非易失性固态存储器。在一些实例中,存储器104可进一步包括相对于处理器102远程设置的存储器,这些远程存储器可以通过网络连接至移动终端10。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。
传输装置106设置为经由一个网络接收或者发送数据。上述的网络具体实例可包括移动终端10的通信供应商提供的无线网络。在一个实例中,传输装置106包括一个网络适配器(Network Interface Controller,NIC),其可通过基站与其他网络设备相连从而可与互联网进行通讯。在一个实例中,传输装置106可以为射频(Radio Frequency,RF)模块,其设置为通过无线方式与互联网进行通讯。
在本实施例中提供了一种可以运行于上述移动终端的流量统计方法,图2是根据本申请实施例的流量统计方法的流程图,如图2所示,该方法包括步骤S202,步骤S204和步骤S206。
在步骤S202中,接收发送端发送的流量统计请求。
在步骤S204中,根据上述流量统计请求从预先存储的流量使用记录中确定预定用户通过预定SIM卡连接网络时所使用的流量信息,其中,所述流量使用记录用于记录两个以上用户在通过所述预定的SIM卡连接网络时所分别使用的流量。
在步骤S206中,将确定的所使用的流量信息发送给上述发送端。
其中,执行上述步骤的主体可以是终端,具体地,可以由终端中的流量管控装置来执行。上述的发送端和该终端可以是同一个终端,也可以是不同的终端,当为同一个终端时,可以是由使用者触发的流量统计请求。需要说明的是,终端可以支持安装多个SIM卡,且每一个SIM卡可以分别对应一个流量使用记录,当同一个用户通过不同的SIM卡联网时,其所使用的总流量可以根据各流量使用记录中的记录的流量进行相加以得到同一用户使用的总流量。
通过上述实施例,可以针对不同的用户在通过同一SIM卡连接网络时所使用的流量分别进行统计,从而实现了分用户统计流量,有效避免了相关技术中存在的多用户系统下无法精准统计各用户系统使用同一SIM卡联网时的流量的情况,进而实现了精准统计多用户系统下各用户系统使用同一SIM卡联网时的 流量。
在一个实施例中,根据上述流量统计请求从预先存储的流量使用记录中确定预定用户通过预定SIM卡连接网络时所使用的流量信息包括:确定流量统计请求中携带的预定用户的标识以及预定SIM卡的标识;根据上述预定用户的标识以及预定SIM卡的标识确定为预定用户预先创建的对应于上述预定SIM卡的虚拟预定SIM卡,其中,该虚拟预定SIM卡设置为转发上述预定用户通过预定SIM卡与网络交互的数据;从上述流量使用记录中确定虚拟预定SIM卡转接的数据的流量信息。在本实施例中,为不同的用户对应于相同的SIM卡所创建的的虚拟SIM卡不同,且为相同的用户对应于不同的SIM卡所创建的的虚拟SIM卡不同。引入了SIM卡设备虚拟化支持,实现了虚拟SIM与用户系统及SIM卡(即,终端中真实的SIM卡,也可以包括运营商提供的虚拟用户身份识别卡)的一一映射,且各用户上网数据都需要通过对应的虚拟SIM卡进行转接,最终通过真实的SIM卡设备完成传输/接收。在本实施例中,可以统计各虚拟SIM卡上转接的流量,从而后续在需要获取单个用户通过单个SIM卡上网时所消耗的流量时,直接获取对应虚拟SIM上转接的流量即可。其中,可以通过流量数据收集模块来获取各虚拟SIM卡转接的数据的流量信息。
在一个实施例中,在根据所述流量统计请求从预先存储的流量使用记录中确定预定用户通过预定SIM卡连接网络时所使用的流量信息之前,所述方法还包括:在所述预定用户首次通过所述预定SIM卡连接网络时,为该预定用户创建对应于该预定SIM卡的虚拟预定SIM卡。在本实施例中,可以在第一次通过SIM卡连接网络时,就为用户创建虚拟SIM卡。当然,需要说明的是,在实际使用时,也可以根据实际情况进行虚拟SIM卡的创建,例如,可以在用户使用SIM卡超过预定次数后或者超过预定时长之后,再创建对应的虚拟SIM卡。
在一个实施例中,所述虚拟预定SIM卡与所述预定SIM之间的数据转发满足预定的网络协议IP转发规则,其中,该IP转发规则是根据相关协议确定的,或者可以根据实际情况进行设置的。从而保证用户能够正常上网。
在一个实施例中,上述方法还包括:确定已创建的与上述预定SIM卡分别对应的多个虚拟SIM卡;实时统计各虚拟SIM卡转发的数据的流量信息,并记录至所述流量使用记录中。在本实施例中,同一个终端中可能会有多张SIM卡,且每张SIM卡的使用者可以为多个,因此,在同一个终端中可以针对每个使用 者使用每张SIM卡分别创建虚拟SIM卡。其中,可以通过虚拟SIM卡流量数据记录模块来统计各虚拟SIM卡转接的数据的流量信息。
由上述实施例可知,本申请主要是由SIM卡设备虚拟化处理模块、流量数据收集模块和虚拟SIM卡流量数据记录模块三个模块来实现的,各模块的关系如图3所示,各模块的功能大致如下。
SIM卡虚拟化处理模块,设置为创建虚拟设备,当用户开启数据网络开关时候,该模块会自动为该用户创建一个对应的虚拟SIM卡设备(也可以称为虚拟SIM卡),同时构建好虚拟SIM卡到真实SIM卡之间的IP数据包转发规则。
流量数据收集模块,当系统定时获取内核各网卡设备的流量字节数时,不再获取真实SIM卡的流量数据,而自动进行设备转换,改为获取其对应的所有虚拟SIM卡设备的流量统计数据。
虚拟SIM卡流量数据记录模块,设置为分类整理和记录统计流量数据收集模块从内核获取到数据,主要是根据虚拟设备名找到其对应的SIM卡设备以及用户身份(Identity,ID),然后更新和记录好各用户下各SIM卡使用的网络字节数据。后续用户发起获取某SIM卡数据请求时,直接返回该用户下该虚拟SIM卡的流量统计数据。
下面结合附图对各模块中所实现的处理进行说明。
如图4所示,SIM卡虚拟化处理模块所执行的处理包括步骤S401,步骤S402和步骤S403。
在步骤S401中,监听系统用户开启数据开关事件,其中,监听事件开启,可以通过监听信号的触发来实现。
在步骤S402中,根据操作用户ID,开启的SIM卡设备,创建好对应的虚拟SIM卡设备,并构建、记录好虚拟设备ID、真实SIM ID以及用户ID的映射关系。
在步骤S403中,构建好虚拟SIM卡的IP与真实SIM卡之间的IP转发规则,以保证该用户系统上网行为的正常。
如图5所示,流量数据收集模块所执行的处理包括步骤S501,步骤S502以及步骤S503。
在步骤S501中,定时从内核获取当前系统所有网卡设备的网络流量字节数据。
在步骤S502中,根据系统当前已经加载的真实SIM卡设备,找出其所对应的所有虚拟SIM卡设备。
在步骤S503中,获取所有虚拟SIM卡设备的流量字节数据,并传递给虚拟SIM卡流量数据记录模块进行保存。
如图6所示,虚拟SIM卡流量数据记录模块执行的处理包括步骤S601至步骤S604。
在步骤S601中,从流量数据收集模块接收待分类处理的系统虚拟SIM卡设备流量数据。
在步骤S602中,根据数据记录中的虚拟设备ID找出其对应的真实SIM卡ID以及其所属的用户ID。
在步骤S603中,分用户、分SIM卡更新并记录好其已使用的流量数据。
在步骤S604中,后续用户发起获取某SIM卡流量数据请求时,返回记录好的对应的虚拟SIM卡流量。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到根据上述实施例的方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件。基于这样的理解,本申请的技术方案本质上或者说对相关技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质,如只读内存/随机存储器(Read Only Memory/Random Access Memory,ROM/RAM)、磁碟、光盘中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本申请各个实施例所述的方法。
在本实施例中还提供了一种流量统计装置,该装置设置为实现上述实施例及示例实施方式,已经进行过说明的不再赘述。如以下所使用的,术语“模块”可以实现预定功能的软件和/或硬件的组合。尽管以下实施例所描述的装置可以以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并被构想的。
图7是根据本申请实施例的流量统计装置的结构框图,如图7所示,该装置包括接收模块72,第一确定模块74和返回模块76。
接收模块72,设置为接收发送端发送的流量统计请求。第一确定模块74(对应于上述的流量数据收集模块),连接上述接收模块72,设置为根据上述流量统计请求从预先存储的流量使用记录中确定预定用户通过预定SIM卡连接网络时 所使用的流量信息,其中,该流量使用记录用于记录两个以上用户在通过预定SIM卡连接网络时所分别使用的流量。返回模块76(对应于虚拟SIM卡流量数据记录模块的返回记录的对应的虚拟SIM卡流量的功能),连接至上述第一确定模块74,设置为将确定的所使用的流量信息发送给发送端。
在一个的实施例中,上述第一确定模块74还包括第一确定单元,设置为确定流量统计请求中携带的所述预定用户的标识以及所述预定SIM卡的标识;第二确定单元,设置为根据上述预定用户的标识以及预定SIM卡的标识确定为预定用户预先创建的对应于所述SIM卡的虚拟预定SIM卡,其中,该虚拟预定SIM卡设置为转发预定用户通过上述预定SIM卡与网络交互的数据,为不同的用户创建的对应于相同的SIM的虚拟SIM卡不同;第三确定单元,设置为从上述流量使用记录中确定该虚拟预定SIM卡转发的数据的流量信息。
在一个的实施例中,上述装置还包括创建模块(对应于上述的SIM卡虚拟化处理模块),设置为在第一确定模块根据上述流量统计请求从预先存储的流量使用记录中确定预定用户通过预定SIM卡连接网络时所使用的流量信息之前,在预定用户首次通过预定SIM卡连接网络时,为该预定用户创建对应于上述预定SIM卡的虚拟预定SIM卡。
在一个的实施例中,上述虚拟预定SIM卡与预定SIM之间的数据转发满足预定的网络协议IP转发规则。
在一个的实施例中,上述装置还包括第二确定模块(对应于SIM卡流量数据记录模块中的流量记录功能),设置为确定已创建的与该预定SIM卡分别对应的各虚拟SIM卡;统计模块,设置为实时统计各虚拟SIM卡转发的数据的流量信息,并记录至所述流量使用记录中。
需要说明的是,上述各个模块是可以通过软件或硬件来实现的,对于后者,可以通过以下方式实现,但不限于此:上述模块均位于同一处理器中;或者,上述各个模块以任意组合的形式分别位于不同的处理器中。
本申请的实施例还提供了一种存储介质,该存储介质中存储有计算机程序,其中,上述计算机程序被设置为运行时执行上述任一项方法实施例中的步骤。
在本实施例中,上述存储介质可以包括但不限于:U盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。
本申请的实施例还提供了一种电子装置,包括存储器和处理器,该存储器中存储有计算机程序,该处理器被设置为运行上述计算机程序以执行上述任一项方法实施例中的步骤。
在一个实施例中,上述电子装置还可以包括传输设备以及输入输出设备,其中,该传输设备和上述处理器连接,该输入输出设备和上述处理器连接。
本领域的技术人员应该明白,上述的本申请的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上。例如,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本申请不限制于任何特定的硬件和软件结合。

Claims (12)

  1. 一种流量统计方法,包括:
    接收发送端发送的流量统计请求;
    根据所述流量统计请求从预先存储的流量使用记录中确定预定用户通过预定客户识别模块SIM卡连接网络时所使用的流量信息,其中,所述流量使用记录用于记录两个以上用户在通过所述预定SIM卡连接网络时分别使用的流量;
    将确定的所述所使用的流量信息发送给所述发送端。
  2. 根据权利要求1所述的方法,其中,所述根据所述流量统计请求从预先存储的流量使用记录中确定预定用户通过预定SIM卡连接网络时所使用的流量信息包括:
    确定所述流量统计请求中携带的所述预定用户的标识以及所述预定SIM卡的标识;
    根据所述预定用户的标识以及所述预定SIM卡的标识确定为所述预定用户预先创建的对应于所述预定SIM卡的虚拟预定SIM卡,其中,所述虚拟预定SIM卡设置为转发所述预定用户通过所述预定SIM卡与网络交互的数据;
    从所述流量使用记录中确定所述虚拟预定SIM卡转发的所述数据的流量信息。
  3. 根据权利要求2所述的方法,在根据所述流量统计请求从预先存储的流量使用记录中确定预定用户通过预定SIM卡连接网络时所使用的流量信息之前,所述方法还包括:
    在所述预定用户首次通过所述预定SIM卡连接网络时,为所述预定用户创建对应于所述预定SIM卡的所述虚拟预定SIM卡。
  4. 根据权利要求2所述的方法,其中,所述虚拟预定SIM卡与所述预定SIM之间的数据转发满足预定的网络协议IP转发规则。
  5. 根据权利要求2所述的方法,所述方法还包括:
    确定已创建的与所述预定SIM卡分别对应的多个虚拟SIM卡;
    实时统计多个所述虚拟SIM卡转发的所述数据的流量信息,并记录至所述流量使用记录中。
  6. 一种流量统计装置,包括:
    接收模块,设置为接收发送端发送的流量统计请求;
    第一确定模块,设置为根据所述流量统计请求从预先存储的流量使用记录 中确定预定用户通过预定客户识别模块SIM卡连接网络时所使用的流量信息,其中,所述流量使用记录用于记录两个以上用户在通过所述预定SIM卡连接网络时分别使用的流量;
    发送模块,设置为将确定的所述所使用的流量信息发送给所述发送端。
  7. 根据权利要求6所述的装置,其中,所述第一确定模块包括:
    第一确定单元,设置为确定所述流量统计请求中携带的所述预定用户的标识以及所述预定SIM卡的标识;
    第二确定单元,设置为根据所述预定用户的标识以及所述预定SIM卡的标识确定为所述预定用户预先创建的对应于所述预定SIM卡的虚拟预定SIM卡,其中,所述虚拟预定SIM卡设置为转发所述预定用户通过所述预定SIM卡与网络交互的数据;
    第三确定单元,设置为从所述流量使用记录中确定所述虚拟预定SIM卡转发的所述数据的流量信息。
  8. 根据权利要求7所述的装置,所述装置还包括:
    创建模块,设置为在所述第一确定模块根据所述流量统计请求从预先存储的流量使用记录中确定预定用户通过预定SIM卡连接网络时所使用的流量信息之前,在所述预定用户首次通过所述预定SIM卡连接网络时,为所述预定用户创建对应于所述预定SIM卡的所述虚拟预定SIM卡。
  9. 根据权利要求7所述的装置,其中,所述虚拟预定SIM卡与所述预定SIM之间的数据转发满足预定的网络协议IP转发规则。
  10. 根据权利要求7所述的装置,所述装置还包括:
    第二确定模块,设置为确定已创建的且与所述预定SIM卡分别对应的多个虚拟SIM卡;
    统计模块,设置为实时统计多个所述虚拟SIM卡转发的所述数据的流量信息,并记录至所述流量使用记录中。
  11. 一种存储介质,所述存储介质中存储有计算机程序,其中,所述计算机程序被设置为运行时执行权利要求1至5中任一项所述的方法。
  12. 一种电子装置,包括存储器和处理器,所述存储器中存储有计算机程序,所述处理器被设置为运行所述计算机程序以执行所述权利要求1至5任一项中所述的方法。
PCT/CN2019/070936 2018-01-25 2019-01-09 流量统计方法、装置、存储介质及电子装置 WO2019144803A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810074642.4A CN110087226B (zh) 2018-01-25 2018-01-25 流量统计方法、装置、存储介质及电子装置
CN201810074642.4 2018-01-25

Publications (1)

Publication Number Publication Date
WO2019144803A1 true WO2019144803A1 (zh) 2019-08-01

Family

ID=67395214

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/070936 WO2019144803A1 (zh) 2018-01-25 2019-01-09 流量统计方法、装置、存储介质及电子装置

Country Status (2)

Country Link
CN (1) CN110087226B (zh)
WO (1) WO2019144803A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112788016A (zh) * 2020-12-31 2021-05-11 上海欣方智能系统有限公司 一种非法用户识别方法、装置、电子设备及存储介质

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113268518B (zh) * 2020-02-17 2024-03-29 百度在线网络技术(北京)有限公司 流量统计方法及装置、分布式流量统计系统
CN114070756B (zh) * 2021-09-23 2023-09-05 深圳市有方科技股份有限公司 统计网络流量的方法及相关装置

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040120552A1 (en) * 2002-12-19 2004-06-24 Frank Borngraber Mobile communication terminal with built-in camera
CN101027932A (zh) * 2004-09-25 2007-08-29 皇家飞利浦电子股份有限公司 移动站在通信网络中的注册
CN107040913A (zh) * 2016-02-04 2017-08-11 中兴通讯股份有限公司 多移动终端号码共享的方法及系统
CN107182048A (zh) * 2016-03-10 2017-09-19 中兴通讯股份有限公司 实现多个终端共享用户身份识别卡的方法和装置

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104301890B (zh) * 2013-07-19 2018-04-24 富泰华工业(深圳)有限公司 无线上网流量共享控制方法及系统
CN104125307A (zh) * 2014-08-15 2014-10-29 广东欧珀移动通信有限公司 一种数据流量分享方法和装置

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040120552A1 (en) * 2002-12-19 2004-06-24 Frank Borngraber Mobile communication terminal with built-in camera
CN101027932A (zh) * 2004-09-25 2007-08-29 皇家飞利浦电子股份有限公司 移动站在通信网络中的注册
CN107040913A (zh) * 2016-02-04 2017-08-11 中兴通讯股份有限公司 多移动终端号码共享的方法及系统
CN107182048A (zh) * 2016-03-10 2017-09-19 中兴通讯股份有限公司 实现多个终端共享用户身份识别卡的方法和装置

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112788016A (zh) * 2020-12-31 2021-05-11 上海欣方智能系统有限公司 一种非法用户识别方法、装置、电子设备及存储介质
CN112788016B (zh) * 2020-12-31 2023-04-18 上海欣方智能系统有限公司 一种非法用户识别方法、装置、电子设备及存储介质

Also Published As

Publication number Publication date
CN110087226B (zh) 2021-11-02
CN110087226A (zh) 2019-08-02

Similar Documents

Publication Publication Date Title
EP3496338A1 (en) Method for identifying application information in network traffic, and apparatus
WO2019144803A1 (zh) 流量统计方法、装置、存储介质及电子装置
CN102404858B (zh) 一种无线资源优化方法、装置及系统
Pyles et al. SAPSM: Smart adaptive 802.11 PSM for smartphones
CN103891363A (zh) 用于监控后台应用事件的系统和方法
CN111263409B (zh) 提供网络功能服务的元数据信息的方法、系统以及相关设备
CN107404481B (zh) 用户信息识别方法及装置
US20140059388A1 (en) Diagnostic and performance data collection
TW201814609A (zh) 一種資訊推送的方法和系統及用戶端和伺服器
CN111163018A (zh) 网络设备及其降低传输时延的方法
CN111147403A (zh) 报文的处理方法及装置、存储介质和电子装置
CN109068326B (zh) 一种认证方法、装置、终端、存储介质以及系统
CN112566078A (zh) 设备连接方法及装置、存储介质及电子装置
CN103918320A (zh) 用于管理后台应用事件的系统和方法
CN107872533B (zh) 信息推送方法、装置、服务器以及存储介质
US20240022507A1 (en) Information flow recognition method, network chip, and network device
WO2016058409A1 (zh) 控制报文传输的方法、装置和网络功能虚拟化系统
CN110322250A (zh) 无效用户操作路径识别方法、装置、设备及存储介质
CN103326892B (zh) Web接口的操作方法及装置
CN115811484A (zh) 网络探测方法、设备及存储介质
CN113032054B (zh) 一种服务执行方法、装置、存储介质及电子装置
WO2021244548A1 (zh) 即时消息处理方法和装置
CN110430098B (zh) 数据处理系统
CN111290804B (zh) 一种业务配置系统以及业务配置方法、装置和配置服务器
WO2020020358A1 (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: 19743659

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 (EPO FORM 1205A DATED 20.11.2020)

122 Ep: pct application non-entry in european phase

Ref document number: 19743659

Country of ref document: EP

Kind code of ref document: A1