CN108288008A - A kind of method and device of card activation - Google Patents

A kind of method and device of card activation Download PDF

Info

Publication number
CN108288008A
CN108288008A CN201810130108.0A CN201810130108A CN108288008A CN 108288008 A CN108288008 A CN 108288008A CN 201810130108 A CN201810130108 A CN 201810130108A CN 108288008 A CN108288008 A CN 108288008A
Authority
CN
China
Prior art keywords
card
submodule
module
order
image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201810130108.0A
Other languages
Chinese (zh)
Other versions
CN108288008B (en
Inventor
陆舟
于华章
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Feitian Technologies Co Ltd
Original Assignee
Feitian Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Feitian Technologies Co Ltd filed Critical Feitian Technologies Co Ltd
Priority to CN201810130108.0A priority Critical patent/CN108288008B/en
Publication of CN108288008A publication Critical patent/CN108288008A/en
Application granted granted Critical
Publication of CN108288008B publication Critical patent/CN108288008B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K7/00Methods or arrangements for sensing record carriers, e.g. for reading patterns
    • G06K7/10Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
    • G06K7/10009Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation sensing by radiation using wavelengths larger than 0.1 mm, e.g. radio-waves or microwaves
    • G06K7/10019Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation sensing by radiation using wavelengths larger than 0.1 mm, e.g. radio-waves or microwaves resolving collision on the communication channels between simultaneously or concurrently interrogated record carriers.
    • G06K7/10079Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation sensing by radiation using wavelengths larger than 0.1 mm, e.g. radio-waves or microwaves resolving collision on the communication channels between simultaneously or concurrently interrogated record carriers. the collision being resolved in the spatial domain, e.g. temporary shields for blindfolding the interrogator in specific directions

Abstract

The present invention relates to the communications field, more particularly to a kind of method and device of card activation, this method includes:Card reader sends card seeking order;When receiving card seeking response, judges in yard whether to be multiple cards according to card seeking response, be then by more card flag bit set, otherwise more card flag bits are resetted, continue anti-collision operation choice cards, the card chosen is numbered, and preserves card number;Activation operation is executed to the card chosen according to card number, judge after activate successfully more card flag bits whether set, be to continue to send card seeking instruction, otherwise block more and activate successfully;The method and device activated by this card so that card reader can activate multiple cards in region of swiping the card, and to the perfect performance of card reader and the user experience is improved.

Description

A kind of method and device of card activation
Technical field
The present invention relates to the communications field, more particularly to a kind of method and device of card activation.
Background technology
Near-field communication NFC (Near Field Communication), also known as wireless near field communication, are a kind of short distances High frequency wireless communication technology, allow to carry out contactless mode between electronic equipment and exchange data, currently, NFC is extensive Applied in the tools such as mobile device, electronic equipment for consumption.
With being widely used for nfc card, everyone may possess much nfc cards simultaneously, for example, bank card, mass transit card, Access card and mess card etc..When swiping the card, card reader can only activate a card, when multiple cards are placed on region of swiping the card simultaneously When, the problem of identification card or identification mistake is unable to regard to will appear card reader;So that in some occasions using NFC communication Poor user experience.
Invention content
In order to solve the above technical problems, the present invention provides a kind of method and devices of card activation, wherein a kind of card The method of activation, including:
Step S1, card reader sends card seeking order;
Whether step S2, card reader receives card seeking response, judge in yard to be multiple cards according to card seeking response, be then By more card flag bit set, step S3 is executed, otherwise more card flag bits are resetted, execute step S3;
Step S3, card reader carries out anti-collision and operates choice cards, and the card chosen is numbered, and preserves card volume Number;
Step S4, card reader numbers according to the card and executes activation operation to the card chosen, and is held after activating successfully Row step S5;
Step S5, card reader judge more card flag bits whether set, be then return to step S1, otherwise more cards activate successfully, Terminate.
A kind of device of card activation, including:
Sending module, for sending card seeking order;
Receiving module, for receiving card seeking response
Whether the first judgment module, the card seeking response for being received according to receiving module judge in yard to be multiple cards Piece;
Set module is used for when it is multiple cards that the first judgment module, which judges in yard, by more card flag bit set;
Reseting module, for when it is not multiple cards that the first judgment module, which judges in yard, more card flag bits to be answered Position;
Number module operates choice cards for carrying out anti-collision, the card chosen is numbered, and preserves card volume Number;
Active module, the card number for being preserved according to the number module execute activation operation to the card chosen;
Second judgment module, for work as judge after active module successful activation card more card flag bits whether set, when Judge to trigger sending module when more card flag set;When judging that more card flag bits reset, more cards activate successfully, terminate.
Beneficial effects of the present invention are:The present invention provides a kind of method and devices of card activation, pass through this card The method and device of activation so that card reader can activate multiple cards in region of swiping the card, to the perfect performance of card reader And the user experience is improved.
Description of the drawings
Illustrate the embodiment of the present invention or technical solution in the prior art in order to clearer, to embodiment or will show below There is attached drawing needed in technology description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with Obtain other attached drawings according to these attached drawings.
Fig. 1 is a kind of flow chart of the method for card activation that the embodiment of the present invention 1 provides;
Fig. 2 to Fig. 3 is a kind of flow chart of the method for card activation that the embodiment of the present invention 2 provides;
Fig. 4 is a kind of block diagram of the device for card activation that the embodiment of the present invention 3 provides.
Specific implementation mode
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation describes, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall within the protection scope of the present invention.
Embodiment 1
A kind of method of card activation is present embodiments provided, as shown in Figure 1, including:
Step A1, card reader is switched on, and initializes the radio frequency chip of itself, the initial value that setting card is numbered;When receiving When the acquisition card image order that host computer is sent, step A2 is executed;
Specifically, the initial value that card is numbered is set as 0 by card reader;
Step A2, card reader opens yard and sends card seeking order, judges whether to receive card seeking response, is to execute step Otherwise rapid A3 continues to execute step A2;
Specifically, the card seeking order that card reader is sent is 26;
It should be noted that when card receives card seeking order, the state of card is converted into preparation state by idle state;
Step A3, whether card reader judges in yard to be multiple cards according to the card seeking response received, and being then will be more Card flag bit set executes step A4, otherwise resets more card flag bits, executes step A4;
It is to judge have in yard specifically, whether having bit frame conflict in the card seeking response that card reader detection returns Otherwise multiple cards judge an only card in yard;
In more detail, card reader judges whether first to the 5th in the card seeking returned response be 1, is to judge There are multiple cards in yard, otherwise judges an only card in yard.
Step A4, card reader sends select command;
The select command that card reader is sent includes selecting the number of code and preset significance bit;
It should be noted that selecting the length of code for a byte;
Select code for 93 in the present embodiment;It should be noted that the card mark in the present embodiment is card UID (English Literary fame is known as:Unique identifier), it is made of 4 UID bytes:
The length that the number of significance bit is used to indicate entirely to order;The length of the number of significance bit is a byte;Significance bit Several higher four are byte count;Relatively low four are bit count;
In the present embodiment, the number of preset significance bit is specially 20 in select command;20 indicate the selection that card reader is sent The length of order is 2 bytes.
Step A4 is specifically, card reader is selected according to several 20 organizational choice orders of selection code 93 and preset significance bit It is specially 93 20 to select order;
Step A5, card reader receives the card UID that card returns in yard, and whether detection card UID has conflict, is then Step A6 is executed, otherwise determines the card UID chosen, executes step A8;
The card UID that the card received in the present embodiment returns is specially 01 02 03 04 and 02 02 03 04;
Step A6, card reader detects first position clashed, and the location determination clashed according to first Significance bit sends the anti-collision order for including significance bit;
Anti-collision order specifically include selection code, significance bit number and significance bit;
It should be noted that giving tacit consent to the card that the first conflict of card reader selection position when the conflict occurs is 1 in the present embodiment UID;
In the present embodiment, the card UID 01 02 03 04 and 02 02 03 04 that card reader detection is got obtains first A position clashed is the 1st bit of the 1st byte, and the significance bit of the location determination clashed according to first is 1, is calculated The number of significance bit is 21;Anti-collision order, anti-collision order are organized according to selection code 93, the number 21 of significance bit and significance bit 1 Specially 93 21 1.
It should be noted that the number for calculating significance bit be the length of the number for selecting the length of code, significance bit and effective The summation of the length of position;In the present embodiment, it for the length of the number of 1 byte, significance bit is 1 word to select the length of code 93 The length of section, significance bit is 1 bit, selects the summation of the length of the length of code, the length of the number of significance bit and significance bit For 2 bytes, 1 bit, to which the number of significance bit is 21.
Step A7, card reader receives the data that card UID and the card of effective non-colinear position return in yard, and detection is The no further conflict of appearance is then return to step A6, otherwise determines the card UID chosen, execute step A8;
Card, which returns, removes first conflict remaining card UID in position, specifically, remaining card of the card reader according to return Piece UID detects whether occur further conflicting;
For example, the remaining card UID that card returns is 0,000 000 02 03;Card reader, which detects not, to be occurred into one Determine that the card UID chosen is 01 02 03 when the conflict of step;
It should be noted that the working condition of card UID and the card of effective non-colinear position continues to keep accurate in yard For state, card UID and the working condition of the unmatched card of significance bit are converted to idle state by preparation state in yard; Further, card UID no longer responds the anti-collision phase that card reader is sent with the unmatched card of significance bit in yard Order;For example, select command, anti-collision order, card selection order and card activation command.
Step A8, card reader sends the card selection order for including the card UID chosen;
The card selection order that card reader is sent specifically includes:Selection code, the number of significance bit, the card UID that chooses and verification Value;
Card reader is according to the number 70 for selecting code 93, significance bit, the card UID 01 02 03 04 chosen in the present embodiment Card selection order, specially 93 70 01 02 03 04 BCC are obtained with check value BCC sequential concatenations;
It should be noted that exclusive or values of the check value BCC for 4 byte datas before check value, that is, the card chosen The exclusive or value of UID 01 02 03 04.
Step A9, card reader receives the card selection confirmation response that card returns in yard, confirms that response judges according to card selection Whether card UID is complete, is to then follow the steps A10, and otherwise report an error end;
Specifically, card reader, which receives the card selection that card returns, confirms response, the low order end third that card selection confirms response is obtained A bit judges whether low order end third bit is 1, is to judge that card UID is imperfect, otherwise judges that card UID is complete;
For example, then judging that card UID is complete when the card selection that card reader receives confirms that response is 00, when card reader receives To card selection confirm response for 04 when then judge that card UID is imperfect;
The present embodiment, the card selection that card reader receives confirm that response is 04, and judgement card UID is imperfect, and report an error end;
Step A10, card reader incrementally updates card number, sends the card for including updated card number Activation command;
It should be noted that it is 01 02 03 04 card that card reader, which chooses card UID, and only card in yard Piece is in preparation state;
The card activation command that card reader is sent is specially 0E 01;
Step A11, card reader receives the response data that card returns, and data judge whether activation succeeds according to response, It is to then follow the steps A12, otherwise return to step A2;
It should be noted that the working condition for the card that card UID is 01 02 03 04 is converted to activation by preparation state State.
Step A12, card reader judge more card flag bits whether set, be then return to step A2, otherwise more cards activate successfully, Terminate.
Specifically, card reader judges whether more card flag bits are 1, it is to judge more card flag bit set, otherwise judges more Card flag bit resets.
Preferably, in step A3, step A4 is executed when more card flag set;When more card flag bits reset, execute Step B1;
Step B1, card reader sends select command;
Step B2, card reader receives the card UID that card returns in yard;And send the card selection order of packet card UID;
Step B3, card reader receives the card selection confirmation response that card returns in yard, confirms that response judges according to card selection Whether card UID is complete, is to then follow the steps A10, and otherwise report an error end.
Preferably, further include after more card activation:Card reader obtains corresponding according to the card number itself preserved Card card image, and the card image got is sent to host computer.
Optionally, further include before step A2:Host computer sends to the card reader and obtains card image order;Work as Card Reader When device receives acquisition card image order, step A2 is executed;
Card reader obtains the card image of corresponding card according to the card number itself preserved, and will get Card image is sent to host computer, specifically includes:
Step C1, the card not yet obtained a number is obtained in all cards number that card reader is preserved from itself to make It is numbered for current card, card is sent to according to the current card number tissue Card Reader order, and by the Card Reader order;
Step C2, card reader receives the card image that card returns, and the card image is sent to host computer;
Step C3:Host computer receives the card image that the card reader is sent, and continues to send to card reader and obtain card Message command;
Step C4, card reader judges whether that the card not being acquired also is numbered, and is then return to step C1, otherwise upwards Position machine, which returns, obtains card image failure response, terminates
Further, step C3 is specially:Host computer judges whether the card image received is that legal card is believed Breath is then certification success, terminates, otherwise authentification failure, continues to obtain card image to card reader, executes step C4.
Optionally, further include before step A2:Host computer sends to the card reader and obtains card image order;Work as Card Reader When device receives the acquisition card image order, step A2 is executed;
Card reader obtains the card image of corresponding card according to the card number itself preserved, specifically includes:
Step D1, the card not yet obtained a number is obtained in all cards number that card reader is preserved from itself to make It is numbered for current card, card is sent to according to the current card number tissue Card Reader order, and by the Card Reader order;
Step D2, card reader receives the card image that card returns;
Step D3, card reader judges whether that the card not being acquired also is numbered, and is then return to step D1, otherwise will connect All card images received return to host computer.
Further, in step D3, card reader is gone back after all card images received are returned to host computer Including:Host computer judges to whether there is legal card image in all card images received, is then certification success, knot Beam, otherwise authentification failure, terminates.
Preferably, further include before step A2:Host computer is sent to card reader obtains card number order;When card reader connects When receiving the acquisition card number order, step A2 is executed.
Correspondingly, when block more activate successfully after, further include:All cards number hair that the card reader preserves itself Give host computer.
Further, after the card number that itself is preserved is sent to host computer by card reader, further include:Card reader The acquisition card image instruction sent etc. host computer to be received;When the acquisition card for including card number for receiving host computer transmission When piece information, the card image of corresponding card, and the card that will be got are obtained according to the card number in Card Reader order Piece information is sent to host computer.
More specifically, it after the card number that itself is preserved is sent to host computer by card reader, specifically includes:
Step E1, host computer obtains the card not yet obtained a number as current from the card number received Card is numbered, and obtains card image order according to the current card number tissue, and be sent to card image order is obtained Card reader;
Step E2, card reader is transmitted to card by card image order is obtained;When the card image for receiving card return Shi Zhihang steps E3;
Step E3, the card image is transmitted to host computer by card reader;
Also whether step E4, host computer receives the card image that card reader returns, and judge in the card received number There is the card number not being acquired, is then return to step E1, otherwise terminates.
Preferably, further include in step E4:Host computer receives the card image of card reader forwarding, judges the card image It is whether legal, it is then certification success, terminates;It is no to then follow the steps E4.
Preferably, after getting card image according to card number, further include:Card reader by card number and and its Corresponding card image binds to obtain binding information, and binding information is returned to host computer.
Specifically, after getting card image according to card number, specifically include:
Step F1, host computer needs the card operated according to the card image selection in the binding information received, according to The card image for the card chosen obtains the card bound with it and numbers, and operation of the tissue comprising the card number got refers to It enables;And operational order is sent to the card reader;
Step F2, the operational order received is transmitted to card by card reader;When the response for receiving card return After data, the response data is transmitted to the host computer.
Preferably, after more card activation, further include:The card reader is obtained according to the card number itself preserved and it The card image of corresponding card.
Further include before step A2:When card reader receives outer triggering signal, step A2 is executed;
Card reader obtains the card image of corresponding card according to the card number itself preserved, specifically includes:
Step G1, the card not yet obtained a number is obtained in all cards number that card reader is preserved from itself to make It is numbered for current card, card is sent to according to the current card number tissue Card Reader order, and by the Card Reader order;
Step G2, card reader receives the card image that card returns;
Step G3, card reader judges whether that the card not being acquired also is numbered, and is then return to step G1, otherwise ties Beam.
Further, step G2 is specially:Card reader judges whether the card image received is that legal card is believed Breath is then certification success, terminates, otherwise authentification failure, terminates.
Embodiment 2
A kind of method of card activation is present embodiments provided, as shown in Figures 2 and 3, including:
Step 101, card reader initialize the radio frequency chip of itself, and the initial value of card number is arranged;
Specifically, the initial value that card is numbered is set as 0 by card reader;
Step 102, card reader open yard and send card seeking order, judge whether to receive card seeking response, are to execute Step 103, step 102 is otherwise continued to execute;
Specifically, it is 26 that card reader, which sends card seeking order,;
It should be noted that when card receives card seeking order, the state of card is converted into preparation state by idle state;
Whether step 103, card reader are responded according to the card seeking received judges in yard to be multiple cards, and being then will be more Card flag bit set executes step 104, otherwise resets more card flag bits, executes step 104;
It is to judge have in yard specifically, whether having bit frame conflict in the card seeking response that card reader detection returns Otherwise multiple cards judge an only card in yard;
In more detail, card reader judges whether first to the 5th in the card seeking response that card returns be 1, is then There are multiple cards in judgement yard, otherwise judges an only card in yard.
Step 104, card reader send level selection com;
The level selection com that card reader is sent includes the number of first choice code and preset significance bit;
It should be noted that selecting the length of code for a byte;
Thtee-stage shiplock rank is set in the present embodiment in card reader:
First choice code is 93;Including the level selection com of first choice code shows the series-connected stage of card reader selection Not Wei 1, series connection rank 1 is used to carry out anti-collision operation to the level-one card UID of card;
Second to select code be 95, including the two level select command of the second selection code shows the series-connected stage of card reader selection Not Wei 2, series connection rank 2 is used to carry out anti-collision operation to the two level card UID of card;
It is 97 that third, which selects code, including the three-level select command of third selection code shows the series-connected stage of card reader selection It Wei 3;Rank 3 of connecting is used to carry out anti-collision operation to the three-level card UID of card.
It should be noted that card UID is made of 4,7 or 10 UID bytes:
When card UID is made of 4 UID bytes, the maximum series connection rank that card is supported is 1, and level-one card UID is card The 1st to 4 byte of piece UID;
When card UID is made of 7 UID bytes, the maximum series connection rank that card is supported is 2, wherein level-one card UID is the 1st to 3 byte of series connection mark and card UID, and two level card UID is the 4th to 7 byte of card UID;
When card UID is made of 10 UID bytes, the maximum series connection rank that card is supported is 3, wherein level-one card UID is the 1st to 3 byte of series connection mark and card UID, and two level card UID is the 4th to 6 of series connection mark and card UID Byte, three-level card UID are the 7th to 10 byte of card UID.
The length that the number of significance bit is used to indicate entirely to order;The length of the number of significance bit is a byte;Significance bit Several higher four are byte count;Relatively low four are bit count;
In the present embodiment, the number of preset significance bit is specially 20 in level selection com;20 indicate what card reader was sent The length of level selection com is 2 bytes.
Step 104 is specifically, card reader organizes level-one to select according to first choice code 93 and the number of preset significance bit 20 Order is selected, level selection com is specially 93 20;
Step 105, card reader receive the level-one card UID that card returns in yard, and detection card level-one card UID is It is no to have conflict, it is to then follow the steps 106, otherwise determines the level-one card UID chosen, executes step 108;
The level-one card UID that the card received in the present embodiment returns is specially 88 01 02 03 and 88 02 02 03;
It should be noted that 88 in the level-one card UID that card returns be series connection label;
Step 106, card reader detect first position clashed, and the location determination clashed according to first Significance bit sends the level-one anti-collision order for including significance bit;
Level-one anti-collision order specifically includes first choice code, the number of significance bit and significance bit;
It should be noted that giving tacit consent to the card that the first conflict of card reader selection position when the conflict occurs is 1 in the present embodiment UID;
In the present embodiment, the level-one card UID 88 01 02 03 and 88 02 02 03 that card reader detection is got is obtained First position clashed is the 1st bit of the 2nd byte, and the significance bit of the location determination clashed according to first is 1, The number for calculating significance bit is 31;Level-one anti-collision is organized according to first choice code 93, the number 31 of significance bit and significance bit 88 1 Order, level-one anti-collision order is specially 93 31 88 1.
It should be noted that the number for calculating significance bit be the number of the length of first choice code, significance bit length and The summation of the length of significance bit;In the present embodiment, the length of first choice code 93 is the length of the number of 1 byte, significance bit For 1 byte, the length of significance bit is 1 byte, 1 bit, the length of first choice code, the length of the number of significance bit and The summation of the length of significance bit is 3 bytes, 1 bit, to which the number of significance bit is 31.
Step 107, card reader receive the data that level-one card UID and the card of effective non-colinear position return in yard, It detects whether occur further conflicting, is that then return to step 106, the level-one card UID that otherwise determination is chosen execute step 108;
Card, which returns, removes first conflict remaining level-one card UID in position, specifically, residue of the card reader according to return Level-one card UID detect whether occur further conflicting;
For example, the remaining level-one card UID that card returns is 0,000 000 02 03;Card reader, which detects not, to be occurred Determine that the level-one card UID chosen is 88 01 02 03 when further conflict;
It should be noted that the working condition of level-one card UID and the card of effective non-colinear position is after continuation of insurance in yard Hold preparation state, level-one card UID and the working condition of the unmatched card of significance bit are converted to by preparation state in yard Idle state;Further, level-one card UID no longer responds card reader transmission with the unmatched card of significance bit in yard Anti-collision phase order;For example, select command, anti-collision order, card selection order and card activation command.
Step 108, card reader send the level-one card selection order for including the level-one card UID chosen;
The level-one card selection order that card reader is sent specifically includes:First choice code, the number of significance bit, the level-one card chosen Piece UID and check value;
Card reader is according to first choice code 93, the number 70 of significance bit, the level-one card UID 88 that chooses in the present embodiment 01 02 03 and check value BCC sequential concatenations obtain level-one card selection order, specially 93 70 88 01 02 03 BCC;
It should be noted that exclusive or values of the check value BCC for 4 byte datas before check value, that is, the level-one chosen The exclusive or value of card UID 88 01 02 03.
Step 109, card reader receive the card selection that card returns in yard and confirm response, confirm that response judges according to card selection Whether card UID is complete, is to then follow the steps 122, no to then follow the steps 110;
Specifically, card reader, which receives the card selection that card returns, confirms response, the low order end third that card selection confirms response is obtained A bit judges whether low order end third bit is 1, is to judge that card UID is imperfect, otherwise judges that card UID is complete;
For example, then judging that card UID is complete when the card selection that card reader receives confirms that response is 00, when card reader receives To card selection confirm response for 04 when then judge that card UID is imperfect;
The present embodiment, the card selection that card reader receives confirm that response is 04, judge card UID imperfect execution steps 110;
Step 110, card reader send two level select command;
The two level select command that card reader is sent includes the number of the second selection code and preset significance bit;Specifically, reading Several 20 sequential concatenations of second selection code 95 and preset significance bit are obtained two level select command 95 20 by card device;
Step 111, card reader receive the two level card UID that card returns in yard, and whether detection two level card UID has Conflict, is to then follow the steps 112, otherwise determines the two level card UID chosen, executes step 114;
It is specially 88 04 05 06 and 88 08 05 that card reader, which receives the two level card UID that card returns in yard, 06;
It should be noted that 88 in the two level card UID that card returns be series connection label;
Step 112, card reader detect first position clashed, and the location determination clashed according to first Significance bit sends the two level anti-collision order for including significance bit;
Two level anti-collision order specifically include the second selection code, significance bit number and significance bit;
In the present embodiment, the two level card UID 88 04 05 06 and 88 08 05 06 that card reader detection is got is obtained First position clashed is the 3rd bit of the 2nd byte, and the significance bit of the location determination clashed according to first is 88 100, the number for calculating significance bit is 33;Two level is organized according to the second selection code 95, the number 33 of significance bit and significance bit 88 100 Anti-collision order, two level anti-collision order is specially 95 33 88 100.
It should be noted that in the present embodiment, second selects the length of code 95 for the length of the number of 1 byte, significance bit Degree is 1 byte, and the length of significance bit is 1 byte, 3 bits, the length of first choice code, the length of the number of significance bit Summation with the length of significance bit is 3 bytes, 3 bits, to which the number of significance bit is 33.
Step 113, card reader receive the data that two level card UID and the card of effective non-colinear position return in yard, It detects whether occur further conflicting, is that then return to step 112, the two level card UID that otherwise determination is chosen execute step 114;
Card, which returns, removes first conflict remaining two level card UID in position, specifically, residue of the card reader according to return Two level card UID detect whether the conflict for occurring further;
For example, the remaining two level card UID that card returns is 0,000 0 05 06;Card reader detect not occur into Determine that the level-one card UID chosen is 88 04 05 06 when the conflict of one step;
It should be noted that the working condition of two level card UID and the card of effective non-colinear position is after continuation of insurance in yard Hold preparation state, two level card UID and the working condition of the unmatched card of significance bit are converted to by preparation state in yard Idle state;Further, two level card UID no longer responds card reader transmission with the unmatched card of significance bit in yard Anti-collision phase order;For example, select command, anti-collision order, card selection order and card activation command.
Step 114, card reader send the two level card selection order for including the two level card UID chosen;
The two level card selection order that card reader is sent specifically includes:Second selection code, the number of significance bit, the two level card chosen Piece UID and check value;
Card reader is according to the second selection code 95, the number 70 of significance bit, the two level card UID 88 that chooses in the present embodiment 04 05 06 and check value BCC sequential concatenations obtain level-one card selection order, specially 95 70 88 04 05 06 BCC;
It should be noted that check value BCC is the exclusive or value of the two level card UID 88 04 05 06 chosen.
Step 115, card reader receive the card selection that card returns in yard and confirm response, confirm that response judges according to card selection Whether card UID is complete, is to then follow the steps 112, no to then follow the steps 116;
Specifically, card reader, which receives the card selection that card returns, confirms response, the low order end third that card selection confirms response is obtained A bit judges whether low order end third bit is 1, is to judge that card UID is imperfect, otherwise judges that card UID is complete;
The present embodiment, the card selection that card reader receives confirm that response is 04, judge card UID imperfect execution steps 116;
Step 116, card reader send three-level select command;
The three-level select command that card reader is sent includes the number of third selection code and preset significance bit;Specifically, reading Third is selected several 20 sequential concatenations of code 97 and preset significance bit to obtain two level select command 97 20 by card device;
Step 117, card reader receive the three-level card UID that card returns in yard, and whether detection three-level card UID has Conflict, is to then follow the steps 118, otherwise determines the three-level card UID chosen, executes step 120;
It is specially 07 08 09 0A and 0F 08 09 that card reader, which receives the three-level card UID that card returns in yard, 0A;
Step 118, card reader detect first position clashed, and the location determination clashed according to first Significance bit sends the three-level anti-collision order for including significance bit;
Three-level anti-collision order specifically include third selection code, significance bit number and significance bit;
In the present embodiment, three-level card UID 07 08 09 0A and 08 09 0A of 0F that card reader detection is got are obtained First position clashed is the 4th bit of the 1st byte, and the significance bit of the location determination clashed according to first is 1111, the number for calculating significance bit is 24;Code 97, the number 24 of significance bit and significance bit 1111 is selected to organize three-level anti-according to third Conflict order, three-level anti-collision order is specially 97 24 1111.
It should be noted that in the present embodiment, third selects the length of code 97 for the length of the number of 1 byte, significance bit Degree is 1 byte, and the length of significance bit is 4 bits, the length of first choice code, the length and significance bit of the number of significance bit The summation of length be 2 bytes, 4 bits, to which the number of significance bit is 24.
Step 119, card reader receive the data that three-level card UID and the card of effective non-colinear position return in yard, It detects whether occur further conflicting, is that then return to step 118, the three-level card UID that otherwise determination is chosen execute step 120;
Card, which returns, removes first conflict remaining three-level card UID in position, specifically, residue of the card reader according to return Three-level card UID detect whether the conflict for occurring further;
For example, the remaining three-level card UID that card returns is 0,000 08 09 0A;Card reader, which detects not, to be occurred Determine that the level-one card UID chosen is 08 09 0A of 0F when further conflict;
It should be noted that the working condition of three-level card UID and the card of effective non-colinear position is after continuation of insurance in yard Hold preparation state, three-level card UID and the working condition of the unmatched card of significance bit are converted to by preparation state in yard Idle state;Further, three-level card UID no longer responds card reader transmission with the unmatched card of significance bit in yard Anti-collision phase order;For example, select command, anti-collision order, card selection order and card activation command.
Step 120, card reader send the three-level card selection order for including the three-level card UID chosen;
The three-level card selection order that card reader is sent specifically includes:Third selection code, the number of significance bit, the three-level card chosen Piece UID and check value;
Card reader selects code 97, the number 70 of significance bit, the two level card UID 0F that choose according to third in the present embodiment 08 09 0A and check value BCC sequential concatenations obtain level-one card selection order, 08 09 0A BCC of specially 95 70 0F;
It should be noted that check value BCC is the exclusive or value of 08 09 0A of three-level card UID 0F chosen.
Step 121, card reader receive the card selection that card returns in yard and confirm response, confirm that response judges according to card selection Whether card UID is complete, is to then follow the steps 122, and otherwise report an error end;
Specifically, card reader, which receives the card selection that card returns, confirms response, the low order end third that card selection confirms response is obtained A bit judges whether low order end third bit is 1, is to judge that card UID is imperfect, otherwise judges that card UID is complete;
The present embodiment, the card selection that card reader receives confirm that response is 00, and judgement card UID completely executes step 122;
Step 122, card reader incrementally update card number, and send the card for including updated card number Piece activation command;
It should be noted that it is the card of 01 02 03 04 05 06 0F, 07 08 09 0A that card reader, which chooses card UID, Piece, and the only card is in preparation state in yard;
The card activation command that card reader is sent is specially 0E 01;
Step 123, card reader receive the response data that card returns, and data judge whether activation succeeds according to response, It is to then follow the steps 124, otherwise return to step 102;
It should be noted that card UID is the work shape of the card of 01 02 03 04 05 06 0F, 07 08 09 0A State is converted to state of activation by preparation state.
Step 124, card reader judge more card flag bits whether set, be then return to step 102, otherwise more card activation at Work(terminates;
Specifically, card reader judges whether more card flag bits are 1, it is to judge more card flag bit set, otherwise judges more Card flag bit resets.
Preferably, in step 103, step 104 is executed when more card flag bit set, is executed when more card flag bits reset Step 201;
Step 201, card reader send level selection com;
Step 202, card reader receive the level-one card UID that card returns in yard;And it includes level-one card UID to send Level-one card selection order;
Step 203, card reader receive the card selection that card returns in yard and confirm response, confirm that response judges according to card selection Whether card UID is complete, is to then follow the steps 122, no to then follow the steps 204;
The two level select command that step 204, card reader are sent;
Step 205, card reader receive the two level card UID that card returns in yard;And it includes two level card UID to send Two level card selection order;
Step 206, card reader receive the card selection that card returns in yard and confirm response, confirm that response judges according to card selection Whether card UID is complete, is to then follow the steps 122, no to then follow the steps 207;
The three-level select command that step 207, card reader are sent;
Step 208, card reader receive the three-level card UID that card returns in yard;And it includes three-level card UID to send Three-level card selection order;
Step 209, card reader receive the card selection that card returns in yard and confirm response, confirm that response judges according to card selection Whether card UID is complete, is to then follow the steps 122, and otherwise report an error end.
Embodiment 3
The present embodiment provides a kind of devices of card activation, as shown in figure 4, including:
Sending module 11, for sending card seeking order;
Receiving module 12, for receiving card seeking response
Whether the first judgment module 13, the card seeking response for being received according to receiving module 12 judge in yard to be more Open card;
Set module 14 is used for when it is multiple cards that the first judgment module 13, which judges in yard, by more card flag bits Set;
Reseting module 15, for when it is not multiple cards that the first judgment module 13, which judges in yard, will more block mark Position resets;
Specifically, whether the first judgment module 13, have in the card seeking response received specifically for detection receiving module 12 Bit frame conflict;
Correspondingly, set module 14, for when the first judgment module 13 is determined with bit frame conflict, by more card flag bits Set;
Reseting module 15, for when the first judgment module 13 judges no bit frame conflict, more card flag bits to be resetted.
Number module 16 operates choice cards for carrying out anti-collision, the card chosen is numbered, and preserve card Number;
Active module 17, the card number for being preserved according to number module 16 execute activation operation to the card chosen;
Second judgment module 18 judges whether more card flag bits are set later for working as 17 successful activation card of active module Position triggers sending module 11 when judging more card flag set;When judging that more card flag bits reset, more cards activate successfully, Terminate.
Specifically, number module 16 includes:
First sending submodule sends select command for the card into yard;
First receiving submodule, the card mark for receiving the return of the card in yard;
First detection sub-module has identified whether conflict for detecting the card that the first receiving submodule receives;
Determination sub-module, for when the first detection sub-module judgement card mark does not conflict, determining the card chosen Mark;
First sending submodule is additionally operable to, when the first detection sub-module judgement card is identified with conflict, detect first The position of conflict, and the location determination significance bit clashed according to first are sent, and it includes the anti-collision for imitating position to send Order;
First receiving submodule is additionally operable to receive the number that the card of card mark and effective non-colinear position in yard returns According to;
Whether the second detection sub-module, the Data Detection that the card for being received according to the first receiving submodule returns go out Now further conflict;
First sending submodule is additionally operable to, when further conflict occurs in the judgement of the second detection sub-module, detect first The position of conflict, and the location determination significance bit clashed according to first are sent, and it includes the anti-collision for imitating position to send Order;
Determination sub-module is additionally operable to when the second detection sub-module judges without there is further conflict, and determination is chosen Card mark;
First sending submodule is additionally operable to send the card selection order of the card mark determined comprising determination sub-module;
First receiving submodule is additionally operable to receive the card selection confirmation response that card returns in yard;
First judging submodule is additionally operable to the card selection received according to the first receiving submodule and confirms that response judges card mark Whether complete know;
Number submodule, for when the first judging submodule judgement card mark is complete, institute to be identified to the card chosen Corresponding card is numbered, and preserves card number;
Report an error submodule, for when the first judging submodule judgement card mark is imperfect, to report an error end.
Preferably, further include in number module 16:Second sending submodule;Second receiving submodule and second judges submodule Block;
First sending submodule, specifically for when having multiple cards in the first judgment module 13 judgement yard, sending Select command;
Second sending submodule, for when in the first judgment module 13 judgement yard without multiple cards, sending choosing Select order;
Second receiving submodule, for receiving the card mark that card returns in yard;
Second sending submodule is additionally operable to send the card selection order for the card mark that the second receiving submodule receives;
Second receiving submodule is additionally operable to receive the card selection confirmation response that card returns in yard;
Second judgment submodule is additionally operable to the card selection received according to the second receiving submodule and confirms that response judges card mark Whether complete know;
Number submodule, for when second judgment submodule judgement card mark is complete, institute to be identified to the card chosen Corresponding card is numbered, and preserves card number;
Report an error submodule, for when second judgment submodule judgement card mark is imperfect, to report an error end.
Specifically, active module 17 includes:
Third sending submodule, for sending the card activation command for including card number;
Third receiving submodule, the response data for receiving card activation command;
Third judging submodule, the response data for being received according to third receiving submodule judge whether successful activation The card chosen;
Second judgment module 18, for after third judging submodule judges the card that successful activation is chosen, judging more cards Whether set blocks more and activates successfully, terminate when judging that more card flag bits reset flag bit;
Sending module 11 is additionally operable to after third judging submodule judges the card that no successful activation is chosen, and transmission is sought Card command.
Preferably, which further includes:First acquisition module;
First acquisition module, for after the second judgment module 18 judges that more cards activate successfully, being preserved according to itself Card number obtains the card image of corresponding card;Card image is sent to host computer.
Specifically, the first acquisition module, specifically for when the second judgment module 18 judge block activate successfully after, according to The card number itself preserved obtains the card image of corresponding card, and card number and corresponding card are believed Breath binding obtains binding information, and binding information is returned to host computer.
Optionally, receiving module 12 are additionally operable to receive the acquisition card image order that host computer is sent;
Sending module 11, specifically for sending card seeking order when receiving module 12 receives and obtains card image order;
First acquisition module specifically includes:
The first tissue order submodule, for after the second judgment module 18 judges that more cards activate successfully, being protected from itself The card not yet obtained a number is obtained in all cards number deposited to number as current card, is compiled according to current card Number tissue Card Reader order;
4th sending submodule, for the Card Reader order of the first tissue order submodule tissue to be sent to card;
4th receiving submodule, the card image for receiving card return;
4th sending submodule is additionally operable to the card image that the card that the 4th receiving submodule receives returns being sent to Host computer;
4th judging submodule, for when the first receiving submodule receives and obtains card image order, judgement to be all The card number not being acquired also;
The first tissue order submodule, for when the 4th judgment module judge be not acquired also card number when, The card not yet obtained a number is obtained from all cards number that itself is preserved as current card to number, according to working as Preceding card number tissue Card Reader order;
4th sending submodule is additionally operable to when the 4th judgment module judges the card number not being acquired, to Host computer, which returns, obtains card image failure response, terminates.
Optionally, receiving module 12 are additionally operable to receive the acquisition card image order that host computer is sent;
Sending module 11, specifically for sending card seeking order when receiving module 12 receives and obtains card image order;
First acquisition module specifically includes:
Minor microstructure order submodule, for after the second judgment module 18 judges that more cards activate successfully, being protected from itself The card not yet obtained a number is obtained in all cards number deposited to number as current card, is compiled according to current card Number tissue Card Reader order;
5th sending submodule, for the Card Reader order of minor microstructure order submodule tissue to be sent to card;
5th receiving submodule, the card image for receiving card return;
5th judging submodule, the card number for judging whether not to be acquired also;
Minor microstructure order submodule is additionally operable to the card number when the judgement of the 5th judging submodule is not acquired also When, the card not yet obtained a number is obtained from all cards number that itself is preserved as current card numbers, root According to current card number tissue Card Reader order;
5th sending module 11 will when being additionally operable to the card number that the judgement of the 5th judging submodule is not acquired All card images that 5th receiving submodule receives are sent to host computer.
Preferably, sending module 11 are additionally operable to that after the second judgment module 18 judges that more cards activate successfully, itself is protected All cards number deposited is sent to host computer.
Further, receiving module 12 are additionally operable to receive the acquisition card number order of host computer transmission;
Sending module 11, specifically for when receiving module 12 receives and obtains card number order, sending card seeking order.
In more detail, which further includes:Second acquisition module;
Receiving module 12 is additionally operable to receive the acquisition card image order for including card number that host computer is sent;
Second acquisition module, the card number in the acquisition card image for being received according to receiving module 12 obtain with The card image of its corresponding card;The card image got is sent to host computer.
Specifically, the second acquisition module specifically includes:
6th receiving submodule, the acquisition card image order for including card number for receiving host computer transmission;
6th sending submodule, the acquisition card image order for receiving the 6th receiving submodule are sent to card Piece;
6th receiving submodule is additionally operable to receive the card image that card is sent;
6th sending module 11 is additionally operable to the card image that the 6th receiving submodule receives being sent to host computer.
Further, the second acquisition module, specifically in the acquisition card image that is received according to receiving module 12 Card number obtain corresponding card card image;Card number and corresponding card image are bound to obtain Binding information, and binding information is returned into host computer.
Correspondingly, receiving module 12, is additionally operable to receive the operational order for including card number that host computer is sent;
Sending module 11 is additionally operable to operational order being sent to card;
Receiving module 12 is additionally operable to receive the response data that card returns;
Sending module 11 is additionally operable to the response data that receiving module 12 receives being sent to host computer.
Preferably, which further includes:Third acquisition module, for judging that more cards activate successfully when the second judgment module 18 Later, the card image of corresponding card is obtained according to the card number itself preserved.
Further, sending module 11, specifically for when receiving outer triggering signal, sending card seeking order;
Specifically, third acquisition module includes:
Third organizational command submodule obtains one in all cards number for being preserved from itself and not yet obtained Card number is numbered as current card, according to current card number tissue Card Reader order;
7th sending submodule, the Card Reader order for generating third tissue submodule are sent to card;
7th receiving submodule, the card image for receiving card transmission;
6th judging submodule, the card number for judging whether not to be acquired also;
Third organizational command module is additionally operable to when the 6th judging submodule judges the card number not being acquired also The card not yet obtained a number is obtained from all cards number that itself is preserved as current card to number, according to working as Preceding card number tissue Card Reader order.
Preferably, third acquisition module further includes:7th judging submodule, for judging that the 7th receiving submodule receives Card image whether be legal card image, when judging legal, then certification success, terminates, and then recognizes when judging illegal Card failure, terminates.
The above, preferable specific implementation method only of the invention, but scope of protection of the present invention is not limited thereto, Any one skilled in the art is in technical scope disclosed by the invention, the change or replacement that can be readily occurred in, It should be covered by the protection scope of the present invention.Therefore, protection scope of the present invention should be with scope of the claims Subject to.

Claims (38)

1. a kind of method of card activation, which is characterized in that including:
Step S1, card reader sends card seeking order;
Whether step S2, the described card reader receives card seeking response, judge in yard to be multiple cards according to card seeking response, It is that more card flag bit set are then executed into step S3, otherwise more card flag bits is resetted, execute step S3;
Step S3, the described card reader carries out anti-collision and operates choice cards, and the card chosen is numbered, and preserves card volume Number;
Step S4, the described card reader numbers according to the card and executes activation operation to the card chosen, and is held after activating successfully Row step S5;
Step S5, the described card reader judge more card flag bits whether set, be then return to step S1, otherwise more cards activate successfully, Terminate.
2. the method as described in claim 1, which is characterized in that step S2 is specially:The card reader receives in yard The card seeking response that card returns, whether have bit frame conflict, be then to hold more card flag bit set if detecting in the card seeking response Row step S3;Otherwise more card flag bits are resetted, executes step S3.
3. the method as described in claim 1, which is characterized in that the step S3 is specifically included:
Step A1, the described card reader sends select command;
Step A2, the described card reader receives the card mark that card returns in yard, and detection card has identified whether conflict, has been Then follow the steps A3;Otherwise it determines the card mark chosen, executes step A5;
Step A3, the described card reader detects first position clashed, and the location determination clashed according to first Significance bit, and it includes the anti-collision order for imitating position to send;
Step A4, the described card reader receives the data that the card of card mark and effective non-colinear position in yard returns, detection Whether occur further conflicting, is then return to step A3;Otherwise it determines the card mark chosen, executes step A5;
Step A5, the described card reader sends the card selection order for including the card mark chosen;
Step A6, the described card reader receives the card selection that card returns in yard and confirms response, confirms that response judges according to card selection Card identifies whether that the card corresponding to the card mark chosen is numbered, and preserves card number, executes step Rapid S4;Otherwise report an error end.
4. method as claimed in claim 3, which is characterized in that more when having in card reader judgement yard in the step S2 When opening card, step A1 is executed;When in card reader judgement yard without multiple cards, step B1 is executed;
Step B1, the described card reader sends select command;
Step B2, the described card reader receives the card mark that card returns in yard;And send the card selection for including card mark Order;
Step B3, the described card reader receives the card selection that card returns in yard and confirms response, confirms that response judges according to card selection Card identifies whether that the card corresponding to card mark is numbered, and preserves card number, executes step S4; Otherwise report an error end.
5. the method as described in claim 1, which is characterized in that the step S4 is specifically included:Card reader is sent comprising described The card activation command of card number;After receiving response data, data judge whether what successful activation was chosen according to response Card is to then follow the steps S5;Otherwise return to step S1.
6. the method as described in claim 1, which is characterized in that in the step S5, after more cards activate successfully, also wrap It includes:The card reader obtains the card image of corresponding card according to the card number itself preserved, and will get Card image is sent to host computer.
7. method as claimed in claim 6, feature is being,
Further include before the step S1:Host computer sends to the card reader and obtains card image order;When card reader receives To when the acquisition card image order, step S1 is executed;
The card reader obtains the card image of corresponding card according to the card number itself preserved, specifically includes:
Step C1, the card not yet obtained a number is obtained in all cards number that the described card reader is preserved from itself to make It is numbered for current card, card is sent to according to the current card number tissue Card Reader order, and by the Card Reader order;
Step C2, the described card reader receives the card image that card returns, and the card image is sent to host computer;
Step C3:The host computer receives the card image that the card reader is sent, and continues to send to card reader and obtain card Message command;
Step C4, the described card reader judges whether that the card not being acquired also is numbered, and is then return to step C1, otherwise upwards Position machine, which returns, obtains card image failure response, terminates.
8. the method for claim 7, which is characterized in that the step C3 is specially:The host computer judgement receives Card image whether be legal card image, be then certification success, terminate, otherwise authentification failure, continues to obtain to card reader Card image is taken, step C4 is executed.
9. method as claimed in claim 6, which is characterized in that
Further include before the step S1:Host computer sends to the card reader and obtains card image order;When card reader receives To when the acquisition card image order, step S1 is executed;
The card reader obtains the card image of corresponding card according to the card number itself preserved, specifically includes:
Step D1, the card not yet obtained a number is obtained in all cards number that the described card reader is preserved from itself to make It is numbered for current card, card is sent to according to the current card number tissue Card Reader order, and by the Card Reader order;
Step D2, the described card reader receives the card image that card returns;
Step D3, the described card reader judges whether that the card not being acquired also is numbered, and is then return to step D1, otherwise will connect All card images received return to host computer.
10. method as claimed in claim 9, feature is being, in step D3, the card reader is all by what is received Card image returns to host computer:The host computer judges in all card images received with the presence or absence of conjunction The card image of method is then certification success, terminates, otherwise authentification failure, terminates.
11. the method as described in claim 1, which is characterized in that in the step S5, after more cards activate successfully, also wrap It includes:All cards number that the card reader preserves itself is sent to host computer.
12. method as claimed in claim 11, which is characterized in that further include before the step S1:Host computer is to the reading Card device, which is sent, obtains card number order;When card reader receives the acquisition card number order, step S1 is executed.
13. method as claimed in claim 11, which is characterized in that when the card number that itself is preserved is sent to by card reader After the machine of position, further include:The acquisition card image order that the host computer to be received such as the card reader is sent;When receiving host computer When the acquisition card image order comprising card number sent, obtained according to the card number in the acquisition card image order The card image of corresponding card is taken, and the card image got is sent to host computer.
14. method as claimed in claim 13, which is characterized in that when the card number that itself is preserved is sent to by card reader After the machine of position, specifically include:
Step E1, the described host computer obtains the card not yet obtained a number as current from the card number received Card is numbered, and obtains card image order according to the current card number tissue, and be sent to card image order is obtained Card reader;
Step E2, the described card reader is transmitted to card by card image order is obtained;When the card image for receiving card return Shi Zhihang steps E3;
The card image is transmitted to host computer by step E3, the described card reader;
Also whether step E4, the described host computer receives the card image that card reader returns, and judge in the card received number There is the card number not being acquired, is then return to step E1, otherwise terminates.
15. method as claimed in claim 14, which is characterized in that further include in the step E4:The host computer, which receives, to be read The card image of card device forwarding, judges whether the card image is legal, is then certification success, terminates;It is no to then follow the steps E4.
16. the method as described in claim 6 or 13, which is characterized in that after getting card image according to card number, Further include:The card reader numbers card and corresponding card image binds to obtain binding information, and by binding information Back to host computer.
17. the method described in claim 16, which is characterized in that after getting card image according to card number, tool Body includes:
Step F1, the described host computer needs the card operated according to the card image selection in the binding information received, according to The card image for the card chosen obtains the card bound with it and numbers, and operation of the tissue comprising the card number got refers to It enables;And operational order is sent to the card reader;
The operational order received is transmitted to card by step F2, the described card reader;When the response for receiving card return After data, the response data is transmitted to the host computer.
18. the method as described in claim 1, which is characterized in that in the step S5, after more cards activate successfully, also wrap It includes:The card reader obtains the card image of corresponding card according to the card number itself preserved.
19. the method as described in claim 1, which is characterized in that
Further include before the step S1:When card reader receives outer triggering signal, step S1 is executed;
The card reader obtains the card image of corresponding card according to the card number itself preserved, specifically includes:
Step G1, the card not yet obtained a number is obtained in all cards number that the described card reader is preserved from itself to make It is numbered for current card, card is sent to according to the current card number tissue Card Reader order, and by the Card Reader order;
Step G2, the described card reader receives the card image that card returns;
Step G3, the described card reader judges whether that the card not being acquired also is numbered, and is then return to step G1, otherwise ties Beam.
20. method as claimed in claim 19, feature is being, the step G2 is specially:The card reader judgement connects Whether the card image received is legal card image, is then certification success, terminates, otherwise authentification failure, terminates.
21. a kind of device of card activation, which is characterized in that including:
Sending module, for sending card seeking order;
Receiving module, for receiving card seeking response
Whether the first judgment module, the card seeking response for being received according to the receiving module judge in yard to be more Open card;
Set module is used for when it is multiple cards that first judgment module, which judges in yard, by more card flag bit set;
Reseting module, for when it is not multiple cards that first judgment module, which judges in yard, more card flag bits to be answered Position;
Number module operates choice cards for carrying out anti-collision, the card chosen is numbered, and preserves card number;
Active module, the card number for being preserved according to the number module execute activation operation to the card chosen;
Second judgment module, for work as judge after active module successful activation card more card flag bits whether set, work as judgement Sending module is triggered when more card flag set;When judging that more card flag bits reset, more cards activate successfully, terminate.
22. device as claimed in claim 21, which is characterized in that first judgment module is specifically used for detecting the reception Whether there is bit frame conflict in the card seeking response that module receives;
Set module, for when first judgment module be determined with bit frame conflict when, by more card flag bit set;
Reseting module, for when first judgment module judges no bit frame conflict, more card flag bits to be resetted.
23. device as claimed in claim 21, which is characterized in that the number module includes:
First sending submodule sends select command for the card into yard;
First receiving submodule, the card mark for receiving the return of the card in yard;
First detection sub-module has identified whether conflict for detecting the card that the first receiving submodule receives;
Determination sub-module is chosen for when first detection sub-module judges that card mark does not conflict, determining Card identifies;
First sending submodule is additionally operable to when first detection sub-module judges that the card is identified with conflict, inspection First position clashed, and the location determination significance bit clashed according to first are surveyed, and it includes effect position to send Anti-collision order;
First receiving submodule is additionally operable to receive the number that the card of card mark and effective non-colinear position in yard returns According to;
Whether the second detection sub-module, the Data Detection that the card for being received according to first receiving submodule returns go out Now further conflict;
First sending submodule is additionally operable to, when further conflict occurs in the judgement of the second detection sub-module, detect first The position of conflict, and the location determination significance bit clashed according to first are sent, and it includes the anti-collision for imitating position to send Order;
The determination sub-module is additionally operable to, when second detection sub-module judges without there is further conflict, determine The card mark chosen;
First sending submodule is additionally operable to send the card selection life of the card mark determined comprising the determination sub-module It enables;
First receiving submodule is additionally operable to receive the card selection confirmation response that card returns in yard;
First judging submodule is additionally operable to the card selection received according to first receiving submodule and confirms that response is sentenced Disconnected card identifies whether completely;
Number submodule, for when first judging submodule judgement card mark is complete, institute to be identified to the card chosen Corresponding card is numbered, and preserves card number;
Report an error submodule, for when first judging submodule judgement card mark is imperfect, to report an error end.
24. device as claimed in claim 23, which is characterized in that further include in the number module:Second sending submodule, Second receiving submodule and second judgment submodule;
First sending submodule, specifically for when having multiple cards in the first judgment module judgement yard, sending choosing Select order;
Second sending submodule, for when in the first judgment module judgement yard without multiple cards, sending selection Order;
Second receiving submodule, for receiving the card mark that card returns in yard;
Second sending submodule is additionally operable to send the card mark received comprising second receiving submodule Card selection order;
Second receiving submodule is additionally operable to receive the card selection confirmation response that card returns in yard;
The second judgment submodule is additionally operable to the card selection received according to second receiving submodule and confirms that response is sentenced Disconnected card identifies whether completely;
The number submodule is used for when second judgment submodule judgement card mark is complete, to the card mark chosen Know corresponding card to be numbered, preserves card number;
The submodule that reports an error, for when second judgment submodule judgement card mark is imperfect, to report an error end.
25. device as claimed in claim 21, which is characterized in that the active module includes:
Third sending submodule, for sending the card activation command for including card number;
Third receiving submodule, the response data for receiving card activation command;
Third judging submodule, the response data for being received according to the third receiving submodule judge whether successful activation The card chosen;
Second judgment module, for after third judging submodule judges the card that successful activation is chosen, judging more card marks Whether set blocks more and activates successfully, terminate when judging that more card flag bits reset for will position;
The sending module is additionally operable to after third judging submodule judges the card that no successful activation is chosen, and sends card seeking Order.
26. device as claimed in claim 21, which is characterized in that further include:First acquisition module;
First acquisition module, for after second judgment module judges that more cards activate successfully, being preserved according to itself Card number obtain corresponding card card image;The card image is sent to host computer.
27. device as claimed in claim 21, which is characterized in that first acquisition module is specifically used for judging when second After the more cards of module judgement activate successfully, the card image of corresponding card is obtained according to the card number itself preserved, And bind card number and corresponding card image to obtain binding information, binding information is returned into host computer.
28. device as claimed in claim 26, which is characterized in that
The receiving module is additionally operable to receive the acquisition card image order that host computer is sent;
The sending module, specifically for sending card seeking order when the receiving module receives and obtains card image order;
First acquisition module specifically includes:
The first tissue order submodule, for after second judgment module judges that more cards activate successfully, being preserved from itself All cards number in obtain one not yet obtained card number as current card number, according to the current card Number tissue Card Reader order;
4th sending submodule, for the Card Reader order of the first tissue order submodule tissue to be sent to card;
4th receiving submodule, the card image for receiving card return;
4th sending submodule is additionally operable to the card letter that the card for receiving the 4th receiving submodule returns Breath is sent to host computer;
4th judging submodule, for when the receiving module receives and obtains card image order, judging whether also not The card number being acquired;
The first tissue order submodule is additionally operable to the card number when the 4th judgment module judgement was not acquired also When, the card not yet obtained a number is obtained from all cards number that itself is preserved as current card numbers, root According to the current card number tissue Card Reader order;
4th sending submodule is additionally operable to the card number when the 4th judgment module judgement was not acquired When, it is returned to host computer and obtains card image failure response, terminated.
29. device as claimed in claim 26, which is characterized in that the receiving module is additionally operable to receive what host computer was sent Obtain card image order;
The sending module, specifically for sending card seeking order when the receiving module receives and obtains card image order;
First acquisition module specifically includes:
Minor microstructure order submodule, the institute for after the second judgment module judges that more cards activate successfully, being preserved from itself Have and obtain the card not yet obtained a number in card number as current card number, is numbered according to the current card Organize Card Reader order;
5th sending submodule, for the Card Reader order of the minor microstructure order submodule tissue to be sent to card;
5th receiving submodule, the card image for receiving card return;
5th judging submodule, the card number for judging whether not to be acquired also;
The minor microstructure order submodule is additionally operable to judge the card not being acquired also when the 5th judging submodule When number, the card not yet obtained a number is obtained from all cards number that itself is preserved as current card and is compiled Number, according to the current card number tissue Card Reader order;
5th sending submodule is additionally operable to the card number that the 5th judging submodule judgement is not acquired When, all card images that the 5th receiving submodule receives are sent to host computer.
30. device as claimed in claim 21, which is characterized in that the sending module is additionally operable to sentence when the second judgment module After Ding Duoka is activated successfully, all cards number that itself is preserved is sent to host computer.
31. device as claimed in claim 30, which is characterized in that the receiving module is additionally operable to receive host computer transmission Acquisition card number order;
The sending module, specifically for when the receiving module receives the acquisition card number order, sending card seeking Order.
32. device as claimed in claim 30, which is characterized in that further include:Second acquisition module;
The receiving module is additionally operable to receive the acquisition card image order for including card number that host computer is sent;
Second acquisition module, the card number in the acquisition card image for being received according to the receiving module Obtain the card image of corresponding card;The card image got is sent to host computer.
33. device as claimed in claim 32, which is characterized in that second acquisition module specifically includes:
6th receiving submodule, the acquisition card image order for including card number for receiving host computer transmission;
6th sending submodule, the acquisition card image order for receiving the 6th receiving submodule are sent to Card;
6th receiving submodule is additionally operable to receive the card image that card is sent;
6th sending module is additionally operable to the card image that the 6th receiving submodule receives being sent to host computer.
34. device as claimed in claim 32, which is characterized in that second acquisition module, specifically for being connect according to Receive the card image that the card number in the acquisition card image that module receives obtains corresponding card;By card Number and corresponding card image bind to obtain binding information, and binding information is returned to host computer.
35. the device as described in claim 27 or 34, which is characterized in that the receiving module is additionally operable to receive host computer hair That send includes the operational order of card number;
The sending module is additionally operable to the operational order being sent to card;
The receiving module is additionally operable to receive the response data that card returns;
The sending module is additionally operable to the response data that the receiving module receives being sent to host computer.
36. the device as described in right wants 21, which is characterized in that further include:Third acquisition module, for when the second judgment module After the more cards of judgement activate successfully, the card image of corresponding card is obtained according to the card number itself preserved.
37. device as claimed in claim 21, which is characterized in that the sending module, specifically for external tactile when receiving When signalling, card seeking order is sent;
The third acquisition module includes:
Third organizational command submodule, all cards for being preserved from itself obtain a card not yet obtained in numbering Number is numbered as current card, according to the current card number tissue Card Reader order;
7th sending submodule, the Card Reader order for generating the third tissue submodule are sent to card;
7th receiving submodule, the card image for receiving card transmission;
6th judging submodule, the card number for judging whether not to be acquired also;
The third organizational command module is additionally operable to when the 6th judging submodule judges the card number not being acquired also The card not yet obtained a number is obtained from all cards number that itself is preserved as current card to number, according to institute State current card number tissue Card Reader order.
38. device as claimed in claim 37, which is characterized in that the third acquisition module further includes:7th judges submodule Block, it is legal when judging for judging whether card image that the 7th receiving submodule receives is legal card image When then certification success, terminate, the then authentification failure when judging illegal terminates.
CN201810130108.0A 2018-02-08 2018-02-08 Card activation method and device Active CN108288008B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810130108.0A CN108288008B (en) 2018-02-08 2018-02-08 Card activation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810130108.0A CN108288008B (en) 2018-02-08 2018-02-08 Card activation method and device

Publications (2)

Publication Number Publication Date
CN108288008A true CN108288008A (en) 2018-07-17
CN108288008B CN108288008B (en) 2021-12-28

Family

ID=62832747

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810130108.0A Active CN108288008B (en) 2018-02-08 2018-02-08 Card activation method and device

Country Status (1)

Country Link
CN (1) CN108288008B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110245532A (en) * 2019-06-06 2019-09-17 北京聚利科技股份有限公司 Card-reading system and method
CN110807502A (en) * 2019-10-31 2020-02-18 北京小米支付技术有限公司 Configuration method and device of NFC (near field communication) smart card
CN113312934A (en) * 2021-05-26 2021-08-27 维沃移动通信有限公司 NFC analog card selection method and device, electronic equipment and storage medium
WO2022252792A1 (en) * 2021-06-04 2022-12-08 华为技术有限公司 Nfc-based data interaction method and device

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0709803A2 (en) * 1994-10-28 1996-05-01 Mitsubishi Denki Kabushiki Kaisha Contactless IC card system and communication method thereof
CN101023434A (en) * 2004-07-15 2007-08-22 万事达卡国际股份有限公司 Collision detection and avoidance scheme for contactless card payment systems
CN101201906A (en) * 2007-12-21 2008-06-18 合肥工大高科信息技术有限责任公司 Electronic label for personnel and self-organized network method thereof
EP2555441A1 (en) * 2010-04-02 2013-02-06 Nationz Technologies Inc. Collision detection method of radio frequency sim card with electromagnetic communication at low frequency
CN103632115A (en) * 2013-11-01 2014-03-12 福建鑫诺通讯技术有限公司 Method for realizing multichannel data collection for card
CN106326797A (en) * 2016-08-19 2017-01-11 飞天诚信科技股份有限公司 Non-contact type card and working method
CN106407860A (en) * 2016-08-31 2017-02-15 广州地理研究所 Multi-card identification anti-collision method and device
CN106934310A (en) * 2017-02-24 2017-07-07 飞天诚信科技股份有限公司 The method and card reader of a kind of testing smart card

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0709803A2 (en) * 1994-10-28 1996-05-01 Mitsubishi Denki Kabushiki Kaisha Contactless IC card system and communication method thereof
CN101023434A (en) * 2004-07-15 2007-08-22 万事达卡国际股份有限公司 Collision detection and avoidance scheme for contactless card payment systems
CN101201906A (en) * 2007-12-21 2008-06-18 合肥工大高科信息技术有限责任公司 Electronic label for personnel and self-organized network method thereof
EP2555441A1 (en) * 2010-04-02 2013-02-06 Nationz Technologies Inc. Collision detection method of radio frequency sim card with electromagnetic communication at low frequency
CN103632115A (en) * 2013-11-01 2014-03-12 福建鑫诺通讯技术有限公司 Method for realizing multichannel data collection for card
CN106326797A (en) * 2016-08-19 2017-01-11 飞天诚信科技股份有限公司 Non-contact type card and working method
CN106407860A (en) * 2016-08-31 2017-02-15 广州地理研究所 Multi-card identification anti-collision method and device
CN106934310A (en) * 2017-02-24 2017-07-07 飞天诚信科技股份有限公司 The method and card reader of a kind of testing smart card

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110245532A (en) * 2019-06-06 2019-09-17 北京聚利科技股份有限公司 Card-reading system and method
CN110807502A (en) * 2019-10-31 2020-02-18 北京小米支付技术有限公司 Configuration method and device of NFC (near field communication) smart card
CN110807502B (en) * 2019-10-31 2024-04-09 天星数科科技有限公司 NFC intelligent card configuration method and device
CN113312934A (en) * 2021-05-26 2021-08-27 维沃移动通信有限公司 NFC analog card selection method and device, electronic equipment and storage medium
WO2022252792A1 (en) * 2021-06-04 2022-12-08 华为技术有限公司 Nfc-based data interaction method and device

Also Published As

Publication number Publication date
CN108288008B (en) 2021-12-28

Similar Documents

Publication Publication Date Title
CN108288008A (en) A kind of method and device of card activation
CN106649838A (en) Data transmission method, block chain node and distributed database
RU2005115870A (en) METHOD AND SYSTEM FOR RECOGNITION OF REGISTRATION INFORMATION
EP2028628A3 (en) Electronic wallet device, communication method, and program
CA2605789A1 (en) Reader control system
JPS62500905A (en) Method and apparatus in radio reception for preventing messages from being stored more than once
JP5003104B2 (en) Access device and program
CN107515716B (en) Billboard card management method, apparatus, computer equipment and storage medium
JP2003271216A (en) Process control method using non-contact ic tag
JP4542798B2 (en) Mobile device
CN102446284A (en) Ic card, mobile electronic device and data processing method in ic card
CN106529925A (en) Bluetooth visual card and method of realizing electronic cash transactions
CN113361293A (en) Card swiping method, card controller, electronic device and storage medium
JP4695385B2 (en) Memory card and card controller
CN108537980A (en) Face recognition opens method, apparatus, storage medium and the terminal device of locker
CN102298712B (en) Radio communication apparatus
JP2006227695A (en) Radio tag information reading device
EP3236405B1 (en) Selecting an application on a card
CN101401113A (en) IC chip of supporting large size memory and method thereof
CN100454226C (en) Host device, storage device, and method for accessing storage device
SG188658A1 (en) Smart chip and method for smart chip data communications
CN108521646A (en) A kind of near field communication method, device and computer readable storage medium
JP7468754B1 (en) ELECTRONIC INFORMATION STORAGE MEDIUM, IC CHIP, IC CARD, RECEPTION BLOCK PROCESSING METHOD, AND PROGRAM
JP2537200B2 (en) Portable electronic devices
CN102314401B (en) For low-power, few pin-count interface of RFID transponder

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant