CN108810837A - A kind of flow statistical method and server - Google Patents

A kind of flow statistical method and server Download PDF

Info

Publication number
CN108810837A
CN108810837A CN201810394472.8A CN201810394472A CN108810837A CN 108810837 A CN108810837 A CN 108810837A CN 201810394472 A CN201810394472 A CN 201810394472A CN 108810837 A CN108810837 A CN 108810837A
Authority
CN
China
Prior art keywords
flow
set meal
snapshot data
time
statistical method
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201810394472.8A
Other languages
Chinese (zh)
Inventor
胡沐荣
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wangsu Science and Technology Co Ltd
Original Assignee
Wangsu Science and 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 Wangsu Science and Technology Co Ltd filed Critical Wangsu Science and Technology Co Ltd
Priority to CN201810394472.8A priority Critical patent/CN108810837A/en
Publication of CN108810837A publication Critical patent/CN108810837A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/24Accounting or billing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M15/00Arrangements for metering, time-control or time indication ; Metering, charging or billing arrangements for voice wireline or wireless communications, e.g. VoIP
    • H04M15/82Criteria or parameters used for performing billing operations
    • H04M15/8214Data or packet based

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Medical Treatment And Welfare Office Work (AREA)

Abstract

The present embodiments relate to third-party application service field, a kind of flow statistical method and server are disclosed.In the present invention, flow statistical method, including:The transaction movement that user is directed to flow is monitored, transaction movement includes:Set meal is ordered and set meal is quit the subscription of;It often monitors a transaction movement, triggers the inquiry of primary total flow in real time;Flow statistical method further includes:When inquiring real-time total flow, snapshot data is obtained;According to inquire real-time total flow, snapshot data, the transaction movement monitored, determine the use flow distribution of each set meal under user name;Determined use flow distribution is utilized to update snapshot data, snapshot data includes at least:Each set meal under user name and corresponding flow distribution.Embodiment of the present invention makes the flow for realizing that the corresponding various flow rate packet of accurate statistics same application consumes respectively, and statistical method is simple and practicable, not error-prone.

Description

A kind of flow statistical method and server
Technical field
The present embodiments relate to third-party application service fields, more particularly to traffic statistics technology.
Background technology
Mobile data traffic refers to the data on flows that surfing Internet with cell phone generates, and the application program installed on user mobile phone accesses internet When, can refer to just the size for exchanging data with the swapping data of server, mobile data traffic.
Currently, some application programs (referred to as " APP ") provide orientation flow packet service, such as bucket 15 yuan of 6g/ months of fish, When user uses the APP, the flow consumed can be accumulated in corresponding orientation flow packet, and orientation flow packet generally has money Take the advantages that relatively low, flow amount is big, so attracting users specific to meet when required by orientation flow packet is ordered The flow of APP uses.
Inventor has found that at least there are the following problems in the prior art:When user is that specific APP has subscribed various flow rate packet Later, it is to be understood that the flow service condition of each flow packet, due to various flow packets the case where are various, and whens traffic statistics can not Its service condition is counted according to each flow packet respectively, occur can not accurate statistics the problem of.Specifically, even mobile phone Operator can only also count the total flow of itself consumption, and each flow packet stream that statistics is ordered for specific APP cannot be distinguished Measure service condition.Other than the existing flow packet released in addition to operator, other flow packets carried out with third party's cooperation often can not Accurate statistics, once and mistake of statistics is often easy for leading to the complaint of user.
Present inventor it has furthermore been found that APP server-sides only there are one the total flow that interface corresponds to statistics APP consumption, So when counting user uses traffic conditions, it is only capable of counting the total flow that the user used in this month, each stream cannot be distinguished out The flow value that amount packet has used, causes user that can not accurately inquire the flow that ordered various flow rate packet consumes respectively Value.
Invention content
Embodiment of the present invention is designed to provide a kind of flow statistical method and server so that realizes accurate statistics The flow that the corresponding various flow rate packet of same application consumes respectively, statistical method is simple and practicable, not error-prone.
In order to solve the above technical problems, embodiments of the present invention provide a kind of flow statistical method, including:Monitoring is used Family is directed to the transaction movement of flow, and the transaction movement includes:Set meal is ordered and set meal is quit the subscription of;Often monitor the primary transaction Action triggers the inquiry of primary total flow in real time;The flow statistical method further includes:When inquiring the real-time total flow, Obtain snapshot data;According to inquire the real-time total flow, the snapshot data, the transaction movement monitored, determine Go out the use flow distribution of each set meal under the user name;Determined use flow distribution is utilized to update the snapshot Data, the snapshot data include at least:Each set meal under the user name and corresponding flow distribution.
Embodiments of the present invention additionally provide a kind of server, including:At least one processor;And with it is described extremely The memory of few processor communication connection;Wherein, the memory, which is stored with, to be executed by least one processor Instruction, described instruction is executed by least one processor, so that at least one processor is able to carry out as above-mentioned Flow statistical method.
Embodiments of the present invention additionally provide a kind of computer readable storage medium, are stored with computer program, described Above-mentioned flow statistical method is realized when computer program is executed by processor.
In terms of existing technologies, the main distinction and its effect are embodiment of the present invention:It increases newly to customer transaction The monitoring of action, specific ordered such as set meal are quit the subscription of with set meal, summarize the various set meals ordered by user and its respective state, And snapshot data is generated, when flow is inquired, according to previously stored snapshot data and the user operation records monitored and look into The wastage in bulk or weight value ask carries out backwards calculation, extrapolates the corresponding flow distribution of each set meal, then update snapshot data remain with It is used when inquiring afterwards.As it can be seen that present inventor innovatively proposes the mode of backwards calculation so that embodiment of the present invention In flow statistical method be not necessarily to change communication interface between server and application program, method is simple and practicable, not error-prone, and And since user demand is big, there is good promotion prospect.
As a further improvement, the real-time total flow inquired in the basis, snapshot data, the institute monitored In the step of stating transaction movement, determining the use flow distribution of each set meal under user name, specifically include:According to inquiring The real-time total flow, snapshot data, the transaction movement monitored, determine flow to be allocated;It is waited for described point With each set meal under assignment of traffic to the user name;According to the flow value for being allocated to each set meal, institute is determined State the use flow distribution of each set meal under user name.It further limits to be distributed according to the allocated set meal and first calculate Go out still unappropriated flow value, only needs to be allocated according to still unappropriated flow value when secondary, simplify calculating process, carry High efficiency.
As a further improvement, the set meal is preset with priority;It is described by assignment of traffic to be allocated to the user name Under each set meal, specially:It, will be each under the assignment of traffic to be allocated to the user name according to preset priority Set meal.Further limiting set meal has priority, and during flow value distributes, it is allocated according to priority height.
As a further improvement, the priority is determined according to the order time of the set meal and out-of-service time.Specific limit Determine the priority level initializing rule of set meal so that priority can be set automatically, further increase efficiency.
As a further improvement, the snapshot data further includes:Fail flow value and excess traffic calibration value;The basis The real-time total flow that inquires, snapshot data, the transaction movement monitored, determine flow to be allocated, specifically include: The calibration total available stream magnitude of set meal is calculated using following publicity:In the total available stream magnitude of the calibration set meal=snapshot data The sum of utilizable flow-snapshot data in failure flow value;Calculate the excess traffic school in updated snapshot data Quasi- value;Wherein, if the real-time total flow is more than the excess traffic calibration value in the snapshot data and is covered with the calibration It eats the sum of total available stream magnitude, then the excess traffic calibration value in updated snapshot data=real-time total flow-is described Calibrate the total available stream magnitude of set meal;If the real-time total flow is less than or equal to the excess traffic school in the snapshot data Quasi- value is the sum of with the total available stream magnitude of calibration set meal, then the excess traffic calibration value in updated snapshot data=described Excess traffic calibration value in snapshot data;The flow to be allocated is calculated using following publicity:Flow=the institute to be allocated It states in excess traffic calibration value-snapshot data in the real-time total flow-updated snapshot data under user name Each set meal has used the sum of flow.The specific method for calculating flow value to be allocated automatically using formula is further limited, is calculated It is accurate not error-prone.
As a further improvement, each set meal under the user name in the snapshot data be corresponding with the entry-into-force time and Out-of-service time, the failure flow value are determined according to the entry-into-force time of each set meal and out-of-service time.Further limit set Meal also has entry-into-force time and out-of-service time so that the distribution of set meal more tallies with the actual situation, calculated flow distribution data It is more accurate.
As a further improvement, further including:When receiving flow service condition inquiry instruction, it is primary to execute the triggering The step of inquiry of real-time total flow.Further limit and trigger query steps after receiving inquiry instruction, convenient for user according to Need active inquiry.
As a further improvement, transaction movement further includes set meal pause.Further limiting also needs monitoring set meal pause action, So that collecting information more fully, the flow distribution in the set meal of acquisition is more accurate.
Description of the drawings
One or more embodiments are illustrated by the picture in corresponding attached drawing, these exemplary theorys The bright restriction not constituted to embodiment, the element with same reference numbers label is expressed as similar element in attached drawing, removes Non- to have special statement, composition does not limit the figure in attached drawing.
Fig. 1 is according to the flow statistical method flow chart in first embodiment of the invention;
Fig. 2 is according to the flow statistical method flow chart in third embodiment of the invention;
Fig. 3 is according to the server architecture schematic diagram in four embodiment of the invention;
Fig. 4 is the operation principle schematic diagram according to the server in four embodiment of the invention.
Specific implementation mode
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with attached drawing to the present invention Each embodiment be explained in detail.However, it will be understood by those skilled in the art that in each embodiment party of the present invention In formula, in order to make the reader understand this application better, many technical details are proposed.But even if without these technical details And various changes and modifications based on the following respective embodiments, it can also realize the application technical solution claimed.
The first embodiment of the present invention is related to a kind of flow statistical methods.
Flow statistical method in present embodiment can be applied to server, that is, the background service of application program Device, flow is as shown in Figure 1, specific as follows:
Step 101, monitoring user is directed to the transaction movement of flow.
Specifically, transaction movement includes:Set meal is ordered and set meal is quit the subscription of.Wherein, the action of set meal order, which can correspond to, obtains The flow value for taking ordered set meal to include, these flow values corresponding order time and out-of-service time, set meal quits the subscription of action can With the corresponding flow value for obtaining quit the subscription of set meal and including, these flow values corresponding out-of-service time.
In practical application, transaction movement can also include the other users operations such as set meal pause, set meal recovery, herein no longer It enumerates.
Step 102, when detecting transaction movement, real-time total flow is inquired.
Specifically, the inquiry of real-time total flow can be inquired by the official channel of operator, and record queries The real-time total flow value arrived.And in the total flow value inquired from official and affiliated set meal is not differentiated between, so needing subsequent step Continue to distinguish.
In practical application, when detecting transaction movement, also the corresponding content of the transaction movement detected is recorded, In case used in follow-up calculating.
Step 103, snapshot data is obtained.
Specifically, snapshot data is specific format data, for summarizing each set meal and corresponding consumption that user has Value.Snapshot data acquired in this step is the snapshot data deposited, that is, last updated snapshot data.Wherein, Snapshot data includes at least:Each set meal under user name and corresponding flow distribution.
More specifically, snapshot data can record in a tabular form, each set meal under user name is respectively included, and each The corresponding use value of a set meal, when first time initial setting up, the consumption figures of each set meal can be denoted as 0.Practical application In, snapshot data may also include the failure data such as flow value and excess traffic calibration value.
The format of snapshot data is for example:{ set meal A n1, set meal B n2, set meal B n3T, set meal C n4 } | failure flow value y | excess traffic calibration value z.Format description:N y z, represent flow value;Set meal A n1 indicate that user has ordered set meal A in APP Use flow n1;T, represents set meal and quits the subscription of and come into force, subsequently no longer flow distribution;Fail flow value y, and set meal is quit the subscription of gives birth to immediately The flow being not used after effect will cancel, for example it is 3G that total flow, which can be used, in effective set meal on the 1st, has currently used 1G, has arrived Phase quits the subscription of automatically, and remaining 2G cancels, and is included in failure flow value y;Excess traffic calibration value z:User is total beyond set meal using flow The flow value of forehead point.Certainly, it can be arranged according to actual demand as the symbol of interval only in format, do not limited herein It is fixed, extended formatting can also be used in practical application, will not enumerate herein.
Step 104, according to inquire real-time total flow, snapshot data, the transaction movement monitored, determine to wait for point With flow.
Specifically, snapshot data further includes:Fail flow value and excess traffic calibration value;
According to inquire real-time total flow, snapshot data, the transaction movement monitored, determine flow to be allocated, It can specifically include following steps:
(1) the calibration total available stream magnitude of set meal is calculated using following publicity:
Calibrate the failure flow in the sum of utilizable flow in the total available stream magnitude=snapshot data of set meal-snapshot data Value.Wherein, failure flow value is determined according to the entry-into-force time of each set meal and out-of-service time.Record when can directly by Entry-into-force time and out-of-service time are recorded, and the entry-into-force time and out-of-service time of each set meal of can also prestoring correspond to table, During this step summarizes, the entry-into-force time and out-of-service time of each set meal are just gone out according to corresponding table search, in conjunction with order Time and the time is quit the subscription of, calculates the flow value that comes into force, and failure flow value.That is, according to the ordered set being recorded Meal and its order time, the set meal quit the subscription of that is recorded and its when quitting the subscription of time, each set meal corresponding entry-into-force time and failure Between, update the set meal and its state in the snapshot data to prestore and the flow value that fails.It is noted that the order time summarized It can be all with the time is quit the subscription of, can also only count some nearest period, such as of that month operation note.
For example, it had subscribed set meal A on April 1 if be recorded, had subscribed set meal B on April 7, ordered again April 10 Set meal C, then it is exactly { set meal A n1, set meal B n2, set meal B n3 } to summarize the snapshot data | failure flow value y | excess Traffic alignment value z.Format description is as above, repeats no more.
(2) the excess traffic calibration value in updated snapshot data is calculated;Wherein, it specifically includes:
If real-time total flow is more than the sum of excess traffic calibration value and calibration total available stream magnitude of set meal in snapshot data, The then excess traffic calibration value in updated snapshot data=total available stream magnitude of real-time total flow-calibration set meal.
If real-time total flow is less than or equal to excess traffic calibration value and the calibration total utilizable flow of set meal in snapshot data The sum of value, then the excess traffic calibration value in excess traffic calibration value=snapshot data in updated snapshot data.
Wherein, real-time total flow is the real-time total flow inquired in step 102.
(3) flow to be allocated is calculated using following publicity:Flow to be allocated=updated the snapshot data of real-time total flow- In excess traffic calibration value-snapshot data in each set meal under user name used the sum of flow.
Wherein, each set meal under user name has used the calculating of the sum of flow for example:It is with snapshot data:{ set meal A N1, set meal B n2, set meal B n3 } | failure flow value y | excess traffic calibration value z, for, the sum of corresponding consumption figures of each set meal Can be n1+n2+n3.
To sum up, flow to be allocated is determined in three above sub-step realization.
Step 105, by each set meal under assignment of traffic to be allocated to user name.
Specifically, present embodiment is allocated in distribution according to the priority of each set meal, specifically, preferentially Grade successively determines that the set meal first ordered preferentially is distributed according to the order time.
And then according to each set meal and its state in snapshot data, determine the set meal belonging to flow value to be allocated.Specifically It says, assignment of traffic can be carried out according to the priority of each set meal in present embodiment, specifically, priority is according to the order time It successively determines, the set meal sequence in snapshot data can also be according to the practical sequence of order.In distribution, detained according to priority height Except the flow remaining sum in set meal, after the flow in upper priority set meal deducts, the stream in next priority set meal is deducted Amount.
For example:Lower three set meals of user name are set meal A, set meal B and set meal C, set meal A respectively by order time sequence Total value be 100M, the total value of set meal B is 200M, and the total value of set meal C is 100M, if calculated flow value to be allocated is 150M, then the flow for distributing to set meal A is 100M, the flow for distributing to set meal B is 50M, and the flow for distributing to set meal C is 0M;If calculated flow value to be allocated is 500M, the flow for distributing to set meal A is 100M, distributes to the stream of set meal B Amount is 200M, and the flow for distributing to set meal C is 100M, and remaining 100M is just classified as " excess traffic calibration value ", that is, z= 100M。
Step 106, according to the flow value for being allocated to each set meal, the use stream of each set meal under user name is determined Amount distribution.
Specifically, according to the allocation result determined in step 105, snapshot data is updated, if allocation result is:Distribution Flow to set meal A is 100M, and the flow for distributing to set meal B is 200M, and the flow for distributing to set meal C is 100M, remaining 100M is just classified as " excess traffic calibration value ", then updated snapshot data is { set meal A 100, set meal B 200, set meal B 100 } | failure flow value 0 | excess traffic calibration value 100.
It continues to explain, if being continuing with flow later, since the amount of the set meal of order has run out, then will continue to charge to In excess traffic calibration value.
Step 107, determined use flow distribution is utilized to update snapshot data.
Specifically, it covers former snapshot data using updated snapshot data and is stored in equipment local, use can be passed through Family terminal display is seen to user.Specifically, exhibition method can be by page presentation, can also be to be sent out in a manner of short message It send to user terminal, does not limit herein.
In terms of existing technologies, the main distinction and its effect are present embodiment:It is newly-increased that customer transaction is acted Monitoring, it is specific as set meal is ordered and set meal is quit the subscription of, summarize the various set meals ordered by user and its respective state, and raw At snapshot data, when flow is inquired, according to previously stored snapshot data and the user operation records monitored and inquire Wastage in bulk or weight value carry out backwards calculation, extrapolate the corresponding flow distribution of each set meal, then update after snapshot data remains and look into It is used when inquiry.As it can be seen that present inventor innovatively proposes the mode of backwards calculation so that the flow in present embodiment Statistical method is not necessarily to change communication interface between server and application program, and method is simple and practicable, not error-prone, and due to Family demand is big, has good promotion prospect.Meanwhile the flow statistical method in present embodiment can be with for the variation of set meal Even if accurate statistics can also accurately be remembered there are the operation that user suspends set meal, recovery set meal once in a while by recording step Record, in assignment of traffic later, it is in set meal which, which is distinguished, using flow, which is the flow outside set meal.
Second embodiment of the present invention is related to a kind of flow statistical method.Second embodiment is big with first embodiment It causes identical, is in place of the main distinction:In the first embodiment, the priority of each set meal is determined according to the order time.And In second embodiment of the invention, the priority of each set meal is determined according to the out-of-service time, is adapted to more abundant set meal type, is made Of the invention it must more adapt to various application scenarios.
Specifically, each set meal in present embodiment is all corresponding with priority, and priority is fallen according to the out-of-service time Sequence arranges, that is to say, that the more early set meal of failure, priority is higher, and the set meal of same-priority is just secondary according to the order time Sequence.
For example, set meal A was ordered on April 10, the term of validity is 10 days, and morning April 8 orders set meal B, the term of validity 1 It, orders set meal C afternoons April 8, and the term of validity is 1 day, on the day of being April 8 due to the out-of-service time of set meal B and C, and set meal A Out-of-service time be April 19, then the allocation order of flow value to be allocated is first to charge to set meal B, then charges to set meal C, most postscript Enter set meal A.
As it can be seen that different types of set meal can be adapted to using the flow statistical method in present embodiment, it is convenient for set meal Platform is provided and provides a plurality of types of set meals for consumer so that the application scenarios of present embodiment are more flexible and changeable, are suitable for It is widely popularized.
In addition, in practical application, the priority in addition to determining each set meal in first embodiment according to the order time, and this Embodiment determines the priority of each set meal according to the out-of-service time, and other parameters can also be utilized to determine the priority of each set meal, It will not enumerate herein.
Third embodiment of the present invention is related to a kind of flow statistical method.Second embodiment is big with first embodiment It causes identical, is in place of the main distinction:SUBSCRIBE Operation is detected in first embodiment every time or quits the subscription of operation, is started a query at total Flow value, and in present embodiment when receiving flow service condition inquiry instruction, inquiry application is executed when default Between consume in section total flow value the step of, be convenient for user's active inquiry as needed.
Specifically, the flow statistical method flow chart in present embodiment is as shown in Fig. 2, specific as follows:
Step 201, judge whether to detect transaction movement;If so, thening follow the steps 203;If it is not, thening follow the steps 202.
Specifically, the step 101 in this step and first embodiment is practical for monitoring user's to 102 similar Transaction movement, details are not described herein.
Step 202, judge whether to receive flow service condition inquiry instruction;If so, thening follow the steps 203;If it is not, then Return to step 201.
Specifically, this step detects whether to receive flow service condition inquiry instruction, and inquiry instruction can be by user It is sent out by APP, one flow query page such as is set in APP, once user enters the page, APP is just to corresponding service Device transmitted traffic service condition inquiry instruction, server execute inquiry application in preset time period after receiving the instruction The step of total flow value of interior consumption.
It is noted that step 201 and step 202 be not necessarily such as the sequencing in present embodiment, it can also The reception for first carrying out flow service condition inquiry instruction judges, then is traded the detection judgement of action, and details are not described herein.
Step 203, real-time total flow is inquired.
Specifically, this step is similar with the real-time total flow of inquiry in step 102 in first embodiment, herein not It repeats again.
Step 204 is similar to step 107 with step 103 in first embodiment to step 208 in present embodiment, This is repeated no more.
As it can be seen that present embodiment is further limited also can trigger query steps after receiving inquiry instruction, it is convenient for user Active inquiry as needed enriches the realization method of traffic statistics.
The step of various methods divide above, be intended merely to describe it is clear, when realization can be merged into a step or Certain steps are split, multiple steps are decomposed into, as long as including identical logical relation, all in the protection domain of this patent It is interior;To either adding inessential modification in algorithm in flow or introducing inessential design, but its algorithm is not changed Core design with flow is all in the protection domain of the patent.
Four embodiment of the invention is related to a kind of server, as shown in figure 3, including:
At least one processor;And the memory being connect at least one processor communication;Wherein, memory stores There is the instruction that can be executed by least one processor, instruction is executed by least one processor, so that at least one processor energy It is enough to execute such as first embodiment to any of third embodiment flow statistical method.
It is noted that the processor in server in present embodiment is system executing traffic statistics algorithm Signal flow to schematic diagram can be as shown in Figure 4.
Wherein, memory is connected with processor using bus mode, and bus may include the bus of any number of interconnection And bridge, bus link together the various circuits of one or more processors and memory.Bus can also will be such as peripheral Various other circuits of equipment, voltage-stablizer and management circuit or the like link together, these are all well known in the art , therefore, it will not be further described herein.Bus interface provides interface between bus and transceiver.Transceiver Can be an element, can also be multiple element, such as multiple receivers and transmitter, provide for over a transmission medium with The unit of various other device communications.The data handled through processor are transmitted on the radio medium by antenna, further, Antenna also receives data and transfers data to processor.
Processor is responsible for bus and common processing, can also provide various functions, including periodically, peripheral interface, Voltage adjusting, power management and other control functions.And memory can be used to store processor and execute operation when institute The data used.
Fifth embodiment of the invention is related to a kind of computer readable storage medium, is stored with computer program.Computer It is realized such as first embodiment to any of third embodiment flow statistical method when program is executed by processor.
That is, it will be understood by those skilled in the art that implement the method for the above embodiments be can be with Relevant hardware is instructed to complete by program, which is stored in a storage medium, including some instructions are making It obtains an equipment (can be microcontroller, chip etc.) or processor (processor) executes each embodiment method of the application All or part of step.And storage medium above-mentioned includes:USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disc or CD etc. are various can store journey The medium of sequence code.
It will be understood by those skilled in the art that the respective embodiments described above are to realize specific embodiments of the present invention, And in practical applications, can to it, various changes can be made in the form and details, without departing from the spirit and scope of the present invention.

Claims (10)

1. a kind of flow statistical method, which is characterized in that including:
The transaction movement that user is directed to flow is monitored, the transaction movement includes:Set meal is ordered and set meal is quit the subscription of;
It often monitors the primary transaction movement, triggers the inquiry of primary total flow in real time;
The flow statistical method further includes:
When inquiring the real-time total flow, snapshot data is obtained;
According to inquire the real-time total flow, the snapshot data, the transaction movement monitored, determine the user The use flow distribution of each set meal under one's name;
Determined use flow distribution is utilized to update the snapshot data, the snapshot data includes at least:The user Each set meal under one's name and corresponding flow distribution.
2. flow statistical method according to claim 1, which is characterized in that inquired in the basis described total in real time Flow, snapshot data, the transaction movement monitored, determine each set meal under user name using flow distribution In step, specifically include:
According to inquire the real-time total flow, snapshot data, the transaction movement monitored, determine stream to be allocated Amount;
By each set meal under the assignment of traffic to be allocated to the user name;
According to the flow value for being allocated to each set meal, dividing using flow for each set meal under the user name is determined Cloth.
3. flow statistical method according to claim 2, which is characterized in that the set meal is preset with priority;
Each set meal by under assignment of traffic to be allocated to the user name, specially:According to preset priority, by institute State each set meal under assignment of traffic to be allocated to the user name.
4. flow statistical method according to claim 3, which is characterized in that the priority is according to the order of the set meal Time and out-of-service time determine.
5. flow statistical method according to claim 2, which is characterized in that the snapshot data further includes:Fail flow Value and excess traffic calibration value;
Real-time total flow that the basis inquires, snapshot data, the transaction movement monitored, determine stream to be allocated Amount, specifically includes:
The calibration total available stream magnitude of set meal is calculated using following publicity:The total available stream magnitude of the calibration set meal=snapshot number Failure flow value in the sum of utilizable flow in-snapshot data;
Calculate the excess traffic calibration value in updated snapshot data;Wherein, if the real-time total flow is more than the snapshot The sum of described excess traffic calibration value and the total available stream magnitude of calibration set meal in data, then in updated snapshot data Excess traffic calibration value=total available stream magnitude of the real-time total flow-calibration set meal;If the real-time total flow is small In or equal to the sum of the excess traffic calibration value in the snapshot data and the total available stream magnitude of calibration set meal, then more The excess traffic calibration value in excess traffic calibration value=snapshot data in snapshot data after new;
The flow to be allocated is calculated using following publicity:After the flow to be allocated=real-time total flow-update Snapshot data in excess traffic calibration value-snapshot data in each set meal under user name used the sum of flow.
6. flow statistical method according to claim 5, which is characterized in that under the user name in the snapshot data Each set meal be corresponding with entry-into-force time and out-of-service time, the failure flow value according to entry-into-force time of each set meal and Out-of-service time determines.
7. flow statistical method according to claim 1, which is characterized in that further include:Receiving flow service condition When inquiry instruction, described the step of triggering the primary inquiry of total flow in real time is executed.
8. flow statistical method according to claim 1, which is characterized in that the transaction movement further includes set meal pause.
9. a kind of server, which is characterized in that including:
At least one processor;And
The memory being connect at least one processor communication;Wherein,
The memory is stored with the instruction that can be executed by least one processor, and described instruction is by least one place It manages device to execute, so that at least one processor is able to carry out flow statistical method as described in any of the claims 1 to 8.
10. a kind of computer readable storage medium, is stored with computer program, which is characterized in that the computer program is located It manages and realizes any flow statistical method in claim 1 to 8 when device executes.
CN201810394472.8A 2018-04-27 2018-04-27 A kind of flow statistical method and server Pending CN108810837A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810394472.8A CN108810837A (en) 2018-04-27 2018-04-27 A kind of flow statistical method and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810394472.8A CN108810837A (en) 2018-04-27 2018-04-27 A kind of flow statistical method and server

Publications (1)

Publication Number Publication Date
CN108810837A true CN108810837A (en) 2018-11-13

Family

ID=64093563

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810394472.8A Pending CN108810837A (en) 2018-04-27 2018-04-27 A kind of flow statistical method and server

Country Status (1)

Country Link
CN (1) CN108810837A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111130810A (en) * 2019-11-27 2020-05-08 华为技术有限公司 Charging method and device for cloud service usage package and related equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101247238A (en) * 2007-02-14 2008-08-20 华为技术有限公司 Method and system for data flux statistics
CN105577459A (en) * 2014-10-08 2016-05-11 腾讯科技(深圳)有限公司 Traffic monitoring method, traffic monitoring system, cloud server and client
CN106162576A (en) * 2015-03-30 2016-11-23 腾讯科技(深圳)有限公司 A kind of mobile terminal network flow indication method and device
CN107104807A (en) * 2017-04-24 2017-08-29 深圳天珑无线科技有限公司 A kind of data traffic monitoring method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101247238A (en) * 2007-02-14 2008-08-20 华为技术有限公司 Method and system for data flux statistics
CN105577459A (en) * 2014-10-08 2016-05-11 腾讯科技(深圳)有限公司 Traffic monitoring method, traffic monitoring system, cloud server and client
CN106162576A (en) * 2015-03-30 2016-11-23 腾讯科技(深圳)有限公司 A kind of mobile terminal network flow indication method and device
CN107104807A (en) * 2017-04-24 2017-08-29 深圳天珑无线科技有限公司 A kind of data traffic monitoring method and device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111130810A (en) * 2019-11-27 2020-05-08 华为技术有限公司 Charging method and device for cloud service usage package and related equipment
CN111130810B (en) * 2019-11-27 2021-06-22 华为技术有限公司 Charging method and device for cloud service usage package and related equipment

Similar Documents

Publication Publication Date Title
US8347306B2 (en) Method and system for determining resource usage of each tenant in a multi-tenant architecture
US9703285B2 (en) Fair share scheduling for mixed clusters with multiple resources
CN109032801A (en) A kind of request scheduling method, system and electronic equipment and storage medium
US8463578B2 (en) Hardware based utilization metering
EP0994602A2 (en) Computer system and network performance monitoring
CN103347259B (en) A kind of flow prompt method and system
KR100969497B1 (en) Performance monitor and method therefor
CN100533398C (en) Debug information collection method and debug information collection system
CN106452933A (en) Service data statistical method, device and system
CN110191160A (en) A kind of concurrency control method and device
CN107343023A (en) Resource allocation methods, device and electronic equipment in a kind of Mesos management cluster
CN112085535A (en) Resource metering charging method, device, cluster and storage medium
CN116801286A (en) Method and system for controlling disconnection of flow pool of Internet of things card
CN111182479B (en) Information sending control method and device
CN106933671A (en) A kind of methods, devices and systems for carrying out flexible treatment
CN108833123A (en) Based on according to quantity cloud host charging method and device
CN108810837A (en) A kind of flow statistical method and server
CN103309843A (en) Configuration method and system for servers
CN110298677A (en) A kind of method, apparatus, electronic equipment and the storage medium of cloud computing resources charging
CN109933433A (en) A kind of GPU resource scheduling system and its dispatching method
CN109412961A (en) A kind of flow managing method and device based on throwing screen equipment
CN109002381A (en) Process communication monitoring method, electronic device and computer readable storage medium
WO2021258719A1 (en) Billing method and system for container platform
US20170301044A1 (en) Systems and methods for managing outages in utility systems
CN112737796A (en) Cross-region user communication charge transfer method, device, equipment, medium and product

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