CN109286506B - Method, system and device for charging flow - Google Patents
Method, system and device for charging flow Download PDFInfo
- Publication number
- CN109286506B CN109286506B CN201811307340.3A CN201811307340A CN109286506B CN 109286506 B CN109286506 B CN 109286506B CN 201811307340 A CN201811307340 A CN 201811307340A CN 109286506 B CN109286506 B CN 109286506B
- Authority
- CN
- China
- Prior art keywords
- user
- information
- address
- successfully matched
- flow
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 31
- 238000013475 authorization Methods 0.000 claims abstract description 31
- 230000004044 response Effects 0.000 claims description 10
- 238000013519 translation Methods 0.000 claims description 9
- 238000012545 processing Methods 0.000 claims description 6
- 238000004891 communication Methods 0.000 abstract description 5
- 238000010586 diagram Methods 0.000 description 5
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 230000003993 interaction Effects 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 2
- 239000000284 extract Substances 0.000 description 2
- 238000006467 substitution reaction Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 1
- 238000012856 packing Methods 0.000 description 1
- 230000011664 signaling Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/02—Details
- H04L12/14—Charging, metering or billing arrangements for data wireline or wireless communications
- H04L12/1403—Architecture for metering, charging or billing
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/08—Network architectures or network communication protocols for network security for authentication of entities
- H04L63/0892—Network architectures or network communication protocols for network security for authentication of entities by using authentication-authorization-accounting [AAA] servers or protocols
Abstract
The invention discloses a method, a system and a device for charging flow, and relates to the technical field of communication. The invention sets a flow charging device in the flow charging system, after the user passes the authentication and the online is successful, the user information is collected and sent to the flow charging device by the authorization and charging server AAA, the broadband network gateway BNG collects the real-time flow information of the user in real time and sends the real-time flow information to the flow charging device, so that the flow charging device generates the charging information of the user based on the user information and the real-time flow information of the user, thereby the user flow charging can be efficiently and accurately carried out on the premise of not influencing the prior service.
Description
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method, a system, and an apparatus for charging traffic.
Background
With the increasing maturity and popularization of internet applications and the demand of users for high-speed wireless access, home and abroad operators are developing broadband services vigorously, and how to effectively grasp and manage the user access situation in real time and carry out reasonable charging becomes an important issue.
At present, a Broadband Network Gateway (BNG) and an authorization and Accounting server (AAA) are mainly used in a Broadband user access technology to implement user traffic Accounting, and specifically, a time duration or month/year per package charging mode may be used, where the time duration-based charging is to charge a user according to the internet access time of the user, and the month/year per package charging mode is to charge a fixed fee to the user once per month/year. Or the user based on the flow accounting reports the user flow information to the AAA Server regularly through a Remote Authentication Dial In Service (RADIUS) protocol according to the flow generated by the Broadband Remote Access Server (BRAS) device according to the user internet Access Service, and the AAA Server generates the accounting information according to the accounting policy to perform accounting.
However, in the mainstream month/year packing manner, if the user uses network resources or only uses few network resources in one month/year, the user cannot enjoy preferential or reduced charges. In addition, a time length charging mode is adopted, the charging of the user is started after the user is connected with the network, the charging is stopped until the user actively puts the account down, and if the user forgets to put the account down after using the network, the time is always calculated, so that certain economic loss of the user is caused. If the statistical time interval of the periodically reported user flow information by the RADIUS protocol is large, the accuracy is not enough due to the charging delay, if the reporting interval is reduced, the AAA server and the BNG are frequently interacted, and due to the performance bottleneck of the AAA server, the problem of incomplete or repeated charging is often received, which causes charging errors, and in addition, the frequent reporting also excessively consumes BNG resources and performance, which affects normal services.
Disclosure of Invention
Embodiments of the present invention provide a method, a system, and a device for charging traffic, which can efficiently and accurately charge user traffic without affecting existing services.
In order to achieve the above object, an embodiment of the present invention provides a traffic charging method, which is applied to a traffic charging system, and the method includes:
after the user is successfully online, the authorization and accounting server AAA acquires user information and sends the user information to a flow accounting device, wherein the user information includes: time, user account, public network IP, private network IP and network address translation NAT port number;
after a user accesses a service, a Broadband Network Gateway (BNG) collects user real-time flow information of the user and sends the user real-time flow information to a flow charging device, wherein the user real-time flow information comprises: time, user account number, source IP address, source port number, destination IP address, destination port number and data byte number;
and the flow accounting device receives and generates the accounting information of the user according to the user information sent by the authorization and accounting server AAA and the user real-time flow information sent by the broadband network gateway BNG.
Correspondingly, the embodiment of the invention also provides a flow accounting system, which comprises an authorization and accounting server AAA, a broadband network gateway BNG and a flow accounting device;
the authorization and accounting server AAA is used for acquiring user information and sending the user information to the flow accounting device after the user is successfully online, wherein the user information comprises: time, user account, public network IP, private network IP and network address translation NAT port number;
the broadband network gateway BNG is used for acquiring the user real-time flow information of a user after the user accesses services, and sending the user real-time flow information to a flow charging device, wherein the user real-time flow information comprises: time, user account number, source IP address, source port number, destination IP address, destination port number and data byte number;
and the flow accounting device is used for receiving and generating the accounting information of the user according to the user information sent by the authorization and accounting server AAA and the user real-time flow information sent by the broadband network gateway BNG.
Correspondingly, the embodiment of the invention also provides a flow charging device, which comprises a receiving module, a data processing module and a charging module;
a receiving module, configured to receive user information sent by an authorization and accounting server AAA and user real-time traffic information sent by a broadband network gateway BNG, where the user real-time traffic information includes: time, user account number, source IP address, source port number, destination IP address, destination port number and data byte number;
the data processing module is used for matching the user information with the user real-time flow information according to a flow calculation rule, and calculating to obtain the flow of the user, wherein the user information comprises: time, user account, public network IP, private network IP and network address translation NAT port number;
and the charging module is used for generating the charging information of the user according to the charging rule and the flow of the user.
The invention collects and sends the user information to the flow accounting device by the authorization and accounting server AAA after the user is successfully on line, the broadband network gateway BNG collects the real-time flow information of the user in real time and sends the information to the flow accounting device, and the flow accounting device generates the accounting information of the user according to the user information and the real-time flow information of the user, thereby efficiently and accurately carrying out the user flow accounting on the premise of not influencing the prior service.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a signaling flow diagram of a traffic charging method according to an embodiment of the present invention;
fig. 2 is a flowchart of the generation of the user charging information according to the embodiment of the present invention;
fig. 3 is a schematic structural diagram of a user charging system according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a user charging device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
An embodiment of the present invention provides a flow charging method, which is a flow chart of the flow charging method shown in fig. 1, and the method is applied to a flow charging system, and specifically includes:
s110, after the user is successfully online, the authorization and accounting server AAA acquires user information and sends the user information to a flow accounting device, wherein the user information comprises: time, user account, public network IP, private network IP, and network address translation NAT port number.
The user information may be sent to the traffic charging device in a table form, or may be sent to the traffic charging device in other forms, which is not limited in the embodiment of the present invention, and table 1 below is only described in one table form, and the table may be in other forms.
TABLE 1
S120, after a user accesses a service, a broadband network gateway BNG collects user real-time flow information of the user and sends the user real-time flow information to a flow charging device, wherein the user real-time flow information comprises: time, user account number, source IP address, source port number, destination IP address, destination port number, and number of bytes of data.
Specifically, the collection of the user real-time flow information can be realized by a Netflow method and a Netstream method, or by other methods, which is not limited in the embodiment of the present invention; the collection ratio may be 1: 1. 500: 1. 1000: 1. 5000: 1, other proportions can be adopted, because the flow charging device can recover corresponding multiples according to the acquisition proportion after the user flow calculation is finished. Therefore, the embodiment of the present invention does not limit this.
The user real-time traffic information may be sent to the traffic charging device in a table form, or may be sent to the traffic charging device in other forms.
TABLE 2
S130, the flow accounting device receives and generates the accounting information of the user according to the user information sent by the authorization and accounting server AAA and the real-time flow information sent by the broadband network gateway BNG.
Specifically, as shown in fig. 2, a flow chart of generating the user charging information of the present invention is shown, where the generating of the charging information of the user by the traffic charging apparatus includes:
s231, the traffic accounting device receives and stores the user information sent by the authorization and accounting server AAA and the real-time traffic information sent by the broadband network gateway BNG.
Specifically, if the user is a public network user, the private network IP and the NAT port number in the user information sent by the accounting server AAA are both null or 0.
S232, the flow charging device matches the user information with the user real-time flow information according to a flow calculation rule, and the flow of the user is obtained through calculation.
Specifically, the flow calculation rule includes:
if the private network IP and the NAT port number in the user information are null or 0, extracting a user account and a public network IP address from the user information; matching the user account and the public network IP address with the user real-time flow information, and counting the number of successfully matched data bytes under the name of the user;
if the private network IP and the NAT port number in the user information are not null and not 0, extracting a user account, a public network IP address and an NAT port number from the user information; and matching the user account, the public network IP address and the NAT port number with the user real-time flow information, and counting the successfully matched data byte number under the user name.
For example: as shown in table 1, in the user information, at the time 2017-11-513: 21:30, the private network IP and NAT port number of the user +8613322221111 are 0, so that when the traffic charging device performs user traffic calculation, it extracts that the user account and the public network IP address are matched with the user real-time traffic information; in the time 2017-11-513: 21:45, the private network IP and the NAT port number of the user +8613322221111 are not null and not 0, so that when the traffic charging device performs user traffic calculation, the extracted user account, public network IP address and NAT port number are matched with the user real-time traffic information.
Further, the matching between the user account and the public network IP address and the user real-time traffic information and counting the number of successfully matched data bytes under the user name include:
if the public network IP address is successfully matched with the source IP address in the user real-time flow information, counting the number of successfully matched data bytes as the uplink flow of the user; if the public network IP address is successfully matched with the target IP address in the user real-time flow information, counting the number of successfully matched data bytes as the downlink flow of the user;
matching the user account, the public network IP address and the NAT port number with the user real-time flow information, and counting the successfully matched data byte number under the user name, wherein the matching comprises the following steps:
if the public network IP address is successfully matched with a source IP address in the user real-time flow information and the NAT port number is successfully matched with the source port number, counting the number of successfully matched data bytes as the uplink flow of the user; and if the public network IP address is successfully matched with the target IP address in the user real-time flow information and the NAT port number is successfully matched with the target port number, counting the number of successfully matched data bytes as the downlink flow of the user.
For example: as shown in table 1 and table 2, when the private network IP and NAT port number of the user +8613322221111 are null at time 2017-11-513: 21:25, and the traffic charging apparatus performs user traffic calculation, extracts a user account and a public network IP address (200.100.50.00/124) to match with the user real-time traffic information in table 2, finds that the public network IP address matches successfully with the source IP address (200.100.50.00/124) of the user at time 2017-11-513: 21:25, and then the traffic charging apparatus takes the number of data bytes 1033 obtained by matching as the downlink traffic of the user.
And S233, the flow charging device generates the charging information of the user according to the charging rule and the flow of the user.
Specifically, the charging information may be calculated and generated by separately performing the downlink traffic and the uplink traffic, or may be calculated and generated by comprehensively performing the calculation, and the embodiment of the present invention is not limited thereto. The embodiment of the invention does not limit the specific charging rules.
Further, before the user successfully comes online, the method further includes:
s101, the broadband network gateway BNG receives the online request of the user.
S102, the broadband network gateway BNG sends an authentication request to the authorization and accounting server AAA.
S103, the accounting server AAA authenticates the user, and if the user passes the authentication, the accounting server AAA sends an authentication response message to the broadband network gateway BNG, wherein the authentication response message comprises user configuration information, and the user configuration information comprises bandwidth.
S104, the broadband network gateway BNG sends an online response message to the user, and the online response message carries the user configuration information.
And after the user is successfully online, the method further comprises the following steps:
and S105, the user accesses the service.
The invention collects and sends the user information to the flow accounting device by the authorization and accounting server AAA after the user is successfully on line, the broadband network gateway BNG collects the real-time flow information of the user in real time and sends the information to the flow accounting device, and the flow accounting device generates the accounting information of the user according to the user information and the real-time flow information of the user, thereby efficiently and accurately carrying out the user flow accounting on the premise of not influencing the prior service.
An embodiment of the present invention provides a traffic charging system, as shown in fig. 3, which illustrates the traffic charging system of the present invention, and fig. 3 is only a schematic diagram, and does not limit interaction between the communication system and other network elements in a network. The flow accounting system comprises a user 10, a broadband network gateway BNG 20, an authorization and accounting server AAA 30, a service platform 40 and a flow accounting device 50;
the AAA 30 is configured to, after the user 10 successfully comes online, obtain user information and send the user information to the traffic accounting device, where the user information includes: time, user account, public network IP, private network IP, and network address translation NAT port number.
The user information may be sent to the traffic charging device in a table form, or may be sent to the traffic charging device in another form, which is not limited in the embodiment of the present invention.
The broadband network gateway BNG 20 is configured to, after a user performs service access, acquire user real-time traffic information of the user, and send the user real-time traffic information to a traffic charging device, where the user real-time traffic information includes: time, user account number, source IP address, source port number, destination IP address, destination port number, and number of bytes of data.
Specifically, the collection of the user real-time flow information can be realized by a Netflow method and a Netstream method, or by other methods, which is not limited in the embodiment of the present invention; the collection ratio may be 1: 1. 500: 1. 1000: 1. 5000: 1, other proportions can be adopted, because the flow charging device can recover corresponding multiples according to the acquisition proportion after the user flow calculation is finished. Therefore, the embodiment of the present invention does not limit this.
The user real-time traffic information may be sent to the traffic charging device in a table form, or may be sent to the traffic charging device in other forms, which is not limited in the embodiment of the present invention.
And the flow accounting device 50 is configured to receive and generate the accounting information of the user according to the user information sent by the authorization and accounting server AAA and the user real-time flow information sent by the broadband network gateway BNG.
Specifically, the generating of the charging information of the user by the traffic charging apparatus 50 includes:
the traffic accounting device 50 receives and stores the user information sent by the authorization and accounting server AAA and the user real-time traffic information sent by the broadband network gateway BNG.
Specifically, if the user is a public network user, the private network IP and the NAT port number in the user information sent by the accounting server AAA are both null or 0.
And the flow charging device 50 matches the user information with the user real-time flow information according to a flow calculation rule, and calculates to obtain the flow of the user.
Specifically, the flow calculation rule includes:
if the private network IP and the NAT port number in the user information are null or 0, extracting a user account and a public network IP address from the user information; matching the user account and the public network IP address with the user real-time flow information, and counting the number of successfully matched data bytes under the name of the user;
if the private network IP and the NAT port number in the user information are not null and not 0, extracting a user account, a public network IP address and an NAT port number from the user information; and matching the user account, the public network IP address and the NAT port number with the user real-time flow information, and counting the successfully matched data byte number under the user name.
Further, the matching between the user account and the public network IP address and the user real-time traffic information and counting the number of successfully matched data bytes under the user name include:
if the public network IP address is successfully matched with the source IP address in the user real-time flow information, counting the number of successfully matched data bytes as the uplink flow of the user; if the public network IP address is successfully matched with the target IP address in the user real-time flow information, counting the number of successfully matched data bytes as the downlink flow of the user;
matching the user account, the public network IP address and the NAT port number with the user real-time flow information, and counting the successfully matched data byte number under the user name, wherein the matching comprises the following steps:
if the public network IP address is successfully matched with a source IP address in the user real-time flow information and the NAT port number is successfully matched with the source port number, counting the number of successfully matched data bytes as the uplink flow of the user; and if the public network IP address is successfully matched with the target IP address in the user real-time flow information and the NAT port number is successfully matched with the target port number, counting the number of successfully matched data bytes as the downlink flow of the user.
The traffic accounting device 50 generates accounting information of the user 10 according to an accounting rule and the traffic of the user.
Specifically, the charging information may be calculated and generated by separately performing the downlink traffic and the uplink traffic, or may be calculated and generated by comprehensively performing the calculation, and the embodiment of the present invention is not limited thereto. The embodiment of the invention does not limit the specific charging rules.
Further, before the user 10 successfully logs on,
the broadband network gateway BNG 20 is further configured to receive an online request of the user, and send an authentication request to the authorization and accounting server AAA 30.
The accounting server AAA 30 is further configured to authenticate the user 10, and if the authentication passes, send an authentication response message to the broadband network gateway BNG 20, where the authentication response message includes user configuration information, and the user configuration information includes a bandwidth.
Further, the traffic charging system further includes a service platform 40, configured to provide service access for the user 10 after the user 10 successfully logs on.
The invention collects and sends the user information to the flow accounting device by the authorization and accounting server AAA after the user is successfully on line, the broadband network gateway BNG collects the real-time flow information of the user in real time and sends the information to the flow accounting device, and the flow accounting device generates the accounting information of the user according to the user information and the real-time flow information of the user, thereby efficiently and accurately carrying out the user flow accounting on the premise of not influencing the prior service.
An embodiment of the present invention provides a traffic charging apparatus, as shown in fig. 4, which illustrates a traffic charging apparatus 50 according to the present invention, and the illustration shown in fig. 4 is only a schematic diagram, and does not limit interaction between the traffic charging apparatus and other network elements and interaction between the traffic charging apparatus and each element inside the traffic charging apparatus. The traffic accounting device 50 comprises a receiving module 510, a data processing module 520 and an accounting module 530;
a receiving module 510, configured to receive user information sent by an authorization and accounting server AAA and user real-time traffic information sent by a broadband network gateway BNG, where the user real-time traffic information includes: time, user account number, source IP address, source port number, destination IP address, destination port number, and number of bytes of data.
Specifically, the user information and the real-time traffic information received by the receiving module 510 may be in a form of a table, or may be in other forms, which is not limited in the embodiment of the present invention.
The acquisition of the user real-time traffic information by the broadband network gateway BNG may be implemented by a Netflow method, a Netstream method, or by other methods, which is not limited in the embodiments of the present invention; the collection ratio may be 1: 1. 500: 1. 1000: 1. 5000: 1, it can also be other proportions, because the flow accounting device 50 can recover the corresponding multiple according to the collection proportion after completing the user flow calculation. Therefore, the embodiment of the present invention does not limit this.
A data processing module 520, configured to match the user information with the user real-time traffic information according to a traffic calculation rule, and calculate to obtain traffic of the user, where the user information includes: time, user account, public network IP, private network IP, and network address translation NAT port number.
Specifically, the flow calculation rule includes:
if the private network IP and the NAT port number in the user information are null or 0, extracting a user account and a public network IP address from the user information; matching the user account and the public network IP address with the user real-time flow information, and counting the number of successfully matched data bytes under the name of the user;
if the private network IP and the NAT port number in the user information are not null and not 0, extracting a user account, a public network IP address and an NAT port number from the user information; and matching the user account, the public network IP address and the NAT port number with the user real-time flow information, and counting the successfully matched data byte number under the user name.
Further, the matching between the user account and the public network IP address and the user real-time traffic information and counting the number of successfully matched data bytes under the user name include:
if the public network IP address is successfully matched with the source IP address in the user real-time flow information, counting the number of successfully matched data bytes as the uplink flow of the user; if the public network IP address is successfully matched with the target IP address in the user real-time flow information, counting the number of successfully matched data bytes as the downlink flow of the user;
matching the user account, the public network IP address and the NAT port number with the user real-time flow information, and counting the successfully matched data byte number under the user name, wherein the matching comprises the following steps:
if the public network IP address is successfully matched with a source IP address in the user real-time flow information and the NAT port number is successfully matched with the source port number, counting the number of successfully matched data bytes as the uplink flow of the user; and if the public network IP address is successfully matched with the target IP address in the user real-time flow information and the NAT port number is successfully matched with the target port number, counting the number of successfully matched data bytes as the downlink flow of the user.
The charging module 530 is configured to generate charging information of the user according to a charging rule and the flow of the user.
Specifically, the charging information may be calculated and generated by separately performing the downlink traffic and the uplink traffic, or may be calculated and generated by comprehensively performing the calculation, and the embodiment of the present invention is not limited thereto. The embodiment of the invention does not limit the specific charging rules.
The invention collects and sends the user information to the flow accounting device by the authorization and accounting server AAA after the user is successfully on line, the broadband network gateway BNG collects the real-time flow information of the user in real time and sends the information to the flow accounting device, and the flow accounting device generates the accounting information of the user according to the user information and the real-time flow information of the user, thereby efficiently and accurately carrying out the user flow accounting on the premise of not influencing the prior service.
In the several embodiments provided in the present application, it should be understood that the disclosed method, system, and apparatus may be implemented in other ways. For example, the above-described system embodiments are merely illustrative, and for example, the division of the functional blocks is only one logical division, and other divisions may be realized in practice, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional modules in the embodiments of the present invention may be integrated into one processing unit, or each unit may be physically included alone, or two or more units may be integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
The integrated unit implemented in the form of a software functional unit may be stored in a computer readable storage medium. The software functional unit is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute some steps of the methods according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.
Claims (13)
1. A method for charging traffic, the method comprising,
after the user is successfully online, the authorization and accounting server AAA acquires user information and sends the user information to a flow accounting device, wherein the user information includes: time, user account, public network IP, private network IP and network address translation NAT port number;
after a user accesses a service, a Broadband Network Gateway (BNG) collects user real-time flow information of the user and sends the user real-time flow information to a flow charging device, wherein the user real-time flow information comprises: time, user account number, source IP address, source port number, destination IP address, destination port number and data byte number;
and the flow accounting device receives and generates the accounting information of the user according to the user information sent by the authorization and accounting server AAA and the user real-time flow information sent by the broadband network gateway BNG.
2. The traffic charging method according to claim 1, wherein the traffic charging apparatus generating the charging information of the user comprises:
the flow accounting device receives and stores the user information sent by the authorization and accounting server AAA and the user real-time flow information sent by the broadband network gateway BNG;
matching the user information with the user real-time flow information according to a flow calculation rule, and calculating to obtain the flow of the user;
and generating the charging information of the user according to the charging rule and the flow of the user.
3. The traffic charging method according to claim 2, wherein the traffic calculation rule comprises:
if the private network IP and the NAT port number in the user information are null or 0, extracting a user account and a public network IP address from the user information; matching the user account and the public network IP address with the user real-time flow information, and counting the number of successfully matched data bytes under the name of the user;
if the private network IP and the NAT port number in the user information are not null and not 0, extracting a user account, a public network IP address and an NAT port number from the user information; and matching the user account, the public network IP address and the NAT port number with the user real-time flow information, and counting the successfully matched data byte number under the user name.
4. The traffic charging method according to claim 3,
matching the user account and the public network IP address with the user real-time flow information, and counting the successfully matched data byte number under the user name, wherein the matching comprises the following steps:
if the public network IP address is successfully matched with the source IP address in the user real-time flow information, counting the number of successfully matched data bytes as the uplink flow of the user; if the public network IP address is successfully matched with the target IP address in the user real-time flow information, counting the number of successfully matched data bytes as the downlink flow of the user;
matching the user account, the public network IP address and the NAT port number with the user real-time flow information, and counting the successfully matched data byte number under the user name, wherein the matching comprises the following steps:
if the public network IP address is successfully matched with a source IP address in the user real-time flow information and the NAT port number is successfully matched with the source port number, counting the number of successfully matched data bytes as the uplink flow of the user; and if the public network IP address is successfully matched with the target IP address in the user real-time flow information and the NAT port number is successfully matched with the target port number, counting the number of successfully matched data bytes as the downlink flow of the user.
5. The traffic charging method according to any one of claims 1 to 4, wherein before the user successfully comes online, the method further comprises:
the broadband network gateway BNG receives the on-line request of the user and sends an authentication request to the authorization and accounting server AAA;
and the authorization and accounting server AAA authenticates the user, and if the user passes the authentication, sends an authentication response message to the broadband network gateway BNG, wherein the authentication response message comprises user configuration information, and the user configuration information comprises bandwidth.
6. A traffic charging system, characterized in that the system comprises,
the authorization and accounting server AAA is used for acquiring user information and sending the user information to the flow accounting device after the user is successfully online, wherein the user information comprises: time, user account, public network IP, private network IP and network address translation NAT port number;
the broadband network gateway BNG is used for acquiring the user real-time flow information of a user after the user accesses services, and sending the user real-time flow information to a flow charging device, wherein the user real-time flow information comprises: time, user account number, source IP address, source port number, destination IP address, destination port number and data byte number;
and the flow accounting device is used for receiving and generating the accounting information of the user according to the user information sent by the authorization and accounting server AAA and the user real-time flow information sent by the broadband network gateway BNG.
7. The traffic charging system of claim 6, wherein the traffic charging apparatus is configured to:
receiving and storing the user information sent by the authorization and accounting server AAA and the user real-time flow information sent by the broadband network gateway BNG;
matching the user information with the user real-time flow information according to a flow calculation rule, and calculating to obtain the flow of the user;
and generating the charging information of the user according to the charging rule and the flow of the user.
8. The traffic charging system of claim 7, wherein the traffic calculation rule comprises:
if the private network IP and the NAT port number in the user information are null or 0, extracting a user account and a public network IP address from the user information; matching the user account and the public network IP address with the user real-time flow information, and counting the number of successfully matched data bytes under the name of the user;
if the private network IP and the NAT port number in the user information are not null and not 0, extracting a user account, a public network IP address and an NAT port number from the user information; and matching the user account, the public network IP address and the NAT port number with the user real-time flow information, and counting the successfully matched data byte number under the user name.
9. The traffic charging system of claim 8,
matching the user account and the public network IP address with the user real-time flow information, and counting the successfully matched data byte number under the user name, wherein the matching comprises the following steps:
if the public network IP address is successfully matched with the source IP address in the user real-time flow information, counting the number of successfully matched data bytes as the uplink flow of the user; if the public network IP address is successfully matched with the target IP address in the user real-time flow information, counting the number of successfully matched data bytes as the downlink flow of the user;
matching the user account, the public network IP address and the NAT port number with the user real-time flow information, and counting the successfully matched data byte number under the user name, wherein the matching comprises the following steps:
if the public network IP address is successfully matched with a source IP address in the user real-time flow information and the NAT port number is successfully matched with the source port number, counting the number of successfully matched data bytes as the uplink flow of the user; and if the public network IP address is successfully matched with the target IP address in the user real-time flow information and the NAT port number is successfully matched with the target port number, counting the number of successfully matched data bytes as the downlink flow of the user.
10. The traffic charging system according to any of claims 6-9, wherein before the user comes online successfully,
the broadband network gateway BNG is also used for receiving the on-line request of the user and sending an authentication request to the authorization and accounting server AAA;
the AAA is further configured to authenticate the user, and if the user passes the authentication, send an authentication response message to the BNG, where the authentication response message includes user configuration information, and the user configuration information includes a bandwidth.
11. A flow charging apparatus, characterized in that the apparatus comprises,
a receiving module, configured to receive user information sent by an authorization and accounting server AAA and user real-time traffic information sent by a broadband network gateway BNG, where the user real-time traffic information includes: time, user account number, source IP address, source port number, destination IP address, destination port number and data byte number;
the data processing module is used for matching the user information with the user real-time flow information according to a flow calculation rule, and calculating to obtain the flow of the user, wherein the user information comprises: time, user account, public network IP, private network IP and network address translation NAT port number;
and the charging module is used for generating the charging information of the user according to the charging rule and the flow of the user.
12. The traffic charging apparatus according to claim 11, wherein the traffic calculation rule comprises:
if the private network IP and the NAT port number in the user information are null or 0, extracting a user account and a public network IP address from the user information; matching the user account and the public network IP address with the user real-time flow information, and counting the number of successfully matched data bytes under the name of the user;
if the private network IP and the NAT port number in the user information are not null and not 0, extracting a user account, a public network IP address and an NAT port number from the user information; and matching the user account, the public network IP address and the NAT port number with the user real-time flow information, and counting the successfully matched data byte number under the user name.
13. The traffic charging apparatus according to claim 12,
matching the user account and the public network IP address with the user real-time flow information, and counting the successfully matched data byte number under the user name, wherein the matching comprises the following steps:
if the public network IP address is successfully matched with the source IP address in the user real-time flow information, counting the number of successfully matched data bytes as the uplink flow of the user; if the public network IP address is successfully matched with the target IP address in the user real-time flow information, counting the number of successfully matched data bytes as the downlink flow of the user;
matching the user account, the public network IP address and the NAT port number with the user real-time flow information, and counting the successfully matched data byte number under the user name, wherein the matching comprises the following steps:
if the public network IP address is successfully matched with a source IP address in the user real-time flow information and the NAT port number is successfully matched with the source port number, counting the number of successfully matched data bytes as the uplink flow of the user; and if the public network IP address is successfully matched with the target IP address in the user real-time flow information and the NAT port number is successfully matched with the target port number, counting the number of successfully matched data bytes as the downlink flow of the user.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811307340.3A CN109286506B (en) | 2018-11-05 | 2018-11-05 | Method, system and device for charging flow |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811307340.3A CN109286506B (en) | 2018-11-05 | 2018-11-05 | Method, system and device for charging flow |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109286506A CN109286506A (en) | 2019-01-29 |
CN109286506B true CN109286506B (en) | 2021-05-28 |
Family
ID=65175066
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811307340.3A Active CN109286506B (en) | 2018-11-05 | 2018-11-05 | Method, system and device for charging flow |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109286506B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111628906B (en) * | 2020-05-11 | 2023-05-09 | 紫光云技术有限公司 | Method for carrying out flow statistics and monitoring on elastic public network IP |
CN113873455A (en) * | 2021-11-02 | 2021-12-31 | 中国电信股份有限公司 | Flow statistical method and system, computer readable storage medium |
CN114584398B (en) * | 2022-04-28 | 2022-08-02 | 新华三人工智能科技有限公司 | Charging management method and system |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101478409A (en) * | 2009-02-09 | 2009-07-08 | 中兴通讯股份有限公司 | Fee charging control method and wideband access server |
CN103327472A (en) * | 2012-03-23 | 2013-09-25 | 电信科学技术研究院 | Charging information transmission method and device |
CN104144083A (en) * | 2013-05-10 | 2014-11-12 | 中国电信股份有限公司 | Flow statistic method based on application, BRAS and network |
WO2016012856A1 (en) * | 2014-07-25 | 2016-01-28 | Alcatel Lucent | Methods and apparatuses of service function chain based on pcc architecture |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8295170B2 (en) * | 2010-06-28 | 2012-10-23 | Alcatel Lucent | PCRF-PCEF-OCS interaction in wireless-wireline convergence |
-
2018
- 2018-11-05 CN CN201811307340.3A patent/CN109286506B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101478409A (en) * | 2009-02-09 | 2009-07-08 | 中兴通讯股份有限公司 | Fee charging control method and wideband access server |
CN103327472A (en) * | 2012-03-23 | 2013-09-25 | 电信科学技术研究院 | Charging information transmission method and device |
CN104144083A (en) * | 2013-05-10 | 2014-11-12 | 中国电信股份有限公司 | Flow statistic method based on application, BRAS and network |
WO2016012856A1 (en) * | 2014-07-25 | 2016-01-28 | Alcatel Lucent | Methods and apparatuses of service function chain based on pcc architecture |
Also Published As
Publication number | Publication date |
---|---|
CN109286506A (en) | 2019-01-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109286506B (en) | Method, system and device for charging flow | |
US8832250B2 (en) | Method and server for agent service applied to widget | |
CN110233868A (en) | A kind of edge calculations data safety and method for secret protection based on Fabric | |
CN110602214B (en) | Evidence storing and processing method, device, equipment and medium of judicial chain | |
EP3697042A1 (en) | Traffic analysis method, public service traffic attribution method and corresponding computer system | |
US10111060B2 (en) | Client app service on mobile network | |
WO2014000303A1 (en) | Method for receiving message, and deep packet inspection device and system | |
WO2012106861A1 (en) | Terminal distribution information acquisition method, data acquisition device and communication system | |
CN108366176A (en) | A kind of charging method of terminal applies, apparatus and system | |
CN108880934A (en) | A kind of data flow statistic method and device based on block chain | |
CN108768672B (en) | Data processing method, device and storage medium | |
CN101247239A (en) | Authenticated authorization accounting system and implementing method thereof | |
CN109818943A (en) | A kind of authentication method suitable for low orbit satellite Internet of Things | |
CN105184559B (en) | A kind of payment system and method | |
CN104093135A (en) | RADIUS authentication charging speed adjusting method and device | |
CN113129002A (en) | Data processing method and equipment | |
CN106339623A (en) | Login method and login device | |
CN110198294A (en) | Security attack detection method and device | |
CN109617672B (en) | Novel key filling method | |
CN111866993A (en) | Wireless local area network connection management method, device, software program and storage medium | |
CN110262892A (en) | A kind of ticketing service dissemination method based on distributed storage data-link, device and data-link node | |
CN107104964B (en) | Network security terminal and use method | |
CN108270808B (en) | Method, device and system for realizing application detection and control | |
CN101729257A (en) | Cable modem and digital certificate updating method thereof | |
CN104065490A (en) | System and method for simulating transceiver signaling based on online charging environment |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |