CN103002466B - Traffic warning method and traffic warning device - Google Patents
Traffic warning method and traffic warning device Download PDFInfo
- Publication number
- CN103002466B CN103002466B CN201110269276.6A CN201110269276A CN103002466B CN 103002466 B CN103002466 B CN 103002466B CN 201110269276 A CN201110269276 A CN 201110269276A CN 103002466 B CN103002466 B CN 103002466B
- Authority
- CN
- China
- Prior art keywords
- flow
- traffic
- information
- connection
- user
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention discloses a traffic warning method and a traffic warning device. The method includes: determining current connection initiated by a user to be 3G (third-generation) connection and starting a 3G internet surfing traffic warning function; recording current connection traffic information in a preset local traffic log recording file, and computing total traffic in the current month according to the local traffic log recording file; and determining the computed total traffic in the current month to exceed a preset threshold value, and informing the user according to preset traffic warning policies. Applying the traffic warning method and the traffic warning device can provide traffic warning information for users and lower expenses of the users.
Description
Technical field
The present invention relates to computer communication technology, particularly a kind of method of early warning flow and device.
Background technology
Along with the development of computer communication technology and Internet technology, 3G (Third Generation) Moblie (3G, 3rd Generation) mobile Internet access obtains and applies more and more widely, obtains by 3G mobile internet the part that relevant information more and more becomes indispensable in people's life and work.At present, the operation commercial city such as movement, telecommunications, UNICOM is proposed 3G monthly payment service on net, this 3G monthly payment service on net is not only applied on smart mobile phone, simultaneously, along with the release of various 3G mobile Internet access card apparatus (3G card of surfing Internet), be widely applied on 3G net book, notebook computer.
At present, most popular in the 3G monthly payment service that Ge great operator releases is the monthly package service of bag flow, the mode of bag flow normally contracts fixing flow with fixing expense, this fixing flow forms monthly package rated value, as 1 Ji (G), 2G etc., fixing expense forms monthly package expense, as 5 yuan of corresponding 1G/ months, 10 yuan of corresponding 2G/ months etc., when the monthly package service using bag flow, if the flow of user's final utilization every month is less than or equal to monthly package rated value, then only need to pay predetermined monthly package expense, but once the flow of user's monthly final utilization exceeds monthly package rated value, the flow then exceeding monthly package rated value part just adopts by excess flow charging, usually, this price exceeding the flow of monthly package rated value part far will exceed the average discharge price of monthly package, such as, the flow part exceeded carries out charging according to 50 yuan/G.
The extra charge that the flow used to reduce user exceeds predetermined monthly package rated value and need pay, at present, some 3G card of surfing Internet equipment vendors are when providing 3G card of surfing Internet to user, simultaneously provide subsidiary traffic statistics software with the surfing flow of counting user to user, thus early warning is carried out to the flow use of user, this kind of traffic statistics software can counting user from dial-up connection set up, to dial-up connection close between use this connection surf the Net use flow, and inform by the mode of information or ejection dialog box the flow that this connection of user uses when connection closed, the current flow connecting use is understood to make user, about the relevant treatment flow process of traffic statistics software statistics flow, specifically can see relate art literature.
In addition, some operators also can provide flow inquiry service to carry out early warning to flow, after user terminates required business in current connection, close current connection before, by logging in the website (flow querying server) providing the operator of flow inquiry service, can check that the of that month each surfing flow connected of user is detailed, and remaining flow in of that month monthly package, thus flow use is planned, and reach the object of early warning.
From above-mentioned, the method of existing early warning flow, by the traffic statistics software that 3G card of surfing Internet equipment vendor provides, can only connect when secondary the flow used by reminding user when each dial-up connection is closed, but the statistics of this single surfing flow can not allow user recognize effectively, and current month employs how many flows altogether, also user cannot be allowed to be well understood in monthly package also remain how many flows can continue to use, and just inform the mode of user during this connection closed, user cannot in upper network process, when the flow used is close to monthly package rated value, cannot know in time, thus user may be surfed the Net because of time-out, what make to use flows exceed monthly package rated value and expenses of surfing Internet outside amount paid, the method also cannot reach early warning flow, reduce the object of user overhead information.
And for the flow inquiry service that operator provides, needing user to sign in provides the website of the operator of flow inquiry service, carry out inquiry and obtain flow service condition, this mode, user is made to understand of that month flow service condition on the one hand very inconvenient, need frequently to log in, also flow warning function is lacked on the other hand, make to recognize whether present flow rate reaches monthly package rated value fast in the upper network process of user, being convenient to stop link in time when reaching monthly package rated value, avoiding the campus network outside amount paid.
Summary of the invention
In view of this, main purpose of the present invention is a kind of method proposing early warning flow, provides flow early warning information to reduce user overhead information to user.
Another object of the present invention is to the device proposing a kind of early warning flow, provide flow early warning information to reduce user overhead information to user.
For achieving the above object, the invention provides a kind of method of early warning flow, the method comprises:
Determine that the current connection of Client-initiated is that 3G connects, start 3G surfing flow warning function;
In the local traffic log log file pre-set, record current connection traffic information, and calculate of that month total flow according to local traffic log log file;
Determine that the of that month total flow calculated exceedes the threshold value pre-set, the flow prediction policy according to pre-setting notifies user.
Described determine the current connection of Client-initiated be 3G connect comprise:
Monitor user ' online dial-up connection, extracts the dial-up connection information of carrying in Client-initiated dial-up connection request;
According to the dial-up connection information that the filter rule match pre-set extracts, if the match is successful, determine that current connection is that 3G connects.
Described dial-up connection information comprise dialing protocol information and/or, dialing equipment name information.
Be provided with in the described filtering rule pre-set mark 3G connect 3G protocol information and/or, 3G device name information.
Described startup 3G surfing flow warning function comprises:
Whether A11, inquiry 3G surfing flow warning function opened, if opened, performed steps A 12, if do not opened, performed steps A 13;
A12, arranges and starts the early warning of 3G surfing flow;
A13, exports the information of opening 3G surfing flow warning function to user;
A14, receives user arranges menu output flow early-warning parameters according to the 3G flow warning function of showing, arranges and start 3G surfing flow warning function.
Described flow early-warning parameters comprises: monthly package flow rated value, monthly package flow rated value threshold values, flow early warning threshold values and flow prediction policy.
The described threshold value pre-set comprises: flow early warning threshold values and monthly package flow rated value threshold values, and described flow prediction policy comprises:
When user's use traffic is not less than flow early warning threshold values, when each closedown connects to user's output flow early warning information, described flow early warning information comprises of that month remaining flow information;
When user's use traffic exceedes monthly package flow rated value threshold values, the rated value that the monthly package flow rated value exporting reminding user to user has in real time exhausted exhausts early warning information;
When user continues current connection after amount of exports definite value exhausts early warning information, export super flow early warning information when connection closed to user, described super flow early warning information comprises the flow information exceeded this month.
Describedly in the local traffic log log file pre-set, record current connection traffic information, and calculate of that month total flow according to local traffic log log file and comprise:
B11, monitor current connection, current connection traffic information is write in the local traffic log log file pre-set;
The time cycle that B12, basis pre-set calculates the current connection traffic information in the local traffic log log file writing and pre-set;
B13, obtain store in local traffic log log file except current connection other connect flow informations;
B14, according to current connection traffic and the of that month total flows of other flow rate calculation connected except current connection.
Described connection traffic information comprises: this connects the flow information and connection identifier information that use.
Described connection traffic information comprises further: this connects the time started, this connects current time and this connects the end time.
Described step B13 comprises further: obtain the traffic statistics error correction values stored in local traffic log log file;
Described step B14 is: according to traffic statistics error correction values, current connection traffic and the of that month total flow of other flow rate calculation connected except current connection.
Obtain described traffic statistics error correction values to comprise:
B131, inquire about in local traffic log log file and whether store traffic statistics error correction values, if to store and the time difference of the temporal information and current time information that store flow statistical error correction value is not more than the time threshold pre-set, perform step B132, otherwise, perform step B133;
B132, obtains this traffic statistics error correction values;
B133, triggers and obtains the of that month connection traffic information of this user from the carrier server that current dial-up connection is corresponding;
B134, calculates the difference of of that month connection traffic and current connection traffic local traffic log log file and other the flow sums connected except current connection obtained from operator;
B135, stores described difference or upgrades the traffic statistics error correction values the traffic statistics error correction values of acquisition renewal that store by difference.
A device for early warning flow, this device comprises: 3G connection detection module, traffic log logging modle, flow rate calculation module and flow warning module, wherein,
3G connection detection module, for determining that the current connection of Client-initiated is that 3G connects, starts 3G surfing flow warning function;
Traffic log logging modle, for after startup 3G surfing flow warning function, records current connection traffic information in the local traffic log log file pre-set;
Flow rate calculation module, for calculating of that month total flow according to local traffic log log file;
Flow warning module, for determining that the of that month total flow calculated exceedes the threshold value pre-set, the flow prediction policy according to pre-setting notifies user.
Comprise further:
Flow correction module, traffic statistics error correction values whether is stored for query flows logger module, if determine not store or store and the time difference of the temporal information and current time information that store flow statistical error correction value is greater than the time threshold pre-set, trigger and obtain the of that month connection traffic information of this user from the carrier server that current dial-up connection is corresponding, calculate the difference of of that month connection traffic and connection traffic current traffic log logging modle and other the flow sums connected except current connection obtained from operator, store this difference or upgrade the traffic statistics error correction values stored by difference.
Described flow warning module comprises: flow early warning threshold unit and monthly package flow rated value threshold unit, wherein,
Flow early warning threshold unit, for exceeding the flow early warning threshold values pre-set in the of that month total flow determining to calculate, when current closedown connects to user's output flow early warning information;
Monthly package flow rated value threshold unit, for being equal to or greater than monthly package flow rated value threshold values in the of that month total flow determining to calculate, exhausts early warning information to user's amount of exports definite value in real time.
As seen from the above technical solutions, the method for a kind of early warning flow that the embodiment of the present invention provides and device, determine that the current connection of Client-initiated is that 3G connects, start 3G surfing flow warning function; In the local traffic log log file pre-set, record current connection traffic information, and calculate of that month total flow according to local traffic log log file; Determine that the of that month total flow calculated exceedes the threshold value pre-set, the flow prediction policy according to pre-setting notifies user.Like this, user, in upper network process, can know by the flow prediction policy pre-set whether present flow rate reaches the threshold value pre-set in time, avoids user to surpass flow online, avoids the campus network outside amount paid, thus reduce user overhead information.
Accompanying drawing explanation
Fig. 1 is the method flow schematic diagram of embodiment of the present invention early warning flow.
Fig. 2 is the method idiographic flow schematic diagram of embodiment of the present invention early warning flow.
Fig. 3 is the apparatus structure schematic diagram of embodiment of the present invention early warning flow.
Embodiment
For making the object, technical solutions and advantages of the present invention clearly, the present invention is described in further detail below in conjunction with the accompanying drawings and the specific embodiments.
In the embodiment of the present invention, by arranging monthly package rated value threshold values and flow early warning threshold values, when the flow that user uses reaches flow early warning threshold values, provide the flow early warning information of mark residual flow to user when connection closed; And when the flow that user uses reaches monthly package rated value threshold values, provide the mark flow early warning information that flow has been finished using to user in real time, thus reduce the possibility of the campus network outside user's amount paid.
Fig. 1 is the method flow schematic diagram of embodiment of the present invention early warning flow.See Fig. 1, this flow process comprises:
Step 101, determines that the current connection of Client-initiated is that 3G connects, starts 3G surfing flow warning function;
In this step, determine that the current connection of Client-initiated is that 3G connection comprises:
A1, monitor user ' online dial-up connection, extracts the dial-up connection information of carrying in Client-initiated dial-up connection request;
In this step, dial-up connection information comprise dialing protocol information and/or, dialing equipment name information.User is when carrying out dial-up connection, client will according to dial-up connection information, inquire about the mapping table of each dial-up connection and the dialing protocol prestored, obtain the dialing protocol information that current dial-up connection maps, and/or, inquiry obtains the name information of the dialing equipment carrying out this dial-up connection, and is carried in dial-up connection request.Flow warning module monitors user and carries out online dial-up connection, obtains Client-initiated dial-up connection request, extracts the dial-up connection information of carrying in dial-up connection request.
A2, the dial-up connection information extracted according to the filter rule match pre-set, if the match is successful, determine that current connection is that 3G connects.
In this step, be provided with in the filtering rule pre-set mark 3G connect 3G protocol information and/or, 3G device name information.Filtering rule can be issued by server or be arranged by person skilled.
By the dial-up connection information of extraction being mated with the filtering rule pre-set, can determine whether the current connection of this Client-initiated is that 3G connects.Such as, when the dialing protocol carried in connection request is the 3G agreement a period of time arranged in filtering rule, determine the current connection of this Client-initiated be 3G connect and/or, when the dialing equipment name of carrying in connection request is called the 3G device name a period of time arranged in filtering rule, determine that the current connection of this Client-initiated is that 3G connects.
Preferably, when monitor user ' online dial-up connection, monitor the newly-built and dial-up connection interrupt event of dial-up connection simultaneously.
Start 3G surfing flow warning function to comprise:
Whether A11, inquiry 3G surfing flow warning function opened, if opened, performed steps A 12, if do not opened, performed steps A 13;
In this step, when user initiates 3G connection at every turn, by inquiring about the local traffic log log file pre-set, if store traffic log information in local traffic log log file, then determine that 3G surfing flow warning function was opened; If local traffic log log file is empty, then determine not open 3G surfing flow warning function.
A12, arranges and starts the early warning of 3G surfing flow;
A13, exports the information of opening 3G surfing flow warning function to user;
In this step, client determines that the current connection of user is that 3G connects and do not open 3G surfing flow warning function, exports information to user, to point out user whether to open 3G surfing flow warning function, if user determines to open, then performs steps A 14.
A14, receives user arranges menu output flow early-warning parameters according to the 3G flow warning function of showing, arranges and start 3G surfing flow warning function.
In this step, if user determines to open 3G surfing flow warning function, then export to user and show that 3G flow warning function arranges menu, activated user arranges corresponding discharge early-warning parameters, such as, arrange monthly package flow rated value, monthly package flow rated value threshold values, flow early warning threshold values and flow prediction policy, the mode of setting can be that the mode of progressively navigating guides user to arrange.
Monthly package flow rated value is the flow value that in the monthly package of customization, operator specifies, such as, the monthly package of the 1G/ month of customization 5 yuan, then monthly package flow rated value is 1G.
Flow early warning threshold values is the flow value in order to carry out flow early warning in real time that user is arranged, such as, such as, if user's monthly package flow rated value is 1G, then can set monthly package flow rated value threshold values is 99.9% of monthly package flow rated value, i.e. 0.999G, flow early warning threshold values is 90% of monthly package flow rated value, i.e. 0.9G.Certainly, in practical application, multiple flow early warning threshold values also can be set.
Flow prediction policy is the mode in order to reminding user that user is arranged, such as, when reaching flow early warning threshold values for user's use traffic, be arranged on each closedown to user's output flow early warning information when connecting, flow early warning information comprises: of that month remaining flow information; And when monthly package flow rated value threshold values is reached for user's use traffic, arrange and in real time exhaust early warning information to user's amount of exports definite value and exhaust with the monthly package flow rated value of reminding user, be convenient to user and determine whether close current connection with the traffic overhead outside savings.Certainly, in practical application, the flow prediction policy of other modes also can be set, such as, when flow early warning threshold values is reached for user's use traffic, also can arrange every the time threshold pre-set to user's output flow early warning information; And when user's use traffic is slightly smaller than monthly package flow rated value, such as, 1000000, early warning information is exhausted in real time, subsequently, when user continues current connection to user's amount of exports definite value, super flow early warning information is exported to user when being arranged on connection closed, super flow early warning information comprises: the flow information exceeded this month, further, can also comprise the cost information that the flow that exceeds is corresponding.
In the embodiment of the present invention, by pre-setting the filtering rule comprising the information such as dialing protocol, dialing equipment title, combination filtration is carried out to the card of surfing Internet that user uses, to identify whether the dial-up connection of user's current network is 3G online dial-up connection, if, adopt the method for the flow early warning of the embodiment of the present invention, if other dial-up connection, such as, asymmetric digital subscriber line (ADSL, Asymmetric DigitalSubscriber Line) dialup connection, then adopt prior art.
In practical application, filtering rule can carry out propelling movement by the website of operator and upgrade, and like this, can respond fast and support new 3G card of surfing Internet equipment.
After belonging to 3G card of surfing Internet mobile Internet access user by detection Internet user, 3G flow warning function is opened to this kind of user reminding, after confirmation user never opened 3G surfing flow warning function, prompting user sets 3G card of surfing Internet flow early-warning parameters, after the setting of flow early-warning parameters, when user adopts 3G card of surfing Internet to surf the Net, recording user connection traffic information, detected in real time and the mechanism of early warning in conjunction with current connection traffic by historical traffic statistics, by the of that month bandwidth usage of information prompting user, remaining bandwidth number, each connection use traffic etc., user is allowed to grasp clear for the 3G surfing flow situation of oneself, thus extra-pay can not be paid because exceeding the quata use traffic.
Step 102, records current connection traffic information, and calculates of that month total flow according to local traffic log log file in the local traffic log log file pre-set;
This step specifically comprises:
B11, monitor current connection, current connection traffic information is write in the local traffic log log file pre-set;
In this step, connection traffic information comprises: this connects the flow information, connection identifier (ID) information that use, certainly, in practical application, for the situation of user's monthly payment in limited time not limit flow, such as, monthly 20 hours, 40 hours or 60 hours, can also be recorded this and connect the information such as time started, this connection current time.
The time cycle that B12, basis pre-set calculates the current connection traffic information in the local traffic log log file writing and pre-set;
In this step, the time cycle pre-set can be determined as required, such as, when user's use traffic does not reach flow early warning threshold values, arrange and calculated current connection traffic information every 30 minutes, 1 hour etc., this namely reading up-to-date storage in local traffic log log file connects the flow information used.
B13, obtain store in local traffic log log file except current connection other connect flow informations;
In this step, if user starts 3G surfing flow warning function when carrying out 3G connection, then in the local traffic log log file of client, record each connection traffic information connected, client adds up the connection traffic information of each connection before current connection.
Certainly, in practical application, in the local traffic log log file of client, also can arrange and store history connection traffic information, for adding up other flow informations connected except current connection, after current connection closed, after current connection traffic information being added with history connection traffic information, upgrade the history connection traffic information stored.Like this, when other flow informations connected obtained except current connection, only need to read the history connection traffic information stored.
B14, according to current connection traffic and the of that month total flows of other flow rate calculation connected except current connection.
In this step, current connection traffic is added with other flows connected except current connection and obtains of that month total flow.Like this, when 3G flow warning function is run, the connection traffic information of of that month current connection is obtained by the historical record stored in local traffic log log file, and the connection traffic information that each connection identifier of statistics except current connection has used, the connection traffic that each connection identifier added except current connection with the connection traffic of the current connection of real-time statistics has used, calculates the of that month total flow used.
In practical application, 3G flow warning function is not started because 3G card of surfing Internet may be applied in different clients or between the 3G card of surfing Internet operating period by user, there is certain deviation in the actual use total flow that the connection traffic information recorded in local traffic log log file may be provided with mobile operator, therefore, in the case, need to carry out the process of traffic statistics error correction.
The situation causing traffic statistics error to occur specifically comprises following three kinds of scenes:
One, user used this 3G card of surfing Internet accesses network, and used a part of flow this month before enabling 3G card of surfing Internet flow warning function.
Two, user is after unlatching 3G card of surfing Internet flow warning function, the 3G card of surfing Internet flow warning function that the embodiment of the present invention of stopping using for some time provides, and between this lay-off period, use this 3G card of surfing Internet to create dial-up connection, and employ subnetwork flow.
Three, user is after unlatching 3G card of surfing Internet flow warning function, this 3G card of surfing Internet is connected to other computer, and produced subnetwork flow.
In these situations above, when these flows produce, for first two scene, owing to not starting flow warning function, connection traffic information is not written in local traffic log log file; And for the third scene, the connection traffic information produced is respectively written in the local traffic log log file of different clients, thus, there is deviation in the statistic flow data causing the 3G surfing flow of cumulative calculation in the local traffic log log file of client and physical operator to provide.
Based on this, embodiments provide traffic statistics value debugging functions, specifically comprise:
In step B13, comprise further:
B131, inquire about in local traffic log log file and whether store traffic statistics error correction values, if to store and the time difference of the temporal information and current time information that store flow statistical error correction value is not more than the time threshold pre-set, perform step B132, otherwise, perform step B133;
In this step, time threshold can be arranged as required, such as, the flow used is less than to the situation of flow early warning threshold values, and what time threshold can be arranged was slightly longer, as five days; And the situation of flow early warning threshold values is greater than for the flow used, what arranged by time threshold was slightly shorter, as one day etc.
B132, obtains this traffic statistics error correction values;
B133, triggers and obtains the of that month connection traffic information of this user from the carrier server that current dial-up connection is corresponding;
In this step, user by access respective operator server, can obtain the traffic statistics provided, i.e. the of that month connection traffic information of this user.
B134, calculates the difference of of that month connection traffic and current connection traffic local traffic log log file and other the flow sums connected except current connection obtained from operator;
B135, upgrades the traffic statistics error correction values the traffic statistics error correction values of acquisition renewal that store by difference.
In this step, if do not store traffic statistics error correction values in local traffic log log file, this difference is stored, and record stores the temporal information of flow statistical error correction value; If store traffic statistics error correction values in local traffic log log file, then replace the traffic statistics error correction values stored by this difference, and upgrade corresponding temporal information.
Step B14 is:
According to the traffic statistics error correction values obtained, current connection traffic and the of that month total flow of other flow rate calculation connected except current connection.
In this step, traffic statistics error correction values, current connection traffic are added with other flows connected except current connection and obtain of that month total flow.Like this, by the flow that traffic statistics error correction values correction this month occurs, and this correction value is stored in this month traffic statistics, guarantee that the cumulative data of each connection statistics that current connection is later can be revised according to this correction value, to guarantee that the calculating of of that month total flow effectively, accurately.
Step 103, determine that the of that month total flow calculated exceedes the threshold value pre-set, the flow prediction policy according to pre-setting notifies user.
In this step, the threshold value pre-set comprises: flow early warning threshold values and monthly package flow rated value threshold values.
Flow prediction policy according to pre-setting notifies that user comprises:
If the of that month total flow calculated exceedes flow early warning threshold values, when current closedown connects to user's output flow early warning information;
If the of that month total flow calculated is equal to or greater than monthly package flow rated value threshold values, exhaust early warning information to user's amount of exports definite value in real time.
In practical application, flow early warning information and rated value exhaust early warning information can eject information dialog box mode reminding user by the lower right corner, such as, the rated value ejected exhausts early warning information in order to the current use traffic of reminding user close to monthly package flow rated value, for avoiding producing extra campus network, suggestion user is confirmed whether that residual flow uses in addition.
Like this, when the total flow used this month reaches flow early warning threshold values, when current connection closed, eject flow early warning information with the flow of reminding user remaining bandwidth, user is allowed to obtain service condition to network traffics, and when the total flow used this month reaches monthly package flow rated value threshold values, exhausting early warning information to remind flow to user's amount of exports definite value in real time has used, thus be convenient to user's decision and whether close current connection with savings external flux expense.
Fig. 2 is the method idiographic flow schematic diagram of embodiment of the present invention early warning flow.See Fig. 2, this flow process comprises:
Step 201 is that 3G connects according to the current connection of filtering rule determination Client-initiated pre-set;
Step 202, starts 3G surfing flow warning function;
Step 203, loads historical traffic record and this month traffic statistics error correction values;
In this step, historical traffic is recorded as other the discharge record information connected except current connection, namely all dial-up connection flows disconnected loading this month from local traffic log log file use record, carry out calculating historical traffic, simultaneously according to this month traffic statistics error correction values correction order historical traffic.
Step 204, adds up current connection traffic, and calculates of that month total flow;
In this step, read the flow service condition of current connection according to the time cycle pre-set, the corrected historical traffic calculated with step 203, obtain the of that month flow used, i.e. of that month total flow.
Step 205, determines that the of that month total flow calculated exceedes the threshold value pre-set, exports information to user;
In this step, according to this month total flow that step 204 calculates in real time, compare with the threshold value pre-set, judge whether to exceed threshold values, if exceed threshold values, then export information with reminding user to user.
Threshold value comprises: flow early warning threshold values and monthly package flow rated value threshold values, accordingly, information comprises: flow early warning information and rated value exhaust early warning information.
Step 206, confirms current connection closed, preserves this connection traffic information.
In this step, after user closes dial-up connection, this flow service condition connected, by monitoring connection closed event, is recorded in local traffic log log file by flow warning module.
From above-mentioned, the method for the early warning flow of the embodiment of the present invention, determines that the current connection of Client-initiated is that 3G connects, starts 3G surfing flow warning function; In the local traffic log log file pre-set, record current connection traffic information, and calculate of that month total flow according to local traffic log log file; Determine that the of that month total flow calculated exceedes the threshold value pre-set, the flow prediction policy according to pre-setting notifies user.Like this, user is in upper network process, can know whether present flow rate reaches default monthly package rated value threshold value in time by flow early warning information, so that when use traffic reaches monthly package rated value threshold value, can stop in time connecting, avoid user to surpass flow online, avoid the campus network outside amount paid, thus reduce user overhead information.
Fig. 3 is the apparatus structure schematic diagram of embodiment of the present invention early warning flow.See Fig. 3, this device comprises: 3G connection detection module, traffic log logging modle, flow rate calculation module and flow warning module, wherein,
3G connection detection module, for determining that the current connection of Client-initiated is that 3G connects, starts 3G surfing flow warning function;
Traffic log logging modle, for after startup 3G surfing flow warning function, records current connection traffic information in the local traffic log log file pre-set;
Flow rate calculation module, for calculating of that month total flow according to local traffic log log file;
Flow warning module, for determining that the of that month total flow calculated exceedes the threshold value pre-set, the flow prediction policy according to pre-setting notifies user.
Preferably, comprise further:
Flow correction module, traffic statistics error correction values whether is stored for query flows logger module, if determine not store or store and the time difference of the temporal information and current time information that store flow statistical error correction value is greater than the time threshold pre-set, trigger and obtain the of that month connection traffic information of this user from the carrier server that current dial-up connection is corresponding, calculate the difference of of that month connection traffic and connection traffic current traffic log logging modle and other the flow sums connected except current connection obtained from operator, store this difference or upgrade the traffic statistics error correction values stored by difference.
Flow warning module comprises: flow early warning threshold unit and monthly package flow rated value threshold unit (not shown), wherein,
Flow early warning threshold unit, for exceeding the flow early warning threshold values pre-set in the of that month total flow determining to calculate, when current closedown connects to user's output flow early warning information;
Monthly package flow rated value threshold unit, for being equal to or greater than monthly package flow rated value threshold values in the of that month total flow determining to calculate, exhausts early warning information to user's amount of exports definite value in real time.
The foregoing is only preferred embodiment of the present invention, be not intended to limit protection scope of the present invention.Within the spirit and principles in the present invention all, any amendment done, equivalent replacement and improvement etc., all should be included within protection scope of the present invention.
Claims (13)
1. a method for early warning flow, is characterized in that, the method comprises:
Determine that the current connection of Client-initiated is that 3G connects, start 3G surfing flow warning function;
Current connection traffic information is recorded in the local traffic log log file pre-set, and calculate of that month total flow according to local traffic log log file, specifically comprise: monitor current connection, current connection traffic information is write in the local traffic log log file pre-set; The current connection traffic information in the local traffic log log file writing and pre-set is calculated according to the time cycle pre-set; Obtain other flow informations connected except current connection stored in local traffic log log file; According to current connection traffic and the of that month total flow of other flow rate calculation connected except current connection; Determine that the of that month total flow calculated exceedes the threshold value pre-set, the flow prediction policy according to pre-setting notifies user;
The described threshold value pre-set comprises: flow early warning threshold values and monthly package flow rated value threshold values, and described flow prediction policy comprises:
When user's use traffic is not less than flow early warning threshold values, when each closedown connects to user's output flow early warning information, described flow early warning information comprises of that month remaining flow information;
When user's use traffic exceedes monthly package flow rated value threshold values, the rated value that the monthly package flow rated value exporting reminding user to user has in real time exhausted exhausts early warning information.
2. the method for claim 1, is characterized in that, described determine the current connection of Client-initiated be 3G connect comprise:
Monitor user ' online dial-up connection, extracts the dial-up connection information of carrying in Client-initiated dial-up connection request;
According to the dial-up connection information that the filter rule match pre-set extracts, if the match is successful, determine that current connection is that 3G connects.
3. method as claimed in claim 2, is characterized in that, described dial-up connection information comprise dialing protocol information and/or, dialing equipment name information.
4. method as claimed in claim 3, is characterized in that, described in be provided with in the filtering rule that pre-sets 3G protocol information that mark 3G connects and/or, 3G device name information.
5. the method for claim 1, is characterized in that, described startup 3G surfing flow warning function comprises:
Whether A11, inquiry 3G surfing flow warning function opened, if opened, performed steps A 12, if do not opened, performed steps A 13;
A12, arranges and starts the early warning of 3G surfing flow;
A13, exports the information of opening 3G surfing flow warning function to user;
A14, receives user arranges menu output flow early-warning parameters according to the 3G flow warning function of showing, arranges and start 3G surfing flow warning function.
6. method as claimed in claim 5, it is characterized in that, described flow early-warning parameters comprises: monthly package flow rated value, monthly package flow rated value threshold values, flow early warning threshold values and flow prediction policy.
7. method as claimed in claim 6, it is characterized in that, described flow prediction policy also comprises:
When user continues current connection after amount of exports definite value exhausts early warning information, export super flow early warning information when connection closed to user, described super flow early warning information comprises the flow information exceeded this month.
8. the method according to any one of claim 1 to 7, is characterized in that, described connection traffic information comprises: this connects the flow information and connection identifier information that use.
9. method as claimed in claim 8, it is characterized in that, described connection traffic information comprises further: this connects the time started, this connects current time and this connects the end time.
10. method as claimed in claim 9, it is characterized in that, other flow informations connected except current connection stored in described acquisition local traffic log log file comprise further: obtain the traffic statistics error correction values stored in local traffic log log file;
Described of that month total flows of flow rate calculation according to current connection traffic and other connections except current connection are: according to traffic statistics error correction values, current connection traffic and the of that month total flows of other flow rate calculation connected except current connection.
11. methods as claimed in claim 10, is characterized in that, obtain described traffic statistics error correction values and comprise:
B131, inquire about in local traffic log log file and whether store traffic statistics error correction values, if to store and the time difference of the temporal information and current time information that store flow statistical error correction value is not more than the time threshold pre-set, perform step B132, otherwise, perform step B133;
B132, obtains this traffic statistics error correction values;
B133, triggers and obtains the of that month connection traffic information of this user from the carrier server that current dial-up connection is corresponding;
B134, calculates the difference of of that month connection traffic and current connection traffic local traffic log log file and other the flow sums connected except current connection obtained from operator;
B135, stores described difference or upgrades the traffic statistics error correction values the traffic statistics error correction values of acquisition renewal that store by difference.
The device of 12. 1 kinds of early warning flows, is characterized in that, this device comprises: 3G connection detection module, traffic log logging modle, flow rate calculation module and flow warning module, wherein,
3G connection detection module, for determining that the current connection of Client-initiated is that 3G connects, starts 3G surfing flow warning function;
Traffic log logging modle, for after startup 3G surfing flow warning function, records current connection traffic information in the local traffic log log file pre-set;
Flow rate calculation module, for calculating of that month total flow according to local traffic log log file, specifically comprises: calculate the current connection traffic information in the local traffic log log file writing and pre-set according to the time cycle pre-set; Obtain other flow informations connected except current connection stored in local traffic log log file; According to current connection traffic and the of that month total flow of other flow rate calculation connected except current connection;
Flow warning module, for determining that the of that month total flow calculated exceedes the threshold value pre-set, the flow prediction policy according to pre-setting notifies user;
Described flow warning module comprises: flow early warning threshold unit and monthly package flow rated value threshold unit, wherein,
Flow early warning threshold unit, for exceeding the flow early warning threshold values pre-set in the of that month total flow determining to calculate, when current closedown connects to user's output flow early warning information;
Monthly package flow rated value threshold unit, for being equal to or greater than monthly package flow rated value threshold values in the of that month total flow determining to calculate, exhausts early warning information to user's amount of exports definite value in real time.
13. devices as claimed in claim 12, is characterized in that, comprise further:
Flow correction module, traffic statistics error correction values whether is stored for query flows logger module, if determine not store or store and the time difference of the temporal information and current time information that store flow statistical error correction value is greater than the time threshold pre-set, trigger and obtain the of that month connection traffic information of this user from the carrier server that current dial-up connection is corresponding, calculate the difference of of that month connection traffic and connection traffic current traffic log logging modle and other the flow sums connected except current connection obtained from operator, store this difference or upgrade the traffic statistics error correction values stored by difference.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201110269276.6A CN103002466B (en) | 2011-09-13 | 2011-09-13 | Traffic warning method and traffic warning device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201110269276.6A CN103002466B (en) | 2011-09-13 | 2011-09-13 | Traffic warning method and traffic warning device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103002466A CN103002466A (en) | 2013-03-27 |
CN103002466B true CN103002466B (en) | 2015-07-15 |
Family
ID=47930496
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201110269276.6A Active CN103002466B (en) | 2011-09-13 | 2011-09-13 | Traffic warning method and traffic warning device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103002466B (en) |
Families Citing this family (29)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9544203B2 (en) | 2013-04-27 | 2017-01-10 | Tencent Technology (Shenzhen) Company Limited | Mobile terminal flow identification method and apparatus |
CN104125600B (en) * | 2013-04-27 | 2016-03-02 | 腾讯科技(深圳)有限公司 | The method for recognizing flux of mobile terminal and device |
CN104349340B (en) * | 2013-07-29 | 2018-08-28 | 腾讯科技(深圳)有限公司 | The surfing flow monitoring method and device of mobile terminal |
CN104703163B (en) * | 2013-12-06 | 2018-05-29 | 中国电信股份有限公司 | Terminal online residual flow method for real-time monitoring and traffic monitoring server |
CN110324793B (en) | 2014-04-18 | 2022-09-02 | 华为技术有限公司 | Information reminding method and device and electronic terminal |
CN105101302B (en) * | 2014-04-30 | 2019-03-08 | 宇龙计算机通信科技(深圳)有限公司 | Flow managing method and system based on user's use habit |
CN103957500B (en) * | 2014-05-08 | 2017-09-26 | 中国联合网络通信集团有限公司 | Customer flow based reminding method and device |
CN105101138A (en) * | 2014-05-23 | 2015-11-25 | 宇龙计算机通信科技(深圳)有限公司 | Method and system for controlling traffic, and terminal |
CN104010281A (en) * | 2014-05-30 | 2014-08-27 | 可牛网络技术(北京)有限公司 | Hinting method and device of mobile equipment traffic |
CN104023326A (en) * | 2014-06-17 | 2014-09-03 | 北京奇虎科技有限公司 | Flow excess reminding method and device |
CN104105052B (en) * | 2014-06-30 | 2017-09-29 | 联想(北京)有限公司 | A kind of information processing method and electronic equipment |
CN105490822B (en) * | 2014-10-10 | 2019-08-02 | 中国移动通信集团公司 | A kind of charging method and device of flow |
WO2016061566A1 (en) * | 2014-10-17 | 2016-04-21 | Seven Networks, Llc | Collaborative policy management strategies at a mobile device |
CN104579794B (en) * | 2015-01-27 | 2019-02-19 | 新华三技术有限公司 | Query facility fault detection method and device |
CN104735699B (en) * | 2015-03-10 | 2018-09-18 | Tcl移动通信科技(宁波)有限公司 | A kind of data traffic monitoring method, system and mobile terminal based on mobile terminal |
CN104936221B (en) * | 2015-06-04 | 2016-11-16 | 北京奇虎科技有限公司 | The method and device of data in mobile terminal flow monitoring |
CN105554713A (en) * | 2015-12-11 | 2016-05-04 | 小米科技有限责任公司 | Method and device for reminding flow |
CN107295539A (en) * | 2016-03-30 | 2017-10-24 | 中国移动通信集团江苏有限公司 | A kind of surfing flow service condition method for pushing and device |
CN105848130A (en) * | 2016-05-20 | 2016-08-10 | 深圳市金立通信设备有限公司 | Data traffic management method and terminal |
CN106211227A (en) * | 2016-08-31 | 2016-12-07 | 迈普通信技术股份有限公司 | Flow method for early warning and the network equipment |
CN108809744A (en) * | 2017-05-03 | 2018-11-13 | 百度在线网络技术(北京)有限公司 | Traffic monitoring management method and device |
CN107231651B (en) * | 2017-07-28 | 2020-09-22 | 惠州Tcl移动通信有限公司 | Traffic monitoring and alarming method of mobile terminal, storage device and mobile terminal |
CN108012258B (en) * | 2017-11-29 | 2021-02-09 | 北京小米移动软件有限公司 | Data traffic management method and device for virtual SIM card, terminal and server |
CN110852740A (en) * | 2019-11-18 | 2020-02-28 | 中国银行股份有限公司 | Payment amount early warning method for multi-currency capital pool and related device |
CN111385149A (en) * | 2020-03-07 | 2020-07-07 | 深圳市中天网景科技有限公司 | Internet of things card early warning method, device, equipment and medium for connection management platform |
CN112423288B (en) * | 2020-10-28 | 2024-03-15 | 深圳市广和通无线股份有限公司 | Dialing analysis method, device, computer equipment and storage medium |
CN113641634B (en) * | 2021-07-07 | 2022-07-26 | 荣耀终端有限公司 | Method for controlling log flow and electronic equipment |
CN114338930B (en) * | 2021-12-30 | 2022-10-11 | 广州爱浦路网络技术有限公司 | Ticket information processing method, computer device and storage medium |
CN114554431B (en) * | 2022-02-16 | 2024-02-06 | 武汉纵拓信息技术有限公司 | Short video flow use early warning system and method based on big data |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101854649A (en) * | 2010-05-20 | 2010-10-06 | 中兴通讯股份有限公司 | Mobile terminal and method and device for monitoring Internet surfing data traffic of mobile terminal |
CN101977365A (en) * | 2010-11-16 | 2011-02-16 | 北京瓦力网络科技有限公司 | Method and system for indicating residual mobile phone Internet traffic |
CN102006576A (en) * | 2010-12-08 | 2011-04-06 | 东莞宇龙通信科技有限公司 | Method and system for displaying surfing flow and mobile terminal |
-
2011
- 2011-09-13 CN CN201110269276.6A patent/CN103002466B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101854649A (en) * | 2010-05-20 | 2010-10-06 | 中兴通讯股份有限公司 | Mobile terminal and method and device for monitoring Internet surfing data traffic of mobile terminal |
CN101977365A (en) * | 2010-11-16 | 2011-02-16 | 北京瓦力网络科技有限公司 | Method and system for indicating residual mobile phone Internet traffic |
CN102006576A (en) * | 2010-12-08 | 2011-04-06 | 东莞宇龙通信科技有限公司 | Method and system for displaying surfing flow and mobile terminal |
Also Published As
Publication number | Publication date |
---|---|
CN103002466A (en) | 2013-03-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103002466B (en) | Traffic warning method and traffic warning device | |
CN102668458B (en) | System and method for reporting packet characteristics in a network environment | |
CN101883178A (en) | Method and system for automatically timing and metering during surfing Internet with cell phone on basis of cell phone terminal | |
CN106911483A (en) | A kind of charging method based on block chain and cloud computing platform | |
CN103166767B (en) | Charging and band width control method, entity and system | |
WO2019051948A1 (en) | Method, apparatus, server, and storage medium for processing monitoring data | |
CN102547227B (en) | The method for transmission processing of video monitoring file and system | |
CN108243404A (en) | Ratification method, device and the equipment of phone number binding state | |
CN102497379A (en) | Network access method, system and equipment | |
RU2009117636A (en) | PAYMENT CHARGES IN SPECIALIZED NETWORKS | |
CN108076477A (en) | A kind of data traffic monitoring method, apparatus and system | |
CN108401231A (en) | A kind of charging method, device and system | |
CN110381222B (en) | Method and device for determining mobile service state | |
CN101621758B (en) | Service container system for SP/CP | |
CN111988749B (en) | Dynamic tariff generation method and device | |
JP2006505228A (en) | Billing method in flat-rate communication system | |
CN102255734A (en) | Charging method of content business, apparatus and system thereof | |
JPH11212785A (en) | Method and system for software use management | |
CN100379199C (en) | Method and system for construction and communication of data on network access and service transactions in a telecommunication network | |
CN111132048B (en) | Fee sending method, device, equipment and storage medium based on flow use | |
CN112153585B (en) | Charging system, method, storage medium and electronic device | |
CN109428732A (en) | A kind of call bill processing method and equipment | |
CN108270580B (en) | Reminding method, device and system for online charging | |
CN107846288A (en) | For realizing the methods, devices and systems of charging | |
CN101753723B (en) | Method and device for handling service bill |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant |