CN106230662A - Network flux statistical method and device - Google Patents

Network flux statistical method and device Download PDF

Info

Publication number
CN106230662A
CN106230662A CN201610622084.1A CN201610622084A CN106230662A CN 106230662 A CN106230662 A CN 106230662A CN 201610622084 A CN201610622084 A CN 201610622084A CN 106230662 A CN106230662 A CN 106230662A
Authority
CN
China
Prior art keywords
application program
flow
network
identification information
user identification
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.)
Granted
Application number
CN201610622084.1A
Other languages
Chinese (zh)
Other versions
CN106230662B (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.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software 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 Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN201610622084.1A priority Critical patent/CN106230662B/en
Publication of CN106230662A publication Critical patent/CN106230662A/en
Application granted granted Critical
Publication of CN106230662B publication Critical patent/CN106230662B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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
    • 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

Abstract

The disclosure is directed to a kind of network flux statistical method and device, wherein, method includes: when the first application program accesses network by the second application program, obtain all socket filec descriptors that described second application program creates during accessing network;Obtain the first user identification information that described first application program is corresponding;Use all socket filec descriptors described in described first user identification information labelling;According to all socket filec descriptors after labelling, determine the flow that described first application program is used during accessing network.By this technical scheme, it is possible to determine the flow that the first application program is used during accessing network, thus avoid all flows accessed in network development process are all counted on the second application program under one's name so that traffic statistics are finer and accurate.

Description

Network flux statistical method and device
Technical field
It relates to traffic statistics technical field, particularly relate to a kind of network flux statistical method and device.
Background technology
In android system, there will be a lot of single application A PP provide network service for other application programs Situation, such as system downloads program, PUSH passage etc..The network traffics produced in this case all can count on network traffics On the real APP occurred.So cause such APP can accumulate a lot of flow, and the respective stream of requestor cannot be accurately distinguished Amount Expenditure Levels.
In order to solve above-mentioned technical problem, existing technical scheme is that the APP producing network request is by record request APP Information, distinguish record each APP by oneself consume flow.It is provided to modules inquiry, the stream that oneself produces Amount all to which APP consumes.
This mode is not official's support pattern of android system, android system provide flow inquiry mode without The subdivided data that method undertakes APP record flow is merged into initial data, the when of third-party application inquiry or flow undertakes APP consumes all flows.
Summary of the invention
Disclosure embodiment provides a kind of network flux statistical method and device, including following technical scheme:
First aspect according to disclosure embodiment, it is provided that a kind of network flux statistical method, including:
When the first application program accesses network by the second application program, obtain described second application program and accessing net The all socket filec descriptors created during network;
Obtain the first user identification information that described first application program is corresponding;
Use all socket filec descriptors described in described first user identification information labelling;
According to all socket filec descriptors after labelling, determine that described first application program is in the process accessing network Used in flow.
In one embodiment, described method also includes:
The described flow determined is saved in the statistical information data file that operating system is supported;
When receiving first flow querying command, from described statistical information data file, obtain described flow.
In one embodiment, described method also includes:
Receive the querying command of the flow total amount that described first application program is used in preset time period;
According to described querying command, preserve in obtaining preset time period from described statistical information data file about institute State all flow informations of the first application program;
Described all flow informations are added up, to obtain described flow total amount.
In one embodiment, the first user identification information that described first application program of described acquisition is corresponding, bag Include:
Described first user identification information is obtained from the process that described first application program is corresponding.
In one embodiment, all socket files described in described use described first user identification information labelling Descriptor, including:
The second User Identity letter that the second application program is corresponding is obtained from described all socket filec descriptors Breath;
Described first user identification information is used to substitute the second user in described all socket filec descriptors Identification information.
Second aspect according to disclosure embodiment, it is provided that a kind of network flow statistic device, including:
First acquisition module, for when the first application program accesses network by the second application program, obtaining described the All socket filec descriptors that two application programs create during accessing network;
Second acquisition module, obtains the first user identification information that described first application program is corresponding;
Mark module, is used for using all socket files described in described first user identification information labelling to describe Symbol;
Determine module, for according to all socket filec descriptors after labelling, determine that described first application program exists The flow used during accessing network.
In one embodiment, described device also includes:
Memory module, for being saved in the described flow determined in the statistical information data file that operating system is supported;
3rd acquisition module, for when receiving first flow querying command, from described statistical information data file Obtain described flow.
In one embodiment, described device also includes:
Receiver module, for receiving the inquiry of the flow total amount that described first application program is used in preset time period Order;
4th acquisition module, is used for according to described querying command, when obtaining default from described statistical information data file Between all flow informations about described first application program that preserve in section;
Statistical module, for adding up described all flow informations, to obtain described flow total amount.
In one embodiment, described second acquisition module is used for:
Described first user identification information is obtained from the process that described first application program is corresponding.
In one embodiment, described mark module includes:
Obtain submodule, be used for from described all socket filec descriptors, obtain second that the second application program is corresponding User Identity information;
Substitute submodule, be used for using described first user identification information to substitute described all socket files and describe The second User Identity information in symbol.
The third aspect according to disclosure embodiment, it is provided that a kind of network flow statistic device, including:
Processor;
For storing the memorizer of processor executable;
Wherein, described processor is configured to:
When the first application program accesses network by the second application program, obtain described second application program and accessing net The all socket filec descriptors created during network;
Obtain the first user identification information that described first application program is corresponding;
Use all socket filec descriptors described in described first user identification information labelling;
According to all socket filec descriptors after labelling, determine that described first application program is in the process accessing network Used in flow.
Embodiment of the disclosure that the technical scheme of offer can include following beneficial effect:
Technique scheme, when the first application program accesses network by the second application program, what i.e. request accessed should When undertaking application program access network by program by network, it is possible to use the first user identity mark that the first application program is corresponding Know all socket filec descriptors that information flag creates in accessing network development process, in this manner it is possible to determine the first application The flow that program is used during accessing network, thus avoid all counting on all flows accessed in network development process Second application program is under one's name so that traffic statistics are finer and accurate.
It should be appreciated that it is only exemplary and explanatory, not that above general description and details hereinafter describe The disclosure can be limited.
Accompanying drawing explanation
Accompanying drawing herein is merged in description and constitutes the part of this specification, it is shown that meet the enforcement of the disclosure Example, and for explaining the principle of the disclosure together with description.
Fig. 1 is the flow chart according to a kind of network flux statistical method shown in an exemplary embodiment.
Fig. 2 is the flow chart according to the another kind of network flux statistical method shown in an exemplary embodiment.
Fig. 3 is the flow chart according to another network flux statistical method shown in an exemplary embodiment.
Fig. 4 is the flow chart according to the another kind of network flux statistical method shown in an exemplary embodiment.
Fig. 5 is according to the flow chart of step S103 in a kind of network flux statistical method shown in an exemplary embodiment.
Fig. 6 is the block diagram according to a kind of network flow statistic device shown in an exemplary embodiment.
Fig. 7 is the block diagram according to the another kind of network flow statistic device shown in an exemplary embodiment.
Fig. 8 is the block diagram according to the another kind of network flow statistic device shown in an exemplary embodiment.
Fig. 9 is according to the block diagram of mark module in a kind of network flow statistic device shown in an exemplary embodiment.
Figure 10 is according to a kind of block diagram for network flow statistic device shown in an exemplary embodiment.
Detailed description of the invention
Here will illustrate exemplary embodiment in detail, its example represents in the accompanying drawings.Explained below relates to During accompanying drawing, unless otherwise indicated, the same numbers in different accompanying drawings represents same or analogous key element.Following exemplary embodiment Described in embodiment do not represent all embodiments consistent with the disclosure.On the contrary, they are only with the most appended The example of the apparatus and method that some aspects that described in detail in claims, the disclosure are consistent.
It is owned by one or with other Application sharing one in each application A PP of Android operation system Individual User Identity UID.Android operation system records flow with UID for indicating.When in APP running, APP Process can carry oneself UID information.All processes are required for creating a socket FD when of producing network request, And access network by socket system call request kernel.In correlation technique, system kernel can record entering of request network The UID of journey, then counts on network traffics produced by the socket FD of this process creation on this UID.Now, If the first application program accesses network by the second application program, then access the flow produced in network development process and all can count on the Two application programs are under one's name.By third party application and can not find out the first application program and network development process produces accessing Flow.
In order to solve above-mentioned technical problem, disclosure embodiment provides a kind of network flux statistical method, and the method can In terminal unit, such as mobile phone, computer, digital broadcast terminal, messaging devices, game console, flat board sets Standby, armarium, body-building equipment, personal digital assistant etc..
Fig. 1 is the flow chart according to a kind of network flux statistical method shown in an exemplary embodiment.
As it is shown in figure 1, this network flux statistical method includes step S101-S104:
In step S101, when the first application program accesses network by the second application program, obtain the second application journey All socket filec descriptors that sequence creates during accessing network;
When the first application program accesses network by the second application program, in the second application program running, the The process of two application programs can carry the User Identity information of oneself, and all processes are required for the when of producing network creating Socket filec descriptor, and access network by socket system call request kernel, the most all socket files describe Symbol should be all to use the second User Identity information that the second application program is corresponding to be identified.
In step s 102, the first user identification information that the first application program is corresponding is obtained;
In step s 103, first user identification information labelling all socket filec descriptor is used;
Obtain the first user identification information that the first application program is corresponding, and use first user identification information Labelling the first application program is accessing all socket filec descriptors created during network by the second application program, So, the flow produced in the process just can count on the first application program corresponding to first user identification information Under one's name, thus realize the reasonable flow distribution of operating system bottom, thus avoid by all flows in access network development process all Count on the second application program under one's name so that traffic statistics are finer and accurate.
In step S104, according to all socket filec descriptors after labelling, determine that the first application program is accessing The flow used during network.
When determining the flow that the first application program is used during accessing network, can obtain and access network During, the target socket filec descriptor being marked with first user identification information of all generations, and then according to These target socket filec descriptors count the first application program and are accessing the flow used in network development process.
In this embodiment, when the first application program accesses network by the second application program, what i.e. request accessed should When undertaking application program access network by program by network, it is possible to use the first user identity mark that the first application program is corresponding Know all socket filec descriptors that information flag creates in accessing network development process, in this manner it is possible to determine the first application The flow that program is used during accessing network, thus avoid all counting on all flows accessed in network development process Second application program is under one's name so that traffic statistics are finer and accurate.
Such as, when certain shopping application program accesses network by browser application, net is accessed at shopping application program During network, all processes all can create socket filec descriptor when of producing network, and when carrying out traffic statistics, also It is to carry out adding up according to the User Identity information of mark on these socket filec descriptors, in the present embodiment, obtains Take the User Identity information of shopping application program, and use the User Identity information flag of shopping application program to access The socket filec descriptor created in network development process, so, when carrying out traffic statistics, it is possible to count shopping application program The flow used, without all flows produced during this are all counted on browser under one's name, so that flow Statistics is finer and accurate.
Fig. 2 is the flow chart according to the another kind of network flux statistical method shown in an exemplary embodiment.
As in figure 2 it is shown, in one embodiment, said method also includes step S201-S202:
In step s 201, the flow determined is saved in the statistical information data file that operating system is supported;
In step S202, when receiving first flow querying command, from statistical information data file, obtain flow.
In this embodiment, the flow of the first application program determined is saved in the statistical information number that operating system is supported According in file, so, the data on flows after can being segmented the when of third party application inquiry so that traffic statistics are more Fine and accurate.
Fig. 3 is the flow chart according to another network flux statistical method shown in an exemplary embodiment.
As it is shown on figure 3, in one embodiment, said method also includes step S301-S303:
In step S301, receive the inquiry life of the flow total amount that the first application program is used in preset time period Order;
User can inquire about, with input flow rate total amount querying command, the stream that the first application program is used in preset time period Amount total amount, the flow total amount used such as the first application program in one week of inquiry.
In step s 302, according to querying command, preserve in obtaining preset time period from statistical information data file All flow informations about the first application program;
When receiving querying command, according to time conditions, flow can be added up, in statistics preset time period, All flows that first application program is used.Wherein, when user or manufacturer arbitrarily can arrange default according to individual demand Between section, thus meet the different flow statistical demand of different different user.
In step S303, all flow informations are added up, to obtain flow total amount.
In this embodiment, when the first application program accesses network by the second application program, i.e. request applications When undertaking application program access network by network, the flow that request applications is used in the process can be added up, i.e. Traffic statistics can be finely divided, thus facilitate user to know flow produced by request applications, promote making of user With experience.
Fig. 4 is the flow chart according to the another kind of network flux statistical method shown in an exemplary embodiment.
As shown in Figure 4, in one embodiment, above-mentioned steps S102 includes step S401:
In step S401, from the process that the first application program is corresponding, obtain first user identification information.
In this embodiment, in the process that the first application program is corresponding, first user identification information can be comprised, because of This, can obtain first user identification information in these processes, in this manner it is ensured that first user identification information Accuracy.
Fig. 5 is according to the flow chart of step S103 in a kind of network flux statistical method shown in an exemplary embodiment.
As it is shown in figure 5, in one embodiment, above-mentioned steps S103 includes step S501-S502:
In step S501, from all socket filec descriptors, obtain second user's body that the second application program is corresponding Part identification information;
When the first application program accesses network by the second application program, in the second application program running, the The process of two application programs can carry the User Identity information of oneself, and all processes are required for the when of producing network creating Socket filec descriptor, and access network by socket system call request kernel, the most all socket files describe Symbol should be all to use the second User Identity information that the second application program is corresponding to be identified.Accordingly, it would be desirable to first from All socket filec descriptors obtain the second User Identity information that the second application program is corresponding.
In step S502, first user identification information is used to substitute second in all socket filec descriptors User Identity information.
After the second User Identity information in getting all socket filec descriptors, use first user identity Mark substitutes the second User Identity, so, the most all contains first user identity mark in these socket filec descriptors Knowledge information, when carrying out traffic statistics, can count on the first application program under one's name.
Wherein, in order to ensure the safety and effectiveness of traffic statistics, can be arranged on and call above-mentioned acquisition first user identity Identification information when substituting the second User Identity information with it, needs operating system authority, only operating system to gather around There is this authority, thus avoid other application programs to revise the User Identity information in socket filec descriptor without authorization.
Following for disclosure device embodiment, may be used for performing method of disclosure embodiment.
Fig. 6 is the block diagram according to a kind of network flow statistic device shown in an exemplary embodiment, and this device can lead to Cross software, hardware or both be implemented in combination with become the some or all of of terminal unit.As shown in Figure 6, these network traffics Statistic device includes:
First acquisition module 61, when being configured as the first application program by the second application program access network, obtains All socket filec descriptors that described second application program creates during accessing network;
Second acquisition module 62, is configured to obtain the first user identity letter that described first application program is corresponding Breath;
Mark module 63, is configured with all socket files described in described first user identification information labelling Descriptor;
Determine module 64, all socket filec descriptors after being configured to according to labelling, determine described first application The flow that program is used during accessing network.
When determining the flow that the first application program is used during accessing network, can obtain and access network During, the target socket filec descriptor being marked with first user identification information of all generations, and then according to These target socket filec descriptors count the first application program and are accessing the flow used in network development process.
In this embodiment, when the first application program accesses network by the second application program, what i.e. request accessed should When undertaking application program access network by program by network, it is possible to use the first user identity mark that the first application program is corresponding Know all socket filec descriptors that information flag creates in accessing network development process, in this manner it is possible to determine the first application The flow that program is used during accessing network, thus avoid all counting on all flows accessed in network development process Second application program is under one's name so that traffic statistics are finer and accurate.
Such as, when certain shopping application program accesses network by browser application, net is accessed at shopping application program During network, all processes all can create socket filec descriptor when of producing network, and when carrying out traffic statistics, also It is to carry out adding up according to the User Identity information of mark on these socket filec descriptors, in the present embodiment, obtains Take the User Identity information of shopping application program, and use the User Identity information flag of shopping application program to access The socket filec descriptor created in network development process, so, when carrying out traffic statistics, it is possible to count shopping application program The flow used, without all flows produced during this are all counted on browser under one's name, so that flow Statistics is finer and accurate.
Fig. 7 is the block diagram according to the another kind of network flow statistic device shown in an exemplary embodiment.
As it is shown in fig. 7, in one embodiment, said apparatus also includes:
Memory module 71, is configured to the described flow determined is saved in the statistical information data literary composition that operating system is supported In part;
3rd acquisition module 72, when being configured as receiving first flow querying command, from described statistical information data File obtains described flow.
In this embodiment, the flow of the first application program determined is saved in the statistical information number that operating system is supported According in file, so, the data on flows after can being segmented the when of third party application inquiry so that traffic statistics are more Fine and accurate.
Fig. 8 is the block diagram according to the another kind of network flow statistic device shown in an exemplary embodiment.
As shown in Figure 8, in one embodiment, said apparatus also includes:
Receiver module 81, is configured to receive the flow total amount that described first application program is used in preset time period Querying command;
4th acquisition module 82, is configured to according to described querying command, obtains from described statistical information data file The all flow informations about described first application program preserved in preset time period;
Statistical module 83, is configured to add up described all flow informations, to obtain described flow total amount.
In this embodiment, when the first application program accesses network by the second application program, i.e. request applications When undertaking application program access network by network, the flow that request applications is used in the process can be added up, i.e. Traffic statistics can be finely divided, thus facilitate user to know flow produced by request applications, promote making of user With experience.
In one embodiment, described second acquisition module 62 is used for:
Described first user identification information is obtained from the process that described first application program is corresponding.
In this embodiment, in the process that the first application program is corresponding, first user identification information can be comprised, because of This, can obtain first user identification information in these processes, in this manner it is ensured that first user identification information Accuracy.
Fig. 9 is according to the block diagram of mark module in a kind of network flow statistic device shown in an exemplary embodiment.
As it is shown in figure 9, in one embodiment, described mark module 63 includes:
Obtain submodule 91, be configured to from described all socket filec descriptors, obtain the second application program corresponding The second User Identity information;
When the first application program accesses network by the second application program, in the second application program running, the The process of two application programs can carry the User Identity information of oneself, and all processes are required for the when of producing network creating Socket filec descriptor, and access network by socket system call request kernel, the most all socket files describe Symbol should be all to use the second User Identity information that the second application program is corresponding to be identified.Accordingly, it would be desirable to first from All socket filec descriptors obtain the second User Identity information that the second application program is corresponding.
Substitute submodule 92, be configured with described first user identification information and substitute described all socket literary composition The second User Identity information in part descriptor.
After the second User Identity information in getting all socket filec descriptors, use first user identity Mark substitutes the second User Identity, so, the most all contains first user identity mark in these socket filec descriptors Knowledge information, when carrying out traffic statistics, can count on the first application program under one's name.
The third aspect according to disclosure embodiment, it is provided that a kind of network flow statistic device, including:
Processor;
For storing the memorizer of processor executable;
Wherein, processor is configured to:
When the first application program accesses network by the second application program, obtain described second application program and accessing net The all socket filec descriptors created during network;
Obtain the first user identification information that described first application program is corresponding;
Use all socket filec descriptors described in described first user identification information labelling;
According to all socket filec descriptors after labelling, determine that described first application program is in the process accessing network Used in flow.
Above-mentioned processor is also configured to:
The described flow determined is saved in the statistical information data file that operating system is supported;
When receiving first flow querying command, from described statistical information data file, obtain described flow.
Above-mentioned processor is also configured to:
Receive the querying command of the flow total amount that described first application program is used in preset time period;
According to described querying command, preserve in obtaining preset time period from described statistical information data file about institute State all flow informations of the first application program;
Described all flow informations are added up, to obtain described flow total amount.
Above-mentioned processor is also configured to:
The first user identification information that described first application program of described acquisition is corresponding, including:
Described first user identification information is obtained from the process that described first application program is corresponding.
Above-mentioned processor is also configured to:
All socket filec descriptors described in described use described first user identification information labelling, including:
The second User Identity letter that the second application program is corresponding is obtained from described all socket filec descriptors Breath;
Described first user identification information is used to substitute the second user in described all socket filec descriptors Identification information.
Figure 10 is according to a kind of block diagram for network flow statistic device shown in an exemplary embodiment, and this device is fitted For terminal unit.Such as, device 1000 can be mobile phone, computer, digital broadcast terminal, messaging devices, trip Play control station, tablet device, armarium, body-building equipment, personal digital assistant etc..
Device 1000 can include following one or more assembly: processes assembly 1002, memorizer 1004, power supply module 1006, multimedia groupware 1008, audio-frequency assembly 1010, the interface 1012 of input/output (I/O), sensor cluster 1014, and Communications component 1016.
Process assembly 1002 and generally control the integrated operation of device 1000, such as with display, call, data communication, The operation that camera operation and record operation are associated.Process assembly 1002 and can include that one or more processor 1020 performs Instruction, to complete all or part of step of above-mentioned method.Additionally, process assembly 1002 can include one or more mould Block, it is simple to process between assembly 1002 and other assemblies is mutual.Such as, process assembly 1002 and can include multi-media module, With facilitate multimedia groupware 1008 and process between assembly 1002 mutual.
Memorizer 1004 is configured to store various types of data to support the operation at device 1000.These data Example include on device 1000 operation any application program or the instruction of method, contact data, telephone book data, Message, picture, video etc..Memorizer 1004 can by any kind of volatibility or non-volatile memory device or they Combination realizes, such as static RAM (SRAM), Electrically Erasable Read Only Memory (EEPROM), erasable can Program read-only memory (EPROM), programmable read only memory (PROM), read only memory (ROM), magnetic memory, flash memory Reservoir, disk or CD.
The various assemblies that power supply module 1006 is device 1000 provide electric power.Power supply module 1006 can include power management System, one or more power supplys, and other generate, manage and distribute, with for device 1000, the assembly that electric power is associated.
The screen of one output interface of offer that multimedia groupware 1008 is included between described device 1000 and user.? In some embodiments, screen can include liquid crystal display (LCD) and touch panel (TP).If screen includes touch panel, Screen may be implemented as touch screen, to receive the input signal from user.Touch panel includes that one or more touch passes Sensor is with the gesture on sensing touch, slip and touch panel.Described touch sensor can not only sense touch or slide dynamic The border made, but also detect the persistent period relevant to described touch or slide and pressure.In certain embodiments, many Media component 1008 includes a front-facing camera and/or post-positioned pick-up head.When device 1000 is in operator scheme, such as shooting mould When formula or video mode, front-facing camera and/or post-positioned pick-up head can receive the multi-medium data of outside.Each preposition shooting Head and post-positioned pick-up head can be a fixing optical lens system or have focal length and optical zoom ability.
Audio-frequency assembly 1010 is configured to output and/or input audio signal.Such as, audio-frequency assembly 1010 includes a wheat Gram wind (MIC), when device 1000 is in operator scheme, during such as call model, logging mode and speech recognition mode, mike quilt It is configured to receive external audio signal.The audio signal received can be further stored at memorizer 1004 or via communication Assembly 1016 sends.In certain embodiments, audio-frequency assembly 1010 also includes a speaker, is used for exporting audio signal.
I/O interface 1012 provides interface, above-mentioned peripheral interface module for processing between assembly 1002 and peripheral interface module Can be keyboard, put striking wheel, button etc..These buttons may include but be not limited to: home button, volume button, start button and Locking press button.
Sensor cluster 1014 includes one or more sensor, for providing the state of various aspects to comment for device 1000 Estimate.Such as, what sensor cluster 1014 can detect device 1000 opens/closed mode, the relative localization of assembly, such as institute Stating display and keypad that assembly is device 1000, sensor cluster 1014 can also detect device 1000 or device 1,000 1 The position change of individual assembly, the presence or absence that user contacts with device 1000, device 1000 orientation or acceleration/deceleration and dress Put the variations in temperature of 1000.Sensor cluster 1014 can include proximity transducer, is configured to do not having any physics The existence of object near detection during contact.Sensor cluster 1014 can also include optical sensor, as CMOS or ccd image sense Device, for using in imaging applications.In certain embodiments, this sensor cluster 1014 can also include acceleration sensing Device, gyro sensor, Magnetic Sensor, pressure transducer or temperature sensor.
Communications component 1016 is configured to facilitate the communication of wired or wireless mode between device 1000 and other equipment.Dress Put 1000 and can access wireless network based on communication standard, such as WiFi, 2G or 3G, or combinations thereof.Exemplary at one In embodiment, broadcast singal or broadcast that communications component 1016 receives from external broadcasting management system via broadcast channel are relevant Information.In one exemplary embodiment, described communications component 1016 also includes near-field communication (NFC) module, to promote short distance Communication.Such as, can be based on RF identification (RFID) technology in NFC module, Infrared Data Association (IrDA) technology, ultra broadband (UWB) technology, bluetooth (BT) technology and other technologies realize.
In the exemplary embodiment, device 1000 can be by one or more application specific integrated circuits (ASIC), numeral Signal processor (DSP), digital signal processing appts (DSPD), PLD (PLD), field programmable gate array (FPGA), controller, microcontroller, microprocessor or other electronic building bricks realize, be used for performing said method.
In the exemplary embodiment, a kind of non-transitory computer-readable recording medium including instruction, example are additionally provided As included the memorizer 1004 of instruction, above-mentioned instruction can have been performed said method by the processor 1020 of device 1000.Example If, described non-transitory computer-readable recording medium can be ROM, random access memory (RAM), CD-ROM, tape, soft Dish and optical data storage devices etc..
A kind of non-transitory computer-readable recording medium, when the instruction in described storage medium is by the process of device 1000 When device performs so that device 1000 is able to carry out above-mentioned network flux statistical method, and described method includes:
When the first application program accesses network by the second application program, obtain described second application program and accessing net The all socket filec descriptors created during network;
Obtain the first user identification information that described first application program is corresponding;
Use all socket filec descriptors described in described first user identification information labelling;
According to all socket filec descriptors after labelling, determine that described first application program is in the process accessing network Used in flow.
In one embodiment, described method also includes:
The described flow determined is saved in the statistical information data file that operating system is supported;
When receiving first flow querying command, from described statistical information data file, obtain described flow.
In one embodiment, described method also includes:
Receive the querying command of the flow total amount that described first application program is used in preset time period;
According to described querying command, preserve in obtaining preset time period from described statistical information data file about institute State all flow informations of the first application program;
Described all flow informations are added up, to obtain described flow total amount.
In one embodiment, the first user identification information that described first application program of described acquisition is corresponding, bag Include:
Described first user identification information is obtained from the process that described first application program is corresponding.
In one embodiment, all socket files described in described use described first user identification information labelling Descriptor, including:
The second User Identity letter that the second application program is corresponding is obtained from described all socket filec descriptors Breath;
Described first user identification information is used to substitute the second user in described all socket filec descriptors Identification information.
Those skilled in the art, after considering description and putting into practice disclosure disclosed herein, will readily occur to its of the disclosure Its embodiment.The application is intended to any modification, purposes or the adaptations of the disclosure, these modification, purposes or Person's adaptations is followed the general principle of the disclosure and includes the undocumented common knowledge in the art of the disclosure Or conventional techniques means.Description and embodiments is considered only as exemplary, and the true scope of the disclosure and spirit are by following Claim is pointed out.
It should be appreciated that the disclosure is not limited to precision architecture described above and illustrated in the accompanying drawings, and And various modifications and changes can carried out without departing from the scope.The scope of the present disclosure is only limited by appended claim.

Claims (11)

1. a network flux statistical method, it is characterised in that including:
When the first application program accesses network by the second application program, obtain described second application program and accessing network During create all socket filec descriptors;
Obtain the first user identification information that described first application program is corresponding;
Use all socket filec descriptors described in described first user identification information labelling;
According to all socket filec descriptors after labelling, determine described first application program institute during accessing network The flow used.
Method the most according to claim 1, it is characterised in that described method also includes:
The described flow determined is saved in the statistical information data file that operating system is supported;
When receiving first flow querying command, from described statistical information data file, obtain described flow.
Method the most according to claim 2, it is characterised in that described method also includes:
Receive the querying command of the flow total amount that described first application program is used in preset time period;
According to described querying command, preserve in obtaining preset time period from described statistical information data file about described the All flow informations of one application program;
Described all flow informations are added up, obtains described flow total amount.
Method the most according to claim 1, it is characterised in that the first use that described first application program of described acquisition is corresponding Family identification information, including:
Described first user identification information is obtained from the process that described first application program is corresponding.
Method the most according to claim 1, it is characterised in that described use described first user identification information labelling Described all socket filec descriptors, including:
The second User Identity information that the second application program is corresponding is obtained from described all socket filec descriptors;
Described first user identification information is used to substitute the second user identity in described all socket filec descriptors Identification information.
6. a network flow statistic device, it is characterised in that including:
First acquisition module, for when the first application program accesses network by the second application program, obtaining described second should The all socket filec descriptors created during accessing network by program;
Second acquisition module, obtains the first user identification information that described first application program is corresponding;
Mark module, is used for using all socket filec descriptors described in described first user identification information labelling;
Determine module, for according to all socket filec descriptors after labelling, determine that described first application program is accessing The flow used during network.
Device the most according to claim 6, it is characterised in that described device also includes:
Memory module, for being saved in the described flow determined in the statistical information data file that operating system is supported;
3rd acquisition module, for when receiving first flow querying command, obtains from described statistical information data file Described flow.
Device the most according to claim 7, it is characterised in that described device also includes:
Receiver module, for receiving the inquiry life of the flow total amount that described first application program is used in preset time period Order;
4th acquisition module, for according to described querying command, obtains preset time period from described statistical information data file All flow informations about described first application program of interior preservation;
Statistical module, for adding up described all flow informations, to obtain described flow total amount.
Device the most according to claim 6, it is characterised in that described second acquisition module is used for:
Described first user identification information is obtained from the process that described first application program is corresponding.
Device the most according to claim 6, it is characterised in that described mark module includes:
Obtain submodule, for obtaining, from described all socket filec descriptors, the second user that the second application program is corresponding Identification information;
Substitute submodule, be used for using described first user identification information to substitute in described all socket filec descriptors The second User Identity information.
11. 1 kinds of network flow statistic devices, it is characterised in that including:
Processor;
For storing the memorizer of processor executable;
Wherein, described processor is configured to:
When the first application program accesses network by the second application program, obtain described second application program and accessing network During create all socket filec descriptors;
Obtain the first user identification information that described first application program is corresponding;
Use all socket filec descriptors described in described first user identification information labelling;
According to all socket filec descriptors after labelling, determine described first application program institute during accessing network The flow used.
CN201610622084.1A 2016-08-01 2016-08-01 Network flux statistical method and device Active CN106230662B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610622084.1A CN106230662B (en) 2016-08-01 2016-08-01 Network flux statistical method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610622084.1A CN106230662B (en) 2016-08-01 2016-08-01 Network flux statistical method and device

Publications (2)

Publication Number Publication Date
CN106230662A true CN106230662A (en) 2016-12-14
CN106230662B CN106230662B (en) 2019-04-23

Family

ID=57535840

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610622084.1A Active CN106230662B (en) 2016-08-01 2016-08-01 Network flux statistical method and device

Country Status (1)

Country Link
CN (1) CN106230662B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106603345A (en) * 2017-02-04 2017-04-26 广东欧珀移动通信有限公司 Method and device for monitoring application program usage flow and terminal
CN107743080A (en) * 2017-09-30 2018-02-27 广东欧珀移动通信有限公司 Flow statistical method and device, computer equipment, computer-readable recording medium
CN110096363A (en) * 2019-04-29 2019-08-06 亚信科技(成都)有限公司 A kind of correlating method and device of network event and process
CN112260889A (en) * 2020-09-28 2021-01-22 中孚安全技术有限公司 Linux-based process flow monitoring method, system and equipment
CN112732356A (en) * 2021-01-11 2021-04-30 江西中瑞防雷技术有限公司 Data monitoring management system of intelligent platform system
CN113268518A (en) * 2020-02-17 2021-08-17 百度在线网络技术(北京)有限公司 Flow statistical method and device and distributed flow statistical system

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101873640A (en) * 2010-05-27 2010-10-27 华为终端有限公司 Flow processing method, device and mobile terminal
CN102223307A (en) * 2011-06-29 2011-10-19 中兴通讯股份有限公司 Method for processing socket, method for grouped data transmission and device
CN102711139A (en) * 2012-04-24 2012-10-03 华为终端有限公司 Data flow counting method and terminal
US8291068B2 (en) * 2009-01-14 2012-10-16 Hewlett-Packard Development Company, L.P. Automatic protocol detection
CN104661322A (en) * 2013-11-20 2015-05-27 中兴通讯股份有限公司 Application internet access processing method and device as well as terminal
CN105491081A (en) * 2014-09-16 2016-04-13 网宿科技股份有限公司 Method for forwarding of internal flow of application in mobile intelligent terminal

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8291068B2 (en) * 2009-01-14 2012-10-16 Hewlett-Packard Development Company, L.P. Automatic protocol detection
CN101873640A (en) * 2010-05-27 2010-10-27 华为终端有限公司 Flow processing method, device and mobile terminal
CN102223307A (en) * 2011-06-29 2011-10-19 中兴通讯股份有限公司 Method for processing socket, method for grouped data transmission and device
CN102711139A (en) * 2012-04-24 2012-10-03 华为终端有限公司 Data flow counting method and terminal
CN104661322A (en) * 2013-11-20 2015-05-27 中兴通讯股份有限公司 Application internet access processing method and device as well as terminal
CN105491081A (en) * 2014-09-16 2016-04-13 网宿科技股份有限公司 Method for forwarding of internal flow of application in mobile intelligent terminal

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106603345A (en) * 2017-02-04 2017-04-26 广东欧珀移动通信有限公司 Method and device for monitoring application program usage flow and terminal
CN106603345B (en) * 2017-02-04 2019-07-09 Oppo广东移动通信有限公司 Monitor method, apparatus and terminal that application program uses flow
CN107743080A (en) * 2017-09-30 2018-02-27 广东欧珀移动通信有限公司 Flow statistical method and device, computer equipment, computer-readable recording medium
CN107743080B (en) * 2017-09-30 2019-10-25 Oppo广东移动通信有限公司 Flow statistical method and device, computer equipment, computer readable storage medium
CN110096363A (en) * 2019-04-29 2019-08-06 亚信科技(成都)有限公司 A kind of correlating method and device of network event and process
CN113268518A (en) * 2020-02-17 2021-08-17 百度在线网络技术(北京)有限公司 Flow statistical method and device and distributed flow statistical system
CN113268518B (en) * 2020-02-17 2024-03-29 百度在线网络技术(北京)有限公司 Flow statistics method and device and distributed flow statistics system
CN112260889A (en) * 2020-09-28 2021-01-22 中孚安全技术有限公司 Linux-based process flow monitoring method, system and equipment
CN112732356A (en) * 2021-01-11 2021-04-30 江西中瑞防雷技术有限公司 Data monitoring management system of intelligent platform system

Also Published As

Publication number Publication date
CN106230662B (en) 2019-04-23

Similar Documents

Publication Publication Date Title
CN106230662A (en) Network flux statistical method and device
CN105653323A (en) Application program management method and device
CN106528709A (en) Social information recommendation method and apparatus
CN105652672A (en) Method and apparatus for controlling intelligent device
CN106254646A (en) Network flux statistical method and device
CN104077208A (en) Application program icon display method and apparatus
CN105512545B (en) Access rights management method and device
CN106331761A (en) Live broadcast list display method and apparatuses
CN104766005A (en) Management method and device for application software access authority
CN106446185A (en) Product recommendation method and device and server
CN106126018A (en) Desktop icons sort method and device
CN105654533A (en) Picture editing method and picture editing device
CN104980662A (en) Method for adjusting imaging style in shooting process, device thereof and imaging device
CN104811776A (en) Multimedia playing method and device
CN105635795A (en) Collection method and apparatus of television user behavior information
CN105511739A (en) Message prompting method and device
CN105261209B (en) The volume of the flow of passengers determines method and device
CN105487758A (en) Method and device for popup control of application software, and terminal equipment
CN108476379A (en) Information recording method and information record carrier
CN104640062A (en) Method and device for transmitting information
CN106383899A (en) Service recommendation method and apparatus, and terminal
CN105657658A (en) Gathering event processing method and apparatuses
CN106528385A (en) System fluency monitoring method and apparatus, and terminal
CN105704322A (en) Weather information obtaining method and apparatus
CN104850592A (en) Method and device for generating model file

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
GR01 Patent grant
GR01 Patent grant