CN108259207A - Flow statistical method, client, server and system - Google Patents

Flow statistical method, client, server and system Download PDF

Info

Publication number
CN108259207A
CN108259207A CN201611250170.0A CN201611250170A CN108259207A CN 108259207 A CN108259207 A CN 108259207A CN 201611250170 A CN201611250170 A CN 201611250170A CN 108259207 A CN108259207 A CN 108259207A
Authority
CN
China
Prior art keywords
data
client
flows
time interval
network identity
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
CN201611250170.0A
Other languages
Chinese (zh)
Other versions
CN108259207B (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 Gridsum Technology Co Ltd
Original Assignee
Beijing Gridsum Technology 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 Gridsum Technology Co Ltd filed Critical Beijing Gridsum Technology Co Ltd
Priority to CN201611250170.0A priority Critical patent/CN108259207B/en
Publication of CN108259207A publication Critical patent/CN108259207A/en
Application granted granted Critical
Publication of CN108259207B publication Critical patent/CN108259207B/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
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0896Bandwidth or capacity management, i.e. automatically increasing or decreasing capacities
    • 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
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/146Markers for unambiguous identification of a particular session, e.g. session cookie or URL-encoding

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The present invention provides a kind of flow statistical methods,Client,Server and system,By the client of consumed flow according to first time interval,It obtains it and consumed data on flows is run in each first time interval,And the corresponding network identity of data on flows in the first time interval,Later,Client is by each data on flows of acquisition,The information associations such as the application identities of network identity and client are sent to server,So as to which client be made to learn the data on flows of each flow provider that its own operation is consumed,And server can be made accurately to learn the flow that the operation of its client uses Liao Jijia flows provider to provide,And the information such as total flow of each flow provider offer of consumption,Facilitate cooperative control of the server between its client-side management and provider server and flow provider.

Description

Flow statistical method, client, server and system
Technical field
The present invention relates to field of communication technology, more particularly to a kind of flow statistical method, client, server And system.
Background technology
With the development of the communication technology, by web browsing webpage, video is watched, listen to music and carries out network social intercourse User it is more and more, in order to ensure user can with quick obtaining to the network information, improve user network experience, often pass through CDN (Content Delivery Network, content distributing network) system solves network congestion situation, improves user and accesses The response speed of website.
However, sharply increasing with the number networks and user volume, website bandwidth traffic becomes the problem of very important, Almost all of internet site all starts the CDN and large-scale distributed deployment in face of large capacity.For video class website For electric business class website, this pressure is especially apparent, so, it is more urgent to the regulatory requirement of CDN flows.
At present, CDN service quotient would generally be used by CDN charge on traffic modes, by counting application service in a period of time The total flow of CDN service quotient that quotient consumes altogether carries out charging to application service provider.As it can be seen that existing this traffic statistics side Application service provider can not learn its own data on flows that each CDN service quotient is used to provide in formula, be unfavorable for application service provider certainly Barrel is managed.
Invention content
In view of the above problems, it is proposed that the present invention provides one kind and overcomes the above problem or solve above-mentioned ask at least partly Flow statistical method, client, server and the system of topic.
A kind of flow statistical method, applied to client, the method includes:
According to first time interval, obtain the client and run what is consumed in each described first time interval The corresponding network identity of the data on flows in data on flows and the first time interval;
The application identities association of the data on flows of acquisition, the network identity and the client is sent to clothes Business device, so that the server determines that the heterogeneous networks consumed in the client operational process identify corresponding total flow number According to.
Preferably, the method further includes:
The data on flows obtained in each described first time interval and network identity are associated storage;
Every the second time interval, each data on flows and each network identity of associated storage are counted, determined The corresponding total flow data of each network identity in second time interval, and when second time interval is not less than first Between be spaced;
The application identities by the data on flows of acquisition, the network identity and the client, which are associated with, to be sent To server, specially:
By the determining total flow data and its application identities of corresponding network identity and the client association It is sent to server.
Preferably, the method further includes:
It will send in each data on flows of the second time interval memory storage and the deletion of each network identity.
Preferably, the method further includes:
The uniform resource locator URL parameter of server transmission is received and parsed through, the client operation is obtained and is consumed Heterogeneous networks identify corresponding total flow data;
Wherein, the URL parameter is used to indicate the client and runs the consumed corresponding flow of heterogeneous networks mark Data.
Preferably, the acquisition client runs consumed flow number in each described first time interval According to, including:
Obtain the data speed of download when client is run in each described first time interval;
Based on the data speed of download and the first time interval, the client is obtained in the first time The consumed data on flows of operation in interval.
A kind of flow statistical method, applied to server, the method includes:
The flow information that client is sent is received, the flow information includes the application identities of the client, the visitor Family end runs the flow in consumed data on flows and the first time interval in each first time interval The corresponding network identity of data;
Under the application identities for calculating the client, the corresponding data on flows summation of each described network identity obtains The corresponding total flow data of the network identity.
Preferably, the method further includes:
It calculates the corresponding all clients of each network identity and runs consumed data on flows summation.
Preferably, the flow information further includes the user identifier for logging in the client, then the method further includes:
It obtains the corresponding different clients of each user identifier and consumed total flow number is run under each network identity According to;
The sum of corresponding each total flow data of same user identifier are calculated, it is corresponding to obtain each described user identifier User traffic data.
Preferably, the method further includes:
The flow inquiry request that the client is sent is received, the flow inquiry request at least carries the client Application identities;
Obtain currently stored data on flows corresponding with the application identities of the client, and by the data on flows of acquisition It is sent to the client.
A kind of client, the client include:
Data obtaining module, for according to first time interval, obtaining the client in each described first time The corresponding network identity of the data on flows in interval in operation consumed data on flows and the first time interval;
Data transmission module, for answering the data on flows obtained, the network identity and the client Server is sent to mark association, so that the server determines the heterogeneous networks mark consumed in the client operational process Know corresponding total flow data.
Preferably, the client further includes:
Data memory module, for the data on flows and network identity that will be obtained in each described first time interval It is associated storage;
Data statistics module, for every the second time interval, each data on flows and each network to associated storage Mark is counted, and determines the corresponding total flow data of each network identity in second time interval, and it is described second when Between interval not less than first time interval;
The data transmission module be specifically used for the total flow data determined and its corresponding network identity and The application identities association of the client is sent to server.
Preferably, the client further includes:
Data resolution module for receiving and parsing through the uniform resource locator URL parameter of server transmission, obtains described Client runs consumed heterogeneous networks and identifies corresponding total flow data;
Wherein, the URL parameter is used to indicate the client and runs the consumed corresponding total stream of heterogeneous networks mark Measure data.
A kind of server, the server include:
Data transmission module, for receiving the flow information of client transmission, the flow information includes the client Application identities, the client run in each first time interval consumed data on flows and this first when Between interval in the corresponding network identity of the data on flows;
First data computation module, for calculating under the application identities of the client, each described network identity pair The data on flows summation answered obtains the corresponding total flow data of the network identity.
Preferably, the server further includes:
Second data computation module runs consumed stream for calculating the corresponding all clients of each network identity Measure data summation.
Preferably, the server further includes:
Data acquisition module runs for obtaining the corresponding different clients of each user identifier under each network identity The total flow data consumed;
Third data computation module for calculating the sum of corresponding each total flow data of same user identifier, obtains institute State the corresponding user traffic data of user identifier.
A kind of flow statistical system, the system comprises:
At least one client as described above and server as described above.
By above-mentioned technical proposal, the present invention provides a kind of flow statistical method, client, server and system, by The client of consumed flow obtains it and consumed flow is run in each first time interval according to first time interval The corresponding network identity of data on flows in data and the first time interval, later, client is by each flow number of acquisition Server is sent to according to information associations such as the application identities of, network identity and client, so as to which client be made to learn its own The data on flows of each flow provider consumed is run, and server can be made accurately to learn that its client is run The letters such as the flow that used Liao Jijia flows provider provides and the total flow that each flow provider of consumption provides Breath, facilitates cooperative control of the server between its client-side management and provider server and flow provider.
Above description is only the general introduction of technical solution of the present invention, in order to better understand the technological means of the present invention, And it can be implemented in accordance with the contents of the specification, and in order to allow above and other objects of the present invention, feature and advantage can It is clearer and more comprehensible, below the special specific embodiment for lifting the present invention.
Description of the drawings
By reading the detailed description of hereafter preferred embodiment, it is various other the advantages of and benefit it is common for this field Technical staff will become clear.Attached drawing is only used for showing the purpose of preferred embodiment, and is not considered as to the present invention Limitation.And throughout the drawings, the same reference numbers will be used to refer to the same parts.In the accompanying drawings:
Fig. 1 shows a kind of flow chart of flow statistical method embodiment provided by the invention;
Fig. 2 shows the flow charts of another flow statistical method embodiment provided by the invention;
Fig. 3 shows the flow chart of another flow statistical method embodiment provided by the invention;
Fig. 4 shows the flow chart of another flow statistical method embodiment provided by the invention;
Fig. 5 shows a kind of structure diagram of client embodiment provided by the invention;
Fig. 6 shows the structure diagram of another client embodiment provided by the invention;
Fig. 7 shows a kind of hardware architecture diagram of client provided by the invention;
Fig. 8 shows a kind of structure diagram of server provided by the invention;
Fig. 9 shows the structure diagram of another server provided by the invention;
Figure 10 shows a kind of hardware architecture diagram of server provided by the invention;
Figure 11 shows a kind of structure diagram of flow statistical system provided by the invention.
Specific embodiment
The exemplary embodiment of the disclosure is more fully described below with reference to accompanying drawings.Although the disclosure is shown in attached drawing Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure without should be by embodiments set forth here It is limited.On the contrary, these embodiments are provided to facilitate a more thoroughly understanding of the present invention, and can be by the scope of the present disclosure Completely it is communicated to those skilled in the art.
As shown in Figure 1, for a kind of flow chart of flow statistical method embodiment provided by the invention, this method can be applied In client, such as mobile phone, laptop, tablet computer and desktop computer electronic equipment are from using center or official website The stand-alone utility downloaded and installed or the webpage version application based on browser, the application is to the tool of the client Body form and type are not construed as limiting, and can be videoconference client, audio client etc., in practical applications, the present embodiment carries The method of confession can include:
Step S11 according to first time interval, obtains client and runs what is consumed in each first time interval The corresponding network identity of data on flows in data on flows and the first time interval;
In the present embodiment, consumed flow, and root will be run to acquire its own by the data collector of client It is exported according to actual needs, so that the user of client can learn that it runs the flow number that client is consumed in time and accurately According to and what is all consumed is the information such as the data on flows which flow provider provides.
Wherein, each flow, which provides commercial city, unique corresponding network identity, for CDN service quotient, network Mark can be CDN titles or other CDN marks, and however, it is not limited to this.
It should be noted that above-mentioned first time interval is usually smaller, such as 1 second or even smaller, so as to ensure client It is a network identity rather than multiple network identities that the data on flows consumed in first time interval is corresponding, so as to The follow-up statistics for carrying out data on flows.
In practical applications, by taking videoconference client as an example, when user opens a Video Applications by the videoconference client (since user triggers the Video Applications) terminates up to its broadcasting, which can be acquired by embedded data Device acquires the videoconference client and runs consumed data on flows, and record the first time interval every first time interval The corresponding network identity of interior data on flows, that is to say, that the video that videoconference client is played is in the first time interval Which flow provider interior consumed flow is.
Optionally, in this application, client can be downloaded by obtaining its data run in first time interval (it can be the average download in the actual download speed or first time interval of data flow used in client to speed Speed or other, the application is not construed as limiting the concrete meaning of the data speed of download), and by the data speed of download and this One time interval carries out product calculation, and consumed data on flows is run in first time interval so as to obtain client.By This is as it can be seen that the application can be based on the data speed of download and the first time interval in each first time interval, really Determine client and consumed data on flows is run in the first time interval.
Certainly, in the case of client can not obtain its actual download speed during running, client can be obtained The network speed of place equipment substitutes above-mentioned data speed of download, is run in first time interval client is calculated Data on flows.
It should be noted that the application obtains client the specific of its data on flows run in first time interval Mode does not limit, it is not limited to two ways listed above.
The application identities association of the data on flows of acquisition, network identity and client is sent to service by step S12 Device, so that server determines that the heterogeneous networks consumed in client operational process identify corresponding total flow data.
In the present embodiment, client obtains it and consumed data on flows and its correspondence is run in first time interval Network identity after, storage can be associated to it, it is as shown in table 1 below, but be not limited to a kind of this storage mode.
Number Network identity Data on flows (unit:Byte k)
1 CDN1 10k
2 CDN1 8k
3 CDN2 20k
4 CDN3 15k
5 CDN2 15k
6 CDN1 5k
Table 1
It, can be with when user needs to check data on flows of its current operation client terminal playing video and/or audio consumption By triggering corresponding inquiry button, corresponding data on flows and its corresponding network identity are exported so as to trigger the client (or title of the corresponding traffic service quotient of the network identity etc.), so that user can understand the stream of its client consumption in real time Amount.
Optionally, it is more than pre-set threshold value in order to avoid client spends flow, client being consumed according to acquisition Data on flows, directly disconnect connect with server, that is, stop consumed flow;It can also disappeared according to preset prompting threshold value When the data on flows of consumption reaches corresponding prompting threshold value, prompting message is pushed to user, such as directly exporting corresponding flow is more than Pre-set threshold value reminds information for closing network etc., and the application is not especially limited this, can set according to actual needs, The application is no longer described in detail one by one herein.
In addition, in the present embodiment, in order to which server is made to learn the flow Expenditure Levels of each client operation, client can The association of the application identities of the data on flows of acquisition, application identities and client is sent to server, so that server is accurate Really learn the stream that client operation uses that several traffic service quotient and client to be consumed in each traffic service quotient Measure the information such as data.Wherein, the procedural mode that these information are obtained about server is referred to hereafter retouch from server side The flow statistical method embodiment stated, the present embodiment are not described in detail here.
To sum up, the present embodiment by the data on flows that is consumed during acquiring its operation by client and is consumed The corresponding network identity of data on flows facilitates user to adjust the connection of the client and server and right in time accordingly The consumption for the flow that each traffic service quotient provides, it is very useful;Moreover, client can also be by its collected data on flows And application identities are sent to server, so as to enable the server to learn what its client provided each traffic service quotient Flow consumption to verify its campus network, is overcome in the prior art by the client of traffic service quotient's statistical server It holds to the consumption of flow and collects correlative charges, the application service provider of client is not known about caused by actual flow consumption Various drawbacks.
With reference to Fig. 2, for another flow statistical method embodiment that the application provides, the embodiment and above-described embodiment class Seemingly, client can be applied to, and the present embodiment is mainly the place obtained to client after data on flows and network identity Reason process is described in detail, and process is as follows:
Step S21 obtains data speed of download when client is run in each first time interval;
Such as the description of above-described embodiment, which can be in client operational process under the reality of data flow Speed is carried, certainly, if client can not obtain network used in the actual download speed of its data flow used or client Network speed etc., the application is not construed as limiting its content, it is generally the case that the actual download speed and network speed of data flow Approximately equal.
Optional, in practical applications, if having recorded multiple data speeds of download in first time interval, the application can To calculate the average speed of download of this multiple data speed of download, using the speed of download that is averaged as objective in the first time interval Data speed of download when family end is run, for carrying out product calculation with the first time interval, between the determining first time Every interior data on flows.
Step S22 carries out product calculation to the data speed of download of acquisition and first time interval, obtains client the The consumed data on flows of operation in one time interval;
The data on flows obtained in each first time interval and network identity are associated storage by step S23;
It in practical applications, may be by more flows for the application data (such as video, audio) of client operation Service provider provide service, and the client run one application data procedures in, may between each traffic service quotient into Row switching.So in order to determine collected data on flows it is corresponding be which traffic service quotient, the flow can be obtained simultaneously The corresponding network identity of data, for distinguishing each traffic service quotient.It should be noted that the time due to first time interval is non- It is often short, it is believed that client was consumed in first time interval is the flow that same traffic service quotient provides.
Optionally, the data information of each time interval obtained for client, can be according to the lattice of such as above-mentioned table 1 Formula is stored, but is not limited to a kind of this storage mode.As shown in table 1, data on flows can be acquired according to client Sequence stored, client terminal playing video, audio etc. application data during, it will between CDN1~CDN3 into Row switching.
Step S24 every the second time interval, unites to each data on flows and each network identity of associated storage Meter determines the corresponding total flow data of each network identity in second time interval;
In practical applications, in order to save bandwidth and Internet resources, client obtains operation in a time interval and is disappeared After the data on flows of consumption, server can not be sent directly to, but associated storage is got up in the manner described above, works as acquisition time After reaching the second time interval, by each data on flows of the second time interval storage and corresponding network identity, client The information such as application identities, which are retransmited to server, to be counted.
Certainly, client can also unite to each data on flows of the second time interval memory storage according to network identity Meter, so as to obtain the corresponding total flow data of each network identity.As shown in Table 1, the corresponding total flow data of CDN1 are The corresponding total flow data of 10k+8k+5k=23k, CDN2 are 20k+15k=35k, and the corresponding total flow data of CDN3 are 15k.
Wherein, if client will export in multiple application data procedures collected data on flows when uniformly being stored, Corresponding application identities can also be added in the table of storage, if the video identifier of different video (can be video name Deng), the audio identification (can be audio title etc.) of different audio, can in this way, when client carries out the statistics of data on flows With according to actual needs, count in the manner described above the corresponding total flow data of each network identity under each application identities or Person is, the corresponding different application of each network identity identifies corresponding total flow data etc., specific implementation process and above-mentioned statistics side Formula is similar, and this will not be detailed here for the present embodiment.
It should be noted that above-mentioned second time interval is not less than first time interval, in order to save bandwidth and network money Source, the second time interval can be many times of first time interval under normal conditions, even hundred times, such as first time interval It can be 1 second even shorter, the second time interval can be 5 minutes etc., and the application is to first time interval and the second time The concrete numerical value at interval is not construed as limiting.
According to actual needs, above-mentioned second time interval can be preset fixed numbers or according to preset The data information quantity of transmission determines, such as the data information of setting storage and its corresponding network identity information reach 400 groups Afterwards, it is counted and is sent to server etc., the application is not construed as limiting this.
Step S25, determining total flow data and its application identities of corresponding network identity and client are associated with It is sent to server;
Wherein, the application identities of client can correspond to different clients, for distinguishing the application of different clients Mark;The either currently running application identities using data of client such as play video name, the audio title of video Deng.
It, can be by the traffic statistics of client as a result, i.e. CDN1=23k&CDN2=35k&CDN3 still by taking above-mentioned table 1 as an example =15k is sent to server according to preset data format.Optionally, which can send address date form, such as www.abc.comPid=12345&CDN1=23k&CDN2=35k&CDN3=15k.
Wherein, pid fields are primary using the unique of data (such as video data or audio data) in above-mentioned data format Label, summarizing for all data is exported for doing this, and a pid can all be generated by starting output using data every time.
Step S26 will have been sent in each data on flows of the second time interval memory storage and the deletion of each network identity.
In the present embodiment, the data on flows of server is counted and had been sent to for client, it can be empty from storage Interior deletion is such as deleted from above-mentioned table 1,, only can be right when being also convenient for subsequently counting data on flows again so as to save memory space New data on flows is counted, and improves accuracy and reliability that statistics solves.
As another embodiment of the application, unlike the embodiment of above-mentioned client statistics data on flows, the application The corresponding total flow data of each network identity that the client is consumed can also be counted in the manner described above by server, then will Statistical result feeds back to corresponding client output, so that the user of the client understands its used data on flows.
So on the basis of the corresponding embodiments of above-mentioned Fig. 1, after step s 12, flow statistical method can also wrap It includes:URL (Uniform Resoure Locator, uniform resource locator) parameter of server transmission is received and parsed through, is obtained Client runs consumed heterogeneous networks and identifies corresponding total flow data.
In practical applications, when user is by user end to server transmitted traffic inquiry request, server can incite somebody to action The client corresponds to the total flow data of each network identity of consumption, and it is defeated that the client is fed back in a manner of sending URL addresses Go out, however, it is not limited to this.It can be seen that above-mentioned URL parameter, which can be used to refer to client, runs consumed heterogeneous networks Identify corresponding total flow data.
In conclusion the application acquires it by client oneself runs the corresponding flow number of each network identity consumed According to user being facilitated to understand the client to flow consumption, and pass through the data on flows for obtaining client and its corresponding Network identity is sent to server, and so as to which server be made also can accurately to learn, the flow that each client identifies heterogeneous networks disappears Consumption situation facilitates the management to client and its flow consumption.
As shown in figure 3, for the flow chart of another flow statistical method embodiment that the application provides, the present embodiment with it is upper It states unlike embodiment, flow statistical method provided in this embodiment can be applied to server, i.e., with data processing energy The service equipment of power, this method can specifically include:
Step S31, receives the flow information that client is sent, which includes the application identities of client, client Hold the data on flows pair run in each first time interval in consumed data on flows and the first time interval The network identity answered;
With reference to the above-mentioned flow statistical method embodiment described from client angle, the client of description is to data on flows And its acquisition and the storage content of corresponding network identity, details are not described herein for the present embodiment.
In the present embodiment, client obtains data on flows and its corresponding network identity, Huo Zhetong in the manner described above It, can be by obtained data on flows and network identity, application identities after meter obtains the corresponding total flow data of each network identity Etc. information active upload to server;Certainly, server can also be obtained according to preset rules to the client transmitted traffic data Request is taken, so that client responds the data acquisition request in the manner described above, so as to which the data of server request be sent to Server.As it can be seen that the sending method that the application receives server the flow information of client transmission (is actively sent or passive Send) it is not construed as limiting.
Step S32, under the application identities for calculating client, the corresponding data on flows summation of each network identity obtains The corresponding total flow data of the network identity.
Wherein, the mode about the corresponding total flow data of each network identity of server statistics is referred to above-mentioned client The mode of the corresponding data on flows of each network identity is counted, details are not described herein for the present embodiment.
Optionally, in practical applications, server can receive the flow information of multiple client transmission, therefore, clothes Business device can also calculate the corresponding all clients of each network identity and run consumed data on flows summation.
As needed, it if the flow information that above-mentioned client is sent further includes the user identifier for logging in the client, such as steps on Account etc. is recorded, server can also calculate the data on flows that each user consumes each traffic service quotient offer, with reference to Fig. 4 Shown flow chart, the alternative embodiment can include:
Step S41, receives the flow information that client is sent, which includes application identities and the user of client Mark, client are run in each first time interval in consumed data on flows and the first time interval The corresponding network identity of data on flows;
Step S42 obtains the corresponding different clients of each user identifier and runs what is consumed under each network identity Total flow data;
Step S43 calculates the sum of corresponding each total flow data of same user identifier, obtains each user identifier pair The user traffic data answered.
In the present embodiment, the flow information sent for each client of acquisition, server can be first with user identifier For standard, the flow information under screening different user mark is corresponding later, is believed the corresponding flow of each user identifier Breath, classifies according still further to application identities, determines that different application identifies corresponding data on flows and network identity, later, also It can determine in the corresponding data on flows of each application identities, heterogeneous networks identify corresponding total flow data.
By taking the video of client output as an example, since in entire video display process, client may be repeatedly to clothes Business device transmitted traffic data, three datas as follows, but it is not limited to data format described below.
www.abc.comPid=12345&CDN1=23k&CDN2=35k&CDN3=15k;
www.abc.comPid=12345&CDN1=37k&CDN2=40k&CDN3=30k;
www.abc.comPid=12345&CDN1=40k&CDN2=15k&CDN3=35k.
Based on this, server can calculate each network identity that the same video 12345 of client terminal playing consumes altogether and correspond to Total flow data, i.e. CDN1=100, CDN2=90k, CDN3=80k.
By above-mentioned classified calculating, server can obtain the required data on flows for meeting various conditions, so that it is determined that The all clients of the server data on flows to each traffic service quotient's actual consumption and each whithin a period of time Data on flows of each traffic service quotient that a user is consumed within this period of time by client etc..
Moreover, because the data on flows of the application client consumption is the acquisition completed in client, it can be more accurate anti- The total flow data of user's consumption are reflected, improve the accuracy of traffic statistics result.
As shown in figure 5, for the structure diagram of a kind of client embodiment that the application provides, the present embodiment is mainly from client The function composition structure at end is described, specifically, the client can include:
Data obtaining module 51, for according to first time interval, obtaining client between each described first time The corresponding network identity of data on flows in interior operation consumed data on flows and the first time interval;
Wherein, for the CDN service quotient of offer CDN flows, above-mentioned network identity can be the title or other CDN of CDN Mark, the application are not construed as limiting this.
Optionally, which can include:
Speed of download acquiring unit, for obtaining when the client is run in each described first time interval Data speed of download;
Wherein, data speed of download can be the actual download speed of the data flow of client or network used Network speed, the application is not construed as limiting this.
Data on flows computing unit, for being based on data speed of download and first time interval, obtain client this The consumed data on flows of operation in one time interval.
Certainly, with reference to the description of above method embodiment corresponding part, data obtaining module 51 can also use its other party Formula obtains client and consumed data on flows is run in the first time interval, and the application is no longer described in detail one by one herein.
Data transmission module 52, for the application identities of the data on flows, network identity and the client that obtain to be associated with Server is sent to, so that server determines that the heterogeneous networks consumed in client operational process identify corresponding total flow number According to.
Optionally, with reference to structure diagram shown in fig. 6, which can also include:
Data memory module 53, for the data on flows and network mark that will be obtained in each described first time interval Knowledge is associated storage;
Wherein, the data on flows and network identity acquired can be stored, but do not limit to such as the form of upper table 1 In this.
Data statistics module 54, for every the second time interval, each data on flows and each net to associated storage Network mark is counted, and determines the corresponding total flow data of each network identity in second time interval;
The process of the corresponding total flow data of each network identity is counted about data statistics module 54, is referred to The description of embodiment of the method corresponding part is stated, details are not described herein for the present embodiment.
It should be noted that above-mentioned second time interval is not less than first time interval, but not limiting time interval Concrete numerical value.
Above-mentioned data transmission module 52 specifically can be used for determining total flow data and its corresponding network identity, with And the application identities association of client is sent to server.
In this embodiment, when data transmission module 52 is by letters such as the datas on flows in the second time interval and its network identity After breath is sent to server, the information such as the data on flows sent and its network identity can be deleted with trigger data memory module It removes, directly to count new data on flows from now on.
As another embodiment of the application, unlike above-mentioned alternative embodiment, client structure shown in Fig. 5 Under, it can also include:
Data resolution module for receiving and parsing through the URL parameter of server transmission, obtains the client operation and is disappeared The heterogeneous networks of consumption identify corresponding total flow data.
Wherein, URL parameter can serve to indicate that the client runs consumed heterogeneous networks and identifies corresponding total stream Measure data.
To sum up, the application runs consumed data on flows by client provided in this embodiment acquisition, improves flow The accuracy of data, and obtain data on flows and its corresponding network identity by acquired, it may also be necessary to it is marked including application The information such as knowledge and/or user identifier are sent to server, so as to facilitate server according to the flow information received, accurate statistics Go out the total flow data that each traffic server used in a period of time provides, and also be able to statistics client output same application Data have used how many traffic service quotient and each traffic service quotient consume how many flow, furthermore it is also possible to count Each user has used total flow data of each traffic service quotient etc., significantly solves and is united in the prior art by traffic service quotient The data on flows of the client consumption of each server is counted, causes server and client that can not all learn its flow Expenditure Levels The technical issues of.
With reference to Fig. 7, the embodiment of the present application additionally provides a kind of hardware architecture diagram of client, can include:Data Collector 71, processor 72, memory 73, communication interface 74 and communication bus 75 etc..Wherein, data collector 71, processing Device 72, memory 73 and communication interface 74 can be connected by communication bus 75.
Data collector 71 can be used for the data on flows of data flow consumption for acquiring communication interface output or receiving.
Memory 73 can store the journey of above-mentioned each function module from the client embodiment described from function structure Sequence is read corresponding program from the memory 73 by processor 72 and is performed, so as to fulfill traffic statistic function.
In the present embodiment, memory 73 can include the volatile memory in computer-readable medium, deposit at random The forms such as access to memory (RAM) and/or Nonvolatile memory, such as read-only memory (ROM) or flash memory (flash RAM), storage Device includes at least one storage chip.
Processor 72 can be central processor CPU etc., can include kernel, be gone in memory 73 to transfer phase by kernel The program answered.Wherein, kernel can set one or more, and flow of the client to consumption is realized by adjusting kernel parameter Statistics, specific implementation process is referred to the description of above method embodiment corresponding part, and details are not described herein for the present embodiment.
Present invention also provides a kind of computer program product, applications client is consumed when needing statistics client operation Data on flows when, the program code of following method and step can be performed:
According to first time interval, obtain the client and run what is consumed in each described first time interval The corresponding network identity of data on flows in data on flows and the first time interval;
The application identities association of the data on flows of acquisition, the network identity and the client is sent to clothes Business device, so that the server determines that the heterogeneous networks consumed in the client operational process identify corresponding total flow number According to.
As shown in figure 8, for a kind of structure diagram of server provided by the embodiments of the present application, the present embodiment is from function module Angle describes the structure of the server, can include in the server:
Data transmission module 81, for receiving the flow information of client transmission, which can include the visitor The application identities at family end, the client run in each first time interval consumed data on flows and this The corresponding network identity of data on flows in one time interval;
With reference to the description of above method embodiment corresponding part, according to actual count needs, which can also wrap Include the information such as the user identifier for logging in client.
First data computation module 82, for calculating under the application identities of the client, each network identity corresponds to Data on flows summation, obtain the corresponding total flow data of the network identity.
Optionally, as shown in figure 9, the server can also include:
Second data computation module 83 runs what is consumed for calculating the corresponding all clients of each network identity Data on flows summation.
Optionally, with reference to Fig. 9, server can also include:
Data acquisition module 84 is transported for obtaining the corresponding different clients of each user identifier under each network identity The consumed total flow data of row;
Third data computation module 85 for calculating the sum of corresponding each total flow data of same user identifier, obtains The corresponding user traffic data of the user identifier.
As another embodiment of the application, on the basis of above-described embodiment, server can also include:
Request receiving module, for receiving the flow inquiry request that the client is sent, the flow inquiry request is extremely The application identities of the client are carried less;
Data on flows enquiry module, for obtaining currently stored flow number corresponding with the application identities of the client According to, and the data on flows of acquisition is sent to the client.
To sum up, collected data on flows and its relevant information are sent to server by client, and server can be accordingly Accurate statistics go out the total flow data that each traffic server used in a period of time provides, and also are able to statistics client as needed End output same application data have used how many traffic service quotient and each traffic service quotient consume how many flow; Moreover, server can also count the total flow data that each user has used each traffic service quotient, it is very convenient and practical.
With reference to Figure 10, the present invention also provides a kind of hardware architecture diagram of server, which can include:Place Manage device 101, memory 102, communication interface 103 and communication bus 104, the above-mentioned server example described from function structure In each function module can be used as program unit storage in the memory 102, by processor 101 execution be stored in the memory Each program unit in 102, so as to fulfill corresponding function.
Wherein, above-mentioned processor 101 can include kernel, be gone in memory 102 to transfer corresponding program unit by kernel. Kernel can set one or more, meet the traffic statistics of different requirements by adjusting kernel parameter to realize, specific implementation Process is referred to the description of above method embodiment corresponding part, and details are not described herein for the present embodiment.
Memory 102 can include the volatile memory in computer-readable medium, random access memory (RAM) And/or the forms such as Nonvolatile memory, such as read-only memory (ROM) or flash memory (flash RAM), memory includes at least one Storage chip.
It to sum up, can be according to actual needs to receiving after server receives the data on flows that client is acquired and sent Each data on flows that each client arrived is sent carries out statistic of classification, so as to learn the statistical result for meeting the actual needs, solution It has determined and the data on flows that the client of each server consumes is counted by traffic service quotient in the prior art, led to server and visitor Family end can not all learn the technical issues of its flow Expenditure Levels.
The present invention also provides another computer program products, applied to server, in traffic statistics, can perform The program code of following method and step:
The flow information that client is sent is received, the flow information includes the application identities of the client, the visitor Family end runs the flow in consumed data on flows and the first time interval in each first time interval The corresponding network identity of data;
Under the application identities for calculating the client, each network identity corresponds to each data on flows summation, obtains described The corresponding total flow data of network identity.
With reference to Figure 11, present invention also provides a kind of structure diagram of flow statistical system, which can also include Server 111 and at least one client 112.
Wherein, it is referred to above device embodiment corresponding part about the function of above-mentioned server and client composition Description, details are not described herein for the present embodiment.
To sum up, the present embodiment acquires the data on flows of its consumption by client, and sends it to server and converged It is total to calculate, so as to obtain the statistical result for meeting various requirement.
It should be understood by those skilled in the art that, embodiments herein can be provided as method, client, server, be System or computer program product.Therefore, the application can be used complete hardware embodiment, complete software embodiment or with reference to software With the form of the embodiment of hardware aspect.Wherein include computer in one or more moreover, the application can be used and can use journey Implement in the computer-usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) of sequence code Computer program product form.
The application is with reference to the flow according to the method for the embodiment of the present application, equipment (system) and computer program product Figure and/or block diagram describe.It should be understood that it can be realized by computer program instructions every first-class in flowchart and/or the block diagram The combination of flow and/or box in journey and/or box and flowchart and/or the block diagram.These computer programs can be provided The processor of all-purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices is instructed to produce A raw machine so that the instruction performed by computer or the processor of other programmable data processing devices is generated for real The device of function specified in present one flow of flow chart or one box of multiple flows and/or block diagram or multiple boxes.
These computer program instructions, which may also be stored in, can guide computer or other programmable data processing devices with spy Determine in the computer-readable memory that mode works so that the instruction generation being stored in the computer-readable memory includes referring to Enable the manufacture of device, the command device realize in one flow of flow chart or multiple flows and/or one box of block diagram or The function of being specified in multiple boxes.
These computer program instructions can be also loaded into computer or other programmable data processing devices so that counted Series of operation steps are performed on calculation machine or other programmable devices to generate computer implemented processing, so as in computer or The instruction offer performed on other programmable devices is used to implement in one flow of flow chart or multiple flows and/or block diagram one The step of function of being specified in a box or multiple boxes.
In a typical configuration, computing device includes one or more processors (CPU), input/output interface, net Network interface and memory.
Memory may include computer-readable medium in volatile memory, random access memory (RAM) and/ Or the forms such as Nonvolatile memory, such as read-only memory (ROM) or flash memory (flash RAM).Memory is computer-readable Jie The example of matter.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method Or technology come realize information store.Information can be computer-readable instruction, data structure, the module of program or other data. The example of the storage medium of computer includes, but are not limited to phase transition internal memory (PRAM), static RAM (SRAM), moves State random access memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electric erasable Programmable read only memory (EEPROM), fast flash memory bank or other memory techniques, CD-ROM read-only memory (CD-ROM), Digital versatile disc (DVD) or other optical storages, magnetic tape cassette, the storage of tape magnetic rigid disk or other magnetic storage apparatus Or any other non-transmission medium, available for storing the information that can be accessed by a computing device.It defines, calculates according to herein Machine readable medium does not include temporary computer readable media (transitory media), such as data-signal and carrier wave of modulation.
It these are only embodiments herein, be not limited to the application.To those skilled in the art, The application can have various modifications and variations.All any modifications made within spirit herein and principle, equivalent replacement, Improve etc., it should be included within the scope of claims hereof.

Claims (12)

1. a kind of flow statistical method, which is characterized in that applied to client, the method includes:
According to first time interval, obtain the client and consumed flow is run in each described first time interval The corresponding network identity of the data on flows in data and the first time interval;
The application identities association of the data on flows of acquisition, the network identity and the client is sent to service Device, so that the server determines that the heterogeneous networks consumed in the client operational process identify corresponding total flow data.
2. according to the method described in claim 1, it is characterized in that, the method further includes:
The data on flows obtained in each described first time interval and network identity are associated storage;
Every the second time interval, each data on flows and each network identity of associated storage are counted, determine this The corresponding total flow data of each network identity in two time intervals, and second time interval is not less than between first time Every;
It is described that the application identities association of the data on flows of acquisition, the network identity and the client is sent to clothes Business device, specially:
The determining total flow data and its application identities of corresponding network identity and the client association is sent To server.
3. according to the method described in claim 2, it is characterized in that, the method further includes:
It will send in each data on flows of the second time interval memory storage and the deletion of each network identity.
4. according to the method described in claim 1, it is characterized in that, the method further includes:
The uniform resource locator URL parameter of server transmission is received and parsed through, the client operation is obtained and is consumed not The corresponding total flow data with network identity;
Wherein, the URL parameter is used to indicate the client and runs the consumed corresponding total flow number of heterogeneous networks mark According to.
5. according to the method described in claim 1, it is characterized in that, it is described obtain the client each described first when Between be spaced in the consumed data on flows of operation, including:
Obtain the data speed of download when client is run in each described first time interval;
Based on the data speed of download and the first time interval, the client is obtained in the first time interval The consumed data on flows of interior operation.
6. a kind of flow statistical method, which is characterized in that applied to server, the method includes:
The flow information that client is sent is received, the flow information includes the application identities of the client, the client The data on flows in consumed data on flows and the first time interval is run in each first time interval Corresponding network identity;
Under the application identities for calculating the client, the corresponding data on flows summation of each described network identity obtains described The corresponding total flow data of network identity.
7. according to the method described in claim 6, it is characterized in that, the method further includes:
It calculates the corresponding all clients of each network identity and runs consumed data on flows summation.
8. according to the method described in claim 6, it is characterized in that, the flow information further includes the use for logging in the client Family identifies, then the method further includes:
It obtains the corresponding different clients of each user identifier and consumed total flow data is run under each network identity;
The sum of corresponding each total flow data of same user identifier are calculated, obtain the corresponding user of each described user identifier Data on flows.
9. according to claim 6-8 any one of them methods, which is characterized in that the method further includes:
The flow inquiry request that the client is sent is received, the flow inquiry request at least carries answering for the client With mark;
Currently stored data on flows corresponding with the application identities of the client is obtained, and the data on flows of acquisition is sent To the client.
10. a kind of client, which is characterized in that the client includes:
Data obtaining module, for according to first time interval, obtaining the client in each first time interval The corresponding network identity of the data on flows in interior operation consumed data on flows and the first time interval;
Data transmission module, for the application of the data on flows obtained, the network identity and the client to be marked Know association and be sent to server, so that the server determines the heterogeneous networks consumed in the client operational process mark pair The total flow data answered.
11. a kind of server, which is characterized in that the server includes:
Data transmission module, for receiving the flow information of client transmission, the flow information includes answering for the client With mark, the client ran consumed data on flows in each first time interval and between the first time Every the interior corresponding network identity of the data on flows;
First data computation module, for calculating under the application identities of the client, each described network identity is corresponding Data on flows summation obtains the corresponding total flow data of the network identity.
12. a kind of flow statistical system, which is characterized in that the system comprises:
At least one client and such as claim 13~15 any one as described in claim 10~12 any one The server.
CN201611250170.0A 2016-12-29 2016-12-29 Traffic statistical method, client, server and system Active CN108259207B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611250170.0A CN108259207B (en) 2016-12-29 2016-12-29 Traffic statistical method, client, server and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611250170.0A CN108259207B (en) 2016-12-29 2016-12-29 Traffic statistical method, client, server and system

Publications (2)

Publication Number Publication Date
CN108259207A true CN108259207A (en) 2018-07-06
CN108259207B CN108259207B (en) 2021-04-27

Family

ID=62720820

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611250170.0A Active CN108259207B (en) 2016-12-29 2016-12-29 Traffic statistical method, client, server and system

Country Status (1)

Country Link
CN (1) CN108259207B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111046240A (en) * 2019-11-26 2020-04-21 金蝶软件(中国)有限公司 Gateway flow statistical method, device, computer equipment and storage medium
CN111698099A (en) * 2019-03-15 2020-09-22 阿里巴巴集团控股有限公司 Flow management method, and device, server and system for implementing same
CN112787828A (en) * 2021-01-08 2021-05-11 重庆创通联智物联网有限公司 Application flow statistical method and device and mobile electronic device
CN113726885A (en) * 2021-08-30 2021-11-30 北京天空卫士网络安全技术有限公司 Method and device for adjusting flow quota
CN113722113A (en) * 2021-08-30 2021-11-30 北京天空卫士网络安全技术有限公司 Traffic statistic method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102629909A (en) * 2012-03-30 2012-08-08 奇智软件(北京)有限公司 Traffic counting method and system based on processes
CN103024716A (en) * 2012-11-27 2013-04-03 中兴通讯股份有限公司 Method, device and system for wireless fidelity (WiFi) traffic statistics
CN103595576A (en) * 2013-10-31 2014-02-19 赛尔网络有限公司 Interconnection port ICP flow statistical system and method based on content provider identifications
CN104462392A (en) * 2014-12-10 2015-03-25 北京国双科技有限公司 Statistical method and statistical device for sharing return traffic
CN106021583A (en) * 2016-06-02 2016-10-12 北京京东尚科信息技术有限公司 Statistical method and system for page flow data

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102629909A (en) * 2012-03-30 2012-08-08 奇智软件(北京)有限公司 Traffic counting method and system based on processes
CN103024716A (en) * 2012-11-27 2013-04-03 中兴通讯股份有限公司 Method, device and system for wireless fidelity (WiFi) traffic statistics
CN103595576A (en) * 2013-10-31 2014-02-19 赛尔网络有限公司 Interconnection port ICP flow statistical system and method based on content provider identifications
CN104462392A (en) * 2014-12-10 2015-03-25 北京国双科技有限公司 Statistical method and statistical device for sharing return traffic
CN106021583A (en) * 2016-06-02 2016-10-12 北京京东尚科信息技术有限公司 Statistical method and system for page flow data

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111698099A (en) * 2019-03-15 2020-09-22 阿里巴巴集团控股有限公司 Flow management method, and device, server and system for implementing same
CN111046240A (en) * 2019-11-26 2020-04-21 金蝶软件(中国)有限公司 Gateway flow statistical method, device, computer equipment and storage medium
CN111046240B (en) * 2019-11-26 2024-03-08 金蝶软件(中国)有限公司 Gateway traffic statistics method, device, computer equipment and storage medium
CN112787828A (en) * 2021-01-08 2021-05-11 重庆创通联智物联网有限公司 Application flow statistical method and device and mobile electronic device
CN113726885A (en) * 2021-08-30 2021-11-30 北京天空卫士网络安全技术有限公司 Method and device for adjusting flow quota
CN113722113A (en) * 2021-08-30 2021-11-30 北京天空卫士网络安全技术有限公司 Traffic statistic method and device
CN113726885B (en) * 2021-08-30 2024-06-28 北京天空卫士网络安全技术有限公司 Flow quota adjusting method and device
CN113722113B (en) * 2021-08-30 2024-07-26 北京天空卫士网络安全技术有限公司 Flow statistics method and device

Also Published As

Publication number Publication date
CN108259207B (en) 2021-04-27

Similar Documents

Publication Publication Date Title
US11349999B2 (en) Methods and apparatus to generate audience measurement data from population sample data having incomplete demographic classifications
CN108259207A (en) Flow statistical method, client, server and system
US10243824B2 (en) On-device attribution of network data usage
US20220122104A1 (en) Methods and apparatus to estimate population reach from different marginal ratings and/or unions of marginal ratings based on impression data
JP2022084577A (en) Method and apparatus to collect distributed user information for media impression and search term
CN105446750B (en) The method and apparatus that WebApp starting runs, generates image file
US20120317151A1 (en) Model-Based Method for Managing Information Derived From Network Traffic
AU2020202339A1 (en) Notifications on mobile devices
CN108737535A (en) A kind of information push method, storage medium and server
CN109978620A (en) The method and apparatus and storage device of measurement and the exposure of monitoring streaming media
TW201317799A (en) Sharing control system and method for network resources download information
CN105049290B (en) Page access monitoring method and device
CN101110759A (en) Peer-to-peer file download system for IPTV network
CN108629053B (en) Data updating method, device and system
US12032535B2 (en) Methods and apparatus to estimate audience sizes of media using deduplication based on multiple vectors of counts
CN105794175B (en) Convey the performance metric of the system of WEB content
US20140304653A1 (en) Method For Generating Rules and Parameters for Assessing Relevance of Information Derived From Internet Traffic
CN108769757B (en) Video statistics and transaction system and method
JP6683681B2 (en) Determining the contribution of various user interactions to conversions
CN103428249A (en) Collecting method and processing method for HTTP request packet, system and server
CN102187357A (en) Apparatus and method for measuring advertising metrics
JP6552068B2 (en) Charging method and device, access device, quality of service control method and device
Díaz Zayas et al. QoE evaluation: the TRIANGLE testbed approach
CN109756762A (en) A kind of determination method and device of terminal class
US20130064108A1 (en) System and Method for Relating Internet Usage with Mobile Equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 100080 No. 401, 4th Floor, Haitai Building, 229 North Fourth Ring Road, Haidian District, Beijing

Applicant after: Beijing Guoshuang Technology Co.,Ltd.

Address before: 100086 Cuigong Hotel, 76 Zhichun Road, Shuangyushu District, Haidian District, Beijing

Applicant before: Beijing Guoshuang Technology Co.,Ltd.

GR01 Patent grant
GR01 Patent grant