CN110087226B - Flow statistical method and device, storage medium and electronic device - Google Patents

Flow statistical method and device, storage medium and electronic device Download PDF

Info

Publication number
CN110087226B
CN110087226B CN201810074642.4A CN201810074642A CN110087226B CN 110087226 B CN110087226 B CN 110087226B CN 201810074642 A CN201810074642 A CN 201810074642A CN 110087226 B CN110087226 B CN 110087226B
Authority
CN
China
Prior art keywords
sim card
predetermined
flow
user
virtual
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810074642.4A
Other languages
Chinese (zh)
Other versions
CN110087226A (en
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.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN201810074642.4A priority Critical patent/CN110087226B/en
Priority to PCT/CN2019/070936 priority patent/WO2019144803A1/en
Publication of CN110087226A publication Critical patent/CN110087226A/en
Application granted granted Critical
Publication of CN110087226B publication Critical patent/CN110087226B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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

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

The invention provides a flow statistical method, a device, a storage medium and an electronic device, wherein the method comprises the following steps: receiving a flow statistic request sent by a sending end; determining flow information used when a preset user passes through a preset SIM card connection network from a pre-stored flow use record according to the flow statistic request, wherein the flow use record is used for recording the flow used by more than two users respectively when the users pass through the preset SIM card connection network; and sending the determined used flow information to the sending end. The invention solves the problem that the flow of each user system using the same SIM card for networking can not be accurately counted under a multi-user system, thereby achieving the effect of accurately counting the flow of each user system using the same SIM card for networking under the multi-user system.

Description

Flow statistical method and device, storage medium and electronic device
Technical Field
The invention relates to the field of communication, in particular to a traffic statistical method, a traffic statistical device, a storage medium and an electronic device.
Background
The current terminal (for example, a mobile phone) system integrates a traffic statistic function, specifically, the system periodically obtains all network byte numbers flowing through the device within a certain time period according to a Subscriber Identity Module (SIM) card device number by kernel, and updates records to realize the traffic statistic function, so that a user can check the usage of internet traffic by using the mobile phone of the user without inquiring an operator, which is very convenient.
Operating systems can be divided into single-user operating systems and multi-user operating systems, depending on how many users are using the system at the same time. A single-user operating system is a system that can be used by only one user at a time, and one user can independently access all hardware and software resources of the system, but if a plurality of users are allowed to use the system at the same time, the system is called a multi-user operating system. With the development of science and technology, multi-user systems have already entered a large number of formal use stages, and multiple users in mobile terminals can support multiple users to use the systems, and the settings of different users are different, and the applications and application data installed by different users are also different. But the settings related to hardware in the system are common, such as network settings, and the background process run by the previous user can continue to run after the user switches.
However, in the existing multi-user system mode, the data network used by each user actually corresponds to the same SIM card device on the mobile phone. Therefore, when a user counts the traffic usage of a certain SIM card in the multi-user mode, the statistics obtained from the system by each user are the same, and accurate segmentation and statistics of the actual usage traffic of each user system cannot be realized, especially when the traffic usage threshold of each user needs to be accurately controlled, and the internet access behavior of each user needs to be finely analyzed.
Aiming at the problem that the flow of each user system using the same SIM card for networking can not be accurately counted under a multi-user system in the related technology, an effective solution is not provided at present.
Disclosure of Invention
The embodiment of the invention provides a flow statistical method, a device, a storage medium and an electronic device, which are used for at least solving the problem that the flow of each user system using the same SIM card for networking cannot be accurately counted under a multi-user system in the related technology.
According to an embodiment of the present invention, there is provided a traffic statistic method including: receiving a flow statistic request sent by a sending end; determining flow information used when a preset user passes through a preset SIM card connection network from a pre-stored flow use record according to the flow statistic request, wherein the flow use record is used for recording the flow used by more than two users respectively when passing through the preset SIM card connection network; and sending the determined used flow information to the sending end.
Optionally, determining, according to the traffic statistic request, traffic information used when a predetermined user connects to a network through a predetermined SIM card from a pre-stored traffic usage record includes: determining the identifier of the predetermined user and the identifier of the predetermined SIM card carried in the traffic statistics; determining a virtual preset SIM card which is created in advance for the preset user and corresponds to the preset SIM card according to the identification of the preset user and the identification of the preset SIM card, wherein the virtual preset SIM card is used for forwarding data of the preset user interacting with a network through the preset SIM card; and determining the flow information of the data forwarded by the virtual preset SIM card from the flow use record.
Optionally, before determining, according to the traffic statistic request, traffic information used when a predetermined user connects to a network through a predetermined SIM card from a pre-stored traffic usage record, the method further includes: and when the predetermined user passes through the predetermined SIM card connection network for the first time, creating the virtual predetermined SIM card corresponding to the predetermined SIM card for the predetermined user.
Optionally, data forwarding between the virtual predetermined SIM card and the predetermined SIM satisfies a predetermined network protocol, IP, forwarding rule.
Optionally, the method further comprises: determining each created virtual SIM card corresponding to the preset SIM card; and counting the flow information of the data forwarded by each virtual SIM card in real time, and recording the flow information into the flow use record.
According to another embodiment of the present invention, there is provided a traffic statistic apparatus including: the receiving module is used for receiving a flow statistic request sent by a sending end; a first determining module, configured to determine, according to the traffic statistics request, traffic information used when a predetermined user passes through a predetermined SIM card connection network from a pre-stored traffic usage record, where the traffic usage record is used to record traffic used by two or more users when passing through the predetermined SIM card connection network; and the sending module is used for sending the determined used flow information to the sending end.
Optionally, the first determining module includes: a first determining unit, configured to determine an identifier of the predetermined user and an identifier of the predetermined SIM card that are carried in the traffic statistics request; a second determining unit, configured to determine, 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, where the virtual predetermined SIM card is used to forward data of the predetermined user interacting with a network through the predetermined SIM card; and the third determining unit is used for determining the flow information of the data forwarded by the virtual preset SIM card from the flow use record.
Optionally, the apparatus further comprises: the creating module is used for creating the virtual predetermined SIM card corresponding to the predetermined SIM card for the predetermined user when the predetermined user firstly passes through the predetermined SIM card connection network before determining the flow information used when the predetermined user passes through the predetermined SIM card connection network from the pre-stored flow usage record according to the flow statistic request.
Optionally, data forwarding between the virtual predetermined SIM card and the predetermined SIM satisfies a predetermined network protocol, IP, forwarding rule.
Optionally, the apparatus further comprises: a second determining module, configured to determine virtual SIM cards that correspond to the predetermined SIM cards, respectively, that have been created; and the counting module is used for counting the flow information of the data forwarded by each virtual SIM card in real time and recording the flow information into the flow use record.
According to a further embodiment of the present invention, there is also provided a storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the above method embodiments when executed.
According to yet another embodiment of the present invention, there is also provided an electronic device, including a memory in which a computer program is stored and a processor configured to execute the computer program to perform the steps in any of the above method embodiments.
The invention can respectively count the flow used by different users when connecting the network through the same SIM card, thereby realizing the purpose of counting the flow by users, effectively solving the problem that the flow of each user system when using the same SIM card for networking can not be accurately counted under a multi-user system in the prior art, and further achieving the effect of accurately counting the flow of each user system when using the same SIM card for networking under the multi-user system.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
fig. 1 is a block diagram of a hardware structure of a mobile terminal according to a message processing method of an embodiment of the present invention;
FIG. 2 is a flow chart of a traffic statistic method according to an embodiment of the invention;
FIG. 3 is a block diagram of a system architecture according to an embodiment of the present invention;
FIG. 4 is a flowchart of a process performed by the SIM card virtualization processing module according to an embodiment of the present invention;
FIG. 5 is a flow chart of the processing performed by the traffic data collection module according to an embodiment of the present invention;
FIG. 6 is a flowchart of a process performed by the virtual SIM card traffic data logging module, according to an embodiment of the present invention;
fig. 7 is a block diagram of a flow statistic device according to an embodiment of the present invention.
Detailed Description
The invention will be described in detail hereinafter with reference to the accompanying drawings in conjunction with embodiments. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
The key point in the embodiment of the invention is to provide a flow statistical method aiming at the problem that accurate segmentation and statistics of actual flow of each user system cannot be realized in the related technology, so that accurate statistics of the flow using conditions of each user can be realized under a multi-user system. The invention is illustrated below with reference to examples:
the method provided in the embodiment of the application can be executed in a mobile terminal, a computer terminal or a similar operation device. Taking the example of operating on a mobile terminal, fig. 1 is a block diagram of a hardware structure of the mobile terminal according to the message processing method of the embodiment of the present invention. As shown in fig. 1, the mobile terminal 10 may include one or more (only one shown in fig. 1) processors 102 (the 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 for storing data, and a transmitting device 106 for communication functions. It will be understood by those skilled in the art that the structure shown in fig. 1 is only an illustration, and does not limit the structure of the mobile terminal. For example, the mobile terminal 10 may also include more or fewer components than shown in FIG. 1, or have a different configuration than shown in FIG. 1.
The memory 104 may be used to store software programs and modules of application software, such as program instructions/modules corresponding to the message processing method in the embodiment of the present invention, and the processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, so as to implement the above-mentioned method. The 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. In some instances, the memory 104 may further include memory located remotely from the processor 102, which may be connected to the mobile terminal 10 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 106 is used for receiving or transmitting data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the mobile terminal 10. In one example, the transmission device 106 includes a Network adapter (NIC), which can be connected to other Network devices through a base station so as to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
In this embodiment, a traffic statistic method operable in the mobile terminal is provided, and fig. 2 is a flowchart of the traffic statistic method according to the embodiment of the present invention, as shown in fig. 2, the method includes the following steps:
step S202, receiving a flow statistic request sent by a sending end;
step S204, determining flow information used when a predetermined user passes through a predetermined SIM card connection network from a pre-stored flow use record according to the flow statistic request, wherein the flow use record is used for recording the flow used by more than two users respectively when passing through the predetermined SIM card connection network;
step S206, sending the determined used traffic information to the sending end.
The main body for executing the above steps may be a terminal, and specifically, may be executed by a traffic control device in the terminal. The sending end and the terminal may be the same terminal or different terminals, and when the sending end and the terminal are the same terminal, the sending end and the terminal may be a flow statistic request triggered by a user. It should be noted that the terminal may support installation of multiple SIM cards, each SIM card may correspond to one traffic usage record, and when the same user is networked through different SIM cards, the total traffic used by the same user may be added according to the traffic recorded in each traffic usage record to obtain the total traffic used by the same user.
Through the embodiment, the flow used by different users when connecting the network through the same SIM card can be respectively counted, so that the purpose of counting the flow by the users is realized, the problem that the flow when each user system uses the same SIM card for networking can not be accurately counted under a multi-user system existing in the prior art is effectively solved, and the effect of accurately counting the flow when each user system uses the same SIM card for networking under the multi-user system is further achieved.
In an optional embodiment, determining, from the pre-stored traffic usage record according to the traffic statistics request, traffic information used by the predetermined subscriber when connecting to the network through the predetermined SIM card includes: determining the identifier of a preset user and the identifier of a preset SIM card carried in the flow statistic request; determining a virtual preset SIM card which is created in advance for a preset user and corresponds to the preset SIM card according to the identification of the preset user and the identification of the preset SIM card, wherein the virtual preset SIM card is used for forwarding data of the preset user interacting with a network through the preset SIM card; and determining the flow information of the data transferred by the virtual preset SIM card from the flow use record. In this embodiment, the virtual SIM cards created for different users and corresponding to the same SIM card are different, and the virtual SIM cards created for the same user and corresponding to different SIM cards are different, a SIM card device virtualization support is introduced, so that one-to-one mapping between the virtual SIM card and the user system and the SIM cards (i.e., the real SIM card in the terminal, which may also include a virtual user identification card provided by an operator) is realized, and the internet data of each user needs to be transferred through the corresponding virtual SIM card, and finally transmission/reception is completed through the real SIM card device. In this embodiment, the traffic forwarded on each virtual SIM card may be counted, so that the traffic forwarded on the corresponding virtual SIM card may be directly obtained when a single user needs to obtain the traffic consumed when surfing the internet through a single SIM card. The traffic data collection module can be used for acquiring traffic information of data transferred by each virtual SIM card.
In an optional embodiment, before determining, according to the traffic statistic request, traffic information used by the predetermined subscriber when connecting to the network through the predetermined SIM card from a pre-stored traffic usage record, the method further comprises: and when the predetermined user passes through the predetermined SIM card connection network for the first time, creating a virtual predetermined SIM card corresponding to the predetermined SIM card for the predetermined user. In this embodiment, a virtual SIM card may be created for a user when the user passes through the SIM card connection network for the first time, but it should be noted that, in actual use, the virtual SIM card may also be created according to actual situations, for example, after the user uses the SIM card more than a predetermined number of times or more than a predetermined time, the corresponding virtual SIM card may be created again.
In an optional embodiment, data forwarding between the virtual predetermined SIM card and the predetermined SIM card satisfies a predetermined network protocol IP forwarding rule, where the IP forwarding rule is determined according to a relevant protocol or can be set according to an actual situation. Thereby ensuring that the user can surf the internet normally.
In an optional embodiment, the method further comprises: determining each virtual SIM card which is established and respectively corresponds to the preset SIM cards; and counting the flow information of the data forwarded by each virtual SIM card in real time, and recording the flow information into the flow use record. In this embodiment, there may be multiple SIM cards in the same terminal, and there may be multiple users of each SIM card, so that virtual SIM cards can be created in the same terminal for each user using each SIM card. The flow information of the data transferred by each virtual SIM card can be counted through the virtual SIM card flow data recording module.
As can be seen from the foregoing embodiments, the present invention is mainly implemented by three modules, namely, an SIM card device virtualization processing module, a traffic data collection module, and a virtual SIM card traffic data recording module, where the relationship between the modules is as shown in fig. 3, and the functions of the modules are as follows:
the SIM card virtualization processing module is used for creating virtual equipment, and when a user starts a data network switch, the module can automatically create corresponding virtual SIM card equipment (also called as a virtual SIM card) for the user and simultaneously construct an IP data packet forwarding rule from the virtual SIM card to a real SIM card;
the flow data collection module is used for automatically carrying out equipment conversion instead of obtaining the flow data of a real SIM card when the system regularly obtains the flow byte number of each network card equipment of the kernel, and obtaining the flow statistical data of all the corresponding virtual SIM card equipment;
and the virtual SIM card flow data recording module is used for classifying, sorting, recording and counting the data acquired by the flow data collecting module from the kernel, mainly finding the corresponding SIM card equipment and the user ID according to the virtual equipment name, and then updating and recording the network byte data used by each SIM card under each user. And when a subsequent user initiates a request for acquiring data of a certain SIM card, directly returning the flow statistical data of the virtual SIM card under the user.
The processing implemented in the modules is described below with reference to the accompanying drawings:
as shown in fig. 4, the process performed by the SIM card virtualization processing module is as follows:
step S401: and the monitoring system user starts a data switch event, wherein the monitoring event is started by triggering of a monitoring signal.
Step S402: and establishing corresponding virtual SIM card equipment according to the operation user ID and the started SIM card equipment, and constructing and recording a mapping relation among the virtual equipment ID, the real SIM ID and the user ID.
Step S403: and constructing an IP forwarding rule between the IP of the virtual SIM card and the real SIM card so as to ensure the normal internet behavior of the user system.
As shown in fig. 5, the flow data collection module performs the following processes:
step S501: and acquiring network flow byte data of all network card devices of the current system from the kernel at regular time.
Step S502: and finding out all virtual SIM card equipment corresponding to the real SIM card equipment loaded by the system at present.
Step S503: and acquiring flow byte data of all the virtual SIM card equipment, and transmitting the flow byte data to the virtual SIM card flow data recording module for storage.
As shown in fig. 6, the virtual SIM card traffic data recording module performs the following processing:
step S601: and receiving the system virtual SIM card equipment flow data to be classified from the flow data collection module.
Step S602: and finding out the corresponding real SIM card ID and the user ID to which the real SIM card ID belongs according to the virtual equipment ID in the data record.
Step S603: and updating and recording the used flow data of the sub-users and the sub-SIM cards.
Step S604: and when a subsequent user initiates a request for acquiring the flow data of a certain SIM card, returning the recorded corresponding virtual SIM card flow.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
In this embodiment, a flow statistics apparatus is further provided, and the apparatus is used to implement the foregoing embodiments and preferred embodiments, and the description already made is omitted. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Fig. 7 is a block diagram of a flow statistics apparatus according to an embodiment of the present invention, and as shown in fig. 7, the apparatus includes the following modules:
a receiving module 72, configured to receive a flow statistics request sent by a sending end; a first determining module 74 (corresponding to the traffic data collecting module), connected to the receiving module 72, for determining traffic information used by a predetermined subscriber when the predetermined subscriber passes through a predetermined SIM card connection network from a pre-stored traffic usage record according to the traffic statistics request, wherein the traffic usage record is used for recording traffic used by two or more subscribers when the predetermined subscriber passes through the predetermined SIM card connection network; a return module 76 (corresponding to the virtual SIM card traffic of the return record of the virtual SIM card traffic data recording module) is connected to the above-mentioned first determining module 74 for sending the determined used traffic information to the sending end.
In an optional embodiment, the first determining module 74 further includes a first determining unit, configured to determine the identifier of the predetermined subscriber and the identifier of the predetermined SIM card, which are carried in the traffic statistics request; a second determining unit, configured to determine, 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, where the virtual predetermined SIM card is used to forward data of the predetermined user interacting with a network through the predetermined SIM card, and virtual SIM cards corresponding to the same SIM card, created for different users, are different; and a third determining unit, configured to determine, from the traffic usage record, traffic information of the data forwarded by the virtual predetermined SIM card.
In an optional embodiment, the apparatus further includes a creating module (corresponding to the SIM card virtualization processing module) configured to create a virtual predetermined SIM card corresponding to the predetermined SIM card for the predetermined subscriber when the predetermined subscriber first passes through the predetermined SIM card connection network before determining traffic information used by the predetermined subscriber when the predetermined subscriber passes through the predetermined SIM card connection network from the pre-stored traffic usage record according to the traffic statistics request.
In an alternative embodiment, the data forwarding between the virtual predetermined SIM card and the predetermined SIM satisfies a predetermined network protocol IP forwarding rule.
In an optional embodiment, 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 virtual SIM cards that have been created and respectively correspond to the predetermined SIM cards; and the counting module is used for counting the flow information of the data forwarded by each virtual SIM card in real time and recording the flow information into the flow use record.
It should be noted that, the above modules may be implemented by software or hardware, and for the latter, the following may be implemented, but not limited to: the modules are all positioned in the same processor; alternatively, the modules are respectively located in different processors in any combination.
Embodiments of the present invention also provide a storage medium having a computer program stored therein, wherein the computer program is configured to perform the steps of any of the above method embodiments when executed.
Optionally, in this embodiment, the storage medium may include, but is not limited to: various media capable of storing program codes, such as a usb disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
Embodiments of the present invention also provide an electronic device, comprising a memory in which a computer program is stored and a processor configured to execute the computer program to perform the steps in any of the above method embodiments.
Optionally, the electronic apparatus may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
It will be apparent to those skilled in the art that the modules or steps of the present invention described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and alternatively, they may be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the principle of the present invention should be included in the protection scope of the present invention.

Claims (12)

1. A traffic statistic method, comprising:
receiving a flow statistic request sent by a sending end on a target terminal, wherein the sending end is positioned at the target terminal, and the target terminal is a multi-user operating system terminal;
determining flow information used when a predetermined user passes through a predetermined Subscriber Identity Module (SIM) card connection network from flow use records pre-stored in the target terminal according to the flow statistic request, wherein the flow use records are used for recording flow respectively used by more than two users when passing through the predetermined SIM card connection network;
and sending the determined used flow information to the sending end.
2. The method of claim 1, wherein determining flow information from a pre-stored flow usage record for use by a predetermined subscriber in connecting a network through a predetermined SIM card based on the flow statistics request comprises:
determining the identifier of the predetermined user and the identifier of the predetermined SIM card carried in the traffic statistic request;
determining a virtual preset SIM card which is created in advance for the preset user and corresponds to the preset SIM card according to the identification of the preset user and the identification of the preset SIM card, wherein the virtual preset SIM card is used for forwarding data of the preset user interacting with a network through the preset SIM card;
and determining the flow information of the data forwarded by the virtual preset SIM card from the flow use record.
3. The method of claim 2, wherein prior to determining flow information from the pre-stored flow usage records for use by the predetermined subscriber in connecting to the network via the predetermined SIM card based on the flow statistics request, the method further comprises:
and when the predetermined user passes through the predetermined SIM card connection network for the first time, creating the virtual predetermined SIM card corresponding to the predetermined SIM card for the predetermined user.
4. The method of claim 2, wherein data forwarding between the virtual predetermined SIM card and the predetermined SIM satisfies predetermined network protocol, IP, forwarding rules.
5. The method of claim 2, further comprising:
determining each created virtual SIM card corresponding to the preset SIM card;
and counting the flow information of the data forwarded by each virtual SIM card in real time, and recording the flow information into the flow use record.
6. A flow statistic device, comprising:
the system comprises a receiving module, a sending module and a receiving module, wherein the receiving module is used for receiving a flow statistic request sent by a sending end on a target terminal, the sending end is positioned on the target terminal, and the target terminal is a multi-user operating system terminal;
a first determining module, configured to determine, according to the traffic statistics request, traffic information used when a predetermined user connects to a network through a predetermined subscriber identity module SIM card from a traffic usage record pre-stored in the target terminal, where 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, respectively;
and the sending module is used for sending the determined used flow information to the sending end.
7. The apparatus of claim 6, wherein the first determining module comprises:
a first determining unit, configured to determine an identifier of the predetermined user and an identifier of the predetermined SIM card that are carried in the traffic statistics request;
a second determining unit, configured to determine, 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, where the virtual predetermined SIM card is used to forward data of the predetermined user interacting with a network through the predetermined SIM card;
and the third determining unit is used for determining the flow information of the data forwarded by the virtual preset SIM card from the flow use record.
8. The apparatus of claim 7, further comprising:
the creating module is used for creating the virtual predetermined SIM card corresponding to the predetermined SIM card for the predetermined user when the predetermined user firstly passes through the predetermined SIM card connection network before determining the flow information used when the predetermined user passes through the predetermined SIM card connection network from the pre-stored flow usage record according to the flow statistic request.
9. The apparatus of claim 7, wherein data forwarding between the virtual predetermined SIM card and the predetermined SIM satisfies a predetermined network protocol (IP) forwarding rule.
10. The apparatus of claim 7, further comprising:
a second determining module, configured to determine virtual SIM cards that correspond to the predetermined SIM cards, respectively, that have been created;
and the counting module is used for counting the flow information of the data forwarded by each virtual SIM card in real time and recording the flow information into the flow use record.
11. A computer-readable storage medium, in which a computer program is stored, wherein the computer program is arranged to, when executed by a processor, perform the method of any one of claims 1 to 5.
12. An electronic device comprising a memory and a processor, wherein the memory has stored therein a computer program, and wherein the processor is arranged to execute the computer program to perform the method of any of claims 1 to 5.
CN201810074642.4A 2018-01-25 2018-01-25 Flow statistical method and device, storage medium and electronic device Active CN110087226B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201810074642.4A CN110087226B (en) 2018-01-25 2018-01-25 Flow statistical method and device, storage medium and electronic device
PCT/CN2019/070936 WO2019144803A1 (en) 2018-01-25 2019-01-09 Traffic statistics method and apparatus, storage medium, and electronic apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810074642.4A CN110087226B (en) 2018-01-25 2018-01-25 Flow statistical method and device, storage medium and electronic device

Publications (2)

Publication Number Publication Date
CN110087226A CN110087226A (en) 2019-08-02
CN110087226B true CN110087226B (en) 2021-11-02

Family

ID=67395214

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810074642.4A Active CN110087226B (en) 2018-01-25 2018-01-25 Flow statistical method and device, storage medium and electronic device

Country Status (2)

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

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113268518B (en) * 2020-02-17 2024-03-29 百度在线网络技术(北京)有限公司 Flow statistics method and device and distributed flow statistics system
CN112788016B (en) * 2020-12-31 2023-04-18 上海欣方智能系统有限公司 Illegal user identification method and device, electronic equipment and storage medium
CN114070756B (en) * 2021-09-23 2023-09-05 深圳市有方科技股份有限公司 Method for counting network traffic and related device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104125307A (en) * 2014-08-15 2014-10-29 广东欧珀移动通信有限公司 Data flow sharing method and device
CN104301890A (en) * 2013-07-19 2015-01-21 富泰华工业(深圳)有限公司 Method and system for controlling sharing of wireless network access flow
CN107040913A (en) * 2016-02-04 2017-08-11 中兴通讯股份有限公司 The shared method and system of multi-mobile-terminal number
CN107182048A (en) * 2016-03-10 2017-09-19 中兴通讯股份有限公司 Realize that multiple terminals share the method and apparatus of subscriber identification card

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7215881B2 (en) * 2002-12-19 2007-05-08 Nokia Corporation Mobile communications equipment with built-in camera
GB0421408D0 (en) * 2004-09-25 2004-10-27 Koninkl Philips Electronics Nv Registration of a mobile station in a communication network

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104301890A (en) * 2013-07-19 2015-01-21 富泰华工业(深圳)有限公司 Method and system for controlling sharing of wireless network access flow
CN104125307A (en) * 2014-08-15 2014-10-29 广东欧珀移动通信有限公司 Data flow sharing method and device
CN107040913A (en) * 2016-02-04 2017-08-11 中兴通讯股份有限公司 The shared method and system of multi-mobile-terminal number
CN107182048A (en) * 2016-03-10 2017-09-19 中兴通讯股份有限公司 Realize that multiple terminals share the method and apparatus of subscriber identification card

Also Published As

Publication number Publication date
WO2019144803A1 (en) 2019-08-01
CN110087226A (en) 2019-08-02

Similar Documents

Publication Publication Date Title
CN110312279B (en) Network data monitoring method and device
CN113037513B (en) Charging management method, user plane functional entity and control plane functional entity
CN108810116B (en) Message processing method and related product
CN110087226B (en) Flow statistical method and device, storage medium and electronic device
CN111147403B (en) Message processing method and device, storage medium and electronic device
EP3979577B1 (en) Queue congestion control method, device and storage medium
US20160020982A1 (en) Method, device and system for online processing of data
CN106603736B (en) MAC address processing method and device
CN111585815B (en) Port data acquisition method and device
CN113434293A (en) Method and apparatus for processing repeat request, storage medium, and electronic apparatus
CN111884875A (en) Offline device determination method and device
CN107204924B (en) Link discovery method and device
CN113518125A (en) Offline data uploading method and system, storage medium and electronic device
CN112566078A (en) Device connection method and apparatus, storage medium, and electronic apparatus
CN112689249B (en) Short message sending method, device, system, storage medium and electronic equipment
CN115037654A (en) Flow statistical method and device, electronic equipment and readable storage medium
CN112751706A (en) Target data transmission method and device
CN112689010B (en) Equipment message transmission method and device, storage medium and electronic device
CN113132986B (en) Method and device for realizing mesh network of WiFi based on DPP protocol, and storage medium
CN110381453B (en) Incoming call reminding method and system for one-number double-terminal
CN111294414A (en) Message processing method, device and system
CN113852975B (en) Method and device for determining performance of protocol stack program of base station
CN114339826A (en) Performance data file generation method and device, storage medium and electronic device
CN115734204A (en) Data updating method and device, storage medium and electronic device
CN116095729A (en) Method, device, server and storage medium for determining quality difference base station

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant