Anti-collision methods for contactless communication, RFID cards and card readers

By adding the time slot value to the REQ instruction of contactless communication and randomly generating response moments, the data conflict problem caused by multiple RFID cards is solved, and a more efficient anti-collision and communication process is achieved.

CN114742084BActive Publication Date: 2025-02-25BEIJING TSINGTENG MICROSYSTEM CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210407557.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-19
Publication Date
2025-02-25
Estimated Expiration
2042-04-19

AI Technical Summary

Technical Problem

In contactless communication, multiple RFID cards may cause data conflicts. The prior art such as the ISO-14443TypeB protocol has multiple rounds of actions, data superposition uncertainty and redundancy problems in the anti-collision process.

Method used

By adding the first time slot value n to the REQ instruction sent by the card reader and randomly generating the second time slot value r based on the value, the target response time of the radio frequency identification card is determined to avoid secondary conflicts and reduce anti-collision actions. Number of rounds.

Benefits of technology

It effectively avoids multiple rounds of anti-collision actions, reduces the number of Q&A between the reader and the RFID card, and improves the success rate and communication efficiency of one-time anti-collision completion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114742084B_ABST
    Figure CN114742084B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of near field communication, and discloses a non-contact communication anti-collision method, which is applied to at least two radio frequency identification cards, and the method comprises: when a card reader detects a conflict, obtaining a REQ instruction sent by the card reader, wherein the REQ instruction comprises a first slot value N and a first time slot value n; randomly generating a corresponding second slot value R and a second time slot value r according to the first slot value N and the first time slot value n; when the second slot value R is equal to the first slot value N in the Slot‑Marker instruction sent by the card reader, and the first time slot value n is not equal to 1, determining the target response time corresponding to each radio frequency identification card according to the second time slot value r randomly generated by each radio frequency identification card; each radio frequency identification card obtains and responds to the SELECT instruction sent by the card reader at the corresponding target response time. The present application also discloses a card reader and a radio frequency identification card.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of near field communication, for example, to an anti-collision method for contactless communication, a radio frequency identification card and a card reader. Background Art

[0002] At present, with the development of electronic technology, more and more electronic devices support Near Field Communication (NFC) technology, such as smart phones or smart bracelets. NFC technology provides short-range high-frequency wireless connection to achieve two-way communication between electronic devices. Contactless communication is mainly used in near-field communication. Two electronic devices equipped with NFC technology can exchange data wirelessly after approaching each other. The card reader can also read data from the inside of the card by approaching the contactless Radio Frequency Identification (RFID) card.

[0003] In this contactless communication mode, a card reader may be close to multiple RFID cards. At this time, when the RFID cards receive data requests from the card readers, they may respond at the same time, resulting in data conflicts.

[0004] In the process of implementing the embodiments of the present disclosure, it is found that there are at least the following problems in the related art:

[0005] When solving the anti-collision problem of multiple RFID cards, for example, in the anti-collision process of the ISO-14443 Type B protocol, the R values ​​of multiple RFID cards may randomly reach the same R value, resulting in the need for multiple rounds of anti-collision actions. This causes a large number of questions and answers between the reader and the RFID card, and a large amount of data. There are also uncertainties caused by data superposition and redundancy problems caused by multiple anti-collision operations. Summary of the invention

[0006] In order to provide a basic understanding of some aspects of the disclosed embodiments, a brief summary is given below. The summary is not an extensive review, nor is it intended to identify key / critical components or delineate the scope of protection of these embodiments, but rather serves as a prelude to the detailed description that follows.

[0007] The embodiments of the present disclosure provide a contactless communication anti-collision method, a radio frequency identification card and a card reader, and a contactless communication system to solve the uncertainty caused by data superposition and the redundancy problem of multiple anti-collision operations during the contactless communication anti-collision process.

[0008] In some embodiments, the contactless communication anti-collision method is applied to at least two radio frequency identification cards, the radio frequency identification cards are connected to a card reader via contactless communication via the ISO-14443 Type B protocol, and the method includes:

[0009] When the card reader detects a conflict, obtaining a REQ instruction sent by the card reader, wherein the REQ instruction includes a first slot value N and a first time slot value n, where N and n are positive integers greater than or equal to 1 and less than or equal to 16;

[0010] According to the first slot value N and the first time slot value n, randomly generate a corresponding second slot value R and a second time slot value r, wherein R and r are positive integers greater than or equal to 1 and less than or equal to 16;

[0011] When the second slot value R is equal to the first slot value N in the Slot-Marker instruction sent by the card reader, and the first time slot value n is not equal to 1, determining the target response time corresponding to each RFID card according to the second time slot value r randomly generated by each RFID card;

[0012] Each RFID card obtains and responds to the SELECT instruction sent by the card reader at the corresponding target response time.

[0013] In some embodiments, the anti-collision method for contactless communication is applied to a card reader, the card reader is connected to a radio frequency identification card for contactless communication via the ISO-14443 Type B protocol, and the method includes:

[0014] In the case of detecting a conflict, sending a REQ instruction to at least two RFID cards in conflict, wherein the REQ instruction includes a first slot value N and a first time slot value n, and N and n are positive integers greater than or equal to 1 and less than or equal to 16;

[0015] Determining n response times according to the first time slot value n and the frame waiting time, wherein the value of n is greater than or equal to the number of conflicting RFID cards;

[0016] When the first slot value N is not equal to 1, sending a Slot-Marker instruction to the at least two RFID cards in each time slot to determine the RFID card corresponding to the current time slot;

[0017] When the first time slot value n is not equal to 1, a SELECT instruction is sent to the corresponding radio frequency identification card at each response time according to the n response times.

[0018] In some embodiments, the radio frequency identification card includes one or more processors and interfaces; the interface is used to receive code instructions and transmit the code instructions to the processor, and the processor is used to run the code instructions to execute the contactless communication anti-collision method as described in the present application.

[0019] In some embodiments, the card reader supports the ISO-14443 Type B protocol, and includes a memory, an NFC chip, and one or more processors; the memory is coupled to the one or more processors, and the memory is used to store computer program code, and the computer program code includes computer instructions, and the one or more processors call the computer instructions to execute the anti-collision method for contactless communication as described in the present application.

[0020] In some embodiments, the contactless communication system includes the RFID card as described in the present application and the card reader as described in the present application, and the RFID card is connected to the card reader via contactless communication via ISO-14443 Type B protocol.

[0021] The contactless communication anti-collision method, radio frequency identification card and card reader, and contactless communication system provided by the embodiments of the present disclosure can achieve the following technical effects:

[0022] The present application adds a first time slot value n in the REQ instruction sent by the card reader, and uses the first time slot value n as the time parameter of the radio frequency identification card. Therefore, when at least two radio frequency identification cards randomly obtain the same R value, each radio frequency identification card can determine the target response time of the current radio frequency identification card when a secondary conflict occurs according to the second time slot value r randomly generated by the first time slot value n, thereby avoiding multiple rounds of anti-collision actions, reducing the number of questions and answers between the reader and the radio frequency identification card, and improving the success rate of one-time anti-collision completion and the efficiency of communication.

[0023] The above general description and the following description are exemplary and explanatory only and are not intended to limit the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] One or more embodiments are exemplarily described by corresponding drawings, which do not limit the embodiments. Elements with the same reference numerals in the drawings are shown as similar elements, and the drawings do not constitute a scale limitation, and wherein:

[0025] Figure 1 This is a flowchart of the ISO-14443 Type B protocol;

[0026] Figure 2It is a schematic diagram of a contactless communication anti-collision method provided by the present application;

[0027] Figure 3 is a schematic diagram of another anti-collision method for contactless communication provided by the present application;

[0028] Figure 4 It is an application schematic diagram of this application;

[0029] Figure 5 is a schematic diagram of another anti-collision method for contactless communication provided by the present application;

[0030] Figure 6 is a schematic diagram of another anti-collision method for contactless communication provided by the present application;

[0031] Figure 7 is a schematic diagram of another anti-collision method for contactless communication provided by the present application;

[0032] Figure 8 is a schematic diagram of another anti-collision method for contactless communication provided by the present application;

[0033] Fig. 9 It is a schematic diagram of a contactless communication anti-collision system provided by the present application. DETAILED DESCRIPTION

[0034] In order to be able to understand the features and technical contents of the embodiments of the present disclosure in more detail, the implementation of the embodiments of the present disclosure is described in detail below in conjunction with the accompanying drawings. The attached drawings are for reference only and are not used to limit the embodiments of the present disclosure. In the following technical description, for the convenience of explanation, a full understanding of the disclosed embodiments is provided through multiple details. However, one or more embodiments can still be implemented without these details. In other cases, to simplify the drawings, well-known structures and devices can be simplified for display.

[0035] The terms "first", "second", etc. in the specification and claims of the embodiments of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the terms used in this way can be interchanged where appropriate, so that the embodiments of the embodiments of the present disclosure described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions.

[0036] Unless otherwise stated, the term "plurality" means two or more.

[0037] In the embodiment of the present disclosure, the character " / " indicates that the preceding and following objects are in an "or" relationship. For example, A / B indicates: A or B.

[0038] The term "and / or" is a description of the association relationship between objects, indicating that three relationships can exist. For example, A and / or B means: A or B, or, A and B.

[0039] The term "correspondence" may refer to an association relationship or a binding relationship. The correspondence between A and B means that there is an association relationship or a binding relationship between A and B.

[0040] In the related art, when two or more RFID cards of the same type enter the radio frequency (RF) area at the same time, multiple RFID cards simultaneously receive the REQ instruction issued by the card reader, and multiple RFID cards will respond to the REQ instruction at the same time according to the control logic, thus causing signal conflicts between the RFID cards, making it impossible for the card reader to detect the correct signal.

[0041] Therefore, an anti-collision protocol must be established between the RFID card and the reader. Figure 1 As shown, the card reader can use the ISO14443-3 Type B protocol to detect matching RFID cards and anti-collision processes. Specifically, the following steps are included: First, the card reader sends a REQB / WUPB instruction with an application family identifier (AFI) in a single time slot. When the RFID card receives the REQB / WUPB instruction, it will immediately reply with an ATQB instruction. When the card reader detects a conflict, it will resend a REQB or WUPB instruction with AFI in multiple time slots (N); secondly, each RFID card that matches the AFI will generate an internal random number R, and the value range of R is between 1 and N; if R is equal to 1, it means that the current RFID card is the card in the first time slot, and it is necessary to immediately reply with an ATQB instruction to the card reader. If R is greater than 1, the card must wait for the Slot-Marker instruction (select R value) sent by the card reader to match the time slot; thirdly, the card reader sends a Slot-Marker instruction from small to large to check once 2~N, these N-1 time slots, and select the RFID card with the corresponding R value according to the N value, so that the corresponding RFID card sends the ATQB instruction to the card reader; finally, after the card reader receives the correct ATQB instruction, it will issue the ATTRIB / HALT instruction, and the RFID card waits for matching the ATTRIB / HALT instruction. If the ATTRIB instruction is matched, it will send the response value of the ATTRIB instruction and then enter the ACTIVE state, so that the RFID card enters the high-level mode; if the HALT instruction is received, it will send the response value of the HALT instruction and then enter the pause state.

[0042] However, in the existing ISO-14443 Type B protocol, the R values ​​of multiple RFID cards randomly reach one value during the anti-collision process, resulting in the need for multiple rounds of anti-collision actions, and then the uncertainty caused by data superposition and the redundancy of multiple anti-collision actions.

[0043] To this end, combined Figure 2 As shown, an embodiment of the present disclosure provides an anti-collision method for contactless communication, which is applied to at least two radio frequency identification cards, wherein the radio frequency identification cards are connected to a card reader via contactless communication via the ISO-14443 Type B protocol, and the method includes:

[0044] Step 201: When a card reader detects a conflict, a REQ instruction sent by the card reader is obtained, wherein the REQ instruction includes a first slot value N and a first time slot value n.

[0045] In an embodiment of the present application, when the card reader detects a conflict, the RFID card obtains the REQ instruction resent by the card reader, and includes the first slot value N and the first time slot value n in the REQ instruction, wherein N and n are positive integers greater than or equal to 1 and less than or equal to 16, and the format of the REQ instruction is defined as:

[0046] APf AFI PARAM n CRC 1 Byte 1 Byte 1 Byte 1 Byte 2Byte

[0047] Among them, APf (Anticollision Prefix) represents the anti-collision detection prefix, AFI represents the application family identifier, which is used to pre-select RFID cards that meet the application, PARAM represents the configuration parameters, and the high 4 bits of this byte are the first slot value N, which means the maximum number of RFID cards that can be selected.

[0048] Meanwhile, it should be noted that, when the card reader detects that there is a conflict, the first slot value N and the first time slot value n may both be set to 0.

[0049] Step 202: According to the first slot value N and the first time slot value n, randomly generate a corresponding second slot value R and a second time slot value r.

[0050] In an embodiment of the present application, each RFID card confirms the maximum threshold of the two parameters based on the first slot value N and the first time slot value n, and randomly generates the corresponding second slot value R and second time slot value r internally based on the maximum threshold, wherein R and r are positive integers greater than or equal to 1 and less than or equal to 16.

[0051] Step 203: When the second slot value R is equal to the first slot value N in the Slot-Marker instruction sent by the card reader, and the first time slot value n is not equal to 1, determine the target response time corresponding to each RFID card according to the second time slot value r randomly generated by each RFID card.

[0052] In an embodiment of the present application, each RFID card waits for the Slot-Marker instruction (selecting the R value) sent by the card reader to match the time slot according to the first slot value N. The format of the Slot-Marker instruction is defined as:

[0053] Apn n CRC 1 Byte 1 Byte 2Bytes

[0054] Among them, Apn (Anticollision Prefix n) represents the anti-collision detection prefix, the upper 4 bits of this byte are the first slot value N, the first time slot value n is used to redefine the response time so that the RFID card can reply in time, and CRC represents the check value. Specifically, when the second slot value R is equal to the first slot value N in the Slot-Marker instruction sent by the card reader, it means that the RFID card randomly receiving the second slot value R needs to respond. At this time, if the first time slot value n is not equal to 1, it indicates that there is a secondary conflict, that is, there are at least two RFID cards with the same second slot value R. In this case, each RFID card needs to determine the target response time at which the RFID card can avoid conflict based on its own random second time slot value r through software or hardware methods.

[0055] Step 204: Each RFID card obtains and responds to the SELECT instruction sent by the card reader at the corresponding target response time.

[0056] In the embodiment of the present application, each RFID card obtains the SELECT instruction sent by the card reader when its corresponding target response time arrives, and responds to the SELECT instruction under the correct identity conditions, wherein the format of the SELECT instruction is defined as:

[0057] SELECT PUPI CRC 1 Bytes 4Bytes 2Bytes

[0058] Among them, SELECT represents the selection instruction, the upper 4 bits of the byte are the anti-collision prefix, PUPI represents the card unique identity, and CRC represents the check value.

[0059] By adopting the contactless communication anti-collision method provided by the embodiment of the present disclosure, by adding a first time slot value n in the REQ instruction sent by the card reader, the first time slot value n is used as the time parameter of the radio frequency identification card, so that when at least two radio frequency identification cards randomly obtain the same R value, each radio frequency identification card can determine the target response time of the current radio frequency identification card when a secondary collision occurs according to the second time slot value r randomly generated by the first time slot value n, thereby avoiding multiple rounds of anti-collision actions, reducing the number of questions and answers between the reader and the radio frequency identification card, and improving the success rate of one-time anti-collision completion and the efficiency of communication.

[0060] Optional, combined Figure 3 As shown, the method of determining the target response time corresponding to each RFID card according to the second time slot value r randomly generated by each RFID card includes:

[0061] Step 301: Determine the frame waiting time of the RFID card according to the maximum time that the card reader waits for the RFID card to reply during the anti-collision process of the ISO-14443 Type B protocol.

[0062] In an embodiment of the present application, the present application determines the maximum time that the card reader waits for the RFID card to reply during the anti-collision process according to the ISO-14443 Type B protocol, that is, when the first slot value N is equal to 0, the maximum time that the card reader waits for the RFID card to reply, for example, 300 microseconds, 302 microseconds or 304 microseconds, as the frame waiting time of the RFID card.

[0063] Step 302: Determine the time slot interval according to the frame waiting time.

[0064] In an embodiment of the present application, the present application determines the time slot interval for each RFID card that has a secondary conflict to wait for a response in turn based on the frame waiting time, for example, 600 microseconds, 604 microseconds or 606 microseconds, or it can be the time interval for an RFID card with a second time slot value r of 1 to respond to a SELECT instruction sent by a card reader.

[0065] Step 303: Determine the time slot waiting time corresponding to each RFID card according to the second time slot value r randomly generated by each RFID card and the time slot interval time.

[0066] In an embodiment of the present application, each RFID card obtains the time slot waiting time that each RFID card needs to wait in secondary anti-collision by calculation according to the second time slot value r and the time slot interval time randomly generated by each RFID card.

[0067] Step 304: Determine the target response time corresponding to each RFID card according to the frame waiting time and the time slot waiting time corresponding to each RFID card.

[0068] In an embodiment of the present application, the target response time corresponding to each RFID card is determined by the following formula:

[0069] T1=T2+T3;

[0070] T3 = T4 r;

[0071] T4 = λT2;

[0072] Among them, T1 is the target response time, T2 is the frame waiting time, such as 302us, T3 is the time slot waiting time, T4 is the time slot interval time, r is the second time slot value, and λ is a preset coefficient, such as 1 or 2 or 3.

[0073] Therefore, when T2 is 302us and λ is 2, the above formula can be expressed as:

[0074] T1=302us+604us*r.

[0075] Specifically, combined Figure 4 As shown, in the case of a secondary conflict between RFID card A, RFID card B and RFID card C, the card reader sends a REQ instruction containing a first time slot value n of 4, and the card reader calculates 4 response times according to the above formula (when n=0, the response time is set to 302us, when n=1, the response time is 302us+604us, and so on). At the same time, the three RFID cards respectively calculate their corresponding target response times according to their random second time slot values ​​r. For example, if the second time slot value r of RFID card A is 1, RFID card A will respond at 302us+1*604us; if the second time slot value r of RFID card B is 2, RFID card B will respond at 302us+2*604us; if the second time slot value r of RFID card C is 3, RFID card C will respond at 302us+3*604us.

[0076] In this way, it is possible to effectively avoid the situation where multiple rounds of anti-collision actions are performed multiple times when a secondary conflict occurs, thereby reducing the uncertainty caused by data superposition and the redundancy of multiple anti-collision actions.

[0077] Optional, combined Figure 5 As shown, the obtaining and responding to the SELECT instruction sent by the card reader includes:

[0078] Step 501: Obtain the SELECT instruction sent by the card reader at the target response time.

[0079] Step 502: According to the PUPI instruction included in the SELECT instruction, determine whether the PUPI instruction matches the unique card identity identifier of the card itself.

[0080] Step 503: When it is determined that the PUPI instruction matches the unique card identity identifier of the card itself, an ATQ instruction is sent to the card reader.

[0081] In an embodiment of the present application, after the RFID card of the present application obtains the SELECT instruction sent by the card reader at the target response time, the PUPI instruction contained in the SELECT instruction is matched with its own card unique identity, wherein the format of the PUPI instruction is defined as:

[0082] PUPI CRC 4Bytes 2Bytes

[0083] Among them, PUPI represents the card unique identity, and CRC represents the check value.

[0084] When the RFID card determines that the PUPI instruction matches its own card unique identity, it will immediately respond by sending an ATQ instruction to the card reader. If it does not match, it will continue to wait for the card reader to send a new REQ instruction.

[0085] In this way, the present application adds an identity recognition process of the RFID card according to the REQ instruction before replying to the REQ instruction, thereby avoiding the situation where the RFID card has an identification error in the secondary conflict.

[0086] Optionally, an embodiment of the present disclosure provides a contactless communication anti-collision method, which is applied to at least two radio frequency identification cards, and further includes:

[0087] When the second slot value R is equal to the first slot value N in the Slot-Marker instruction sent by the card reader, and the first time slot value n is equal to 1, the SELECT instruction sent by the card reader is directly obtained and responded to.

[0088] In an embodiment of the present application, when the second slot value R of the RFID card is equal to the first slot value N in the Slot-Marker instruction sent by the card reader, it means that the RFID card randomly received the second slot value R needs to respond. At this time, if the first time slot value n is equal to 1, it indicates that there is no secondary conflict, and the RFID card can directly obtain and respond to the SELECT instruction sent by the card reader.

[0089] Combination Figure 6As shown, an embodiment of the present disclosure provides an anti-collision method for contactless communication, which is applied to a card reader, wherein the card reader is contactlessly connected to a radio frequency identification card through an ISO-14443 Type B protocol, and the method includes:

[0090] Step 601: When a conflict is detected, a REQ instruction is sent to at least two RFID cards where the conflict occurs, wherein the REQ instruction includes a first slot value N and a first time slot value n.

[0091] In an embodiment of the present application, when the card reader detects a conflict, the card reader resends a REQ instruction to at least two RFID cards in conflict, wherein the REQ instruction includes a first slot value N and a first time slot value n, and N and n are positive integers greater than or equal to 1 and less than or equal to 16. The format of the REQ instruction is defined as:

[0092] APf AFI PARAM n CRC 1 Byte 1 Byte 1 Byte 1 Byte 2Byte

[0093] Among them, APf (Anticollision Prefix) represents the anti-collision detection prefix, AFI represents the application family identifier, which is used to pre-select RFID cards that meet the application, PARAM represents the configuration parameters, and the high 4 bits of this byte are the first slot value N, which means the maximum number of RFID cards that can be selected.

[0094] Meanwhile, it should be noted that, when the card reader detects that there is a conflict, the first slot value N and the first time slot value n may both be set to 0.

[0095] Step 602: Determine n response times according to the first time slot value n and the frame waiting time, wherein the value of n is greater than or equal to the number of conflicting RFID cards.

[0096] In an embodiment of the present application, the card reader determines n response times based on the first time slot value n in the REQ instruction and the frame waiting time, i.e., the maximum time the card reader waits for the RFID card to reply, such as 300 microseconds, 302 microseconds or 304 microseconds. For example, each response time can be calculated by the formula 302us+n*604us.

[0097] Step 603: When the first slot value N is not equal to 1, a Slot-Marker instruction is sent to the at least two RFID cards in each time slot to determine the RFID card corresponding to the current time slot.

[0098] In an embodiment of the present application, when the first slot value N in the REQ instruction is not equal to 1, the card reader needs to match the time slot according to the first slot value N through the Slot-Marker instruction to determine the RFID card corresponding to the current time slot. The format of the Slot-Marker instruction is defined as:

[0099] Apn n CRC 1 Byte 1 Byte 2Bytes

[0100] Among them, Apn (Anticollision Prefix n) represents the anti-collision detection prefix, the high 4 bits of the byte are the first slot value N, the first time slot value n is used to redefine the response time so that the RFID card can reply in time, and CRC represents the check value.

[0101] Step 604: When the first time slot value n is not equal to 1, according to the n response times, a SELECT instruction is sent to the corresponding RFID card at each response time.

[0102] In an embodiment of the present application, when the first time slot value n is not equal to 1, it indicates that there is a secondary conflict. The card reader needs to send a SELECT instruction to the corresponding RFID card at each response time based on the calculated n response times, so that each RFID card can receive the SELECT instruction and reply to the ATQ instruction when the target response time is calculated according to its second time slot value r.

[0103] By adopting the contactless communication anti-collision method provided by the embodiment of the present disclosure, by adding the first time slot value n in the REQ instruction sent by the card reader as the time parameter of the radio frequency identification card, when the R value randomly obtained by the radio frequency identification card is the same, the second time slot value r and the frame waiting time randomly generated according to the first time slot value n are used to obtain the target response time of each radio frequency identification card when the secondary collision occurs, thereby avoiding multiple rounds of anti-collision actions, reducing the number of questions and answers between the reader and the radio frequency identification card, and improving the success rate of one-time anti-collision completion and the efficiency of communication.

[0104] Optional, combined Figure 7 As shown, sending a SELECT instruction to the corresponding RFID card at each response time includes:

[0105] Step 701: Generate a PUPI instruction according to the card unique identity identifier of the RFID card corresponding to the current response time.

[0106] Step 702: Generate a SELECT instruction including the PUPI instruction and send it to the RFID card corresponding to the current response time.

[0107] Step 703: within the frame waiting time, obtaining the ATQ instruction sent by the RFID card corresponding to the current response time.

[0108] In an embodiment of the present application, the card reader of the present application generates a SELECT instruction according to the card unique identity identifier of the radio frequency identification card corresponding to the current response time, and the SELECT instruction includes a PUPI instruction, wherein the format of the PUPI instruction is defined as:

[0109] PUPI CRC 4Bytes 2Bytes

[0110] Among them, PUPI represents the card unique identity, and CRC represents the check value.

[0111] The card reader will send the SELECT instruction containing the PUPI instruction to the RFID card corresponding to the current response time. After the RFID card obtains the SELECT instruction sent by the card reader at the corresponding response time, it matches the PUPI instruction contained in the SELECT instruction with its own card unique identity. If they match, the RFID card will immediately respond and send the ATQ instruction to the card reader. If they do not match, it will continue to wait for the card reader to send a new REQ instruction.

[0112] In practical applications, such as Figure 8 As shown, the embodiment of the present disclosure provides an anti-collision method for contactless communication, including:

[0113] Step 801: When a conflict is detected, the card reader sends a REQ instruction to at least two RFID cards in conflict, wherein the REQ instruction includes a first slot value N and a first time slot value n, and N and n are positive integers greater than or equal to 1 and less than or equal to 16.

[0114] Step 802: The RFID card determines whether the AFI parameter in the REQ instruction matches; if so, execute step 803; if not, continue to wait for the REQ instruction.

[0115] Step 803: The RFID card determines whether the value N of the first slot is 1; if so, execute step 806; if not, execute step 804.

[0116] Step 804: According to the first slot value N and the first time slot value n, randomly generate a corresponding second slot value R and a second time slot value r, wherein R and r are positive integers greater than or equal to 1 and less than or equal to 16.

[0117] Step 805: The card reader sends a Slot-Marker instruction to the at least two RFID cards in each time slot, so that the second slot value R of the RFID card is equal to the first slot value N in the Slot-Marker instruction sent by the card reader, so as to determine the RFID card corresponding to the current time slot.

[0118] Step 806: Determine whether the RFID card corresponding to the current time slot determines whether the second time slot value r is 1; if so, execute step 808; if not, execute step 807.

[0119] Step 807: The RFID card determines the target response time corresponding to each RFID card according to the second time slot value r randomly generated by each RFID card.

[0120] Step 808: The RFID card obtains the SELECT instruction sent by the card reader at the target response time.

[0121] Step 809: According to the PUPI instruction included in the SELECT instruction, determine whether the PUPI instruction matches the unique card identity identifier of the card; if so, execute step 810; if not, continue to wait for the REQ instruction.

[0122] Step 810: The RFID card sends an ATQ command to the card reader.

[0123] By adopting the contactless communication anti-collision method provided by the embodiment of the present disclosure, by adding the first time slot value n in the REQ instruction sent by the card reader as the time parameter of the radio frequency identification card, when the R value randomly obtained by the radio frequency identification card is the same, the second time slot value r and the frame waiting time randomly generated according to the first time slot value n are used to obtain the target response time of each radio frequency identification card when the secondary collision occurs, thereby avoiding multiple rounds of anti-collision actions, reducing the number of questions and answers between the reader and the radio frequency identification card, and improving the success rate of one-time anti-collision completion and the efficiency of communication.

[0124] Combination Fig. 9 As shown, an embodiment of the present disclosure provides a radio frequency identification card, including one or more processors and an interface; the interface is used to receive code instructions and transmit the code instructions to the processor, and the processor is used to run the code instructions to execute the anti-collision method for contactless communication as described in the present application.

[0125] Optionally, the radio frequency identification card is specifically configured as:

[0126] Determine the frame waiting time of the RFID card according to the maximum time the card reader waits for the RFID card to reply during the anti-collision process of the ISO-14443 Type B protocol;

[0127] Determining a time slot interval time according to the frame waiting time;

[0128] Determine the time slot waiting time corresponding to each RFID card according to the second time slot value r and the time slot interval time randomly generated by each RFID card;

[0129] The target response time corresponding to each RFID card is determined according to the frame waiting time and the time slot waiting time corresponding to each RFID card.

[0130] Optionally, the radio frequency identification card is specifically configured as:

[0131] Get the SELECT command sent by the card reader at the target response time;

[0132] According to the PUPI instruction contained in the SELECT instruction, determining whether the PUPI instruction matches the unique identity identifier of the card itself;

[0133] When it is determined that the PUPI instruction matches the unique identification of its own card, an ATQ instruction is sent to the card reader.

[0134] Optionally, the radio frequency identification card is further configured as:

[0135] When the second slot value R is equal to the first slot value N in the Slot-Marker instruction sent by the card reader, and the first time slot value n is equal to 1, the SELECT instruction sent by the card reader is directly obtained and responded to.

[0136] Combination Fig. 9 As shown, an embodiment of the present disclosure provides a card reader, which supports the ISO-14443 Type B protocol, and includes a memory, an NFC chip, and one or more processors; the memory is coupled to the one or more processors, and the memory is used to store computer program code, and the computer program code includes computer instructions, and the one or more processors call the computer instructions to execute the contactless communication anti-collision method as described in the present application.

[0137] Optionally, the card reader is specifically configured as:

[0138] Generate a PUPI instruction according to the card unique identity identifier of the radio frequency identification card corresponding to the current response time;

[0139] Generate a SELECT instruction including the PUPI instruction and send it to the RFID card corresponding to the current response time;

[0140] During the frame waiting time, an ATQ instruction sent by the radio frequency identification card corresponding to the current response time is obtained.

[0141] Combination Fig. 9 As shown, an embodiment of the present disclosure provides a contactless communication system, including a radio frequency identification card and a card reader as described in the present application, wherein the radio frequency identification card is connected to the card reader in contactless communication via the ISO-14443 Type B protocol.

[0142] An embodiment of the present disclosure provides a storage medium storing computer executable instructions, wherein the computer executable instructions are configured to execute the above-mentioned anti-collision method for contactless communication.

[0143] The above-mentioned storage medium may be a transient computer-readable storage medium or a non-transitory computer-readable storage medium.

[0144] The technical solution of the embodiment of the present disclosure can be embodied in the form of a software product, which is stored in a storage medium and includes one or more instructions for enabling a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in the embodiment of the present disclosure. The aforementioned storage medium may be a non-transient storage medium, including: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes, or a transient storage medium.

[0145] The above description and the accompanying drawings fully illustrate the embodiments of the present disclosure so that those skilled in the art can practice them. Other embodiments may include structural, logical, electrical, process and other changes. The embodiments represent only possible changes. Unless explicitly required, separate components and functions are optional, and the order of operation may vary. The parts and features of some embodiments may be included in or replace the parts and features of other embodiments. Moreover, the words used in this application are only used to describe the embodiments and are not used to limit the claims. As used in the description of the embodiments and the claims, unless the context clearly indicates, the singular forms of "a", "an" and "the" are intended to include plural forms as well. Similarly, the term "and / or" as used in this application refers to any and all possible combinations of listings containing one or more associated ones. In addition, when used in the present application, the term "comprise" and its variants "comprises" and / or comprising refer to the presence of stated features, wholes, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or groups thereof. In the absence of further restrictions, the elements defined by the sentence "comprising a ..." do not exclude the presence of other identical elements in the process, method or device comprising the elements. In this article, each embodiment may focus on the differences from other embodiments, and the same and similar parts between the various embodiments may refer to each other. For the methods, products, etc. disclosed in the embodiments, if they correspond to the method part disclosed in the embodiments, then the relevant parts can refer to the description of the method part.

[0146] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software may depend on the specific application and design constraints of the technical solution. The technicians may use different methods for each specific application to implement the described functions, but such implementations should not be considered to exceed the scope of the embodiments of the present disclosure. The technicians may clearly understand that, for the convenience and simplicity of description, the specific working processes of the systems, devices and units described above may refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here.

[0147] In the embodiments disclosed herein, the disclosed methods and products (including but not limited to devices, equipment, etc.) can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units can be only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between each other shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms. The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to implement this embodiment. In addition, each functional unit in the embodiment of the present disclosure may be integrated in a processing unit, or each unit may exist physically alone, or two or more units may be integrated in one unit.

[0148] The flowchart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to the embodiment of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of the code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. In some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, which can depend on the functions involved. In the description corresponding to the flowchart and the block diagram in the accompanying drawings, the operations or steps corresponding to different boxes can also occur in a different order from the order disclosed in the description, and sometimes there is no specific order between different operations or steps. For example, two consecutive operations or steps can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, which can depend on the functions involved. Each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented by a dedicated hardware-based system that performs the specified functions or actions, or may be implemented by a combination of dedicated hardware and computer instructions.

Claims

1. A contactless communication anti-collision method, applied to at least two radio frequency identification cards, wherein the radio frequency identification cards are contactlessly connected to a card reader via the ISO-14443 Type B protocol, characterized in that: The method comprises: When the card reader detects a conflict, obtaining a REQ instruction sent by the card reader, wherein the REQ instruction includes a first slot value N and a first time slot value n, where N and n are positive integers greater than or equal to 1 and less than or equal to 16; According to the first slot value N and the first time slot value n, randomly generate a corresponding second slot value R and a second time slot value r, wherein R and r are positive integers greater than or equal to 1 and less than or equal to 16; When the second slot value R is equal to the first slot value N in the Slot-Marker instruction sent by the card reader, and the first time slot value n is not equal to 1, determining the target response time corresponding to each RFID card according to the second time slot value r randomly generated by each RFID card; Each RFID card obtains and responds to the SELECT command sent by the card reader at the corresponding target response time; The step of determining the target response time corresponding to each RFID card according to the second time slot value r randomly generated by each RFID card includes: Determine the frame waiting time of the RFID card according to the maximum time the card reader waits for the RFID card to reply during the anti-collision process of the ISO-14443 Type B protocol; Determining a time slot interval time according to the frame waiting time; Determine the time slot waiting time corresponding to each RFID card according to the second time slot value r and the time slot interval time randomly generated by each RFID card; Determine the target response time corresponding to each RFID card according to the frame waiting time and the time slot waiting time corresponding to each RFID card; The target response time for each RFID card is determined by the following formula: T1=T2+T3; T3 = T4 * r; T4 = λ*T2; Among them, T1 is the target response time, T2 is the frame waiting time, T3 is the time slot waiting time, T4 is the time slot interval time, r is the second time slot value, and λ is a preset coefficient.

2. The anti-collision method according to claim 1, characterized in that: The obtaining and responding to the SELECT instruction sent by the card reader includes: Get the SELECT command sent by the card reader at the target response time; According to the PUPI instruction contained in the SELECT instruction, determining whether the PUPI instruction matches the unique identity identifier of the card itself; When it is determined that the PUPI instruction matches the unique identification of its own card, an ATQ instruction is sent to the card reader.

3. The anti-collision method according to claim 1 or 2, characterized in that: Also includes: When the second slot value R is equal to the first slot value N in the Slot-Marker instruction sent by the card reader, and the first time slot value n is equal to 1, the SELECT instruction sent by the card reader is directly obtained and responded to.

4. A radio frequency identification card, characterized in that: The invention comprises one or more processors and an interface; the interface is used to receive code instructions and transmit the code instructions to the processor, and the processor is used to run the code instructions to execute the contactless communication anti-collision method as described in any one of claims 1 to 3.

5. A contactless communication anti-collision method, applied to a card reader, wherein the card reader is contactlessly connected to the radio frequency identification card as claimed in claim 4 via the ISO-14443 Type B protocol, characterized in that: The method comprises: In the case of detecting a conflict, sending a REQ instruction to at least two RFID cards in conflict, wherein the REQ instruction includes a first slot value N and a first time slot value n, and N and n are positive integers greater than or equal to 1 and less than or equal to 16; Determining n response times according to the first time slot value n and the frame waiting time, wherein the value of n is greater than or equal to the number of conflicting RFID cards; When the first slot value N is not equal to 1, sending a Slot-Marker instruction to the at least two RFID cards in each time slot to determine the RFID card corresponding to the current time slot; When the first time slot value n is not equal to 1, a SELECT instruction is sent to the corresponding radio frequency identification card at each response time according to the n response times.

6. The anti-collision method according to claim 5, characterized in that: The sending of a SELECT instruction to the corresponding RFID card at each response time includes: Generate a PU PI instruction according to the card unique identity identifier of the RFID card corresponding to the current response time; Generate a SELECT instruction including the PUPI instruction and send it to the RFID card corresponding to the current response time; During the frame waiting time, an ATQ instruction sent by the radio frequency identification card corresponding to the current response time is obtained.

7. A card reader, the card reader supports ISO-14443 Type B protocol, characterized in that: The card reader includes a memory, an NFC chip, and one or more processors; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors call the computer instructions to execute the contactless communication anti-collision method as described in claim 5 or 6.

8. A contactless communication system, characterized in that: It comprises the radio frequency identification card as claimed in claim 4 and the card reader as claimed in claim 7, wherein the radio frequency identification card is connected with the card reader via contactless communication via ISO-14443 Type B protocol.

Citation Information

Patent Citations

  • Method for RF card detection in a contactless system

    CN101176355A

  • Multi-label anti-collision method in high-frequency / ultrahigh-frequency RFID identification system

    CN108446577A