A kind of telecommunication charging system and user thereof can use the control method of number of resources
Technical field
The present invention relates to the telecommunication charging system in the telecom communication industry and can use number of resources to get control method, particularly relate in a kind of telecommunication charging system and control the control method that the current maximum of user can use number of resources to get according to the remaining sum/line of credit of pre-pay subscriber/credit customer to the user.
Background technology
In the telecom communication industry, charge system is one of core system of telecom operation enterprise start business, and it occupies an important position in telecom business support system OSS.Fig. 1 shows the element as the telecommunication charging system 11 of telecom business support system 1 part.As shown in Figure 1, charge system 11 generally comprises charging control module 2, charging pretreatment module 3, charging processing module 4, client's inquiry into expenses module 5 etc.Wherein, for prepaid user or credit customer, charging control module 2 comprises billing parameter again and module 21, billing parameter are set search module 22, telecommunication service and can use that resource (as duration, byte number etc.) computing module 23, warning line are provided with module 24, user profile is provided with module 25 etc.
Billing parameter is provided with the rate that module 21 is used to be provided with a certain communication service, and promptly the service charge fee-collection standard to a certain communication traffic is provided with, also predeterminable simultaneously some professional spendable maximum resource number (as duration, byte number etc.).Billing parameter is searched the billing parameter that module 22 is used to search corresponding service, as rate, spendable maximum resource number, the user balance of advance account or the line of credit of credit customer etc.Business can use resource (as duration, byte number etc.) computing module 23 to be used to calculate the current operable maximum resource number of user, as the spendable maximum duration of call of active user or current spendable maximum number of byte etc.For prepaid user/credit customer, operator decides this user whether can be to use certain business according to the remaining sum/line of credit in such user account, and how many spendable number of resources (as duration, byte number etc.) that should business is.Operator realizes preventing the user account over-expense and avoids occurring the situation of cut-out of will conversing when remaining sum/line of credit is enough in the user account by control user's the duration of call or spendable byte number.Warning line is provided with module 24 and is used to different COS that a use amount warning line is set, and when user's use amount during greater than this warning value, system will remind the user to take measures areput.Credit customer exists same problem.User profile is provided with the information that module 25 is used to be provided with the user, as the remaining sum/line of credit etc. after the change.
Fig. 2 shows the control flow chart of the resource used of the telecommunication charging system 11 charging control modules 2 of prior art, as the duration of call, spendable byte number etc., it comprises the steps: at first to call billing parameter module 21 is set, be used to be provided with the billing parameter of corresponding service, use number of resources such as the duration of call or spendable maximum number of byte, step 101 as rate, default maximum; Call billing parameter and search module 22, be used to search the billing parameter of corresponding service, comprise rate, maximum number of resources and user balance/line of credit, the step 102 used; Call and can use resource computing module 23, be used for calculating current spendable maximum resource and count T according to active user's remaining sum/line of credit, but as the current maximum duration of call, step 103; After drawing current maximum and can using number of resources T, can call warning line module 24 is set, be used for the user is provided with the use amount warning line, can warning line, step 104 be set according to the T value.According to the variation of user balance/line of credit also correspondingly invoke user information setting module 25 carry out correspondingly user profile and revise.
Introduce the control method that existing charge system 11 users can use number of resources below, can use number of resources to be the spendable duration of call of user this user, it goes out the current maximum duration of conversing according to the user balance inverse.Wherein, suppose that the duration of call is t, minimum charge unit is n, and account balance is fee, and the expense during duration t represents that with f (t) i is a natural number:
(1) suppose t=n, t=2n, t=3n, t=4n, t=5n....., the cost of the phone call when calculating duration respectively and being t stops when fee>=f (i*n), but this moment t value be that i*n is the current maximum duration of call.
(2) setting the maximum duration of call of user is max (for example one day), t=max, t=max-n, t=max-2n ..., the cost of the phone call when calculating duration respectively and being t, stop when fee<=f (max-n*i), but this moment t value be that i*n is the current maximum duration of call.
But there is obvious defects in above existing method, and the extreme case in the method (1) promptly can be conversed one day when user's account balance, when minimum Charging Detail Record unit is 1 second, needs to calculate 60*60*24 promptly 86400 times.Extreme case in the method (2) can be conversed 1 second the time when user's account balance, and setting the maximum duration of call is one day, needs to calculate 60*60*24 promptly 86400 times.In actual applications, the average efficiency of above method is 86400/2=43200 time.This makes existing telecommunication charging system 11 have that operation efficiency is low, resource utilization ratio is low, the shortcoming of system processing power difference, cause the exploitation and the maintenance workload of system heavier, thereby make existing charge system to provide accuracy and the higher service of real-time, weakened the telecommunications of using charge system and moved the competitiveness of enterprise in market for the client.
Summary of the invention
Technical problem to be solved by this invention is to provide a kind of telecommunication charging system and can uses the control method of number of resources for pre-pay subscriber/credit customer, thus operation efficiency, usage factor of system resource, the disposal ability of raising system and accuracy and the real-time that the raising system charges to be used for when reducing system development and maintenance workload, improving telecommunication charging system.
To achieve these goals, the invention provides a kind of telecommunication charging system, comprising:
One charging pretreatment module, a charging processing module, client's inquiry into expenses module; And
One charging control module, the cost of use that is used to control prepaid user/credit customer service resources is no more than user balance/line of credit, and it comprises again:
One billing parameter is provided with module, and the rate and the default spendable maximum resource that are used to be provided with the employed telecommunication service of user are counted m;
One billing parameter is searched module, is used to search the rate of the employed telecommunication service of user, default spendable maximum resource is counted m and user balance/line of credit; And
One current maximum can be used the number of resources computing module, is used for calculating current spendable maximum resource according to user balance/line of credit and counts T;
Wherein, described current maximum can use the number of resources computing module further to comprise:
One variable is provided with module, is used to be provided with variable min, max and initial value thereof, and wherein, the initial value of variable min is set to zero, and the initial value of variable max is set to described default spendable maximum resource and counts m;
One second resource accounting is asked for module, is used for asking for cost of use when the employed number of resources of user is set to (currency of currency+max of min)/2 according to described rate;
One second cost of use judge module is used to judge whether ask for the cost of use that module tries to achieve by described second resource accounting equals described remaining sum; When described cost of use equaled described remaining sum, described T was (currency of currency+max of min)/2, finished to calculate; Or, when described cost of use during, variable max=((currency of currency+max of min)/2)-1 is set greater than described remaining sum, continue to calculate; Or, when described cost of use during, variable min=((currency of currency+max of min)/2)+1 is set less than described remaining sum, continue to calculate; And
One variable min, max value judge module, whether the value that is used for judgment variable min after system executes the described second cost of use judge module is greater than the value of variable max, in this way, then described T is the current value of described variable max, as not, then system continues to call described second resource accounting and asks for module and calculate.
Described telecommunication charging system, wherein, described current maximum can use the number of resources computing module further to comprise one first cost of use judge module, be used to judge that whether resource accounting when the employed number of resources of user is set to described default spendable maximum resource and counts m is smaller or equal to described remaining sum, in this way, then described T is described default maximum and can uses number of resources m.
Described telecommunication charging system, wherein, described charging control module comprises that further a warning line is provided with module and/or a user profile is provided with module; Described warning line is provided with the warning value that module is used to be provided with the user resources use amount, and it is corresponding that described warning value and the spendable maximum resource of described active user are counted T; Described user profile is provided with module and is used to set user information.
Described telecommunication charging system, wherein, described telecommunication service be toll telephone, local telephone network, mobile communication phone, overseas call, cable TV, satellite communication, broadcast communication, wideband communication, multi-media network mechanics of communication with and combination in any in one of.
Described telecommunication charging system, wherein, the number of resources that described user uses is user's communication duration or the spendable byte number of user; Described default spendable maximum resource number can use maximum number of byte for default user's maximum duration of call or default user; It is the current maximum duration of call or current spendable maximum number of byte that described current maximum can be used number of resources.
The present invention also provides a kind of user who is applicable to described telecommunication charging system can use the control method of number of resources, and the cost of use that is used to control prepaid user/credit customer telecommunication service resource is no more than user balance/line of credit, comprises the steps:
Billing parameter is set, and described billing parameter comprises that the rate of the employed telecommunication service of user and the default spendable maximum resource of user count m;
Search the billing parameter of the telecommunication service of the required use of user, comprise that described rate, default spendable maximum resource count m and user balance; And
Calculate the spendable number of resources T of the current maximum of user;
Wherein, the current maximum of described calculating user can use the step of number of resources T further to comprise:
Steps A is provided with two variable min, max, and its initial value is set, and wherein, the initial value that variable min is set is zero, and the initial value of variable max is that described default spendable maximum resource is counted m;
Step B according to described rate, asks for the resource accounting when the number of resources of using=(currency of currency+max of min)/2;
Step C, relatively by the cost of use and the described remaining sum of step B gained, when described cost of use equaled described remaining sum, the spendable number of resources T of the current maximum of described user was (currency of currency+max of min)/2, finished to calculate; Or, when described cost of use during, variable max=((currency of currency+max of min)/2)-1 is set greater than described remaining sum, continue to calculate; Or, when described cost of use during, variable min=((currency of currency+max of min)/2)+1 is set less than described remaining sum, continue to calculate;
Step D, greater than the value of variable max, in this way, then described T is the currency of variable max to the value of judgment variable min, and finishes to calculate; As not, then change step B over to.
Described user can use the control method of number of resources, wherein, the current maximum of described calculating can use the step of number of resources T to comprise that further the cost of use of judgement when using number of resources to equal described default spendable maximum resource to count m is whether smaller or equal to the step of described remaining sum, in this way, then described current maximum can be used number of resources T to be described default spendable maximum resource and count m.
Described user can use the control method of number of resources, wherein, comprises that further one can use the value of number of resources T that the step of user resources use amount warning line is set according to the current maximum of being tried to achieve.
Described user can use the control method of number of resources, wherein, described telecommunication service be toll telephone, local telephone network, mobile communication phone, overseas call, cable TV, satellite communication, broadcast communication, wideband communication, multi-media network mechanics of communication with and combination in any in one of.
Described user can use the control method of number of resources, and wherein, the number of resources that described user uses is user's communication duration or the spendable byte number of user; Described default spendable maximum resource number can use maximum number of byte for default user's maximum duration of call or default user; It is the current maximum duration of call or current spendable maximum number of byte that described current maximum can be used number of resources.
Compare with prior art, the user of the telecommunication charging system that the invention provides can use number of resources (as the duration of call) control method efficient higher, and flow process is simple relatively, helps the carrier-class accurate billing.
Describe the present invention below in conjunction with the drawings and specific embodiments, but not as a limitation of the invention.
Description of drawings
Fig. 1 is the composition frame chart of the telecommunication charging system of prior art;
Fig. 2 can use the control flow block diagram of resource for the user of the telecommunication charging system charging control module of prior art;
Fig. 3 can use the schematic flow sheet of the control method of the duration of call for the telecommunication charging system user of the embodiment of the invention.
Embodiment
As Fig. 3, show the flow process of control method of the telecommunication charging system duration of call of the embodiment of the invention.Each step of the method for the control duration of call of the present invention is corresponding with the module invokes step described in Fig. 2 respectively, and concrete steps are as follows:
Step 201, the corresponding billing parameter of configuration in charge system in advance, this step is corresponding to the step that billing parameter is provided with module of calling among Fig. 2:
(1) each professional conversation rate k is set, different service call rates are respectively k1, k2, k3......
(2) the maximum duration of call m of default each business, the maximum duration of call of different business is respectively m1, m2, m3......
Wherein, account balance/line of credit of this user is fee;
When the user need use a certain business, the corresponding service processing process was as follows, step 202, and the billing parameter of promptly searching corresponding service, search the step of module corresponding to calling billing parameter among Fig. 2:
Search account balance/line of credit fee of this user;
Search this professional conversation rate k;
Search the maximum duration of call m of this business;
Corresponding to the step 103 that to use the resource computing module of calling among Fig. 2, step 203 to step 213 constitutes one can use the resource computing module, be used for calculating the current spendable maximum duration of call of user according to user balance/line of credit, wherein, the duration of call that variable t represents this calculating is set, and f (t) expression duration is the cost of the phone call of t, and two variable min are set in addition, max is T but establish the current maximum duration of call;
Step 204 is provided with the initial value of min and max: min=0, max=m, t=max;
Step 205, the cost of the phone call f (t) when being t according to conversation rate k calculating duration;
Step 206, relatively f (t) and account balance/line of credit fee judge that f (t) whether smaller or equal to fee, then changes step 213 in this way, but user's current maximum duration of call T are m, withdraws from calculating; Otherwise continue;
Step 207, the value of comparison variable min and variable max if min>max then enters step 208, otherwise changes step 209 over to;
Step 208, but maximum duration of call T this moment is the currency of variable max, withdraws from calculating;
Step 209 makes t=(min+max)/2, the cost of the phone call f (t) when the calculating duration is t;
Step 210, relatively f (t) and account balance fee judge that whether f (t) equals fee, in this way, then enters step 212; Otherwise, enter step 211;
Step 211 is further judged, if f (t)>fee, max=t-1, if f (t)<fee, min=t+1, and change step 207 over to, continue to calculate.
Step 212, but user's current maximum duration of call T is the currency of t, withdraws from calculating.
Step 213, but user's current maximum duration of call T is m, withdraws from calculating.
By above computing as can be known, max calculation number of times of the present invention is: log
2M supposes that minimum Charging Detail Record unit is 1 second, and the maximum duration of call is 1 o'clock, and the inverse number of times is log
286400=17 obviously is better than two kinds of algorithms of prior art listed earlier.
Following mask body describes the application of the inventive method for example.
1, in charge system, be configured to data down in advance:
(1) each professional conversation rate is set and is respectively k1, k2, k3......
(2) the maximum duration of call that each business is set is 86400 seconds, 3600 seconds, and 7200 seconds ...
2, when the user need use a certain business, the corresponding service processing process was as follows:
(1) account balance of searching this user is 100 yuan
(2) search this professional conversation rate k1 (comprise two expenses: city telephone rate 0.1 yuan/60 seconds, long-distance telephone bill 0.01 yuan/6 seconds)
(3) the maximum duration of call of searching this business is 86400 seconds
3, the duration of call that variable t represents this calculating is set, f (t) expression duration is the cost of the phone call of t, and two variable min are set in addition, max, but represent the current maximum duration of call with T:
(1) initial value of min and max is set: min=0, max=86400, t=86400
(2) calculate that to calculate duration according to conversation rate be 86400 o'clock cost of the phone call f (t)=0.1* (86400/60)+0.01* (86400/6)=288 yuan
(3) relatively f (t) (288 yuan) and account balance fee (100 yuan): if f (t) smaller or equal to fee, but then the user's of this moment current maximum duration of call T is 86400 seconds, otherwise continuation;
(4) if min>max, but then this moment max value be user's current maximum duration of call T, otherwise continue;
(5) t=(min+max)/2, the cost of the phone call f (t) when calculating duration and being t, relatively f (t) and account balance fee, if f (t)=fee, but then at this moment the value of t be user's current maximum duration of call T;
(6) if f (t)>fee, max=t-1, if f (t)<fee, min=t+1, repeating step (4)
Finally can obtain maximum duration of call T is 30000 seconds.
Adopt this method to calculate the duration of call and need calculate altogether 17 times, and adopt the algorithm in the background technology 1 to need 30000 times, adopt the algorithm in the background technology 2 to need 56400 times, this shows that this method is calculated duration efficient obviously because other two kinds of methods.Compare with prior art, the invention provides a kind of method according to user balance/spendable maximum duration of call of line of credit calculating user, efficiency of algorithm is higher, and flow process is simple relatively, help the carrier-class accurate billing, and the workload that has alleviated exploitation simultaneously and safeguarded.Can calculate the maximum quantity that the user can use other resource accordingly, as spendable maximum number of byte etc.After having calculated spendable maximum duration of call T, can further the warning value that the user can use the duration of call be set, promptly corresponding to the step 104 among Fig. 2 according to this T value.When system reaches warning value, promptly give user's warning or prompting.
The present invention can be used to relate to the various application of the inverse duration of call, can be used in the various communication products of telecom equipment manufacturers exploitation, be applicable to various communication traffics such as toll telephone, local telephone network, mobile communication phone, overseas call, cable TV, satellite communication, broadcast communication, wideband communication, multi-media network mechanics of communication with and combination in any in one of.
Certainly; the present invention also can have other various embodiments; under the situation that does not deviate from spirit of the present invention and essence thereof; those of ordinary skill in the art work as can make various corresponding changes and distortion according to the present invention, but these corresponding changes and distortion all should belong to the protection range of the appended claim of the present invention.