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 problem of power consumer counting cost by gas meter difficulty, 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's side the IC-card electricity selling device is installed, the client passes through to bank's electricity charge that prestore, purchase electric weight in advance and supplement IC-card with money with single the calculating to business window of paying dues, client's IC-card electricity selling device of again purchasing electric weight being swiped the card carries out electricity consumption.
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 will facing the user pay dues when communication network running into fault.And the non-contact IC card that existing IC-card forward purchasing electric system uses substantially 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 by 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 to carry out mutual cipher authentication repeatedly between subscriber card and the system, improved the security performance of system, good effect is arranged for the generation that prevents pseudo-card.
Be replaced by CPU card industry from the M1 card upgrade and also proposed two class modes: a class mode is to settle at one go to use the CPU card, the original M1 card of this mode complete upgrading system, originally the transaction terminal that can only read and write the M1 card all is replaced with the transaction terminal of read-write CPU card, 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 will use the system of M1 card progressively to upgrade to be replaced by the system that uses the CPU card.The new transaction terminal of laying of this class 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 class 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, 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 CPU of use card in the prepaid terminal that uses the M1 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 M1 card method of the compatible CPU 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 what choose is that card 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 compare;
(d) this prepaid terminal carries out password authentification.
The present invention further improves: in the described 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.
The present invention further improves: in the described step (d), the password of the M1 card identification number UID correspondence of storing in the described prepaid terminal by main website generate issue or described prepaid terminal in the password of the M1 card identification number UID correspondence of storing generate when obtaining M1 card identification number UID by this prepaid terminal.
The present invention further improves: described in the prepaid terminal that uses the M1 card method of the compatible CPU of use card further comprising the steps of:
(e) this prepaid terminal carries out the presence inspection, if it is in line states, then this prepaid terminal is finished and swiped the card operation and information is reported to main frame; Otherwise jump to step (f);
(f) this prepaid terminal is in off-line state, checks whether the number of operations of this prepaid terminal grasped setting value.
The present invention further improves: in the described 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).
The present invention further improves: described 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 make comparisons 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 finishes the bankcard consumption operation, and this card using information is preserved, and waits for and connects main website information is reported;
(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.
The present invention further improves: described 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 compare;
(d2) during this prepaid terminal card authentication password, 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 present invention further improves: the type of described card comprises M1 card and CPU card; In the described 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 by 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 allows 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
The invention will be further described below in conjunction with accompanying drawing.
As shown in Figure 1, a kind of in the prepaid terminal that uses the M1 card the compatible method of using the CPU 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 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 compare;
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, then this prepaid terminal is finished and swiped the card operation and information is reported 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 described 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 described steps d, the password of the M1 card identification number UID correspondence of storing in the described prepaid terminal by main website generate issue or described prepaid terminal in the password of the M1 card identification number UID correspondence of storing generate when obtaining M1 card identification number UID by this prepaid terminal.
Among the described 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.
Described 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 made comparisons 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 finishes the bankcard consumption operation, and this card using information is preserved, and waits for and connects main website information is reported;
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.
Described 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 compare;
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 described card comprises M1 card and CPU card; Among the described 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 by 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 by 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.New terminal is only used the CPU card, 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, and system issues corresponding prepaid terminal with 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.New terminal is only supported the use of CPU card, 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, also is consistent on the initial operational order of seeking card, anti-collision, choosing card.Can distinguish what choose card by the inquiry response and the response command that resets after choosing card is finished 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 terminal is sought the M1 card, read the M1 card earlier UID number, and available UID number of storing in UID number of reading and the terminal made comparisons.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 terminal.If the UID of the card of reading number with terminal on store do not meet for UID number, then terminal is sent warning information and show error message on display screen, other card that is cracked can not have any impact to terminal in the system like this.
Fig. 3 shows a kind of prepaid terminal operating process of this method.
At first be 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 available UID number of storing in UID number of reading and the terminal made comparisons.
If UID number of the M1 card of reading with terminal on store be consistent for UID number, 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.When the terminal check card, can directly read the corresponding UID password that is stored on the terminal and come check card.If cryptographic check is not passed through, then terminal is sent warning information and show error message on display screen.
If terminal is passed through the cryptographic check of card, whether terminal inquiry self is online.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 terminal is online, corresponding UID number the electricity charge value of storing in the electricity charge information in then terminal will be blocked and the terminal is made comparisons, if meet, then finish 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 terminal is sent warning information and show error message on display screen.Main website is handed down to charging information UID number terminal of corresponding card after the user pays dues and card supplemented with money.Terminal is when user card punching like this, if judge own online, the electricity charge information that can come card authentication with own electricity charge information of storing earlier then, finish swipe the card after, again information is reported.
If terminal is passed through the cryptographic check of card, and 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 terminal is sent warning information and show error message on display screen.If the operation sheet number of times is less than the value of setting, then terminal is finished the operation of swiping the card, and the operation sheet number of times is added 1, and the information storage that this is swiped the card is in terminal then.When terminal is connected to main website once more, this card using information is reported.The user may be taken place during the terminal off-line paid dues, and main website can't notify terminal towards value.So when terminal is swiped the card at offline user, can not verify the electricity charge information that oneself is stored again, and must finish the operation of 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 may appear, cause electricity charge loss.The mode that adopts terminal and card to match, have only corresponding UID number card can on terminal, finish 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 may 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 use on other terminal, 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 be in conjunction with concrete preferred implementation to further describing that the present invention did, can not assert that concrete enforcement of the present invention is confined to these explanations.For the general technical staff of the technical field of the invention, without departing from the inventive concept of the premise, can also make some simple deduction or replace, all should be considered as belonging to protection scope of the present invention.