Card conflict processing method and related apparatus
Patent Information
- Application Number
- CN202510625117.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2024-08-14
- Filing Date
- 2024-12-04
- Publication Date
- 2026-08-28
- Estimated Expiration
- 2044-12-04
AI Technical Summary
但是目前PCD模式的NFC装置一般使用面向比特的防冲突机制,例如选择唯一标识符(unique identifier,UID)最小的PICC模式的NFC装置,这样选择的PICC模式的NFC装置具有随机性,很可能并不符合PCD模式的NFC装置的需求和用户需求,导致刷卡体验不佳
[0103]第十二方面,本申请实施例提供了一种计算机程序产品,包括计算机程序,当计算机程序在处理器上运行时,用于实现第二方面、第四方面以及第二方面、第四方面的任意一种实现方式提供的卡冲突处理方法。
Smart Images

Figure CN120658287B_ABST
Abstract
Description
[0001] This application is a divisional application. The original application has the application number 202411777599.X and the original application date is December 4, 2024. The entire contents of the original application are incorporated herein by reference. Technical Field
[0002] This application relates to the field of wireless communication technology, and in particular to a card conflict resolution method and related apparatus. Background Technology
[0003] With the development of wireless communication technology, Near Field Communication (NFC) technology has been widely used. NFC technology evolved from the integration of contactless radio frequency identification (RFID) and interconnection technologies. In NFC technology, NFC-enabled devices can operate in three modes when communicating via NFC: Proximity Coupling Device (PCD) mode (also known as reader mode), Proximity Integrated Circuit Card (PICC) mode (also known as card emulation mode), and Point-to-Point (P2P) mode.
[0004] Currently, PCD-mode NFC devices can generate high-frequency alternating current to create a radio frequency field of a specified frequency. PICC-mode NFC devices entering this field can receive NFC signals broadcast by PCD-mode NFC devices and can choose to send response signals to them. If a PCD-mode NFC device receives a response signal from a PICC-mode NFC device, it can communicate with that PICC-mode NFC device using NFC technology. If a PCD-mode NFC device receives response signals from multiple PICC-mode NFC devices, card conflict occurs. The PCD-mode NFC device can then select one NFC device from these multiple PICC-mode NFC devices through an anti-collision process to conduct NFC communication. However, current PCD-mode NFC devices generally use bit-oriented anti-collision mechanisms, such as selecting the PICC-mode NFC device with the smallest unique identifier (UID). This selection of the PICC-mode NFC device is random and may not meet the needs of PCD-mode NFC devices or users, resulting in a poor card-swiping experience. Summary of the Invention
[0005] This application discloses a card conflict handling method and related apparatus, which can select the correct card emulation PICC mode near-field communication (NFC) device in the event of a card conflict. The selected NFC device meets both the requirements of the card reader's PCD mode NFC device and the user's needs, thereby effectively improving the card swiping experience.
[0006] In a first aspect, this application provides a card conflict resolution method applied to a first NFC device. The method includes: the first NFC device (e.g., in PCD mode, the first NFC device may also be referred to as an NFC card reader) sending (e.g., broadcasting) probe frames to multiple second NFC devices (e.g., in PICC mode), the probe frames indicating that the first NFC device supports a first NFC protocol; upon receiving probe ACK frames sent by multiple second NFC devices (also referred to as in the case of card conflict), the first NFC device sends (e.g., broadcasting) conflict frames to the multiple second NFC devices, wherein the probe ACK frames sent by the second NFC devices indicate that the second NFC device supports the first NFC protocol; then, the first NFC device receives conflict ACK frames sent by multiple second NFC devices, the conflict ACK frames sent by the second NFC devices including card identification information of the second NFC device; based on the card identification information in the conflict ACK frames sent by the multiple second NFC devices, the first NFC device determines a third NFC device from the multiple second NFC devices and performs a first communication with the third NFC device, the first communication being used to execute a card swiping operation of the third NFC device.
[0007] In some examples, the card identification information of the second NFC device includes a card type identifier and a card random number. The card type identifier of the second NFC device indicates the type of the second NFC device, such as indicating that the second NFC device is an active device (e.g., an electronic device like a mobile phone or computer) or an active device (e.g., a physical NFC tag card). Optionally, the card random numbers can be different for different NFC devices.
[0008] In the above method, during the communication process of the first NFC protocol, if the first NFC device receives Probe ACK frames from multiple second NFC devices, indicating a card conflict, the first NFC device can send Conflict frames to the multiple second NFC devices, causing them to return Conflict ACK frames carrying card identification information. The first NFC device can then select the target NFC device (i.e., the third NFC device) for the card swiping transaction based on the card identification information from the multiple second NFC devices, rather than randomly selecting one. The third NFC device chosen by the first NFC device meets the needs of both the first NFC device and the user, improving the card swiping experience.
[0009] In one possible implementation, after receiving multiple ConflictACK frames from second NFC devices and identifying a third NFC device, the first NFC device can send a Pick frame to the third NFC device. This Pick frame carries the card identification information of the third NFC device. Then, the first NFC device receives a Pick ACK frame sent by the third NFC device based on the Pick frame. After receiving the Pick ACK frame from the third NFC device, the first NFC device can conduct a first communication with the third NFC device to execute the card swiping service of the third NFC device.
[0010] In the above method, after the first NFC device identifies the third NFC device, it can send a Pick frame to the third NFC device. The Pick frame carries the card identification information of the third NFC device. Therefore, upon receiving the Pick frame, the third NFC device can determine that it is the target NFC device of the first NFC device and return a corresponding Pick ACK frame to the first NFC device. This allows the third NFC device to obtain the "card selection result" of the first NFC device, facilitating subsequent communication between the first and third NFC devices and achieving greater reliability.
[0011] In one possible implementation, after receiving multiple ConflictACK frames from second NFC devices and identifying a third NFC device, the first NFC device can send a Notify frame to the third NFC device. This Notify frame carries the device characteristic information of the first NFC device. Then, the first NFC device receives a NotifyACK frame sent by the third NFC device based on the Notify frame. After receiving the NotifyACK frame from the third NFC device, the first NFC device can conduct a first communication with the third NFC device to execute the card swiping service of the third NFC device.
[0012] In some examples, the device characteristic information of the first NFC device includes one or more of the following: Service Identifier (SID), Organization Identifier (OUI), and Group Identifier (GID). The SID indicates the type of NFC service supported by the first NFC device, such as access control, keys, transportation, banking, digital currency, digital certificates, codeless payment, electronic tickets, wireless charging, contactless payment, and multi-function cards. The OUI indicates the manufacturer using the first NFC device to provide NFC services. The GID indicates the group to which the NFC services provided by the first NFC device belong.
[0013] In the above method, after the first NFC device identifies the third NFC device, it can send a Notify frame to the third NFC device. The Notify frame carries the device feature information of the first NFC device. Therefore, after receiving the Notify frame, the third NFC device can obtain the service intent of the first NFC device. For example, it can determine the type of NFC service that the first NFC device intends to perform by using the SID in the device feature information, which facilitates the first NFC device and the third NFC device to conduct the first communication in the future and achieves a more reliable result.
[0014] In one possible implementation, the first NFC device determines the target card identifier from the card identifier information of multiple second NFC devices based on a preset rule, and then determines the third NFC device corresponding to the target card identifier from the multiple second NFC devices. The preset rule is set according to user requirements.
[0015] In the above method, the first NFC device can select the target NFC device according to the user's needs, thus ensuring that the third NFC device selected in the event of a card conflict meets the user's needs, further improving the user's card swiping experience.
[0016] In one possible implementation, the card identification information of the second NFC device includes a card type identifier and a card random number. The card type identifier of the second NFC device indicates the type of the second NFC device. Optionally, different second NFC devices may have different card random numbers. The plurality of second NFC devices includes a third NFC device and a fourth NFC device. When the first NFC device determines the third NFC device from the plurality of second NFC devices based on the card identification information, if the card type identifier of the third NFC device indicates that the third NFC device is an active device, and the card type identifier of the fourth NFC device indicates that the fourth NFC device is a passive device, then the first NFC device determines the third NFC device as an active device from the third and fourth NFC devices.
[0017] In the above methods, most users prefer to use NFC-enabled analog cards from active devices such as mobile phones and watches for card swiping. Therefore, selecting an active third NFC device as the first NFC device for card swiping is more in line with user needs and improves the user's card swiping experience.
[0018] In one possible implementation, the card identification information of the second NFC device includes a card type identifier and a card random number. The card type identifier of the second NFC device indicates the type of the second NFC device. Optionally, different second NFC devices may have different card random numbers. The plurality of second NFC devices includes a third NFC device and a fourth NFC device. When the first NFC device determines the third NFC device from among the multiple second NFC devices based on the card identification information, if the card type identifier of the third NFC device indicates that the third NFC device is a passive device, the card type identifier of the fourth NFC device indicates that the fourth NFC device is a passive device, and the card random number of the third NFC device is less than the card random number of the fourth NFC device, then the first NFC device determines the third NFC device with the smaller card random number from the two NFC devices.
[0019] In the above method, if the third NFC device and the fourth NFC device are of the same type, the first NFC device can select the third NFC device for the card swiping business based on the card's random number, ensuring that the target NFC device is selected normally in the event of a card conflict.
[0020] In one possible implementation, the Probe ACK frame includes an anti-collision random number, and the plurality of second NFC devices include a third NFC device and a fourth NFC device. When the first NFC device receives Probe ACK frames sent by the plurality of second NFC devices, it receives a first Probe ACK frame sent by the third NFC device and a second Probe ACK frame sent by the fourth NFC device, for example, receiving the first Probe ACK frame and the second Probe ACK frame simultaneously. The first Probe ACK frame includes a first anti-collision random number, and the second Probe ACK frame includes a second anti-collision random number, the first anti-collision random number being different from the second anti-collision random number. Therefore, for the first Probe ACK frame and the second Probe ACK frame received simultaneously, the first NFC device determines, based on the different first and second anti-collision random numbers, that the third NFC device that sent the first Probe ACK frame and the fourth NFC device that sent the second Probe ACK frame are different.
[0021] In the above method, the Probe ACK frame sent by the second NFC device includes the anti-collision random number of the second NFC device. Different NFC devices have different anti-collision random numbers. Therefore, even if the first NFC device receives multiple Probe ACK frames at the same time, the number of NFC devices that sent these multiple Probe ACK frames can be determined according to the anti-collision random number, avoiding communication abnormalities caused by the first NFC device misidentifying card collision scenarios, and the fault tolerance rate is higher.
[0022] In one possible implementation, the Conflict frame includes a waiting time slot, which is the number of time slots S included in a first time period preset by the first NFC device. The first time period is the time period during which the first NFC device receives the Conflict ACK frame, and S is a positive integer. The first NFC device receives Conflict ACK frames sent by multiple second NFC devices in multiple time slots in the first time period, and these multiple time slots are different time slots among the S time slots in the first time period.
[0023] In the above method, the first NFC device can carry a waiting time slot in the Conflict frame sent to multiple second NFC devices, so that the multiple second NFC devices can send Conflict ACK frames in multiple different time slots according to the waiting time slot. This avoids the situation where the first NFC device cannot receive Conflict ACK frames sent by two or more second NFC devices in the same time slot, or even cannot recognize them properly, thereby increasing the fault tolerance rate of card conflict handling.
[0024] In one possible implementation, when multiple second NFC devices and a fifth NFC device enter the radio frequency field of the first NFC device, the first NFC device sends Probe frames to the multiple second NFC devices and the fifth NFC device. Since the multiple second NFC devices support the first NFC protocol, while the fifth NFC device does not, the first NFC device receives ProbeACK frames from the multiple second NFC devices but does not receive a ProbeACK frame from the fifth NFC device. The first NFC device can then perform a card conflict resolution process using the first NFC protocol with the multiple second NFC devices and determine the third NFC device from among the multiple second NFC devices to perform the card swiping transaction.
[0025] In one possible implementation, the multiple second NFC devices include a sixth NFC device and a seventh NFC device. The sixth NFC device is an active device (e.g., a mobile phone, watch, or other electronic device) that supports both the first and second NFC protocols. The seventh NFC device is a passive device (e.g., a physical NFC tag card) that supports the first NFC protocol but not the second NFC protocol. The second NFC protocol is the contactless card standard ISO 14443 or IEC 14443. When the multiple second NFC devices (including the sixth and seventh NFC devices) enter the radio frequency field of the first NFC device, the first NFC device can send a request command for the second NFC protocol to the multiple second NFC devices. Since the passive seventh NFC device does not support the second NFC protocol, the first NFC device does not receive the request response command for the second NFC protocol sent by the seventh NFC device. While the active sixth NFC device supports the second NFC protocol, it can choose not to return a request response command to the first NFC device in an attempt to communicate with the first NFC device via the first NFC protocol. Therefore, the first NFC device does not receive the request response command for the second NFC protocol sent by the sixth NFC device. Therefore, the first NFC device subsequently sends Probe frames of the first NFC protocol to multiple second NFC devices (including the sixth and seventh NFC devices), and then receives ProbeACK frames sent by multiple second NFC devices.
[0026] In some examples, the first NFC device may alternately send request commands of the second NFC protocol (which may be referred to as polling of the second NFC protocol) and Probe frames of the first NFC protocol (which may be referred to as polling of the first NFC protocol).
[0027] In the above method, although the active sixth NFC device supports both the first and second NFC protocols, it can choose not to respond to the request commands of the second NFC protocol, but instead respond to the probe frames of the first NFC protocol to participate in the communication of the first NFC protocol. The first NFC device can perform the card conflict resolution process of the first NFC protocol with the sixth NFC device and other NFC devices, and select the target NFC device that meets the requirements from multiple NFC devices, thereby improving the card swiping experience.
[0028] In one possible implementation, the third NFC device is a passive device (e.g., a physical NFC tag card) that supports the first NFC protocol but does not support the second NFC protocol. The second NFC protocol is the contactless card standard ISO14443 or IEC14443. When the first NFC device and the third NFC device conduct the first communication, if the third NFC device is not the NFC device required by the first NFC device, for example, if the first NFC device fails to verify the card information of the third NFC device, the first NFC device determines that the card swiping operation of the third NFC device has failed based on the first communication. Then, the first NFC device sends a request command for the second NFC protocol to the eighth NFC device (which supports the second NFC protocol) and receives a request response command for the second NFC protocol sent by the eighth NFC device. The first NFC device and the eighth NFC device conduct a second communication using the second NFC protocol, which is used to execute the card swiping operation of the eighth NFC device.
[0029] In the above method, if the card swiping service of the third NFC device fails during the first communication between the first NFC device and the passive third NFC device, the first NFC device can switch to the second NFC protocol to perform the card swiping service of the NFC device that supports the second NFC protocol.
[0030] In one possible implementation, the third NFC device is an active device (e.g., a mobile phone, watch, or other electronic device) supporting both the first and second NFC protocols. The second NFC protocol is the contactless card standard ISO14443 or IEC14443. During the first communication between the first and third NFC devices, if the third NFC device does not include an NFC emulator card supporting the first NFC protocol required by the first NFC device (e.g., the first NFC device fails to verify the card information of the NFC emulator card (supporting the first NFC protocol) sent by the third NFC device), the first NFC device determines that the card swiping operation of the third NFC device has failed based on the first communication. Then, the first NFC device sends a request command for the second NFC protocol to the ninth NFC device (supporting the second NFC protocol) and the third NFC device, and receives request response commands for the second NFC protocol sent by the third and ninth NFC devices respectively. The first NFC device determines a tenth NFC device from the third and ninth NFC devices; the tenth NFC device is either the third or the ninth NFC device. The first NFC device and the tenth NFC device then perform a third communication using the second NFC protocol, which is used to execute the card swiping operation of the tenth NFC device.
[0031] In the above method, if the card-swiping service of the third NFC device fails during the first communication between the first NFC device and the active third NFC device, the first NFC device can switch to the second NFC protocol, and the third NFC device can continue to participate in the communication of the second NFC protocol. The first NFC device can perform the card conflict handling process of the second NFC protocol with the third NFC device and the ninth NFC device, and the third NFC device can attempt to perform the card-swiping service of the NFC simulated card of the second NFC protocol in the third NFC device, thereby improving the card-swiping effect of the third NFC device.
[0032] Secondly, this application provides a card conflict resolution method applied to a second NFC device. The method includes: the second NFC device (e.g., in PICC mode) receiving a conflict frame sent (e.g., broadcast) by a first NFC device (e.g., in PCD mode, the first NFC device may also be referred to as an NFC card reader); the second NFC device sending a conflict ACK frame to the first NFC device, the conflict ACK frame including card identification information of the second NFC device. The card identification information of the second NFC device is used to assist the first NFC device in identifying a third NFC device; when the third NFC device is the second NFC device, the second NFC device and the first NFC device perform a first communication, the first communication being used to execute a card swiping transaction by the second NFC device.
[0033] In some examples, the card identification information of the second NFC device includes a card type identifier and a card random number. The card type identifier of the second NFC device indicates the type of the second NFC device, such as indicating that the second NFC device is an active device (e.g., an electronic device like a mobile phone or computer) or an active device (e.g., a physical NFC tag card). Optionally, the card random numbers can be different for different NFC devices.
[0034] In some examples, a Conflict frame is sent when a first NFC device receives a ProbeACK frame from multiple NFC devices (e.g., in PICC mode, including a second NFC device) (a situation that may be referred to as a card conflict). After receiving the Probe frame sent by the first NFC device (indicating that the first NFC device supports the first NFC protocol), the multiple NFC devices send a ProbeACK frame to the first NFC device. In this case, the second NFC device sends a ProbeACK frame to the first NFC device after receiving the Probe frame sent by the first NFC device (indicating that the second NFC device supports the first NFC protocol).
[0035] In some examples, the card identification information of the second NFC device is used to assist the first NFC device in identifying the third NFC device. Specifically, in the event of a card conflict, when the first NFC device receives Conflict ACK frames (including the card identification information of the NFC devices) from multiple NFC devices (e.g., in PICC mode, including the second NFC device), the first NFC device can identify the third NFC device (which may or may not be the second NFC device) from among these multiple NFC devices based on their card identification information. When the first NFC device only receives Conflict ACK frames from the second NFC device, for example, due to a malfunction or other abnormal situation involving other NFC devices, the first NFC device can identify the third NFC device as the second NFC device based on its card identification information.
[0036] In the above method, after the second NFC device receives the Conflict frame sent by the first NFC device in the event of a card conflict, it can return a Conflict ACK frame. This allows the first NFC device to determine the target NFC device (i.e., the third NFC device) from among the multiple PICC mode NFC devices that are in conflict, based on the card identification information of the second NFC device in the Conflict ACK frame. The third NFC device selected by the first NFC device meets the needs of both the first NFC device and the user, thus improving the card swiping experience.
[0037] In one possible implementation, when the third NFC device is the second NFC device, after the second NFC device sends a Conflict ACK frame to the first NFC device, it receives a Pick frame sent by the first NFC device, which carries the card identification information of the third NFC device; then the second NFC device sends a Pick ACK frame to the first NFC device. Subsequently, the second NFC device (i.e., the third NFC device) and the first NFC device conduct a first communication to execute the card swiping service of the third NFC device.
[0038] In the above method, after the first NFC device identifies the third NFC device, it can send a Pick frame to the third NFC device. The Pick frame carries the card identification information of the third NFC device. Therefore, upon receiving the Pick frame, the third NFC device can determine that it is the target NFC device of the first NFC device and return a corresponding Pick ACK frame to the first NFC device. This allows the third NFC device to obtain the "card selection result" of the first NFC device, facilitating subsequent communication between the first and third NFC devices and achieving greater reliability.
[0039] In one possible implementation, when the third NFC device is the second NFC device, after the second NFC device sends a Conflict ACK frame to the first NFC device, it receives a Notify frame from the first NFC device, which carries the device characteristic information of the first NFC device; then, the second NFC device sends a NotifyACK frame to the first NFC device. Subsequently, the second NFC device (i.e., the third NFC device) and the first NFC device conduct a first communication to execute the card swiping service of the third NFC device.
[0040] In some examples, the device characteristic information of the first NFC device includes one or more of the following: Service Identifier (SID), Organization Identifier (OUI), and Group Identifier (GID). The SID indicates the type of NFC service supported by the first NFC device, such as access control, keys, transportation, banking, digital currency, digital certificates, codeless payment, electronic tickets, wireless charging, contactless payment, and multi-function cards. The OUI indicates the manufacturer using the first NFC device to provide NFC services. The GID indicates the group to which the NFC services provided by the first NFC device belong.
[0041] In the above method, after the first NFC device identifies the third NFC device, it can send a Notify frame to the third NFC device. The Notify frame carries the device feature information of the first NFC device. Therefore, after receiving the Notify frame, the third NFC device can obtain the service intent of the first NFC device. For example, it can determine the type of NFC service that the first NFC device intends to perform by using the SID in the device feature information, which facilitates the first NFC device and the third NFC device to conduct the first communication in the future and achieves a more reliable result.
[0042] In one possible implementation, before the second NFC device receives the Conflict frame sent by the first NFC device, when the second NFC device enters the radio frequency field of the first NFC device, it receives a Probe frame sent by the first NFC device, the Probe frame indicating that the first NFC device supports the first NFC protocol; then the second NFC device sends a ProbeACK frame to the first NFC device, the ProbeACK frame indicating that the second NFC device supports the first NFC protocol.
[0043] In one possible implementation, the second NFC device is an active device (e.g., a mobile phone, watch, or other electronic device) that supports both the first and second NFC protocols. The second NFC protocol is the contactless card standard ISO 14443 or IEC 14443. Before the second NFC device receives the Conflict frame sent by the first NFC device, when the second NFC device enters the radio frequency field of the first NFC device, the second NFC device receives a request command for the second NFC protocol sent by the first NFC device. Although the second NFC device supports the second NFC protocol, it can choose not to return a request response command for the second NFC protocol to the first NFC device after receiving the request command, but instead continue to monitor the polling commands sent by the first NFC device. Then, the second NFC device receives a Probe frame for the first NFC protocol sent by the first NFC device. The Probe frame indicates that the first NFC device supports the first NFC protocol. At this time, the second NFC device sends a ProbeACK frame for the first NFC protocol to the first NFC device in an attempt to communicate with the first NFC device through the first NFC protocol. This ProbeACK frame indicates that the second NFC device supports the first NFC protocol.
[0044] In some examples, the first NFC device may alternately send request commands of the second NFC protocol (which may be referred to as polling of the second NFC protocol) and probe frames of the first NFC protocol (which may be referred to as polling of the first NFC protocol).
[0045] In the above method, although the active second NFC device supports both the first and second NFC protocols, it can choose not to respond to the request commands of the second NFC protocol, but instead respond to the probe frames of the first NFC protocol to participate in the communication of the first NFC protocol. Therefore, in the event of a card conflict between the second NFC device and other NFC devices, the first NFC device can perform the card conflict handling process of the first NFC protocol instead of the card conflict handling process of the second NFC protocol, thereby ensuring that the first NFC device selects the target NFC device that meets the requirements and improving the card swiping experience.
[0046] In one possible implementation, the second NFC device is an active device (e.g., a mobile phone, watch, or other electronic device) that supports both the first and second NFC protocols. The second NFC protocol is the contactless card standard ISO14443 or IEC14443. The third NFC device is the second NFC device. When the second NFC device (i.e., the third NFC device) and the first NFC device conduct the first communication, if the second NFC device does not include an NFC emulator card that supports the first NFC protocol required by the first NFC device (e.g., the first NFC device fails to verify the card information of the NFC emulator card (supporting the first NFC protocol) sent by the second NFC device), the second NFC device determines that the card swiping operation of the second NFC device has failed based on the first communication. Then, the second NFC device receives a request command for the second NFC protocol sent by the first NFC device. At this time, the second NFC device sends a request response command for the second NFC protocol to the first NFC device. When the target NFC device selected by the first NFC device based on the second NFC protocol is the second NFC device, the second NFC device and the first NFC device conduct a second communication using the second NFC protocol. The second communication is used to execute the card swiping operation of the second NFC device.
[0047] In the above method, if the card swiping service of the second NFC device fails during the first communication between the second NFC device and the first NFC device, the first NFC device can switch to the second NFC protocol. The active second NFC device can continue to participate in the communication of the second NFC protocol in order to attempt to perform the card swiping service of the NFC analog card that supports the second NFC protocol in the second NFC device, thereby effectively improving the card swiping effect of the second NFC device.
[0048] Thirdly, this application provides another card conflict handling method applied to a first NFC device. The method includes: the first NFC device (e.g., in PCD mode, the first NFC device can also be referred to as an NFC card reader) sending (e.g., broadcasting) probe frames to multiple second NFC devices (e.g., in PICC mode), the probe frames indicating that the first NFC device supports the first NFC protocol; when the first NFC device receives probe ACK frames sent by multiple second NFC devices (also referred to as a card conflict situation), the first NFC device sends (e.g., broadcasting) conflict frames to the multiple second NFC devices, wherein the probe ACK frames sent by the second NFC devices indicate that the second NFC device supports the first NFC protocol, and the conflict frames include device characteristic information of the first NFC device; the first NFC device receives the conflict ACK frames sent by the multiple second NFC devices. The ACK frame, a conflict confirmation frame sent by the second NFC device, includes the matching result of the device feature information of the second NFC device and the first NFC device; the first NFC device determines the third NFC device from the multiple second NFC devices based on the conflict confirmation frames sent by the multiple second NFC devices, and performs a first communication with the third NFC device. The first communication is used to execute the card swiping service of the third NFC device, wherein the matching result in the conflict confirmation frame sent by the third NFC device indicates that the device feature information of the third NFC device and the first NFC device are successfully matched.
[0049] In some examples, the device characteristic information of the first NFC device includes the Service Identifier (SID), the Organization Identifier (OUI), and the Group Identifier (GID). The SID indicates the type of NFC service supported by the first NFC device, such as access control, keys, transportation, banking, digital currency, digital certificates, codeless payment, electronic tickets, wireless charging, contactless payment, and multi-function cards. The OUI indicates the manufacturer using the first NFC device to provide NFC services. The GID indicates the group to which the NFC services provided by the first NFC device belong.
[0050] In the above method, in the event of a card conflict, the first NFC device can send conflict frames (carrying the device feature information of the first NFC device) to multiple second NFC devices, so that the multiple second NFC devices can return conflict confirmation frames (carrying the matching results of the device feature information of the second NFC device and the first NFC device). Furthermore, the first NFC device can select the target NFC device (i.e., the third NFC device) for the card swiping transaction from among the multiple second NFC devices based on the conflict confirmation frames returned by the multiple second NFC devices, instead of randomly selecting an NFC device for the card swiping transaction. In this way, the selected third NFC device meets the needs of the first NFC device and the user, improving the card swiping experience.
[0051] In one possible implementation, the conflict confirmation frame sent by the third NFC device includes a first matching result, which indicates that the device feature information of the third NFC device and the first NFC device has successfully matched. The method further includes: after identifying the third NFC device, the first NFC device sends (e.g., broadcast) a Pick frame to multiple second NFC devices, the Pick frame including the card identification information of the third NFC device; the first NFC device receives a first Pick ACK frame sent by the third NFC device, the first Pick ACK frame including a second matching result, which indicates that the card identification information of the third NFC device in the Pick frame has successfully matched. Therefore, after receiving the first Pick ACK frame, the first NFC device can perform a first communication with the third NFC device to execute the card swiping service of the third NFC device.
[0052] In some examples, the card identification information of the third NFC device includes a card type identifier and a card random number. The card type identifier indicates the type of the third NFC device, such as indicating that the third NFC device is an active device (e.g., an electronic device like a mobile phone or computer) or a passive device (e.g., a physical NFC tag card). The card random number can be different for different NFC devices.
[0053] In the above method, after the first NFC device identifies the third NFC device, it can send a selection frame (carrying the card identification information of the third NFC device) to multiple second NFC devices. Therefore, the third NFC device among the multiple second NFC devices can determine that it is the target NFC device of the first NFC device based on the selection frame, and can subsequently communicate with the first NFC device to perform card swiping transactions. Other NFC devices among the multiple second NFC devices, excluding the third NFC device, can determine that they are not the target NFC device of the first NFC device based on the selection frame, and will not subsequently communicate with the first NFC device. After receiving the selection frame, the third NFC device can return a first selection confirmation frame (carrying a second matching result indicating a successful match) to the first NFC device. Other NFC devices, after receiving the selection frame, may not return a selection confirmation frame to the first NFC device, thus allowing the first NFC device to further determine the third NFC device as the target NFC device, resulting in a higher fault tolerance rate.
[0054] In one possible implementation, the plurality of second NFC devices include a third NFC device and a fourth NFC device. The conflict confirmation frame sent by the fourth NFC device includes a third matching result, which is used to indicate that the device feature information of the fourth NFC device and the first NFC device is successfully matched, or the third matching result is used to indicate that the device feature information of the fourth NFC device and the first NFC device fails to match. The method further includes: the first NFC device receiving a second selection confirmation frame sent by the fourth NFC device, the second selection confirmation frame including a fourth matching result, which is used to indicate that the card identification information of the fourth NFC device and the third NFC device in the selection frame fails to match.
[0055] In the above method, a fourth NFC device other than the third NFC device among multiple second NFC devices can determine that its NFC device is not the target NFC device of the first NFC device based on the selection frame, and return a second selection confirmation frame (carrying a fourth matching result indicating a failed match) to the first NFC device to notify the first NFC device of the fourth matching result, thereby allowing the first NFC device to further determine the third NFC device as the target NFC device, which has a higher fault tolerance rate.
[0056] In one possible implementation, when the matching result in the conflict confirmation frame indicates that the device feature information of the second NFC device and the first NFC device are successfully matched, the conflict confirmation frame includes the card identification information of the second NFC device.
[0057] In some examples, the first NFC device can determine the third NFC device from multiple second NFC devices based on the matching results in the conflict confirmation frames sent by multiple second NFC devices, and the card identification information of the second NFC device in the conflict confirmation frames indicating successful matching.
[0058] In one possible implementation, the plurality of second NFC devices include a third NFC device and a fourth NFC device; when the first matching result in the conflict confirmation frame sent by the third NFC device indicates that the device feature information of the third NFC device and the first NFC device are successfully matched, and the third matching result in the conflict confirmation frame sent by the fourth NFC device indicates that the device feature information of the fourth NFC device and the first NFC device are not matched, the first NFC device can determine the third NFC device whose device feature information is successfully matched with the first NFC device from the third NFC device and the fourth NFC device.
[0059] In one possible implementation, the plurality of second NFC devices includes a third NFC device and a fourth NFC device; when the first matching result in the conflict confirmation frame sent by the third NFC device indicates that the device feature information of the third NFC device and the first NFC device are successfully matched, and the third matching result in the conflict confirmation frame sent by the fourth NFC device indicates that the device feature information of the fourth NFC device and the first NFC device are successfully matched, the first NFC device can determine the third NFC device whose card identification information is successfully matched with the target NFC device of the first NFC device from the third NFC device and the fourth NFC device, based on the card identification information of the third NFC device in the conflict confirmation frame sent by the third NFC device and the card identification information of the fourth NFC device in the conflict confirmation frame sent by the fourth NFC device.
[0060] In some examples, the card identification information of the target NFC device of the first NFC device can be determined according to preset rules, which are set according to user requirements.
[0061] In the above method, when both the third NFC device and the fourth NFC device successfully match the device feature information of the first NFC device, the first NFC device can select the third NFC device that successfully matches the card identification information of the target NFC device of the first NFC device. This ensures that the third NFC device selected in the event of a card conflict meets the needs of the first NFC device. The card identification information of the target NFC device of the first NFC device can be determined according to the user's needs. Therefore, it ensures that the third NFC device selected in the event of a card conflict meets the user's needs, further improving the user's card swiping experience.
[0062] In one possible implementation, the card identification information of the second NFC device includes a card type identifier (indicating the device type of the second NFC device) and a card random number; when the first matching result in the conflict confirmation frame sent by the third NFC device indicates that the device feature information of the third NFC device and the first NFC device are successfully matched, and the third matching result in the conflict confirmation frame sent by the fourth NFC device indicates that the device feature information of the fourth NFC device and the first NFC device are successfully matched, if the card type identifier of the third NFC device indicates that the third NFC device is an active device, and the card type identifier of the fourth NFC device indicates that the fourth NFC device is a passive device, then the first NFC device can determine the third NFC device as an active device from the third NFC device and the fourth NFC device.
[0063] In the above methods, most users prefer to use NFC-enabled analog cards from active devices such as mobile phones and watches for card swiping. Therefore, selecting an active third NFC device as the first NFC device for card swiping is more in line with user needs and improves the user's card swiping experience.
[0064] In one possible implementation, when the first matching result in the conflict confirmation frame sent by the third NFC device indicates that the device feature information of the third NFC device and the first NFC device are successfully matched, and the third matching result in the conflict confirmation frame sent by the fourth NFC device indicates that the device feature information of the fourth NFC device and the first NFC device are successfully matched, if the card type identifier of the third NFC device indicates that the third NFC device is a passive device, and the card type identifier of the fourth NFC device indicates that the fourth NFC device is a passive device, or if the card type identifier of the third NFC device indicates that the third NFC device is an active device, and the card type identifier of the fourth NFC device indicates that the fourth NFC device is an active device, then the first NFC device can determine the third NFC device with the smaller card random number from the third NFC device and the fourth NFC device.
[0065] In the above method, when both the third NFC device and the fourth NFC device successfully match the device feature information of the first NFC device, and the device types of the third NFC device and the fourth NFC device are the same, the first NFC device can select the third NFC device to perform the card swiping business based on the card random number, ensuring that the target NFC device is selected normally in the event of card conflict.
[0066] In one possible implementation, the conflict frame includes first information, which is used to instruct the NFC device that receives the conflict frame to provide a matching result of the device feature information of the NFC device and the first NFC device in the conflict frame. The first information is also used to indicate that there are multiple NFC device conflicts in PICC mode (also known as card conflicts).
[0067] In some examples, the first information is 1 byte long, consisting of 8 bits, i.e., bits 0 to 7. The first information in the conflict frame can have a value of 0x07. Specifically, bit 0 in the first information is set to 1, indicating that the NFC device receiving the conflict frame should provide a matching result between its device feature information and that of the first NFC device in the conflict frame. Bit 1 in the first information is set to 1, indicating that a card conflict exists. Bit 2 in the first information is set to 1, indicating that the NFC device receiving the conflict frame should provide its card identification information if it successfully matches the device feature information of the first NFC device in the conflict frame. Bits 3 to 7 in the first information are set to 0.
[0068] In one possible implementation, the selection frame includes second information, which instructs the NFC device receiving the selection frame to provide a matching result between the NFC device and the card identification information of a third NFC device in the selection frame.
[0069] In some examples, the second information is 1 byte long, consisting of 8 bits, i.e., bits 0 to 7. The second information in the selection frame can have a value of 0x04. Specifically, bit 0 in the second information is 0, indicating that the NFC device receiving the selection frame does not report the matching result of its device feature information with the first NFC device. Bit 1 in the second information is 0, indicating that there is no card conflict. Bit 2 in the second information is 1, indicating that the NFC device receiving the selection frame reports the matching result of its card identification information with the third NFC device in the selection frame. Bits 3 to 7 in the first information are 0.
[0070] In one possible implementation, the conflict frame includes a waiting time slot, the waiting time slot being the number S of time slots included in a first time period preset by the first NFC device, where S is a positive integer; the first NFC device can receive multiple conflict confirmation frames sent by the second NFC device in multiple different time slots during the first time period.
[0071] In the above method, the first NFC device can carry a waiting time slot in the conflict frames sent to multiple second NFC devices, so that the multiple second NFC devices can send conflict confirmation frames in multiple different time slots according to the waiting time slot. This avoids the situation where the first NFC device cannot be identified due to receiving conflict confirmation frames sent by two or more second NFC devices in the same time slot, thereby increasing the fault tolerance rate of card conflict handling.
[0072] In one possible implementation, when multiple second NFC devices and a fifth NFC device enter the radio frequency field of the first NFC device, the first NFC device can send probe frames to the multiple second NFC devices and the fifth NFC device. Since the multiple second NFC devices support the first NFC protocol, while the fifth NFC device does not, the first NFC device receives probe confirmation frames from the multiple second NFC devices but does not receive a probe confirmation frame from the fifth NFC device. The first NFC device can then perform a card conflict resolution process with the multiple second NFC devices and determine the third NFC device from among them to conduct the card swiping transaction.
[0073] In one possible implementation, the multiple second NFC devices include a sixth NFC device and a seventh NFC device. The sixth NFC device is an active device that supports both the first and second NFC protocols, while the seventh NFC device is a passive device that supports the first NFC protocol but does not support the second NFC protocol. The second NFC protocol is the contactless card standard ISO 14443 or IEC 14443 protocol. When the multiple second NFC devices (including the sixth and seventh NFC devices) enter the radio frequency field of the first NFC device, the first NFC device can send a request command for the second NFC protocol to the multiple second NFC devices. Since the seventh NFC device does not support the second NFC protocol, the first NFC device does not receive the request response command sent by the seventh NFC device. While the sixth NFC device supports the second NFC protocol, it can choose not to return a request response command to the first NFC device in an attempt to communicate with the first NFC device via the first NFC protocol; therefore, the first NFC device does not receive the request response command sent by the sixth NFC device. Subsequently, the first NFC device sends probe frames of the first NFC protocol to the multiple second NFC devices (including the sixth and seventh NFC devices) and can receive probe confirmation frames sent by the multiple second NFC devices.
[0074] In some examples, the first NFC device may alternately send request commands of the second NFC protocol (which may be referred to as polling of the second NFC protocol) and probe frames of the first NFC protocol (which may be referred to as polling of the first NFC protocol).
[0075] In the above method, the sixth NFC device may not respond to the request command of the second NFC protocol, but instead respond to the probe frame of the first NFC protocol. Therefore, in the event of a card conflict between the sixth NFC device and other NFC devices, the first NFC device may perform the card conflict handling process of the first NFC protocol instead of the card conflict handling process of the second NFC protocol, thereby ensuring that the first NFC device selects the target NFC device that meets the requirements and improving the card swiping experience.
[0076] In one possible implementation, when multiple second NFC devices and an eighth NFC device enter the radio frequency field of the first NFC device, the first NFC device can send a request command for the second NFC protocol to the multiple second NFC devices and the eighth NFC device. Since the eighth NFC device does not support the first NFC protocol but supports the second NFC protocol (i.e., the contactless card standard ISO14443 protocol or IEC14443 protocol), the first NFC device can receive the request response command for the second NFC protocol sent by the eighth NFC device. In this case, the first NFC device can select the eighth NFC device and conduct a second communication with the eighth NFC device using the second NFC protocol. This second communication is used to execute the card swiping service of the eighth NFC device.
[0077] In the above method, when the first NFC device receives only a request response command for the second NFC protocol from the eighth NFC device, it can directly select the eighth NFC device instead of continuing to send probe frames for the first NFC protocol. This avoids the following two situations: First, when there are multiple NFC devices in the radio frequency field of the first NFC device, the first NFC device will perform polling and card conflict handling processes again, resulting in slower card swiping. Second, when there is only the eighth NFC device in the radio frequency field of the first NFC device, the first NFC device will perform at least one more polling before selecting the eighth NFC device, resulting in very slow card swiping, thus improving the user's card swiping experience.
[0078] Fourthly, this application provides another card conflict handling method applied to a second NFC device. The method includes: the second NFC device (e.g., in PICC mode) receiving a conflict frame sent (e.g., broadcast) by a first NFC device (e.g., in PCD mode, the first NFC device may also be referred to as an NFC card reader), the conflict frame including device feature information of the first NFC device; the second NFC device sending a conflict ACK frame to the first NFC device, the conflict ACK frame including a first matching result of the device feature information of the second NFC device and the first NFC device, the first matching result being used to assist the first NFC device in determining a third NFC device; when the third NFC device is the second NFC device, the second NFC device performs a first communication, the first communication being used to execute the card swiping service of the second NFC device, wherein the first matching result is used to indicate that the device feature information of the third NFC device and the first NFC device has been successfully matched.
[0079] In some examples, the device characteristic information of the first NFC device includes the Service Identifier (SID), the Organization Identifier (OUI), and the Group Identifier (GID). The SID indicates the type of NFC service supported by the first NFC device, such as access control, keys, transportation, banking, digital currency, digital certificates, codeless payment, electronic tickets, wireless charging, contactless payment, and multi-function cards. The OUI indicates the manufacturer using the first NFC device to provide NFC services. The GID indicates the group to which the NFC services provided by the first NFC device belong.
[0080] In some examples, the conflict frame is sent when the first NFC device receives probe confirmation frames from multiple NFC devices (e.g., in PICC mode, including the second NFC device) (a situation that may be referred to as a card conflict). After receiving the probe frame sent by the first NFC device (indicating that the first NFC device supports the first NFC protocol), the multiple NFC devices send probe confirmation frames (indicating that the NFC device supports the first NFC protocol) to the first NFC device. In this case, the second NFC device sends a probe confirmation frame (indicating that the second NFC device supports the first NFC protocol) to the first NFC device after receiving the probe frame sent by the first NFC device.
[0081] In some examples, the first matching result is used to assist the first NFC device in identifying the third NFC device. Specifically, in the event of a card conflict, when the first NFC device receives conflict confirmation frames (including matching results of device characteristic information between the NFC devices and the first NFC device) from multiple NFC devices (e.g., in PICC mode, these multiple NFC devices include the second NFC device), the first NFC device can identify the third NFC device from these multiple NFC devices based on the matching results (including the first matching result) in the conflict confirmation frames sent by these multiple NFC devices. When the first NFC device only receives a conflict confirmation frame from the second NFC device, for example, due to a malfunction or other abnormal situation involving other NFC devices, the first NFC device can determine the third NFC device as the second NFC device based on the first matching result.
[0082] In the above method, after the second NFC device receives the conflict frame sent by the first NFC device in the event of a card conflict, it can return a conflict confirmation frame. This allows the first NFC device to determine the target NFC device (i.e., the third NFC device) from among the multiple PICC mode NFC devices that are in conflict, based on the first matching result in the conflict confirmation frame. The selected third NFC device meets the needs of both the first NFC device and the user, thus improving the card swiping experience.
[0083] In one possible implementation, after the second NFC device sends a conflict confirmation frame to the first NFC device, it can receive a pick frame sent by the first NFC device. The pick frame includes the card identification information of the third NFC device. Then, the second NFC device can send a pick ACK frame to the first NFC device. The pick ACK frame includes a second matching result between the card identification information of the second NFC device and the third NFC device in the pick frame. The second matching result is used by the first NFC device to determine whether the second NFC device is the third NFC device.
[0084] In some examples, the card identification information of the third NFC device includes a card type identifier and a card random number. The card type identifier indicates the type of the third NFC device, such as indicating that the third NFC device is an active device (e.g., an electronic device like a mobile phone or computer) or a passive device (e.g., a physical NFC tag card). The card random number can be different for different NFC devices.
[0085] In the above method, the second NFC device can determine itself as the target NFC device of the first NFC device based on the selection frame. Subsequently, it can communicate with the first NFC device to perform card swiping business. Furthermore, the second NFC device can return a selection confirmation frame (carrying a second matching result indicating successful matching) to the first NFC device, thereby allowing the first NFC device to further determine the second NFC device as the target NFC device, resulting in a higher fault tolerance rate.
[0086] In one possible implementation, when the third NFC device is the second NFC device, the first matching result indicates that the device feature information of the second NFC device and the first NFC device are successfully matched, and the second matching result indicates that the card identification information of the second NFC device and the third NFC device are successfully matched; when the third NFC device is not the second NFC device, the second matching result indicates that the card identification information of the second NFC device and the third NFC device is not matched; when the third NFC device is not the second NFC device, the first matching result indicates that the device feature information of the second NFC device and the first NFC device are successfully matched, or the first matching result indicates that the device feature information of the second NFC device and the first NFC device is not matched.
[0087] In one possible implementation, when the first matching result indicates that the device feature information of the second NFC device and the first NFC device are successfully matched, the conflict confirmation frame includes the card identification information of the second NFC device.
[0088] In some examples, the card identification information of the second NFC device in the conflict confirmation frame is used to assist the first NFC device in identifying the third NFC device. Specifically, the first NFC device can identify the third NFC device from at least one NFC device based on the matching result in the conflict confirmation frame sent by at least one NFC device (e.g., in PICC mode, including the second NFC device), and the card identification information of the NFC device in the conflict confirmation frame indicating a successful match.
[0089] In one possible implementation, the conflict frame includes first information, which is used to instruct the NFC device that receives the conflict frame to provide a matching result of the device feature information of the NFC device and the first NFC device in the conflict frame. The first information is also used to indicate that there are multiple NFC device conflicts in PICC mode (also known as card conflicts).
[0090] In some examples, the first information is 1 byte long, consisting of 8 bits, i.e., bits 0 to 7. The first information in the conflict frame can have a value of 0x07. Specifically, bit 0 in the first information is set to 1, indicating that the NFC device receiving the conflict frame should provide a matching result between its device feature information and that of the first NFC device in the conflict frame. Bit 1 in the first information is set to 1, indicating that a card conflict exists. Bit 2 in the first information is set to 1, indicating that the NFC device receiving the conflict frame should provide its card identification information if it successfully matches the device feature information of the first NFC device in the conflict frame. Bits 3 to 7 in the first information are set to 0.
[0091] In one possible implementation, the selection frame includes second information, which instructs the NFC device receiving the selection frame to provide a matching result between the NFC device and the card identification information of a third NFC device in the selection frame.
[0092] In some examples, the second information is 1 byte long, consisting of 8 bits, i.e., bits 0 to 7. The second information in the selection frame can have a value of 0x04. Specifically, bit 0 in the second information is 0, indicating that the NFC device receiving the selection frame does not report the matching result of its device feature information with the first NFC device. Bit 1 in the second information is 0, indicating that there is no card conflict. Bit 2 in the second information is 1, indicating that the NFC device receiving the selection frame reports the matching result of its card identification information with the third NFC device in the selection frame. Bits 3 to 7 in the first information are 0.
[0093] In one possible implementation, the second NFC protocol is an active device (e.g., a mobile phone, watch, or other electronic device) that supports both the first and second NFC protocols. The second NFC protocol is the contactless card standard ISO 14443 or IEC 14443. When the second NFC device enters the radio frequency field of the first NFC device, the second NFC device receives a request command for the second NFC protocol sent by the first NFC device, and then receives a probe frame for the first NFC protocol sent by the first NFC device (indicating that the first NFC device supports the first NFC protocol). The second NFC device can then send a probe confirmation frame for the first NFC protocol to the first NFC device (indicating that the second NFC device supports the first NFC protocol). Although the second NFC device supports the second NFC protocol, it can choose not to return a request-response command to the first NFC device after receiving the request command, but instead continue monitoring and, upon receiving the probe frame, return a probe confirmation frame to the first NFC device in an attempt to communicate with the first NFC device via the first NFC protocol.
[0094] In some examples, the first NFC device may alternately send request commands of the second NFC protocol (which may be referred to as polling of the second NFC protocol) and probe frames of the first NFC protocol (which may be referred to as polling of the first NFC protocol).
[0095] In the above method, the second NFC device may not respond to the request command of the second NFC protocol, but instead respond to the probe frame of the first NFC protocol. Therefore, in the event of a card conflict between the second NFC device and other NFC devices, the first NFC device can perform the card conflict handling process of the first NFC protocol instead of the card conflict handling process of the second NFC protocol, thereby ensuring that the first NFC device selects the target NFC device that meets the requirements and improving the card swiping experience.
[0096] Fifthly, this application provides a communication device, including a transceiver, a processor, and a memory; the memory is used to store a computer program, and the processor calls the computer program to enable the communication device to execute the card conflict handling method provided by the first aspect, the third aspect, and any implementation of the first aspect and the third aspect.
[0097] Sixthly, this application provides yet another communication device, including a transceiver, a processor, and a memory; the memory is used to store a computer program, and the processor calls the computer program for the communication device to execute the card conflict handling method provided by the second aspect, the fourth aspect, and any implementation of the second aspect and the fourth aspect.
[0098] In a seventh aspect, this application provides a communication device including one or more processors and one or more memories. The one or more memories are coupled to the one or more processors, and the one or more memories are used to store computer program code, including computer instructions. When the one or more processors execute the computer instructions, the communication device performs the card conflict handling method provided by the first aspect, the third aspect, and any implementation thereof.
[0099] Eighthly, this application provides a communication device including one or more processors and one or more memories. The one or more memories are coupled to the one or more processors, and the one or more memories are used to store computer program code, including computer instructions. When the one or more processors execute the computer instructions, the communication device performs the card conflict handling method provided by the second aspect, the fourth aspect, and any implementation thereof.
[0100] Ninthly, embodiments of this application provide a computer storage medium including a computer program, which, when executed by a processor, is used to implement the card conflict handling method provided by the first aspect, the third aspect, and any implementation of the first aspect and the third aspect.
[0101] In a tenth aspect, embodiments of this application provide a computer storage medium including a computer program, which, when executed by a processor, is used to implement the card conflict handling method provided by the second aspect, the fourth aspect, and any implementation of the second aspect and the fourth aspect.
[0102] In the eleventh aspect, embodiments of this application provide a computer program product, including a computer program that, when running on a processor, is used to implement the card conflict handling method provided by the first aspect, the third aspect, and any implementation of the first aspect and the third aspect.
[0103] In a twelfth aspect, embodiments of this application provide a computer program product, including a computer program that, when running on a processor, is used to implement the card conflict handling method provided by the second aspect, the fourth aspect, and any implementation of the second aspect and the fourth aspect.
[0104] In a thirteenth aspect, this application provides an electronic device that includes the methods or apparatus described in any aspect or embodiment of this application. The aforementioned electronic device is, for example, a chip.
[0105] It should be understood that the descriptions of technical features, technical solutions, beneficial effects, or similar language in this application do not imply that all features and advantages can be achieved in any single implementation. Rather, it is understood that the description of a feature or beneficial effect means that a specific technical feature, technical solution, or beneficial effect is included in at least one implementation. Therefore, the descriptions of technical features, technical solutions, or beneficial effects in this application do not necessarily refer to the same implementation. Furthermore, the technical features, technical solutions, and beneficial effects described in this application can be combined in any suitable manner. Those skilled in the art will understand that this application can be implemented without one or more specific technical features, technical solutions, or beneficial effects of a particular implementation. In other implementations, additional technical features and beneficial effects may be identified in specific implementations that do not embody all implementations. Attached Figure Description
[0106] The following describes the accompanying drawings used in this application.
[0107] Figure 1 This is a schematic diagram illustrating the working principle of Near Field Communication (NFC) provided in this application;
[0108] Figure 2 This is a schematic diagram of the architecture of an NFC system provided in this application;
[0109] Figure 3 This is a schematic diagram of another NFC system architecture provided in this application;
[0110] Figure 4 This is a schematic diagram of the structure of a passive NFC device provided in this application;
[0111] Figure 5 This is a schematic diagram of the structure of an active NFC device provided in this application;
[0112] Figure 6 This is a schematic diagram of an NFC protocol stack architecture provided in this application;
[0113] Figures 7A-7C These are illustrations of some card conflict scenarios provided in this application;
[0114] Figure 8 This is a flowchart illustrating a card conflict resolution method provided in this application;
[0115] Figure 9 This is a schematic diagram of a notification frame format provided in this application;
[0116] Figure 10 This is a schematic diagram of the format of a notification confirmation frame provided in this application;
[0117] Figure 11This is a flowchart illustrating yet another card conflict resolution method provided in this application;
[0118] Figure 12 This is a schematic diagram of a conflict frame format provided in this application;
[0119] Figure 13 This is a schematic diagram of the format of a conflict confirmation frame provided in this application;
[0120] Figure 14 This is a schematic diagram of a frame selection format provided in this application;
[0121] Figure 15 This is a flowchart illustrating yet another card conflict resolution method provided in this application;
[0122] Figure 16 This is a flowchart illustrating yet another card conflict resolution method provided in this application;
[0123] Figure 17 This is a flowchart illustrating yet another card conflict resolution method provided in this application;
[0124] Figure 18 This is a flowchart illustrating yet another card conflict resolution method provided in this application;
[0125] Figure 19 This is a flowchart illustrating yet another card conflict resolution method provided in this application;
[0126] Figure 20 This is a flowchart illustrating yet another card conflict resolution method provided in this application;
[0127] Figure 21 This is a schematic diagram of a probe frame format provided in this application;
[0128] Figure 22 This is a schematic diagram of the format of a detection confirmation frame provided in this application;
[0129] Figure 23 This is a schematic diagram of another notification frame format provided in this application;
[0130] Figure 24 This is a schematic diagram of another notification confirmation frame format provided in this application;
[0131] Figure 25 This is a flowchart illustrating yet another card conflict resolution method provided in this application;
[0132] Figure 26 This is a schematic diagram of another conflict frame format provided in this application;
[0133] Figure 27 This is a schematic diagram of another conflict confirmation frame format provided in this application;
[0134] Figure 28 This is a schematic diagram of another selection frame format provided in this application;
[0135] Figure 29 This is a schematic diagram of a selection confirmation frame format provided in this application;
[0136] Figure 30 This is a flowchart illustrating yet another card conflict resolution method provided in this application;
[0137] Figure 31 This is a flowchart illustrating yet another card conflict resolution method provided in this application;
[0138] Figure 32 This is a flowchart illustrating yet another card conflict resolution method provided in this application;
[0139] Figure 33 This is a flowchart illustrating yet another card conflict resolution method provided in this application;
[0140] Figure 34 This is a flowchart illustrating yet another card conflict resolution method provided in this application;
[0141] Figure 35 This is a flowchart illustrating yet another card conflict resolution method provided in this application;
[0142] Figure 36 This is a schematic diagram of the hardware structure of an electronic device provided in this application;
[0143] Figures 37-40 These are schematic diagrams of the structures of some communication devices provided in this application. Detailed Implementation
[0144] The technical solutions in the embodiments of this application will now be described with reference to the accompanying drawings. The terminology used in the implementation section of this application is only for explaining specific embodiments of this application and is not intended to limit this application.
[0145] In the description of the embodiments of this application, unless otherwise stated, " / " means "or". For example, A / B can mean A or B. The "and / or" in the text is merely a description of the relationship between related objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist simultaneously, and B exists alone. In addition, in the description of the embodiments of this application, "multiple" means two or more.
[0146] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature, and in the description of the embodiments of this application, unless otherwise stated, "multiple" means two or more.
[0147] The working principle of the near field communication (NFC) technology in the embodiments of this application is described below.
[0148] Figure 1 This is a schematic diagram illustrating the working principle of NFC as provided in an embodiment of this application.
[0149] like Figure 1 As shown, the two parties communicating using NFC technology can include a proximity coupling device (PCD) and a proximity integrated circuit card (PICC). The PCD can achieve contactless communication with the PICC in close proximity. The PCD and PICC can allow near-field communication at specific data rates (e.g., 106 kilobits per second, 212 kbps, 424 kbps, or 848 kbps) and specific frequencies (e.g., 13.56 mega hertz, MHz). Communication between the PCD and PICC can occur at close range, for example, within a range of approximately 2 to 4 centimeters.
[0150] The PCD (Polymer Capacitor) can generate high-frequency alternating current to produce a radio frequency (RF) field of a specified frequency (e.g., 13.56 MHz), and transmit data to the PICC (Peripherally Input Cell) via this RF field. When the PICC is near the PCD, it can sense the RF field emitted by the PCD. Upon entering the PCD's RF field, the PICC can obtain energy from the PCD's RF field through electromagnetic induction, and use this energy to generate electricity to drive the internal circuitry of the PICC, thus enabling data transmission from the PCD to the PICC. Alternatively, the PICC can also transmit data to the PCD by modulating the RF field with a load, achieving data transmission from the PICC to the PCD.
[0151] The NFC system in the embodiments of this application is described below.
[0152] Figure 2 This is a schematic diagram of the architecture of an NFC system 10 provided in an embodiment of this application.
[0153] like Figure 2 As shown, the NFC system 10 may include an NFC device 100 and an NFC card reader 200, which may also be referred to as an NFC device 200. When the NFC device 100 and the NFC card reader 200 are brought close together, the NFC card reader 200 can communicate with the NFC device 100, which is acting as a PCD (Personal Control Device), using NFC technology. When the NFC card reader 200 communicates using NFC technology, it can be referred to as being in PCD mode, and when the NFC device 100 communicates using NFC technology, it can be referred to as being in PICC mode.
[0154] In some embodiments, the NFC device 100 is a passive device, such as a physical NFC tag card. In other embodiments, the NFC device 100 is an active device (also referred to as electronic device 100). The electronic device 100 can emulate a PICC conforming to NFC-related standards using data from an NFC emulation card to perform PICC functions. The electronic device 100 can activate one or more NFC emulation cards. An active device requires a power source to operate, while a passive device operates without a power source. For example, an active device includes a power source, while a passive device does not.
[0155] In some embodiments, the NFC device 100 is an active electronic device 100, which can support both PICC mode and PCD mode. When in PCD mode, the electronic device 100 can act as a PCD transmitter, transmitting a radio frequency field to communicate with the PICC. When in PICC mode, the electronic device 100 can act as a PICC passive receiver of the radio frequency field transmitted by the PCD, communicating with the PCD via NFC technology through load modulation. In some examples, after enabling NFC, the electronic device 100 can operate in PICC mode; in other examples, after enabling NFC, the electronic device 100 can switch between PICC and PCD modes in a time-sharing manner.
[0156] In this embodiment of the application, the device type of electronic device 100 can be any of the following: mobile phone, tablet computer, handheld computer, desktop computer, laptop computer, ultra-mobile personal computer (UMPC), netbook, cellular phone, personal digital assistant (PDA), as well as smart home devices such as smart screens and smart speakers, wearable devices such as smart bracelets, smartwatches, and smart glasses, extended reality (XR) devices such as augmented reality (AR), virtual reality (VR), and mixed reality (MR), in-vehicle devices, or smart city devices.
[0157] In this embodiment, the NFC card reader 200 can be any of the following: mobile phone, tablet computer, handheld computer, desktop computer, laptop computer, super mobile personal computer, netbook, cellular phone, personal digital assistant, smart home devices such as smart screen and smart speaker, wearable devices such as smart bracelet, smart watch, and smart glasses, extended reality devices such as augmented reality, virtual reality, and mixed reality, vehicles, gates, smart locks, card readers, payment terminals (e.g., point of sale (POS) machines), ticket purchase and / or ticket verification terminals, bank service terminals, and document card readers.
[0158] Figure 3 This is a schematic diagram of the architecture of another NFC system 10 provided in the embodiments of this application.
[0159] like Figure 3 As shown, the NFC system 10 may include an NFC device 100, an NFC card reader 200, and an NFC device 300. The descriptions of NFC device 300 and NFC device 100 are similar. In some embodiments, NFC device 100 and NFC device 300 may both be active devices, and their device types may be the same or different. In other embodiments, NFC device 100 and NFC device 300 may both be passive devices. In still other embodiments, one of the NFC devices 100 and NFC device 300 is an active device, and the other is a passive device. (Not limited to...) Figure 3 As shown in the example, in a specific implementation, NFC system 10 can have more NFC devices in PICC mode.
[0160] In some embodiments, the NFC card reader 200 can broadcast NFC signals. NFC devices 100 and 300 entering the radio frequency field of the NFC card reader 200 can both receive the broadcast NFC signals and can choose whether to send a corresponding response signal to the NFC card reader 200. If the NFC card reader 200 receives response signals from both NFC devices 100 and 300, a card conflict occurs. The NFC card reader 200 can select one of the NFC devices 100 and 300 for NFC communication through an anti-collision process. However, currently, the NFC card reader 200 generally uses a bit-oriented anti-collision mechanism, such as the bit-oriented anti-collision mechanism in the contactless card standard ISO14443 / IEC14443 protocol. This anti-collision mechanism selects the NFC device with the smallest unique identifier (UID). This selection is random and may not be the desired choice by the NFC card reader 200 or the user, resulting in a poor card-swiping experience.
[0161] This application provides a card conflict resolution method. In a card conflict scenario, the NFC card reader 200 can select a target NFC device from multiple NFC devices in PICC mode (e.g., NFC device 100 and NFC device 300). The NFC card reader 200 can then interact with the target NFC device via NFC signaling. In some examples, the device feature information of the target NFC device and the NFC card reader 200 are successfully matched, thus ensuring that the selected target NFC device meets the requirements of the NFC card reader 200. Furthermore, the card identification information of the target NFC device is successfully matched with the card identification information sent by the NFC card reader 200. The card identification information sent by the NFC card reader 200 is determined by the NFC card reader 200 according to preset rules. These preset rules are set according to user needs, such as prioritizing active devices. Therefore, the selected target NFC device meets user needs, effectively improving the user's card-swiping experience. In other examples, the NFC card reader 200 can select the target NFC device according to the card identification information of multiple NFC devices in PICC mode, based on preset rules. These preset rules are set according to user needs, such as prioritizing active devices. This ensures that the selected target NFC device meets the user's needs and effectively improves the user's card swiping experience.
[0162] In the embodiments of this application, the NFC card reader 200 in PCD mode can also be referred to as the first NFC device, and the NFC device in PICC mode can also be referred to as the second NFC device.
[0163] The structure of the NFC device 100 in the embodiments of this application is described below. The structure of NFC devices such as NFC device 300 is similar to that of NFC device 100.
[0164] Figure 4 This is a schematic diagram of the structure of a passive NFC device 100 provided in an embodiment of this application.
[0165] like Figure 4 As shown, the passive NFC device 100 may include an NFC controller, an NFC transceiver, and an NFC memory. The NFC controller may be connected to the NFC transceiver and the NFC memory respectively, and the NFC transceiver and the NFC memory may be connected together.
[0166] An NFC controller can be used for modulation and demodulation of contactless communication signals and to control the input and output of data in the NFC memory. In some embodiments, the NFC controller may include a memory that can be used to store instructions or data that the NFC controller has used or reused. If the NFC controller needs to reuse the instructions or data, it can retrieve them from the NFC memory.
[0167] An NFC transceiver can be used to transmit and receive NFC signals (e.g., 13.56MHz radio frequency signals). NFC device 100 can communicate with NFC reader device 200 using NFC technology via the NFC transceiver. In some embodiments, the NFC transceiver may include an electromagnetic compatibility (EMC) filtering circuit, a matching circuit, a receiving circuit, and an NFC antenna, wherein the NFC antenna may be a loop antenna, used to enable proximity-based contactless communication capabilities of NFC device 100.
[0168] The NFC memory can be used to store card information of the passive NFC device 100, i.e., card information of a physical NFC tag card. The NFC memory can also be used to store data sent by the NFC transceiver to the NFC reader 200, as well as data received from the NFC reader 200.
[0169] Figure 5 This is a schematic diagram of the structure of an active NFC device 100 provided in an embodiment of this application.
[0170] like Figure 5As shown, an active NFC device 100 (i.e., electronic device 100) may include a processor 101 and an NFC module 102. The processor 101 may run one or more applications (APPs). In some examples, the one or more applications may include a wallet application, one or more host-based card emulation (HCE) applications, a subscriber identity module (SIM) card application, etc. In some embodiments, the electronic device 100 may also include a secure element (SE) 103 and / or a SIM card 104. The processor 101 may be connected to the NFC module 102, the SE 103, and the SIM card 104 respectively, and the NFC module 102 may also be connected to the SE 103 and the SIM card 104.
[0171] In some embodiments, the electronic device 100 can activate one or more NFC emulation cards in an application based on user input, thereby enabling the electronic device 100 to support one or more NFC services. The business processing logic of the NFC emulation card in the electronic device 100 is specifically implemented by an applet. The applet can be stored and run in the hardware device or software module (e.g., HCE application, SE103, SIM card 104, etc.) corresponding to the NFC emulation card.
[0172] NFC module 102 can be used to enable communication between electronic device 100 and NFC card reader 200 using NFC technology. NFC module 102 may include an NFC controller ( Figure 5 (not shown), NFC transceiver ( Figure 5 (not shown) and NFC memory ( Figure 5 (Not shown), wherein the NFC controller can be connected to the processor 101, and the NFC controller can also be connected to the NFC transceiver and the NFC memory respectively.
[0173] The NFC controller in NFC module 102 can be used for modulation and demodulation of contactless communication signals, control the input and output of data in the NFC memory, and interact with the processor 101. The NFC transceiver in NFC module 102 can be used to transmit and receive NFC signals (e.g., 13.56MHz radio frequency signals). In some embodiments, the NFC transceiver may include an EMC filtering circuit, a matching circuit, a receiving circuit, and an NFC antenna, wherein the NFC antenna may be a loop antenna, used to realize the proximity-based contactless communication capability of NFC module 102. The NFC memory in NFC module 102 can be used to store data sent by NFC module 102 to NFC reader device 200, as well as data received from NFC reader device 200.
[0174] In some embodiments, the NFC memory can be a single memory shared by the NFC module 102 and other modules in the electronic device 100. For example, some data in the NFC memory can be accessed by the NFC controller, while other data can be accessed by the SE 103. In other embodiments, the NFC memory can be a collection of multiple memories. For example, the NFC controller may include a first memory among these multiple memories. The first memory can be used to store instructions or data that the NFC controller has used or reused. If the NFC controller needs to use the instruction or data again, it can directly access it from the first memory, thus reducing the waiting time of the NFC controller. The SE 103 may include a second memory among these multiple memories. The second memory can be used to store card information such as that of an NFC emulator based on a Secure Element (SE). Thus, if the SE 103 needs to read the card information of an NFC emulator, it can read the card information of the NFC emulator from the second memory in the SE 103. The SIM card 104 may include a third memory among these multiple memories. The third memory can be used to store card information such as the NFC emulator card based on the SIM card. In this way, if the SIM card 104 needs to read the card information of the NFC emulator card, it can read the card information of the NFC emulator card from the third memory in the SIM card 104.
[0175] In some embodiments, the NFC memory can also be used to store routing information. In some embodiments, this routing information can be controlled or managed by an NFC controller, and the routing information can include a routing table consisting of a list of routing rules. Each routing rule contains an applet identifier (AID) and a corresponding destination. The AID is the identifier of the applet used to implement the business logic of the NFC emulator card, and the destination corresponding to the AID is the location where the applet with that AID runs (i.e., the hardware device or software module corresponding to the NFC emulator card with that AID). In some examples, the destination can include at least one of the following: one or more HCE applications in processor 101, SE 103, or SIM card 104.
[0176] In some embodiments, SE103 and NFC module 102 may be two separate chips. In other embodiments, SE103 and NFC module 102 may be packaged within a single chip.
[0177] In some embodiments, the card emulation mode of the NFC emulation card of the electronic device 100 may include a hardware-based virtual card mode and a software-based HCE mode.
[0178] In hardware-based virtual card mode, electronic device 100 can provide the operating environment for the Applet corresponding to the NFC emulator card, as well as the storage and processing of the NFC emulator card's business data, through SE103 or SIM card 104. NFC module 102, as the front end of contactless communication, receives NFC signaling from external NFC reader 200 and forwards it to SE103 or SIM card 104. The Applet in SE103 or SIM card 104 processes the NFC signaling and generates response data for NFC reader 200. SE103 or SIM card 104 can send the response data to NFC module 102, and NFC module 102 can then send the response data to external NFC reader 200. In some examples, a user can activate one or more NFC emulator cards in a wallet application. The wallet application can write the applets and card data of one or more NFC emulator cards to SE103, and SE103 can run the applets of one or more NFC emulator cards. In some examples, a user can activate one or more NFC emulator cards in a SIM card application. The SIM card application can write the applets and card data of one or more NFC emulator cards to SIM card 104 for storage, and SIM card 104 can run the applets of one or more NFC emulator cards.
[0179] In software-based HCE mode, the HCE application in processor 101 can provide the operating environment for the applet corresponding to the NFC emulator card, as well as the storage and processing of the NFC emulator card's business data. NFC module 102, as the front end of contactless communication, receives NFC signaling from the external NFC reader 200 and forwards it to the HCE application in processor 101. The HCE application can process the NFC signaling through the applet running within it or a cloud server, generating response data for the PCD. The HCE application can then send the response data to NFC module 102, which in turn can send it to the external NFC reader 200. In some examples, a user can activate one or more NFC emulator cards in the HCE application, which can run one or more NFC emulator card applets. The HCE application can also store the NFC emulator card data on the local memory of electronic device 100 or on a cloud server.
[0180] For example, in the card emulation scenario described above, the electronic device 100 can have a native NFC-related application installed, and users can also download and install third-party applications from an app store. Generally, the native application can use a hardware-based virtual card solution, while the third-party application can use an HCE solution. The native application can be a wallet application, a SIM card application, etc., and the third-party application can be a payment application, a social application, a banking application, etc. The above examples are only used to explain the embodiments of this application and should not be construed as limiting.
[0181] In some embodiments, the processor 101 may further include an NFC service module. The NFC service module can be used to provide common management functions for one or more NFC services. These common management functions may include file management, card activation, security management, service routing management, and other functions.
[0182] The NFC protocol stack in the embodiments of this application is described below.
[0183] Figure 6 This is a schematic diagram of an NFC protocol stack architecture provided in an embodiment of this application.
[0184] like Figure 6 As shown, the NFC protocol stack can include a physical layer, radio frequency layer, access layer, transport layer, and application layer. Among them,
[0185] The physical layer can be used to implement the physical characteristics of NFC technology communication.
[0186] The radio frequency (RF) layer can be used to implement RF specifications for NFC technology communication, such as data rate and RF signal frequency.
[0187] The access layer can be used to implement functions such as polling and device discovery, service result notification, card conflict management, transmission protocol negotiation, timeout and retransmission mechanism, PICC / PCD mode switching, and converged card selection.
[0188] The transport layer includes a high-speed data transmission protocol, which enables data transmission between the PCD and PICC at the application layer.
[0189] The application layer can be used to implement one or more NFC services and one or more service management policies. The one or more NFC services may include code-free payment, electronic tickets, access control, digital ID cards, all-scenario contactless payment, and near-field data transmission. The one or more service management policies may include any one or more of file management, card long-term activation, security management, and service routing management. In some embodiments, the processing logic of the NFC services may be executed by an Applet. In some embodiments, the processing logic of the service management policies may be executed by... Figure 5 The NFC service module in the processor 101 shown is executed.
[0190] The following examples illustrate some card conflict scenarios.
[0191] Figures 7A-7C Examples of card conflict scenarios are shown in the diagrams.
[0192] Figures 7A-7C The following is an illustration using the NFC card reader device 200 as a bus card reader.
[0193] like Figure 7A As shown, NFC device 100 is an active device, such as a mobile phone, and NFC device 300 is a passive device, such as a physical transit card. When NFC device 100 and NFC device 300 are stacked together and close to the card reader area of NFC card reader 200, NFC card reader 200 can detect that NFC device 100 and NFC device 300 have a card conflict. Then, NFC card reader 200 can perform anti-conflict NFC signaling interaction with NFC device 100 and NFC device 300 to select one of the NFC devices.
[0194] For example, when using a bit-oriented anti-collision mechanism, if the UID sent by the passive NFC device 300 is smaller than the UID sent by the active NFC device 100, the NFC card reader 200 will select the NFC device 300 for NFC signaling interaction to swipe the card, thus enabling the NFC card reader 200 to swipe the NFC device 300. However, in real-world scenarios, the user's purpose is to swipe a transportation-type NFC analog card from the active NFC device 100. Therefore, the NFC card reader 200's selection of the NFC device 300 for swiping the card does not meet the user's needs. In some embodiments of this application, the NFC card reader 200 can choose to interact with the active NFC device 100 for NFC signaling interaction to swipe the card. For example, if both NFC devices 100 and 300 successfully match the device feature information of the NFC card reader 200, the NFC card reader 200 can swipe the NFC device 100, such as swiping a transportation-type NFC analog card from the NFC device 100 for payment, which meets the user's needs and improves the user's card swiping experience.
[0195] like Figure 7B As shown, NFC device 100 is an active device, such as a mobile phone, and NFC device 300 is also an active device, such as a mobile phone. NFC devices 100 and 300 can be reverse-charged via a charging cable. For example, NFC device 300 can act as a power source to provide power to NFC device 100 via the charging cable. NFC devices 100 and 300 can be stacked together when reverse-charging. When the stacked NFC devices 100 and 300 are close to the card-swiping area of NFC card reader 200, NFC card reader 200 can detect that there is a card conflict between NFC devices 100 and 300. NFC card reader 200 can then perform anti-conflict NFC signaling interaction with NFC devices 100 and 300 to select one of the NFC devices.
[0196] For example, when using a bit-oriented anti-collision mechanism, if the UID sent by NFC device 300 is smaller than the UID sent by active NFC device 100, NFC card reader 200 will choose NFC device 300 for NFC signaling interaction for card swiping, resulting in card swiping failure. In some embodiments of this application, if the device feature information of NFC device 100 and NFC card reader 200 matches successfully, but the device feature information of NFC device 300 and NFC card reader 200 fails to match, then NFC card reader 200 can choose to interact with NFC device 100 for NFC signaling interaction for card swiping, thus enabling NFC card reader 200 to swipe NFC device 100, meeting user needs and improving the user's card swiping experience. In some other embodiments of this application, the NFC card reader 200 may select an NFC device with a smaller card random number for NFC signaling interaction during card swiping. However, it is not limited to this. In other examples, an NFC device with a larger card random number may also be selected for NFC signaling interaction during card swiping, such as when both NFC device 100 and NFC device 300 successfully match the device feature information of the NFC card reader 200.
[0197] like Figure 7C As shown, both NFC device 100 and NFC device 300 are passive devices. For example, NFC device 100 is a physical transit card for city A, and NFC device 300 is a physical transit card for city B. NFC card reader 200 is used to swipe the transit card for city A. When NFC device 100 and NFC device 300 are stacked together and close to the swiping area of NFC card reader 200, NFC card reader 200 can detect that there is a card conflict between NFC device 100 and NFC device 300. NFC card reader 200 can then perform anti-conflict NFC signaling interaction with NFC device 100 and NFC device 300 to select one of the NFC devices.
[0198] For example, when using a bit-oriented anti-collision mechanism, if the UID sent by NFC device 300 is less than the UID sent by NFC device 100, NFC card reader 200 will select NFC device 300 for NFC signaling interaction for card swiping, resulting in card swiping failure. In some embodiments of this application, if the device feature information of NFC device 100 and NFC card reader 200 matches successfully, but the device feature information of NFC device 300 and NFC card reader 200 fails to match, then NFC card reader 200 can choose to interact with NFC device 100 for NFC signaling interaction for card swiping, thus enabling NFC card reader 200 to swipe NFC device 100, meeting user needs and improving the user's card swiping experience. In other embodiments of this application, NFC card reader 200 can choose an NFC device with a smaller card random number for NFC signaling interaction for card swiping. However, this is not limited to this; in other examples, it can also choose an NFC device with a larger card random number for NFC signaling interaction for card swiping, for example, when both NFC device 100 and NFC device 300 successfully match the device feature information of NFC card reader 200.
[0199] superior Figures 7A-7C The scenarios shown are for illustrative purposes only and should not be construed as limiting the scope of this application. Figure 7B The NFC device 100 and NFC device 300 shown can be stacked together but do not perform reverse charging.
[0200] The following describes the card conflict handling method involved in the embodiments of this application.
[0201] Figure 8 This is a flowchart illustrating a card conflict resolution method provided in an embodiment of this application.
[0202] Figure 8 The method shown can be applied to an NFC system including an NFC device 100 and an NFC card reader 200, for example... Figure 2 The NFC system 10 shown is described. The NFC device 100 can be in PICC mode; for example, an active NFC device 100 is in PICC mode by default after enabling NFC functionality. The NFC card reader 200 can be in PCD mode.
[0203] Figure 8 The method shown may include, but is not limited to, the following steps:
[0204] S100: NFC device 100 enters the radio frequency field of NFC card reader 200.
[0205] S101: NFC card reader 200 sends a probe frame to NFC device 100.
[0206] In some embodiments of this application, the NFC card reader 200 in PCD mode can broadcast a probe frame through the radio frequency field. When the NFC device 100 in PICC mode enters the radio frequency field of the NFC card reader 200, the NFC device 100 can receive the probe frame broadcast by the NFC card reader 200.
[0207] In some embodiments of this application, the Probe frame can be used to indicate that the NFC reader device 200 supports a first NFC protocol. In some embodiments of this application, the Probe frame may include a frame header and a checksum; for example, the frame header data length may be 3 bytes, and the checksum data length may be 2 bytes. In some examples, the NFC protocol may use a cyclic redundancy check (CRC) method to verify the NFC transmission frame; therefore, the checksum of the Probe frame may include a CRC code. The NFC transmission frame may include data frames, Probe frames, Probe ACK frames, Conflict frames, Conflict ACK frames, Pick frames, Pick ACK frames, Notify frames, Notify ACK frames, Reset frames, Reset ACK frames, Command frames, Response frames, etc. The frame type field of an NFC transmission frame can be used to indicate the frame type of that NFC transmission frame. For example, the frame type field value in a Probe frame can be "0x01", in a Probe ACK frame it can be "0x02", in a Conflict frame it can be "0x03", in a Conflict ACK frame it can be "0x04", in a Pick frame it can be "0x05", in a Pick ACK frame it can be "0x06", in a Notify frame it can be "0x07", in a NotifyACK frame it can be "0x08", in a Reset frame it can be "0x09", in a Reset ACK frame it can be "0x0A", in a Command frame it can be "0x0B", and in a Response frame it can be "0x0C". The frame type field values "0x0D~0x88" are reserved values, used for expanding the NFC transmission frame types in the first NFC protocol. The frame type field values "0x09~0xFF" can be vendor-defined values. The above examples are merely for illustrative purposes and should not be construed as limiting the scope of this application.
[0208] The header of the Probe frame may include a protocol identifier field, a frame type field, and a protocol version field. The fields in the header can be found in Table 1 below.
[0209] Table 1
[0210] Protocol Identifier 1 byte Indicates the NFC protocol corresponding to the Probe frame. Frame type 1 byte Indicates the type of Probe frame Protocol version 1 byte Indicates the version of the NFC protocol corresponding to the Probe frame.
[0211] As shown in Table 1, the protocol identifier field in the Probe frame can be used to indicate the first NFC protocol used by the NFC reader device 200 when sending the Probe frame. For example, the value of the protocol identifier field can be the identifier of the first NFC protocol, "0x7C". The frame type field in the Probe frame can be used to indicate the type of the Probe frame. For example, the value of the frame type field of the Probe frame can be "0x01".
[0212] S102: NFC device 100 sends a probe ACK frame to NFC card reader 200.
[0213] In some embodiments of this application, the Probe ACK frame can be used to indicate that the NFC device 100 supports the first NFC protocol corresponding to the Probe frame. In some examples, when the NFC device 100 supports the first NFC protocol corresponding to the Probe frame, the NFC device 100 can send a Probe ACK frame to the NFC reader device 200 according to the Probe frame; when the NFC device 100 does not support the first NFC protocol corresponding to the Probe frame, the NFC device 100 will not send a Probe ACK frame to the NFC reader device 200.
[0214] In some embodiments of this application, after the NFC card reader 200 sends a probe frame, it can receive a probe ACK frame within a preset time.
[0215] In some embodiments of this application, the Probe ACK frame may include a frame header and a checksum. The frame header of the Probe ACK frame may include a protocol identifier field, a frame type field, and a protocol version field, with specific field descriptions similar to those in Table 1 above. In some examples, the protocol identifier field in the Probe ACK frame may be used to indicate the first NFC protocol used by the NFC device 100 when sending the Probe ACK frame; for example, the value of the protocol identifier field may be the identifier of the first NFC protocol, "0x7C". The frame type field in the Probe ACK frame may be used to indicate the type of the Probe ACK frame; for example, the value of the frame type field of the Probe ACK frame may be "0x02".
[0216] Figure 8 In the method shown, the NFC card reader 200 receives a Probe ACK frame sent by an NFC device 100 in PICC mode, so there is no card conflict, and the NFC card reader 200 can execute the following S103-S105.
[0217] S103: The NFC card reader 200 sends a notification frame (carrying the device feature information of the NFC card reader 200) to the NFC device 100.
[0218] In some embodiments of this application, the notification frame may include device feature information of the NFC reader device 200.
[0219] In some embodiments of this application, the notification frame may include first control information. The first control information may include at least one of the following fields: a selected device identifier field, an anti-collision identifier field, and a selected card identifier field. The selected device identifier field is used to indicate whether the NFC device (PICC mode) receiving the notification frame reports a matching result with the device feature information of the NFC card reader 200. The anti-collision identifier field is used to indicate whether a card collision exists. The selected card identifier field is used to indicate whether the NFC device (PICC mode) receiving the notification frame reports the card identifier information of the NFC device. In some examples, the first control information includes a selected identifier field and an anti-collision identifier field, with the selected identifier field preceding the anti-collision identifier field. In some examples, the length of each of the three fields in the above examples is 1 bit. In some examples, the first control information is the control information shown in Table 3 below. In some examples, the first control information is the control information shown in Table 3 below. Figure 9 The control information shown is provided below. Examples of the first control information are for illustrative purposes only and should not be construed as limiting the scope of this application. This application does not limit the number, position, or length of the fields included in the first control information; therefore, examples will not be provided here.
[0220] In some embodiments of this application, the first control information in the Notify frame can be used to instruct the NFC device (PICC mode) receiving the Notify frame to provide feedback on the matching result between the NFC device and the device feature information of the NFC reader 200 in the Notify frame. For example, the first control information in the Notify frame may include a device identifier field, which instructs the NFC device (PICC mode) receiving the Notify frame to provide feedback on the matching result between the NFC device and the device feature information of the NFC reader 200 in the Notify frame.
[0221] In some examples, the NFC reader device 200 can broadcast a Notify frame (carrying the device feature information of the NFC reader device 200) through the radio frequency field, so that NFC devices (PICC mode) whose device feature information matches the NFC reader device 200 in the radio frequency field respond with a successful match result, and NFC devices (PICC mode) whose device feature information does not match the NFC reader device 200 in the radio frequency field respond with a failed match result.
[0222] In some embodiments of this application, the device feature information of different NFC card readers may be different.
[0223] In some embodiments of this application, device feature information may include a service identifier (SID) and a device organization unique identifier (OUI) (also known as an NFC device organization unique identifier (ND_OUI)).
[0224] In some embodiments of this application, the device feature information may include any one or more of the following: Service Identifier (SID), Device Organization Identifier (OUI), and Device Group Identifier (GID) (also known as NFC Device Group Identifier (ND_GID)).
[0225] The following examples illustrate Service Identifier (SID), Device Organization Identifier (OUI), and Device Group Identifier (GID).
[0226] 1. The Service Identifier (SID) can be used to indicate the type of NFC service supported by the NFC reader device 200 on the basis of NFC functionality.
[0227] In some embodiments, the type of NFC service may include a primary service type and a sub-service type; therefore, the service identifier may include a primary service identifier and a sub-service identifier. The primary service identifier can be used to indicate the primary service type supported by the NFC card reader 200, and the sub-service identifier can be used to indicate the sub-service types supported by the NFC card reader 200 under a certain primary service type. The primary service type may include one or more of the following: access control, keys, transportation, banking, digital currency, digital certificates, codeless payment, electronic tickets, wireless charging, contactless payment, multi-function cards, etc. The sub-service types corresponding to access control may include one or more of the following: community access control, enterprise access control, government access control, campus access control, etc. The sub-service types corresponding to keys may include one or more of the following: smart locks, Intelligent Car Connectivity Industry Ecosystem Alliance (ICCE) car keys, Car Connectivity Consortium (CCC) car keys, Intelligent Car Connectivity Open Alliance (ICCOA) car keys, hotel room cards, etc. The sub-service types for transportation cards can include one or more of the following: transportation cards within China and transportation cards outside China. The sub-service types for banks can include one or more of the following: UnionPay, UnionPay International, Visa, and Mastercard. The sub-service types for digital currencies can include digital currencies as defined by the People's Bank of China. The sub-service types for digital certificates can include one or more of the following: ID cards, Hong Kong and Macau travel permits, driver's licenses, social security cards, and passports. The sub-service types for code-free payment can include one or more of the following: general services, membership card discount services, and payment institution discount services. The sub-service types for electronic tickets can include electronic ticketing for park entry. The sub-service types for wireless charging can include wireless charging. The sub-service types for tap-to-pay can include one or more of the following: tap-to-pair, tap-to-multi-screen collaboration, tap-to-transfer audio, tap-to-transfer image, tap-to-add friends, and tap-to-transfer. The sub-service types for multi-functional cards can include one or more of the following: multi-functional all-in-one cards.
[0228] The main service identifier can occupy 1 byte, and the sub-service identifier can occupy 1 byte. For example, the values of the main service identifier and the sub-service identifier can be shown in Table 2 below.
[0229] Table 2
[0230]
[0231]
[0232] As shown in Table 2:
[0233] 1.1 When the main service identifier is “0x01”, the main service type is access control.
[0234] If the sub-service identifier is "0x01", the sub-service type is community access control. If the sub-service identifier is "0x02", the sub-service type is enterprise access control. If the sub-service identifier is "0x03", the sub-service type is government access control. If the sub-service identifier is "0x04", the sub-service type is campus access control. When the main service type is access control, the sub-service identifier values "0x00" and "0x05~0xFF" can be reserved for protocol extensions.
[0235] 1.2 When the primary service identifier is “0x02”, the primary service type is key.
[0236] If the sub-service identifier is "0x01", the sub-service type is a smart door lock. If the sub-service identifier is "0x02", the sub-service type is an ICCE car key. If the sub-service identifier is "0x03", the sub-service type is a CCC car key. If the sub-service identifier is "0x04", the sub-service type is an ICCOA car key. If the sub-service identifier is "0x05", the sub-service type is a hotel room key. When the main service type is a key, the sub-service identifier values "0x00" and "0x06~0xFF" can be reserved for protocol extensions.
[0237] 1.3 When the primary service identifier is “0x03”, the primary service type is transportation.
[0238] If the sub-service identifier is "0x01", the sub-service type is a transportation card within China. If the sub-service identifier is "0x02", the sub-service type is a transportation card outside of China. When the main service type is transportation, the sub-service identifier values "0x00" and "0x03~0xFF" can be reserved for protocol extensions.
[0239] 1.4. When the main service identifier is “0x04”, the main service type is Bank.
[0240] If the sub-service identifier is "0x01", the sub-service type is UnionPay, UnionPay International, Visa, or Mastercard. In the case where the primary service type is a bank, the sub-service identifier values "0x00" and "0x02~0xFF" can be reserved for protocol extensions.
[0241] 1.5. When the main service identifier is “0x05”, the main service type is digital currency.
[0242] If the sub-service identifier is "0x00", the sub-service type is digital currency as defined by the People's Bank of China. In cases where the main service type is digital currency, the sub-service identifier value "0x01~0xFF" can be reserved for protocol extensions.
[0243] 1.6 When the main service identifier is “0x06”, the main service type is digital certificate.
[0244] If the sub-service identifier is "0x01", the sub-service type is ID card. If the sub-service identifier is "0x02", the sub-service type is Mainland Travel Permit for Hong Kong and Macao Residents. If the sub-service identifier is "0x03", the sub-service type is driver's license. If the sub-service identifier is "0x04", the sub-service type is social security card. If the sub-service identifier is "0x05", the sub-service type is passport. When the main service type is digital document, the sub-service identifier values "0x00" and "0x06~0xFF" can be reserved for protocol extensions.
[0245] 1.7 When the main service identifier is “0x07”, the main service type is codeless payment.
[0246] If the sub-service identifier is "0x01", the sub-service type is a general service. If the sub-service identifier is "0x02", the sub-service type is a membership card discount service. If the sub-service identifier is "0x03", the sub-service type is a payment institution discount service. When the main service type is codeless payment, the sub-service identifier values "0x00" and "0x04~0xFF" can be reserved for protocol extensions.
[0247] 1.8 When the main service identifier is “0x08”, the main service type is electronic ticket.
[0248] If the sub-service identifier is "0x01", the sub-service type is electronic ticket entry service. In the case where the main service type is electronic ticket, the sub-service identifier values "0x00" and "0x04~0xFF" can be reserved for protocol extensions.
[0249] 1.9 When the main service identifier is “0x09”, the main service type is wireless charging.
[0250] If the sub-service identifier is "0x00", the sub-service type is wireless charging. When the main service type is wireless charging, the sub-service identifier value "0x01~0xFF" can be reserved for protocol extensions.
[0251] 1.10. When the main service identifier is “0x0A”, the main service type is the tap-to-win function.
[0252] If the sub-service identifier is "0x01", the sub-service type is one-touch pairing. If the sub-service identifier is "0x02", the sub-service type is one-touch multi-screen collaboration. If the sub-service identifier is "0x03", the sub-service type is one-touch audio transmission. If the sub-service identifier is "0x04", the sub-service type is one-touch image transmission. If the sub-service identifier is "0x05", the sub-service type is one-touch adding friends. If the sub-service identifier is "0x06", the sub-service type is one-touch data transfer. When the main service type is the "touch-to-touch" function, the sub-service identifier values "0x00" and "0x07~0xFF" can be reserved for protocol extensions.
[0253] 1.11. When the primary service identifier is “0x0B”, the primary service type is a multi-function card.
[0254] If the sub-service identifier is "0x01", the sub-service type is a multi-functional all-in-one card. In the case where the main service type is a multi-functional card, the sub-service identifier values "0x00" and "0x02~0xFF" can be reserved for protocol extensions.
[0255] 1.12 The values of the main service identifier "0x00" and "0x0B~0xFF" can be reserved for protocol extensions.
[0256] The examples shown in Table 2 above are only used to explain the embodiments of this application and should not be construed as limiting this application.
[0257] 2. The Equipment Organization Identifier (OUI) can be used to indicate the manufacturer providing NFC services using the NFC card reader device 200. The NFC protocol standards organization's registration management agency can assign different OUIs to different manufacturers. For example, manufacturers providing NFC services may include one or more smart lock manufacturers, one or more property management companies, one or more automotive parts manufacturers, one or more transportation card management departments, etc.
[0258] For example, if the NFC service of the NFC card reader 200 is for community access control, the device organization identifier of the NFC card reader 200 can be the organization identifier applied for by the property management company to which the NFC card reader 200 belongs to the NFC standards organization. For example, the device organization identifier applied for by Vanke Property Management Company to the registration management agency of the NFC standards organization can be "0x1A3B27".
[0259] For example, if the NFC service provided by the NFC card reader 200 is a smart door lock, the device organization identifier of the NFC card reader 200 can be the organization identifier applied for by the smart door lock manufacturer to which the NFC card reader 200 belongs to the NFC standards organization.
[0260] For example, if the NFC service provided by the NFC card reader 200 is a car key, the device organization identifier of the NFC card reader 200 can be the organization identifier applied for by the vehicle manufacturer to which the NFC card reader 200 belongs to the NFC standards organization.
[0261] For example, if the NFC service provided by the NFC card reader 200 is a multi-functional all-in-one card, the device organization identifier of the NFC card reader 200 can be the organization identifier applied for by the all-in-one card issuing organization to which the NFC card reader 200 belongs from the NFC standards organization. The PICC corresponding to the multi-functional all-in-one card can include campus cards, employee cards, and other cards with multiple functions such as access control, stored value, and consumption. The all-in-one card issuing organization to which the NFC card reader 200 belongs can include organizations such as companies and schools.
[0262] The above examples are merely for explaining the embodiments of this application and should not be construed as limiting the embodiments of this application.
[0263] 3. The Device Group Identifier (GID) can be used to indicate the group to which the NFC services provided by the NFC reader 200 belong. The Device Group Identifier can be assigned based on the purpose and location of the NFC reader 200. Different NFC services can be assigned to different groups.
[0264] For example, if the NFC service provided by the NFC reader 200 is community access control, the device group identifier of the NFC reader 200 may include a hash value obtained by hashing the city name and the community name together, as well as a random number. For instance, the data length of the device group identifier of the NFC reader 200 can be 6 bytes, the hash value obtained by hashing the city name and the community name together can be located in the first 4 bytes of the device group identifier, and the random number can be located in the last 2 bytes of the device group identifier.
[0265] For example, if the NFC service provided by the NFC reader 200 is a smart door lock, the device group identifier of the NFC reader 200 may include the hash value obtained by hashing the serial number (SN) of the NFC reader 200 and a random number. For example, the data length of the device group identifier of the NFC reader 200 can be 6 bytes, the hash value obtained by hashing the serial number (SN) of the NFC reader 200 can be located in the first 4 bytes of the device group identifier, and the random number can be located in the last 2 bytes of the device group identifier.
[0266] For example, if the NFC service provided by the NFC reader 200 is a car key, the device group identifier of the NFC reader 200 may include the hash value obtained by hashing the vehicle identification number (VIN) of the NFC reader 200 and a random number. For example, the data length of the device group identifier of the NFC reader 200 can be 6 bytes, the hash value obtained by hashing the vehicle identification number of the NFC reader 200 can be located in the first 4 bytes of the device group identifier, and the random number can be located in the last 2 bytes of the group identifier.
[0267] For example, if the NFC service provided by the NFC card reader 200 is a multi-functional all-in-one card, the device group identifier of the NFC card reader 200 can be a preset value.
[0268] The above examples are merely for explaining the embodiments of this application and should not be construed as limiting this application.
[0269] In some embodiments of this application, the notification frame may include a frame header and a data segment. The frame header may include the aforementioned first control information, and the data segment may include device characteristic information of the NFC card reader 200. An example of the notification frame format can be found here. Figure 9 ,like Figure 9 As shown, a Notify frame may include a frame header, a data segment, and a checksum. The frame header of a Notify frame may include a protocol identifier field, a frame type field, a control information field, and a length field. The data segment of a Notify frame may include a device identifier element, and the checksum may include a CRC code. The fields in a Notify frame are described in Table 3 below; the checksum is not shown in Table 3.
[0270] Table 3
[0271]
[0272]
[0273] As shown in Table 3, the protocol identifier field in the header of the Notify frame can be used to indicate the first NFC protocol used by the NFC reader 200 when sending the Notify frame, for example... Figure 9 As shown, the value of the protocol identifier field can be the identifier of the first NFC protocol, "0x7C". The frame type field in the frame header of the Notify frame can be used to indicate the type of Notify frame, for example... Figure 9 As shown, the value of the frame type field in the Notify frame can be "0x07".
[0274] In some embodiments of this application, the control information in the Notify frame may include 8 bits, namely bits 0 to 7, each bit can be 0 or 1. Bit 0 in this control information can serve as a device identifier field, bit 1 as an anti-collision identifier field, and bit 2 as a card identifier field. Specifically, when bit 0 in the control information is 1, it indicates that the NFC device (PICC mode) receiving the Notify frame should provide a matching result with the device feature information of the NFC reader 200. When bit 0 in the control information is 0, it indicates that the NFC device (PICC mode) receiving the Notify frame should not provide a matching result with the device feature information of the NFC reader 200. When bit 1 in the control information is 1, it indicates that a card collision exists; when bit 1 in the control information is 0, it indicates that no card collision exists. When bit 2 in the control information is 1, it indicates that the NFC device (PICC mode) receiving the Notify frame should provide its card identifier information when it successfully matches the device feature information of the NFC reader 200. When bit 2 in the control information is 0, it instructs the NFC device (PICC mode) that receiving the Notify frame not to provide its card identification information. Bits 3 to 7 in the control information can be reserved; for ease of explanation, bits 3 to 7 in the control information of this embodiment are 0.
[0275] In some embodiments of this application, the control information in the frame header of the Notify frame can be the first control information described above. For example, as shown... Figure 9 As shown, the control information in the Notify frame can have a value of 0x01. In this case, bit 0 of the control information with a value of 0x01 is set to 1, indicating that the NFC device (PICC mode) receiving the Notify frame will provide feedback on the matching result of the device feature information with the NFC card reader 200. Bit 1 of the control information with a value of 0x01 is set to 0, indicating that there is no card conflict. Bit 2 of the control information with a value of 0x01 is set to 0, indicating that the NFC device (PICC mode) receiving the Notify frame will not provide feedback on its card identification information. Bits 3 to 7 of the control information with a value of 0x01 are set to 0.
[0276] Not limited to the control information in the Notify frame of the above example, in some other examples, the control information does not include the Select Card Identifier field. Bit 2, which is the Select Card Identifier field, can be reserved to indicate other meanings or not indicate any meaning. In other examples, other bits in the control information can also be used as Select Device Identifier field / Anti-collision Identifier field / Select Card Identifier field. The embodiments of this application do not limit the indication meaning of each bit in the control information.
[0277] As shown in Table 3 and Figure 9 As shown, the data segment of the Notify frame (i.e., the device identification element) may include device characteristic information, which may include a Service Identifier (SID) and a Device Organization Identifier (OUI). In some embodiments, the device characteristic information may also include a Device Group Identifier (GID). In some embodiments, the device identification element may include not only device characteristic information, but also an Element Code, an Identifier Mask, a Device Type Identifier (TID), a Device Private Identifier (PID), and an AID. Figure 9 (Not shown). Fields in the device identification element are described in Table 4 below.
[0278] Table 4
[0279]
[0280]
[0281] The element code can be used to identify control elements. Control elements can include one or more of the following: device identification elements, card identification elements, transmission capability elements, and security algorithm elements. These control elements can be flexibly combined in NFC transmission frames (such as Notify frames, Pick frames, and Conflict frames). As shown in Table 4, the Notify frame carries the device identification element; therefore, the element code in the Notify frame is used to indicate the identification of the device identification element. In some examples, the element code value for the device identification element is "0x00", the element code value for the card identification element is "0x01", the element code value for the transmission capability element is "0x02", and the element code value for the security algorithm element is "0x03". The element code values "0x04~0xFF" can be reserved for protocol extensions or manufacturer-defined uses.
[0282] As shown in Table 4, the device identifier carried in the device identifier element of the Notify frame may include one or more of the following: Device Type Identifier (TID), Service Identifier (SID), Device Organization Identifier (OUI), Device Group Identifier (GID), Device Individual Identifier (PID), and AID.
[0283] The Device Type Identifier (TID) indicates the device type, which can include any of the following: mobile phone, wearable device, card reader device that does not require interaction with electronic devices, or card reader device that requires interaction with electronic devices. In some examples, a Device Type Identifier of "0x01" indicates that the NFC card reader device 200 is a mobile phone. A Device Type Identifier of "0x02" indicates that the NFC card reader device 200 is a wearable device. A Device Type Identifier of "0x03" indicates that the NFC card reader device 200 is a card reader device that does not require NFC interaction with electronic devices, such as security gates or wireless charging devices. A Device Type Identifier of "0x04" indicates that the NFC card reader device 200 is a card reader device that requires NFC interaction with electronic devices, such as access control devices, transportation card readers, or vehicles. The values "0x00" and "0x05~0xFF" of the Device Type Identifier are reserved for protocol extensions.
[0284] The Device Individual Identifier (PID) indicates the individual identifier of the NFC card reader 200 within a class of card readers under the same device organization identifier and the same device group identifier. The manufacturer of the NFC card reader 200 needs to ensure that the Device Individual Identifiers of card readers under the same device organization identifier and the same device group identifier are different.
[0285] The above Figure 9 Tables 3 and 4 are merely for explaining the embodiments of this application and should not be construed as limiting this application.
[0286] S104: NFC device 100 sends a NotifyACK frame to NFC card reader 200.
[0287] In some embodiments of this application, the NotifyACK frame may include a result code, which may indicate the matching result of the device feature information of the NFC device 100 and the NFC card reader 200, such as a successful match or a failed match. In some embodiments of this application, the NFC device 100 may obtain the device feature information of the NFC card reader 200 carried in the Notify frame, and determine, according to the first control information in the Notify frame: when the device feature information of the NFC device 100 and the NFC card reader 200 is successfully matched, a successful match result is returned to the NFC card reader 200; when the device feature information of the NFC device 100 and the NFC card reader 200 fails to match, a failed match result is returned to the NFC card reader 200.
[0288] In some embodiments of this application, the NotifyACK frame may include a frame header and a data segment, and the data segment may include a result code. An example of the NotifyACK frame format can be found here. Figure 10 ,like Figure 10 As shown, a NotifyACK frame may include a frame header, a data segment, and a checksum. The frame header of a NotifyACK frame may include a protocol identifier field, a frame type field, and a length field. The data segment of a NotifyACK frame may include a result code, and the checksum may include a CRC code. The fields in a NotifyACK frame are described in Table 5 below.
[0289] Table 5
[0290] Protocol Identifier 1 byte Indicates the NFC protocol corresponding to the NotifyACK frame. Frame type 1 byte Indicates the type of NotifyACK frame length 1 byte Indicates the frame length excluding the frame header and checksum, i.e., the length of the data segment. Result code 1 byte The matching result of the indicator and the device feature information of the NFC card reader 200
[0291] As shown in Table 5, the protocol identifier field in the header of the NotifyACK frame can be used to indicate the first NFC protocol used by the NFC device 100 when sending the NotifyACK frame. For example, the value of the protocol identifier field can be the identifier of the first NFC protocol, "0x7C". The frame type field in the header of the NotifyACK frame can be used to indicate the type of the NotifyACK frame, for example... Figure 10 As shown, the frame type field in the NotifyACK frame can have a value of "0x08". The length of the frame header of the NotifyACK frame can be 0x01, indicating that the length of the data segment (i.e., the result code) in the NotifyACK frame is 1 byte. The result code in the NotifyACK frame can be used to indicate the matching result of the device feature information of the NFC device 100 that sent the NotifyACK frame and the NFC card reader device 200.
[0292] In some examples, a result code value of 0x00 in the data segment of the NotifyACK frame indicates that the device feature information of NFC device 100 and NFC card reader 200 has been successfully matched, while a result code value of 0x01 indicates that the device feature information of NFC device 100 and NFC card reader 200 has failed to match.
[0293] In some embodiments of this application, when the result code in the NotifyACK frame received by the NFC card reader 200 indicates a successful match, the NFC card reader 200 can determine to select the NFC device 100, that is, determine the NFC device 100 as the target NFC device (PICC mode) of the NFC card reader 200 in PCD mode, and the NFC card reader 200 can perform NFC signaling interaction with the selected NFC device 100.
[0294] S105: The NFC card reader 200 and the NFC device 100 perform NFC signaling interaction to complete the first PICC card swiping service.
[0295] In some embodiments of this application, the NFC card reader 200 and the selected NFC device 100 engage in NFC signaling interaction to complete the card-swiping service of the first PICC in the NFC device 100. The card-swiping service may include any one of the following: opening access control, unlocking a door, unlocking a vehicle, making a transaction payment, verifying an electronic ticket, verifying a digital document, or swiping a transportation card to board or alight. In some examples, the NFC device 100 can send the card information of the first PICC to the NFC card reader 200 via NFC signaling interaction. The NFC card reader 200 can then execute the card-swiping verification process of the first PICC based on the card information. The NFC card reader 200 can also send the card-swiping result of the first PICC to the NFC device 100 via NFC signaling interaction. In some examples, when the NFC card reader 200 and the selected NFC device 100 interact via NFC signaling, the NFC device 100 can output a card swipe notification for the first PICC. For example, this notification could be a card-shaped icon displaying the name of the first PICC. The card swipe notification can be used to inform the user that the NFC device 100 is using the first PICC for card swiping. In some examples, the NFC device 100 can output the received card swipe result from the first PICC, such as indicating successful or failed swipe. If the swipe is successful, it can also display payment information.
[0296] When the NFC device 100 is a passive device, the first PICC can be the NFC device 100. When the NFC device 100 is an active device, the first PICC can be an NFC emulator card determined from one or more NFC emulator cards included in the NFC device 100, wherein the first PICC is an NFC emulator card that successfully matches the device feature information of the NFC card reader 200.
[0297] In some examples, the card information of the first PICC may include one or more of the following: access control information, key information, transaction account information, and e-ticket information. Access control information may include one or more of the following: card number, card expiration date, etc. Key information may include one or more of the following: key code, key code expiration date, etc. Transaction account information may include one or more of the following: transaction account identifier, remaining balance in the transaction account, etc. E-ticket information may include one or more of the following: e-ticket code, e-ticket verification time, e-ticket expiration date, etc.
[0298] In some other embodiments of this application, when the result code in the NotifyACK frame received by the NFC reader 200 indicates failure, the NFC reader 200 can determine that the NFC device 100 is not the target NFC device (PICC mode) of the NFC reader 200 in PCD mode, and therefore will not select the NFC device 100. The NFC reader 200 can continue to send probe frames (e.g., periodically send probe frames) to select the target NFC device (PICC mode).
[0299] Understandable, Figure 8 The communication frame shown is a communication frame of the first NFC protocol. Figure 8 The method shown can be for communication using the first NFC protocol. Figure 8 Both the NFC card reader 200 and the NFC device 100 shown support the first NFC protocol.
[0300] exist Figure 8 In the method shown, if the NFC card reader 200 (PCD mode) receives a probe confirmation frame from an NFC device 100 (PICC mode), there is no card conflict, for example, in a scenario where there is only one NFC device 100 in the RF field of the NFC card reader 200. However, in a specific implementation, there may be multiple PICC mode NFC devices in the RF field of the NFC card reader 200, and the NFC card reader 200 may receive probe confirmation frames from multiple PICC mode NFC devices, thus causing a card conflict. In the card conflict scenario, the NFC card reader 200 can select one PICC mode NFC device from the multiple PICC mode NFC devices for NFC signaling interaction through an anti-collision procedure. The anti-collision procedure provided in this application embodiment can be found in [reference needed]. Figure 11 .
[0301] Figure 11 This is a flowchart illustrating another card conflict handling method provided in the embodiments of this application.
[0302] Figure 11 The method shown can be applied to an NFC system including NFC device 100, NFC card reader 200, and NFC device 300, for example... Figure 3 The NFC system 10 shown is described above. NFC devices 100 and 300 can be in PICC mode; for example, active NFC devices 100 and 300 are in PICC mode by default after enabling NFC functionality. NFC card reader 200 can be in PCD mode.
[0303] Figure 11 The method of demonstration may include, but is not limited to, the following steps:
[0304] S200: NFC device 100 enters the radio frequency field of NFC card reader 200, and NFC device 300 enters the radio frequency field of NFC card reader 200. This application embodiment does not limit the order in which NFC device 100 and NFC device 300 enter the radio frequency field of NFC card reader 200.
[0305] S201: NFC card reader 200 sends a probe frame to NFC device 100 and NFC device 300.
[0306] In some embodiments of this application, the PCD mode NFC reader device 200 can broadcast a Probe frame via a radio frequency field. When the PICC mode NFC device 100 and NFC device 300 enter the radio frequency field of the NFC reader device 200, the NFC device 100 and NFC device 300 can receive the Probe frame broadcast by the NFC reader device 200. The Probe frame can indicate that the NFC reader device 200 supports a first NFC protocol. A description of the Probe frame can be found in [link to documentation]. Figure 8 Description of the Probe frame in S101.
[0307] S202: NFC device 100 sends a first probe ACK frame to NFC card reader 200.
[0308] S203: NFC device 300 sends a second probe ACK frame to NFC card reader 200.
[0309] The order of S202 and S203 is not limited in the embodiments of this application.
[0310] In some embodiments of this application, a first Probe ACK frame can be used to indicate that NFC device 100 supports the first NFC protocol corresponding to the Probe frame, and a second Probe ACK frame can be used to indicate that NFC device 300 supports the first NFC protocol corresponding to the Probe frame. The descriptions of the first and second Probe ACK frames are as follows: Figure 8 The description of the Probe ACK frame in S102 is similar; the first Probe ACK frame and the second Probe ACK frame can be the same or different.
[0311] In some embodiments of this application, after the NFC card reader 200 sends a probe frame, it can receive a probe ACK frame within a preset time.
[0312] Figure 11 In the method shown, the NFC card reader 200 receives Probe ACK frames sent by two PICC mode NFC devices (i.e., NFC device 100 and NFC device 300), thus a card conflict exists. The NFC card reader 200 can perform an anti-collision procedure to select one of the two PICC mode NFC devices for NFC signaling interaction. The anti-collision procedure may include the following steps S204-S210.
[0313] S204: NFC card reader 200 sends a conflict frame (carrying device feature information of NFC card reader 200) to NFC device 100 and NFC device 300.
[0314] In some embodiments of this application, a conflict frame may include device feature information of the NFC reader device 200.
[0315] In some embodiments of this application, the conflict frame may include second control information. The second control information in these embodiments may also be referred to as first information. The second control information may include at least one of the following fields: a selected device identifier field, an anti-conflict identifier field, and a selected card identifier field. The selected device identifier field is used to indicate whether the NFC device (PICC mode) receiving the conflict frame provides a matching result with the device feature information of the NFC card reader 200. The anti-conflict identifier field is used to indicate whether a card conflict exists. The selected card identifier field is used to indicate whether the NFC device (PICC mode) receiving the conflict frame provides its card identifier information. In some examples, the second control information includes a selected identifier field and an anti-conflict identifier field, with the selected identifier field preceding the anti-conflict identifier field. In some examples, the length of each of the three fields in the above examples is 1 bit. In some examples, the second control information is as follows: Figure 12 The control information shown is provided. Examples of the second control information are only for explaining embodiments of this application and should not be construed as limiting the application. Embodiments of this application do not limit the number, position, or length of fields included in the second control information, and examples will not be provided here.
[0316] In some embodiments of this application, the second control information in the Conflict frame can be used to instruct the NFC device (PICC mode) receiving the Conflict frame to provide a matching result between the NFC device and the device feature information of the NFC reader 200 in the Conflict frame. For example, the second control information in the Conflict frame may include a selected device identifier field, which instructs the NFC device (PICC mode) receiving the Conflict frame to provide a matching result between the NFC device and the device feature information of the NFC reader 200 in the Conflict frame. Optionally, the second control information in the Conflict frame can also be used to indicate the existence of a card conflict. For example, the second control information in the Conflict frame may include an anti-conflict identifier field, which indicates the existence of a card conflict. Optionally, the second control information in the Conflict frame can also be used to instruct the NFC device (PICC mode) that receives the Conflict frame to return the card identification information (e.g., card type identifier and card random number) of the NFC device when it successfully matches the device feature information of the NFC card reader 200. The second control information in the Conflict frame may include a card identification selection field, which instructs the NFC device (PICC mode) that receives the Conflict frame to return the card identification information of the NFC device when it successfully matches the device feature information of the NFC card reader 200.
[0317] In some examples, the NFC reader 200 can broadcast conflict frames (carrying device feature information of the NFC reader 200) via the radio frequency field. This causes NFC devices (PICC mode) whose device feature information matches that of the NFC reader 200 within the radio frequency field to respond with a successful match result and the NFC device's card identification information. NFC devices (PICC mode) whose device feature information fails to match the NFC reader 200 within the radio frequency field respond with a failed match result. For a description of the device feature information, please refer to [link to documentation]. Figure 8 Description of device feature information.
[0318] In some embodiments of this application, a conflict frame may include a frame header and a data segment. The frame header may include the second control information described above, and the data segment may include device characteristic information of the NFC card reader 200. An example of the conflict frame format can be found here. Figure 12 ,like Figure 12 As shown, a conflicting frame may include a frame header, a data segment, and a checksum. The frame header may include a protocol identifier field, a frame type field, a control information field, and a length field. The data segment may include a wait slot and a device identifier element. The checksum may include a CRC code. The fields in the conflicting frame and... Figure 8 The fields in the Notify frame are similar. For example... Figure 12 As shown, the value of the protocol identifier field in the frame header of a conflicting frame can be the identifier of the first NFC protocol, "0x7C". The value of the frame type field in the frame header of a conflicting frame can be "0x03".
[0319] In some embodiments of this application, the control information in the frame header of the conflicting frame can be the second control information described above. For example, as shown... Figure 12 As shown, the control information in the frame header of the conflict frame can have a value of "0x07". In this "0x07" control information, bit 0 is set to 1, indicating that the NFC device (PICC mode) receiving the conflict frame should provide feedback on the matching result with the device feature information of the NFC reader 200. Bit 1 of the "0x07" control information is set to 1, indicating that a card conflict exists. Bit 2 of the "0x07" control information is set to 1, indicating that the NFC device (PICC mode) receiving the conflict frame should provide feedback on its card identification information when it successfully matches the device feature information of the NFC reader 200. Bits 3 to 7 of the "0x07" control information are set to 0.
[0320] Not limited to the control information in the conflict frames of the above examples, in some other examples, the control information does not include the select card identifier field. Bit 2, which is the select card identifier field, can be reserved to indicate other meanings or not indicate any meaning. In this case, the value of the control information in the frame header of the conflict frame can be "0x03". In this case, bits 2 to 7 of the control information with a value of "0x03" are 0, and bits 0 and 1 of the control information with a value of "0x03" are 1. In some other examples, other bits in the control information can also be used as the select device identifier field / anti-collision identifier field / select card identifier field. The embodiments of this application do not limit the indication meaning of each bit in the control information.
[0321] In this application, the length of the waiting slot in the data segment of the conflict frame can be 1 byte. The waiting slot can be the number of time slots / slots of the timeout period. The timeout period is the time window for the NFC reader device 200 to receive the response frame (i.e., conflict confirmation frame) of the conflict frame, for example, set to 10 milliseconds. The multiple time slots of the timeout period can be used by the NFC device (PICC mode) that receives the conflict frame to select one to return a response frame. In some embodiments of this application, the waiting slot can be determined according to a preset value, such as a waiting slot of 2. value In some examples, the value can be preset. For example, if the value is set to 2, the waiting time slot is 4. In some examples, the value can be related to the number of multiple PICC devices that have card conflicts. For example, the larger the number of PICC devices, the larger the value.
[0322] S205: NFC device 100 sends a first conflict ACK frame to NFC card reader 200.
[0323] S206: NFC device 300 sends a second conflict ACK frame to NFC card reader 200.
[0324] The order of S205 and S206 is not limited in the embodiments of this application.
[0325] In some embodiments of this application, the first and second conflict ACK frames may include a result code, which may indicate the matching result of the device feature information of the NFC device (PICC mode) sending the conflict ACK frame and the NFC card reader 200. In some embodiments of this application, the NFC device 100 / NFC device 300 may obtain the device feature information of the NFC card reader 200 carried in the conflict frame, and determine, according to the second control information in the conflict frame: when the device feature information of the NFC device 100 / NFC device 300 and the NFC card reader 200 is successfully matched, a successful matching result and the card identification information of the NFC device 100 / NFC device 300 are returned to the NFC card reader 200; when the device feature information of the NFC device 100 / NFC device 300 and the NFC card reader 200 fails to match, a failed matching result is returned to the NFC card reader 200.
[0326] In some embodiments of this application, NFC device 100 and NFC device 300 can obtain the waiting time slots in the conflict frame, that is, obtain the number of time slots of the timeout period of NFC card reader 200. NFC device 100 / NFC device 300 can select one time slot from the multiple time slots of the timeout period to send the first conflict confirmation frame / second conflict confirmation frame. For example, if the waiting time slot is 4, that is, the timeout period includes 4 time slots, NFC device 100 can choose to send the first conflict confirmation frame in the first time slot of these 4 time slots, and NFC device 300 can choose to send the second conflict confirmation frame in the third time slot of these 4 time slots. It is understood that NFC card reader 200 uses the waiting time slots in the conflict frame to allow NFC device 100 and NFC device 300 to send conflict confirmation frames in different time slots, avoiding conflicts when NFC card reader 200 receives conflict confirmation frames, which would prevent the NFC card reader 200 from properly receiving and recognizing the conflict confirmation frames.
[0327] In some embodiments of this application, the first and second conflict confirmation frames may include a frame header and a data segment. The data segment may include the aforementioned result code, and when the result code indicates a successful match, the data segment may also include card identification information of the NFC device. For example, when the result code in the first conflict confirmation frame indicates a successful match, the first conflict confirmation frame includes the card identification information of the NFC device 100 that sent the first conflict confirmation frame. When the result code in the second conflict confirmation frame indicates a successful match, the second conflict confirmation frame includes the card identification information of the NFC device 300 that sent the second conflict confirmation frame. An example of the conflict confirmation frame format can be found in [link to relevant documentation]. Figure 13 ,like Figure 13As shown, a conflict confirmation frame may include a frame header, a data segment, and a checksum. The frame header may include a protocol identifier field, a frame type field, and a length field. The data segment may include a result code. In some embodiments, the data segment may include the result code and card identification information of the NFC device (PICC mode) that sent the conflict confirmation frame. The card identification information may include a card type identifier and a card random number. The checksum may include a CRC code. The conflict confirmation frame and... Figure 8 The notification confirmation frame is similar. The fields in the conflict confirmation frame are described in Table 6 below.
[0328] Table 6
[0329]
[0330] For example Figure 13 As shown, the value of the protocol identifier field in the frame header of the conflict confirmation frame can be the identifier of the first NFC protocol, "0x7C". The value of the frame type field in the frame header of the conflict confirmation frame can be "0x04".
[0331] In some embodiments of this application, the result code in the data segment of the conflict confirmation frame can indicate the matching result of the device feature information of the NFC device (PICC mode) sending the conflict confirmation frame and the NFC card reader 200. In some examples, when the result code in the data segment of the conflict confirmation frame is 0x00, it indicates that the device feature information of the NFC device in PICC mode sending the conflict confirmation frame and the NFC card reader 200 is successfully matched. When the result code in the data segment of the conflict confirmation frame is 0x01, it indicates that the device feature information of the NFC device in PICC mode sending the conflict confirmation frame and the NFC card reader 200 is not matched.
[0332] In some embodiments of this application, when the result code in the data segment of the conflict confirmation frame indicates a successful match, the data segment of the conflict confirmation frame may further include card identification information (including card type identifier and card random number) of the PICC mode NFC device that sent the conflict confirmation frame. The card type identifier in the data segment of the conflict confirmation frame can indicate the type of the PICC mode NFC device that sent the conflict confirmation frame. For example, a card type identifier value of 0x01 indicates an active device (e.g., a mobile phone, computer, or other electronic device), and a value of 0x02 indicates a passive device (e.g., a physical NFC tag card). The card random number in the data segment of the conflict confirmation frame can be the card random number of the PICC mode NFC device that sent the conflict confirmation frame; different PICC mode NFC devices may have different card random numbers. In some examples, when the result code in the data segment of the conflict confirmation frame indicates a successful match, the length of the frame header of the conflict confirmation frame can be "0x06", that is, the length of the data segment (including the result code, card type identifier, and card random number) is 6 bytes.
[0333] S207: NFC card reader 200 identifies the target NFC device from NFC device 100 and NFC device 300.
[0334] In some embodiments of this application, the NFC card reader 200 can determine the matching result of the device feature information of the NFC device 100 and the NFC card reader 200 based on the result code in the first conflict confirmation frame sent by the NFC device 100. When the matching result is successful, the NFC card reader 200 can also obtain the card identification information of the NFC device 100 from the first conflict confirmation frame. The NFC card reader 200 can determine the matching result of the device feature information of the NFC device 300 and the NFC card reader 200 based on the result code in the second conflict confirmation frame sent by the NFC device 300. When the matching result is successful, the NFC card reader 200 can also obtain the card identification information of the NFC device 300 from the second conflict confirmation frame.
[0335] In some embodiments of this application, the NFC card reader 200 can determine the target NFC device from the NFC device 100 and the NFC device 300 based on a first conflict confirmation frame and a second conflict confirmation frame. The target NFC device is an NFC device that successfully matches the device feature information of the NFC card reader 200 and the card identification information required by the NFC card reader 200. Figure 11 The explanation will be based on NFC device 100 as an example.
[0336] In some examples, the device feature information of NFC device 100 and NFC card reader 200 matches successfully, while the device feature information of NFC device 300 and NFC card reader 200 fails to match. That is, the result code in the first conflict confirmation frame indicates a successful match, while the result code in the second conflict confirmation frame indicates a failed match. In this case, the target NFC device is NFC device 100, which matches the device feature information of NFC card reader 200. For a detailed process example, please refer to [link to example]. Figure 15 Details will not be elaborated here.
[0337] In some examples, both NFC device 100 and NFC device 300 successfully match the device feature information of NFC card reader 200, meaning that the result codes in both the first and second conflict confirmation frames indicate a successful match. In this case, NFC card reader 200 can obtain the card identification information of NFC device 100 from the first conflict confirmation frame and the card identification information of NFC device 300 from the second conflict confirmation frame. NFC card reader 200 can then determine, according to preset rules, the target NFC device that successfully matches the card identification information required by NFC card reader 200 from NFC device 100 and NFC device 300. These preset rules can be determined based on user needs, such as through statistical analysis of the usage habits of a large number of users.
[0338] For example, the card type identifier of NFC device 100 indicates that NFC device 100 is an active device, while the card type identifier of NFC device 300 indicates that NFC device 300 is a passive device. The default rule is to prioritize active devices, that is, if the card type identifier required by NFC card reader 200 indicates an active device, then the target NFC device is NFC device 100, which successfully matches the device feature information of NFC card reader 200 and is an active device. For a specific process example, please refer to [link to example]. Figure 16 Details will not be elaborated here.
[0339] For example, the card type identifier of NFC device 100 indicates that NFC device 100 is an active device, and the card type identifier of NFC device 300 indicates that NFC device 300 is an active device; or the card type identifier of NFC device 100 indicates that NFC device 100 is a passive device, and the card type identifier of NFC device 300 indicates that NFC device 300 is a passive device. That is, the types of NFC device 100 and NFC device 300 are the same. The preset rule is to prioritize the NFC device with the smaller card random number among multiple NFC devices of the same type. That is, the card random number required by NFC card reader 200 is smaller. Assuming that the card random number of NFC device 100 is smaller than the card random number of NFC device 300, the target NFC device is NFC device 100, which successfully matches the device feature information of NFC card reader 200 and has the smaller card random number. It is not limited to this. In specific implementations, the preset rule can also be to prioritize the NFC device with the larger card random number among multiple NFC devices of the same type. This application embodiment does not limit the preset rule. For specific process examples, please refer to Figure 17 Details will not be elaborated here.
[0340] S208: NFC card reader 200 sends a pick frame (carrying card identification information of the target NFC device) to NFC device 100 and NFC device 300.
[0341] In some embodiments of this application, the pick frame may include card identification information of the target NFC device (PICC mode) of the NFC card reader 200.
[0342] In some embodiments of this application, the Pick frame may include third control information. The third control information in these embodiments may also be referred to as second information. The third control information may include at least one of the following fields: a selected device identifier field, an anti-collision identifier field, and a card matching field. The selected device identifier field is used to indicate whether the NFC device (PICC mode) receiving the Pick frame reports a matching result with the device feature information of the NFC card reader 200. The anti-collision identifier field is used to indicate whether a card collision exists. The card matching field is used to indicate whether the NFC device (PICC mode) receiving the Pick frame reports a matching result with the card identifier information of the target NFC device in the Pick frame. In some examples, the third control information includes a selected identifier field and a card matching field, with the selected identifier field preceding the card matching field. In some examples, the length of each of the three fields in the above examples is 1 bit. In some examples, the third control information is as follows: Figure 14The control information shown is provided below. Examples of the third control information are for illustrative purposes only and should not be construed as limiting the scope of this application. This application does not limit the number, position, or length of the fields included in the third control information; therefore, examples will not be provided here.
[0343] In some embodiments of this application, the third control information in the Pick frame can be used to instruct the NFC device (PICC mode) receiving the Pick frame to provide a matching result between the NFC device and the card identification information of the target NFC device in the Pick frame. For example, the third control information in the Pick frame may include a card matching field, which instructs the NFC device (PICC mode) receiving the Pick frame to provide a matching result between the NFC device and the card identification information of the target NFC device in the Pick frame.
[0344] In some examples, the NFC reader device 200 can broadcast a Pick frame (carrying the card identification information of the target NFC device) through the radio frequency field, so that the NFC device (PICC mode) whose card identification information matches the target NFC device in the radio frequency field responds with a successful match result, and the NFC device (PICC mode) whose card identification information does not match the target NFC device in the radio frequency field responds with a failed match result.
[0345] In some embodiments of this application, the Pick frame may include a frame header and a data segment. The frame header may include the aforementioned third control information, and the data segment may include card identification information of the target NFC device of the NFC reader 200. An example of the Pick frame format can be found here. Figure 14 ,like Figure 14 As shown, a Pick frame may include a frame header, a data segment, and a checksum. The frame header may include a protocol identifier field, a frame type field, a control information field, and a length field. The data segment of the Pick frame may include a card identifier element, and the checksum may include a CRC code. The card identifier element may include card identifier information (including a card type identifier and a card random number) of the target NFC device of the NFC reader 200. Optionally, the card identifier element may also include an element code. The fields in the Pick frame header and... Figure 8 The fields in the frame header of the Notify frame are similar. For example... Figure 14 As shown, the value of the protocol identifier field in the header of the Pick frame can be the identifier of the first NFC protocol, "0x7C". The value of the frame type field in the header of the Pick frame can be "0x05".
[0346] In some embodiments of this application, the control information in the Pick frame may include 8 bits, namely bit0 and bit7, each bit can be 0 or 1. Bit0 in this control information can serve as a device selection identifier field, bit1 as an anti-collision identifier field, and bit2 as a card matching field. The control information in the Pick frame includes bits 0, bit1, and bits 3-7... Figure 8 The control information in the Notify frame includes bits 0, 1, and 3-7, which are similar. When bit 2 in the Pick frame is 1, it instructs the NFC device (PICC mode) receiving the Pick frame to provide a matching result with the card identification information of the target NFC device in the Pick frame. When bit 2 in the Pick frame is 0, it instructs the NFC device (PICC mode) receiving the Pick frame not to provide a matching result with the card identification information of the target NFC device in the Pick frame.
[0347] In some embodiments of this application, the control information in the frame header of the Pick frame can be the aforementioned third control information. For example, as shown... Figure 14 As shown, the control information in the header of the Pick frame can be "0x04". In this "0x04" control information, bits 0, 1, 3 to 7 are all 0, and bit 2 is 1. This indicates the matching result between the NFC device receiving the Pick frame (PICC mode) and the card identification information of the target NFC device in the Pick frame. Optionally, the length of the Pick frame header can be "0x06", indicating that the data segment of the Pick frame is 6 bytes long.
[0348] Not limited to the control information in the Pick frame in the example above, in some other examples, the control information does not include the anti-collision flag field. Bit 1, which is the anti-collision flag field, can be used as the card matching field, and bit 2, which is the card matching field, can be reserved to indicate other meanings or not indicate any meaning. In this case, the value of the control information in the frame header of the Pick frame can be "0x02". In this control information with a value of "0x02", bits 0, 2 to 7 are 0, and bit 1 is 1. The embodiments of this application do not limit the indication meaning of each bit in the control information.
[0349] The fields included in the data segment (i.e., card identification element) of the Pick frame can be found in Table 7 below.
[0350] Table 7
[0351]
[0352] Among them, the explanation of the element code and Figure 8 The explanation of the element code in the same way is similar. As shown in Table 7, the Pick frame carries the card identification element. Therefore, the element code in the Pick frame is used to indicate the identifier of the card identification element, for example, the value is "0x01".
[0353] As shown in Table 7, the card type identifier in the Pick frame can indicate the type of the target NFC device of the NFC reader 200. For example, a card type identifier value of 0x01 indicates an active device (such as a mobile phone, computer, or other electronic device), while a value of 0x02 indicates a passive device (such as a physical NFC tag card). The card random number in the Pick frame can be the card random number of the target NFC device of the NFC reader 200.
[0354] S209: NFC device 100 sends a first pick ACK frame to NFC card reader 200 (indicating that the card identification information of NFC device 100 and the target NFC device are successfully matched).
[0355] S210: NFC device 300 sends a second Pick ACK frame to NFC card reader 200 (indicating that the card identification information of NFC device 300 and the target NFC device failed to match).
[0356] S211: The NFC card reader 200 and the NFC device 100 perform NFC signaling interaction to complete the first PICC card swiping service.
[0357] The order of S209 and S210 is not limited in the embodiments of this application.
[0358] In some embodiments of this application, the first Pick ACK frame and the second Pick ACK frame may include a result code, which may indicate the matching result between the NFC device (PICC mode) sending the Pick ACK frame and the card identification information of the target NFC device in the Pick frame, such as success or failure. In some embodiments of this application, the NFC device 100 / NFC device 300 may obtain the card identification information of the target NFC device carried in the Pick frame and determine, according to the third control information in the Pick frame: when the NFC device 100 / NFC device 300 and the card identification information of the target NFC device match successfully, a successful matching result is returned to the NFC card reader 200; when the NFC device 100 / NFC device 300 and the card identification information of the target NFC device fail to match, a failed matching result is returned to the NFC card reader 200.
[0359] In some embodiments of this application, successful matching of card identification information between NFC device 100 / NFC device 300 and target NFC device may include: the card type identifier of NFC device 100 / NFC device 300 is the same as the card type identifier of target NFC device; optionally, it may also include: the card random number of NFC device 100 / NFC device 300 is the same as the card random number of target NFC device.
[0360] In some embodiments of this application, the first selection confirmation frame and the second selection confirmation frame may include a frame header and a data segment, and the data segment may include the aforementioned result code. The frame headers of the first selection confirmation frame and the second selection confirmation frame are... Figure 8 The header of the NotifyACK frame is similar. The length of the result code in the data segment of the first select confirmation frame / second select confirmation frame can be 1 byte. The result code in the data segment of the first select confirmation frame / second select confirmation frame can indicate the matching result of the card identification information between the NFC device (PICC mode) sending the first select confirmation frame / second select confirmation frame and the target NFC device.
[0361] In some examples, when the result code in the data segment of the first selection confirmation frame / second selection confirmation frame is 0x00, it indicates that the NFC device 100 / NFC device 300 and the card identification information of the target NFC device in the selection frame have successfully matched. When the result code in the data segment of the first selection confirmation frame / second selection confirmation frame is 0x01, it indicates that the NFC device 100 / NFC device 300 and the card identification information of the target NFC device in the selection frame have failed to match.
[0362] Figure 11 Taking the example where the NFC reader 200 receives a first selection confirmation frame indicating that the NFC device 100 and the target NFC device in the selection frame have successfully matched the card identification information, and a second selection confirmation frame indicating that the NFC device 300 and the target NFC device in the selection frame have failed to match, the following explanation is provided. Therefore, the NFC reader 200 can determine that the NFC device 100 is selected, that is, the NFC device 100 is determined to be the target NFC device of the NFC reader 200 in PCD mode (PICC mode), and the NFC device 300 is not the target NFC device of the NFC reader 200. The NFC reader 200 can then perform NFC signaling interaction with the selected NFC device 100. Specific examples and... Figure 8 The example of NFC signaling interaction between the NFC card reader 200 and the selected NFC device 100 is similar.
[0363] Not limited to the above embodiments, in other embodiments of this application, the NFC device (PICC mode) that fails to match the card identification information of the target NFC device may not send a selection confirmation frame to the NFC reader 200, i.e., S210 is an optional step. The NFC reader 200 may default to not sending a selection confirmation frame if the NFC device (PICC mode) and the target NFC device fail to match the card identification information. Optionally, the third control information in the Pick frame may not indicate that the NFC device (PICC mode) that fails to match the card identification information of the target NFC device responds to the matching failure result.
[0364] Figure 11 For illustrative purposes only and not intended to be limiting, in some other embodiments of this application, the NFC card reader 200 can communicate with more NFC devices in PICC mode through anti-collision procedures, and the NFC card reader 200 can identify the target NFC device from among the more NFC devices in PICC mode.
[0365] Not limited thereto, in some other embodiments of this application, when the first conflict confirmation frame received by the NFC card reader 200 indicates that the device feature information of the NFC device 100 and the NFC card reader 200 in the conflict frame fails to match, and the second conflict confirmation frame indicates that the device feature information of the NFC device 300 and the NFC card reader 200 in the conflict frame fails to match, the NFC card reader 200 can determine that the NFC device 100 and the NFC device 300 are not the target NFC devices of the NFC card reader 200, and therefore will not send a selection frame, that is, will not execute S207-S211. The NFC card reader 200 can continue to send probe frames (e.g., periodically send probe frames) to select the target NFC device (PICC mode).
[0366] Not limited to this, in some other embodiments of this application, the NFC card reader 200 may also receive only one conflict confirmation frame. For example, if the NFC device 300 fails to send a second conflict confirmation frame due to a malfunction or other abnormal factors, the NFC card reader 200 may only receive the first conflict confirmation frame sent by the NFC device 100. In this case, the NFC card reader 200 can determine whether the NFC device 100 is the target NFC device based on the first conflict confirmation frame. When the result code in the first conflict confirmation frame indicates that the device feature information of the NFC device 100 and the NFC card reader 200 are successfully matched, the NFC card reader 200 can determine that the NFC device 100 is the target NFC device, and therefore can send a selection frame (carrying the card identification information of the NFC device 100) to perform NFC signaling interaction with the NFC device 100. When the result code in the first conflict confirmation frame indicates that the device feature information of NFC device 100 and NFC card reader 200 fails to match, NFC card reader 200 can determine that NFC device 100 is not the target NFC device, and therefore will not send a selection frame, that is, will not execute S207-S211. NFC card reader 200 can continue to send probe frames (e.g., periodically send probe frames) to select the target NFC device (PICC mode).
[0367] In addition to the control elements described in the above embodiments, in some other embodiments of this application, the control elements may not include element codes. For example, when NFC transmission frames (such as Notify frames, Pick frames, and Conflict frames, etc.) carry different control elements, the value of the frame type field in the frame header of the NFC transmission frame may be different. Therefore, the NFC device that receives the NFC transmission frame carrying the control element can determine the type of the control element through the frame type field.
[0368] The length and values of fields in the NFC transmission frames in the above examples are only used to explain this application and should not be construed as limiting the embodiments of this application.
[0369] The following examples illustrate the implementation process of card conflict handling methods in some card conflict scenarios.
[0370] Figure 15 This is a flowchart illustrating another card conflict handling method provided in the embodiments of this application.
[0371] Figure 15 The process shown can be Figure 11 The illustrated card conflict handling method is implemented in the first card conflict scenario. In the first card conflict scenario, the device feature information of NFC device 100 and NFC card reader 200 is successfully matched, while the device feature information of NFC device 300 and NFC card reader 200 fails to match. The first card conflict scenario is, for example,... Figure 7A , Figure 7B or Figure 7C The scene shown.
[0372] Figure 15 The method shown may include, but is not limited to, the following steps:
[0373] S300: NFC device 100 enters the radio frequency field of NFC card reader 200, and NFC device 300 enters the radio frequency field of NFC card reader 200.
[0374] S301: NFC card reader 200 sends a probe frame to NFC device 100 and NFC device 300.
[0375] S302: NFC device 100 sends a first probe ACK frame to NFC card reader 200.
[0376] S303: NFC device 300 sends a second probe ACK frame to NFC card reader 200.
[0377] S304: NFC card reader 200 sends a conflict frame (carrying device feature information of NFC card reader 200) to NFC device 100 and NFC device 300.
[0378] Figure 15 S300-S304 and Figure 11 The S200-S204 are the same, so I will not go into details.
[0379] S305: NFC device 100 sends a first conflict ACK frame to NFC card reader 200 (indicating that the device feature information of NFC device 100 and NFC card reader 200 has been successfully matched).
[0380] S306: NFC device 300 sends a second Conflict ACK frame to NFC card reader 200 (indicating that the device feature information of NFC device 300 and NFC card reader 200 failed to match).
[0381] S307: NFC card reader 200 determines that the target NFC device is NFC device 100.
[0382] Figure 15 S305-S307 and Figure 11Similar to S205-S207, in S305-S307, the result code in the first conflict confirmation frame indicates that the device feature information of NFC device 100 and NFC card reader 200 is successfully matched, and the result code in the second conflict confirmation frame indicates that the device feature information of NFC device 300 and NFC card reader 200 fails to match. Therefore, NFC card reader 200 can determine that the target NFC device is NFC device 100, which is successfully matched with the device feature information of NFC card reader 200.
[0383] S308: NFC card reader 200 sends a pick frame (carrying card identification information of the target NFC device) to NFC device 100 and NFC device 300.
[0384] Figure 15 S308 and Figure 11 Similar to S208, in S308, the card identification information of the target NFC device carried by the Pick frame is the card identification information of NFC device 100.
[0385] S309: NFC device 100 sends a first pick ACK frame to NFC card reader 200 (indicating that the card identification information of NFC device 100 and the target NFC device has been successfully matched).
[0386] Figure 15 S309 and Figure 11 Similar to S209, in S309, the result code in the first selection confirmation frame indicates that the NFC device 100 and the card identification information of the target NFC device carried in the Pick frame are successfully matched. For example, the card type identifier of the NFC device 100 is the same as the card type identifier carried in the Pick frame, and the card random number of the NFC device 100 is the same as the card random number carried in the Pick frame.
[0387] S310: NFC device 300 sends a second Pick ACK frame to NFC card reader 200 (indicating that the card identification information of NFC device 300 and the target NFC device failed to match).
[0388] Figure 15 S310 and Figure 11 Similar to S210, in S310, the result code in the second selection confirmation frame indicates that the NFC device 300 and the card identification information of the target NFC device carried in the Pick frame have failed to match. For example, the card type identifier of the NFC device 300 is different from the card type identifier carried in the Pick frame, and / or, the card random number of the NFC device 300 is different from the card random number carried in the Pick frame.
[0389] S310 is an optional step. When the card identification information of the NFC device 300 and the target NFC device fails to match, the NFC device 300 may send a second selection confirmation frame to the NFC card reader 200, or it may not send a second selection confirmation frame.
[0390] S311: The NFC card reader 200 and the NFC device 100 perform NFC signaling interaction to complete the first PICC card swiping service.
[0391] In some embodiments of this application, after receiving the first selection confirmation frame, the NFC card reader 200 can determine that the NFC device 100 is selected, that is, determine that the NFC device 100 is the target NFC device (PICC mode) of the NFC card reader 200 in PCD mode. The NFC card reader 200 and the selected NFC device 100 perform NFC signaling interaction to complete the card swiping service of the first PICC. Wherein, when the NFC device 100 is a passive device, the first PICC can be the NFC device 100 itself. When the NFC device 100 is an active device, the first PICC can be an NFC simulated card determined from one or more NFC simulated cards included in the NFC device 100. The first PICC is an NFC simulated card that successfully matches the device feature information of the NFC card reader 200. Specific examples and... Figure 8 The example of NFC signaling interaction between the NFC card reader 200 and the selected NFC device 100 is similar.
[0392] For example, Figure 15 The device identification elements shown indicate that the service type of the NFC card reader 200 is transportation, and that the city where the NFC card reader 200 is located is location A. In other words, the NFC card reader 200 is a transportation-type card reader for location A. Figure 15 The NFC device 100 shown is either a passive device and a transit card for location A, or an active device and includes an NFC analog card for a transit card for location A. Figure 15 If the NFC device 300 shown is an access card, a transportation card for location B, a car key, or other NFC devices, then the NFC card reader 200 can select the NFC device 100 that successfully matches the device feature information of the NFC card reader 200 from the NFC device 100 and the NFC device 300.
[0393] exist Figure 15In the method shown, when the NFC card reader 200 (PCD mode) receives detection confirmation frames sent by multiple NFC devices (PICC mode), i.e., in a card conflict scenario, the target NFC device (PICC mode) can be selected through the device feature information in the conflict frame. That is, the target NFC device (PICC mode) that successfully matches the device feature information of the NFC card reader 200 is selected. This ensures that the selected NFC device (PICC mode) meets the requirements of the NFC card reader 200, avoids card swiping failure, and improves the user's card swiping experience.
[0394] Figure 16 This is a flowchart illustrating another card conflict handling method provided in the embodiments of this application.
[0395] Figure 16 The process shown can be Figure 11 The illustrated card conflict handling method is implemented in a second card conflict scenario. In this scenario, both NFC device 100 and NFC device 300 successfully match the device feature information of NFC card reader 200. NFC device 100 is an active device, and NFC device 300 is a passive device. For example, in the second card conflict scenario... Figure 7A The scene shown.
[0396] Figure 16 The method shown may include, but is not limited to, the following steps:
[0397] S400: NFC device 100 enters the radio frequency field of NFC card reader 200, and NFC device 300 enters the radio frequency field of NFC card reader 200.
[0398] S401: NFC card reader 200 sends a probe frame to NFC device 100 and NFC device 300.
[0399] S402: NFC device 100 sends a first probe ACK frame to NFC card reader 200.
[0400] S403: NFC device 300 sends a second probe ACK frame to NFC card reader 200.
[0401] S404: NFC card reader 200 sends a conflict frame (carrying device feature information of NFC card reader 200) to NFC device 100 and NFC device 300.
[0402] Figure 16 S400-S404 and Figure 11 The S200-S204 are the same, so I will not go into details.
[0403] S405: NFC device 100 sends a first conflict ACK frame to NFC card reader 200 (indicating that the device feature information of NFC device 100 and NFC card reader 200 has been successfully matched).
[0404] S406: NFC device 300 sends a second Conflict ACK frame to NFC card reader 200 (indicating that the device feature information of NFC device 300 and NFC card reader 200 has been successfully matched).
[0405] S407: NFC card reader 200 determines that the target NFC device is NFC device 100.
[0406] Figure 16 S405-S407 and Figure 11 Similar to S205-S207, in S405-S407, the result code in the first conflict confirmation frame indicates that the device feature information of NFC device 100 and NFC card reader 200 has been successfully matched. The first conflict confirmation frame also includes the card identification information of NFC device 100. The card type identifier of NFC device 100 indicates that NFC device 100 is an active device, for example, the value of the card type identifier is "0x01". The result code in the second conflict confirmation frame indicates that the device feature information of NFC device 300 and NFC card reader 200 has been successfully matched. The second conflict confirmation frame also includes the card identification information of NFC device 300. The card type identifier of NFC device 300 indicates that NFC device 300 is a passive device, for example, the value of the card type identifier is "0x02". The NFC card reader 200 can determine the target NFC device based on preset rule 1, the card identification information of the NFC device 100 carried in the first conflict confirmation frame, and the card identification information of the NFC device 300 carried in the second conflict confirmation frame. The preset rule 1 may include preferential selection of active devices. Therefore, the NFC card reader 200 determines that the target NFC device is the NFC device 100, which is an active device and whose device feature information matches the NFC card reader 200.
[0407] S408: NFC card reader 200 sends a pick frame (carrying card identification information of the target NFC device) to NFC device 100 and NFC device 300.
[0408] Figure 16 S408 and Figure 11 Similar to S208, in S408, the card identification information of the target NFC device carried by the Pick frame is the card identification information of NFC device 100.
[0409] S409: NFC device 100 sends a first pick ACK frame to NFC card reader 200 (indicating that the card identification information of NFC device 100 and the target NFC device has been successfully matched).
[0410] Figure 16 S409 and Figure 11 Similar to S209, in S409, the result code in the first selection confirmation frame indicates that the NFC device 100 and the card identification information of the target NFC device carried in the Pick frame are successfully matched. For example, the card type identifier of the NFC device 100 is the same as the card type identifier carried in the Pick frame, and optionally, the card random number of the NFC device 100 is the same as the card random number carried in the Pick frame.
[0411] S410: NFC device 300 sends a second Pick ACK frame to NFC card reader 200 (indicating that the card identification information of NFC device 300 and the target NFC device failed to match).
[0412] Figure 16 S410 and Figure 11 Similar to S210, in S410, the result code in the second selection confirmation frame indicates that the card identification information of the target NFC device carried in the Pick frame and the NFC device 300 failed to match. For example, the card type identifier of the NFC device 300 is different from the card type identifier carried in the Pick frame, or the card random number of the NFC device 300 is different from the card random number carried in the Pick frame.
[0413] S410 is an optional step, meaning that when the card identification information of the NFC device 300 and the target NFC device fails to match, the NFC device 300 may send a second selection confirmation frame to the NFC card reader 200, or it may not send a second selection confirmation frame.
[0414] S411: The NFC card reader 200 and the NFC device 100 perform NFC signaling interaction to complete the first PICC card swiping service.
[0415] Figure 16 S411 and Figure 15 Similar to the S311, it will not be described in detail.
[0416] For example, Figure 16The NFC card reader 200 shown is an access control gate for community A, the NFC device 100 is an electronic device such as a mobile phone, the NFC device 100 includes an NFC simulation card of the access control card for community A, and the NFC device 300 is the physical access control card for community A. Then, the NFC card reader 200 can select the NFC device 100 that successfully matches the device feature information of the NFC card reader 200 and is an active device from the NFC device 100 and the NFC device 300.
[0417] exist Figure 16 In the method shown, when the NFC card reader 200 (PCD mode) receives probe confirmation frames from both an active NFC device (PICC mode) and a passive NFC device (PICC mode), i.e., in a card conflict scenario, the target NFC device (PICC mode) can be selected using the device feature information in the conflict frame and the card type identifier in the selection frame. Specifically, the NFC device (PICC mode) that successfully matches both the device feature information of the NFC card reader 200 and the card type identifier required by the NFC card reader 200 can be selected. The card type identifier required by the NFC card reader 200 can be determined according to user needs. For example, the NFC device (PICC mode) whose card type identifier indicates an active device can be selected. This ensures that the selected NFC device (PICC mode) not only meets the needs of the NFC card reader 200 but also meets the user's needs, improving the user's card-swiping experience.
[0418] Figure 17 This is a flowchart illustrating another card conflict handling method provided in the embodiments of this application.
[0419] Figure 17 The process shown can be Figure 11 The illustrated card conflict handling method is implemented in a third card conflict scenario. In this third card conflict scenario, both NFC device 100 and NFC device 300 successfully match the device feature information of NFC card reader 200. Both NFC device 100 and NFC device 300 are passive devices; however, this is not a limitation. In other examples, both NFC device 100 and NFC device 300 can be active devices. For example, in the second card conflict scenario... Figure 7B or Figure 7C The scene shown.
[0420] Figure 17 The method shown may include, but is not limited to, the following steps:
[0421] S500: NFC device 100 enters the radio frequency field of NFC card reader 200, and NFC device 300 enters the radio frequency field of NFC card reader 200.
[0422] S501: NFC card reader 200 sends a probe frame to NFC device 100 and NFC device 300.
[0423] S502: NFC device 100 sends a first probe ACK frame to NFC card reader 200.
[0424] S503: NFC device 300 sends a second probe ACK frame to NFC card reader 200.
[0425] S504: NFC card reader 200 sends a conflict frame (carrying device feature information of NFC card reader 200) to NFC device 100 and NFC device 300.
[0426] Figure 17 S500-S504 and Figure 11 The S200-S204 are the same, so I will not go into details.
[0427] S505: NFC device 100 sends a first conflict ACK frame to NFC card reader 200 (indicating that the device feature information of NFC device 100 and NFC card reader 200 has been successfully matched).
[0428] S506: NFC device 300 sends a second Conflict ACK frame to NFC card reader 200 (indicating that the device feature information of NFC device 300 and NFC card reader 200 has been successfully matched).
[0429] S507: When the card random number of NFC device 100 is less than the card random number of NFC device 300, NFC card reader 200 determines that the target NFC device is NFC device 100.
[0430] Figure 17 S505-S507 and Figure 11Similar to S205-S207, in S505-S507, the result code in the first conflict confirmation frame indicates that the device feature information of NFC device 100 and NFC card reader 200 has successfully matched. The first conflict confirmation frame also includes card identification information of NFC device 100. The card type identifier of NFC device 100 indicates that NFC device 100 is a passive device. The card identification information of NFC device 100 includes the card random number 1 of NFC device 100. The result code in the second conflict confirmation frame indicates that the device feature information of NFC device 300 and NFC card reader 200 has successfully matched. The second conflict confirmation frame also includes card identification information of NFC device 300. The card type identifier of NFC device 300 indicates that NFC device 300 is a passive device. The card identification information of NFC device 300 includes the card random number 2 of NFC device 300. The NFC card reader 200 can determine the target NFC device based on preset rule 2, the card identification information of NFC device 100 carried in the first conflict confirmation frame, and the card identification information of NFC device 300 carried in the second conflict confirmation frame. Preset rule 2 may include prioritizing the device with the smaller card random number among multiple active or passive devices. Since the card random number 1 of NFC device 100 is less than the card random number 2 of NFC device 300, the NFC card reader 200 determines the target NFC device as the NFC device 100 whose device feature information matches the NFC card reader 200 and has the smaller card random number. However, this is not limited to this; in other examples, preset rule 2 may also prioritize the device with the larger card random number among multiple active or passive devices, and the NFC card reader 200 determines the target NFC device as the NFC device whose device feature information matches the NFC card reader 200 and has the larger card random number.
[0431] S508: NFC card reader 200 sends a pick frame (carrying card identification information of the target NFC device) to NFC device 100 and NFC device 300.
[0432] Figure 17 S508 and Figure 11 Similar to S208, in S508, the card identification information of the target NFC device carried by the Pick frame is the card identification information of NFC device 100.
[0433] S509: NFC device 100 sends a first pick ACK frame to NFC card reader 200 (indicating that the card identification information of NFC device 100 and the target NFC device are successfully matched).
[0434] Figure 17 S509 and Figure 11Similar to S209, in S509, the result code in the first selection confirmation frame indicates that the NFC device 100 and the card identification information of the target NFC device carried in the Pick frame are successfully matched. For example, the card type identifier of the NFC device 100 is the same as the card type identifier carried in the Pick frame, and the card random number of the NFC device 100 is the same as the card random number carried in the Pick frame.
[0435] S510: NFC device 300 sends a second Pick ACK frame to NFC card reader 200 (indicating that the card identification information of NFC device 300 and the target NFC device failed to match).
[0436] Figure 17 S510 and Figure 11 Similar to S210, in S510, the result code in the second selection confirmation frame indicates that the card identification information of the target NFC device carried in the Pick frame fails to match between the NFC device 300 and the card type identification carried in the Pick frame. For example, the card type identification of the NFC device 300 is the same as the card type identification carried in the Pick frame, and the card random number of the NFC device 300 is different from the card random number carried in the Pick frame.
[0437] S510 is an optional step. When the card identification information of the NFC device 300 and the target NFC device fails to match, the NFC device 300 may send a second selection confirmation frame to the NFC card reader 200, or it may not send a second selection confirmation frame.
[0438] S511: The NFC card reader 200 and the NFC device 100 perform NFC signaling interaction to complete the first PICC card swiping service.
[0439] Figure 17 S511 and Figure 15 Similar to the S311, it will not be described in detail.
[0440] For example, Figure 17 The NFC card reader 200 shown is a bank service terminal of Bank A, and the NFC device 100 and NFC device 300 are both physical bank cards of Bank A.
[0441] exist Figure 17In the method shown, when the NFC card reader 200 (PCD mode) receives detection confirmation frames from multiple passive devices (PICC mode) / multiple active devices (PICC mode), i.e., in a card conflict scenario, the target NFC device (PICC mode) can be selected by using the device feature information in the conflict frame and the card random number in the selection frame. That is, the NFC device (PICC mode) that successfully matches the device feature information of the NFC card reader 200 and the card random number required by the NFC card reader 200 is selected. For example, the NFC device (PICC mode) with the smaller card random number is selected. This ensures that the selected NFC device (PICC mode) meets the requirements of the NFC card reader 200, solves the problem of conflict between multiple passive devices (PICC mode) / multiple active devices (PICC mode), and improves the user's card swiping experience.
[0442] Not limited to the above embodiments, in other embodiments of this application, the NFC card reader 200 (PCD mode) has not only NFC devices supporting the first NFC protocol (PICC mode) within its radio frequency field, but also NFC devices that do not support the first NFC protocol but support the second NFC protocol (PICC mode). For example, the second NFC protocol can be the contactless card standard ISO14443 / IEC14443 protocol. In some examples, the NFC card reader 200 may preferentially select NFC devices supporting the first NFC protocol (PICC mode). Specific process examples can be found in [link to relevant documentation]. Figure 18 The first NFC protocol can communicate faster than the second NFC protocol, thus speeding up card swiping and improving the user's card swiping experience.
[0443] Figure 18 This is a flowchart illustrating another card conflict handling method provided in the embodiments of this application.
[0444] Figure 18 The method shown can be applied to an NFC system including NFC device 100, NFC card reader 200, NFC device 300, and NFC device 400. The description of NFC device 400 is similar to that of NFC device 100. NFC devices 100, 300, and 400 can be in PICC mode. For example, active NFC devices 100, 300, and 400 are in PICC mode by default after enabling NFC functionality. NFC card reader 200 can be in PCD mode.
[0445] Figure 18The fourth card conflict scenario is illustrated below. In this scenario, NFC device 100 is an active device that supports both the first and second NFC protocols. For example, NFC device 100 may be a mobile phone or other electronic device, and it includes an NFC analog card 1 supporting the first NFC protocol and an NFC analog card 2 supporting the second NFC protocol. NFC device 300 is a passive device that supports the first NFC protocol but does not support the second NFC protocol. For example, NFC device 300 may be a physical NFC tag card supporting the first NFC protocol. NFC device 400 is also a passive device, and NFC device 300 may not support the first NFC protocol but supports the second NFC protocol. For example, NFC device 400 may be a physical NFC tag card supporting the second NFC protocol. In the fourth card conflict scenario, both NFC device 100 and NFC device 300 successfully match the device feature information of NFC card reader 200.
[0446] Figure 18 The method shown may include, but is not limited to, the following steps:
[0447] S600: NFC card reader 200 sends a first NFC protocol probe frame.
[0448] In some embodiments of this application, the NFC card reader 200 can broadcast a probe frame of the first NFC protocol via a radio frequency field.
[0449] In some embodiments of this application, the NFC card reader 200 may support a first NFC protocol and a second NFC protocol, and the NFC card reader 200 may alternately poll the first NFC protocol and the second NFC protocol. Polling the first NFC protocol may include sending a probe frame of the first NFC protocol, and polling the second NFC protocol may include sending a request command of the second NFC protocol. In some examples, the NFC card reader 200 may sequentially perform the following actions within the radio frequency field in chronological order: broadcasting a probe frame of the first NFC protocol, broadcasting a request command of the second NFC protocol, broadcasting a probe frame of the first NFC protocol, broadcasting a request command of the second NFC protocol, and so on.
[0450] S601: NFC device 100 enters the radio frequency field of NFC card reader 200, NFC device 300 enters the radio frequency field of NFC card reader 200, and NFC device 400 enters the radio frequency field of NFC card reader 200. This application embodiment does not limit the order in which NFC device 100, NFC device 300, and NFC device 400 enter the radio frequency field of NFC card reader 200.
[0451] S602: NFC card reader 200 sends a request command for the second NFC protocol to NFC device 100, NFC device 300 and NFC device 400.
[0452] In some embodiments of this application, the request command of the second NFC protocol may be request command type A (REQA) or request command type B (REQB) in the ISO14443 / IEC14443 protocol.
[0453] In some embodiments of this application, NFC devices 100, 300 and 400 enter the radio frequency field of NFC card reader 200 after S600 and before S602. Therefore, after NFC devices 100, 300 and 400 enter the radio frequency field of NFC card reader 200, they can first receive the second NFC protocol request command sent by NFC card reader 200.
[0454] S603: NFC device 400 sends a request-response command for the second NFC protocol to NFC card reader 200.
[0455] In some embodiments of this application, the request-response command of the second NFC protocol can be either answer to request type A (ATQA) or answer to request type B (ATQB) in the ISO14443 / IEC14443 protocol. In the ISO14443 / IEC14443 protocol, an NFC device in PICC mode that receives REQA / REQB can return ATQA / ATQB if it supports the ISO14443 / IEC14443 protocol. In some embodiments of this application, after receiving the request command, the NFC device 400 supporting the second NFC protocol can send a request-response command to the NFC card reader 200.
[0456] In some embodiments of this application, after receiving a request command, the NFC device 300 that does not support the second NFC protocol may not send a request response command to the NFC card reader 200.
[0457] In some embodiments of this application, the NFC device 100 is an active device. The NFC device 100 supports a first NFC protocol and a second NFC protocol. The NFC device 100 can be preset to prioritize the use of the first NFC protocol. Therefore, after receiving a request command, the NFC device 100 may not send a request response command to the NFC card reader 200, but instead continue to monitor the polling command sent by the NFC card reader 200. For example, the NFC device 100 can set the end time of continued monitoring to the time when it receives the next request command of the second NFC protocol sent by the NFC card reader 200. Before this end time, if the NFC device 100 receives a probe frame of the first NFC protocol, it cancels the monitoring polling command and returns a probe confirmation frame (e.g., S604-S605 below). If the NFC device 100 does not receive a probe frame of the first NFC protocol, it returns a request response command when it receives the next request command of the second NFC protocol sent by the NFC card reader 200.
[0458] In some embodiments of this application, the NFC device 100 is an active device, and may include an NFC emulator card 1 supporting a first NFC protocol and an NFC emulator card 2 supporting a second NFC protocol. The NFC device 100 may first use the NFC emulator card 1 supporting the first NFC protocol to communicate with the NFC reader device 200. Therefore, after receiving a request command of the second NFC protocol, the NFC device 100 does not return a request-response command, but continues to monitor the polling commands sent by the NFC reader device 200, or returns a probe confirmation frame after receiving a probe frame of the first NFC protocol (e.g., S604-S605 below). If the NFC emulator card 1 supporting the first NFC protocol and the NFC reader device 200 fail to match, for example, if a probe frame of the first NFC protocol is not received within a preset time, the NFC device 100 may use the NFC emulator card 2 supporting the second NFC protocol to communicate with the NFC reader device 200. Therefore, after receiving a request command of the second NFC protocol, the NFC device 100 may return a request-response command.
[0459] S604: NFC card reader 200 sends a first NFC protocol probe frame to NFC device 100, NFC device 300 and NFC device 400.
[0460] In some embodiments of this application, the NFC card reader 200 may be preset to preferentially use the first NFC protocol. Therefore, when the NFC card reader 200 receives a request-response command sent by the NFC device 400, it may not select the NFC device 400 initially, but instead continue to perform the next polling, i.e., execute S604. For example, the NFC card reader 200 may set the end time of the polling to the time when it sends the next request command for the second NFC protocol. Before this end time, if the NFC card reader 200 receives a detection confirmation frame after sending the first NFC protocol detection frame, it ends the polling and performs communication using the first NFC protocol. If the NFC card reader 200 does not receive a detection confirmation frame after sending the first NFC protocol detection frame, it receives the request-response frame after sending the next request command for the second NFC protocol and performs communication using the second NFC protocol.
[0461] S605: NFC device 100 sends a first probe ACK frame to NFC card reader 200.
[0462] S606: NFC device 300 sends a second probe ACK frame to NFC card reader 200.
[0463] The order of S605 and S606 is not limited in the embodiments of this application.
[0464] In some embodiments of this application, NFC device 100 and NFC device 300 support the first NFC protocol. Therefore, after receiving the probe frame of the first NFC protocol, they can send the first NFC protocol probe acknowledgment (ProbeACK) frame to the NFC card reader 200. As a result, card conflict exists. The NFC card reader 200 can execute the anti-collision procedure of the first NFC protocol to select one of the NFC devices, NFC device 100 and NFC device 300, for communication of the first NFC protocol. The anti-collision procedure may include the following steps S607-S613.
[0465] In some embodiments of this application, the NFC device 400 does not support the first NFC protocol, and therefore will not return a first NFC protocol detection confirmation frame after receiving a first NFC protocol detection frame.
[0466] S607: NFC card reader 200 sends a conflict frame (carrying device feature information of NFC card reader 200) to NFC device 100 and NFC device 300.
[0467] S608: NFC device 100 sends a first conflict ACK frame to NFC card reader 200 (indicating that the device feature information of NFC device 100 and NFC card reader 200 has been successfully matched).
[0468] S609: NFC device 300 sends a second Conflict ACK frame to NFC card reader 200 (indicating that the device feature information of NFC device 300 and NFC card reader 200 has been successfully matched).
[0469] S610: NFC card reader 200 determines that the target NFC device is NFC device 100.
[0470] S611: NFC card reader 200 sends a pick frame (carrying card identification information of the target NFC device) to NFC device 100 and NFC device 300.
[0471] S612: NFC device 100 sends a first pick ACK frame to NFC card reader 200 (indicating that the card identification information of NFC device 100 and the target NFC device are successfully matched).
[0472] S613: NFC device 300 sends a second Pick ACK frame to NFC card reader 200 (indicating that the card identification information of NFC device 300 and the target NFC device failed to match).
[0473] S614: The NFC card reader 200 and the NFC device 100 perform NFC signaling interaction to complete the first PICC card swiping service.
[0474] Figure 18 S607-S614 and Figure 16 The S404-S411 are the same, so I will not go into details.
[0475] Not limited to Figure 18 In the embodiments shown, in other embodiments of this application, NFC device 100, NFC device 300 and NFC device 400 may also enter the field after S602 and before S604. In this case, S603 is not executed. That is, after NFC device 100, NFC device 300 and NFC device 400 enter the radio frequency field of NFC card reader 200, they first receive the first NFC protocol probe frame sent by NFC card reader 200. The subsequent process is the same and will not be described again.
[0476] Not limited to Figure 18In some embodiments of this application, as shown in the example, when the NFC card reader 200 receives the request response command sent by the NFC device 400, it can also directly select the NFC device 400. Therefore, after S603, the NFC card reader 200 can determine that the NFC device 400 has been selected, and the NFC card reader 200 and the NFC device 400 can communicate using the second NFC protocol without executing S604-S614. This avoids the situation where the NFC card reader 200 (PCD mode) does not select the NFC device the first time when only an NFC device supporting the second NFC protocol (PICC mode) is available in its radio frequency field, resulting in slow card swiping. For example, the NFC card reader 200 can select the NFC device and start communication using the second NFC protocol after sending the request command for the second NFC protocol again, thus ensuring a good card swiping experience for the user.
[0477] Not limited to the above embodiments, in other embodiments of this application, the NFC card reader 200 (PCD mode) has multiple NFC devices (PICC mode) that do not support the first NFC protocol but support the second NFC protocol within its radio frequency field. The NFC card reader 200 can select the NFC device (PICC mode) according to the anti-collision mechanism of the second NFC protocol. For a specific process example, please refer to [link to example]. Figure 19 .
[0478] Figure 19 This is a flowchart illustrating another card conflict handling method provided in the embodiments of this application.
[0479] Figure 19 The method shown can be applied to an NFC system including NFC device 100, NFC card reader 200, and NFC device 300, for example... Figure 3 The NFC system 10 shown. NFC devices 100 and 300 can be in PICC mode, and NFC card reader 200 can be in PCD mode.
[0480] Figure 19 The fifth NFC conflict scenario will be used as an example for explanation. In this scenario, NFC device 100 and NFC device 300 do not support the first NFC protocol, but they do support the second NFC protocol.
[0481] Figure 19 The method shown may include, but is not limited to, the following steps:
[0482] S700: NFC device 100 enters the radio frequency field of NFC card reader 200, and NFC device 300 enters the radio frequency field of NFC card reader 200. This application embodiment does not limit the order in which NFC device 100 and NFC device 300 enter the radio frequency field of NFC card reader 200.
[0483] S701: NFC card reader 200 sends a request command for the second NFC protocol to NFC device 100 and NFC device 300.
[0484] In some embodiments of this application, the PCD mode NFC reader device 200 can broadcast request commands via radio frequency field. When the PICC mode NFC device 100 and NFC device 300 enter the radio frequency field of the NFC reader device 200, the NFC device 100 and NFC device 300 can receive the request commands broadcast by the NFC reader device 200. The request command of the second NFC protocol can be REQA or REQB in the ISO14443 / IEC14443 protocol.
[0485] S702: NFC device 100 sends a first request response command of the second NFC protocol to NFC card reader 200.
[0486] S703: NFC device 300 sends a second request response command of the second NFC protocol to NFC card reader 200.
[0487] In some embodiments of this application, the request-response command of the second NFC protocol can be ATQA or ATQB in the ISO14443 / IEC14443 protocol. In some embodiments of this application, NFC device 100 and NFC device 300 support the second NFC protocol, and therefore can send a request-response command to NFC reader 200 after receiving a request command broadcast by NFC reader 200.
[0488] Figure 19 In the method shown, the NFC card reader 200 receives request response commands from two PICC mode NFC devices (i.e., NFC device 100 and NFC device 300), thus a card conflict exists. The NFC card reader 200 can execute the anti-collision procedure of the second NFC protocol to select one of the two PICC mode NFC devices for NFC signaling interaction. The anti-collision procedure of the second NFC protocol may include the following S704-S711.
[0489] S704: NFC card reader 200 sends a first anticollision command to NFC device 100 and NFC device 300.
[0490] In some embodiments of this application, the first anti-collision command may instruct the NFC device in PICC mode to return the entire UID. For example, the SEL field in the first anti-collision command has a value of 93 and the NVB field has a value of 20.
[0491] S705: NFC device 100 sends its UID to NFC card reader 200.
[0492] S706: NFC device 300 sends its UID to NFC card reader 200.
[0493] S707: NFC card reader 200 determines that the target NFC device is NFC device 100.
[0494] In some embodiments of this application, the NFC card reader 200 in PCD mode receives UID responses from multiple NFC devices in PICC mode, resulting in card conflicts. The NFC card reader 200 can randomly select one NFC device as the target NFC device. In some examples, if the UID sent by NFC device 100 is smaller than the UID sent by NFC device 300, the NFC card reader 200 can determine the target NFC device as the NFC device 100 with the smallest UID. However, this is not limited to this; other rules can also be used to select the NFC device.
[0495] S708: NFC card reader 200 sends a second anti-collision command (carrying the valid bit of the target NFC device) to NFC device 100 and NFC device 300.
[0496] In some embodiments of this application, the second anti-collision command may carry the valid bits of the target NFC device, which are a portion of the UID of the target NFC device (i.e., NFC device 100). In some examples, when the NFC reader 200 receives the UID sent by NFC device 100 and the UID sent by NFC device 300, it can identify the conflicting position of the received UID. Assuming the conflicting position is the Kth bit (K-bit positive integer) of the UID, that is, the first K-1 bits of the UID of NFC device 100 and NFC device 300 are the same, and the Kth bit is different, the valid bits of the target NFC device may include the first K bits of the UID of the target NFC device.
[0497] In some embodiments of this application, the second anti-collision command may include the fields SEL and NVB, and the value examples are consistent with the value examples of the first anti-collision command.
[0498] S709: When the UID and the valid bits of the target NFC device are successfully matched, the NFC device 100 sends the UID of the NFC device 100 to the NFC card reader 200.
[0499] In some embodiments of this application, the first K bits of the UID of NFC device 100 are the same as the valid bits of the target NFC device, that is, the UID of NFC device 100 and the valid bits of the target NFC device are successfully matched. The first K bits of the UID of NFC device 300 are different from the valid bits of the target NFC device, that is, the UID of NFC device 300 and the valid bits of the target NFC device are not matched. Therefore, NFC device 100 can send a corresponding UID to NFC reader 200 according to the second anti-collision command of NFC reader 200, and NFC device 300 does not respond to the second anti-collision command of NFC reader 200.
[0500] In some embodiments of this application, the UID sent by the NFC device 100 in S709 can be a part of the UID of the NFC device 100. For example, if the effective bits of the target NFC device are the first K bits of the UID of the target NFC device, then the NFC device 100 can send the other bits of the UID of the NFC device 100 excluding the first K bits.
[0501] S710: NFC card reader 200 sends a select command to NFC device 100.
[0502] In some embodiments of this application, when an NFC card reader 200 receives a UID sent by an NFC device 100 and there is no card conflict, the NFC card reader 200 can determine that the NFC device 100 is the target NFC device. Therefore, the NFC card reader 200 can send a select command to the NFC device 100.
[0503] In some embodiments of this application, the selection command may include the field SEL, the field NVB, the full UID and CRC of the target NFC device, the field SEL may be 20, and the field NVB may be 70.
[0504] S711: NFC device 100 sends a select acknowledge (SAK) command to NFC card reader 200.
[0505] In some embodiments of this application, the UID in the selection command received by the NFC device 100 is the same as the UID of the NFC device 100. That is, when the UID in the selection command is complete, the NFC device 100 can send a selection confirmation command to the NFC card reader 200 and set the serial bit in the selection confirmation command.
[0506] S712: The NFC card reader 200 and the NFC device 100 perform NFC signaling interaction to complete the first PICC card swiping service. In some embodiments of this application, after receiving the selection confirmation command, the NFC card reader 200 can determine to select the NFC device 100, which can be understood as the end of the anti-collision process / card selection process. In some examples, the NFC card reader 200 can verify the selection confirmation command, and after successful verification, determine to select the NFC device 100. For example, it can verify whether the serial bits of the selection confirmation command are set; if set, the verification is successful.
[0507] In some embodiments of this application, after the NFC card reader 200 determines that an NFC device 100 has been selected, it can perform NFC signaling interaction with the selected NFC device 100 to complete the card swiping service of the first PICC. Wherein, when the NFC device 100 is a passive device, the first PICC can be the NFC device 100. When the NFC device 100 is an active device, the first PICC is the default NFC emulator card among one or more NFC emulator cards included in the NFC device 100. Specific examples and... Figure 8 The example of NFC signaling interaction between the NFC card reader 200 and the selected NFC device 100 is similar.
[0508] The description of the first NFC protocol shown in the above embodiments is for illustrative purposes only and should not be construed as limiting. The following is an illustrative description of the first NFC protocol in another embodiment.
[0509] Figure 20 This is a flowchart illustrating another card conflict handling method provided in the embodiments of this application.
[0510] Figure 20 The method shown can be applied to an NFC system including an NFC device 100 and an NFC card reader 200, for example... Figure 2 The NFC system 10 shown is described. The NFC device 100 can be in PICC mode; for example, an active NFC device 100 is in PICC mode by default after enabling NFC functionality. The NFC card reader 200 can be in PCD mode.
[0511] Figure 20 The method shown may include, but is not limited to, the following steps:
[0512] S1000: NFC device 100 enters the radio frequency field of NFC card reader 200.
[0513] S1001: NFC card reader 200 sends a probe frame to NFC device 100.
[0514] Figure 20 S1000-S1001 and Figure 8 Similar to S100-S101. See the example of the Probe frame format for details. Figure 21 ,like Figure 21 As shown, a Probe frame may include a frame header and a checksum. The frame header of a Probe frame may include a protocol identifier field, a frame type field, and a protocol version field. The fields in the frame header are described in Table 1.
[0515] S1002: NFC device 100 sends a probe ACK frame to NFC card reader 200.
[0516] Figure 20 S1002 and Figure 8 Similar to S102, in which, Figure 20 The format of the Probe ACK frame and Figure 8 The Probe ACK frame format is different. Figure 20 For an example of the Probe ACK frame format, please refer to [link / reference]. Figure 22 ,like Figure 22 As shown, a Probe ACK frame can include a frame header, data segments, and a checksum. The frame header of a Probe ACK frame can include a protocol identifier field, a frame type field, and a protocol version field. The specific field descriptions are similar to those in Table 1; examples of specific fields can be found in [reference needed]. Figure 8 An example of a Probe ACK frame. The data segment in a Probe ACK frame may include a collision-preventing random number segment, for example, the collision-preventing random number segment is 1 byte long. The value of the collision-preventing random number segment can be a random number. The collision-preventing random number segment in Probe ACK frames sent by different NFC devices may be different. The collision-preventing random number segment can be used by the NFC reader device 200 to determine the number of NFC devices that sent the multiple Probe ACK frames when multiple Probe ACK frames are received simultaneously.
[0517] Figure 20 In the method shown, the NFC card reader 200 receives a Probe ACK frame sent by an NFC device 100 in PICC mode, so there is no card conflict, and the NFC card reader 200 can execute the following S1003-S1007.
[0518] S1003: The NFC card reader 200 sends a notification frame (carrying the device feature information of the NFC card reader 200) to the NFC device 100.
[0519] In some embodiments of this application, the notification frame may include device characteristic information of the NFC card reader 200. The PCD mode NFC card reader 200 can use the notification frame to notify the PICC mode NFC device 100 of its device characteristic information, thereby indicating the service intent of the NFC card reader 200 to the NFC device 100. A description of the device characteristic information can be found in [link to relevant documentation]. Figure 8 Explanation of device feature information in S103.
[0520] In some embodiments of this application, Figure 20 The format of the Notify frame in the text is the same as Figure 8 The Notify frames in the two contexts have different formats. Figure 20 For an example of the Notify frame format, please refer to [link / reference]. Figure 23 .like Figure 23 As shown, a Notify frame may include a frame header, a data segment, and a checksum. The frame header of a Notify frame may include a protocol identifier field, a frame type field, and a length field. For details, please refer to Table 3 for explanations of the relevant fields. The data segment of a Notify frame may include a device identifier element. For details, please refer to... Figure 8 Description of the device identification element in S103. The checksum may include a CRC code.
[0521] S1004: NFC device 100 sends a NotifyACK frame to NFC card reader 200.
[0522] In some embodiments of this application, after receiving a Notify frame, the NFC device 100 in PICC mode can reply with a NotifyACK frame to the NFC card reader 200 in PCD mode to inform the NFC card reader 200 in PCD mode that the Notify frame has been received.
[0523] In some embodiments of this application, Figure 20 The format of the NotifyACK frame in the text is the same as Figure 8 The NotifyACK frames in the two cases have different formats. Figure 20 For an example of the NotifyACK frame format, please refer to Figure 24 .like Figure 24 As shown, a NotifyACK frame may include a frame header and a checksum. The frame header of a NotifyACK frame may include a protocol identifier field and a frame type field. For details, please refer to the descriptions of the relevant fields shown in Table 5. The checksum may include a CRC code.
[0524] In some embodiments of this application, after receiving a Notify frame, the active NFC device 100 can perform an action corresponding to the device feature information of the NFC card reader 200 carried in the Notify frame. The action corresponding to the device feature information of the NFC card reader 200 may include outputting an NFC service prompt. For example, the NFC service prompt may be any one or more of the following: a card swiping prompt for an NFC analog card (e.g., access card, key card, transportation card, bank card, etc.), a wireless charging prompt, a codeless payment prompt, an electronic ticket prompt, a tap-to-pay function prompt, a multi-function card prompt, etc.
[0525] In some embodiments of this application, after receiving a Notify frame, the active NFC device 100 can determine the corresponding NFC emulator card from one or more NFC emulator cards of the NFC device 100 based on the device feature information of the NFC card reader 200 carried in the Notify frame. This can be understood as a successful match between the NFC emulator card and the device feature information of the NFC card reader 200. The NFC device 100 can then display a card-swiping interface for the NFC emulator card. In some examples, the NFC emulator card corresponding to the device feature information of the NFC card reader 200 can be determined at the application layer of the NFC device 100, for example, through... Figure 5 The application implementation in the processor 101 shown, or through Figure 5 The SE103 implementation shown, or via Figure 5 The SIM card 104 shown is implemented as described. In other examples, the NFC module 102 of the NFC device 100 can determine the NFC emulated card corresponding to the device feature information of the NFC reader 200. It is understood that although the NFC emulated card swiping interface is displayed at this time, no swiping transaction is actually performed. The NFC emulated card used for the actual swiping transaction and the NFC emulated card displayed on the swiping interface can be the same or different. Displaying the NFC emulated card swiping interface here can be understood as allowing the user to perceive the swiping process as early as possible. In this case, the device feature information of the NFC reader 200 carried in the Notify frame can be understood as being used to realize the advance display and monitoring of the swiping interface. The implementation of the swiping transaction can be found in the description of S1007.
[0526] S1005: NFC card reader 200 sends a parameter negotiation command to NFC device 100.
[0527] S1006: NFC device 100 sends a parameter negotiation response to NFC card reader 200.
[0528] In some embodiments of this application, the NFC card reader 200 and the NFC device 100 can negotiate communication parameters through parameter negotiation commands and responses. The negotiated communication parameters can be used to implement NFC signaling interaction for card swiping services, for example, to execute S1007. In some examples, the frame type of the parameter negotiation command can be a command frame, and the frame type of the parameter negotiation response can be a response frame. Communication parameters may include any one or more of the following: maximum transmission rate and maximum data transmission length.
[0529] Steps S1005 and S1006 are optional. In some embodiments of this application, after receiving the Notify ACK frame, the NFC card reader 200 does not send a parameter negotiation command to the electronic device 100, that is, it does not execute S1005-S1006. In this case, the NFC card reader 200 and the electronic device 100 can perform subsequent communication processes through default communication parameters.
[0530] S1007: The NFC card reader 200 and the NFC device 100 perform NFC signaling interaction to complete the first PICC card swiping service.
[0531] Figure 20 S1007 and Figure 8 Similar to S105. In some embodiments of this application, the NFC device 100 is an active device. In S1007, the NFC device 100 can receive a Select AID command sent by the NFC card reader 200. The Select AID command can carry the identifier of the first Applet (assumed to be the first AID). The active NFC device 100 can determine the first Applet and the target NFC emulated card based on the first AID (optionally, and the device feature information of the NFC card reader 200), run the first Applet, and complete the card swiping business of the target NFC emulated card (i.e., the first PICC) through the first Applet. The NFC device 100 can send the card information of the target NFC emulated card to the NFC card reader 200 through the first Applet. For example, the above process can be implemented at the application layer of the NFC device 100, for example through... Figure 5 The application implementation in the processor 101 shown, or through Figure 5 The SE103 implementation shown, or via Figure 5 The SIM card 104 shown is implemented. The NFC card reader 200 can perform a card swipe verification process based on the card information of the target NFC emulated card and send the card swipe result of the target NFC emulated card to the NFC device 100.
[0532] Figure 25This is a flowchart illustrating another card conflict handling method provided in the embodiments of this application.
[0533] Figure 25 The method shown can be applied to an NFC system including NFC device 100, NFC card reader 200, and NFC device 300, for example... Figure 3 The NFC system 10 shown is described above. NFC devices 100 and 300 can be in PICC mode; for example, active NFC devices 100 and 300 are in PICC mode by default after enabling NFC functionality. NFC card reader 200 can be in PCD mode.
[0534] Figure 25 The method shown may include, but is not limited to, the following steps:
[0535] S2000: NFC device 100 enters the radio frequency field of NFC card reader 200, and NFC device 300 enters the radio frequency field of NFC card reader 200. This application embodiment does not limit the order in which NFC device 100 and NFC device 300 enter the radio frequency field of NFC card reader 200.
[0536] S2001: NFC card reader 200 sends a probe frame to NFC device 100 and NFC device 300.
[0537] Figure 25 S2000-S2001 and Figure 11 Similar to S200-S201. Among them, Figure 25 For an explanation of the Probe frame, please refer to [link / reference]. Figure 20 For a description and format example of the Probe frame in S1001, please refer to [link / reference]. Figure 21 .
[0538] S2002: NFC device 100 sends a first probe ACK frame to NFC card reader 200.
[0539] S2003: NFC device 300 sends a second probe ACK frame to NFC card reader 200.
[0540] The order of S2002 and S2003 is not limited in the embodiments of this application.
[0541] In some embodiments of this application, the description of the first Probe ACK frame and the second Probe ACK frame can be found in [reference needed]. Figure 20 For a description and format example of the Probe ACK frame in S1002, please refer to [link / reference]. Figure 22The first Probe ACK frame is different from the second Probe ACK frame. In some examples, the frame headers in the first and second Probe ACK frames may be the same or different. In some examples, the value of the anti-collision random number field in the first and second Probe ACK frames may be different. Therefore, even if the NFC reader 200 receives both the first and second Probe ACK frames simultaneously, it can determine from the value of the anti-collision random number field that the first and second Probe ACK frames were sent by two different PICCs.
[0542] Figure 25 In the method shown, the NFC card reader 200 receives Probe ACK frames sent by two PICC mode NFC devices (i.e., NFC device 100 and NFC device 300), thus a card conflict exists. The NFC card reader 200 can perform an anti-collision procedure to select one of the two PICC mode NFC devices for NFC signaling interaction. The anti-collision procedure may include at least one of S2004-S2013 below.
[0543] S2004: NFC card reader 200 sends a conflict frame to NFC device 100 and NFC device 300.
[0544] In some embodiments of this application, Figure 25 The format of the Conflict frame in the text is similar to... Figure 11 The format of the Conflict frames in the two cases is different. Figure 25 For an example of the format of the Conflict frame, please refer to Figure 26 .like Figure 26 As shown, a Conflict frame may include a frame header, data segments, and a checksum. The frame header of a Conflict frame may include a protocol identifier field, a frame type field, and a length field. The specific descriptions are similar to those of the relevant fields shown in Table 3. Figure 26 As shown, the value of the protocol identifier field in the frame header of a Conflict frame can be the identifier of the first NFC protocol, "0x7C". The value of the frame type field in the frame header of a Conflict frame can be "0x03". The data segment of a Conflict frame may include a wait slot; for an explanation of wait slots, please refer to [link to documentation]. Figure 11 The diagram illustrates the waiting slots in the conflicting frames. The checksum may include a CRC code.
[0545] S2005: NFC device 100 sends a first conflict ACK frame (carrying the card identification information of NFC device 100) to NFC card reader 200.
[0546] S2006: NFC device 300 sends a second Conflict ACK frame (carrying the card identification information of NFC device 300) to NFC card reader 200.
[0547] The order of S2005 and S2006 is not limited in the embodiments of this application.
[0548] In some embodiments of this application, an NFC device in PICC mode that receives a Conflict frame sent by an NFC card reader 200 can return a Conflict ACK frame to the NFC card reader 200, carrying the card identification information of the NFC device in the Conflict ACK frame. Therefore, after receiving the Conflict frame sent by the NFC card reader 200, the NFC device 100 can send a first Conflict ACK frame (carrying the card identification information of the NFC device 100) to the NFC card reader 200. After receiving the Conflict frame sent by the NFC card reader 200, the NFC device 300 can send a second Conflict ACK frame (carrying the card identification information of the NFC device 300) to the NFC card reader 200.
[0549] In some embodiments of this application, NFC device 100 and NFC device 300 can obtain the waiting time slots in the Conflict frame, that is, the number of time slots in the timeout period of NFC card reader 200. NFC device 100 / NFC device 300 can select one time slot from the multiple time slots of the timeout period to send the first Conflict ACK frame / second Conflict ACK frame. For example, if the waiting time slot is 4, meaning the timeout period includes 4 time slots, NFC device 100 can choose to send the first Conflict ACK frame in the first of these 4 time slots, and NFC device 300 can choose to send the second Conflict ACK frame in the third of these 4 time slots. It is understood that NFC card reader 200 uses the waiting time slots in the Conflict frame to allow NFC device 100 and NFC device 300 to send Conflict ACK frames in different time slots, avoiding conflicts when NFC card reader 200 receives Conflict ACK frames, which could lead to the inability to properly receive and recognize Conflict ACK frames.
[0550] In some embodiments of this application, Figure 25The format of the Conflict ACK frame in the middle is the same as Figure 11 The format of the ConflictACK frame is different. Figure 25 For an example of the format of the Conflict ACK frame, please refer to [link / reference]. Figure 27 .like Figure 27 As shown, a Conflict ACK frame may include a frame header, a data segment, and a checksum. The frame header of a Conflict ACK frame may include a protocol identifier field, a frame type field, and a length field. The data segment of a Conflict ACK frame may include a card identifier element, which may include card identifier information (including a card type identifier and a card random number) of the NFC device that sent the Conflict ACK frame. For details, please refer to the descriptions of the relevant fields shown in Table 6. Note that the lengths of the card type identifier and the card random number shown in Table 6 are for illustrative purposes only; in other examples, the sum of the lengths of the card type identifier and the card random number may also be 3 bytes.
[0551] S2007: The NFC card reader 200 determines the target NFC device (i.e., NFC device 100) from NFC device 100 and NFC device 300 based on the card identification information of NFC device 100 and NFC device 300.
[0552] In some embodiments of this application, the NFC card reader 200 can determine the target card identifier information required by the NFC card reader 200 from the card identifier information of the NFC device 100 and the NFC device 300 according to a preset rule, thereby determining the target NFC device corresponding to the target card identifier information. This can also be described as determining the target NFC device that successfully matches the card identifier information required by the NFC card reader 200. The card identifier information of the target NFC device is the target card identifier information required by the NFC card reader 200. The preset rule can be determined based on user needs, for example, by analyzing the usage habits of a large number of users.
[0553] Figure 25 The explanation will be based on NFC device 100 as an example.
[0554] In some examples, the card type identifier of NFC device 100 indicates that NFC device 100 is an active device, while the card type identifier of NFC device 300 indicates that NFC device 300 is a passive device. The default rule is to prioritize active devices, that is, if the card type identifier in the card identification information required by NFC card reader 200 indicates an active device, then the target NFC device is NFC device 100, which is an active device. However, this is not a limitation. In other examples, the default rule may also be to prioritize passive devices, that is, if the card type identifier in the card identification information required by NFC card reader 200 indicates a passive device. This application embodiment does not limit this default rule.
[0555] In some examples, the card type identifier of NFC device 100 indicates that NFC device 100 is an active device, and the card type identifier of NFC device 300 indicates that NFC device 300 is an active device; or the card type identifier of NFC device 100 indicates that NFC device 100 is a passive device, and the card type identifier of NFC device 300 indicates that NFC device 300 is a passive device, meaning that the types of NFC device 100 and NFC device 300 are the same. The default rule is to preferentially select the NFC device with the smaller card random number among multiple NFC devices of the same type, that is, the card random number in the card identifier information required by the NFC card reader 200 is smaller. Assuming that the card random number of NFC device 100 is smaller than the card random number of NFC device 300, then the target NFC device is the NFC device 100 with the smaller card random number. However, this is not a limitation; in specific implementations, the default rule can also be to preferentially select the NFC device with the larger card random number among multiple NFC devices of the same type. This application embodiment does not limit this default rule.
[0556] S2008: NFC card reader 200 sends a pick frame (carrying card identification information of the target NFC device) to NFC device 100 and NFC device 300.
[0557] In some embodiments of this application, the NFC card reader 200 may broadcast a Pick frame, which may include card identification information of the target NFC device (i.e., NFC device 100) of the NFC card reader 200.
[0558] In some embodiments of this application, Figure 25 The format of the Pick frame and Figure 11 The format of the Pick frames in the two are different. Figure 25 For an example of the Pick frame format, please refer to [link / reference]. Figure 28 .like Figure 28As shown, a Pick frame may include a frame header, data segments, and a checksum. The frame header of a Pick frame may include a protocol identifier field, a frame type field, and a length field. The specific descriptions are similar to those of the relevant fields shown in Table 3, for example... Figure 28 As shown, the value of the protocol identifier field in the header of the Pick frame can be the identifier of the first NFC protocol, "0x7C". The value of the frame type field in the header of the Pick frame can be "0x05". The data segment of the Pick frame may include a card identifier element, which may include card identifier information (including card type identifier and card random number) of the target NFC device of the NFC reader device 200. Optionally, the card identifier element may also include an element code. For a description of the data segment of the Pick frame, please refer to Table 7. The checksum may include a CRC code.
[0559] S2009: NFC device 100 sends a Pick ACK frame to NFC card reader 200.
[0560] In some embodiments of this application, after receiving a Pick frame sent by the NFC reader 200, the PICC-mode NFC device can obtain the card identification information in the Pick frame. If the PICC-mode NFC device determines that its card identification information is the same as the card identification information in the Pick frame, it sends a Pick ACK frame to the NFC reader 200. If the PICC-mode NFC device determines that its card identification information is different from the card identification information in the Pick frame, it does not send a Pick ACK frame to the NFC reader 200. Since the Pick frame carries the card identification information of the NFC device 100, the NFC device 100 sends a Pick ACK frame to the NFC reader 200, while the NFC device 300 does not send a Pick ACK frame to the NFC reader 200.
[0561] In some embodiments of this application, Figure 25 The format of the Pick ACK frame in the middle is the same as Figure 11 The format of the Pick ACK frame is different. Figure 25 For an example of the format of the Pick ACK frame, please refer to [link / reference]. Figure 29 .like Figure 29 As shown, a Pick ACK frame may include a frame header and a checksum. The frame header of a Pick ACK frame may include a protocol identifier field and a frame type field. The specific descriptions are similar to those of the relevant fields shown in Table 5, for example... Figure 29As shown, the value of the protocol identifier field in the header of the Pick ACK frame can be the identifier of the first NFC protocol, "0x7C". The value of the frame type field in the header of the Pick ACK frame can be "0x06". The checksum can include a CRC code.
[0562] S2010: NFC card reader 200 sends a notification frame (carrying device feature information of NFC card reader 200) to NFC device 100 and NFC device 300.
[0563] S2011: NFC device 100 sends a NotifyACK frame to NFC card reader 200.
[0564] In some embodiments of this application, the NFC card reader 200 can broadcast Notify frames. When a PICC-mode NFC device receives a Notify frame from the NFC card reader 200, if the PICC-mode NFC device is the target NFC device of the NFC card reader 200 (i.e., the card identification information of the PICC-mode NFC device is the same as the card identification information in the received Pick frame (the PICC-mode NFC device has sent a PickACK frame to the NFC card reader 200), then it sends a NotifyACK frame to the NFC card reader 200; if the PICC-mode NFC device is not the target NFC device of the NFC card reader 200 (i.e., the card identification information of the PICC-mode NFC device is different from the card identification information in the received Pick frame (the PICC-mode NFC device has not sent a PickACK frame to the NFC card reader 200), then it does not send a NotifyACK frame to the NFC card reader 200. Since the Pick frame carries the card identification information of the NFC device 100, the NFC device 100 sends a NotifyACK frame to the NFC card reader 200, while the NFC device 300 does not send a NotifyACK frame to the NFC card reader 200.
[0565] S2012: NFC card reader 200 sends a parameter negotiation command to NFC device 100.
[0566] S2013: NFC device 100 sends a parameter negotiation response to NFC card reader 200.
[0567] S2014: The NFC card reader 200 and the NFC device 100 perform NFC signaling interaction to complete the first PICC card swiping service.
[0568] Figure 25 S2012-S2014 and Figure 20 Similar to S1005-S1007, please refer to the following for details. Figure 20 Explanation of S1005-S1007.
[0569] Figure 25 For illustrative purposes only and not intended to be limiting, in some other embodiments of this application, the NFC card reader 200 can communicate with more NFC devices in PICC mode through anti-collision procedures, and the NFC card reader 200 can identify the target NFC device from among the more NFC devices in PICC mode.
[0570] Not limited to this, in some other embodiments of this application, the NFC card reader 200 may also receive only one conflict confirmation frame. For example, if the NFC device 300 fails to send a second conflict confirmation frame due to a malfunction or other abnormal factors, the NFC card reader 200 may only receive the first conflict confirmation frame sent by the NFC device 100. In this case, the NFC card reader 200 can identify the NFC device 100 that sent the first conflict confirmation frame as the target NFC device.
[0571] The length and values of fields in the NFC transmission frames in the above examples are only used to explain this application and should not be construed as limiting the embodiments of this application.
[0572] The following examples illustrate the implementation process of card conflict handling methods in some card conflict scenarios.
[0573] Figure 30 This is a flowchart illustrating another card conflict handling method provided in the embodiments of this application.
[0574] Figure 30 The process shown can be Figure 25 The illustrated card conflict handling method is implemented in the sixth card conflict scenario. In this scenario, NFC device 100 is an active device, and NFC device 300 is a passive device. The sixth card conflict scenario is, for example,... Figure 7A The scene shown.
[0575] Figure 30 The method shown may include, but is not limited to, the following steps:
[0576] S3000: NFC device 100 enters the radio frequency field of NFC card reader 200, and NFC device 300 enters the radio frequency field of NFC card reader 200.
[0577] S3001: NFC card reader 200 sends a probe frame to NFC device 100 and NFC device 300.
[0578] S3002: NFC device 100 sends a first probe ACK frame to NFC card reader 200.
[0579] S3003: NFC device 300 sends a second probe ACK frame to NFC card reader 200.
[0580] S3004: NFC card reader 200 sends a conflict frame to NFC device 100 and NFC device 300.
[0581] S3005: NFC device 100 sends a first conflict ACK frame (carrying card identification information of NFC device 100) to NFC card reader 200.
[0582] S3006: NFC device 300 sends a second Conflict ACK frame (carrying card identification information of NFC device 300) to NFC card reader 200.
[0583] S3007: The NFC card reader 200 determines the target NFC device (i.e., the active NFC device 100) from the NFC device 100 and the NFC device 300 based on the card identification information of the NFC device 100 and the NFC device 300.
[0584] S3008: NFC card reader 200 sends a pick frame (carrying card identification information of the target NFC device) to NFC device 100 and NFC device 300.
[0585] S3009: NFC device 100 sends a Pick ACK frame to NFC card reader 200.
[0586] S3010: NFC card reader 200 sends a notification frame (carrying device feature information of NFC card reader 200) to NFC device 100 and NFC device 300.
[0587] S3011: NFC device 100 sends a NotifyACK frame to NFC card reader 200.
[0588] S3012: The NFC card reader 200 sends a parameter negotiation command to the NFC device 100.
[0589] S3013: NFC device 100 sends a parameter negotiation response to NFC card reader 200.
[0590] Figure 30 S3000-S3013 and Figure 25 Similar to S2000-S2013. In Figure 30 In S3005-S3006, the first Conflict ACK frame sent by NFC device 100 carries card identification information of NFC device 100, including the card type identifier of NFC device 100. The card type identifier of NFC device 100 indicates that NFC device 100 is an active device, for example, the value of the card type identifier is "0x01". The second Conflict ACK frame sent by NFC device 300 carries card identification information of NFC device 300, including the card type identifier of NFC device 300. The card type identifier of NFC device 300 indicates that NFC device 300 is a passive device, for example, the value of the card type identifier is "0x02". Figure 30 In S3007, the NFC card reader 200 can determine that the target NFC device is an active NFC device 100 based on preset rule 1, the card type identifier of the NFC device 100, and the card type identifier of the NFC device 300. Preset rule 1 may include preferentially selecting active devices. Figure 30 In S3008, the NFC card reader 200 sends a Pick frame to the target NFC device (i.e., NFC device 100), which carries the card identification information of the target NFC device (i.e., NFC device 100).
[0591] S3014: The NFC card reader 200 and the NFC device 100 perform NFC signaling interaction. If the first NFC analog card of the NFC device 100 is the target PICC of the NFC card reader 200, the card swiping service of the first NFC analog card is successfully executed. If the first NFC analog card of the NFC device 100 is not the target PICC of the NFC card reader 200, the card swiping service fails.
[0592] In some embodiments of this application, Figure 30 S3014 and Figure 20Similar to S1007. The active NFC device 100 may include one or more NFC emulator cards, any one of which is referred to as the first NFC emulator card. When the NFC reader 200 and the NFC device interact via NFC signaling, if the first NFC emulator card of the NFC device 100 is the target PICC of the NFC reader 200 (i.e., the NFC device 100 includes NFC emulator cards belonging to the target PICC of the NFC reader 200), then the NFC reader 200 and the NFC device 100 can successfully execute the card-swiping service of the NFC emulator card. If the first NFC emulator card of the NFC device 100 is not the target PICC of the NFC reader 200 (i.e., the NFC device 100 does not include the target PICC of the NFC reader 200), then the card-swiping service of the NFC device 100 fails.
[0593] In some examples, NFC reader 200 can send a Select AID command to NFC device 100. The Select AID command can carry the identifier of the first applet (assumed to be the first AID). The active NFC device 100 can determine the corresponding NFC emulator from one or more NFC emulators based on the first AID (optionally along with device characteristic information of the NFC reader 200), and send the card information of the NFC emulator to the NFC reader 200. The NFC reader 200 can then perform a card swipe verification process based on the card information of the NFC emulator and send the swipe result of the NFC emulator to the NFC device 100. Specifically, if the NFC emulator is the target PICC of the NFC reader 200, the card swipe operation is successful, and the result is "successful card swipe." If the NFC emulator is not the target PICC of the NFC reader 200, the card swipe operation fails, and the result is "failed card swipe." In addition to this, in other examples, if the active NFC device 100 is unable to determine the corresponding NFC emulator card from one or more NFC emulator cards of the NFC device 100 based on the first AID (optionally and the device feature information of the NFC card reader 200), the NFC device 100 may return a response frame indicating selection failure to the NFC card reader 200, and the card swipe transaction will fail.
[0594] For example, in Figure 30In the sixth card conflict scenario shown, the target PICC of the NFC reader 200 is a PICC supporting Type A of the first NFC protocol. The NFC device 100 is a mobile phone, which may include one or more NFC emulated cards. The NFC device 300 is a physical NFC tag card supporting the first NFC protocol. The NFC reader 200 can determine the target NFC device (i.e., the active NFC device 100) from the NFC devices 100 and 300. The NFC reader 200 can interact with the NFC device 100 via NFC signaling. When the NFC device 100 includes an NFC emulated card supporting Type A of the first NFC protocol, the card swiping service of that NFC emulated card is successfully executed. When the NFC device 100 does not include an NFC emulated card supporting Type A of the first NFC protocol, the card swiping service fails. Therefore, the target PICC that the NFC reader 200 probabilistically / likely selects is an NFC emulated card supporting Type A of the first NFC protocol.
[0595] Figure 31 This is a flowchart illustrating another card conflict handling method provided in the embodiments of this application.
[0596] Figure 31 The process shown can be Figure 25 The illustrated card conflict handling method is implemented in the seventh card conflict scenario. In the seventh card conflict scenario, both NFC device 100 and NFC device 300 are passive devices. However, this is not a limitation; in other examples, both NFC device 100 and NFC device 300 can be active devices. For example, in the seventh card conflict scenario... Figure 7B or Figure 7C The scene shown.
[0597] Figure 31 The method shown may include, but is not limited to, the following steps:
[0598] S4000: NFC device 100 enters the radio frequency field of NFC card reader 200, and NFC device 300 enters the radio frequency field of NFC card reader 200.
[0599] S4001: NFC card reader 200 sends a probe frame to NFC device 100 and NFC device 300.
[0600] S4002: NFC device 100 sends a first probe ACK frame to NFC card reader 200.
[0601] S4003: NFC device 300 sends a second probe ACK frame to NFC card reader 200.
[0602] S4004: NFC card reader 200 sends a conflict frame to NFC device 100 and NFC device 300.
[0603] S4005: NFC device 100 sends a first conflict ACK frame (carrying card identification information of NFC device 100) to NFC card reader 200.
[0604] S4006: NFC device 300 sends a second Conflict ACK frame (carrying card identification information of NFC device 300) to NFC card reader 200.
[0605] S4007: When the card random number of NFC device 100 is less than the card random number of NFC device 300, NFC card reader 200 determines that the target NFC device is NFC device 100.
[0606] S4008: NFC card reader 200 sends a pick frame (carrying card identification information of the target NFC device) to NFC device 100 and NFC device 300.
[0607] S4009: NFC device 100 sends a Pick ACK frame to NFC card reader 200.
[0608] S4010: NFC card reader 200 sends a notification frame (carrying device feature information of NFC card reader 200) to NFC device 100 and NFC device 300.
[0609] S4011: NFC device 100 sends a NotifyACK frame to NFC card reader 200.
[0610] S4012: NFC card reader 200 sends a parameter negotiation command to NFC device 100.
[0611] S4013: NFC device 100 sends a parameter negotiation response to NFC card reader 200.
[0612] Figure 31 S4000-S4013 and Figure 25 Similar to S2000-S2013. In Figure 31In S4005-S4006, the first Conflict ACK frame sent by NFC device 100 carries card identification information for NFC device 100, including the card type identifier and a card random number 3. The card type identifier indicates that NFC device 100 is a passive device. The second Conflict ACK frame sent by NFC device 300 carries card identification information for NFC device 300, including the card type identifier and a card random number 4. The card type identifier indicates that NFC device 300 is a passive device. Figure 31 In S4007, the NFC card reader 200 can determine the target NFC device based on preset rule 2, the card identification information of NFC device 100, and the card identification information of NFC device 300. Preset rule 2 may include prioritizing the device with the smaller card random number among multiple active or passive devices. Since both NFC device 100 and NFC device 300 are passive devices, and the card random number 3 of NFC device 100 is less than the card random number 4 of NFC device 300, the target NFC device is NFC device 100. Figure 31 In S4008, the NFC card reader 200 sends a Pick frame to the target NFC device (i.e., NFC device 100), which carries the card identification information of the target NFC device (i.e., NFC device 100).
[0613] S4014: The NFC card reader 200 and the NFC device 100 perform NFC signaling interaction to complete the card swiping business of the first PICC (i.e., the NFC device 100).
[0614] In some embodiments of this application, Figure 31 S4014 and Figure 20 Similar to S1007. In this case, the NFC device 100 is a passive device, therefore, the first PICC is the NFC device 100.
[0615] For example, in Figure 31 In the seventh card conflict scenario shown, the target PICC of the NFC card reader 200 is a PICC of type A that supports the first NFC protocol. Both NFC devices 100 and 300 are physical NFC tag cards that support the first NFC protocol. The NFC card reader 200 can determine the target NFC device (i.e., the NFC device 100 with the smaller card random number) from NFC devices 100 and 300. NFC device 100 may be type A, in which case the card swipe transaction will succeed; or it may not be type A, in which case the card swipe transaction will fail. Therefore, the target PICC that the NFC card reader 200 probabilistically / likely selects is a physical NFC tag card of type A that supports the first NFC protocol.
[0616] Figure 32 This is a flowchart illustrating another card conflict handling method provided in the embodiments of this application.
[0617] Figure 32 The method shown can be applied to an NFC system including an NFC reader 200, multiple NFC devices supporting a first NFC protocol, and multiple NFC devices supporting a second NFC protocol. The NFC reader 200 can be in PCD mode. The multiple NFC devices supporting the first NFC protocol can be in PICC mode. The multiple NFC devices supporting the second NFC protocol can be in PICC mode.
[0618] Figure 32 The method shown can be applied to the eighth NFC conflict scenario. In this scenario, multiple NFC devices supporting the first NFC protocol are passive devices and none of them support the second NFC protocol. Conversely, multiple NFC devices supporting the second NFC protocol are passive devices and none of them support the first NFC protocol.
[0619] The NFC card reader 200 supports both a first NFC protocol and a second NFC protocol. The NFC card reader 200 can alternately poll using the first NFC protocol and the second NFC protocol. Polling using the first NFC protocol may include sending a Probe frame of the first NFC protocol, while polling using the second NFC protocol may include sending a request command of the second NFC protocol. In some examples, the NFC card reader 200 may perform the following sequentially within the radio frequency field: broadcasting a Probe frame of the first NFC protocol, broadcasting a request command of the second NFC protocol, broadcasting a Probe frame of the first NFC protocol, broadcasting a request command of the second NFC protocol, and so on. For a description of the Probe frame of the first NFC protocol, please refer to [link to documentation]. Figure 20 The description of the Probe frame in S1001. For a description of the request command of the second NFC protocol, please refer to... Figure 18 Description of the request command in S602.
[0620] Figure 32 The method shown may include, but is not limited to, the following steps:
[0621] S5000: Multiple NFC devices supporting the first NFC protocol enter the radio frequency field of the NFC card reader 200, and multiple NFC devices supporting the second NFC protocol enter the radio frequency field of the NFC card reader 200. This application embodiment does not limit the order in which the multiple NFC devices enter the radio frequency field of the NFC card reader 200.
[0622] S5001: The NFC card reader 200 sends a probe frame of the first NFC protocol to a plurality of NFC devices that support the first NFC protocol, and the NFC card reader 200 sends a probe frame of the first NFC protocol to a plurality of NFC devices that support the second NFC protocol.
[0623] S5002: Multiple NFC devices supporting the first NFC protocol send multiple probe ACK frames of the first NFC protocol to the NFC card reader 200 respectively.
[0624] S5003: The NFC card reader 200 and multiple NFC devices supporting the first NFC protocol perform an anti-collision process of the first NFC protocol, wherein the NFC card reader 200 determines the first target NFC device from the multiple NFC devices supporting the first NFC protocol.
[0625] S5004: The NFC card reader 200 and the first target NFC device perform NFC signaling interaction of the first NFC protocol to complete the card swiping business of the first target NFC device.
[0626] Among them, S5000-S5004 can be in Figure 32 This was executed under scenario 1 shown. Figure 32 Scenario 1 illustrates the following: After multiple NFC devices supporting the first NFC protocol and multiple NFC devices supporting the second NFC protocol enter the radio frequency field of the NFC reader 200, they first receive the Probe frame of the first NFC protocol broadcast by the NFC reader 200. Therefore, each of the multiple NFC devices supporting the first NFC protocol can return a Probe ACK frame to the NFC reader 200. A description of the Probe ACK frame can be found in [link to documentation]. Figure 20 Description of the Probe ACK frame in S1002. The NFC card reader 200 receives multiple Probe ACK frames from NFC devices in PICC mode (supporting the first NFC protocol), resulting in card conflicts. Therefore, an anti-collision procedure of the first NFC protocol can be performed. This anti-collision procedure and... Figure 11 / Figure 25 The anti-collision process shown is similar. After the anti-collision process of the first NFC protocol, the NFC card reader 200 can determine the first target NFC device from multiple NFC devices supporting the first NFC protocol, and perform NFC signaling interaction with the first target NFC device to complete the card swiping transaction of the first target NFC device. Specific details are as follows... Figure 20 Similar to S1007.
[0627] S5005: Multiple NFC devices supporting the first NFC protocol enter the radio frequency field of the NFC card reader 200, and multiple NFC devices supporting the second NFC protocol enter the radio frequency field of the NFC card reader 200. This application embodiment does not limit the order in which the multiple NFC devices enter the radio frequency field of the NFC card reader 200.
[0628] S5006: The NFC card reader 200 sends a request command for the second NFC protocol to multiple NFC devices that support the first NFC protocol.
[0629] S5007: Multiple NFC devices supporting the second NFC protocol send multiple request-response commands for the second NFC protocol to the NFC card reader 200.
[0630] S5008: The NFC card reader 200 and multiple NFC devices supporting the second NFC protocol perform a collision prevention process of the second NFC protocol, wherein the NFC card reader 200 determines the second target NFC device from the multiple NFC devices supporting the second NFC protocol.
[0631] S5009: The NFC card reader 200 performs NFC signaling interaction with the second target NFC device using the second NFC protocol to complete the card swiping service of the second target NFC device.
[0632] Among them, S5005-S5009 can be in Figure 32 This was executed under scenario 2 shown. Figure 32 Scenario 2 illustrates the following: After multiple NFC devices supporting the first NFC protocol and multiple NFC devices supporting the second NFC protocol enter the radio frequency field of the NFC reader 200, they first receive a request command for the second NFC protocol broadcast by the NFC reader 200. Therefore, each of the multiple NFC devices supporting the second NFC protocol can return a request response command to the NFC reader 200. A description of the request response command can be found in [reference needed]. Figure 18 The description of the request-response command in S603. The NFC card reader 200 receives request-response commands from multiple NFC devices in PICC mode (supporting the first NFC protocol), resulting in card conflict. Therefore, an anti-collision procedure using the second NFC protocol can be performed. This anti-collision procedure and... Figure 19 The anti-collision process shown is similar. After the anti-collision process of the second NFC protocol, the NFC card reader 200 can determine the second target NFC device from multiple NFC devices supporting the second NFC protocol, and perform NFC signaling interaction with the second target NFC device to complete the card swiping transaction of the second target NFC device. Specific details and... Figure 19 It is similar to the S712.
[0633] For example, in Figure 32 In the eighth card conflict scenario shown, the target PICC of the NFC card reader 200 includes a PICC of type A supporting the first NFC protocol and a PICC of type A supporting the second NFC protocol. Multiple NFC devices supporting the first NFC protocol include physical NFC tag cards of type A supporting the first NFC protocol. Multiple NFC devices supporting the second NFC protocol include physical NFC tag cards of type A supporting the second NFC protocol. The timing of the NFC device's entry is uncertain. The NFC card reader 200 may first receive a polling response frame (i.e., a ProbeACK frame) of the first NFC protocol sent by the NFC device, at which point it may select a physical NFC tag card of type A supporting the first NFC protocol, for example... Figure 32 In scenario 1, the NFC reader 200 may also first receive a polling response frame (i.e., a request-response command) of the second NFC protocol sent by the NFC device. In this case, it may select a physical NFC tag card of type A that supports the second NFC protocol, such as... Figure 33 As shown in scenario 2, the NFC reader device 200 has a probability / may select a target PICC that is either a physical NFC tag card of type A supporting the first NFC protocol or a physical NFC tag card of type A supporting the second NFC protocol.
[0634] Figure 32 Taking multiple NFC devices supporting the first NFC protocol as an example, in other embodiments, there may only be one NFC device supporting the first NFC protocol. In case 1, the NFC card reader 200 receives a ProbeACK frame sent by the NFC device, and therefore can directly perform NFC signaling interaction with the NFC device using the first NFC protocol to complete the card swiping service of the NFC device. For a specific process example, please refer to [link to example]. Figure 8 / Figure 20 .
[0635] Figure 32 Taking multiple NFC devices supporting the second NFC protocol as an example, in some other embodiments, there may only be one NFC device supporting the second NFC protocol. In case 2, the NFC card reader 200 receives a request-response command sent by the NFC device, and can therefore directly perform NFC signaling interaction with the NFC device using the second NFC protocol to complete the card swiping service of the NFC device.
[0636] Figure 33 This is a flowchart illustrating another card conflict handling method provided in the embodiments of this application.
[0637] Figure 33 The method shown can be applied to an NFC system including an NFC reader 200, an NFC device 100, one or more NFC devices supporting a first NFC protocol, and multiple NFC devices supporting a second NFC protocol. The NFC reader 200 can be in PCD mode. The NFC device 100 can be in PICC mode. The one or more NFC devices supporting the first NFC protocol can be in PICC mode. The multiple NFC devices supporting the second NFC protocol can be in PICC mode.
[0638] Figure 33 The method shown can be applied to the ninth card conflict scenario. In the ninth card conflict scenario, NFC device 100 is an active device, and NFC device 100 supports a first NFC protocol and a second NFC protocol. One or more NFC devices supporting the first NFC protocol are all passive devices, and none of them support the second NFC protocol. Multiple NFC devices supporting the second NFC protocol are all passive devices, and none of them support the first NFC protocol.
[0639] The NFC card reader 200 supports both a first NFC protocol and a second NFC protocol. The NFC card reader 200 can alternately poll using both the first and second NFC protocols. For details, please refer to [link / reference needed]. Figure 32 Explanation of polling in the code.
[0640] Figure 33 The method shown may include, but is not limited to, the following steps:
[0641] S6000: NFC device 100 enters the radio frequency field of NFC card reader 200; one or more NFC devices supporting the first NFC protocol enter the radio frequency field of NFC card reader 200; and multiple NFC devices supporting the second NFC protocol enter the radio frequency field of NFC card reader 200. This application embodiment does not limit the order in which multiple NFC devices enter the radio frequency field of NFC card reader 200.
[0642] S6001: The NFC card reader 200 sends a request command for the second NFC protocol to the NFC device 100; the NFC card reader 200 sends a request command for the second NFC protocol to one or more NFC devices that support the first NFC protocol; the NFC card reader 200 sends a request command for the second NFC protocol to multiple NFC devices that support the second NFC protocol.
[0643] S6002: Multiple NFC devices supporting the second NFC protocol send multiple request-response commands for the second NFC protocol to the NFC card reader 200.
[0644] S6003: The NFC card reader 200 and multiple NFC devices supporting the second NFC protocol perform a collision prevention process of the second NFC protocol, wherein the NFC card reader 200 determines the second target NFC device from the multiple NFC devices supporting the second NFC protocol.
[0645] S6004: The NFC card reader 200 performs NFC signaling interaction with the second target NFC device using the second NFC protocol to complete the card swiping service of the second target NFC device.
[0646] Among them, S6000-S6004 can be in Figure 33 This was executed under scenario 1 shown. Figure 33 Scenario 1 illustrates the following: After NFC device 100, one or more NFC devices supporting the first NFC protocol, and multiple NFC devices supporting the second NFC protocol enter the radio frequency field of NFC reader 200, they first receive a request command for the second NFC protocol broadcast by NFC reader 200. Therefore, each of the multiple NFC devices supporting the second NFC protocol can return a request response command to NFC reader 200. A description of the request response command can be found in [reference needed]. Figure 18 The description of the request-response command in S603. Although the active NFC device 100 supports the second NFC protocol, it may not return a request-response command to the NFC reader device 200 if it receives a request command of the second NFC protocol first.
[0647] In some embodiments of this application, the active NFC device 100 can be preset to preferentially use the first NFC protocol. Therefore, after receiving a request command of the second NFC protocol, the NFC device 100 may not send a request-response command to the NFC card reader 200, but instead continue to monitor the polling commands sent by the NFC card reader 200, for example... Figure 33 In scenario 1, after receiving the Probe frame of the first NFC protocol, the NFC device 100 can send a ProbeACK frame to the NFC reader device 200, for example... Figure 33 Case 2 is shown.
[0648] In some embodiments of this application, the active NFC device 100 may include an NFC emulator card 1 supporting a first NFC protocol and an NFC emulator card 2 supporting a second NFC protocol. The NFC device 100 may first communicate with the NFC reader device 200 using the NFC emulator card 1 supporting the first NFC protocol. Therefore, after receiving a request command under the second NFC protocol, the NFC device 100 does not return a request-response command but continues to monitor the polling commands sent by the NFC reader device 200, for example... Figure 33In scenario 1, the NFC device 100 receives the Probe frame of the first NFC protocol and returns a ProbeACK frame, for example... Figure 33 Case 2 is shown.
[0649] For example, if the NFC device 100 does not send a request-response command to the NFC reader 200, but continues to monitor the polling command sent by the NFC reader 200, the end time of continued monitoring can be set to the time when the NFC reader 200 receives the next request command of the second NFC protocol. Before this end time, if the NFC device 100 receives the Probe frame of the first NFC protocol, it cancels the monitoring polling command and returns a ProbeACK frame. If the NFC device 100 does not receive the Probe frame of the first NFC protocol, it returns a request-response command when it receives the next request command of the second NFC protocol sent by the NFC reader 200.
[0650] Not limited to the above embodiments, in other embodiments, after the active NFC device 100 receives the request command of the second NFC protocol, it can also return a request response command to the NFC card reader 200. In this case, the NFC card reader 200, the NFC device 100, and multiple NFC devices supporting the second NFC protocol can perform the anti-collision procedure of the second NFC protocol. Figure 18 Similarly, I will not elaborate further.
[0651] S6003 and S6004 are optional steps. In some embodiments of this application, the NFC card reader 200 can be preset to prioritize the use of the first NFC protocol. Therefore, after receiving request-response commands from multiple PICC mode NFC devices (supporting the second NFC protocol), the NFC card reader 200 can skip the anti-collision process of the second NFC protocol and continue with the next polling, that is, first broadcast the Probe frame of the first NFC protocol, without executing S6003-S6004. In other embodiments of this application, after receiving request-response commands from multiple PICC mode NFC devices (supporting the second NFC protocol), the NFC card reader 200 determines that a card conflict exists and can perform the anti-collision process of the second NFC protocol. This anti-collision process and Figure 19 The anti-collision process shown is similar. After the anti-collision process of the second NFC protocol, the NFC card reader 200 can determine the second target NFC device from multiple NFC devices supporting the second NFC protocol, and perform NFC signaling interaction with the second target NFC device to complete the card swiping transaction of the second target NFC device. Specific details and... Figure 19 It is similar to the S712.
[0652] S6005: NFC device 100 enters the radio frequency field of NFC card reader 200; one or more NFC devices supporting the first NFC protocol enter the radio frequency field of NFC card reader 200; and multiple NFC devices supporting the second NFC protocol enter the radio frequency field of NFC card reader 200. This application embodiment does not limit the order in which multiple NFC devices enter the radio frequency field of NFC card reader 200.
[0653] S6006: The NFC card reader 200 sends a first NFC protocol probe frame to the NFC device 100, the NFC card reader 200 sends a first NFC protocol probe frame to one or more NFC devices that support the first NFC protocol, and the NFC card reader 200 sends a first NFC protocol probe frame to multiple NFC devices that support the second NFC protocol.
[0654] S6007: NFC device 100 sends a first NFC protocol probe ACK frame to NFC card reader 200.
[0655] S6008: One or more NFC devices supporting the first NFC protocol send one or more probe ACK frames of the first NFC protocol to the NFC reader device 200.
[0656] S6009: The NFC card reader 200 and NFC device 100, and one or more NFC devices supporting the first NFC protocol, perform an anti-collision process of the first NFC protocol, wherein the NFC card reader 200 determines the first target NFC device (i.e., the active NFC device 100) from the NFC device 100 and one or more NFC devices supporting the first NFC protocol.
[0657] S6010: The NFC card reader 200 and the NFC device 100 perform NFC signaling interaction of the first NFC protocol to complete the card swiping business of the NFC device 100.
[0658] Among them, S6005-S6010 can be in Figure 33 This was executed under scenario 2 shown. Figure 33 Scenario 2 illustrates the following: After NFC device 100, one or more NFC devices supporting the first NFC protocol, and multiple NFC devices supporting the second NFC protocol enter the radio frequency field of NFC reader 200, they first receive a Probe frame of the first NFC protocol broadcast by NFC reader 200. Therefore, each of the one or more NFC devices supporting the first NFC protocol can return a Probe ACK frame to NFC reader 200. A description of the Probe ACK frame can be found in [link to documentation]. Figure 20 The description of the Probe ACK frame in S1002. Based on the above description of the active NFC device 100, after receiving the Probe frame of the first NFC protocol, the active NFC device 100 can return a Probe ACK frame to the NFC card reader 200. The NFC card reader 200 receives Probe ACK frames sent by multiple PICC mode NFC devices (supporting the first NFC protocol), resulting in card conflicts. Therefore, it can perform an anti-collision procedure of the first NFC protocol. This anti-collision procedure and... Figure 11 / Figure 25 The anti-collision process shown is similar. After the anti-collision process of the first NFC protocol, the NFC card reader 200 can determine the first target NFC device (i.e., the active NFC device 100) from the NFC device 100 and one or more NFC devices supporting the first NFC protocol, and perform NFC signaling interaction with the NFC device 100 to complete the card swiping business of the NFC analog card in the NFC device 100. Specific explanations and... Figure 20 Similar to S1007.
[0659] For example, in Figure 33 In the ninth card conflict scenario shown, the target PICC of the NFC card reader 200 includes a PICC of type A supporting the first NFC protocol and a PICC of type A supporting the second NFC protocol. The NFC device 100 is a mobile phone, which may include one or more NFC emulators, including an NFC emulator of type A supporting the first NFC protocol and an NFC emulator of type A supporting the second NFC protocol. One or more NFC devices supporting the first NFC protocol include physical NFC tag cards of type A supporting the first NFC protocol. Multiple NFC devices supporting the second NFC protocol include physical NFC tag cards of type A supporting the second NFC protocol. The timing of the NFC device's entry is uncertain; the NFC card reader 200 may first receive a polling response frame (i.e., a request-response command) for the second NFC protocol sent by the NFC device, at which point it may select a physical NFC tag card of type A supporting the second NFC protocol, for example... Figure 33 As shown in scenario 1, the NFC reader 200 may also first receive the first NFC protocol polling response frame (i.e., the ProbeACK frame) sent by the NFC device. In this case, it will preferentially select the active NFC device 100, and select the NFC analog card that supports type A of the first NFC protocol, for example... Figure 33 As shown in scenario 2, the NFC reader device 200 has a probability / may select either an NFC analog card supporting the first NFC protocol (Type A) or a physical NFC tag card supporting the second NFC protocol (Type A).
[0660] Figure 33 Taking multiple NFC devices supporting the second NFC protocol as an example, in other embodiments, there may only be one NFC device supporting the second NFC protocol. In case 1, the NFC card reader 200 receives a request-response command sent by the NFC device. Optionally, the NFC card reader 200 can directly interact with the NFC device through NFC signaling of the second NFC protocol to complete the card swiping service of the NFC device.
[0661] Figure 34 This is a flowchart illustrating another card conflict handling method provided in the embodiments of this application.
[0662] Figure 34 The method shown can be applied to an NFC system including an NFC reader 200, multiple NFC devices supporting a first NFC protocol, and multiple NFC devices supporting a second NFC protocol. The NFC reader 200 can be in PCD mode. The multiple NFC devices supporting the first NFC protocol can be in PICC mode. The multiple NFC devices supporting the second NFC protocol can be in PICC mode.
[0663] Figure 34 The method shown can be applied to a tenth-card conflict scenario. In this scenario, multiple NFC devices supporting the first NFC protocol are passive devices and none of them support the second NFC protocol. Conversely, multiple NFC devices supporting the second NFC protocol are passive devices and none of them support the first NFC protocol.
[0664] Figure 34 The method shown may include, but is not limited to, the following steps:
[0665] S7000: Multiple NFC devices supporting the first NFC protocol enter the radio frequency field of the NFC card reader 200, and multiple NFC devices supporting the second NFC protocol enter the radio frequency field of the NFC card reader 200. This application embodiment does not limit the order in which the multiple NFC devices enter the radio frequency field of the NFC card reader 200.
[0666] S7001: The NFC card reader 200 sends a probe frame of the first NFC protocol to a plurality of NFC devices that support the first NFC protocol, and the NFC card reader 200 sends a probe frame of the first NFC protocol to a plurality of NFC devices that support the second NFC protocol.
[0667] S7002: Multiple NFC devices supporting the first NFC protocol send multiple probe ACK frames of the first NFC protocol to the NFC card reader 200 respectively.
[0668] S7003: The NFC card reader 200 and multiple NFC devices supporting the first NFC protocol perform an anti-collision process of the first NFC protocol, wherein the NFC card reader 200 determines the first target NFC device from the multiple NFC devices supporting the first NFC protocol.
[0669] S7004: The NFC card reader 200 and the first target NFC device perform NFC signaling interaction of the first NFC protocol, wherein the card swiping service of the first target NFC device fails.
[0670] In some embodiments of this application, Figure 34 S7000-S7003 and Figure 32 Similar to the S5000-S5003, this anti-collision process and Figure 11 / Figure 25 The anti-collision process shown is similar. Figure 34 In S7004, because the first target NFC device is not the target PICC of the NFC card reader 200, the card swipe operation of the first target NFC device fails. The explanation of the card swipe operation failure is as follows: Figure 30 The explanation for the card swipe transaction failure in S3014 is similar. In this case, the NFC card reader 200 deselects and determines to switch to the second NFC protocol, so S7005 can be executed as described below.
[0671] S7005: The NFC card reader 200 sends a request command for the second NFC protocol to multiple NFC devices that support the first NFC protocol.
[0672] S7006: Multiple NFC devices supporting the second NFC protocol send multiple request-response commands for the second NFC protocol to the NFC card reader 200.
[0673] S7007: The NFC card reader 200 and multiple NFC devices supporting the second NFC protocol perform a collision prevention process of the second NFC protocol, wherein the NFC card reader 200 determines the second target NFC device from the multiple NFC devices supporting the second NFC protocol.
[0674] S7008: The NFC card reader 200 performs NFC signaling interaction with the second target NFC device using the second NFC protocol to complete the card swiping service of the second target NFC device.
[0675] In some embodiments of this application, Figure 34 S7005-S7008 and Figure 32Similar to S5006-S5009. In this case, since the second target NFC device is the target PICC of the NFC card reader 200, the card swiping transaction of the second target NFC device is successfully executed. Specific explanations and... Figure 19 It is similar to the S712.
[0676] For example, in Figure 34 In the tenth card conflict scenario shown, the target PICC of the NFC reader 200 includes a PICC of type C supporting the first NFC protocol and a PICC of type A supporting the second NFC protocol. Multiple NFC devices supporting the first NFC protocol do not include PICCs of type C supporting the first NFC protocol; for example, they may include physical NFC tag cards of type A supporting the first NFC protocol. Multiple NFC devices supporting the second NFC protocol include physical NFC tag cards of type A supporting the second NFC protocol. Therefore, when the NFC reader 200 interacts with any one of the multiple NFC devices supporting the first NFC protocol (e.g., the first target NFC device) via NFC signaling, the card swiping service of that NFC device fails because it is not the target PICC of the NFC reader 200. The NFC reader 200 can switch to the second NFC protocol. When the NFC reader 200 interacts with the second target NFC device among the multiple NFC devices supporting the second NFC protocol via NFC signaling, the card swiping service of the second target NFC device may succeed because the second target NFC device may be the target PICC of the NFC reader 200. Among them, the NFC card reader device has a 200% probability / possibility of selecting a target PICC that is a physical NFC tag card of type A that supports the second NFC protocol.
[0677] Figure 34 Taking multiple NFC devices supporting the first NFC protocol as an example, in other embodiments, there may only be one NFC device supporting the first NFC protocol. In this case, the NFC card reader 200 receives a ProbeACK frame sent by the NFC device, and therefore can directly perform NFC signaling interaction with the NFC device using the first NFC protocol. The card swiping operation of the NFC device fails. Specific process examples and... Figure 8 / Figure 20 similar.
[0678] Figure 34 Taking multiple NFC devices supporting the second NFC protocol as an example, in other embodiments, there may only be one NFC device supporting the second NFC protocol. In this case, the NFC card reader 200 receives a request-response command sent by the NFC device, and can therefore directly perform NFC signaling interaction with the NFC device using the second NFC protocol to complete the card swiping service of the NFC device.
[0679] Figure 34 Taking the example of multiple NFC devices supporting the second NFC protocol entering the field before S7001, in the specific implementation, multiple NFC devices supporting the second NFC protocol can enter the field at any time before S7005.
[0680] Figure 35 This is a flowchart illustrating another card conflict handling method provided in the embodiments of this application.
[0681] Figure 35 The method shown can be applied to an NFC system including an NFC reader 200, an NFC device 100, one or more NFC devices supporting a first NFC protocol, and one or more NFC devices supporting a second NFC protocol. The NFC reader 200 can be in PCD mode. The NFC device 100 can be in PICC mode. The one or more NFC devices supporting the first NFC protocol can be in PICC mode. The one or more NFC devices supporting the second NFC protocol can be in PICC mode.
[0682] Figure 35 The method shown can be applied to the eleventh card conflict scenario. In the eleventh card conflict scenario, NFC device 100 is an active device, and NFC device 100 supports a first NFC protocol and a second NFC protocol. One or more NFC devices supporting the first NFC protocol are all passive devices, and none of them support the second NFC protocol. One or more NFC devices supporting the second NFC protocol are all passive devices, and none of them support the first NFC protocol.
[0683] Figure 35 The method shown may include, but is not limited to, the following steps:
[0684] S8000: NFC device 100 enters the radio frequency field of NFC card reader 200; one or more NFC devices supporting the first NFC protocol enter the radio frequency field of NFC card reader 200; one or more NFC devices supporting the second NFC protocol enter the radio frequency field of NFC card reader 200. This application embodiment does not limit the order in which multiple NFC devices enter the radio frequency field of NFC card reader 200.
[0685] S8001: The NFC card reader 200 sends a first NFC protocol probe frame to the NFC device 100, the NFC card reader 200 sends a first NFC protocol probe frame to one or more NFC devices that support the first NFC protocol, and the NFC card reader 200 sends a first NFC protocol probe frame to one or more NFC devices that support the second NFC protocol.
[0686] S8002: NFC device 100 sends a first NFC protocol probe ACK frame to NFC card reader 200.
[0687] S8003: One or more NFC devices supporting the first NFC protocol send one or more probe ACK frames of the first NFC protocol to the NFC reader device 200.
[0688] S8004: The NFC card reader 200 and NFC device 100, and one or more NFC devic...
Claims
1. A card conflict handling method, characterized in that, Applied to a first near-field communication (NFC) device, the method includes: Send a probe frame, the probe frame indicating that the first NFC device supports the first NFC protocol; Receive a first detection confirmation frame sent by a second NFC device, the first detection confirmation frame indicating that the second NFC device supports the first NFC protocol; Receive a second detection confirmation frame sent by a third NFC device, the second detection confirmation frame indicating that the third NFC device supports the first NFC protocol; Send conflicting frames; Receive a first conflict confirmation frame sent by the second NFC device, the first conflict confirmation frame including the card identification information of the second NFC device; Receive a second conflict confirmation frame sent by the third NFC device, the second conflict confirmation frame including the card identification information of the third NFC device; Based on the card identification information of the second NFC device and the card identification information of the third NFC device, the second NFC device is determined to be the target NFC device from the second NFC device and the third NFC device; The card identification information of the second NFC device includes a card type identifier and a card random number. The card type identifier of the second NFC device indicates the device type of the second NFC device. The card identification information of the third NFC device includes a card type identifier and a card random number. The card type identifier of the third NFC device indicates the device type of the third NFC device. The device type includes an active device type or a passive device type.
2. The method according to claim 1, characterized in that, The method further includes: Send a selection frame, the selection frame including card identification information of the second NFC device; Receive the selection confirmation frame sent by the second NFC device.
3. The method according to claim 1 or 2, characterized in that, The method further includes: Send a notification frame, the notification frame including device feature information of the first NFC device; Receive a notification confirmation frame sent by the second NFC device.
4. The method according to claim 1, characterized in that, The step of determining the second NFC device as the target NFC device based on the card identification information of the second NFC device and the card identification information of the third NFC device includes: When the card type identifier of the second NFC device indicates that the second NFC device is an active device, and the card type identifier of the third NFC device indicates that the third NFC device is a passive device, the second NFC device is determined to be the target NFC device from the second NFC device and the third NFC device.
5. The method according to claim 1, characterized in that, The step of determining the second NFC device as the target NFC device based on the card identification information of the second NFC device and the card identification information of the third NFC device includes: When the card type identifier of the second NFC device indicates that the second NFC device is a passive device, the card type identifier of the third NFC device indicates that the third NFC device is a passive device, and the card random number of the second NFC device is less than the card random number of the third NFC device, the second NFC device is determined to be the target NFC device from the second NFC device and the third NFC device.
6. The method according to claim 1 or 2, characterized in that, The first detection confirmation frame includes a first anti-collision random number, and the second detection confirmation frame includes a second anti-collision random number. The first anti-collision random number and the second anti-collision random number are different.
7. The method according to claim 1 or 2, characterized in that, The conflict frame includes a waiting time slot, which is the number of time slots S included in the first time period preset by the first NFC device. The first time period is the time period during which the first NFC device receives the conflict confirmation frame, and S is a positive integer.
8. The method according to claim 7, characterized in that, The first conflict confirmation frame and the second conflict confirmation frame were received in different time slots within the S time slots of the first time period.
9. The method according to claim 1 or 2, characterized in that, The method further includes: The device performs a first communication with the second NFC device, the first communication being used to execute the card swiping service of the second NFC device.
10. The method according to claim 1 or 2, characterized in that, Before sending the probe frame, the method further includes: Send a request command for a second NFC protocol, which is the contactless card standard ISO14443 protocol or IEC14443 protocol.
11. The method according to claim 9, characterized in that, The second NFC device is a passive device that supports the first NFC protocol but does not support the second NFC protocol. The second NFC protocol is the contactless card standard ISO14443 protocol or IEC14443 protocol. The method further includes: When the second NFC device is not the NFC device required by the first NFC device, the card swiping service of the second NFC device is determined to have failed based on the first communication.
12. The method according to claim 11, characterized in that, The method further includes: Send a request command for the second NFC protocol; Receive the request response command of the second NFC protocol sent by the fourth NFC device; The second communication is performed with the fourth NFC device using the second NFC protocol, and the second communication is used to execute the card swiping service of the fourth NFC device.
13. The method according to claim 9, characterized in that, The second NFC device is an active device that supports the first NFC protocol and the second NFC protocol, wherein the second NFC protocol is the contactless card standard ISO14443 protocol or IEC14443 protocol, and the method further includes: When the second NFC device does not include an NFC analog card that supports the first NFC protocol required by the first NFC device, the card swiping service of the second NFC device is determined to have failed based on the first communication.
14. The method according to claim 13, characterized in that, The method further includes: Send a request command for the second NFC protocol; Receive request response commands for the second NFC protocol sent by the fifth NFC device and the sixth NFC device; The fifth NFC device is identified as the target NFC device from the fifth NFC device and the sixth NFC device; The third communication with the fifth NFC device is performed using the second NFC protocol, and the third communication is used to execute the card swiping service of the fifth NFC device.
15. A communication device, characterized in that, It includes a transceiver, a processor, and a memory, the memory being used to store a computer program, and the processor calling the computer program to perform the method as described in any one of claims 1-14.
16. A computer storage medium, characterized in that, The computer storage medium stores a computer program, which, when executed by a processor, is used to implement the method as described in any one of claims 1-14.
17. A computer program product, characterized in that, When the computer program product is run on a processor, it is used to implement the method as described in any one of claims 1-14.
18. A chip system, characterized in that, It includes a processing circuit and an interface circuit, the interface circuit being used to receive code instructions and transmit them to the processing circuit, the processing circuit being used to execute the code instructions to perform the method as described in any one of claims 1-14.
Citation Information
Patent Citations
Non-contact type card and working method
CN106326797A
Non-contact communication anti-collision method, radio frequency identification card and card reader
CN114742084A