CN108809666B - Method, device and equipment for online charging of flow - Google Patents

Method, device and equipment for online charging of flow Download PDF

Info

Publication number
CN108809666B
CN108809666B CN201710283456.7A CN201710283456A CN108809666B CN 108809666 B CN108809666 B CN 108809666B CN 201710283456 A CN201710283456 A CN 201710283456A CN 108809666 B CN108809666 B CN 108809666B
Authority
CN
China
Prior art keywords
message
flow
user
ccr
request
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
Application number
CN201710283456.7A
Other languages
Chinese (zh)
Other versions
CN108809666A (en
Inventor
郝会玲
金天顺
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Mobile Communications Group Co Ltd
China Mobile Group Hebei Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile Group Hebei Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Mobile Communications Group Co Ltd, China Mobile Group Hebei Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN201710283456.7A priority Critical patent/CN108809666B/en
Publication of CN108809666A publication Critical patent/CN108809666A/en
Application granted granted Critical
Publication of CN108809666B publication Critical patent/CN108809666B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/02Details
    • H04L12/14Charging, metering or billing arrangements for data wireline or wireless communications
    • H04L12/141Indication of costs
    • H04L12/1414Indication of costs in real-time
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/02Details
    • H04L12/14Charging, metering or billing arrangements for data wireline or wireless communications
    • H04L12/1425Charging, metering or billing arrangements for data wireline or wireless communications involving dedicated fields in the data packet for billing purposes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/02Details
    • H04L12/14Charging, metering or billing arrangements for data wireline or wireless communications
    • H04L12/1485Tariff-related aspects

Abstract

The embodiment of the invention discloses a method, a device and equipment for online charging of flow. The method comprises the following steps: receiving a Credit Control Request (CCR) message; identifying a message type of the CCR message based on a service code of the CCR message; executing a charging processing flow for the CCR message according to the message type and the request type of the CCR message; and sending a credit control response CCA message according to the result of the charging processing flow. The embodiment of the invention can reduce the loss of the performance of the flow charging system.

Description

Method, device and equipment for online charging of flow
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method, an apparatus, and a device for online charging of traffic.
Background
With the development of 4G networks, the number of users of 4G networks is increasing, the usage of traffic is increasing, and the demand for the performance of traffic charging systems is also gradually rising. At present, a flow charging system usually adopts an online charging processing mode, and the mode can improve the timeliness of reminding, reduce the risk of high flow arrearage and the like.
In the existing traffic online charging mode, when charging CCR (credit control request) messages, a uniform processing flow is adopted for all CCR messages. However, in some redundant and invalid service messages in the CCR message, the messages do not need to execute a complete processing flow, and only need to perform partial processing in the unified processing flow. Therefore, the existing online charging mode of the flow causes excessive loss to the performance of the flow charging system, and wastes more performance of the online charging system.
Disclosure of Invention
The embodiment of the invention provides a method, a device and equipment for online charging of flow, which can reduce the loss of the performance of a flow charging system.
In a first aspect, an embodiment of the present invention provides a method for online charging of traffic, including:
receiving a Credit Control Request (CCR) message;
identifying a message type of the CCR message based on a service code of the CCR message;
executing a charging processing flow for the CCR message according to the message type and the request type of the CCR message;
and sending a Credit Control Answer (CCA) message according to the result of the charging processing flow.
In a second aspect, an embodiment of the present invention provides an apparatus for online charging of traffic, including:
a receiving unit, configured to receive a credit control request CCR message;
the identification unit is used for identifying the message type of the CCR message based on the service code of the CCR message;
the processing unit is used for executing a charging processing flow to the CCR message according to the message type and the request type of the CCR message;
and the sending unit is used for sending the CCA message according to the result of the charging processing flow.
In a third aspect, an embodiment of the present invention provides an apparatus for online charging of traffic, including:
a memory, a processor, a communication interface, and a bus;
the memory, the processor and the communication interface are connected through a bus and complete mutual communication;
the memory is used for storing program codes;
the processor executes a program corresponding to the executable program code by reading the executable program code stored in the memory, so as to execute a method for online charging of traffic, wherein the method for online charging of traffic comprises the following steps:
receiving a Credit Control Request (CCR) message;
identifying a message type of the CCR message based on a service code of the CCR message;
executing a charging processing flow for the CCR message according to the message type and the request type of the CCR message;
and sending the CCA message according to the result of the charging processing flow.
The embodiment of the invention provides a method, a device and equipment for online charging of flow, wherein after a CCR message is received, the message type of the CCR message is identified based on a service code of the CCR message; then, according to the message type and the request type of the CCR message, a charging processing flow is executed on the CCR message; and sending the CCA message according to the result of the charging processing flow. The embodiment of the invention classifies the received CCR message, executes different charging processing flows according to the difference between the message type and the request type of the CCR message, simplifies the steps of unnecessary processing of the CCR message and the like and simplifies the unnecessary charging flows compared with the prior art in which all messages adopt a unified processing flow, thereby reducing the performance consumption of a flow charging system and saving the performance of an online charging system.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments of the present invention will be briefly described below, and it is obvious that the drawings described below 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 schematic flow chart of a method for online charging of traffic provided according to an embodiment of the present invention;
FIG. 2 is a schematic block diagram of an apparatus for online charging of traffic provided in accordance with an embodiment of the present invention;
fig. 3 is a schematic block diagram of an apparatus for online charging of traffic provided according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, 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 some, but not all, embodiments of the present invention. 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.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
The embodiment of the invention is used for a scene that a traffic charging system processes the received CCR message. The traffic charging system performs data interaction with the network element side equipment, performs charging processing on the CCR message after receiving the CCR message sent by the network element side equipment, and then generates a CCA message according to a processing result and replies the CCA message to the network element side equipment. The embodiment of the invention classifies the received CCR message, simplifies the steps of unnecessary CCR message processing and the like, and reduces the performance consumption of a flow charging system.
Fig. 1 shows a schematic flow chart of a method for online charging of traffic provided according to an embodiment of the present invention. As shown in fig. 1, the method includes the following steps.
110, receiving the CCR message.
The user sends a CCR message from a network element side during using a GPRS (General Packet Radio Service), where the request type of the CCR message includes: the method comprises three types of initial Init request, Update request and termination Term request, wherein the CCR also comprises a service code used by a user.
And 120, identifying the message type of the CCR message based on the service code of the CCR message.
The method for identifying the message type of the CCR message according to the service code carried in the CCR message comprises the following steps: invalid signaling, free flow signaling and normal signaling, and can set a service mark corresponding to the message type. The normal signaling can be further divided into zero-traffic signaling and non-zero-traffic signaling.
The invalid signaling corresponds to the service: the invalid signaling generated by the user in the process of using the GPRS service does not need the service of charging; free flow signaling corresponds to the service: the system refers to content charging services such as a palm business hall, a mobile phone television, an application market service and the like used by a user in the process of using a GPRS service; normal signaling corresponds to the service: the user uses the services which are generated in the GPRS service process and need normal charging.
And 130, executing a charging processing flow for the CCR message according to the message type and the request type of the CCR message.
In the embodiment of the invention, different charging processing flows are executed aiming at different CCR messages, so that after the message type of the CCR message and the request type of the CCR message are determined, the charging processing flow corresponding to the CCR message can be determined, and the CCR message can be processed according to the charging processing flow corresponding to the CCR message.
It should be noted that, in the flow charging system, charging processing flows corresponding to CCR messages of different message types and request types may be preset, and then after determining the message type and the request type of a CCR message, the charging processing flow corresponding to the CCR message may be queried.
And 140, transmitting the CCA message according to the result of the charging processing flow.
After the charging processing flow processing is performed on the CCR message, a CCA message may be generated based on a processing result, and the CCA message may be sent.
It should be noted that, when sending a CCA message, it is generally necessary to perform packet return preprocessing to generate a CCA message, for example, setting field values used in packet return, such as a return code, an authorization amount, and other information.
The embodiment of the invention classifies the received CCR message, executes different charging processing flows according to the difference between the message type and the request type of the CCR message, simplifies the steps of unnecessary processing of the CCR message and the like and simplifies the unnecessary charging flows compared with the prior art in which all messages adopt a unified processing flow, thereby reducing the performance consumption of a flow charging system and saving the performance of an online charging system.
It should be noted that, in the embodiment of the present invention, since different charging processing flows are executed for different CCR messages, the CCR messages to be processed in the traffic charging system are combed. The CCR message may include: the CCR messages corresponding to the invalid signaling, the free traffic signaling, the non-zero traffic signaling, and the zero traffic signaling need to be distinguished. In the embodiment of the invention, the processing flows of CCR messages corresponding to invalid signaling, free flow signaling and zero flow signaling are analyzed, and the analysis results are shown in Table 1.
TABLE 1
Figure BDA0001280111160000051
Figure BDA0001280111160000061
Based on the analysis result of the processing flow of the corresponding CCR message in the table 1, the embodiment of the invention executes different charging processing flows on different CCR messages, simplifies the online processing logic of the 3 types of signaling, processes the CCR messages in a distinguishing way, and skips unnecessary processing links according to the processing requirements and characteristics of various messages, thereby achieving different optimization targets and reducing the consumption of flow charging performance.
As an alternative embodiment, before step 130, the following steps may be further performed: 150, the message type is invalid signaling, and the CCA message is sent according to the CCR message.
For the CCR message with the message type of invalid signaling, as the CCR message does not influence client data, does not need to be charged and does not need to output a ticket, a plurality of intermediate processing links can be skipped, and a fixed authorization quantity is directly packaged to reply the CCA message.
In this step, firstly, information such as a maximum traffic quota threshold VT, a used quota authorized volume GSU, and the like is set in the packet returning preprocessing based on the CCR message, and then, a CCA message carrying the packet returning preprocessing information is sent.
The embodiment of the invention simplifies the on-line processing process of the invalid signaling, directly processes the CCR message with the message type of the invalid signaling without uniformly processing the CCR message, and skips unnecessary processing links, thereby achieving different optimization targets and reducing the consumption of flow charging performance.
As an alternative embodiment, in the embodiment of the present invention, the step 130 may be further specifically executed as the following step.
131, the message type is free flow signaling and the request type is initial request, and the user data updating process is executed for the CCR message.
And 132, updating the cache information according to the CCR message, wherein the message type is free traffic signaling and the request type is an updating request.
133, the message type is free traffic signaling and the request type is an end request, and a user data access flow and a first fee processing flow are performed for the CCR message.
In the embodiment of the invention, the CCR message type can comprise invalid signaling, free flow signaling and normal signaling, and the request type of the CCR message comprises an Init request, an Update request and a Term request. For the CCR message with invalid signaling, the processing method is already described in step 150, and for the message type being free traffic signaling, the charging processing flow needs to be determined in combination with the request type of the CCR message. In the step, CCR messages belonging to the Init request are screened out according to the request type, and because the CCR messages of the Init request need to access client data from a memory database, and the main task of the Init message is to request to access the client data information through ARQ, the CCR messages of the Init request need to execute a user data access process. Since the CCR message belonging to the Update request is of an Update request type, and the corresponding user data is stored in the cache, the user data does not need to be acquired again from the memory database, and meanwhile, the free flow signaling does not need to perform charging budget operation, so that the message type is free flow signaling and the request type is an Update request, and the cache information is updated according to the CCR message. Since the CCR message belonging to the Term request is of the end request type, which indicates that the corresponding flow charging callback is ended and the fee needs to be settled, and the corresponding user data is stored in the cache, the user data does not need to be re-acquired from the memory database, so that the message type is free flow signaling and the request type is an end request, and a user data access flow and a first fee processing flow are executed on the CCR message.
It should be noted that, if the user data corresponding to the CCR message belonging to the Update request or the Term request is not stored in the cache, at this time, the user data needs to be obtained again from the memory database, that is, the user data access process is executed.
Specifically, the user access process may specifically be: sending request information to a memory database according to the CCR message, wherein the request information is used for requesting user data; receiving response information of the memory, wherein the response information comprises user data; storing the user data in the cache.
The process is to access and store user data from the memory so as to be convenient for the subsequent use of the user data. The CCR message includes user identification information such as a user number, so that a request message is sent to the memory database based on the user identification information, and is used for a requested user profile corresponding to the user identification information, where the request message may include the user identification information. The user profile may include traffic information for the user's subscription, usage information for the traffic, and the like.
For example, the process flow may be: generating a standard charging event according to the CCR message, then generating an ARQ charging event according to the standard charging event, and sending an ARQ request to a memory database; the memory database receives the ARQ request and returns AOQ response; combining the ARQ request and the AOQ response, and recording the interactive information to the standard ticket; judging whether the returned data is legal, if so, writing the data into the client data charging event, and accessing and updating the subsequent program access data from the client data charging event.
In the step, the user data is obtained from the memory database and stored in the cache, so that the user data can be directly accessed from the cache in the subsequent process, the access speed is increased, and the access to the memory data is reduced.
As an optional embodiment, in the embodiment of the present invention, for a CCR message whose message type is normal signaling, the step 130 may be further specifically performed as the following step.
134, judging whether the CCR message is a zero flow message; 135, the CCR message is a zero flow message, and the cache information is updated according to the CCR message; 136, the CCR message is not a zero flow message and the request type is an initial request, and a user data access flow and a second cost processing flow are executed on the CCR message; 137, the CCR message is not a zero flow message and the request type is an update request, and a second cost processing flow is executed on the CCR message; 138, the CCR message is not a zero traffic message and the request type is an end request, and a first cost processing flow is executed on the CCR message.
For the message type being normal signaling, it needs to judge whether the CCR message is a zero flow message. The zero flow message is directly wrapped by using the original reservation, processing flows of pricing approval and account closing, price approval, account closing simulation, account cancellation, back calculation, AOQ interaction and the like are skipped, a ticket is written, the last authorization quantity is taken, and the CCA message is responded, so that the CCR message is the zero flow message, the cache information is updated according to the CCR message, and the cache information is only updated according to the CCR message. And for the CCR message which is not zero flow, distinguishing the charging processing flow according to the request type.
Because CCR messages belonging to the Init request need to access client information from the memory database, and the main task of the Init message is to access the client information through the ARQ request, the CCR messages of the Init request need to execute a user information access process and also need to perform charging budget, namely, a second charging process is executed; the CCR message belonging to the Update request is of an Update request type, and the corresponding user data is stored in a cache, so that the user data does not need to be acquired again in a memory database, and meanwhile, the charging budget also needs to be carried out, namely, a second charging process is executed; the CCR message belonging to the Term request is of an end request type, which indicates that the corresponding flow charging call is ended and the fee is required to be settled, namely, the first charging process is executed, and the corresponding user data is stored in the cache, so that the user data does not need to be acquired again in the memory database. The process described above can be summarized as follows: the CCR message is not a zero flow message and the request type is an initial request, and a user data access flow and a second cost processing flow are executed on the CCR message; the CCR message is not a zero flow message and the request type is an updating request, and a second expense processing flow is executed on the CCR message; and the CCR message is not a zero flow message and the request type is an end request, and a first expense processing flow is executed on the CCR message.
It should be noted that, the manner of determining whether the CCR message is a zero flow message may be determined according to a parameter value in the charging process. In the embodiment of the invention, whether the CCR message is a zero flow message can be judged by the following conditions: the CCR message comprises a sub-service identifier, the sub-service identifier contained in the CCR message is recorded in a flow charging system, the accumulated charging flow of the service corresponding to the sub-service identifier recorded in the flow charging system is 0, and the charging type of the CCR message does not belong to abnormal signaling or free service signaling.
For example, the condition for zero flow determination in the embodiment of the present invention may be expressed as: length (> 0and length (destination charging event, SubSessionId) >0and source charging event) cumulative charging traffic ═ 0and source charging event. Wherein, 7, 8, 9 indicates that the charging type is abnormal signaling and free flow signaling.
Specifically, the first expense treatment process may specifically be: determining the current use flow of the user based on the CCR message; calculating the current flow charge of the user according to the current use flow of the user and the historical use flow of the user; determining a pre-deduction result according to the user balance, the user traffic accumulated amount, the user traffic donation amount and the current traffic cost of the user; and storing the current use flow of the user, the current flow cost of the user and the pre-deduction result to a cache.
The first fee processing flow represents the process that the user needs to charge the flow and deduct the fee after using the flow service. The CCR message comprises the current user traffic, and the user historical use traffic of the user can be obtained from the cached user data according to the user identification information in the CCR message, so that the current user traffic cost can be calculated.
The subscriber may then be pre-billed, including: checking the cumulative quantity conflict, namely judging whether the initial value of the flow cumulative quantity is consistent with the current value of the cumulative quantity, if not, determining the cumulative quantity conflict and returning to the latest cumulative quantity, and if not, determining the cumulative quantity is not conflicted; determining the user flow presentation amount according to the user data, and deducting the user flow presentation amount; deducting fee according to the user flow fee and the user balance, if the fee deduction is successful, determining that the pre-deduction result is successful, and setting a fee deduction result code; if the fee deduction fails, determining that the fee deduction result is fee deduction failure, and returning the latest account book, the latest accumulated amount and the latest free resource. And storing the current use flow of the user, the current flow cost of the user and the pre-deduction result to a cache. In the embodiment of the invention, the initial value of the accumulated amount, the current value of the accumulated amount, the present amount of the user flow and the balance of the user can be obtained from the cached user data.
For example, the processing procedure may specifically be: the billing is carried out according to the reported actual use billing cost, and a bill is generated according to AOQ charging events; calling account preference and real-time account distribution; calling account preference and real-time account distribution; checking the accumulated quantity conflict, comparing the reported initial value of the accumulated quantity with the current value, returning the accumulated quantity conflict if the accumulated quantity conflict is inconsistent, and returning the latest accumulated quantity; deducting the presented amount, namely deducting according to the reported presented amount use value, returning to the presented amount conflict and returning to the latest presented amount if the current surplus is insufficient; calling an account management deduction interface according to the bill generated after the second-time account closing; if the fee deduction is successful, setting a fee deduction result code; if the fee deduction fails, returning the latest account book, the latest accumulated amount and the latest free resource; performing real-time accounting, and warehousing the accounts which are accounted; recording the interactive information to a standard call ticket; and updating the cache information, and writing the bill generated by the account combination and the reported actual usage amount into the local cache sessionstore.
It should be noted that, if the user data corresponding to the CCR message belonging to the Update request or the Term request is not stored in the cache, at this time, the user data needs to be obtained again from the memory database, that is, the user data access process is executed.
Specifically, the second expense treatment process may specifically be: determining the current use flow of the user based on the CCR message; calculating user flow cost according to the current user flow, the historical user flow and the preset reserved flow of the user; determining a flow reservation result according to the user balance and the user flow cost; and storing the current use flow of the user, the flow cost of the user and the pre-deduction result to a cache.
The second charge processing flow represents the process that the user needs to perform reserved flow charging by using flow updating. The CCR message comprises the current user traffic of the traffic, the historical user traffic of the user can be obtained from the cached user data according to the user identification information in the CCR message, and the user traffic cost after the preset reserved traffic is allocated to the user at this time can be calculated by combining the preset reserved traffic. Then comparing the calculated user flow cost with the user balance, and if the user flow cost is greater than the user balance, determining that the flow reservation result is a reservation failure; and if the user flow cost is not more than the balance of the user, determining that the flow reservation result is successful in reservation. The user balance in the embodiment of the invention can be obtained from the user data.
For example, generating a bill according to AOQ charging events according to the reported actual usage bill charges and reserved traffic bill charges for billing; calling account preference and real-time account distribution; calling an account management reserved interface according to a bill generated after the account is closed; if the reservation is successful, setting a reservation result code; if the reservation fails, returning the latest account book; and updating the cache information, and writing the actual usage amount reported by the bill + AOQ generated by the first time of reconciliation into the local cache sessionstore.
It should be noted that, in the embodiment of the present invention, if the reservation result is a reservation failure, the preset reservation traffic may be reduced and the second cost processing procedure may be re-executed to ensure that the reservation result is a reservation success. And if the user data corresponding to the CCR message belonging to the Update request or the Term request is not stored in the cache, the user data needs to be obtained again from the memory database at the moment, namely, the user data access process is executed.
Fig. 2 shows a schematic block diagram of an apparatus 200 for online charging of traffic provided according to an embodiment of the present invention. As shown in fig. 2, the apparatus 200 includes:
a receiving unit 201, configured to receive a credit control request CCR message;
an identifying unit 202, configured to identify a message type of the CCR message based on a service code of the CCR message;
a processing unit 203, configured to execute a charging processing procedure on the CCR message according to the message type and the request type of the CCR message;
a sending unit 204, configured to send a credit control answer CCA message according to a result of the charging processing procedure.
The embodiment of the invention classifies the received CCR message, executes different charging processing flows according to the difference between the message type and the request type of the CCR message, simplifies the steps of unnecessary processing of the CCR message and the like and simplifies the unnecessary charging flows compared with the prior art in which all messages adopt a unified processing flow, thereby reducing the performance consumption of a flow charging system and saving the performance of an online charging system.
It is understood that the sending unit 204 is further configured to:
and the message type is invalid signaling, and the CCA message is sent according to the CCR message.
It should be noted that, for the CCR message with the type of the invalid signaling, since it does not affect the client data, does not need to charge, and does not need to output a ticket, several intermediate processing links can be skipped, and the CCA response message can be replied by directly encapsulating the fixed authorization amount.
It is to be understood that the processing unit 203 is specifically configured to:
the message type is free flow signaling and the request type is an initial request, and a user data access flow is executed on the CCR message;
the message type is free flow signaling and the request type is an updating request, and cache information is updated according to the CCR message;
the message type is free flow signaling and the request type is an end request, and a user data access flow and a first fee processing flow are executed for the CCR message.
It is understood that the message type is normal signaling; the processing unit 203 is specifically configured to:
judging whether the CCR message is a zero flow message;
the CCR message is a zero flow message, and the cache information is updated according to the CCR message;
the CCR message is not a zero flow message and the request type is an initial request, and a user data access flow and a second cost processing flow are executed on the CCR message;
the CCR message is not a zero flow message and the request type is an updating request, and a second expense processing flow is executed on the CCR message;
and the CCR message is not a zero flow message and the request type is an end request, and a first expense processing flow is executed on the CCR message.
It is understood that the user profile updating process includes:
sending request information to a memory database according to the CCR message, wherein the request information is used for requesting user data;
receiving response information of the memory, wherein the response information comprises user data;
storing the user data in the cache.
It is understood that the first fare processing flow includes:
determining the current use flow of the user based on the CCR message;
calculating the current flow charge of the user according to the current use flow of the user and the historical use flow of the user;
determining a pre-deduction result according to the user balance, the user traffic accumulated amount, the user traffic donation amount and the current traffic cost of the user;
and storing the current use flow of the user, the current flow cost of the user and the pre-deduction result to a cache.
It is understood that the second fee processing flow includes:
determining the current use flow of the user based on the CCR message;
calculating the current flow charge of the user according to the current use flow of the user, the historical use amount of the user and a preset reserved amount;
determining a flow reservation result according to the user balance and the user flow cost;
and storing the current use flow of the user, the flow cost of the user and the pre-deduction result to a cache.
The device 200 for online charging of traffic according to the embodiment of the present invention may correspond to an execution main body in the method for online charging of traffic according to the embodiment of the present invention, and the above and other operations and/or functions of each module in the device 200 for online charging of traffic are respectively for implementing corresponding processes of each method in fig. 1, and are not described herein again for brevity.
Fig. 3 is a schematic block diagram of an apparatus 300 for online charging of traffic according to an embodiment of the present invention. As shown in fig. 3, the device 300 includes a processor 301, a memory 302, and a communication interface 303, the memory 302 is used for storing executable program codes, the processor 301 executes programs corresponding to the executable program codes by reading the executable program codes stored in the memory 302, the communication interface 303 is used for communicating with external devices, the device 300 may further include a bus 304, and the bus 304 is used for connecting the processor 301, the memory 302, and the communication interface 303, so that the processor 301, the memory 302, and the communication interface 303 communicate with each other through the bus 304.
Specifically, the processor 301 is further configured to execute a method for online charging of traffic; the method for online charging of the flow comprises the following steps:
receiving a Credit Control Request (CCR) message;
identifying a message type of the CCR message based on a service code of the CCR message;
executing a charging processing flow for the CCR message according to the message type and the request type of the CCR message;
and sending a credit control response CCA message according to the result of the charging processing flow.
The device 300 for online charging of traffic according to the embodiment of the present invention may correspond to an execution main body in the method for online charging of traffic according to the embodiment of the present invention, and the above and other operations and/or functions of each module in the device 300 for online charging of traffic are respectively for implementing corresponding processes of each method in fig. 1, and are not described herein again for brevity.
Those of ordinary skill in the art will appreciate that the elements and algorithm steps of the examples described in connection with the embodiments disclosed herein may be embodied in electronic hardware, computer software, or combinations of both, and that the components and steps of the examples have been described in a functional general in the foregoing description for the purpose of illustrating clearly the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
While the invention has been described with reference to specific embodiments, the invention is not limited thereto, and various equivalent modifications and substitutions can be easily made by those skilled in the art within the technical scope of the invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (13)

1. A method for online charging of traffic is characterized by comprising the following steps:
receiving a Credit Control Request (CCR) message;
identifying a message type of the CCR message based on a service code of the CCR message;
executing a charging processing flow for the CCR message according to the message type and the request type of the CCR message;
sending a credit control response CCA message according to the result of the charging processing flow;
the executing the charging processing flow for the CCR message according to the message type and the request type of the CCR message comprises the following steps:
the message type is free flow signaling and the request type is an initial request, and a user data access process is executed on the CCR message;
the message type is the free flow signaling and the request type is an updating request, and cache information is updated according to the CCR message;
and the message type is the free flow signaling and the request type is an end request, and a first fee processing flow is executed on the CCR message.
2. The method for online charging of traffic according to claim 1, wherein before performing a charging processing procedure on the CCR message according to the message type and the request type of the CCR message, the method comprises:
and the message type is invalid signaling, and the CCA message is sent according to the CCR message.
3. The method for online charging of traffic according to claim 1, wherein the message type is normal signaling;
the executing the charging processing flow for the CCR message according to the message type and the request type of the CCR message comprises the following steps:
judging whether the CCR message is a zero flow message;
the CCR message is a zero flow message, and the cache information is updated according to the CCR message;
the CCR message is not a zero flow message, the request type is the initial request, and a user data access flow and a second expense processing flow are executed on the CCR message;
the CCR message is not a zero flow message, the request type is the updating request, and the second expense processing flow is executed on the CCR message;
and executing a first expense processing flow on the CCR message, wherein the CCR message is not a zero flow message, and the request type is the ending request.
4. The method for online charging of traffic according to claim 3, wherein the user profile access process comprises:
sending request information to an internal memory database according to the CCR message, wherein the request information is used for requesting user data;
receiving response information of the memory, wherein the response information comprises the user data;
and storing the user data in a cache.
5. The method for online charging of traffic according to claim 3, wherein the first fee processing procedure includes:
determining the current use flow of the user based on the CCR message;
calculating the current flow charge of the user according to the current use flow of the user and the historical use flow of the user;
determining a pre-deduction result according to the user balance, the user traffic accumulated amount, the user traffic donation amount and the current traffic cost of the user;
and storing the current use flow of the user, the current flow cost of the user and the pre-deduction result to a cache.
6. The method for online charging of traffic according to claim 5, wherein the second charge processing procedure includes:
determining the current use flow of the user based on the CCR message;
calculating user flow cost according to the current user flow, the historical user flow and the preset reserved flow of the user;
determining a flow reservation result according to the user balance and the user flow cost;
and storing the current use flow of the user, the flow fee of the user and the pre-deduction result to a cache.
7. An apparatus for online charging of traffic, comprising:
a receiving unit, configured to receive a credit control request CCR message;
the identification unit is used for identifying the message type of the CCR message based on the service code of the CCR message;
a processing unit, configured to perform a charging processing procedure on the CCR message according to the message type and the request type of the CCR message;
a sending unit, configured to send a credit control answer CCA message according to a result of the charging processing procedure;
the processing unit is specifically configured to:
the message type is free flow signaling and the request type is an initial request, and a user data access process is executed on the CCR message;
the message type is the free flow signaling and the request type is an updating request, and cache information is updated according to the CCR message;
and the message type is the free flow signaling and the request type is an end request, and a first fee processing flow is executed on the CCR message.
8. The apparatus for online charging of traffic according to claim 7, wherein the sending unit is further configured to:
and the message type is invalid signaling, and the CCA message is sent according to the CCR message.
9. The device for online charging of traffic according to claim 7, wherein the message type is normal signaling; the processing unit is specifically configured to:
judging whether the CCR message is a zero flow message;
the CCR message is a zero flow message, and the cache information is updated according to the CCR message;
the CCR message is not a zero flow message, the request type is the initial request, and a user data access flow and a second expense processing flow are executed on the CCR message;
the CCR message is not a zero flow message, the request type is the updating request, and the second expense processing flow is executed on the CCR message;
and executing a first expense processing flow on the CCR message, wherein the CCR message is not a zero flow message, and the request type is the ending request.
10. The apparatus for online charging of traffic according to claim 9, wherein the user profile updating procedure comprises:
sending request information to an internal memory database according to the CCR message, wherein the request information is used for requesting user data;
receiving response information of the memory, wherein the response information comprises the user data;
and storing the user data in a cache.
11. The device for online charging of traffic according to claim 9, wherein the first fee processing procedure includes:
determining the current use flow of the user based on the CCR message;
calculating the current flow charge of the user according to the current use flow of the user and the historical use flow of the user;
determining a pre-deduction result according to the user balance, the user traffic accumulated amount, the user traffic donation amount and the current traffic cost of the user;
and storing the current use flow of the user, the current flow cost of the user and the pre-deduction result to a cache.
12. The apparatus for online charging of traffic according to claim 11, wherein the second charge processing procedure includes:
determining the current use flow of the user based on the CCR message;
calculating the current flow charge of the user according to the current use flow of the user, the historical use amount of the user and a preset reserved amount;
determining a flow reservation result according to the user balance and the user flow cost;
and storing the current use flow of the user, the flow fee of the user and the pre-deduction result to a cache.
13. An apparatus for online charging of traffic, comprising:
a memory, a processor, a communication interface, and a bus;
the memory, the processor and the communication interface are connected through a bus and complete mutual communication;
the memory is used for storing program codes;
the processor executes a program corresponding to the executable program code by reading the executable program code stored in the memory, so as to execute a method for online charging of traffic, wherein the method for online charging of traffic comprises the following steps:
receiving a Credit Control Request (CCR) message;
identifying a message type of the CCR message based on a service code of the CCR message;
executing a charging processing flow for the CCR message according to the message type and the request type of the CCR message;
sending a credit control response CCA message according to the result of the charging processing flow;
the executing the charging processing flow for the CCR message according to the message type and the request type of the CCR message comprises the following steps:
the message type is free flow signaling and the request type is an initial request, and a user data access process is executed on the CCR message;
the message type is the free flow signaling and the request type is an updating request, and cache information is updated according to the CCR message;
and the message type is the free flow signaling and the request type is an end request, and a first fee processing flow is executed on the CCR message.
CN201710283456.7A 2017-04-26 2017-04-26 Method, device and equipment for online charging of flow Active CN108809666B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710283456.7A CN108809666B (en) 2017-04-26 2017-04-26 Method, device and equipment for online charging of flow

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710283456.7A CN108809666B (en) 2017-04-26 2017-04-26 Method, device and equipment for online charging of flow

Publications (2)

Publication Number Publication Date
CN108809666A CN108809666A (en) 2018-11-13
CN108809666B true CN108809666B (en) 2021-07-23

Family

ID=64069720

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710283456.7A Active CN108809666B (en) 2017-04-26 2017-04-26 Method, device and equipment for online charging of flow

Country Status (1)

Country Link
CN (1) CN108809666B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111192085A (en) * 2019-12-28 2020-05-22 杭州好育信息科技有限公司 Paid price calculation method and device, electronic equipment and computer storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101431745A (en) * 2008-12-09 2009-05-13 杭州东信北邮信息技术有限公司 Account resource reservation and distribution method used for IMS multi-service on-line charging
CN102131174A (en) * 2010-11-16 2011-07-20 华为技术有限公司 Method, device and system for charging prepayment
CN102143466A (en) * 2010-06-10 2011-08-03 华为技术有限公司 On-line charging method, access proxy equipment and system
CN103327464A (en) * 2012-03-22 2013-09-25 中兴通讯股份有限公司 Charging method and system of MTC communication and message processing entity

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2525526A1 (en) * 2011-05-17 2012-11-21 Telefonaktiebolaget L M Ericsson AB (Publ) Prioritisation of charging in an IMS network

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101431745A (en) * 2008-12-09 2009-05-13 杭州东信北邮信息技术有限公司 Account resource reservation and distribution method used for IMS multi-service on-line charging
CN102143466A (en) * 2010-06-10 2011-08-03 华为技术有限公司 On-line charging method, access proxy equipment and system
CN102131174A (en) * 2010-11-16 2011-07-20 华为技术有限公司 Method, device and system for charging prepayment
CN103327464A (en) * 2012-03-22 2013-09-25 中兴通讯股份有限公司 Charging method and system of MTC communication and message processing entity

Also Published As

Publication number Publication date
CN108809666A (en) 2018-11-13

Similar Documents

Publication Publication Date Title
EP1168806A1 (en) Method and apparatus for charging of telecommunications services
CN110381455B (en) Flow monitoring processing method and related device and system
US20040114738A1 (en) Service accounting system and method
CN103415006A (en) Flow accounting service credit control method and device
CN108809666B (en) Method, device and equipment for online charging of flow
CN105813046A (en) Bandwidth control method, device and system
CN101069413A (en) A method and system for rewarding users of services in a communications system
KR20210003396A (en) Method for providing online exchange service
CN108156206B (en) Data transfer method, server, client and system
CN110324153A (en) Charging method and system
CN108964932A (en) A kind of charging method, device and computer readable storage medium
CN108270580B (en) Reminding method, device and system for online charging
CN115131085A (en) Method, device and equipment for processing super package bills
CN101267316A (en) Data service billing method, system, service control point and its data service network element
WO2020233771A1 (en) Method and apparatus for charging communication service usage
CN110288347A (en) Access control apparatus and method
KR102255572B1 (en) A deffered payment type prepaid card service providing method based on HCE
CA2309066C (en) Billing method in a telecommunications system
KR101061717B1 (en) Calculation method of attracting subscribers by communication service unit by session
KR101058941B1 (en) Prepaid Billing Method and System
KR102214229B1 (en) Method for providing online exchange service
CN1601945A (en) System and method of realizing data service realtime payment
CN112311941A (en) Payment method, payment device, electronic equipment and storage medium
CN100512125C (en) Resource billing method based on PARLAY gateway
KR100802092B1 (en) Method and system for billing based on the client-server

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