Invention content
In order to solve the above technical problem, the present invention provides a kind of bio-identification IC card and its control methods, are not changing
In the case of becoming external system, ensure the safety and convenience that IC card uses using biological identification technology.
In order to reach the object of the invention, the present invention provides a kind of bio-identification IC card, including double interface chips and micro-control
Unit processed, the IC card further include biometric sensor, power module and analog switch, the biometric sensor with
The micro-control unit is connected, and the micro-control unit is connected by the analog switch with double interface chips, the electricity
Source module is connected with the micro-control unit and is connected with double interface chips by the analog switch, wherein:Response
It is instructed in external touch, the micro-control unit is activated and sends acquisition instructions to the biometric sensor;The life
Object feature sensor carries out physical characteristics collecting in response to the acquisition instructions, and will be sent to after the biological feature encryption of acquisition
The micro-control unit;The micro-control unit compares the biological characteristic of the acquisition with the biometric templates to prestore
It is right, and switch the analog switch after the completion of comparing, to obtain the communication with double interface chips and make the electricity
Source module is powered to double interface chips;The micro-control unit is sent to double interface cores after encrypting comparison result
Piece;After double interface chips decrypt the comparison result, the flag of itself is set according to the comparison result;When described
When flag is arranged to effective, the micro-control unit switches the analog switch so that double interface chips with it is outer
Portion's card reader establishes communication;The micro-control unit detects the communication state of double interface chips and the external card reader,
After double interface chips and external card reader communication, switch the analog switch, to obtain and double boundaries
The communication of face chip;The micro-control unit sends the instruction for removing flag to double interface chips.
Further, the micro-control unit compares the biological characteristic of the acquisition with the biometric templates to prestore
To specifically including:The micro-control unit extract first eigenvector group corresponding with the biological characteristic of the acquisition and with it is pre-
The corresponding second feature Vector Groups of biometric templates deposited;The micro-control unit compare the first eigenvector group and
Each feature vector in the second feature Vector Groups, and count the quantity of identical feature vector;According to described identical
The quantity of feature vector accounts for the proportion of feature vector total quantity in the first eigenvector group, judges that the biology of the acquisition is special
It levies and whether is matched with the biometric templates to prestore.
Further, after double interface chips decrypt the comparison result, itself is arranged according to the comparison result
Flag specifically include:It, will if the comparison result is matching after double interface chips decrypt the comparison result
The flag of itself is set as effective;If the comparison result is to mismatch, the flag of itself is set as invalid.
Further, when the flag is arranged to effective, the micro-control unit switches the analog switch,
So that after double interface chips establish communication with external card reader, the micro-control unit detects the external card reader
Whether power to double interface chips;When detecting that the external card reader is powered to the double interface chips, to described
Power module assigns the instruction for stopping powering to double interface chips;Correspondingly, when double interface chips and the outside
After card reader communicates, the micro-control unit assigns the finger for starting to power to double interface chips to the power module
It enables.
Further, when the flag is arranged to effective, the micro-control unit switches the analog switch,
So that after double interface chips establish communication with external card reader, the micro-control unit sets wake-up period and enters
Dormant state.
Further, the communication state that the micro-control unit detects double interface chips and the external card reader has
Body includes:According to the wake-up period, the micro-control unit enters working condition from dormant state;The micro-control unit inspection
Survey whether the external card reader powers to double interface chips;When detecting the external card reader not to double boundaries
When the chip power supply of face, determine that the communication between double interface chips and the external card reader terminates.
Further, after the micro-control unit sends the instruction for removing flag to double interface chips, institute
Double interface chips are stated in response to the instruction for removing flag, the flag of itself is set as invalid.
The present invention also provides a kind of control methods of bio-identification IC card, including:It is instructed in response to external touch, micro-control
Unit processed is activated and sends acquisition instructions to biometric sensor;The biometric sensor refers in response to the acquisition
It enables and carries out physical characteristics collecting, and the micro-control unit will be sent to after the biological feature encryption of acquisition;The microcontroller list
The biological characteristic of the acquisition is compared member with the biometric templates to prestore, and switching simulation is opened after the completion of comparing
It closes, to obtain the communication with double interface chips and power module is made to power to double interface chips;The microcontroller list
Member is sent to double interface chips after encrypting comparison result;After double interface chips decrypt the comparison result, root
The flag of itself is set according to the comparison result;When the flag is arranged to effective, the micro-control unit switching
The analog switch communicates so that double interface chips are established with external card reader;Described in the micro-control unit detection
The communication state of double interface chips and the external card reader, when double interface chips and external card reader communication terminate
Afterwards, switch the analog switch, to obtain the communication with double interface chips;The micro-control unit is to double interface cores
Piece sends the instruction for removing flag.
Further, when the flag is arranged to effective, the micro-control unit switches the analog switch,
So that after double interface chips establish communication with external card reader, the method further includes:The micro-control unit is set
Determine wake-up period and enters dormant state.
Further, the communication state that the micro-control unit detects double interface chips and the external card reader has
Body includes:According to the wake-up period, the micro-control unit enters working condition from dormant state;The micro-control unit inspection
Survey whether the external card reader powers to double interface chips;When detecting the external card reader not to double boundaries
When the chip power supply of face, determine that the communication between double interface chips and the external card reader terminates.
Compared with prior art, the present invention includes a kind of bio-identification IC card and its control method provided, by IC
Double interface chips, micro-control unit, biometric sensor, analog switch and power module are set in card, it is outer not changing
In the case of portion's card reader, the process of living things feature recognition can be realized, ensure that the convenience that IC card uses.In addition, passing through
Flag can neatly switch the access rights of double interface chips, to ensure that IC card uses the safety of process.
Other features and advantages of the present invention will be illustrated in the following description, also, partly becomes from specification
It obtains it is clear that understand through the implementation of the invention.The purpose of the present invention and other advantages can be by specification, rights
Specifically noted structure is realized and is obtained in claim and attached drawing.
Specific implementation mode
To make the objectives, technical solutions, and advantages of the present invention clearer, below in conjunction with attached drawing to the present invention
Embodiment be described in detail.It should be noted that in the absence of conflict, in the embodiment and embodiment in the application
Feature mutually can arbitrarily combine.
Step shown in the flowchart of the accompanying drawings can be in the computer system of such as a group of computer-executable instructions
It executes.Also, although logical order is shown in flow charts, and it in some cases, can be with suitable different from herein
Sequence executes shown or described step.
Fig. 1 is a kind of functional block diagram of bio-identification IC card provided by the embodiments of the present application.As shown in Figure 1, the life
Object identifies that IC card includes double interface chips 100, micro-control unit 200, biometric sensor 300, power module 400 and mould
Quasi- switch 500, the biometric sensor 300 are connected with the micro-control unit 200, and the micro-control unit 200 passes through
The analog switch 500 is connected with double interface chips 100, and the power module 400 is connected with the micro-control unit 200
And it is connected with double interface chips 100 by the analog switch 500.
In the embodiment of the present application, the biometric sensor 300 can be fingerprint sensor or vocal print sensor,
It is used for the biological characteristic from external acquisition user, such as fingerprint and vocal print.When the bio-identification IC card is not used by, institute
Stating power module 400 can not power to the micro-control unit 200 and double interface chips 100, only in the IC card quilt
It just needs to power to the micro-control unit 200 and double interface chips 100 when activation.Specifically, the surface of the IC card can
A button is arranged, by touching or pressing the button, the IC card can be waken up.
User can touch or press above-mentioned button, in response to the external touch when preparing using the IC card
It instructs, the micro-control unit 200 in the IC can be activated, so as to be adopted to the transmission of the biometric sensor 300
Collection instruction.After the biometric sensor receives the acquisition instructions, outside can be acquired in response to the acquisition instructions
Biological characteristic.At this point, if finger is placed in the biometric sensor by user, then the fingerprint of the finger can be by institute
Biometric sensor is stated to collect;Also or user says preset one section of voice, then this section of voice can be by institute
Biometric sensor is stated to collect.Above-mentioned fingerprint and voice can be as the biological characteristic by the biology
Feature sensor acquires.After the biometric sensor collects biological characteristic, the biological characteristic is being transmitted across in order to prevent
It is usurped, collected biological characteristic can be encrypted by criminal in journey.Described biological characteristic is encrypted can
To be realized using Encryption Algorithm and key.The Encryption Algorithm can be some being pre-stored in the biometric sensor
Formula or rule are performed by program, the key can be Encryption Algorithm optional parameters in execution, if not close
Key, even if being aware of Encryption Algorithm can not also decrypt.The Encryption Algorithm for example can be DES algorithms or DSA algorithms.It is described
After biometric sensor is to the biological feature encryption of acquisition, encrypted biological characteristic can be sent to the microcontroller list
Member.
After the micro-control unit receives the biological characteristic of the acquisition, can by the biological characteristic of the acquisition with it is pre-
The biometric templates deposited are compared.The biometric templates to prestore can be that the card user of the IC card records in advance
Enter, the biometric templates to prestore can be used for distinguish the currently used IC card user whether be the IC card the use that holds
Family.Specifically, the micro-control unit can extract first eigenvector group corresponding with the biological characteristic of the acquisition and
Second feature Vector Groups corresponding with the biometric templates to prestore.It is often special in the presence of the biology can be characterized in biological characteristic
The characteristic point of sign, by taking fingerprint as an example, Fig. 2 is the characteristic point schematic diagram of fingerprint in the embodiment of the present application.As shown in Fig. 2, in figure
Circle and square represent the position of the characteristic point, and what circle and square characterized is the type of characteristic point, wherein circle pair
The type for the characteristic point answered is endpoint, and the type of the corresponding characteristic point of square is crosspoint.At this point it is possible to be built for the fingerprint
Vertical coordinate system, to which the position of each characteristic point in the fingerprint can uniquely be indicated using coordinate.Based on the feature
The position of point and the type of the characteristic point, may thereby determine that out the corresponding vector of the characteristic point.For example, wherein
The corresponding vector of one characteristic point can be expressed as (x, y, θ, α), wherein x and y respectively represents the corresponding abscissa of this feature point
And ordinate, θ represent the azimuth of this feature point in a coordinate system, α then represents the type of this feature point.In this way, in the fingerprint
Each characteristic point can indicate that the corresponding vector of all characteristic points is so as to forming the fingerprint using corresponding vector
Corresponding feature vector group.
After being extracted the first eigenvector group and second feature Vector Groups, the micro-control unit can be right
Than each feature vector in the first eigenvector group and the second feature Vector Groups, and count identical feature to
The quantity of amount.Identical feature vector then represent acquisition biological characteristic and preset biometric templates in there are identical spies
Point is levied, the quantity of identical feature vector then corresponds to the quantity of identical characteristic point.
Then, the micro-control unit can be accounted for according to the quantity of the identical feature vector fisrt feature to
The proportion of feature vector total quantity in amount group, judge the biological characteristic of the acquisition and the biometric templates to prestore whether
Match.Specifically, the micro-control unit can pre-set a gravity thresholds, which is, for example, 95%, then working as institute
The quantity for stating identical feature vector accounts for the proportion of feature vector total quantity in the first eigenvector group and is more than or equal to
When 95%, it can judge that the biological characteristic of the acquisition with the biometric templates to prestore is matched;Otherwise the acquisition
Biological characteristic with the biometric templates to prestore be unmatched.
In this way, the micro-control unit can complete the process compared to the biological characteristic of acquisition.It needs to illustrate
, in order to prevent criminal usurp the biological attribute data in the micro-control unit, the micro-control unit can be
The comparison that biological characteristic is carried out in the case of encryption, so as to ensure the safety of data.
After being compared to biological characteristic, the micro-control unit can switch the analog switch, with obtain with
The communication of double interface chips and the power module is powered to the double interface chips.Double interface chips with
The analog switch can be connected by 7816 interfaces, by switching the analog switch, so that double interfaces
Chip selectively carries out communicating or being communicated with external card reader with the micro-control unit.It is compared in biological characteristic
After, the micro-control unit needs the result of comparison being sent to double interface chips, then needs described in switching at this time
Analog switch to obtain the communication with double interface chips, and can make the power module to double interface cores
Piece is powered, to ensure the normal work of double interface chips.
Similarly, in order to ensure that comparison result can be encrypted for the safety of data transmission, the micro-control unit
After be sent to double interface chips.Double interface chips, can be to encrypted number after receiving encrypted comparison result
The comparison result is obtained according to being decrypted, so as to which the flag of itself is arranged according to the comparison result.The mark
Position may be used to indicate that whether double interface chips are active, if flag is set as effective, then double boundaries
Face chip is then activated, and can be communicated with external card reader;If flag is set as invalid, then double interface chips
It is then locked, can not be communicated with external card reader.After double interface chips decrypt the comparison result, if the ratio
It is matching to result, then the flag of itself is set as effective;If the comparison result is to mismatch, by the mark of itself
Position is set as invalid.
When the flag is arranged to effective, show to be confirmed using the user identity of the IC card, can carry out
Normal transaction.Double interface chips described at this time can be sent to the micro-control unit confirms instruction.Receive this really
Recognize instruction, the micro-control unit can then switch the analog switch, so that double interface chips and external card reader
Establish communication.Once at this point, IC card by way of contactless or contact with external card reader (such as ATM machine, POS machine or
Person's social security card reader) establish communication when, normal transaction can be carried out.
In one preferred embodiment of the application, after being that external card reader establishes communication with double interface chips,
Can be powered to the double interface chips by the external card reader, so as to so that the power module inside IC card stop to
Double interface chip power supplies.Therefore, it in the application the preferred embodiment, is built with external card reader in double interface chips
After vertical communication, the micro-control unit can detect whether the external card reader powers to double interface chips, work as inspection
The external card reader is measured to when double interface chips power supplies, then assigns stopping to double interfaces to the power module
The instruction of chip power supply.Dual power supply can be carried out to avoid to double interface chips in this way, to save the power module
Electricity.
After double interface chips and external card reader establish communication, the micro-control unit can detect described double
The communication state of interface chip and the external card reader, when double interface chips and external card reader communication terminate
Afterwards, then it can switch the analog switch, to obtain the communication with double interface chips.Double interface chips with it is described
After external card reader communicates, then show that transaction is over, the micro-control unit can switch again at this time
The analog switch, the communication to disconnect double interface chips and external card reader are connected, are reacquired and double interfaces
The communication of chip.Correspondingly, in another embodiment of the application, when double interface chips and external card reader communication are tied
Shu Hou, the micro-control unit can assign the instruction for starting to power to double interface chips to the power module, to protect
The normal work of the double interface chips of card.
It should be noted that during transaction carries out the micro-control unit without handling data, because
This can allow described in another preferred embodiment of the application after double interface chips and external card reader establish communication
Micro-control unit enters dormant state.Specifically, described micro- after double interface chips and external card reader establish communication
Control unit can set wake-up period and enter dormant state.The wake-up period for example can be 2 minutes, that is to say, that institute
It states micro-control unit to be waken up automatically after entering dormant state 2 minutes, hence into working condition.
The communication of double interface chips and the external card reader can be detected into the micro-control unit of working condition
Whether state, the communication state can be distinguished to the double interface chips power supply by the external card reader.Therefore, into
The feeder ear of the external card reader can be detected by GIPO by entering the micro-control unit of working condition, when detecting the outside
When card reader is not powered to double interface chips, then it can determine between double interface chips and the external card reader
Communication terminate.
After transaction, then need in time to lock double interface chips, to ensure that subsequent transaction is movable
Safety.Therefore, after transaction, the micro-control unit can send to double interface chips and remove flag
Instruction.Correspondingly, the flag of itself can be arranged in response to the instruction for removing flag for double interface chips
To be invalid, to ensure that double interface chips are in the lock state, can not be carried out again in the case where not reactivating
Transaction.After double interface chips are in the lock state, the micro-control unit can close analog switch, terminate
With the communication of double interface chips, and can to the power module send stop power supply instruction so that IC card return
Initial unactivated state.
The embodiment of the present application also provides a kind of control method of bio-identification IC card.Fig. 3 is provided by the embodiments of the present application
A kind of flow chart of the control method of bio-identification IC card.Although it includes the multiple behaviour occurred with particular order that flow, which is described below,
Make, but it should be clearly understood that these processes may include more or fewer operations, these operations can be executed sequentially or simultaneously
Row executes (such as using parallel processor or multi-thread environment).As shown in figure 3, the method includes:
S1:It is instructed in response to external touch, micro-control unit is activated and sends acquisition instructions to biometric sensor;
S2:The biometric sensor carries out physical characteristics collecting in response to the acquisition instructions, and by the life of acquisition
The micro-control unit is sent to after object feature encryption;
S3:The biological characteristic of the acquisition is compared the micro-control unit with the biometric templates to prestore, and
Switching analoging switch after the completion of comparison, to obtain the communication with double interface chips and make power module to double interfaces
Chip power supply;
S4:The micro-control unit is sent to double interface chips after encrypting comparison result;
S5:After double interface chips decrypt the comparison result, the mark of itself is set according to the comparison result
Position;
S6:When the flag is arranged to effective, the micro-control unit switches the analog switch, so that institute
It states double interface chips and establishes communication with external card reader;
S7:The micro-control unit detects the communication state of double interface chips and the external card reader, when described
After double interface chips are communicated with the external card reader, switch the analog switch, to obtain and double interface chips
Communication;
S8:The micro-control unit sends the instruction for removing flag to double interface chips.
In one preferred embodiment of the application, the micro-control unit is by the biological characteristic of the acquisition and the biology that prestores
Feature templates, which are compared, to be specifically included:
The micro-control unit extract first eigenvector group corresponding with the biological characteristic of the acquisition and with prestore
The corresponding second feature Vector Groups of biometric templates;
The micro-control unit compares each spy in the first eigenvector group and the second feature Vector Groups
Sign vector, and count the quantity of identical feature vector;
The ratio of feature vector total quantity in the first eigenvector group is accounted for according to the quantity of the identical feature vector
Weight, judges whether the biological characteristic of the acquisition matches with the biometric templates to prestore.
In another preferred embodiment of the application, after double interface chips decrypt the comparison result, according to described
Comparison result is arranged the flag of itself and specifically includes:
After double interface chips decrypt the comparison result, if the comparison result is matching, by the mark of itself
Know position and is set as effective;
If the comparison result is to mismatch, the flag of itself is set as invalid.
In another preferred embodiment of the application, when the flag is arranged to effective, the micro-control unit
Switch the analog switch, so that after double interface chips establish communication with external card reader, the method further includes:
The micro-control unit detects whether the external card reader powers to double interface chips;
When detecting that the external card reader is powered to the double interface chips, to the power module assign stopping to
The instruction of double interface chip power supplies;
Correspondingly,
After double interface chips and external card reader communication, the micro-control unit is to the power supply mould
Block assigns the instruction for starting to power to double interface chips.
In another preferred embodiment of the application, when the flag is arranged to effective, the micro-control unit
Switch the analog switch, so that after double interface chips establish communication with external card reader, the method further includes:
The micro-control unit sets wake-up period and enters dormant state.
In another preferred embodiment of the application, the micro-control unit detects double interface chips and the external reading
The communication state of card device specifically includes:
According to the wake-up period, the micro-control unit enters working condition from dormant state;
The micro-control unit detects whether the external card reader powers to double interface chips;
When detecting that the external card reader is not powered to the double interface chips, determine double interface chips with
Communication between the external card reader terminates.
In another preferred embodiment of the application, is sent to double interface chips in the micro-control unit and remove mark
After the instruction of position, the method further includes:
The flag of itself is set as invalid by double interface chips in response to the instruction for removing flag.
A kind of bio-identification IC card and its control method provided by the embodiments of the present application, have following advantageous effect:
1) the safety is improved, can ensure the safety of algorithm and biometric templates storage, comparison result is encrypted and is passed
It is defeated, so as to prevent criminal from intercepting comparison result or biometric templates data;
2) by the way that the scheme of flag is arranged, make double interface chips that can be not required in activation or unactivated state real-time change
Waiting pre-sets the time, and prevents from pre-seting after the time reaches, and the ongoing transaction of positive closing causes Fail Transaction or production
Eat card phenomenon etc. alive;
3) analog switch is used, does not change the hardware configuration of current double-interface IC card, to optionally control double interfaces core
Connection between 7816 interfaces and micro-control unit or external card reader of piece.
In the present specification, such as adjective as first and second can be only used for by an element or action with it is another
One element or action distinguish, without requiring or implying any actual this relationship or sequence.In the feelings that environment allows
Under condition, one in only element, component or step is should not be interpreted as limited to reference to element or component or step (s), and can
To be one or more of element, component or step etc..
Although disclosed herein embodiment it is as above, the content only for ease of understanding the present invention and use
Embodiment is not limited to the present invention.Technical staff in any fields of the present invention is taken off not departing from the present invention
Under the premise of the spirit and scope of dew, any modification and variation, but the present invention can be carried out in the form and details of implementation
Scope of patent protection, still should be subject to the scope of the claims as defined in the appended claims.