Embodiment
The embodiment of the present invention provides a kind of charging auditing method and charging to check device.
For making goal of the invention of the present invention, feature, advantage can be more obvious and understandable, below in conjunction with the accompanying drawing in the embodiment of the present invention, technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is only the present invention's part embodiment, but not whole embodiment.Embodiment based in the present invention, those of ordinary skills, not making the every other embodiment obtaining under creative work prerequisite, belong to the scope of protection of the invention.
A kind of charging the auditing method below embodiment of the present invention being provided is described, and refers to Fig. 2, and a kind of charging auditing method in the embodiment of the present invention comprises:
201, obtain online charging inventory;
As shown in Figure 1, when user uses gprs service online, GGSN can trigger GPRS online charging flow process, by the online charging module of DCC protocol message and GPRS Online Charging System, is undertaken alternately.After user offline, the cost information that the session information of this online of user that online charging module can send over according to GGSN and this session information is carried out obtains after batched valuation processing, generates online keep cost order file.
In embodiments of the present invention, charging checks that device obtains the above-mentioned online charging inventory that above-mentioned online charging module generates, wherein, charging checks that the mode that device obtains above-mentioned online charging inventory can be: by above-mentioned online charging module, send to charging to check device in above-mentioned online charging inventory, or, also can after other device obtains above-mentioned online charging inventory from above-mentioned online charging module, be transmitted to charging and check device, be not construed as limiting herein.
Wherein, above-mentioned online charging inventory comprises the inventory record of above-mentioned this online of user, and wherein, above-mentioned inventory record comprises type of service, business use traffic and expense.Above-mentioned type of service can be indicated by service code.
In embodiments of the present invention, user in the flow process of once surfing the Net corresponding to a PDP session, GGSN can distribute unduplicated Charging-Id as rates ground for each PDP session, therefore, the combination of GGSN address and Charging-Id can PDP session of unique identification, because GGSN may carry out cutting to business use procedure when realizing online charging control function, therefore, a PDP session may be divided into many online charging inventories, certainly, a PDP session also may a corresponding online charging inventory.
202, obtain the GPRS ticket of above-mentioned this online of user of CG generation;
In embodiments of the present invention, when user surfs the Net by gprs service, SGSN and GGSN get off the PDP conversation recording this online of user, generate respectively SGSN ticket and GGSN ticket and send to CG to merge processing, obtain GPRS ticket.
The above-mentioned user's that device Real-time Obtaining CG generates GPRS ticket is checked in charging, wherein, above-mentioned charging checks that the mode that device obtains GPRS can be: by CG, in real time above-mentioned user's GPRS single transmit is checked to device to charging, or, also can from CG, after the above-mentioned user's of Real-time Obtaining GPRS ticket, be transmitted to charging by other device and check device, be not construed as limiting herein.
While generating GPRS ticket due to CG, to business use procedure GGSN, when realizing online charging control function, to business use procedure, may carry out cutting, therefore, a PDP session may be divided into many GPRS tickets, and certainly, a PDP session also may a corresponding GPRS ticket.
203, above-mentioned GPRS ticket is carried out to batched valuation processing, obtain wholesale price destination file;
Charging checks that device carries out batched valuation processing (according to GPRS ticket computational costs, and calculating the expense that deduct according to this user situation) to the GPRS ticket getting, and obtains wholesale price destination file.
Wherein, the ticket writing that above-mentioned wholesale price destination file comprises above-mentioned this online of user, wherein, above-mentioned ticket writing comprises type of service, business use traffic and expense.
204, to checking that default the online charging inventory and the wholesale price destination file that obtain in the cycle check processing, file is checked in output;
In embodiments of the present invention, charging checks that device setting checks the cycle, to checking that default the online charging inventory and the wholesale price destination file that obtain in the cycle check processing, file is checked in output, the 00:00 that for example can be arranged on every day divides the 00:00 in the previous day is divided to all online charging inventories and the wholesale price destination file that obtain during 23:59 divides and checks processing, and file is checked in output.
Wherein, above-mentioned at least one of checking in the following file of file including: statistic of classification file, differential file and check report file.
In embodiments of the present invention, while the cutting of business use procedure and CG being generated to GPRS ticket due to GGSN when realizing online charging and control function, the cutting of business use procedure is not necessarily consistent, likely for the PDP session with once, online charging inventory is divided into 3, and GPRS ticket is divided into 2.Therefore, in embodiments of the present invention, charging checks that device first carries out the preliminary treatment of business sorting and data merging to the online charging inventory obtaining and wholesale price destination file, to can obtain respectively log-on count, business use traffic and the expense of the various types of traffic of different user from above-mentioned online charging inventory and in above-mentioned wholesale price destination file.In embodiments of the present invention, charging checks that device can carry out business sorting and data merging to the online charging inventory obtaining and wholesale price destination file according to GGSN address, Charging-Id and service code.
Under a kind of application scenarios, when above-mentioned while checking file including statistic of classification file, above-mentionedly check that the process of processing comprises: to checking that default the above-mentioned pretreated all online charging inventories of the process obtaining in the cycle add up, generate the statistic of classification file of online keep cost order; To checking that default the above-mentioned pretreated all wholesale price destination files of the process obtaining in the cycle add up, generate the statistic of classification file of wholesale price destination file.Further, charging checks that device can also extract the data in the statistic of classification file of above-mentioned online charging inventory and the statistic of classification file of above-mentioned wholesale price destination file according to preset statement form, generates and checks report file output.Further, when above-mentioned while checking file including differential file, above-mentionedly check that the process of processing also can comprise: the statistic of classification file of above-mentioned online charging inventory and the statistic of classification file of above-mentioned wholesale price destination file that generate are compared, due in actual applications, the statistic of classification file of above-mentioned online charging inventory should be consistent with the record in the statistic of classification file of above-mentioned wholesale price destination file, therefore, when comparing the statistic of classification file of above-mentioned online charging inventory and the statistic of classification file of above-mentioned wholesale price destination file and exist data inconsistent, may there is error of omission, the situation of incorrect posting, now, charging checks that device can find out the inconsistent record of data, generate differential file.In actual applications, for same type of service, if the total log-on count (or total flow) recording in the statistic of classification file of the total log-on count (or total flow) recording in the statistic of classification file of online charging inventory and wholesale price destination file is inconsistent, can judge and occur that error of omission situation, charging check that device can further carry in above-mentioned differential file and be used to indicate the error of omission indication information that occurs error of omission situation; And for same type of service, if the total log-on count and the total flow that record in the statistic of classification file of the total log-on count recording in the statistic of classification file of online charging inventory and total flow and institute's wholesale price destination file are consistent, but the total cost recording in the total cost recording in the statistic of classification file of online charging inventory and the statistic of classification file of wholesale price destination file is inconsistent, can judge and occur that incorrect posting situation, charging check that device can further carry in above-mentioned differential file and be used to indicate the incorrect posting indication information that occurs incorrect posting situation.Certainly, in embodiments of the present invention, first threshold, Second Threshold and the 3rd threshold value also can be set respectively, when the difference of the total log-on count (or total flow) recording in the total log-on count (or total flow) recording and the statistic of classification file of wholesale price destination file is greater than first threshold (or Second Threshold), just judge the error of omission situation that occurs in comparing the statistic of classification file of online charging inventory; The difference of the total log-on count (or total flow) recording in the total log-on count (or total flow) recording in comparing the statistic of classification file of online charging inventory and the statistic of classification file of wholesale price destination file is less than or equal to first threshold (or Second Threshold), but when the difference of the total cost recording in the total cost recording in the statistic of classification file of online charging inventory and the statistic of classification file of wholesale price destination file is greater than the 3rd threshold value, just judge the incorrect posting situation that occurs.First threshold, Second Threshold and the 3rd threshold value can be set according to the actual requirements, and first threshold, Second Threshold and the 3rd threshold value may equate, also may be unequal, be not construed as limiting herein.
Therefore, the embodiment of the present invention is by obtaining online charging inventory and obtaining GPRS ticket, and the online charging inventory obtaining and the GPRS ticket after batched valuation is processed are checked, and file is checked in output, realized GPRS online charging handling process has been monitored, made staff to find in time the Lou problem such as meter, wrong meter according to the file of checking of output, improved the reliability of GPRS Online Charging System, meanwhile, also ensured the income of operator.
For ease of understanding better technical solution of the present invention, with a concrete application scenarios, charging in the embodiment of the present invention is checked to the preprocessing process that device merges business sorting and the data of online charging inventory is described in detail below, in the embodiment of the present invention, with the record that memory table is independently stored pretreated online charging inventory, refer to Fig. 3, comprising:
301, scan one by one the record of online charging inventory.
Whether the affiliated PDP session service of record that 302, judges current scanning registers in above-mentioned memory table;
Because same PDP session may comprise a plurality of PDP session services, the different PDP session services of same PDP session are distinguished by service code, and same PDP session service may be divided into many records, therefore, check that processing unit can determine the PDP session service under this record by GGSN address, Charging-Id and the service code of the record of current scanning, and judge whether this PDP session service registers in memory table.
If register, perform step 303, if not, perform step 304.
303, by the data accumulation in the record of current scanning to the data with existing of the PDP session service under this record in above-mentioned memory table;
Due to the data that existed in memory table by the definite PDP session service of GGSN address, Charging-Id and service code, therefore, charging processing module is added to the data in the record of current scanning (as business use traffic and expense) respectively on the data with existing (as business use traffic and the expense of having stored) of the PDP session service under this record in memory table.
304, in above-mentioned memory table, increase this record;
Charging checks that device is stored in the data in the record of current scanning in above-mentioned memory table, further, can determine the PDP session under this record by GGSN address, Charging-Id and the service code of this record, be the data of this PDP session service by the Data Identification of this record of storage in memory table.
305, judge whether to also have the not record of scanning;
Charging checks that device judges whether online charging inventory also has the not record of scanning, if having, reads next record not scanning and scans, and returns to step 302, if full scan is complete, performs step 306.
306, finish the preprocessing process to this online charging inventory.
It should be noted that, the embodiment of the present invention adopts two kinds of different memory tables to store respectively the record of pretreated online charging inventory and the record of wholesale price destination file, wherein, charging checks that device carries out pretreated process to the record in wholesale price destination file and can, with reference to the flow process shown in Fig. 3, repeat no more herein.In embodiments of the present invention, charging checks that device carries out pretreated process to the record in online charging inventory and wholesale price destination file and can carry out simultaneously, certainly, also can after the record in the complete online charging inventory of preliminary treatment, to the record in wholesale price destination file, carry out preliminary treatment again, or, also can after the record in the complete wholesale price destination file of preliminary treatment, to the record in online charging inventory, carry out preliminary treatment again, be not construed as limiting herein.
Further, the embodiment based on shown in Fig. 3, the processing procedure of checking in the embodiment of the present invention can as shown in Figure 4, comprise:
401, default in two memory tables checked to the data in the cycle add up respectively;
Wherein, in above-mentioned two memory tables, store respectively the record of pretreated online charging inventory and the record of pretreated wholesale price destination file.
Charging checks that device adds up the data in two memory tables respectively, calculates total log-on count, total flow and the total cost of each PDP session service.
402, generate and export the statistic of classification file of online charging inventory and the statistic of classification file of wholesale price destination file, and check report file;
Charging checks that module is after adding up above-mentioned two memory tables, generate and export the statistic of classification file of online charging inventory and the statistic of classification file of wholesale price destination file, simultaneously, according to preset statement form, extract the data in the statistic of classification file of online charging inventory and the statistic of classification file of wholesale price destination file, generate and check report file.
For ease of describing, in embodiments of the present invention, by the statistic of classification short title of online charging inventory, be online charging statistic of classification inventory, by the statistic of classification short title of wholesale price destination file, be offline charging statistic of classification ticket.
403, relatively online charging statistic of classification inventory counts total log-on count and total flow, whether the total log-on count counting with offline charging statistic of classification ticket and the difference of total flow be in specified scope;
Total log-on count and the total flow of the same type of service counting in device comparison online charging statistic of classification and inventory line charging statistic of classification ticket checked in charging, the total log-on count counting in the total log-on count counting in online charging statistic of classification inventory and total flow and inventory line charging statistic of classification ticket and the difference of total flow are in specified scope, perform step 404, otherwise, execution step 405.
In the embodiment of the present invention, charging checks that device can determine a type of service by GGSN address, Charging-Id and service code.
404, the total cost that relatively online charging statistic of classification inventory counts, whether the difference of the total cost counting with offline charging statistic of classification ticket is in specified scope;
The total cost of the same type of service counting in device comparison online charging statistic of classification and inventory line charging statistic of classification ticket is checked in charging, the difference of the total cost counting in the total cost counting in online charging statistic of classification inventory and inventory line charging statistic of classification ticket is in specified scope, perform step 407, otherwise, execution step 406.
In the embodiment of the present invention, charging checks that device can determine a type of service by GGSN address, Charging-Id and service code.
405, generate and export differential file, and in differential file, carry and be used to indicate the error of omission indication information that occurs error of omission situation;
Wherein, the type of service corresponding record of the difference that comprises total log-on count and total flow in above-mentioned differential file outside specified scope.
406, generate and export differential file, and in differential file, carry and be used to indicate the incorrect posting indication information that occurs incorrect posting situation;
Wherein, the type of service corresponding record of the difference that comprises total cost in above-mentioned differential file outside specified scope.
407, finish this flow process.
Therefore, the embodiment of the present invention is by obtaining online charging inventory and obtaining GPRS ticket, and the online charging inventory obtaining and the GPRS ticket after batched valuation is processed are checked, and file is checked in output, realized GPRS online charging handling process has been monitored, made staff to find in time the Lou problem such as meter, wrong meter according to the file of checking of output, improved the reliability of GPRS Online Charging System, meanwhile, also ensured the income of operator.
Charging in the embodiment of the present invention is checked to device is described below, refer to Fig. 5, device 500 is checked in the charging in the embodiment of the present invention, comprising:
The first acquiring unit 501, be used for obtaining online charging inventory, wherein, above-mentioned online charging inventory by the online charging module of GPRS Online Charging System after this online of user is rolled off the production line, according to the session information of above-mentioned this online of user of GGSN record and to above-mentioned session information, carry out the cost information generation obtaining after batched valuation processing, wherein, above-mentioned online charging inventory comprises the inventory record of above-mentioned this online of user, wherein, above-mentioned inventory record comprises type of service, business use traffic and expense;
Second acquisition unit 502, for obtaining the GPRS ticket of above-mentioned this online of user of charging gateway generation;
Batched valuation processing unit 503, for the GPRS ticket that second acquisition unit 502 is obtained, carry out batched valuation processing, obtain wholesale price destination file, wherein, the ticket writing that above-mentioned wholesale price destination file comprises above-mentioned this online of user, wherein, above-mentioned ticket writing comprises type of service, business use traffic and expense;
Check processing unit 504, be used for checking in the cycle default, above-mentioned online charging inventory and above-mentioned wholesale price destination file that the first acquiring unit 501 and batched valuation processing unit 503 obtain are checked processing, file is checked in output, wherein, above-mentioned at least one of checking in the following file of file including: statistic of classification file, differential file and check report file.
Under a kind of application scenarios, when above-mentioned while checking file including statistic of classification file; Charging checks that device 400 also can comprise: the first pretreatment unit and the second pretreatment unit; The preliminary treatment that above-mentioned the first pretreatment unit merges for the above-mentioned online charging inventory obtaining being carried out to business sorting and data, to obtain log-on count, business use traffic and the expense of the various types of traffic of different user from above-mentioned online charging inventory; Above-mentioned the second pretreatment unit, the preliminary treatment merging for wholesale price destination file obtained above being carried out to business sorting and data, to obtain log-on count, business use traffic and the expense of the various types of traffic of different user from above-mentioned wholesale price destination file; Check that processing unit 504 specifically can comprise: the first statistic of classification unit and the second statistic of classification unit; Above-mentioned the first statistic of classification unit, for to checking in the cycle default, all online charging inventories after above-mentioned the first pretreatment unit is processed are added up, and generate the statistic of classification file of online keep cost order; Above-mentioned the second statistic of classification unit, for to checking in the cycle default, all wholesale price destination files after above-mentioned the second pretreatment unit is processed are added up, and generate the statistic of classification file of wholesale price destination file.
Under another kind of application scenarios, when above-mentioned, while checking file including differential file, check that processing unit 504 also comprises: comparing unit, for the statistic of classification file of online charging inventory and the statistic of classification file of wholesale price destination file of more above-mentioned generation; Generation unit, while existing data inconsistent for compare the statistic of classification file of above-mentioned online charging inventory and the statistic of classification file of above-mentioned wholesale price destination file when above-mentioned comparing unit, generate differential file, wherein, above-mentioned differential file comprises the inconsistent record of data, wherein, above-mentioned at least one being recorded as in above-mentioned inventory record and above-mentioned ticket writing.Further, above-mentioned generation unit also for: for same type of service, if it is inconsistent that above-mentioned comparing unit compares the total log-on count recording in the statistic of classification file of total log-on count of recording in the statistic of classification file of above-mentioned online charging inventory and above-mentioned wholesale price destination file, in the differential file of above-mentioned generation, carry and be used to indicate the error of omission indication information that occurs error of omission situation; Or, for same type of service, if it is inconsistent that above-mentioned comparing unit compares the total flow recording in the statistic of classification file of the total flow that records in the statistic of classification file of above-mentioned online charging inventory and above-mentioned wholesale price destination file, in the differential file of above-mentioned generation, carry and be used to indicate the error of omission indication information that occurs error of omission situation; Or, for same type of service, if it is consistent that above-mentioned comparing unit compares the total log-on count and the total flow that record in the statistic of classification file of total log-on count of recording in the statistic of classification file of above-mentioned online charging inventory and total flow and above-mentioned wholesale price destination file, but the total cost recording in the total cost recording in the statistic of classification file of above-mentioned online charging inventory and the statistic of classification file of above-mentioned wholesale price destination file is inconsistent, in the differential file of above-mentioned generation, carries and be used to indicate the error of omission indication information that occurs error of omission situation.
In another kind of application scenarios, when above-mentioned while checking that file including is checked report file, charging checks that device 400 also can comprise: report generation unit, be used for according to preset statement form, extract the data in the statistic of classification file of above-mentioned online charging inventory, the statistic of classification file of above-mentioned wholesale price destination file and above-mentioned differential file, generate and check report file.
It should be noted that, the charging of the embodiment of the present invention checks that device 400 can check device as the charging in said apparatus embodiment, and its specific implementation process can, with reference to the associated description in above-described embodiment, repeat no more herein.
Above a kind of charging auditing method provided by the present invention and charging are checked to device is described in detail, for one of ordinary skill in the art, thought according to the embodiment of the present invention, all will change in specific embodiments and applications, to sum up, this description should not be construed as limitation of the present invention.