CN107294735B - Order supplementing method and online charging system - Google Patents

Order supplementing method and online charging system Download PDF

Info

Publication number
CN107294735B
CN107294735B CN201610190794.1A CN201610190794A CN107294735B CN 107294735 B CN107294735 B CN 107294735B CN 201610190794 A CN201610190794 A CN 201610190794A CN 107294735 B CN107294735 B CN 107294735B
Authority
CN
China
Prior art keywords
ticket
rate switching
switching point
call
class
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
CN201610190794.1A
Other languages
Chinese (zh)
Other versions
CN107294735A (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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201610190794.1A priority Critical patent/CN107294735B/en
Publication of CN107294735A publication Critical patent/CN107294735A/en
Application granted granted Critical
Publication of CN107294735B publication Critical patent/CN107294735B/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/1442Charging, metering or billing arrangements for data wireline or wireless communications at network operator level
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M15/00Arrangements for metering, time-control or time indication ; Metering, charging or billing arrangements for voice wireline or wireless communications, e.g. VoIP
    • H04M15/64On-line charging system [OCS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M15/00Arrangements for metering, time-control or time indication ; Metering, charging or billing arrangements for voice wireline or wireless communications, e.g. VoIP
    • H04M15/65Off-line charging system

Abstract

The embodiment of the invention discloses a bill supplementing method and an online charging system, wherein the method comprises the following steps: when an abnormal call bill is received, determining a target rate switching point from rate switching points before the generation time of the abnormal call bill; determining a first quota usage amount according to quota usage amount recorded in a first class of call tickets generated by an OCS before the generation time of the abnormal call tickets and after a target rate switching point; determining a second quota usage amount according to the abnormal call ticket and the quota usage amount recorded in the second class call ticket generated by the gateway before the generation time of the abnormal call ticket and after the target rate switching point; and taking the difference value between the second quota use total amount and the first quota use total amount as a first order supplementing amount, and supplementing the order according to the first order supplementing amount. Therefore, by implementing the embodiment of the invention, the OCS can accurately supplement the bill by acquiring less bills, thereby improving the bill supplementing efficiency.

Description

Order supplementing method and online charging system
Technical Field
The invention relates to the technical field of communication, in particular to a policy supplementing method and an online charging system.
Background
With the continuous development of communication technology, data services are more widely applied. Therefore, accurate charging of data traffic is also an urgent need for operators. Generally, the charging modes of the data service include offline charging and real-time charging.
The off-line charging is to count the data service usage information of the user through the gateway, and record the data service usage information in a call list (CDR), and the gateway sends the CDR to a charging system and the charging system deducts the fee. Offline charging corresponds to postpaid charging, i.e. the user uses first and then deducts the fee, when the balance of the user is insufficient, the data service can still be used, which causes the defaulting and the loss to the operator.
Therefore, compared with offline charging, the majority of operators prefer to use real-time charging for charging. The real-time charging corresponds to a prepaid charging, i.e. before the user starts the service, a part of the resources is applied in advance, a certain charge is frozen, and the charge is deducted in real time as the service progresses.
The real-time Charging is mainly completed through signaling interaction between a gateway and an Online Charging System (OCS), and a specific flow is shown in fig. 1:
101. when a user of a user terminal uses a Data service, the user terminal transmits a Packet Data Protocol (PDP) activation request to a gateway.
102. After receiving the PDP activation request, the gateway sends a Credit Control Request (CCR) initialization Initial message to the OCS, requesting to establish a control connection with the OCS.
103. After receiving the CCR Initial message, the OCS returns a Credit Control Answer (CCA) Initial message to the gateway, where the CCA Initial message is used to indicate whether the user is allowed to use the data service.
104. After the gateway receives the CCA Initial message indicating that the user is allowed to use the data service, the gateway returns a PDP activation response to the user terminal.
105. And the user terminal receives the PDP activation response, and the PDP activation is successful.
106. After the PDP is successfully activated, the user terminal initiates a data service request to the gateway.
107. The gateway sends a CCR Update message to the OCS for applying quota to the OCS.
108. And after receiving the CCR Update message, the OCS returns a CCA Update message to the gateway, wherein the CCA Update message carries the quota distributed by the OCS.
109. After receiving the CCA Update message, the gateway monitors whether the data traffic used by the user terminal is about to reach the quota.
110. When the gateway monitors that the data traffic volume used by the user terminal is about to reach the quota, the gateway sends a CCRUpdate message to the OCS, and the CCR Update message carries the used quota.
111. And after receiving the CCR Update message, the OCS carries out pricing approval, fee deduction and ticket generation.
112. And the OCS returns a CCA Update message to the gateway, wherein the CCA Update message carries the quota distributed by the OCS.
113. After receiving the CCAUpdate message, the gateway continues to monitor whether the data traffic volume used by the user terminal is about to reach the quota.
114. When the process of using the data service by the user of the user terminal is finished, the user terminal sends a PDP deactivation request to the gateway.
115. After receiving the PDP deactivation request, the gateway sends a CCR Terminal message to the OCS, wherein the CCRTalarm message carries the used quota.
116. And after receiving the CCR Terminal message, the OCS carries out pricing approval and fee deduction and generates a ticket.
117. The OCS returns a CCA Terminal message to the gateway.
118. The gateway responds to the user terminal PDP deactivation request.
In the real-time charging process, when abnormal situations occur, such as failure of the gateway to send the CCR Update message to the OCS, or success in sending the CCR Update message but no reception of the CCA Update message after a preset time, the OCS may deduct the quota used by the user this time, or may not deduct the quota used by the user this time. Therefore, in order to improve the accuracy of real-time charging, the gateway generates an offline ticket, so that when the abnormal condition occurs, the OCS can make up a ticket according to the offline ticket generated by itself and the offline ticket generated by the gateway, that is, the quota used by the user but not deducted the charge is deducted. The mode that the gateway supports triggering to generate the offline ticket comprises the following steps: the method comprises a timing trigger mode (such as generating an offline call bill within 20 minutes), a quantitative trigger mode (such as generating an offline call bill within 10M) or a trigger mode when a user is offline, wherein the timing and quantitative modes can be configured at the same time, and the generation of the offline call bill is triggered when any condition is reached. In the real-time charging process, when the abnormal condition occurs, the gateway can generate an abnormal bill and convert the charging mode into an offline charging mode. For example, the mode of generating the offline call ticket by triggering the gateway is that a call ticket falls in 10 minutes, and when the abnormal condition occurs in the 20 th minute, the gateway marks the offline call ticket generated in the 20 th minute as an abnormal call ticket.
In the existing supplementary flow, when the OCS performs supplementary billing, all offline tickets of the same session (the whole process from the successful activation of the PDP to the deactivation of the PDP is called a session) generated by the gateway before the generation time of the abnormal ticket are obtained, and all tickets of the session generated by the OCS are obtained to perform supplementary billing. However, in practice, the number of the call tickets generated by the gateway and the OCS is very large, and the efficiency of performing the call ticket compensation according to all the call tickets generated by the gateway and the OCS is very low.
Disclosure of Invention
The embodiment of the invention discloses a bill supplementing method and an online charging system, which can improve the bill supplementing efficiency.
The first aspect of the embodiments of the present invention provides a policy replenishment method, which is applied to an online charging system OCS, and the method includes:
when an abnormal call bill is received, determining a target rate switching point from rate switching points before the generation time of the abnormal call bill; determining a first quota usage amount according to quota usage amounts recorded in a first class of call tickets, wherein the first class of call tickets are call tickets generated by an OCS before the generation time of abnormal call tickets and after a target rate switching point, and the first class of call tickets and the abnormal call tickets correspond to the same session; determining a second quota usage amount according to the quota usage amount recorded in the abnormal call ticket and a second class call ticket, wherein the second class call ticket is a call ticket generated by the gateway before the generation time of the abnormal call ticket and after a target rate switching point, and the second class call ticket and the abnormal call ticket correspond to the same session; and taking the difference value between the second quota use total amount and the first quota use total amount as a first order supplementing amount, and supplementing the order according to the first order supplementing amount. Therefore, the OCS can accurately supplement the ticket only by acquiring the ticket generated by the OCS and the gateway before the generation time of the abnormal ticket and after the target rate switching point, thereby improving the ticket supplementing efficiency.
In one possible design, when the first class of ticket includes multiple tickets, determining a first quota usage amount according to a quota usage amount recorded in the first class of ticket, may include: and accumulating quota usage amount after the target rate switching point recorded in the first class of call tickets, and determining the obtained accumulated value as a first quota usage total amount. In the design, if a ticket exists in the first class of tickets, and a target rate switching point exists between the starting time of the ticket and the generation time of the ticket, the OCS acquires the quota usage from the target rate switching point recorded in the ticket to the generation time of the ticket, accumulates the acquired quota usage and the quota usage recorded in all the tickets except the ticket in the first class of tickets, and determines the obtained accumulated value as a first quota usage total. In the design, if the first class of call tickets has no call ticket with the target rate switching point between the call ticket starting time and the call ticket generating time, the OCS accumulates quota usage of all call ticket records included in the first class of call tickets, and determines the obtained accumulated value as the first quota usage total. Therefore, by implementing the design, the OCS can accurately calculate the quota total usage of the user terminal after the target rate switching point according to the plurality of first-class call tickets.
In a possible design, when the first type of ticket only includes one ticket, determining a first quota usage amount according to a quota usage amount recorded in the first type of ticket, may include: and when a target rate switching point does not exist between the starting time of the call tickets and the generating time of the call tickets of the first class, determining the quota usage amount of the user terminal recorded by the call tickets of the first class from the starting time of the call tickets to the generating time of the call tickets as a first quota usage total amount. Therefore, by implementing the design, the OCS can accurately calculate the quota total usage amount of the user terminal after the target rate switching point according to the first class of call tickets.
In a possible design, when the first type of ticket only includes one ticket, determining a first quota usage amount according to a quota usage amount recorded in the first type of ticket, may include: when a target rate switching point exists between the starting time of the first class of call tickets and the generating time of the call tickets, determining the quota usage of the user terminal recorded by the first class of call tickets from the target rate switching point to the generating time of the call tickets as a first quota usage total. Therefore, by implementing the design, the OCS can accurately calculate the quota total usage amount of the user terminal after the target rate switching point according to the first class of call tickets.
In one possible design, when the second-class ticket includes multiple tickets, determining a second quota usage amount according to the abnormal ticket and the quota usage amount recorded in the second-class ticket, which may include: and accumulating the quota usage amount after the target rate switching point recorded in the second class of call tickets and the quota usage amount recorded in the abnormal call ticket, and determining the obtained accumulated value as a second quota usage total amount. In the design, if a ticket exists in the second class of tickets, and a target rate switching point exists between the starting time of the ticket and the generating time of the ticket, the OCS acquires the quota usage from the target rate switching point recorded in the ticket to the generating time of the ticket, accumulates the acquired quota usage with the quota usage recorded by all tickets except the ticket in the abnormal ticket and the second class of tickets, and determines the acquired accumulated value as a second quota usage total. In the design, if the second-class call ticket does not have the call ticket of which the target rate switching point is between the call ticket starting time and the call ticket generating time, the OCS accumulates the quota usage amount of all the call tickets and abnormal call ticket records included in the second-class call ticket, and determines the obtained accumulated value as the second quota usage amount. Therefore, by implementing the design, the OCS can accurately calculate the quota total usage of the user terminal after the target rate switching point according to the abnormal call ticket and the plurality of second-class call tickets.
In a possible design, when the second-class ticket only includes one ticket, determining a second quota usage amount according to the abnormal ticket and the quota usage amount recorded in the second-class ticket, which may include: when the target rate switching point does not exist between the starting time of the second class of call tickets and the generating time of the call tickets, the OCS accumulates the quota usage amount recorded by the second class of call tickets from the starting time of the call tickets to the generating time of the call tickets and the quota usage amount recorded by the abnormal call tickets, and determines the obtained accumulated value as the first quota usage amount. Therefore, by implementing the design, the OCS can accurately calculate the quota total usage of the user terminal after the target rate switching point according to the abnormal call ticket and the second class call ticket.
In a possible design, when the second type of ticket only includes one ticket, the OCS determines a second quota usage amount according to the abnormal ticket and the quota usage amount recorded in the second type of ticket, which may include: when a target rate switching point exists between the starting time of the second-class call ticket and the generating time of the call ticket, the OCS accumulates the quota usage amount recorded by the abnormal call ticket and the quota usage amount recorded from the target rate switching point to the generating time of the call ticket recorded by the second-class call ticket, and determines the obtained accumulated value as a first quota usage total amount. Therefore, by implementing the design, the OCS can accurately calculate the quota total usage of the user terminal after the target rate switching point according to the abnormal call ticket and the second class call ticket.
In one possible design, before the OCS determines the first quota usage amount according to the quota usage amount recorded in the first class of tickets, the OCS may further obtain a ticket corresponding to the target rate switching point as the first class of tickets according to a correspondence between a pre-stored rate switching point and a ticket spanning the rate switching point generated by the OCS, wherein the ticket spanning the rate switching point is a ticket whose generation time is after the rate switching point. Therefore, the OCS can more quickly search the call ticket switched by the target rate from the call tickets stored in the OCS according to the pre-stored corresponding relation between the call ticket switched by the target rate and the target rate, and the efficiency of supplementing the call ticket is further improved.
In one possible design, before the OCS determines the target rate switching point from the rate switching points before the generation time of the abnormal call ticket, the OCS may also receive a credit control request CCR message sent by the gateway after the target rate switching point, where the CCR message carries a quota usage amount after the target rate switching point; generating a call ticket of a cross-target rate switching point according to the CCR message; and establishing and storing a corresponding relation between the call bill of the cross-target rate switching point and the target rate switching point. Therefore, by pre-establishing the corresponding relation between the call ticket of the cross-target rate switching point and the target rate switching point, the OCS can more quickly search the call ticket of the cross-target rate switching from the call tickets stored in the OCS according to the corresponding relation, thereby improving the efficiency of the bill supplement.
In a possible design, determining the target rate switching point from the rate switching points before the generation time of the abnormal call ticket may include: and determining the rate switching point which is before the generation time of the abnormal call ticket and has the minimum time interval from the generation time of the abnormal call ticket as a target rate switching point. Thus, the repair efficiency can be improved greatly.
In a possible design, after the OCS determines a target rate switching point from rate switching points before the generation time of the abnormal call ticket, if there is no first class call ticket, the OCS may also determine whether the generation time of the last call ticket generated by the OCS is the target rate switching point; if the generation time of the last ticket generated by the OCS is the target rate switching point, acquiring a third class of tickets generated before the generation time of the abnormal tickets and after the target rate switching point from the stored tickets generated by the gateway, wherein the third class of tickets and the abnormal tickets correspond to the same session; and accumulating the quota usage amount recorded in the abnormal call ticket and the third class call ticket to obtain a second order supplementing amount, and supplementing the order according to the second order supplementing amount. Therefore, when the first-class call ticket does not exist, the OCS can accurately supplement the call ticket only by acquiring less call tickets.
A second aspect of the embodiments of the present invention provides an OCS in an online charging system, where the OCS has a function of implementing OCS behavior in the above method design. The function can be realized by hardware, and can also be realized by executing corresponding software by hardware. The hardware or software includes one or more modules corresponding to the functions described above. The module may be software and/or hardware.
A third aspect of the embodiments of the present invention provides an OCS, which includes a processor, a receiver, and a memory, where the processor is configured to support the OCS to perform corresponding functions in the foregoing method. The receiver is used to support communication between the OCS and other network elements. The memory is for coupling with the processor and it holds the necessary program instructions and data for the OCS.
A fourth aspect of the embodiments of the present invention provides a computer storage medium for storing computer software instructions for an OCS, which includes a program designed to perform the above aspects.
Compared with the prior art, in the embodiment of the invention, when the OCS receives the abnormal call ticket, all the offline call tickets which belong to the same session with the abnormal call ticket and are generated by the gateway before the generation time of the abnormal call ticket and after the rate switching point are obtained, and all the call tickets which belong to the same session with the abnormal call ticket and are generated by the OCS before the generation time of the abnormal call ticket and after the rate switching point are obtained to supplement the call tickets. Therefore, by implementing the embodiment of the invention, the OCS can accurately supplement the bill by acquiring less bills, thereby improving the bill supplementing efficiency.
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 embodiments will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a schematic flowchart of a real-time charging method according to an embodiment of the present invention;
FIG. 2 is a system architecture diagram provided by an embodiment of the present invention;
FIG. 3 is a schematic flow chart of an order supplementing method according to an embodiment of the present invention;
FIG. 4 is a schematic flow chart diagram of another order supplementing method provided by the embodiment of the invention;
FIG. 5 is a schematic flow chart diagram illustrating another method for supplementing orders according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of an online charging system according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of another online charging system provided in the embodiment of the present invention;
fig. 8 is a schematic structural diagram of another online charging system 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 some, 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.
In order to solve the problem of very low efficiency of the policy supplementing method, embodiments of the present invention provide a policy supplementing method and an online charging system. The bill supplementing method and the online charging system are based on the same inventive concept, and because the principles of solving the problems of the bill supplementing method and the online charging system are similar, the implementation of the online charging system and the bill supplementing method can be mutually referred, and repeated parts are not repeated.
For clearly describing the scheme of the embodiment of the present invention, a service scenario and a system architecture to which the embodiment of the present invention may be applied are described below with reference to fig. 2. It is to be understood that the network architecture and the service scenario described in the embodiment of the present invention are for more clearly illustrating the technical solution of the embodiment of the present invention, and do not form a limitation on the technical solution provided in the embodiment of the present invention, and it is known by a person of ordinary skill in the art that the technical solution provided in the embodiment of the present invention is also applicable to similar technical problems along with the evolution of the network architecture and the appearance of a new service scenario.
Fig. 2 shows a possible system architecture provided by an embodiment of the present invention. As shown in fig. 2, the system architecture includes a user terminal, a gateway, and an online charging system OCS. The user terminal may include, but is not limited to, a mobile phone, a tablet computer, a notebook computer, or a desktop computer. The Gateway may include, but is not limited to, a Packet Data Gateway (PGW), a Gateway GPRS Support Node (GGSN), and the like.
Based on the system architecture shown in fig. 2, the real-time charging is mainly completed through signaling interaction between the user terminal, the gateway, and the OCS, and the specific flow is shown in fig. 1. In the real-time charging process, the OCS generates a ticket, and meanwhile, in order to improve the accuracy of real-time charging, the gateway generates an offline ticket. Each ticket generated by the gateway and the OCS records the start time of the ticket, the generation time (end time) of the ticket, and the quota usage amount from the start time of the ticket to the generation time of the ticket by the user terminal, wherein the quota usage amount may be data traffic usage amount or duration usage amount, and the like. For example, if the start time of a ticket recording is 2015-10-3111: 01:00 and the generation time of the ticket is 2015-10-3111: 03:00, the ticket records the quota usage of the user terminal from 2015-10-3111: 01:00 to 2015-10-3111: 03: 00. And when a rate switching point exists between the starting time of a call ticket and the generating time of the call ticket, the call ticket can also record the quota usage of the user terminal from the starting time of the call ticket to the rate switching point and the quota usage of the user terminal from the rate switching point to the generating time of the call ticket. The tariff switching point is a time point at which tariff switching occurs, for example, the tariff is 1 yuan/M before the tariff switching point and 2 yuan/M after the tariff switching point. For example, if there exists a ticket, the starting time of the ticket is 2015-10-3111: 01:00, the generating time of the ticket is 2015-10-3111: 03:00, and the target rate switching point is 2015-10-3111: 02:00, the ticket records the quota usage of the user terminal 2015-10-3111: 01:00 to 2015-10-3111: 02:00 and the quota usage of the user terminal 2015-10-3111: 02:00 to 2015-10-3111: 03:00, respectively.
Based on the system architecture shown in fig. 2, the mode that the gateway supports triggering to generate the offline ticket may include: a timing trigger mode (for example, an offline call bill is generated within 20 minutes), a quantitative trigger mode (for example, an offline call bill is generated within 10M) or a trigger mode when a user is offline. In the real-time charging process, the gateway marks the off-line call ticket generated when the abnormal condition occurs as an abnormal call ticket, and converts the charging mode into an off-line charging mode. For example, the gateway may mark the offline ticket as an abnormal ticket by setting PS-FCI (PS-fire-Charging-Information, online and offline FCI Charging identifier) Information in the offline ticket to 16 or 15. After the gateway generates the offline ticket, the offline ticket is added to the file, and then the whole file is sent to the OCS for storage. For example, if the gateway generates a file every 60 seconds, the gateway adds all the offline tickets generated within 60 seconds to the file, and sends the file to the OCS for storage.
Based on the system architecture shown in fig. 2, when the OCS receives an abnormal ticket, the OCS supplements the ticket according to the ticket generated by itself and the quota usage amount recorded in the offline ticket generated by the gateway.
For example, if the user downloads videos from 2015-10-3123: 00:00 to 2015-11-0123:10:00 through the internet in a real-time charging manner, the cumulative duration is 87000 seconds, and 2015-11-0123:10:00 is changed to offline charging due to network failure. If the gateway is based on a quantitative trigger mode, an offline call ticket is generated every 20M, and the gateway generates a file every 60 seconds, then 174000 call tickets and 1450 files are generated cumulatively from 2015-10-3123: 00:00 to 2015-11-0123:10:00 when the network speed is 40M/S, wherein each file comprises 120 call tickets. Wherein, because a network failure occurs at 2015-11-0123:10:00, the gateway marks the offline call ticket generated at 2015-11-0123:10:00 as an abnormal call ticket. And after the gateway generates a file, the file is sent to the OCS for storage, so that the abnormal call ticket is contained in the finally generated file.
If the OCS generates a ticket every 60 seconds, the OCS generates 1449 tickets, wherein the last ticket is not generated because of the network failure of 2015-11-0123:10:00, so that the OCS needs to perform ticket supplementing processing by relying on the offline ticket generated by the gateway and stored by the OCS.
Wherein, because of network failure at 2015-11-0123:10:00, the user terminal, the gateway and the OCS end the previous session and create a new session for offline charging. 174000 call tickets generated by the gateway and 1449 call tickets generated by the OCS belong to call tickets generated in the same session in 2015-10-3123: 00: 00-2015-11-0123: 10: 00.
In the existing supplementary flow, the OCS obtains all offline call tickets (i.e. 174000 call tickets generated by the gateway) of the same session generated by the gateway before the generation time of the abnormal call ticket, and obtains all call tickets (i.e. 1449 call tickets generated by the OCS) generated by the OCS before the generation time of the abnormal call ticket to perform supplementary call. The OCS accumulates all quota usage amounts recorded by 174000 call tickets generated by the gateway to obtain an accumulated value 1, then accumulates all quota usage amounts recorded by 1449 call tickets generated by the OCS to obtain an accumulated value 2, subtracts the accumulated value 2 from the accumulated value 1 to obtain a supplement amount, carries out rating on the supplement amount to obtain fees to be deducted, and deducts fees corresponding to the deducted fees to complete the supplement. However, because the number of call tickets generated by the gateway and the OCS in one session is very large, the existing policy making method has very low efficiency.
In order to solve the problem of very low efficiency of the policy supplementing method, the policy supplementing scheme provided by the embodiment of the invention takes the rate switching point as a reference, and performs policy supplementing by acquiring all offline tickets of the same session generated before the generation time of the abnormal ticket by the gateway and after the rate switching point and acquiring all tickets of the session generated before the generation time of the abnormal ticket by the OCS and after the rate switching point, thereby achieving the purpose of accurately supplementing tickets by acquiring fewer tickets. For example, if 2015-11-0123: 00:00 is a rate switching point in the above example, the OCS only needs to acquire 1200 call tickets generated by the gateway from 2015-11-0123: 00:00 to 2015-11-0123:10:00 and acquire 9 call tickets generated by the COS from 2015-11-0123: 00 to 2015-11-0123:10:00, so as to accurately supplement the call tickets.
The embodiments of the present invention will be described in further detail below based on the common aspects related to the embodiments of the present invention described above.
Fig. 3 is a schematic flow chart of an order supplementing method according to an embodiment of the present invention. As shown in FIG. 3, the method of population may include portions 301-304.
301. And when the OCS receives the abnormal call ticket, the OCS determines a target charge rate switching point from the charge rate switching points before the generation time of the abnormal call ticket.
Specifically, the OCS receives a file including an offline ticket generated by the gateway and sent by the gateway, and after receiving the file sent by the gateway, the OCS determines whether an abnormal ticket exists in the file, and the OCS may determine whether the file includes the abnormal ticket according to the PS-FCI information. For example, if the PS-FCI information of a ticket included in the file is 15 or 16, the OCS determines that the ticket is an abnormal ticket.
And when the OCS determines that the abnormal call ticket exists in the file, the OCS determines that the abnormal call ticket is received. And after the OCS determines that the abnormal call ticket is received, the OCS determines a target charge rate switching point from the charge rate switching points before the generation time of the abnormal call ticket. Specifically, the OCS extracts the recorded generation time of the abnormal call ticket from the abnormal call ticket, and determines a target rate switching point from rate switching points before the generation time of the abnormal call ticket.
The target rate switching point may be any rate switching point before the generation time of the abnormal call ticket and after the start time of the session corresponding to the abnormal call ticket. For example, if the starting time of the session corresponding to the abnormal ticket is 2015-10-3108: 00:00 and the generation time of the abnormal ticket is 2015-10-3123: 00:00, if 2 rate switching points, namely 2015-10-3111: 00:00 and 2015-10-3117: 00:00, exist between 2015-10-3108: 00:00 and 2015-10-3123: 00, the OCS may select 2015-10-3111: 00:00 as the target rate switching point or 2015-10-3117: 00:00 as the target rate switching point.
As an optional implementation manner, a specific implementation manner of determining, by the OCS, a target rate switching point from rate switching points before the generation time of the abnormal ticket may be:
and the OCS determines the rate switching point which is before the generation time of the abnormal call ticket and has the minimum time interval from the generation time of the abnormal call ticket as a target rate switching point.
For example, the generation time of the abnormal call ticket is 2015-10-3123: 00:00, 2 rate switching points exist before the generation time of the abnormal call ticket, which are 2015-10-3111: 00:00 and 2015-10-3117: 00:00, respectively, and then the OCS can select 2015-10-3117: 00:00 as the target rate switching point.
If 1000 call tickets are generated in the period of time 2015-10-3111: 00:00 to 2015-10-3117: 00:00 and 500 call tickets are generated in the period of time 2015-10-3117: 00:00 to 2015-10-3123: 00, by implementing the embodiment, the OCS can accurately supplement the call tickets only with 500 call tickets without acquiring 1500 call tickets generated in the period of time 2015-10-3111: 00:00 to 2015-10-3123: 00: 00. It can be seen that the repair efficiency can be more improved by implementing this embodiment.
302. And the OCS determines the total usage amount of the first quota according to the quota usage amount recorded in the first class of call tickets.
In this embodiment of the present invention, the execution sequence of the part 302 and the part 303 is not sequential, that is, after the OCS determines the target rate handover point, the part 302 may be executed first and then the part 303 may be executed, or the part 303 may be executed first and then the part 302 may be executed.
In the embodiment of the invention, after the OCS determines the target rate switching point, the OCS acquires the first class of call tickets, wherein the first class of call tickets are all call tickets generated by the OCS before the generation time of the abnormal call tickets and after the target rate switching point, and the first class of call tickets and the abnormal call tickets correspond to the same session. There may be only one or more of the first type tickets. For example, before the generation time of the abnormal call tickets, and after the target rate switching point, all the call tickets generated by the OCS include call ticket 1, call ticket 2 and call ticket 3, and then the first class of call tickets include call ticket 1, call ticket 2 and call ticket 3; if the OCS is before the generation time of the abnormal call tickets and all the call tickets generated after the target rate switching point only comprise the call ticket 1, the first class call ticket only comprises the call ticket 1.
After the first class of call tickets are obtained, the OCS determines a first quota usage total amount according to a quota usage amount after a target rate switching point recorded in the first class of call tickets, namely the first quota usage total amount is used by the user terminal after the target rate switching point.
303. And the OCS determines the second quota total usage amount according to the quota usage amount recorded in the abnormal call ticket and the second class call ticket.
In the embodiment of the invention, after the OCS determines the target rate switching point, the OCS acquires a second class of call tickets from the offline call tickets stored by the OCS and generated by the gateway, wherein the second class of call tickets are generated by the gateway before the generation time of the abnormal call tickets and after the target rate switching point, and the second class of call tickets and the abnormal call tickets correspond to the same session. There may be only one or more of the second type tickets.
After the second-class call ticket is obtained, the OCS determines a second quota usage total amount according to the abnormal call ticket and the quota usage amount after the target rate switching point recorded in the second-class call ticket, wherein the second quota usage total amount is used by the user terminal after the target rate switching point.
304. And the OCS takes the difference value between the second quota usage total amount and the first quota usage total amount as a first order supplementing amount, and supplements orders according to the first order supplementing amount.
In the embodiment of the present invention, the OCS uses a difference between the total usage amount of the second quota and the total usage amount of the first quota as the first order supplementing amount, and performs order supplementing according to the first order supplementing amount. The specific implementation manner of the OCS performing order supplementing according to the first order supplementing quantity may be: and the OCS acquires the last online ticket generated by the OCS which belongs to the same session with the abnormal ticket, carries out pricing on the first bill supplementing quantity according to the rate of the last online ticket, obtains the fee to be deducted, and deducts the fee corresponding to the deducted fee to finish bill supplementing.
In the method described in fig. 3, when the OCS receives an abnormal ticket, all the offline tickets that belong to the same session as the abnormal ticket and are generated by the gateway before the generation time of the abnormal ticket and after the rate switching point are obtained, and all the tickets that belong to the same session as the abnormal ticket and are generated by the OCS before the generation time of the abnormal ticket and after the rate switching point are obtained to perform ticket compensation. Therefore, by implementing the method described in fig. 3, the OCS can accurately supplement the order by acquiring fewer tickets, thereby improving the efficiency of supplementing the order.
As an optional implementation manner, when the first class of ticket only includes one ticket, the specific implementation manner of determining, by the OCS, the first quota usage amount according to the quota usage amount recorded in the first class of ticket may be:
when a target rate switching point does not exist between the starting time of the first class of call tickets and the generating time of the call tickets, the OCS determines the quota usage amount of the user terminal recorded by the first class of call tickets from the starting time of the call tickets to the generating time of the call tickets as a first quota usage total amount.
By implementing the implementation mode, the OCS can accurately calculate the quota usage total amount of the user terminal after the target rate switching point according to the first class of call tickets.
As an optional implementation manner, when the first class of ticket only includes one ticket, the specific implementation manner of determining, by the OCS, the first quota usage amount according to the quota usage amount recorded in the first class of ticket may be:
when a target rate switching point exists between the starting time of the first class of call tickets and the generating time of the call tickets, the OCS determines the quota usage amount of the user terminal recorded by the first class of call tickets from the target rate switching point to the generating time of the call tickets as a first quota usage total amount.
By implementing the implementation mode, the OCS can accurately calculate the quota usage total amount of the user terminal after the target rate switching point according to the first class of call tickets.
As an optional implementation manner, when the first class of ticket includes multiple tickets, the specific implementation manner of determining, by the OCS, the first quota usage amount according to the quota usage amount recorded in the first class of ticket may be:
and accumulating quota usage amount after the target rate switching point recorded in the first class of call tickets, and determining the obtained accumulated value as a first quota usage total amount.
In this embodiment, if a ticket exists in the first class of tickets, and a target rate switching point exists between the starting time of the ticket and the generating time of the ticket, the OCS acquires the quota usage from the target rate switching point recorded in the ticket to the generating time of the ticket, accumulates the acquired quota usage and the quota usage recorded in all the tickets in the first class of tickets except the ticket, and determines the obtained accumulated value as the first quota usage total amount.
For example, if the first class of tickets includes ticket 1, ticket 2, and ticket 3, and a target rate switching point exists between the ticket start time of ticket 1 and the generation time of ticket, the OCS accumulates the quota usage of the user terminal recorded in the ticket 1 to the generation time of ticket and the quota usage of the user terminal recorded in ticket 2 to obtain an accumulated value 1, then accumulates the accumulated value 1 and the quota usage of the user terminal recorded in ticket 3, and determines the obtained accumulated value as the first quota usage total.
In this embodiment, if there is no bill with the target rate switching point between the bill start time and the generation time of the bill in the first class of bills, the OCS accumulates quota usage amounts of all the records of the bill included in the first class of bills, and determines the obtained accumulated value as the first quota usage amount.
For example, if the first class of tickets includes ticket 1, ticket 2, and ticket 3, the OCS accumulates the quota usage amount recorded by ticket 1 and the quota usage amount recorded by ticket 2 to obtain an accumulated value 1, then accumulates the accumulated value 1 and the quota usage amount recorded by ticket 3, and determines the obtained accumulated value as the first quota usage amount.
By implementing the implementation mode, the OCS can accurately calculate the quota usage total amount of the user terminal after the target rate switching point according to the first class of call tickets.
As an optional implementation manner, when the second-class ticket only includes one ticket, the specific implementation manner of determining, by the OCS, the second quota usage amount according to the abnormal ticket and the quota usage amount recorded in the second-class ticket may be:
when the target rate switching point does not exist between the starting time of the second class of call tickets and the generating time of the call tickets, the OCS accumulates the quota usage amount recorded by the second class of call tickets from the starting time of the call tickets to the generating time of the call tickets and the quota usage amount recorded by the abnormal call tickets, and determines the obtained accumulated value as the first quota usage amount.
By implementing the implementation mode, the OCS can accurately calculate the quota total usage of the user terminal after the target rate switching point according to the abnormal call ticket and the second class call ticket.
As an optional implementation manner, when the second-class ticket only includes one ticket, the specific implementation manner of determining, by the OCS, the second quota usage amount according to the abnormal ticket and the quota usage amount recorded in the second-class ticket may be:
when a target rate switching point exists between the starting time of the second-class call ticket and the generating time of the call ticket, the OCS accumulates the quota usage amount recorded by the abnormal call ticket and the quota usage amount recorded from the target rate switching point to the generating time of the call ticket recorded by the second-class call ticket, and determines the obtained accumulated value as a first quota usage total amount.
By implementing the implementation mode, the OCS can accurately calculate the quota total usage of the user terminal after the target rate switching point according to the abnormal call ticket and the second class call ticket.
As an optional implementation manner, when the second-class ticket includes multiple tickets, the specific implementation manner of determining, by the OCS, the second quota usage amount according to the abnormal ticket and the quota usage amount recorded in the second-class ticket may be:
and accumulating the quota usage amount after the target rate switching point recorded in the second class of call tickets and the quota usage amount recorded in the abnormal call ticket, and determining the obtained accumulated value as a second quota usage total amount.
In this embodiment, if there is a ticket in the second class of tickets, and there is a target rate switching point between the starting time of the ticket and the generating time of the ticket, the OCS obtains the quota usage from the target rate switching point recorded in the ticket to the generating time of the ticket, accumulates the obtained quota usage with the quota usage recorded in the abnormal ticket and all tickets except the ticket in the second class of tickets, and determines the obtained accumulated value as the second quota usage.
For example, if the first class of tickets includes ticket 1 and ticket 2, and a target rate switching point exists between the ticket start time of ticket 1 and the generation time of ticket, the OCS accumulates the quota usage of the user terminal from the target rate switching point recorded in ticket 1 to the generation time of ticket and the quota usage of the user terminal recorded in ticket 2 to obtain an accumulated value 1, then accumulates the accumulated value 1 and the quota usage recorded in the abnormal ticket, and determines the obtained accumulated value as a second quota usage total.
In this embodiment, if there is no bill between the bill starting time and the bill generating time of the target rate switching point in the second class of bills, the OCS accumulates quota usage amounts of all bills and abnormal bill records included in the second class of bills, and determines the obtained accumulated value as a second quota usage amount.
For example, if the first class of ticket includes ticket 1 and ticket 2, the OCS accumulates the quota usage amount recorded by the ticket 1 and the quota usage amount recorded by the ticket 2 to obtain an accumulated value 1, then accumulates the accumulated value 1 and the quota usage amount recorded by the abnormal ticket, and determines the obtained accumulated value as the second quota usage amount.
By implementing the implementation mode, the OCS can accurately calculate the quota total usage of the user terminal after the target rate switching point according to the abnormal call ticket and the second class call ticket.
Fig. 4 is a schematic flow chart of another order supplementing method according to an embodiment of the present invention. As shown in FIG. 4, the method of complementation can include portions 401-408.
401. The OCS receives a credit control request CCR message sent by the gateway after the target rated handover point.
In the embodiment of the invention, the CCR message carries quota usage after a target rate switching point. For example, the OCS generates a ticket every 3 minutes, and the target rate switching point is 2015-11-0123: 00:00, then the CCR message may carry a quota usage of 2015-11-0123: 00:00 to 2015-11-0123: 02:00, or carry a quota usage of 2015-11-0123: 02:00 to 2015-11-0123: 05: 00.
402. And the OCS generates a ticket of the cross-target rate switching point according to the CCR message.
In the embodiment of the invention, the call ticket of the cross-target rate switching point is the call ticket of which the call ticket generation time is behind the target rate switching point.
Specifically, after the OCS generates a call ticket of the cross-target rate switching point according to the CCR message, an identifier is allocated to the call ticket of the cross-target rate switching point, where the identifier is information capable of identifying the call ticket. And the OCS stores the corresponding relation between the call ticket of the target rate-crossing switching point and the identifier.
403. And the OCS establishes and stores the corresponding relation between the call ticket of the cross-target rate switching point and the target rate switching point.
Specifically, the OCS establishes a correspondence between the identifier of the call ticket crossing the target rate switching point and the target rate switching point.
404. And when the abnormal call ticket is received, the OCS determines a target rate switching point from the rate switching points before the generation time of the abnormal call ticket.
In the embodiment of the present invention, the portion 404 is similar to the portion 301 in fig. 3, and reference may be made to the description of the portion 301 in fig. 3, which is not repeated herein.
405. And the OCS acquires a call bill corresponding to the target rate switching point as a first class call bill according to the corresponding relation between the pre-stored rate switching point and the call bill spanning the rate switching point generated by the OCS.
Specifically, the OCS acquires the identifier of the call ticket corresponding to the target rate switching point according to the corresponding relationship between the pre-stored rate switching point and the identifier of the call ticket spanning the rate switching point generated by the OCS, and acquires the call ticket corresponding to the target rate switching point as the first class of call ticket according to the corresponding relationship between the identifier and the call ticket.
406. And the OCS determines the total usage amount of the first quota according to the quota usage amount recorded in the first class of call tickets.
In the embodiment of the present invention, the portion 406 is similar to the portion 302 in fig. 3, and reference may be made to the description of the portion 302 in fig. 3, which is not repeated herein.
407. And the OCS determines the second quota total usage amount according to the quota usage amount recorded in the abnormal call ticket and the second class call ticket.
In the embodiment of the present invention, the portion 407 is similar to the portion 303 in fig. 3, and reference may be made to the description of the portion 303 in fig. 3, which is not repeated herein.
408. And the OCS takes the difference value between the second quota usage total amount and the first quota usage total amount as a first order supplementing amount, and supplements orders according to the first order supplementing amount.
In the embodiment of the present invention, the portion 408 is similar to the portion 304 in fig. 3, and reference may be made to the description of the portion 304 in fig. 3, which is not repeated herein.
In practical application, the OCS stores many telephone bills generated by the COS, the storage of the telephone bills may be disordered, and the OCS searches the telephone bills switched across the target rate from the stored telephone bills, which takes much time.
Fig. 5 is a schematic flow chart of another order supplementing method according to an embodiment of the present invention. As shown in FIG. 5, the method of complementation can include portions 501-508.
501. And when the abnormal call ticket is received, the OCS determines a target rate switching point from the rate switching points before the generation time of the abnormal call ticket.
In the embodiment of the present invention, the portion 501 is similar to the portion 301 in fig. 3, and reference may be made to the description of the portion 301 in fig. 3, which is not repeated herein.
502. The OCS detects whether the first class of call ticket exists.
In the embodiment of the invention, the first class of call tickets are all call tickets generated by the OCS before the generation time of the abnormal call tickets and after the target rate switching point, and the first class of call tickets and the abnormal call tickets correspond to the same session.
In the embodiment of the invention, when the OCS detects that the first class ticket does not exist, part 503 is executed; when the OCS detects that there is a first class ticket, step 506 is performed.
503. And the OCS judges whether the generation time of the last ticket generated by the OCS is a target rate switching point.
In the embodiment of the invention, when the OCS judges that the generation time of the last ticket generated by the OCS is the target rate switching point, part 504 is executed.
Optionally, when the OCS determines that the generation time of the last call ticket generated by the OCS is not the target rate switching point, the OCS determines one rate switching point from the rate switching points before the target rate switching point as a second target rate switching point, and obtains the call tickets generated by the OCS before the generation time of the abnormal call ticket and after the second target rate switching point and the call tickets generated by the gateway before the generation time of the normal call ticket and after the second target rate switching point with the second target rate switching point as a reference, and performs call compensation according to the obtained call tickets.
504. And the OCS acquires a third class of call tickets generated before the generation time of the abnormal call tickets and after the target rate switching point from the stored call tickets generated by the gateway.
In the embodiment of the invention, the third class ticket and the abnormal ticket correspond to the same session.
505. And the OCS accumulates the quota usage amount recorded in the abnormal call ticket and the third class call ticket to obtain a second order supplementing amount, and supplements orders according to the second order supplementing amount.
And when the first class of call ticket does not exist, the generation time of the last call ticket generated by the OCS is equal to or before the target charge rate switching point. In order to realize accurate ticket compensation and improve the ticket compensation efficiency, when the generation time of the last ticket generated by the OCS is equal to the target rate switching point, the OCS can directly obtain the ticket before the generation time of the abnormal ticket after the target rate switching point generated by the gateway, or the OCS can obtain the tickets before the generation time of the abnormal ticket after the rate switching point of the OCS and the gateway by taking one rate switching point before the target rate switching point as a reference, so that the ticket compensation can be accurately performed by only obtaining less tickets through the former mode, and therefore, the ticket compensation efficiency is improved by executing 503-505 parts.
506. And the OCS determines the total usage amount of the first quota according to the quota usage amount recorded in the first class of call tickets.
507. And the OCS determines the second quota total usage amount according to the quota usage amount recorded in the abnormal call ticket and the second class call ticket.
508. And the OCS takes the difference value between the second quota usage total amount and the first quota usage total amount as a first order supplementing amount, and supplements orders according to the first order supplementing amount.
In the embodiment of the present invention, portions 506 to 508 are similar to portions 302 to 304 in fig. 3, and reference may be made to the description of portions 302 to 304 in fig. 3, which is not repeated herein.
Referring to fig. 6, fig. 6 is a schematic structural diagram of an OCS in an online charging system according to an embodiment of the present invention. The OCS shown in fig. 6 may include a determination module 601 and a complement module 602. Wherein:
the determining module 601 is configured to determine a target rate switching point from rate switching points before the generation time of the abnormal call ticket when the abnormal call ticket is received.
As an optional implementation manner, the manner of determining, by the determining module, the target rate switching point from the rate switching points before the generation time of the abnormal ticket 601 is specifically as follows:
and determining the rate switching point which is before the generation time of the abnormal call ticket and has the minimum time interval from the generation time of the abnormal call ticket as a target rate switching point.
The determining module 601 is further configured to determine a first quota usage amount according to the quota usage amount recorded in the first class of tickets.
In the embodiment of the invention, the first class of call ticket is the call ticket generated by the OCS before the generation time of the abnormal call ticket and after the target rate switching point, and the first class of call ticket and the abnormal call ticket correspond to the same session.
As an optional implementation manner, the determining module 601 determines the first quota usage amount according to the quota usage amount recorded in the first class of tickets specifically as follows:
and accumulating quota usage amount after the target rate switching point recorded in the first class of call tickets, and determining the obtained accumulated value as a first quota usage total amount.
As an optional implementation manner, when the first-class ticket only includes one ticket, the specific implementation manner of determining, by the determining module 601, the first quota usage amount according to the quota usage amount recorded in the first-class ticket may be:
when a target rate switching point does not exist between the starting time of the first class of call tickets and the generating time of the call tickets, the OCS determines the quota usage amount of the user terminal recorded by the first class of call tickets from the starting time of the call tickets to the generating time of the call tickets as a first quota usage total amount.
As an optional implementation manner, when the first-class ticket only includes one ticket, the specific implementation manner of determining, by the determining module 601, the first quota usage amount according to the quota usage amount recorded in the first-class ticket may be:
when a target rate switching point exists between the starting time of the first class of call tickets and the generating time of the call tickets, the OCS determines the quota usage amount of the user terminal recorded by the first class of call tickets from the target rate switching point to the generating time of the call tickets as a first quota usage total amount.
The determining module 601 is further configured to determine a second quota usage amount according to the quota usage amount recorded in the abnormal ticket and the second class ticket.
In the embodiment of the invention, the second-class call ticket is a call ticket generated by the gateway before the generation time of the abnormal call ticket and after the target rate switching point, and the second-class call ticket and the abnormal call ticket correspond to the same session.
As an optional implementation manner, the determining module 601 determines the second quota usage amount according to the quota usage amount recorded in the abnormal ticket and the second class ticket specifically as follows:
and accumulating the quota usage amount after the target rate switching point recorded in the second class of call tickets and the quota usage amount recorded in the abnormal call ticket, and determining the obtained accumulated value as a second quota usage total amount.
As an optional implementation manner, when the second-class ticket only includes one ticket, the specific implementation manner of determining the second quota usage amount by the determining module 601 according to the abnormal ticket and the quota usage amount recorded in the second-class ticket may be:
when the target rate switching point does not exist between the starting time of the second class of call tickets and the generating time of the call tickets, the OCS accumulates the quota usage amount recorded by the second class of call tickets from the starting time of the call tickets to the generating time of the call tickets and the quota usage amount recorded by the abnormal call tickets, and determines the obtained accumulated value as the first quota usage amount.
As an optional implementation manner, when the second-class ticket only includes one ticket, the specific implementation manner of determining the second quota usage amount by the determining module 601 according to the abnormal ticket and the quota usage amount recorded in the second-class ticket may be:
when a target rate switching point exists between the starting time of the second-class call ticket and the generating time of the call ticket, the OCS accumulates the quota usage amount recorded by the abnormal call ticket and the quota usage amount recorded from the target rate switching point to the generating time of the call ticket recorded by the second-class call ticket, and determines the obtained accumulated value as a first quota usage total amount.
And the order supplementing module 602 is configured to take a difference between the total usage amount of the second quota and the total usage amount of the first quota as a first order supplementing amount, and perform order supplementing according to the first order supplementing amount.
Referring to fig. 7, fig. 7 is a schematic structural diagram of another OCS according to an embodiment of the present invention. The OCS shown in fig. 7 is optimized by the OCS shown in fig. 6. Compared with the OCS shown in fig. 6, the OCS shown in fig. 7 may further include a receiving module 603, a generating module 604, an establishing module 605, a first obtaining module 606, a determining module 607 and a second obtaining module 608, in addition to all modules of the OCS shown in fig. 6. Wherein:
a receiving module 603, configured to receive a credit control request CCR message sent by the gateway after the target rate switching point, where the CCR message carries a quota usage amount after the target rate switching point.
And a generating module 604, configured to generate a ticket crossing the target rate switching point according to the CCR message.
The establishing module 605 is configured to establish and store a corresponding relationship between the call ticket crossing the target rate switching point and the target rate switching point.
A first obtaining module 606, configured to, before the determining module 601 determines the first quota usage amount according to the quota usage amount recorded in the first class of tickets, obtain, as the first class of tickets, a ticket corresponding to the target rate switching point according to the correspondence between the rate switching point stored by the establishing module 605 and the ticket spanning the rate switching point generated by the OCS.
In the embodiment of the invention, the call ticket crossing the rate switching point is the call ticket of which the call ticket generating time is behind the rate switching point.
In the embodiment of the present invention, after the determining module 601 determines the target rate switching point, the first obtaining module 606 is triggered to obtain a ticket corresponding to the target rate switching point as a first class ticket according to the corresponding relationship between the rate switching point stored in the establishing module 605 and a ticket spanning the rate switching point generated by the OCS.
The determining module 607 is configured to determine whether the generation time of the last ticket generated by the OCS is the target rate switching point when the first class ticket does not exist.
In the embodiment of the present invention, after the determining module 601 determines the target rate switching point, the triggering and determining module 607 determines whether a first class of call ticket exists, and if not, determines whether the generation time of the last call ticket generated by the OCS is the target rate switching point.
A second obtaining module 608, configured to, when the determining module 607 determines that the generation time of the last ticket generated by the OCS is the target rate switching point, obtain, from tickets generated by the stored gateway, a third type of tickets generated before the generation time of the abnormal ticket and after the target rate switching point.
In the embodiment of the invention, the third class ticket and the abnormal ticket correspond to the same session.
The order supplementing module 602 is further configured to accumulate quota usage amounts recorded in the abnormal ticket and the third-class ticket to obtain a second order supplementing amount, and perform order supplementing according to the second order supplementing amount.
Referring to fig. 8, fig. 8 is a schematic structural diagram of another OCS according to the embodiment of the present invention. As shown in fig. 8, the OCS at least includes: a processor 801, a memory 803 connected to the processor 801 via a bus 802, and a receiver 804. Wherein the memory 803 is used for storing a set of program codes, and wherein the processor 801 is used for calling the program codes stored in the memory 803 for performing the following operations:
when an abnormal call ticket is received through the receiver 804, determining a target rate switching point from rate switching points before the generation time of the abnormal call ticket;
determining a first quota usage amount according to quota usage amounts recorded in a first class of call tickets, wherein the first class of call tickets are call tickets generated by an OCS before the generation time of abnormal call tickets and after a target rate switching point, and the first class of call tickets and the abnormal call tickets correspond to the same session;
determining a second quota usage amount according to the quota usage amount recorded in the abnormal call ticket and a second class call ticket, wherein the second class call ticket is a call ticket generated by the gateway before the generation time of the abnormal call ticket and after a target rate switching point, and the second class call ticket and the abnormal call ticket correspond to the same session;
and taking the difference value between the second quota use total amount and the first quota use total amount as a first order supplementing amount, and supplementing the order according to the first order supplementing amount.
As an optional implementation manner, when the first type of ticket only includes one ticket, the processor 801 calls a program code stored in the memory 803, and the manner of determining the first quota usage amount according to the quota usage amount recorded in the first type of ticket specifically is:
and when a target rate switching point does not exist between the starting time of the call tickets and the generating time of the call tickets of the first class, determining the quota usage amount of the user terminal recorded by the call tickets of the first class from the starting time of the call tickets to the generating time of the call tickets as a first quota usage total amount.
As an optional implementation manner, when the first type of ticket only includes one ticket, the processor 801 calls a program code stored in the memory 803, and the manner of determining the first quota usage amount according to the quota usage amount recorded in the first type of ticket specifically is:
when a target rate switching point exists between the starting time of the first class of call tickets and the generating time of the call tickets, determining the quota usage of the user terminal recorded by the first class of call tickets from the target rate switching point to the generating time of the call tickets as a first quota usage total.
As an optional implementation manner, the manner of determining the total usage amount of the first quota according to the usage amount of the quota recorded in the first type ticket by calling the program code stored in the memory 803 by the processor 801 is specifically as follows:
and accumulating quota usage amount after the target rate switching point recorded in the first class of call tickets, and determining the obtained accumulated value as a first quota usage total amount.
As an optional implementation manner, the manner of determining the second quota usage amount by the processor 801 calling the program code stored in the memory 803 according to the quota usage amount recorded in the abnormal ticket and the second class ticket specifically is:
and accumulating the quota usage amount after the target rate switching point recorded in the second class of call tickets and the quota usage amount recorded in the abnormal call ticket, and determining the obtained accumulated value as a second quota usage total amount.
As an optional implementation manner, when the second-type ticket only includes one ticket, the processor 801 calls the program code stored in the memory 803, and determines the second quota usage amount according to the abnormal ticket and the quota usage amount recorded in the second-type ticket specifically:
and when a target rate switching point does not exist between the starting time of the second class of call tickets and the generating time of the call tickets, accumulating the quota usage amount recorded from the starting time of the call tickets to the generating time of the call tickets and the quota usage amount recorded by the abnormal call tickets, and determining the obtained accumulated value as the first quota usage amount.
As an optional implementation manner, when the second-type ticket only includes one ticket, the processor 801 calls the program code stored in the memory 803, and determines the second quota usage amount according to the abnormal ticket and the quota usage amount recorded in the second-type ticket specifically:
and when a target rate switching point exists between the starting time of the second-class call ticket and the generating time of the call ticket, accumulating the quota usage amount recorded by the abnormal call ticket and the quota usage amount from the target rate switching point recorded by the second-class call ticket to the generating time of the call ticket, and determining the obtained accumulated value as a first quota usage total amount.
As an alternative implementation, the processor 801 calls the program code stored in the memory 803, and further performs the following operations before determining the first quota usage amount according to the quota usage amount recorded in the first type ticket:
and according to the corresponding relation between the pre-stored rate switching point and the call ticket spanning the rate switching point generated by the OCS, obtaining the call ticket corresponding to the target rate switching point as a first class call ticket, and generating the call ticket spanning the rate switching point as the call ticket after the rate switching point.
As an alternative implementation, the processor 801 calls the program code stored in the memory 803, and further performs the following operations before determining the target rate switching point from the rate switching points before the generation time of the abnormal call ticket:
receiving a credit control request CCR message sent by a gateway after a target rate switching point through a receiver 804, wherein the CCR message carries quota usage amount after the target rate switching point;
generating a call ticket of a cross-target rate switching point according to the CCR message;
the corresponding relation between the call ticket crossing the target rate switching point and the target rate switching point is established and stored through the memory 803.
As an optional implementation manner, the way for the processor 801 to call the program code stored in the memory 803 and determine the target tariff switching point from the tariff switching points before the generation time of the abnormal ticket is specifically:
and determining the rate switching point which is before the generation time of the abnormal call ticket and has the minimum time interval from the generation time of the abnormal call ticket as a target rate switching point.
As an alternative implementation, the processor 801 calls the program code stored in the memory 803, and after determining the target rate switching point from the rate switching points before the generation time of the abnormal call ticket, further performs the following operations:
if the first class of call ticket does not exist, judging whether the generation time of the last call ticket generated by the OCS is a target rate switching point or not;
if the generation time of the last ticket generated by the OCS is the target rate switching point, a third type ticket generated before the generation time of the abnormal ticket and after the target rate switching point is obtained from the ticket generated by the gateway stored in the memory 803, and the third type ticket and the abnormal ticket correspond to the same session;
and accumulating the quota usage amount recorded in the abnormal call ticket and the third class call ticket to obtain a second order supplementing amount, and supplementing the order according to the second order supplementing amount.
As can be seen, by implementing the OCS described in fig. 6 to 8, the OCS can accurately supplement the ticket by acquiring fewer tickets, thereby improving the ticket supplementing efficiency.
The steps of a method or algorithm described in connection with the disclosure herein may be embodied in hardware or in software instructions executed by a processor. The software instructions may be comprised of corresponding software modules that may be stored in Random Access Memory (RAM), flash Memory, Read Only Memory (ROM), Erasable Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), registers, a hard disk, a removable disk, a compact disc read only Memory (CD-ROM), or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor such the processor can read information from, and write information to, the storage medium. Of course, the storage medium may also be integral to the processor. The processor and the storage medium may reside in an ASIC. Additionally, the ASIC may reside in a core network interface device. Of course, the processor and the storage medium may reside as discrete components in a core network interface device.
Those skilled in the art will recognize that, in one or more of the examples described above, the functions described in this invention may be implemented in hardware, software, firmware, or any combination thereof. When implemented in software, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage media may be any available media that can be accessed by a general purpose or special purpose computer.
The above-mentioned embodiments, objects, technical solutions and advantages of the present invention are further described in detail, it should be understood that the above-mentioned embodiments are only exemplary embodiments of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made on the basis of the technical solutions of the present invention should be included in the scope of the present invention.

Claims (14)

1. A billing method is applied to an OCS (online charging system), and is characterized by comprising the following steps:
when an abnormal call bill is received, determining a target rate switching point from rate switching points before the generation time of the abnormal call bill;
determining a first quota usage amount according to quota usage amounts recorded in a first class of call tickets, wherein the first class of call tickets are call tickets generated by the OCS before the generation time of the abnormal call tickets and after the target rate switching point, and the first class of call tickets and the abnormal call tickets correspond to the same session;
determining a second quota usage amount according to the quota usage amount recorded in the abnormal call ticket and a second class call ticket, wherein the second class call ticket is a call ticket generated by a gateway before the generation time of the abnormal call ticket and after the target rate switching point, and the second class call ticket and the abnormal call ticket correspond to the same session;
and taking the difference value between the second quota usage total amount and the first quota usage total amount as a first order supplementing amount, and supplementing orders according to the first order supplementing amount.
2. The method of claim 1, wherein determining the first quota usage amount according to quota usage amounts recorded in the first class of tickets comprises:
and accumulating the quota usage amount after the target rate switching point recorded in the first class of call tickets, and determining the obtained accumulated value as a first quota usage total amount.
3. The method of claim 1, wherein determining a second quota usage amount according to the quota usage amount recorded in the abnormal ticket and the second class ticket comprises:
and accumulating the quota usage amount after the target rate switching point recorded in the second class of call tickets and the quota usage amount recorded in the abnormal call ticket, and determining the obtained accumulated value as a second quota usage total amount.
4. The method of claim 1, wherein before determining the first quota usage amount according to the quota usage amount recorded in the first class of tickets, the method further comprises:
and acquiring a ticket corresponding to the target rate switching point as a first class ticket according to the corresponding relation between a pre-stored rate switching point and a ticket spanning the rate switching point generated by the OCS, wherein the ticket spanning the target rate switching point is a ticket with the time behind the target rate switching point generated by the ticket.
5. The method of claim 4, wherein before determining the target tariff switching point from tariff switching points before the generation time of the abnormal call ticket, the method further comprises:
receiving a Credit Control Request (CCR) message sent by a gateway after the target rate switching point, wherein the CCR message carries quota usage amount after the target rate switching point;
generating a call ticket crossing the target rate switching point according to the CCR message;
and establishing and storing a corresponding relation between the call bill crossing the target rate switching point and the target rate switching point.
6. The method according to any one of claims 1 to 5, wherein determining a target rate switching point from rate switching points before the generation time of the abnormal call ticket comprises:
and determining the rate switching point which is before the generation time of the abnormal call ticket and has the minimum time interval from the generation time of the abnormal call ticket as a target rate switching point.
7. The method according to any one of claims 1 to 5, wherein after determining a target rate switching point from rate switching points before the generation time of the abnormal call ticket, the method further comprises:
if the first class of call ticket does not exist, judging whether the generation time of the last call ticket generated by the OCS is the target rate switching point or not;
if the generation time of the last ticket generated by the OCS is the target rate switching point, acquiring a third type ticket generated before the generation time of the abnormal ticket and after the target rate switching point from tickets generated by a stored gateway, wherein the third type ticket and the abnormal ticket correspond to the same session;
and accumulating the quota usage amount recorded in the abnormal call ticket and the third type call ticket to obtain a second order supplementing amount, and supplementing the order according to the second order supplementing amount.
8. An OCS (online charging System), wherein the OCS comprises:
the determining module is used for determining a target rate switching point from rate switching points before the generation time of the abnormal call ticket when the abnormal call ticket is received;
the determining module is further configured to determine a first quota usage amount according to a quota usage amount recorded in a first class of tickets, where the first class of tickets are tickets generated by the OCS before the generation time of the abnormal tickets and after the target rate switching point, and the first class of tickets and the abnormal tickets correspond to the same session;
the determining module is further configured to determine a second quota usage amount according to the quota usage amount recorded in the abnormal ticket and a second class ticket, where the second class ticket is a ticket generated by the gateway before the generation time of the abnormal ticket and after the target rate switching point, and the second class ticket and the abnormal ticket correspond to the same session;
and the order supplementing module is used for taking a difference value between the second quota usage total amount and the first quota usage total amount as a first order supplementing amount and supplementing orders according to the first order supplementing amount.
9. The OCS according to claim 8, wherein the determining module determines the first quota usage amount according to the quota usage amount recorded in the first class ticket in a specific manner:
and accumulating the quota usage amount after the target rate switching point recorded in the first class of call tickets, and determining the obtained accumulated value as a first quota usage total amount.
10. The OCS according to claim 8, wherein the determining module determines the second quota usage amount according to the quota usage amount recorded in the abnormal ticket and the second class ticket in a specific manner that:
and accumulating the quota usage amount after the target rate switching point recorded in the second class of call tickets and the quota usage amount recorded in the abnormal call ticket, and determining the obtained accumulated value as a second quota usage total amount.
11. The OCS of claim 8, wherein the OCS further comprises:
the first obtaining module is used for obtaining a ticket corresponding to the target rate switching point as a first class ticket according to a corresponding relation between a pre-stored rate switching point and a ticket spanning the rate switching point generated by the OCS before the determining module determines the first quota usage amount according to the quota usage amount recorded in the first class ticket, and the ticket spanning the target rate switching point is a ticket with the ticket generation time behind the target rate switching point.
12. The OCS of claim 11, wherein the OCS further comprises:
a receiving module, configured to receive a credit control request CCR message sent by a gateway after a target rate switching point before the first obtaining module obtains a ticket corresponding to the target rate switching point as a first-class ticket, where the CCR message carries a quota usage amount after the target rate switching point;
the generating module is used for generating a call ticket crossing the target rate switching point according to the CCR message;
and the establishing module is used for establishing and storing the corresponding relation between the call bill crossing the target rate switching point and the target rate switching point.
13. The OCS according to any one of claims 8 to 12, wherein the determining module determines the target rate switching point from the rate switching points before the generation time of the abnormal ticket in a specific manner:
and determining the rate switching point which is before the generation time of the abnormal call ticket and has the minimum time interval from the generation time of the abnormal call ticket as a target rate switching point.
14. An OCS as claimed in any one of claims 8 to 12, wherein the OCS further comprises:
the judging module is used for judging whether the generation time of the last ticket generated by the OCS is the target rate switching point or not when the first class ticket does not exist;
a second obtaining module, configured to, when the judging module judges that the generation time of the last ticket generated by the OCS is the target rate switching point, obtain, from stored tickets generated by the gateway, a third type of ticket generated before the generation time of the abnormal ticket and after the target rate switching point, where the third type of ticket and the abnormal ticket correspond to the same session;
and the form supplementing module is also used for accumulating the quota usage amount recorded in the abnormal bill and the third-class bill to obtain a second form supplementing amount and supplementing the form according to the second form supplementing amount.
CN201610190794.1A 2016-03-30 2016-03-30 Order supplementing method and online charging system Active CN107294735B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610190794.1A CN107294735B (en) 2016-03-30 2016-03-30 Order supplementing method and online charging system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610190794.1A CN107294735B (en) 2016-03-30 2016-03-30 Order supplementing method and online charging system

Publications (2)

Publication Number Publication Date
CN107294735A CN107294735A (en) 2017-10-24
CN107294735B true CN107294735B (en) 2020-06-02

Family

ID=60087092

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610190794.1A Active CN107294735B (en) 2016-03-30 2016-03-30 Order supplementing method and online charging system

Country Status (1)

Country Link
CN (1) CN107294735B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110366122B (en) * 2018-03-26 2020-12-15 华为技术有限公司 Pricing method and device
CN110689394B (en) * 2018-07-06 2022-04-12 北京嘀嘀无限科技发展有限公司 Method and device for processing service supplementary notes

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101212532A (en) * 2006-12-30 2008-07-02 中国电信股份有限公司 Combined billing system and method
CN102340758A (en) * 2011-09-26 2012-02-01 华为技术有限公司 Charging method, device and system, and authentication device
CN102572768A (en) * 2012-03-05 2012-07-11 华为技术有限公司 Charging method, authentication method, charging equipment and authentication equipment
CN104349299A (en) * 2013-07-24 2015-02-11 中国电信股份有限公司 Method, apparatus and system for switching rates

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101212532A (en) * 2006-12-30 2008-07-02 中国电信股份有限公司 Combined billing system and method
CN102340758A (en) * 2011-09-26 2012-02-01 华为技术有限公司 Charging method, device and system, and authentication device
CN102572768A (en) * 2012-03-05 2012-07-11 华为技术有限公司 Charging method, authentication method, charging equipment and authentication equipment
CN104349299A (en) * 2013-07-24 2015-02-11 中国电信股份有限公司 Method, apparatus and system for switching rates

Also Published As

Publication number Publication date
CN107294735A (en) 2017-10-24

Similar Documents

Publication Publication Date Title
CN102783195B (en) Local roaming charges in LTE/EPC network
CN102884757B (en) The selection of the server data stream charging method based on requested data, services
US8260254B2 (en) Network billing
US9380168B2 (en) Front-end charging system that generates charging data per entity having a revenue share
US20150223042A1 (en) Independent roaming charging for a roaming user equipment in a visited network
US9461829B2 (en) Method and apparatus for controlling charging in a communication network
CN101075887B (en) Method for cost reserve charge system and cost reserve charge system
EP1915883A1 (en) Online charging management server
US20100145838A1 (en) Method, system, and apparatus for opening accounting data capabilities
US20120123919A1 (en) Method And System For Billing In A Communication Network
CN101277203A (en) Implementation of rate timer control in beforehand bookkeeping unit to support on-line and off-line charge
CN107294735B (en) Order supplementing method and online charging system
CN102149063B (en) Method, device and system for charging prepayment
CN106936603A (en) A kind of data service billing method, device and system
KR100588625B1 (en) Method and system for providing wireless data service for prepaid subscriber who account balance is exhausted
CN111542005B (en) Charging method, device, equipment and storage medium
CN102870441A (en) management method and apparatus for billing package before and after package time limit
CN102131174B (en) Method, device and system for charging prepayment
CN105515795A (en) Method and system for controlling service capability of offline charging user
CN103052048B (en) A kind of charging method of link building messages and device
CN110300235B (en) Communication service charging method and device
CN108270580B (en) Reminding method, device and system for online charging
CN102958028A (en) Service fee owing control method, service fee owing control system, service center and real-time charging equipment
EP2101442B1 (en) Charging processing method, service network element and charging system thereof
CN112153585B (en) Charging system, method, storage medium and electronic device

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