Call bill data statistical method, device, computer installation and readable storage medium storing program for executing
Technical field
The invention belongs to field of communication technology more particularly to a kind of call bill data statistical method, device, computer installation and
Readable storage medium storing program for executing.
Background technique
With the development of communication technology, more and more people such as are conversed and are surfed the Internet using mobile phone the business, thus can
Generation includes the call bill data of bulk information.For the ease of management, such as operator, company needs to involved by the call bill data
To the information such as call destination, the duration of call, client's expense (income), supplier's expense (cost) and profit count
Integration.
Lead in general, operator can individually calculate client's expense, supplier's expense caused by call and calculate this
Profit brought by talking about etc., then these information manual form geo-statistics are integrated out, statistical efficiency is lower.
Summary of the invention
The embodiment of the present invention provides a kind of call bill data statistical method, it is intended to solve how to improve statistics, integrate ticket
The problem of efficiency.
The embodiments of the present invention are implemented as follows, a kind of call bill data statistical method, this method comprises:
The Original CDR data of call are grabbed, the Original CDR data include called number and the duration of call;
The longest position operator number section of the called number is obtained, the longest position operator number section includes country code;
And the call is calculated according to the country code, the duration of call, client's quotation rate and supply Bidding rate
Selling price, cost and profit;
By the calculated selling price, the cost and the profit in conjunction with the Original CDR data, generate newly
Forms data.
Further, the Original CDR data of the crawl call, comprising: periodically grab the original to soft switchcall server
Beginning call bill data.
Further, the longest position operator number section for obtaining the called number, comprising: by the called number
It is matched with operator's number section of load, to obtain the longest position operator number section of the called number.
Further, it is pre-loaded that client's quotation rate and the supply Bidding, which take,.
Further, described that the calculated selling price, the cost and the profit are integrated into the original words
In forms data, after generating new call bill data, the new call bill data can also be stored, and empty the Original CDR number
According to.
As it can be seen that the application by obtaining the Original CDR data of call, by the sequence of operations such as obtaining, calculating, automatically
The data such as the selling price, cost and profit of the call are calculated, and above-mentioned data are counted with Original CDR data successfully, is whole
It closes, generates the new call bill data comprising above-mentioned data, improve ticket statistics, the efficiency of integration.
The embodiment of the present invention also provides a kind of call bill data statistic device, described device includes:
Acquiring unit, for grabbing the Original CDR data of call, the Original CDR data include called number and lead to
Talk about duration;
Computing unit, for obtaining the longest position operator number section of the called number, the longest position operator number section
Including country code;And according to the country code, the duration of call, client's quotation rate and supply Bidding rate meter
Calculate the selling price, cost and profit of the call;
Statistic unit is integrated, is used for the calculated selling price, the cost and the profit in conjunction with the original words
Forms data generates new call bill data.
Further, the acquiring unit is specifically used for timing to soft switchcall server and grabs the Original CDR data.
Further, the computing unit, specifically for carrying out operator's number section of the called number and load
Matching, to obtain the longest position operator number section of the called number.
Further, it is pre-loaded that client's quotation rate and the supply Bidding, which take,.
Further, the call bill data statistic device further include:
Storage cleaning unit, for it is described the calculated selling price, the cost and the profit be integrated into it is described
In Original CDR data, after generating new call bill data, the new call bill data is stored, and empty the Original CDR number
According to.
As it can be seen that the application by obtaining the Original CDR data of call, by the sequence of operations such as obtaining, calculating, automatically
The data such as the selling price, cost and profit of the call are calculated, and above-mentioned data are counted with Original CDR data successfully, is whole
It closes, generates the new call bill data comprising above-mentioned data, improve ticket statistics, the efficiency of integration.
The embodiment of the present invention also provides a kind of computer installation, and the computer installation includes processor, the processor
The step of call bill data statistical method described in above-mentioned any one is realized when for executing the computer program stored in memory.
The embodiment of the present invention also provides a kind of computer readable storage medium, is stored thereon with computer program, the meter
The step of calculation machine program realizes call bill data statistical method described in above-mentioned any one when being executed by processor.
Compared with prior art, it has the advantages that
The application by obtaining the Original CDR data of call, by the sequence of operations such as obtaining, calculating, calculate automatically
The data such as selling price, cost and the profit of the call, and above-mentioned data are counted with Original CDR data successfully, are integrated, it is raw
Include the new call bill data of above-mentioned data at one, compared with the prior art needs to handle manually, improves ticket and count, is whole
The efficiency of conjunction.
Detailed description of the invention
Fig. 1 is a kind of flow diagram of call bill data statistical method provided by the embodiments of the present application;
Fig. 2 is a kind of structural schematic diagram of call bill data statistic device provided in an embodiment of the present invention.
Specific embodiment
In order to make the objectives, technical solutions, and advantages of the present invention clearer, with reference to the accompanying drawings and embodiments, right
The present invention is further elaborated.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, and
It is not used in the restriction present invention.
Embodiment one
Referring to Fig. 1, a kind of flow diagram of call bill data statistical method provided by the present application, this method includes but unlimited
In following steps:
The Original CDR data that S101, the crawl of call bill data statistic device are conversed, which includes called number
Code and the duration of call.
In the application, which can directly be connected with soft switchcall server, from the number of soft switchcall server
According to obtaining Original CDR data in library, wherein it grabs to grab newest data and data is avoided not leak, repeat to grab, it should
Call bill data statistic device can timing slave soft switchcall server database in grab Original CDR data, such as every one minute
3,000 Original CDR data are grabbed from the database.Wherein, which may include the called number of corresponding call
The information such as code, initial time, end time and the duration of call.
S102, the call bill data statistic device obtain the longest position operator number section of the called number, longest position operation
Trading company's section includes country code;And according to the country code, the duration of call, client's quotation rate and supply Bidding rate
Calculate the selling price, cost and profit of the call.
The call bill data statistic device can be with pre-loaded operator's number section into caching, wherein call bill data statistics
Device matches called number with operator's number section of the load, if the number on the called number fixed bit and the load
Operator's number section matches, then by the fixed bit on the called number and its later, the number on position can be used as the called number
Longest position operator number section, wherein the fixed bit can according to the setting rule of the called number determine, be typically chosen called
Operator's number section institute is in place on number, if the mobile number of operator C is 11, remembers position, operator's number section place from right to left
Position generally the 9th, 10,11, then the fixed bit can be the 9th, 10,11.For example, if called number is 001185
12341234, it is the mobile number of operator C, then can sets fixed bit as the 9th, 10,11, and the called number fixed bit
On number 185 be operator number section, then can be by the fixed bit on the called number and its number on position later
001185 is used as longest position operator number section;Alternatively, will be somebody's turn to do on the called number if the setting rule of the called number determines
Number on fixed bit and its later position can be used as longest position operator number section etc., as operator's number section determine for the 9th,
It 10,11, then can be directly by 001,185 12341234 the 9th, 10,11 on called number and its number on position later
001185 longest position operator number section the most.
Wherein, which may include operator's number section and country code, which can be
In the longest position operator number section in addition to operator's number section remaining number.Such as the longest position operator number section can be
001185, operator's number section is 185, then country code is 001.
In addition, the call bill data statistic device can be offered with pre-loaded client, rate and supply Bidding rate are arrived
In caching, wherein client quotation rate may include the charging standard that user dials somewhere phone, and supply Bidding rate can
To include the cost spent when supplier (operator) support user dials somewhere phone.In conjunction with above-mentioned, when obtaining called number
When country code on code, operator can determine the institute possession that the call is called, which can adjust
With the corresponding client's quotation rate in its possession and Bidding rate is supplied, and according to the duration of call of the above-mentioned call, visitor
Family quotation rate and supply Bidding rate calculate the selling price, cost and profit of the call.Such as the country on called number
Code is 001, and the corresponding institute possession of the country code is A state, and call bill data statistic device can recall the client to converse with A state
Rate of offering and supply Bidding rate, the client's quotation rate such as conversed with A state include the receipts that user makes a phone call to A state
Taking standard is 2 yuan/minute of RMB, is supply when support user dials somewhere phone with the supply Bidding rate that A state converses
1 yuan/minute of cost RMB that quotient (operator) is spent, and the client of the duration of call of the call and the call of A state is offered
Selling price of the product of rate as the call, and multiplying supply Bidding rate that the duration of call of the call is conversed with A state
Cost of the product as the call can will the duration of call 10 minutes and client's report with A state call if the duration of call is 10 minutes
The confession that resulting 20 yuan of the product of 2 yuan/minute of the valence rate selling prices for the call will the duration of call 10 minutes and converse with A state
The cost that resulting 10 yuan of the product of 1 yuan/minute of Bidding rate are the call is answered, and the selling price of the call is subtracted into cost and is made
For the resulting profit of the call.
It is understood that the client offers, rate and the supply Bidding rate can respectively include corresponding to multiple states
The user of family (or area) dials the charging standard of somewhere phone, and the supplier (operator) of corresponding multiple countries (or area)
The cost that support user is spent when dialed, when call bill data statistic device obtains the country code of called phone, i.e.,
It can determine that called phone the belonging country on ground, and calls the country corresponding client quotation rate and the supply Bidding
Rate carries out above-mentioned calculating, repeats no more secondary.
The calculated selling price, the cost and the profit are combined the Original CDR by S103, the call bill data statistic device
Data generate new call bill data.
When calculating the selling price, cost and profit of the call, which can calculate above-mentioned
Content combination Original CDR data, generate one include simultaneously the selling price of the call, cost and profit new call bill data,
And it stores into memory.And in order to avoid memory is overflowed because of the storage of excessive content, the application can also empty it
The Original CDR data of preceding acquisition, to guarantee the normal storage of memory.
As it can be seen that the application by obtaining the Original CDR data of call, by the sequence of operations such as obtaining, calculating, automatically
The data such as the selling price, cost and profit of the call are calculated, and above-mentioned data are counted with Original CDR data successfully, is whole
It closes, generates the new call bill data comprising above-mentioned data, improve ticket statistics, the efficiency of integration.
Embodiment two
In conjunction with above-mentioned design, referring to fig. 2, this application provides a kind of structural schematic diagrams of call bill data statistic device, should
Device includes:
Acquiring unit 1, for grabbing the Original CDR data of call, which includes called number and call
Duration;
Further, the acquiring unit 1 grabs the Original CDR data to soft switchcall server specifically for timing.
In the application, which can directly be connected with soft switchcall server, from the number of soft switchcall server
According to obtaining Original CDR data in library, wherein it grabs to grab newest data and data is avoided not leak, repeat to grab, it should
Call bill data statistic device can timing slave soft switchcall server database in grab Original CDR data, such as every one minute
3,000 Original CDR data are grabbed from the database.Wherein, which may include the called number of corresponding call
The information such as code, initial time, end time and the duration of call.
Computing unit 2, for obtaining the longest position operator number section of the called number, which includes
Country code;And this is calculated according to the country code, the duration of call, client's quotation rate and supply Bidding rate and is led to
Selling price, cost and the profit of words;
The computing unit 2 should to obtain specifically for matching the called number and operator's number section of load
The longest position operator number section of called number.
Wherein, it is pre-loaded that client quotation rate and the supply Bidding, which take,.
The call bill data statistic device can be with pre-loaded operator's number section into caching, wherein call bill data statistics
Device matches called number with operator's number section of the load, if the number on the called number fixed bit and the load
Operator's number section matches, then by the fixed bit on the called number and its later, the number on position can be used as the called number
Longest position operator number section, wherein the fixed bit can according to the setting rule of the called number determine, be typically chosen called
Operator's number section institute is in place on number, if the mobile number of operator C is 11, remembers position, operator's number section place from right to left
Position generally the 9th, 10,11, then the fixed bit can be the 9th, 10,11.For example, if called number is 001185
12341234, it is the mobile number of operator C, then can sets fixed bit as the 9th, 10,11, and the called number fixed bit
On number 185 be operator number section, then can be by the fixed bit on the called number and its number on position later
001185 is used as longest position operator number section;Alternatively, will be somebody's turn to do on the called number if the setting rule of the called number determines
Number on fixed bit and its later position can be used as longest position operator number section etc., as operator's number section determine for the 9th,
It 10,11, then can be directly by 001,185 12341234 the 9th, 10,11 on called number and its number on position later
001185 longest position operator number section the most.
Wherein, which may include operator's number section and country code, which can be
In the longest position operator number section in addition to operator's number section remaining number.Such as the longest position operator number section can be
001185, operator's number section is 185, then country code is 001.
In addition, the call bill data statistic device can be offered with pre-loaded client, rate and supply Bidding rate are arrived
In caching, wherein client quotation rate may include the charging standard that user dials somewhere phone, and supply Bidding rate can
To include the cost spent when supplier (operator) support user dials somewhere phone.In conjunction with above-mentioned, when obtaining called number
When country code on code, operator can determine the institute possession that the call is called, which can adjust
With the corresponding client's quotation rate in its possession and Bidding rate is supplied, and according to the duration of call of the above-mentioned call, visitor
Family quotation rate and supply Bidding rate calculate the selling price, cost and profit of the call.Such as the country on called number
Code is 001, and the corresponding institute possession of the country code is A state, and call bill data statistic device can recall the client to converse with A state
Rate of offering and supply Bidding rate, the client's quotation rate such as conversed with A state include the receipts that user makes a phone call to A state
Taking standard is 2 yuan/minute of RMB, is supply when support user dials somewhere phone with the supply Bidding rate that A state converses
1 yuan/minute of cost RMB that quotient (operator) is spent, and the client of the duration of call of the call and the call of A state is offered
Selling price of the product of rate as the call, and multiplying supply Bidding rate that the duration of call of the call is conversed with A state
Cost of the product as the call can will the duration of call 10 minutes and client's report with A state call if the duration of call is 10 minutes
The confession that resulting 20 yuan of the product of 2 yuan/minute of the valence rate selling prices for the call will the duration of call 10 minutes and converse with A state
The cost that resulting 10 yuan of the product of 1 yuan/minute of Bidding rate are the call is answered, and the selling price of the call is subtracted into cost and is made
For the resulting profit of the call.
It is understood that the client offers, rate and the supply Bidding rate can respectively include corresponding to multiple states
The user of family (or area) dials the charging standard of somewhere phone, and the supplier (operator) of corresponding multiple countries (or area)
The cost that support user is spent when dialed, when call bill data statistic device obtains the country code of called phone, i.e.,
It can determine that called phone the belonging country on ground, and calls the country corresponding client quotation rate and the supply Bidding
Rate carries out above-mentioned calculating, repeats no more secondary.
Statistic unit 3 is integrated, for the calculated selling price, the cost and the profit to be combined the Original CDR data,
Generate new call bill data.
Further, the call bill data statistic device further include:
Storage cleaning unit, is integrated into the Original CDR number for the calculated selling price, the cost and the profit for this
In, after generating new call bill data, the new call bill data is stored, and empty the Original CDR data.
When calculating the selling price, cost and profit of the call, which can calculate above-mentioned
Content combination Original CDR data, generate one include simultaneously the selling price of the call, cost and profit new call bill data,
And it stores into memory.And in order to avoid memory is overflowed because of the storage of excessive content, the application can also empty it
The Original CDR data of preceding acquisition, to guarantee the normal storage of memory.
As it can be seen that the application by obtaining the Original CDR data of call, by the sequence of operations such as obtaining, calculating, automatically
The data such as the selling price, cost and profit of the call are calculated, and above-mentioned data are counted with Original CDR data successfully, is whole
It closes, generates the new call bill data comprising above-mentioned data, improve ticket statistics, the efficiency of integration.
As a kind of optional embodiment, present invention also provides a kind of computer installation, which includes place
Device is managed, the processor is for realizing one any one of above-described embodiment ticket when executing the computer program stored in memory
The step of data statistical approach.
As a kind of optional embodiment, present invention also provides a kind of computer readable storage mediums to be stored thereon with meter
Calculation machine program, the computer program realize any one of above-described embodiment one call bill data statistics side when being executed by processor
The step of method.
Illustratively, computer program can be divided into one or more modules, one or more module is stored
In memory, and by processor it executes, to complete the present invention.One or more modules, which can be, can complete specific function
Series of computation machine program instruction section, the instruction segment is for describing implementation procedure of the computer program in computer installation.Example
Such as, computer program can be divided into the step of reimbursement of expense method that above-mentioned each embodiment of the method provides.
It will be understood by those skilled in the art that the description of above-mentioned computer installation is only example, do not constitute to calculating
The restriction of machine device may include component more more or fewer than foregoing description, perhaps combine certain components or different portions
Part, such as may include input-output equipment, network access equipment, bus etc..
Alleged processor can be central processing unit (Central Processing Unit, CPU), can also be it
His general processor, digital signal processor (Digital Signal Processor, DSP), specific integrated circuit
(Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field-
Programmable Gate Array, FPGA) either other programmable logic device, discrete gate or transistor logic,
Discrete hardware components etc..General processor can be microprocessor or the processor is also possible to any conventional processor
Deng the processor is the control centre of the computer installation, utilizes various interfaces and the entire computer installation of connection
Various pieces.
The memory can be used for storing the computer program and/or module, and the processor is by operation or executes
Computer program in the memory and/or module are stored, and calls the data being stored in memory, described in realization
The various functions of computer installation.The memory can mainly include storing program area and storage data area, wherein storage program
It area can application program (such as sound-playing function, image player function etc.) needed for storage program area, at least one function
Deng;Storage data area, which can be stored, uses created data (such as audio data, phone directory etc.) etc. according to mobile phone.In addition,
Memory may include high-speed random access memory, can also include nonvolatile memory, such as hard disk, memory, grafting
Formula hard disk, intelligent memory card (Smart Media Card, SMC), secure digital (Secure Digital, SD) card, flash card
(Flash Card), at least one disk memory, flush memory device or other volatile solid-state parts.
If the integrated module/unit of the computer installation is realized in the form of SFU software functional unit and as independent
Product when selling or using, can store in a computer readable storage medium.Based on this understanding, the present invention is real
All or part of the process in existing above-described embodiment method, can also instruct relevant hardware come complete by computer program
At the computer program can be stored in a computer readable storage medium, which is being executed by processor
When, it can be achieved that the step of above-mentioned each reimbursement of expense embodiment of the method.Wherein, the computer program includes computer program generation
Code, the computer program code can be source code form, object identification code form, executable file or certain intermediate forms
Deng.The computer-readable medium may include: any entity or device, record that can carry the computer program code
Medium, USB flash disk, mobile hard disk, magnetic disk, CD, computer storage, read-only memory (ROM, Read-Only Memory), with
Machine access memory (RAM, Random Access Memory), electric carrier signal, electric signal and software distribution medium etc..
The explanation of term involved by the present embodiment can be with the description of reference implementation example one, and details are not described herein.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the invention, all in essence of the invention
Made any modifications, equivalent replacements, and improvements etc., should all be included in the protection scope of the present invention within mind and principle.