The charging method that the objective of the invention is a kind of intelligent public telephone system of designing for the charging that realizes intellective IC card terminal and processing platform.Utilize method of the present invention can make the intellective IC card terminal realize that one-telephone multi-card charges, can compatible China Telecom Stored Value IC-card, public words account number IC-card, 200,300 account cards, IP phonecard etc.
The purpose of this invention is to provide a kind of online authentication and accounting implementation method for the intelligent public telephone system use.The public telephone system charging method that realizes according to the present invention can realize that one-telephone multi-card charges, to value stored type IC-card and book keeping operation formula IC-card, terminal all can show the situation of deducting fees dynamically, and terminal is only finished access function, and all billing functions are finished by processing platform control.
The invention provides a kind of charging method of intelligent public telephone system, this method comprises following step: terminal equipment and user carry out information interaction, and the information of recording user input, as the called phone number etc.; Terminal equipment is connected with processing platform by switching equipment; Processing platform carries out authentication to terminal equipment, and the information of receiving terminal apparatus record, as the called phone number etc.; Processing platform is searched corresponding rate kind or rate according to this information such as called phone number etc. in the rate storehouse; Processing platform generates the rate that finds the packet of corresponding format; Processing platform sends to telephone set to this packet, and telephone set receives correct back transmission confirmatory message and pats platform everywhere, and platform is connected speech channel; Terminal equipment charges according to the rate information that processing platform issues, the processing platform monitoring terminal equipment situation of deducting fees; According to the terminal equipment success or unsuccessful of deducting fees, send the signal of deducting fees accordingly and pat platform everywhere; Processing platform is according to this signal of deducting fees, and decision is to keep speech channel or cut off speech channel; Processing platform generates data such as ticket according to the rate that finds after the terminal equipment on-hook; Terminal equipment does not write down rate and ticket, and next time, conversation was resend by processing platform, and terminal equipment only charges according to the order of platform.
Processing platform carries out authentication to information after receiving the information of terminal equipment transmission, comprises information such as terminal equipment type, number, Card Type, card number, password are authenticated, authorize.Can guarantee the correct identification of system rate not of the same race like this, can divide different editions, different-format to carry out the generation and the transmission of tariff data bag according to the difference of authentication information.
The telephone number that processing platform sends according to terminal equipment, searching the corresponding rate kind or the method for rate is: the local rate of processing platform is searched by the two-dimentional rate table of comparisons according to the calling and called telephone number, and long-distance, mobile rate is searched by the rate kind table of comparisons.
Processing platform generates the rate that finds the packet of corresponding format, the form of packet can be divided into regular length and elongated two kinds of charge informations by the complexity of rate, distinguish by different command header, adopt this method can adapt to the charging way of various complexity, as 3+1 charging, multi-metering, virtual net charging etc.The basic format of packet is: " command header+charge information+check code "
Dual-tone multifrequency or single audio signal that the signal of deducting fees adopts sending order and transmission frequency to be drawn by certain cryptographic algorithm, effectively the charging case of monitor terminal prevents free call on sb. else's expense through illegal means, and the charging of unified processing platform and terminal equipment.
Describe the present invention in detail below in conjunction with embodiments of the invention: 1. system configuration
Fig. 1 is the structure chart of intelligent public telephone system.Whole system is made up of intellective IC card terminal equipment 1, processing platform 2.The intellective IC card terminal equipment can connect by switching equipment and processing platform.Processing platform is searched corresponding rate and is ordered the charging to user's communication of control and monitor terminal by chargeing according to user's input information, and the rate and the ticket of system are stored in processing platform.2. charge information is mutual
Fig. 2 is the charge information interaction diagrams.At first, at step S1, terminal and user carry out information interaction, the telephone number that recording user is dialed.When the user dials first button, telephone set starts and platform communication module, simultaneously at step S2, note all user key-press information, the terminal equipment utilization moves flat the platform access code and is connected with processing platform by switching equipment, processing platform produces a random number, and this random number is as the challenge word of this conversation.Processing platform sends the challenge word to terminal equipment
At step S3, terminal equipment sends through challenge word ciphered data to processing platform, and these data comprise information such as terminal equipment type, version number, Card Type, card number, password, telephone number.At step S4, the data that the processing platform receiving terminal apparatus is sent are carried out authentication process to terminal equipment.These processing comprise the checking to the legitimacy and the authority of card number or account, and the numbers of calling and called parties that the while processing platform provides according to terminal is inquired about the rate storehouse and obtained rate.Local rate adopts the two-dimentional rate table of comparisons to search, and long-distance, mobile rate is searched by the rate kind table of comparisons.
Processing platform is the packet of the rate generation corresponding format that finds, and the form of packet can be divided into regular length and elongated two kinds of charge informations by the complexity of rate, is distinguished by different command header, and at step S5, this packet is sent to terminal.
Terminal receives charge information, at step S6, when receiving successfully, sends confirmatory message to processing platform, after processing platform is received confirmatory message, the called phone switching that collects is breathed out.If called off-hook, at step S7, processing platform sends and starts the order of chargeing, and connects speech path and begins conversation, and processing platform and terminal equipment begin to charge simultaneously then.Terminal is chargeed and is used for showing, dynamically the remaining sum in the situation of deducting fees of display card and the card.Processing platform charges and is used to generate ticket.For the conversation of using the Stored Value IC-card, terminal equipment also is responsible for deducting cost of the phone call from IC-card.At this time, terminal equipment obtains rate, configuration information and charging etc. from the order of chargeing.This data format is in the present embodiment: " type codes+charge information+check code ".
In step S8 communication process, at step S9, terminal equipment sends the situation information of deducting fees according to the situation of deducting fees.Processing platform receives the information of deducting fees, and therefrom judges deducting fees and working condition of terminal equipment, maybe can't receive the information of deducting fees in case receive the information of deducting fees unusually, and at step S10, platform is with finished call immediately.The transmission of this information of deducting fees is that terminal equipment sends automatically.In order to make platform can receive this information of deducting fees more reliably, platform also can regularly send the status request of deducting fees, and terminal equipment sends charge information after receiving this order again.When using stored value card, the signal of deducting fees adopts dual-tone multifrequency or single audio signal, and its sending order and transmission frequency are tried to achieve by certain cryptographic algorithm, so can stop to simulate the sound free call on somebody else's expense through illegal means of deducting fees effectively, the charging case of effective monitor terminal, the reliability of raising system.In the present embodiment, the frequency of signal and Changing Pattern are provided through particular algorithm by the challenge word, and method is as follows.Signal: f deducts fees
1=r
0MOD 3f
2=r
1MOD 3f
3=r
2MOD 3 is mould 1 wherein: frequency=740Hz; Mould 2: frequency=830Hz; Mould 3: frequency=932Hz, r is the challenge word, is a random number that is generated by platform: 4.The sending order of pulse signal: f
1f
2f
3f
1f
2f
3f
1f
2f
3f
1f
2f
3
Processing platform produces ticket information after receiving normal talking end signal or aborted signal at once, is stored in the database of platform.3. data format
Charge information is:
Type codes a
0+ charge information b
1b
2... b
n+ check code c
0(length: n+3)
Wherein: (1) charge information adopts 16 system numerals.(2) check code c
0:=(a
0XOR b
1XOR b
2XOR b
n) MOD16 (3) type codes a
0=F1H: standard meter charge information (n=9).
Service charge b
1b
2+ second/time b
3b
4+ rate b
5b
6b
7+ can beat number of times b
8b
9(4) type codes a
0=F2H: stride discount period charge information (n=14)
Service charge b
1b
2+ second/time b
3b
4+ rate 1+ can beat number of times 1+ rate 2+ can beat number of times 2
Wherein rate 1 is b
5b
6b
7, can beat number of times 1 and be b
8b
9, rate 2 is b
10b
11b
12, can beat number of times 2 and be b
13b
14(5) type codes a
0=F3H: multi-metering information (n=14)
Service charge b
1b
2+ second/time 1+ rate 1+ second/time 2+ rate 2+ can beat number of times 1
Be b wherein second/time 1
3b
4, rate 1 is b
5b
6b
7, second/times 2 be b
8b
9, rate 2 is b
10b
11b
12, can beat number of times 1 and be b
13b
14(6) type codes a0=F4H: stride discount period multi-metering information (n=22)
Service charge b
1b
2+ second/time 1+ rate 1+ second/time 2+ rate 2+ can beat number of times 1+ rate 3+ and can beat number of times 2+ rate 4
Be b wherein second/time 1
3b
4, rate 1 is b
5b
6b
7, second/times 2 be b
8b
9, rate 2 is b
10b
11b
12, can beat number of times 1 and be b
13b
14, rate 3 is b
15b
16b
17, can beat number of times 2 and be b
18b
19, rate 4 is b
20b
21b
22(7) type codes a0=F5H: elongated rate information
Base rate number M+compound rate number N+ initial value+duration 1+ rate 1+ can beat number of times 1+ duration 2+ rate 2+ can beat number of times 2+ ... + duration M+ rate M+ can beat the compound rate 1+ of number of times M+ duration 1+ and can beat the compound rate 2+ of number of times 1+ duration 2+ and can beat number of times 2+ ... the compound rate N+ of+duration N+ can beat times N.
Wherein, the base rate number M is b
1, compound rate number N is b
2, initial value is b
3b
4b
5,, duration 1 is b
6b
7, rate 1 is b
8b
9b
10, can beat number of times 1 and be b
11b
12b
13,, duration 2 is b
14b
15, rate 2 is b
16b
17b
18, can beat number of times 2 and be b
19b
20b
21Every is all adopted 16 systems to represent, except that initial value, rate with can beat number of times and respectively account for 1.5 bytes, remaining is 1 byte.M, N all>=0, M+N<=10.Can from M and N, calculate data length.(8) type codes a
0=FFH: empty rate (n=2)
b
1b
2
b
1Fixedly be filled to FFH, b
2Fixedly be filled to OOH.Empty rate is used to force telephone set to open speech channel, so that the user hears voice messaging.