Summary of the invention
In order to solve the problems of the technologies described above, the invention provides a kind of bio-identification IC-card and control method thereof, when not changing external system, utilize biological identification technology to ensure the security that IC-card uses and convenience.
In order to reach the object of the invention, the invention provides a kind of bio-identification IC-card, comprise two interface chip and micro-control unit, described IC-card also comprises biometric sensor, power module and analog switch, described biometric sensor is connected with described micro-control unit, described micro-control unit is connected with described pair of interface chip by described analog switch, described power module is connected with described micro-control unit and is connected with described pair of interface chip by described analog switch, wherein: in response to external touch instruction, described micro-control unit is activated and sends acquisition instructions to described biometric sensor, described biometric sensor carries out physical characteristics collecting in response to described acquisition instructions, and is sent to described micro-control unit by after the biological feature encryption of collection, the biological characteristic of described collection and the biometric templates prestored are compared by described micro-control unit, and after comparison completes, switch described analog switch, to obtain with the communication of described pair of interface chip and to make described power module power to described pair of interface chip, described micro-control unit is sent to described pair of interface chip after being encrypted by comparison result, described pair of interface chip, by after described comparison result deciphering, arranges the flag of self according to described comparison result, when described flag is set to effective, described micro-control unit switches described analog switch, sets up communication to make described pair of interface chip and outside card reader, described micro-control unit detects the communication state of described pair of interface chip and described outside card reader, after described pair of interface chip and described outside card reader communication terminate, switches described analog switch, to obtain the communication with described pair of interface chip, described micro-control unit sends the instruction of removing flag to described pair of interface chip.
Further, the biological characteristic of described collection is compared with the biometric templates prestored and is specifically comprised by described micro-control unit: described micro-control unit extracts the first eigenvector group corresponding with the biological characteristic of described collection and the second feature Vector Groups corresponding with the biometric templates prestored; Described micro-control unit contrasts each proper vector in described first eigenvector group and described second feature Vector Groups, and adds up the quantity of identical proper vector; Account for the proportion of proper vector total quantity in described first eigenvector group according to the quantity of described identical proper vector, whether the biological characteristic judging described collection mates with the biometric templates prestored.
Further, described pair of interface chip is by after described comparison result deciphering, the flag arranging self according to described comparison result specifically comprises: the flag of self, by after described comparison result deciphering, if described comparison result is coupling, is then set to effectively by described pair of interface chip; If described comparison result is not for mate, then it is invalid the flag of self to be set to.
Further, when being set to effective when described flag, described micro-control unit switches described analog switch, and to make after described pair of interface chip and outside card reader set up communication, whether described micro-control unit detects described outside card reader and power to described pair of interface chip; When detecting that described outside card reader is powered to described pair of interface chip, assign the instruction stopping powering to described pair of interface chip to described power module; Correspondingly, after described pair of interface chip and described outside card reader communication terminate, described micro-control unit assigns the instruction starting to power to described pair of interface chip to described power module.
Further, when being set to effective when described flag, described micro-control unit switches described analog switch, and to make after described pair of interface chip and outside card reader set up communication, described micro-control unit setting wake-up period also enters dormant state.
Further, the communication state that described micro-control unit detects described pair of interface chip and described outside card reader specifically comprises: according to described wake-up period, and described micro-control unit enters duty from dormant state; Whether described micro-control unit detects described outside card reader and powers to described pair of interface chip; When detecting that described outside card reader is not powered to described pair of interface chip, determine that the communication between described pair of interface chip and described outside card reader terminates.
Further, at described micro-control unit to after the described pair of interface chip sends the instruction of removing flag, the described pair of interface chip is in response to the instruction of described removing flag, and it is invalid the flag of self to be set to.
Present invention also offers a kind of control method of bio-identification IC-card, comprising: in response to external touch instruction, micro-control unit is activated and sends acquisition instructions to biometric sensor; Described biometric sensor carries out physical characteristics collecting in response to described acquisition instructions, and is sent to described micro-control unit by after the biological feature encryption of collection; The biological characteristic of described collection and the biometric templates that prestores are compared by described micro-control unit, and after comparison completes switching analoging switch, to obtain with the communication of two interface chip and to make power module power to described pair of interface chip; Described micro-control unit is sent to described pair of interface chip after being encrypted by comparison result; Described pair of interface chip, by after described comparison result deciphering, arranges the flag of self according to described comparison result; When described flag is set to effective, described micro-control unit switches described analog switch, sets up communication to make described pair of interface chip and outside card reader; Described micro-control unit detects the communication state of described pair of interface chip and described outside card reader, after described pair of interface chip and described outside card reader communication terminate, switches described analog switch, to obtain the communication with described pair of interface chip; Described micro-control unit sends the instruction of removing flag to described pair of interface chip.
Further, when being set to effective when described flag, described micro-control unit switches described analog switch, and to make after described pair of interface chip and outside card reader set up communication, described method also comprises: described micro-control unit setting wake-up period also enters dormant state.
Further, the communication state that described micro-control unit detects described pair of interface chip and described outside card reader specifically comprises: according to described wake-up period, and described micro-control unit enters duty from dormant state; Whether described micro-control unit detects described outside card reader and powers to described pair of interface chip; When detecting that described outside card reader is not powered to described pair of interface chip, determine that the communication between described pair of interface chip and described outside card reader terminates.
Compared with prior art, a kind of bio-identification IC-card and control method thereof that there is provided are provided, by arranging two interface chip in IC-card, micro-control unit, biometric sensor, analog switch and power module, when not changing outside card reader, the process of living things feature recognition can be realized, ensure that the convenience that IC-card uses.In addition, can the access rights of switch dual interface chip neatly by flag, to ensure the security of IC-card use procedure.
Other features and advantages of the present invention will be set forth in the following description, and, partly become apparent from instructions, or understand by implementing the present invention.Object of the present invention and other advantages realize by structure specifically noted in instructions, claims and accompanying drawing and obtain.
Embodiment
For making the object, technical solutions and advantages of the present invention clearly understand, hereinafter will be described in detail to embodiments of the invention by reference to the accompanying drawings.It should be noted that, when not conflicting, the embodiment in the application and the feature in embodiment can combination in any mutually.
Can perform in the computer system of such as one group of computer executable instructions in the step shown in the process flow diagram of accompanying drawing.Further, although show logical order in flow charts, in some cases, can be different from the step shown or described by order execution herein.
The functional block diagram of a kind of bio-identification IC-card that Fig. 1 provides for the embodiment of the present application.As shown in Figure 1, described bio-identification IC-card comprises two interface chip 100, micro-control unit 200, biometric sensor 300, power module 400 and analog switch 500, described biometric sensor 300 is connected with described micro-control unit 200, and described micro-control unit 200 is connected with described pair of interface chip 100 by described analog switch 500, and described power module 400 is connected with described micro-control unit 200 and is connected with described pair of interface chip 100 by described analog switch 500.
In the embodiment of the present application, described biometric sensor 300 can be fingerprint sensor or vocal print sensor, and it such as, for gathering the biological characteristic of user, fingerprint and vocal print from outside.When described bio-identification IC-card is not by use, described power module 400 can not be powered to described micro-control unit 200 and two interface chip 100, only just needs when described IC-card is activated to power to described micro-control unit 200 and two interface chip 100.Particularly, the surface of described IC-card can arrange a button, by touching or press this button, can wake described IC-card up.
User is when preparing to use described IC-card, and just can touch or press above-mentioned button, in response to this external touch instruction, the micro-control unit 200 in described IC can be activated, thus can send acquisition instructions to described biometric sensor 300.After described biometric sensor receives this acquisition instructions, just in response to this acquisition instructions, outside biological characteristic can be gathered.Now, if finger is placed in described biometric sensor by user, so the fingerprint of this finger just can be collected by described biometric sensor; Also or user says one section of default voice, so this section of voice just can be collected by described biometric sensor.Above-mentioned fingerprint and voice all can be gathered by described biometric sensor as described biological characteristic.After described biometric sensor collects biological characteristic, in order to prevent this biological characteristic from being usurped by lawless person in transmitting procedure, can the biological characteristic collected be encrypted.Described being encrypted biological characteristic can adopt cryptographic algorithm and key to realize.Described cryptographic algorithm can be some formula performed by program or rules of being pre-stored in described biometric sensor, and described key can be the executory optional parameter of cryptographic algorithm, if do not have key, also cannot decipher even if be aware of cryptographic algorithm.Described cryptographic algorithm can be such as DES algorithm or DSA algorithm.Biological characteristic after encryption, to after the biological feature encryption gathered, can be sent to described micro-control unit by described biometric sensor.
After described micro-control unit receives the biological characteristic of described collection, just the biological characteristic of this collection and the biometric templates prestored can be contrasted.The described biometric templates prestored can be that the card user of described IC-card shifts to an earlier date typing, and this biometric templates prestored can be used for distinguishing that whether the user of current this IC-card of use is the card user of this IC-card.Particularly, described micro-control unit can extract the first eigenvector group corresponding with the biological characteristic of described collection and the second feature Vector Groups corresponding with the biometric templates prestored.In biological characteristic, often there is the unique point that can characterize this biological characteristic, for fingerprint, Fig. 2 is the unique point schematic diagram of fingerprint in the embodiment of the present application.As shown in Figure 2, the circle in figure and square represent the position of described unique point, and the kind of unique point that what circle and square characterized is, wherein, the kind of circle characteristic of correspondence point is end points, and the kind of square characteristic of correspondence point is point of crossing.Now, coordinate system can be set up for this fingerprint, thus the position of each unique point in this fingerprint all can utilize coordinate to represent uniquely.Based on the position of described unique point and the kind of described unique point, thus the vector of described Feature point correspondence can be determined.Illustrate, the vector of one of them Feature point correspondence can be expressed as (x, y, θ, α), wherein, x and y represents horizontal ordinate and the ordinate of this Feature point correspondence respectively, and θ represents this unique point position angle in a coordinate system, and α then represents the kind of this unique point.Like this, each unique point in this fingerprint all can utilize corresponding vector to represent, the vector of all Feature point correspondence thus can form this fingerprint characteristic of correspondence Vector Groups.
After being extracted described first eigenvector group and second feature Vector Groups, described micro-control unit just can contrast each proper vector in described first eigenvector group and described second feature Vector Groups, and adds up the quantity of identical proper vector.Identical proper vector then represent collection biological characteristic and preset biometric templates in there is identical unique point, the quantity of identical proper vector then correspond to the quantity of identical unique point.
Then, described micro-control unit just can account for the proportion of proper vector total quantity in described first eigenvector group according to the quantity of described identical proper vector, whether the biological characteristic judging described collection mates with the biometric templates prestored.Particularly, described micro-control unit can pre-set a gravity thresholds, this gravity thresholds is such as 95%, so when the proportion that the quantity of described identical proper vector accounts for proper vector total quantity in described first eigenvector group is greater than or equal to 95%, just can judge that the biological characteristic of described collection mates with the biometric templates prestored; Otherwise the biological characteristic of described collection and the biometric templates prestored are unmatched.
Like this, described micro-control unit just can complete the process contrasted the biological characteristic gathered.It should be noted that, in order to prevent lawless person from usurping biological attribute data in described micro-control unit, described micro-control unit can carry out the contrast of biological characteristic when encryption, thus can ensure the safety of data.
After terminating biological characteristic comparison, described micro-control unit just can switch described analog switch, to obtain with the communication of described pair of interface chip and to make described power module power to described pair of interface chip.Described pair of interface chip can be connected by 7816 interfaces with described analog switch, by switching described analog switch, thus described pair of interface chip can be made to carry out communication selectively with described micro-control unit or carry out communication with outside card reader.After biological characteristic comparison terminates, described micro-control unit needs the result of comparison to send to described pair of interface chip, now then need to switch described analog switch, to obtain the communication with described pair of interface chip, and described power module can be made to power to described pair of interface chip, to ensure the normal work of described pair of interface chip.
Similarly, in order to ensure the security that data are transmitted, described micro-control unit is sent to described pair of interface chip after comparison result can being encrypted.Described pair of interface chip, after receiving the comparison result of encryption, can obtain described comparison result to the decrypt data of encryption, thus can arrange the flag of self according to described comparison result.Described flag can be used for showing whether described pair of interface chip is in state of activation, if flag is set to effectively, so described pair interface chip is then activated, and can carry out communication with outside card reader; If flag is set to invalid, so described pair interface chip is then locked, and cannot carry out communication with outside card reader.The flag of self, by after described comparison result deciphering, if described comparison result is coupling, is then set to effectively by described pair of interface chip; If described comparison result is not for mate, then it is invalid the flag of self to be set to.
When described flag is set to effective, show that the user identity using this IC-card is confirmed, can normal transaction be carried out.Now described pair of interface chip can send to described micro-control unit and confirm instruction.Receive this confirmation instruction, described micro-control unit then can switch described analog switch, sets up communication to make described pair of interface chip and outside card reader.Now, once when IC-card sets up communication by mode that is contactless or that contact and outside card reader (such as ATM, POS or social security card reader), just can normal transaction be carried out.
In the application one preferred embodiment, after being that outside card reader and described pair of interface chip set up communication, just can be powered to described pair of interface chip by described outside card reader, thus the power module of IC-card inside can be made to stop powering to described pair of interface chip.Therefore, in the application's the preferred embodiment, after described pair of interface chip and outside card reader set up communication, whether described micro-control unit can detect described outside card reader and power to described pair of interface chip, when detecting that described outside card reader is powered to described pair of interface chip, then assign the instruction stopping powering to described pair of interface chip to described power module.Can avoid like this carrying out dual power supply to described pair of interface chip, thus save the electricity of described power module.
After described pair of interface chip and outside card reader set up communication, described micro-control unit can detect the communication state of described pair of interface chip and described outside card reader, after described pair of interface chip and described outside card reader communication terminate, then can switch described analog switch, to obtain the communication with described pair of interface chip.After described pair of interface chip and described outside card reader communication terminate, then show that transaction terminates, now described micro-control unit just can switch described analog switch again, be connected with the communication of outside card reader to disconnect described pair of interface chip, again obtain the communication with described pair of interface chip.Correspondingly, in another embodiment of the application, after described pair of interface chip and described outside card reader communication terminate, described micro-control unit can assign to described power module the instruction starting to power to described pair of interface chip, to ensure the normal work of two interface chip.
It should be noted that, described in the process that transaction is carried out, micro-control unit is without the need to processing data, therefore can, after described pair of interface chip and outside card reader set up communication, described micro-control unit be allowed to enter dormant state in another preferred embodiment of the application.Particularly, after described pair of interface chip and outside card reader set up communication, described micro-control unit can set wake-up period and enter dormant state.Described wake-up period can be such as 2 minutes, and that is described micro-control unit can be waken up after 2 minutes automatically entering dormant state, thus enters duty.
The micro-control unit entering duty can detect the communication state of described pair of interface chip and described outside card reader, and whether this communication state can be distinguished powering to described pair of interface chip by described outside card reader.Therefore, the micro-control unit entering duty can detect the feeder ear of described outside card reader by GIPO, when detecting that described outside card reader is not powered to described pair of interface chip, then can determine that the communication between described pair of interface chip and described outside card reader terminates.
After transaction terminates, then need in time by described pair of interface chip locking, to ensure the security of subsequent transaction activity.Therefore, after transaction terminates, described micro-control unit can send the instruction of removing flag to described pair of interface chip.Correspondingly, the described pair of interface chip is in response to the instruction of described removing flag, and it is invalid the flag of self can be set to, thus ensures that described pair of interface chip is in the lock state, and cannot carry out transaction again when not reactivating.After described pair of interface chip is in the lock state, described micro-control unit just can close analog switch, terminate the communication with described pair of interface chip, and the instruction of stopping power supply can be sent to described power module, make IC-card return initial unactivated state.
The embodiment of the present application also provides a kind of control method of bio-identification IC-card.The process flow diagram of the control method of a kind of bio-identification IC-card that Fig. 3 provides for the embodiment of the present application.Although hereafter describe flow process to comprise the multiple operations occurred with particular order, but should have a clear understanding of, these processes can comprise more or less operation, and these operations can sequentially perform or executed in parallel (such as using parallel processor or multi-thread environment).As shown in Figure 3, described method comprises:
S1: in response to external touch instruction, micro-control unit is activated and sends acquisition instructions to biometric sensor;
S2: described biometric sensor carries out physical characteristics collecting in response to described acquisition instructions, and be sent to described micro-control unit by after the biological feature encryption of collection;
S3: the biological characteristic of described collection and the biometric templates that prestores are compared by described micro-control unit, and after comparison completes switching analoging switch, to obtain with the communication of two interface chip and to make power module power to described pair of interface chip;
S4: described micro-control unit is sent to described pair of interface chip after being encrypted by comparison result;
S5: described pair interface chip, by after described comparison result deciphering, arranges the flag of self according to described comparison result;
S6: when described flag is set to effective, described micro-control unit switches described analog switch, sets up communication to make described pair of interface chip and outside card reader;
S7: described micro-control unit detects the communication state of described pair of interface chip and described outside card reader, after described pair of interface chip and described outside card reader communication terminate, switches described analog switch, to obtain the communication with described pair of interface chip;
S8: described micro-control unit sends the instruction of removing flag to described pair of interface chip.
In the application one preferred embodiment, the biological characteristic of described collection is compared with the biometric templates prestored and is specifically comprised by described micro-control unit:
Described micro-control unit extracts the first eigenvector group corresponding with the biological characteristic of described collection and the second feature Vector Groups corresponding with the biometric templates prestored;
Described micro-control unit contrasts each proper vector in described first eigenvector group and described second feature Vector Groups, and adds up the quantity of identical proper vector;
Account for the proportion of proper vector total quantity in described first eigenvector group according to the quantity of described identical proper vector, whether the biological characteristic judging described collection mates with the biometric templates prestored.
In another preferred embodiment of the application, described pair of interface chip is by after described comparison result deciphering, and the flag arranging self according to described comparison result specifically comprises:
The flag of self, by after described comparison result deciphering, if described comparison result is coupling, is then set to effectively by described pair of interface chip;
If described comparison result is not for mate, then it is invalid the flag of self to be set to.
In another preferred embodiment of the application, when being set to effective when described flag, described micro-control unit switches described analog switch, and to make after described pair of interface chip and outside card reader set up communication, described method also comprises:
Whether described micro-control unit detects described outside card reader and powers to described pair of interface chip;
When detecting that described outside card reader is powered to described pair of interface chip, assign the instruction stopping powering to described pair of interface chip to described power module;
Correspondingly,
After described pair of interface chip and described outside card reader communication terminate, described micro-control unit assigns the instruction starting to power to described pair of interface chip to described power module.
In another preferred embodiment of the application, when being set to effective when described flag, described micro-control unit switches described analog switch, and to make after described pair of interface chip and outside card reader set up communication, described method also comprises:
Described micro-control unit setting wake-up period also enters dormant state.
In another preferred embodiment of the application, the communication state that described micro-control unit detects described pair of interface chip and described outside card reader specifically comprises:
According to described wake-up period, described micro-control unit enters duty from dormant state;
Whether described micro-control unit detects described outside card reader and powers to described pair of interface chip;
When detecting that described outside card reader is not powered to described pair of interface chip, determine that the communication between described pair of interface chip and described outside card reader terminates.
In another preferred embodiment of the application, at described micro-control unit to after the described pair of interface chip sends the instruction of removing flag, described method also comprises:
The described pair of interface chip is in response to the instruction of described removing flag, and it is invalid the flag of self to be set to.
A kind of bio-identification IC-card that the embodiment of the present application provides and control method thereof, possess following beneficial effect:
1) security improves, and can ensure the security that algorithm and biometric templates store by comparison result encrypted transmission, thus can prevent lawless person from intercepting comparison result or biometric templates data;
2) by arranging the scheme of flag, two interface chip is made in activation or unactivated state real-time change, not need wait to pre-set the time, and after preventing the time that pre-sets from reaching, the ongoing transaction of hard closing, causes Fail Transaction or generation to gulp down card phenomenon etc.;
3) adopt analog switch, do not change the hardware configuration of current double-interface IC card, thus control the connection between 7816 interfaces of two interface chip and micro-control unit or outside card reader alternatively.
In this manual, such as first and second such adjectives only may be used for an element or action and another element or action to distinguish, and without requiring or imply this relation or the order of any reality.When environment allows, should not be construed as one that is confined in only element, parts or step with reference to element or parts or step (s), and can be one or more etc. in element, parts or step.
Although the embodiment disclosed by the present invention is as above, the embodiment that described content only adopts for ease of understanding the present invention, and be not used to limit the present invention.Those of skill in the art belonging to any the present invention; under the prerequisite not departing from the spirit and scope disclosed by the present invention; any amendment and change can be carried out in the form implemented and details; but scope of patent protection of the present invention, the scope that still must define with appending claims is as the criterion.