CN105636075A - Flow statistical method and device - Google Patents

Flow statistical method and device Download PDF

Info

Publication number
CN105636075A
CN105636075A CN201410625904.3A CN201410625904A CN105636075A CN 105636075 A CN105636075 A CN 105636075A CN 201410625904 A CN201410625904 A CN 201410625904A CN 105636075 A CN105636075 A CN 105636075A
Authority
CN
China
Prior art keywords
traffic
current network
use condition
type
flow
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201410625904.3A
Other languages
Chinese (zh)
Inventor
贝小玲
杨朗
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Tencent Computer Systems Co Ltd
Original Assignee
Shenzhen Tencent Computer Systems Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Tencent Computer Systems Co Ltd filed Critical Shenzhen Tencent Computer Systems Co Ltd
Priority to CN201410625904.3A priority Critical patent/CN105636075A/en
Publication of CN105636075A publication Critical patent/CN105636075A/en
Pending legal-status Critical Current

Links

Landscapes

  • Mobile Radio Communication Systems (AREA)

Abstract

The present invention discloses a flow statistical method and device belonging to the communication field. The method comprises the steps of obtaining the serial number of a current network type; querying a network type mapping table according to the serial number to determine the type of a current network; obtaining the current flow usage situation in a local flow statistical table as the flow usage situation of the current network. The flow statistical device comprises an obtaining module, a querying module and a statistical module. According to the present invention, the local flow automatic statistics is realized without needing the short message interaction with the operators, and the users are convenient to query the flow.

Description

Method and device for counting flow
Technical Field
The present invention relates to the field of communications, and in particular, to a method and an apparatus for traffic statistics.
Background
With the development of mobile communication, it is becoming more and more common to use mobile phones to surf the internet. For different types of networks, operators also successively provide various packages to meet different traffic demands of users, and meanwhile, the operators also charge the traffic of the mobile phone correspondingly according to the packages.
At present, when a user inquires about the traffic use condition on a mobile phone, the user is usually required to actively send an inquiry short message to an operator on the mobile phone, after the operator receives the inquiry short message, the operator informs the traffic use condition of the user of a corresponding reply short message, and the user knows the current traffic use condition of the user by checking the reply short message.
However, the method for inquiring the traffic service condition is single, and the method can be completed only by exchanging short messages with an operator, and if a user wants to know the traffic service condition in time, the user needs to send the short messages frequently for inquiry, so that the method is troublesome to use and inconvenient.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method and an apparatus for traffic statistics, so as to solve the technical problem that traffic query depends on short message interaction and is inconvenient to use, so as to implement automatic traffic statistics and convenient query. The technical scheme is as follows:
in one aspect, a method for counting traffic is provided, including:
acquiring the number of the current network type;
inquiring a network type mapping table according to the serial number, and determining the type of the current network;
and acquiring the current traffic use condition in a local traffic statistical table, and taking the traffic use condition as the traffic use condition of the current network.
In another aspect, an apparatus for counting traffic is provided, the apparatus comprising:
the acquisition module is used for acquiring the serial number of the current network type;
the inquiry module is used for inquiring the network type mapping table according to the serial number and determining the type of the current network;
and the statistical module is used for acquiring the current traffic use condition in a local traffic statistical table and taking the traffic use condition as the traffic use condition of the current network.
The technical scheme provided by the embodiment of the invention has the following beneficial effects: the method comprises the steps of obtaining the number of the current network type, inquiring a network type mapping table according to the number, determining the type of the current network, obtaining the current flow use condition in a local flow statistical table, and taking the flow use condition as the flow use condition of the current network, so that the automatic local flow statistics is realized, short message interaction with an operator is not needed, and the user can conveniently inquire the flow.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a flow chart of a method for traffic statistics according to an embodiment of the present invention;
FIG. 2 is a flow chart of a method for traffic statistics according to another embodiment of the present invention;
FIG. 3 is a flow chart of a method for flow statistics according to another embodiment of the present invention;
FIG. 4 is a block diagram of an apparatus for flow statistics provided by another embodiment of the present invention;
FIG. 5 is a block diagram of an apparatus for flow statistics provided in accordance with another embodiment of the present invention;
fig. 6 is a diagram of a terminal structure according to another embodiment of the present invention;
FIG. 7 is a block diagram of a server provided in accordance with another embodiment of the present invention;
fig. 8 is a system structure diagram for counting traffic according to another embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
Referring to fig. 1, an embodiment of the present invention provides a method for counting traffic, including:
101: and acquiring the number of the current network type.
The method provided by this embodiment may be applied to a terminal, and a network that may be used by the terminal may include a plurality of networks, such as any one or several of 2G, 3G, and 4G, which is not specifically limited in this embodiment.
Since there are various types of networks, in order to distinguish between different types of networks, the networks may be numbered, with different numbers corresponding to different network types.
102: and inquiring a network type mapping table according to the number to determine the type of the current network.
The network type mapping table is a mapping relation table of network types and numbers. The table includes the network type and the corresponding number. For example, the enhanced data rate for GSM evolution (EDGE) is numbered 2, and the Long Term Evolution (LTE) is numbered 13.
103: and acquiring the current traffic use condition from the local traffic statistical table, and taking the traffic use condition as the traffic use condition of the current network.
The local traffic statistical table may include the current traffic usage but does not include network type information, so that the traffic usage of the current network can be obtained by combining the determined network type with the traffic usage obtained at the moment. The traffic usage may be 80kB, 2MB, 50MB, or 100MB, etc. In general, an operator deducts traffic monthly, so the traffic counting period is also performed monthly, the traffic in each month is accumulated and counted, and is cleared after one month, and the traffic is counted again from zero in the next month.
In this embodiment, optionally, the obtaining of the number of the current network type may include:
acquiring the number of the current network type periodically; or,
and acquiring the number of the current network type after the network switching occurs.
In this embodiment, optionally, querying the network type mapping table according to the number to determine the type of the current network may include:
and inquiring a network type mapping table according to the number, if the number is 2, determining that the type of the current network is enhanced data rate for global system for mobile communications (EDGE), and if the number is 13, determining that the type of the current network is Long Term Evolution (LTE).
In this embodiment, optionally, the method may further include:
obtaining the last service condition of the current network in the last stored traffic statistical result;
and comparing the current network traffic use condition obtained this time with the current network traffic use condition last time, and if the traffic is increased, updating the current network traffic use condition in the traffic statistical result into the current network traffic use condition obtained this time.
In this embodiment, optionally, the method may further include:
sending a request for correcting a local traffic statistic result to a server, wherein the request carries a traffic notification short message sent by an operator;
receiving the EDGE flow service condition and/or LTE flow service condition returned by the server according to the flow notification short message;
and updating the local statistical traffic use condition by using the traffic use condition of the EDGE and/or the traffic use condition of the LTE returned by the server.
In the method provided by this embodiment, the number of the current network type is obtained, the network type mapping table is queried according to the number, the type of the current network is determined, the current traffic usage is obtained in the local traffic statistical table, and the traffic usage is used as the traffic usage of the current network, so that automatic local traffic statistics is realized, short message interaction with an operator is not required, and a user can conveniently query traffic.
Referring to fig. 2, another embodiment of the present invention provides a method for counting traffic, including:
201: and acquiring the number of the current network type periodically or acquiring the number of the current network type after network switching occurs.
In a scenario where the number of the current network type is obtained periodically, the obtaining may be performed according to a preset period, where the period may be set as required, such as 5 minutes, 2 minutes, 1 minute, and so on.
In addition, the number of the current network type can be acquired after the network switching occurs, so that the switched network can be subjected to traffic statistics in time, and the effect of timely traffic statistics is achieved.
It is worth mentioning that, the above-mentioned periodic acquisition and the acquisition after network switching, as long as one of the two conditions is satisfied, the number of the current network type is acquired, so that the traffic can be counted timely and accurately, and the timeliness and accuracy of traffic counting are improved.
202: and inquiring a network type mapping table according to the number to determine the type of the current network.
For example, as shown in table 1, the following description is specific to a network type mapping table that is locally pre-stored, and includes a network type and a corresponding number:
network type Numbering
GPRS 1
EDGE 2
UMTS 3
CDMA 4
EVDO_0 5
EVDO_A 6
1xRTT 7
HSDPA 8
HSUPA 9
HSPA 10
IDEN 11
EVDO_B 12
LTE 13
EHRPD 14
HSPAP 15
TABLE 1
Wherein, the network type in the network type mapping table comprises: general Packet Radio Service (GPRS), EDGE, Universal Mobile Telecommunications System (UMTS), Code Division Multiple Access (CDMA), CDMA20001x Evolution, Evolution of data only (Evolution, DataOnly, EVDO) _0, EVDO _ a, radio transmission technology (radio transmission technology, 1xRTT), High speed downlink packet access (High speed downlink packet access, HSDPA), High speed uplink packet access (High speed uplink packet access, HSUPA), High speed packet access (High speed packet access, HSPA), integrated digital enhanced network (integrated digital enhanced network, entry packet access, ehdn, HSPA), High speed packet access (High speed packet access, HSPA), High speed packet access, hspdata, and packet data, wherein the High speed packet access is hspd, uplink packet access, hspda, and packet data, wherein the High speed packet access is referred to as "packet access — 15 packet data". The corresponding network type may be determined from any of the numbers 1-15.
For example, the step may specifically include:
and inquiring a network type mapping table according to the number, if the number is 2, determining that the type of the current network is enhanced data rate for global system for mobile communications (EDGE), and if the number is 13, determining that the type of the current network is Long Term Evolution (LTE).
EDGE refers to 2G or 3G networks, and LTE refers to 4G networks.
203: and acquiring the current traffic use condition from the local traffic statistical table, and taking the traffic use condition as the traffic use condition of the current network.
Based on the type of the current network determined in the above steps, it can be known that the current traffic usage in the local traffic statistical table is the traffic usage of the current network. For example, having determined that the current network is an EDGE network, and obtaining the current traffic usage from the local traffic statistics table is 500KB, it can be determined that the current EDGE traffic usage is 500 KB. Or, if the current network is determined to be the LTE network, and the current traffic usage obtained from the local traffic statistics table is 30MB, it may be determined that the current LTE traffic uses 30 MB.
204: and obtaining the last service condition of the current network in the last stored traffic statistical result.
In this embodiment, the current statistical result is stored in the traffic statistics performed periodically or after network handover occurs, and when the traffic statistics is performed again, the current statistical result may be compared with the traffic statistical result stored last time, so as to determine whether there is traffic increase.
205: and comparing the current network traffic use condition obtained this time with the current network traffic use condition last time, and if the traffic is increased, updating the current network traffic use condition in the traffic statistical result into the current network traffic use condition obtained this time.
For example, the flow statistics holds the last statistics: EDGE has used traffic 800KB and LTE has used traffic 260 MB. If the current network type determined this time is LTE and the current traffic already uses 310MB, it can be determined that the traffic of LTE has increased after a comparison of 310MB > 260MB, and therefore, the saved used traffic of LTE is updated to 310 MB.
It should be noted that, if the comparison shows that the traffic of the current network does not increase, the last saved result is still retained without updating the traffic usage of the current network.
In the method provided by this embodiment, the number of the current network type is obtained, the network type mapping table is queried according to the number, the type of the current network is determined, the current traffic usage is obtained in the local traffic statistical table, and the traffic usage is used as the traffic usage of the current network, so that automatic local traffic statistics is realized, short message interaction with an operator is not required, and a user can conveniently query traffic.
Referring to fig. 3, another embodiment of the present invention provides a method for counting traffic, including:
301: and acquiring the number of the current network type.
The step may specifically include:
acquiring the number of the current network type periodically; or,
and acquiring the number of the current network type after the network switching occurs.
302: and inquiring a network type mapping table according to the number to determine the type of the current network.
The step may specifically include:
and inquiring a network type mapping table according to the number, if the number is 2, determining that the type of the current network is enhanced data rate for global system for mobile communications (EDGE), and if the number is 13, determining that the type of the current network is Long Term Evolution (LTE).
303: and acquiring the current traffic use condition from the local traffic statistical table, and taking the traffic use condition as the traffic use condition of the current network.
304: and sending a request for correcting the local traffic statistical result to a server, wherein the request carries a traffic notification short message sent by an operator.
The traffic notification short message sent to the terminal by the operator may be actively sent by the operator, for example, when the network traffic reaches 10%, 50%, or 100%, the short message is actively sent to notify the terminal of the traffic usage. Or, the user of the terminal may also actively send a query short message and then reply the query short message to the terminal, which is not specifically limited in this embodiment.
The traffic notification short message generally includes: network type, used traffic or traffic usage percentage, etc. When a terminal can use multiple networks, an operator can notify traffic usage of the multiple networks in a short message. For example, the traffic notification short message sent by the operator includes: 2G/3G has used 20% flow, 4G has used 60% flow, and so on.
305: and receiving the EDGE flow service condition and/or the LTE flow service condition returned by the server according to the flow notification short message.
After receiving the request, the server analyzes the traffic notification short message carried in the request to acquire the network type and the traffic service condition. Specifically, a preset matching algorithm, such as a prefix or suffix matching method, may be used to match the network type, and then the traffic usage is extracted from the statement numbering the network type, which is not described herein. It should be noted that, no matter what type of network is, the method of analyzing, matching and extracting by the server is the same, and the difference is only in the keyword used when matching the network type.
In this embodiment, EDGE (i.e., 2G/3G) and LTE (i.e., 4G) are mainly distinguished, and therefore, a traffic use case in which a server returns to both networks will be described as an example. Of course, the server may return either one of the two or both, which is not specifically limited in this embodiment.
306: and updating the local statistical traffic use condition by using the traffic use condition of the EDGE and/or the traffic use condition of the LTE returned by the server.
The service condition of the flow returned by the server is based on the statistical result of the operator, so the accuracy is higher, and the result of the local statistics of the terminal is updated by using the service condition of the flow, so that the accuracy of the statistical result can be ensured while the terminal can perform the flow statistics in time. The timeliness and the accuracy of the flow statistics are both considered, and the flow statistics effect is better.
In this embodiment, the terminal can show the flow result of statistics on the interface to make things convenient for the user to look over the flow in service behavior, and 2G/3G's flow in service behavior and 4G's flow in service behavior can separately show, and is independent separately, avoids making statistics of the confusion, brings better experience for the user.
In the method provided by this embodiment, the number of the current network type is obtained, the network type mapping table is queried according to the number, the type of the current network is determined, the current traffic usage is obtained in the local traffic statistical table, and the traffic usage is used as the traffic usage of the current network, so that automatic local traffic statistics is realized, short message interaction with an operator is not required, and a user can conveniently query traffic.
Referring to fig. 4, another embodiment of the present invention provides an apparatus for counting traffic, including:
an obtaining module 401, configured to obtain a number of a current network type;
a query module 402, configured to query the network type mapping table according to the number, and determine the type of the current network;
the statistical module 403 is configured to obtain a current traffic usage in the local traffic statistical table, and use the current traffic usage as a traffic usage of the current network.
In this embodiment, optionally, the obtaining module 401 may include:
the first acquisition unit is used for periodically acquiring the number of the current network type; or,
and the second acquisition unit is used for acquiring the number of the current network type after the network switching occurs.
In this embodiment, optionally, the query module 402 may include:
and the inquiry unit is used for inquiring the network type mapping table according to the number, if the number is 2, the type of the current network is determined to be enhanced data rate for global system for mobile communications (EDGE), and if the number is 13, the type of the current network is determined to be Long Term Evolution (LTE).
Referring to fig. 5, in this embodiment, optionally, the apparatus may further include:
a reading module 404, configured to obtain a last traffic usage of the current network from a last stored traffic statistical result;
a comparing module 405, configured to compare the traffic usage of the current network obtained this time with the traffic usage of the current network last time, and if the traffic is increased, update the traffic usage of the current network in the traffic statistical result to the traffic usage of the current network obtained this time.
In this embodiment, optionally, the apparatus may further include:
the sending module is used for sending a request for correcting a local traffic statistic result to the server, wherein the request carries a traffic notification short message sent by an operator;
the receiving module is used for receiving the EDGE flow service condition and/or the LTE flow service condition returned by the server according to the flow notification short message;
and the updating module is used for updating the local statistical traffic use condition by using the EDGE traffic use condition and/or the LTE traffic use condition returned by the server.
The apparatus provided in this embodiment may be applied to a terminal, such as a mobile phone, a tablet computer, and the like, which is not specifically limited in this embodiment.
The device provided by the embodiment obtains the number of the current network type, queries the network type mapping table according to the number, determines the type of the current network, obtains the current traffic use condition in the local traffic statistical table, and uses the traffic use condition as the traffic use condition of the current network, so that the automatic local traffic statistics is realized, short message interaction with an operator is not needed, and the user can conveniently query the traffic.
Referring to fig. 6, another embodiment of the present invention provides a terminal 600, which may include a communication unit 610, a memory 620 including one or more non-volatile readable storage media, an input unit 630, a display unit 640, a sensor 650, an audio circuit 660, a WiFi (wireless fidelity) module 670, a processor 680 including one or more processing cores, and a power supply 690.
Those skilled in the art will appreciate that the terminal structure shown in fig. 6 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components. Wherein:
the communication unit 610 may be used for receiving and transmitting signals during information transmission and reception or during a call, and the communication unit 610 may be an RF (radio frequency) circuit, a router, a modem, or other network communication devices. In particular, when the communication unit 610 is an RF circuit, downlink information of a base station is received and then processed by one or more processors 680; in addition, data relating to uplink is transmitted to the base station. Generally, the RF circuit as a communication unit includes, but is not limited to, an antenna, at least one amplifier, a tuner, one or more oscillators, a Subscriber Identity Module (SIM) card, a transceiver, a coupler, an LNA (low noise amplifier), a duplexer, and the like. In addition, the communication unit 610 may also communicate with a network and other devices through wireless communication. The wireless communication may use any communication standard or protocol, including but not limited to GSM (global system for mobile communications), GPRS (general packet radio service), CDMA (code division multiple access), WCDMA (wideband code division multiple access), LTE (long term evolution), email, SMS (short messaging service), etc. The memory 620 may be used to store software programs and modules, and the processor 680 may execute various functional applications and data processing by operating the software programs and modules stored in the memory 620. The memory 620 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the terminal 600, and the like. Further, the memory 620 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, the memory 620 may also include a memory controller to provide the processor 680 and the input unit 630 access to the memory 620.
The input unit 630 may be used to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control. Alternatively, the input unit 630 may include a touch-sensitive surface 630a and other input devices 630 b. The touch-sensitive surface 630a, also referred to as a touch screen or touch pad, may collect touch operations by a user on or near the touch-sensitive surface 630a (e.g., operations by a user on or near the touch-sensitive surface 630a using a finger, a stylus, or any other suitable object or attachment), and drive the corresponding connection device according to a predetermined program. Alternatively, the touch-sensitive surface 630a may comprise two parts, a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 680, and can receive and execute commands sent by the processor 680. In addition, the touch-sensitive surface 630a may be implemented using various types of resistive, capacitive, infrared, and surface acoustic waves. The input unit 630 may include other input devices 630b in addition to the touch-sensitive surface 630 a. Alternatively, other input devices 630b may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The display unit 640 may be used to display information input by or provided to a user and various graphical user interfaces of the terminal 600, which may be made up of graphics, text, icons, video, and any combination thereof. The display unit 640 may include a display panel 640a, and optionally, the display panel 640a may be configured in the form of an LCD (liquid crystal display), an OLED (organic light-emitting diode), or the like. Further, touch-sensitive surface 630a may overlay display panel 640a, and when touch-sensitive surface 630a detects a touch operation thereon or nearby, processor 680 may determine the type of touch event, and processor 680 may then provide a corresponding visual output on display panel 640a according to the type of touch event. Although in FIG. 6, touch-sensitive surface 630a and display panel 640a are implemented as two separate components for input and output functions, in some embodiments, touch-sensitive surface 630a may be integrated with display panel 640a for input and output functions.
The terminal 600 may also include at least one sensor 650, such as a light sensor, a motion sensor, and other sensors. Alternatively, the light sensor may include an ambient light sensor that adjusts the brightness of the display panel 640a according to the brightness of ambient light, and a proximity sensor that turns off the display panel 640a and/or the backlight when the terminal 600 moves to the ear. As one of the motion sensors, the gravity acceleration sensor can detect the magnitude of acceleration in each direction (generally, three axes), can detect the magnitude and direction of gravity when the mobile phone is stationary, and can be used for applications of recognizing the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer and tapping), and the like; as for other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which can be configured in the terminal 600, detailed descriptions thereof are omitted.
The audio circuit 660, speaker 660a, microphone 660b may provide an audio interface between a user and the terminal 600. The audio circuit 660 can transmit the electrical signal converted from the received audio data to the loudspeaker 660a, and the electrical signal is converted into a sound signal by the loudspeaker 660a and output; on the other hand, the microphone 660b converts the collected sound signal into an electric signal, converts the electric signal into audio data after being received by the audio circuit 660, and then processes the audio data by the audio data output processor 680, and then transmits the audio data to, for example, another terminal via the RF circuit 610, or outputs the audio data to the memory 620 for further processing. The audio circuit 660 may also include an earbud jack to provide communication of a peripheral headset with the terminal 600.
To implement wireless communication, a wireless communication unit 670 may be disposed on the terminal, and the wireless communication unit 670 may be a WiFi module. WiFi belongs to a short-range wireless transmission technology, and the terminal 600 may help a user to send and receive e-mails, browse web pages, access streaming media, and the like through the wireless communication unit 670, which provides the user with wireless broadband internet access. Although fig. 6 shows the wireless communication unit 670, it is understood that it does not belong to the essential constitution of the terminal 600 and may be omitted entirely within the scope not changing the essence of the invention as needed.
The processor 680 is a control center of the terminal 600, connects various parts of the entire handset using various interfaces and lines, and performs various functions of the terminal 600 and processes data by operating or executing software programs and/or modules stored in the memory 620 and calling data stored in the memory 620, thereby integrally monitoring the handset. Optionally, processor 680 may include one or more processing cores; preferably, the processor 680 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into processor 680.
The terminal 600 also includes a power supply 690 (e.g., a battery) for powering the various components, which may be logically coupled to the processor 680 via a power management system to manage charging, discharging, and power consumption via the power management system. The power supply 690 may also include any component including one or more dc or ac power sources, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, and the like.
Although not shown, the terminal 600 may further include a camera, a bluetooth module, and the like, which will not be described herein.
An alternative architecture for a terminal 600 is presented above in connection with fig. 6, in which one or more modules are stored in the memory and configured to be executed by the one or more processors, the one or more modules having the following functionality:
acquiring the number of the current network type;
inquiring a network type mapping table according to the serial number, and determining the type of the current network;
and acquiring the current traffic use condition in a local traffic statistical table, and taking the traffic use condition as the traffic use condition of the current network.
Wherein, the acquiring the number of the current network type includes:
acquiring the number of the current network type periodically; or,
and acquiring the number of the current network type after the network switching occurs.
Wherein, the querying the network type mapping table according to the number to determine the type of the current network includes:
and inquiring a network type mapping table according to the number, if the number is 2, determining that the type of the current network is enhanced data rate GSM evolution (EDGE), and if the number is 13, determining that the type of the current network is LTE.
Wherein, still have the following function:
obtaining the last service condition of the current network in the last stored traffic statistical result;
and comparing the current network traffic use condition obtained this time with the current network traffic use condition last time, and if the traffic is increased, updating the current network traffic use condition in the traffic statistical result into the current network traffic use condition obtained this time.
Wherein, still have the following function:
sending a request for correcting a local traffic statistic result to a server, wherein the request carries a traffic notification short message sent by an operator;
receiving the EDGE flow service condition and/or LTE flow service condition returned by the server according to the flow notification short message;
and updating the local statistical traffic use condition by using the traffic use condition of the EDGE and/or the traffic use condition of the LTE returned by the server.
The terminal provided by this embodiment obtains the number of the current network type, queries the network type mapping table according to the number, determines the type of the current network, obtains the current traffic usage in the local traffic statistics table, and uses the traffic usage as the traffic usage of the current network, thereby implementing automatic local traffic statistics, and being able to complete the local traffic statistics without short message interaction with an operator, thereby facilitating the user to query the traffic.
Another embodiment of the present invention provides a server, which can be used to perform the method for counting traffic provided in the above embodiments. Referring to fig. 7, the server 1900, which may vary considerably in configuration or performance, may include one or more Central Processing Units (CPUs) 1922 (e.g., one or more processors) and memory 1932, one or more storage media 1930 (e.g., one or more mass storage devices) storing applications 1942 or data 1944. Memory 1932 and storage medium 1930 can be, among other things, transient or persistent storage. The program stored in the storage medium 1930 may include one or more modules (not shown), each of which may include a series of instructions operating on a server. Still further, a central processor 1922 may be provided in communication with the storage medium 1930 to execute a series of instruction operations in the storage medium 1930 on the server 1900.
The server 1900 may also include one or more power supplies 1926, one or more wired or wireless network interfaces 1950, one or more input-output interfaces 1958, and/or one or more operating systems 1941, such as WindowsServerTM, MacOSXTM, UnixTM, LinuxTM, FreeBSDTM, etc.
In particular in the present embodiment, execution of the one or more programs by one or more processors includes instructions for:
receiving a request for correcting a local traffic statistic result sent by a terminal, wherein the request carries a traffic notification short message sent by an operator; analyzing the flow notification short message, determining the network type EDGE and/or LTE, and extracting the flow use condition of the EDGE and/or the flow use condition of the LTE; and returning the traffic use condition of the EDGE and/or the traffic use condition of the LTE to the terminal.
The server provided by this embodiment can obtain the latest traffic usage of the network by analyzing the traffic notification short message sent by the terminal, and return the latest traffic usage to the terminal, so that the terminal can correct the local traffic statistical result according to the latest traffic usage, and not only update the local traffic statistical result in time, but also improve the accuracy of the traffic statistical result.
Another embodiment of the present invention provides a non-transitory, readable storage medium having stored therein one or more modules (programs), which when applied in an apparatus, may cause the apparatus to perform the following steps:
acquiring the number of the current network type;
inquiring a network type mapping table according to the serial number, and determining the type of the current network;
and acquiring the current traffic use condition in a local traffic statistical table, and taking the traffic use condition as the traffic use condition of the current network.
Wherein, the acquiring the number of the current network type includes:
acquiring the number of the current network type periodically; or,
and acquiring the number of the current network type after the network switching occurs.
Wherein, the querying the network type mapping table according to the number to determine the type of the current network includes:
and inquiring a network type mapping table according to the number, if the number is 2, determining that the type of the current network is enhanced data rate GSM evolution (EDGE), and if the number is 13, determining that the type of the current network is LTE.
Wherein, the instructions of the following steps can also be executed:
obtaining the last service condition of the current network in the last stored traffic statistical result;
and comparing the current network traffic use condition obtained this time with the current network traffic use condition last time, and if the traffic is increased, updating the current network traffic use condition in the traffic statistical result into the current network traffic use condition obtained this time.
Wherein, the instructions of the following steps can also be executed:
sending a request for correcting a local traffic statistic result to a server, wherein the request carries a traffic notification short message sent by an operator;
receiving the EDGE flow service condition and/or LTE flow service condition returned by the server according to the flow notification short message;
and updating the local statistical traffic use condition by using the traffic use condition of the EDGE and/or the traffic use condition of the LTE returned by the server.
The non-volatile readable storage medium provided in this embodiment obtains the number of the current network type, queries the network type mapping table according to the number, determines the type of the current network, obtains the current traffic usage in the local traffic statistics table, and uses the traffic usage as the traffic usage of the current network, thereby implementing automatic local traffic statistics, and being able to complete the local traffic statistics without performing short message interaction with an operator, thereby facilitating a user to query traffic.
Referring to fig. 8, another embodiment of the present invention provides a system for counting traffic, including: a terminal 801 and a server 802;
the terminal 801 is configured to:
acquiring the number of the current network type; inquiring a network type mapping table according to the number, and determining the type of the current network; acquiring the current traffic use condition from a local traffic statistical table, and taking the traffic use condition as the traffic use condition of the current network; sending a request for correcting a local traffic statistic result to the server, wherein the request carries a traffic notification short message sent by an operator; receiving the EDGE flow service condition and/or LTE flow service condition returned by the server according to the flow notification short message; updating the local statistical traffic use condition by using the EDGE traffic use condition and/or the LTE traffic use condition returned by the server;
the server 802 is configured to:
receiving a request for correcting a local traffic statistic result sent by a terminal, wherein the request carries a traffic notification short message sent by an operator; analyzing the flow notification short message, determining the network type EDGE and/or LTE, and extracting the flow use condition of the EDGE and/or the flow use condition of the LTE; and returning the traffic use condition of the EDGE and/or the traffic use condition of the LTE to the terminal.
The system provided by this embodiment obtains the number of the current network type through the terminal, queries the network type mapping table according to the number, determines the type of the current network, obtains the current traffic usage in the local traffic statistics table, and uses the traffic usage as the traffic usage of the current network, thereby realizing automatic local traffic statistics, being able to complete the local traffic statistics without short message interaction with an operator, and facilitating the user to query the traffic. In addition, the server analyzes and returns the service condition of the network flow, so that the terminal can accurately update, and the accuracy of the local flow statistical result is improved.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, and the program may be stored in a non-volatile readable storage medium, which may be a read-only memory, a magnetic or optical disk, or the like.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (10)

1. A method for traffic statistics, the method comprising:
acquiring the number of the current network type;
inquiring a network type mapping table according to the serial number, and determining the type of the current network;
and acquiring the current traffic use condition in a local traffic statistical table, and taking the traffic use condition as the traffic use condition of the current network.
2. The method of claim 1, wherein obtaining the number of the current network type comprises:
acquiring the number of the current network type periodically; or,
and acquiring the number of the current network type after the network switching occurs.
3. The method of claim 1, wherein querying a network type mapping table according to the number to determine the type of the current network comprises:
and inquiring a network type mapping table according to the number, if the number is 2, determining that the type of the current network is enhanced data rate GSM evolution (EDGE), and if the number is 13, determining that the type of the current network is LTE.
4. The method of claim 1, further comprising:
obtaining the last service condition of the current network in the last stored traffic statistical result;
and comparing the current network traffic use condition obtained this time with the current network traffic use condition last time, and if the traffic is increased, updating the current network traffic use condition in the traffic statistical result into the current network traffic use condition obtained this time.
5. The method of claim 1, further comprising:
sending a request for correcting a local traffic statistic result to a server, wherein the request carries a traffic notification short message sent by an operator;
receiving the EDGE flow service condition and/or LTE flow service condition returned by the server according to the flow notification short message;
and updating the local statistical traffic use condition by using the traffic use condition of the EDGE and/or the traffic use condition of the LTE returned by the server.
6. An apparatus for counting flow, the apparatus comprising:
the acquisition module is used for acquiring the serial number of the current network type;
the inquiry module is used for inquiring the network type mapping table according to the serial number and determining the type of the current network;
and the statistical module is used for acquiring the current traffic use condition in a local traffic statistical table and taking the traffic use condition as the traffic use condition of the current network.
7. The apparatus of claim 6, wherein the obtaining module comprises:
the first acquisition unit is used for periodically acquiring the number of the current network type; or,
and the second acquisition unit is used for acquiring the number of the current network type after the network switching occurs.
8. The apparatus of claim 6, wherein the query module comprises:
and the inquiry unit is used for inquiring the network type mapping table according to the number, if the number is 2, the type of the current network is determined to be enhanced data rate for global system for mobile communications (EDGE), and if the number is 13, the type of the current network is determined to be Long Term Evolution (LTE).
9. The apparatus of claim 6, further comprising:
the reading module is used for obtaining the last flow use condition of the current network from the last flow statistical result stored in the last time;
and the comparison module is used for comparing the current network traffic service condition obtained this time with the current network traffic service condition obtained last time, and if the traffic is increased, updating the current network traffic service condition in the traffic statistical result to the current network traffic service condition obtained this time.
10. The apparatus of claim 6, further comprising:
the system comprises a sending module, a receiving module and a processing module, wherein the sending module is used for sending a request for correcting a local traffic statistical result to a server, and the request carries a traffic notification short message sent by an operator;
the receiving module is used for receiving the EDGE flow service condition and/or the LTE flow service condition returned by the server according to the flow notification short message;
and the updating module is used for updating the local statistical traffic use condition by using the EDGE traffic use condition and/or the LTE traffic use condition returned by the server.
CN201410625904.3A 2014-11-07 2014-11-07 Flow statistical method and device Pending CN105636075A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410625904.3A CN105636075A (en) 2014-11-07 2014-11-07 Flow statistical method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410625904.3A CN105636075A (en) 2014-11-07 2014-11-07 Flow statistical method and device

Publications (1)

Publication Number Publication Date
CN105636075A true CN105636075A (en) 2016-06-01

Family

ID=56050453

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410625904.3A Pending CN105636075A (en) 2014-11-07 2014-11-07 Flow statistical method and device

Country Status (1)

Country Link
CN (1) CN105636075A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106817281A (en) * 2017-02-04 2017-06-09 品骏控股有限公司 A kind of all-in-one flux monitoring method and device
CN109996199A (en) * 2017-12-30 2019-07-09 中国移动通信集团山西有限公司 Communication flows counts charging method, system, equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1716867A (en) * 2004-06-29 2006-01-04 杭州华为三康技术有限公司 Data flow statistic method and device
CN101309220A (en) * 2008-06-27 2008-11-19 华为技术有限公司 Flow control method and apparatus
CN103179589A (en) * 2011-12-20 2013-06-26 中国移动通信集团安徽有限公司 Method and system for alerting data usage of user terminal
CN103188647A (en) * 2011-12-29 2013-07-03 北京网秦天下科技有限公司 Method and system for statistically analyzing and warning Internet surfing flow of mobile terminal
CN103813356A (en) * 2014-02-28 2014-05-21 宇龙计算机通信科技(深圳)有限公司 Flow management device and flow management method thereof
CN104010281A (en) * 2014-05-30 2014-08-27 可牛网络技术(北京)有限公司 Hinting method and device of mobile equipment traffic

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1716867A (en) * 2004-06-29 2006-01-04 杭州华为三康技术有限公司 Data flow statistic method and device
CN101309220A (en) * 2008-06-27 2008-11-19 华为技术有限公司 Flow control method and apparatus
CN103179589A (en) * 2011-12-20 2013-06-26 中国移动通信集团安徽有限公司 Method and system for alerting data usage of user terminal
CN103188647A (en) * 2011-12-29 2013-07-03 北京网秦天下科技有限公司 Method and system for statistically analyzing and warning Internet surfing flow of mobile terminal
CN103813356A (en) * 2014-02-28 2014-05-21 宇龙计算机通信科技(深圳)有限公司 Flow management device and flow management method thereof
CN104010281A (en) * 2014-05-30 2014-08-27 可牛网络技术(北京)有限公司 Hinting method and device of mobile equipment traffic

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106817281A (en) * 2017-02-04 2017-06-09 品骏控股有限公司 A kind of all-in-one flux monitoring method and device
CN109996199A (en) * 2017-12-30 2019-07-09 中国移动通信集团山西有限公司 Communication flows counts charging method, system, equipment and storage medium
CN109996199B (en) * 2017-12-30 2021-10-29 中国移动通信集团山西有限公司 Communication flow statistical charging method, system, equipment and storage medium

Similar Documents

Publication Publication Date Title
US10528012B2 (en) Method and device for sending communication message
KR101978590B1 (en) Message updating method, device and terminal
CN110620822A (en) Network element determination method and device
CN103455330A (en) Application program management method, terminal, equipment and system
CN108112028B (en) Network searching method and equipment for international roaming
CN104965641A (en) Method and apparatus for displaying information
CN104901992B (en) A kind of method and apparatus of resource transfers
CN110022405B (en) Radio frequency parameter adjusting method, device and storage medium
CN107317828B (en) File downloading method and device
CN109688611B (en) Frequency band parameter configuration method, device, terminal and storage medium
CN106294087B (en) Statistical method and device for operation frequency of business execution operation
CN103501373A (en) Method, device and terminal for making call
CN111314900B (en) Wireless connection method, wireless connection device and mobile terminal
CN106374988B (en) Method, device and terminal for configuring inter-downlink-band carrier aggregation
CN105577712A (en) File uploading method, file uploading device, and file uploading system
CN104836698B (en) The method and apparatus of monitoring network environment
CN103457832A (en) Information management method, device and terminal
CN103034319B (en) A kind of the method for display and control, control device and terminal are carried out to terminal
CN110602766A (en) Personal hotspot identification method and method for determining association relationship between terminals
CN105636075A (en) Flow statistical method and device
CN106792583B (en) Multimedia message sending method, terminal and computer readable storage medium
CN110908586A (en) Keyboard display method and device and terminal equipment
CN105635379B (en) Noise suppression method and device
CN111132282B (en) Application processor awakening method and device applied to mobile terminal
CN106899624A (en) A kind of method and apparatus for updating interlock account information

Legal Events

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

Application publication date: 20160601

RJ01 Rejection of invention patent application after publication