Background technology
Electricity load management terminal is the equipment that vast power consumer is used for the management of power use, field monitoring and remote meter reading; Can not only realize load prediction, load control and avoid the peak hour and keep away the function at peak, and can realize the customer charge field monitoring, improve power consumption efficiency, issue power supply information etc.For solving the difficult problem of power consumer counting cost by gas meter, the pre-payment technology is used widely, and wherein the IC-card prepaid has obtained users' approval.IC-card forward purchasing electric system is promptly set up the IC-card granting at business window, is supplemented management software with money; In client side the IC-card electricity selling device is installed; The client passes through to bank's electricity charge that prestore and purchases electric weight in advance and supplement IC-card with money with single the calculating to business window of paying dues, and the client carries out electricity consumption with the purchasing electric weight IC-card electricity selling device of swiping the card again.
Prepaid terminal is that self-aid IC card sale of electricity function is attached in the negative control terminal; Telecommunication of IC-card electricity selling device and monitoring problem had both been overcome; Having overcome existing negative control terminal again carries out the electric weight definite value by control center's transmission information and realizes pre-payment control; The user be difficult for to accept, the normal problem of electricity consumption after when communication network runs into fault, will facing the user and paying dues.And the non-contact IC card that existing IC-card forward purchasing electric system uses basically all is to use the M1 card.The M1 card is the abbreviation of Philips Mifare 1 card, is a kind of contactless logic encryption card.Because M1 chip security algorithm is cracked, the impact of reply security has appearred in the system that causes using the M1 card.Current, in order to tackle this security, be replaced by the system that uses the CPU card through the system upgrade that will use the M1 card.The CPU card has independent CPUs processor and chip operating system, can support various application demand more flexibly, has safer design transaction flow.When CPU sticks into line operate, can carry out the encryption and decryption algorithm, algorithm and password all are difficult for cracking.Need carry out mutual cipher authentication repeatedly between subscriber card and the system, improve the security performance of system, good effect arranged for the generation that prevents pseudo-card.
Be replaced by CPU card industry from the M1 card upgrade and also proposed two types of modes: one type of mode is to settle at one go to use the CPU card; The original M1 card of this mode complete upgrading system all is replaced with the transaction terminal of read-write CPU card with the transaction terminal that can only read and write the M1 card originally, and original M1 card is replaced by the CPU card comprehensively; This mode is safe; But need carry out the complete upgrading transformation to original system, disposable input is very big, and it is higher to promote difficulty.Another kind of mode is the system that uses the M1 card progressively to be upgraded be replaced by the system that uses the CPU card.The new transaction terminal of laying of this type mode adopts terminal cpu entirely, and the card of new issue all adopts the CPU card, and terminal cpu should be supported the read-write of M1 card simultaneously, realizes backward compatible.Existing M1 terminal should be able to the compatible CPU card that uses new issue, in use progressively eliminates.This type mode does not need immediately to eliminate old system, and upgrade cost is lower, after new system upgrade finishes higher security is arranged, but still can be owing to being cracked of M1 card brought safety issue in the process that M1 card and CPU card use simultaneously.Use the M1 card for compatibility simultaneously, the new CPU card terminal of building can not settle at one go, must arrive and carry out the secondary upgrading when M1 card is substituted fully, closes M1 cartoon road.
Summary of the invention
In order to solve the problems of the prior art; The invention provides the method for the compatible M1 of use card in the prepaid terminal that uses the CPU card; Solve that prepaid terminal progressively is upgraded in the process of CPU card system in M1 card system in the prior art, when two cards and when depositing because the M1 card is cracked safety issue that system is brought and the problem that must carry out the secondary upgrading in the future to the prepaid terminal of new construction.
The present invention solves the technical scheme that the prior art problem adopted: design and make a kind of in the prepaid terminal that uses the CPU card method of the compatible M1 of use card, may further comprise the steps,
(a) prepaid terminal is set card identification number UID;
(b) this prepaid terminal is sought the card operation, and distinguishes the Card Type of choosing;
(c) if the card of choosing is the CPU card, then direct execution in step (d); If the card of choosing is the M1 card, card identification number UID that this prepaid terminal will be sought and the card identification number UID that is stored in this terminal carry out this;
(d) this prepaid terminal carries out password authentification, and said step (d) further comprises,
(d1) during this prepaid terminal card authentication password, use the password of the correspondence card identification number UID that stores in this prepaid terminal to carry out this;
(d2) during this prepaid terminal card authentication password, when this clip pin be stored in this prepaid terminal in the password of corresponding card identification number UID when consistent, jump to step (e); Otherwise do not carry out the bankcard consumption operation, and send a warning message;
(e) this prepaid terminal carries out presence inspection, if it is in line states, then this prepaid terminal accomplish swipe the card operation and with information reporting to main website; Otherwise jump to step (f);
(f) this prepaid terminal is in off-line state, checks that whether the number of operations of this prepaid terminal surpasses setting value, and said step (f) further comprises,
(f1) this prepaid terminal detection of stored operation sheet number of times therein;
(f2) but this prepaid terminal the operation sheet number of times do this with the operation sheet number of times of setting, see whether exceed;
(f3) this prepaid terminal finds that the operation sheet number of times does not surpass setting value, then accomplishes the bankcard consumption operation, and this card using information is preserved, and waits for and connect main website with information reporting;
(f4) this prepaid terminal finds that the operation sheet number of times has surpassed setting value, does not then carry out the bankcard consumption operation, and sends a warning message.
As further improvement of the present invention, in the said step (a), UID number of the fixing M1 card that main website uses the user downloads to the prepaid terminal of the employed correspondence of user; Perhaps the scene is manual imports UID number in prepaid terminal.
As further improvement of the present invention; In the said step (d), the corresponding password of the M1 card identification number UID that stores in the said prepaid terminal by main website generate issue or said prepaid terminal in the corresponding password of M1 card identification number UID stored generate when obtaining M1 card identification number UID by this prepaid terminal.
As further improvement of the present invention, in the said step (e), this prepaid terminal at set intervals can with master station communication, reporting information, and receive master information if do not receive this master information for some time, then is regarded as not online; When this prepaid terminal is not online, jump to step (f).
As further improvement of the present invention, the type of said card comprises M1 card and CPU card; In the said step (b), when this prepaid terminal is chosen card, distinguish the type of choosing card,, then jump to step (c) if the card of choosing is the M1 card through the inquiry response and the response command that resets.The invention has the beneficial effects as follows: the present invention's UID number of locking M1 card in the prepaid terminal that uses the M1 card, the safety issue that has overcome two cards and come because of the M1 cassette tape when depositing; Simultaneously, this method guarantees that the M1 card is bundled in the old terminal and uses, and lets newly-built terminal need not the compatible M1 of use card, can use as pure CPU card system, need not to upgrade once more in the future, reaches the purpose that reduces cost.
Embodiment
Below in conjunction with accompanying drawing the present invention is described further.
As shown in Figure 1, a kind of in the prepaid terminal that uses the CPU card the compatible method of using the M1 card, may further comprise the steps,
The a prepaid terminal is set card identification number UID;
This prepaid terminal of b is sought the card operation, and distinguishes the Card Type of choosing;
If what c chose is that card card identification number UID that will seek for this prepaid terminal of M1 card and the card identification number UID that is stored in this terminal carry out this;
This prepaid terminal of d carries out password authentification;
This prepaid terminal of e carries out the presence inspection, if it is in line states, and then should be in advance
Payment terminal accomplish swipe the card operation and with information reporting to main frame; Otherwise jump to step f; This prepaid terminal of f is in off-line state, checks whether the number of operations of this prepaid terminal grasped setting value.
Among the said step a, UID number of the fixing M1 card that main website uses the user downloads to the prepaid terminal of the employed correspondence of user; Perhaps on-the-spot manual input UID number as when main website and terminal communication fault, or is imported UID number in the pre-payment negative control terminal by operating personnel are on-the-spot when having other to require in prepaid terminal.
In the said steps d, the corresponding password of the M1 card identification number UID that stores in the said prepaid terminal by main website generate issue or said prepaid terminal in the corresponding password of M1 card identification number UID stored generate when obtaining M1 card identification number UID by this prepaid terminal.
Among the said step e, this prepaid terminal at set intervals can with master station communication, reporting information, and receive master information if do not receive this master information for some time, then can be considered not online; When this prepaid terminal is not online, jump to step f.
Said step f further comprises,
This prepaid terminal detection of stored of f1 operation sheet number of times therein;
But this prepaid terminal of f2 operation sheet number of times is done this with the operation sheet number of times of setting, and sees whether exceed;
This prepaid terminal of f3 finds that the operation sheet number of times does not surpass setting value, then accomplishes the bankcard consumption operation, and this card using information is preserved, and waits for and connect main website with information reporting;
This prepaid terminal of f4 finds that the operation sheet number of times has surpassed setting value, does not then carry out the bankcard consumption operation, and sends a warning message.
Said steps d further comprises,
During this prepaid terminal card authentication password of d1, use the password of the correspondence card identification number UID that stores in this prepaid terminal to carry out this;
During this prepaid terminal card authentication password of d2, when this clip pin be stored in this negative control terminal in the password of corresponding card identification number UID when consistent, jump to step e; Otherwise do not carry out the bankcard consumption operation, and send a warning message.
The type of said card comprises M1 card and CPU card; Among the said step b, when this prepaid terminal is chosen card, distinguish the type of choosing card,, then jump to step c if the card of choosing is the M1 card through the inquiry response and the response command that resets.
As one embodiment of the present of invention, M1 card and CPU card and deposit use in the system, the user pays dues and purchases electricity, and business personnel handle neocaine for the user or supplement old card with money through IC-card sale of electricity management software, according to the pay tariff electric weight of purchasing IC-card are supplemented with money.Each uses the user of M1 card can only use fixing card, and use CPU card can be general, and the salesman can suggestion use the CPU card instead when each M1 card user is supplemented with money.The CPU card is only used at new terminal, and the card of newly opening all uses the CPU card.In the system M1 card and CPU card are distinguished use; The M1 card can only be used for corresponding prepaid terminal system corresponding prepaid terminal is issued in UID number of M1 card; And the CPU card does not limit, can be general in prepaid terminal, can support in the future and the interconnecting of other charging system.The use of CPU card is only supported at new terminal, no longer backward compatible M1 card.
Fig. 2 shows the prepaid terminal upgrade method of use M1 card of the present invention.The M1 card is consistent with the CPU card on the hardware of card-reading terminal, on the initial operational order of seeking card, anti-collision, choosing card, also is consistent.After choosing card is accomplished, can distinguish what choose card through the inquiry response and the response command that resets is CPU card or M1 card.What originally use the pre-payment negative control terminal of M1 card to differentiate in choosing card back to choose is M1 card or CPU card, M1 card in this way, and then according to original program circuit, if what choose is the CPU card, then need be according to the operating process of CPU card.Original terminal need be in the program of updating operation CPU card on the software and the Card Type decision behind the increase choosing card.
For the prepaid terminal that uses the M1 card, need on the basis of original operation M1 card, increase the UID checking of M1 card.When the M1 card is sought at the terminal, read the M1 card earlier UID number, and with the UID that reads number with the terminal in store make comparisons for available UID number.Can issue by main website is online for the UID that stores in the terminal number, also can be by staff's manually input voluntarily on the terminal.If the UID of the card of reading number with the terminal on store do not meet for UID number, then the terminal is sent warning information and on display screen, is shown error message, other card that is cracked can not have any impact to the terminal in the system like this.
Fig. 3 shows a kind of prepaid terminal operating process of this method.
At first be the terminal seek card, anti-collision, the operation of choosing card, choose card after, differentiating what choose is CPU card or M1 card.If what choose is the CPU card, then operate according to normal CPU card.If what choose is the M1 card, need read the M1 card UID number, and with the UID that reads number with the terminal in store do this available UID number.
If UID number of the M1 card of reading with the terminal on store be consistent for UID number, the terminal is to sticking into capable cryptographic check.With the password that generates card for UID number of card, accomplish that a card one is close during hair fastener., can directly read the corresponding UID password that is stored on the terminal and come check card during check card at the terminal.If cryptographic check is not passed through, then the terminal is sent warning information and on display screen, is shown error message.
If the terminal is passed through the cryptographic check of card, whether terminal inquiry self is online.The terminal at set intervals can with master station communication, reporting information if do not receive master information for some time, then can be considered not online.If the terminal is online, corresponding UID number the electricity charge value of storing in the electricity charge information in then the terminal will be blocked and the terminal is made comparisons, if meet; Then accomplish bankcard consumption; And card using information reported main website, main website is again with the operation sheet number of times zero clearing of writing down in the terminal, and revises corresponding UID number electricity charge value.If do not meet, then the terminal is sent warning information and on display screen, is shown error message.Main website is handed down to charging information at UID number terminal of corresponding card after the user pays dues and card supplemented with money.The terminal is when user card punching like this, if judge that oneself is online, the electricity charge information that then can come card authentication with the electricity charge information of oneself storing earlier is after completion is swiped the card, again with information reporting.
If the terminal is passed through the cryptographic check of card, and the terminal is found self to be in off-line state.The operation sheet number of times of terminal inquiry self, if greater than the value of setting, then the terminal is sent warning information and on display screen, is shown error message.If the operation sheet number of times is less than the value of setting, then the operation of swiping the card is accomplished at the terminal, and the operation sheet number of times is added 1, then with this information storage of swiping the card in the terminal.When being connected to main website once more, this card using information is reported at the terminal.The user possibly taken place during the terminal off-line paid dues and dash value, and main website can't notify the terminal.So when swipe the card at offline user in the terminal, can not verify the electricity charge information of oneself storage again, and the operation of must completion once swiping the card.If do not adopt the mode of terminal and card UID number pairing, even limited each UID number the number of times of swiping the card, a large amount of different UID number card possibilities of swiping the card of duplicating still possibly appear, cause electricity charge loss.The mode that adopts terminal and card to match; Have only corresponding UID number card can on the terminal, accomplish the operation of swiping the card; If the off-line of the setting number of times that allows to swipe the card is made as 1, so same UID number duplicate card and can only use once, and because UID number unpaired with other terminal; Can not possibly use on the terminal of off-line at other, also can not cause electricity charge loss like this under the off-line state.And the mode of terminal and card pairing can prevent also that user's card from being usurped because of carelessness and duplicate, even block stolen duplicating like this, can not on other terminal, use, and can not cause damage to the user.
The present invention's UID number of locking M1 card in the prepaid terminal that uses the M1 card overcome prepaid terminal and progressively has been upgraded in the process of CPU card system in M1 card system, when two cards and when depositing because the safety issue that the M1 card is cracked system is brought.Simultaneously the M1 card is bundled in the old terminal and uses, and newly-built terminal need not the compatible M1 of use card, can use as pure CPU card system, need not to upgrade once more in the future.
Above content is to combine concrete preferred implementation to the further explain that the present invention did, and can not assert that practical implementation of the present invention is confined to these explanations.For the those of ordinary skill of technical field under the present invention, under the prerequisite that does not break away from the present invention's design, can also make some simple deduction or replace, all should be regarded as belonging to protection scope of the present invention.