Card conflict processing method and related device

By exchanging detection and conflict frames between NFC devices to obtain card identification and device feature information, the problem of poor card swiping experience caused by random selection under card conflict is solved, and more efficient card conflict processing and user-friendly communication experience are achieved.

CN120658287AActive Publication Date: 2025-09-16HUAWEI TECH CO LTD

Patent Information

Application Number
CN202510625117.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2024-08-14
Filing Date
2024-12-04
Publication Date
2025-09-16
Estimated Expiration
2044-12-04

AI Technical Summary

Technical Problem

In the event of a card conflict, existing NFC devices often randomly select a PICC device for communication, resulting in a poor card swiping experience and failing to meet the needs of card readers and users.

Method used

By sending detection frames and collision frames between NFC devices, the card identification information and device feature information of each NFC device are obtained, and the target NFC device that meets the requirements is selected for communication according to preset rules.

Benefits of technology

It improves the accuracy of card conflict handling and the card swiping experience, ensures that the selected NFC device meets the needs of the card reader and the user, and improves the reliability and efficiency of communication.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120658287A_ABST
    Figure CN120658287A_ABST
Patent Text Reader

Abstract

The invention provides a card conflict processing method and a related device, the method is applied to a first near field communication (NFC) device, and the method comprises the following steps: sending a detection frame to a plurality of second NFC devices; receiving detection acknowledgement frames sent by a plurality of second NFC devices; transmitting the conflict frame to a plurality of second NFC devices; receiving conflict confirmation frames sent by a plurality of second NFC devices, wherein the conflict confirmation frames comprise card identification information of the second NFC devices; and determining a third NFC device from the plurality of second NFC devices according to the card identification information of the plurality of second NFC devices, and performing first communication with the third NFC device, the first communication being used for executing a card swiping service of the third NFC device. Therefore, the third NFC device required by the first NFC device can be selected under the condition of card conflict, and the card swiping experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application. The application number of the original application is 202411777599.X, and the original application date is December 4, 2024. The entire content of the original application is incorporated into this application by reference. Technical Field

[0002] The present application relates to the field of wireless communication technology, and in particular to a card conflict handling method and related devices. Background Art

[0003] With the development of wireless communication technology, near field communication (NFC) has been widely used. NFC technology is the integration and evolution of contactless radio frequency identification (RFID) and interconnection technology. 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] At present, the NFC device in PCD mode can generate high-frequency alternating current to generate a radio frequency field of a specified frequency. The NFC device in PICC mode that enters the radio frequency field can receive the NFC signal broadcast by the NFC device in PCD mode, and can choose to send a response signal to the NFC device in PCD mode. If the NFC device in PCD mode receives a response signal sent by a NFC device in PICC mode, the NFC device in PCD mode can communicate with the NFC device in PICC mode using NFC technology. If the NFC device in PCD mode receives response signals sent by multiple NFC devices in PICC mode, there is a card conflict. The NFC device in PCD mode can select one NFC device from the multiple NFC devices in PICC mode through an anti-collision process to communicate with the NFC device in NFC technology. However, the NFC device in PCD mode generally uses a bit-oriented anti-collision mechanism, such as selecting the NFC device in PICC mode with the smallest unique identifier (UID). The NFC device in PICC mode selected in this way is random and may not meet the requirements of the NFC device in PCD mode and the needs of users, resulting in a poor card swiping experience. Summary of the Invention

[0005] The present application discloses a card conflict handling method and related devices, 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 the requirements of the NFC device in the card reader PCD mode and also meets the needs of users, thereby effectively improving the card swiping experience.

[0006] In a first aspect, the present application provides a card conflict handling method, applied to a first NFC device, the method comprising: 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) a Probe frame to multiple second NFC devices (e.g., in PICC mode), the Probe frame indicating that the first NFC device supports a first NFC protocol; upon receiving Probe ACK frames sent by the multiple second NFC devices (which may also be referred to as a card conflict), the first NFC device sends (e.g., broadcasting) a Conflict frame to the multiple second NFC devices, wherein the Probe ACK frame sent by the second NFC device indicates that the second NFC device supports the first NFC protocol; then, the first NFC device receives Conflict ACK frames sent by the multiple second NFC devices, the Conflict ACK frames sent by the second NFC devices including card identification information of the second NFC devices; the first NFC device determines a third NFC device from the multiple second NFC devices based on the card identification information in the Conflict ACK frames sent by the multiple second NFC devices, and performs a first communication with the third NFC device, wherein the first communication is used to perform a card swiping service 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, wherein the card type identifier of the second NFC device indicates the type of the second NFC device, for example, indicating that the second NFC device is an active device (such as a mobile phone, computer, or other electronic device) or indicating that the second NFC device is a passive device (such as a physical NFC tag card). Optionally, the card random number of different NFC devices can be different.

[0008] In the above method, during communication using the first NFC protocol, if a 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 a target NFC device (i.e., a third NFC device) from among the multiple second NFC devices for card swiping based on the card identification information, rather than randomly selecting a second NFC device for card swiping. The third NFC device selected by the first NFC device meets the needs of both the first NFC device and the user, thereby improving the card swiping experience.

[0009] In one possible implementation, after a first NFC device receives ConflictACK frames from multiple second NFC devices and identifies a 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. The first NFC device then 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 perform a first communication with the third NFC device to perform 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 third NFC device's card identification information. Therefore, after 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 first communication between the first and third NFC devices and achieving more reliable communication.

[0011] In one possible implementation, after a first NFC device receives multiple ConflictACK frames sent by a second NFC device and identifies a 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. The first NFC device then receives a NotifyACK frame sent by the third NFC device in response to the Notify frame. After receiving the NotifyACK frame from the third NFC device, the first NFC device can perform a first communication with the third NFC device to perform the card swiping service of the third NFC device.

[0012] In some examples, the device feature information of the first NFC device includes one or more of a service identifier (SID), an organization identifier (OUI), and a group identifier (GID) of the first NFC device. The SID indicates the types of NFC services supported by the first NFC device, such as access control, keys, transportation, banking, digital currency, digital IDs, codeless payment, electronic tickets, wireless charging, tap-and-pay, and multi-function cards. The OUI indicates the manufacturer of the NFC service provided by the first NFC device. The GID indicates the group to which the NFC service provided by the first NFC device belongs.

[0013] In the above method, after the first NFC device determines 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 intention of the first NFC device. For example, the type of NFC service that the first NFC device intends to perform is determined by the SID in the device feature information, which facilitates the subsequent first communication between the first NFC device and the third NFC device, achieving more reliability.

[0014] In one possible implementation, the first NFC device determines target card identification information from the card identification information of multiple second NFC devices based on a preset rule, and determines a third NFC device corresponding to the target card identification information from the multiple second NFC devices. The preset rule is set based on user needs.

[0015] In the above method, the first NFC device can select the target NFC device according to user needs, thereby ensuring that the third NFC device selected in the event of a card conflict meets the user 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, the card random numbers of different second NFC devices are different. The multiple second NFC devices include a third NFC device and a fourth NFC device. When the first NFC device determines the third NFC device from the multiple second NFC devices based on the card identification information of the multiple second NFC devices, 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, the first NFC device determines the third NFC device as the active device from the third and fourth NFC devices.

[0017] In the above method, most users prefer to use NFC simulated cards in active devices such as mobile phones and watches for card swiping. Therefore, the first NFC device selecting an active third 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 have different card random numbers. The multiple second NFC devices include a third NFC device and a fourth NFC device. When the first NFC device determines a third NFC device from the multiple second NFC devices based on the card identification information of the multiple second NFC devices, 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 smaller than the card random number of the fourth NFC device, the first NFC device determines the third NFC device with the smaller card random number from the third and fourth NFC devices.

[0019] In the above method, if the third NFC device and the fourth NFC device are of the same device type, the first NFC device can select the third NFC device for the card swiping service according to the card random number, ensuring that the target NFC device is normally selected in the event of a card conflict.

[0020] In one possible implementation, the Probe ACK frame includes an anti-collision random number, and the multiple second NFC devices include a third NFC device and a fourth NFC device. When a first NFC device receives Probe ACK frames sent by the multiple 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, the first Probe ACK frame and the second Probe ACK frame are received at the same time. The first Probe ACK frame includes a first anti-collision random number, the second Probe ACK frame includes a second anti-collision random number, and the first anti-collision random number and the second anti-collision random number are different. Therefore, for the first Probe ACK frame and the second Probe ACK frame received at the same time, the first NFC device determines 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 based on the different first and second anti-collision random numbers.

[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. The anti-collision random numbers of different NFC devices are different. 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, thereby avoiding the situation where the first NFC device mistakenly identifies the card conflict scenario and causes communication abnormality, and the fault tolerance rate is higher.

[0022] In one possible implementation, the Conflict frame includes a waiting time slot, where the waiting time slot is a number S of time slots included in a first time period preset by the first NFC device, where the first time period is a time period during which the first NFC device receives Conflict ACK frames, and S is a positive integer; and the first NFC device receives Conflict ACK frames sent by multiple second NFC devices in multiple time slots in the first time period, respectively, where the 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 send Conflict ACK frames in multiple different time slots according to the waiting time slot, thereby avoiding the situation where the first NFC device cannot normally receive the Conflict ACK frames sent by two or more second NFC devices in the same time slot, or even cannot normally recognize them, thereby increasing the fault tolerance rate of card conflict processing.

[0024] In one possible implementation, when multiple second NFC devices and a fifth NFC device enter the RF field of a first NFC device, the first NFC device sends Probe frames to the multiple second NFC devices and the fifth NFC device. Because the multiple second NFC devices support the first NFC protocol, but the fifth NFC device does not, the first NFC device receives the ProbeACK frames sent by the multiple second NFC devices but does not receive the ProbeACK frame sent by the fifth NFC device. The first NFC device can then perform the card conflict resolution process of the first NFC protocol with the multiple second NFC devices and determine the third NFC device from the multiple second NFC devices to perform the card swiping service.

[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., an electronic device such as a mobile phone or a watch) that supports both the first and second NFC protocols. The seventh NFC device is a passive device (e.g., a physical NFC tag) 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 may send a request command using 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 using the second NFC protocol sent by the seventh NFC device. The active sixth NFC device, while supporting the second NFC protocol, may choose not to return a request response command to the first NFC device, attempting to communicate with the first NFC device using the first NFC protocol. Therefore, the first NFC device does not receive the request response command using 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 NFC device and the seventh NFC device), and then receives ProbeACK frames sent by the 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 send 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 the first and second NFC protocols, it can choose not to respond to the request command of the second NFC protocol, but instead respond to the detection frame of the first NFC protocol to participate in the communication of the first NFC protocol. The first NFC device can then 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 and does not support the second NFC protocol, and the second NFC protocol is the contactless card standard ISO14443 protocol or IEC14443 protocol; when the first NFC device and the third NFC device perform the first communication, if the third NFC device is not the NFC device required by the first NFC device, for example, the first NFC device fails to verify the card information of the third NFC device, the first NFC device determines based on the first communication that the card swiping service of the third NFC device has failed to be executed; then, the first NFC device sends a request command of the second NFC protocol to an eighth NFC device (supporting the second NFC protocol) and receives a request response command of the second NFC protocol sent by the eighth NFC device; the first NFC device and the eighth NFC device perform the second communication of the second NFC protocol, and the second communication is used to execute the card swiping service 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 supporting the second NFC protocol.

[0030] In one possible implementation, the third NFC device is an active device (such as an electronic device such as a mobile phone or a watch) that supports the first NFC protocol and the second NFC protocol, and the second NFC protocol is the contactless card standard ISO14443 protocol or IEC14443 protocol. When the first NFC device and the third NFC device perform the first communication, if the third NFC device does not include the NFC emulated card that supports the first NFC protocol required by the first NFC device, for example, the first NFC device fails to verify the card information of the NFC emulated card (supporting the first NFC protocol) sent by the third NFC device, the first NFC device determines, based on the first communication, that the card swiping service of the third NFC device has failed. Then, the first NFC device sends a request command of the second NFC protocol to a ninth NFC device (supporting the second NFC protocol) and the third NFC device, and receives request response commands of the second NFC protocol sent by the third NFC device and the ninth NFC device, respectively. The first NFC device determines a tenth NFC device from the third NFC device and the ninth NFC device, and the tenth NFC device is either the third NFC device or the ninth NFC device. The first NFC device and the tenth NFC device perform a third communication using the second NFC protocol, and the third communication is used to perform the card swiping service of the tenth NFC device.

[0031] In the above method, if the first NFC device fails to perform a card swiping service on the third NFC device during the first communication with 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 second NFC protocol communication. The first NFC device can perform a card conflict resolution process using the second NFC protocol with the third NFC device and the ninth NFC device, and the third NFC device can attempt to perform an NFC simulated card swiping service using the second NFC protocol within the third NFC device, thereby improving the card swiping performance of the third NFC device.

[0032] In a second aspect, the present application provides a card conflict handling method, which is applied to a second NFC device. The method includes: the second NFC device (e.g., in PICC mode) receives 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 sends a conflict confirmation (Conflict ACK) frame to the first NFC device, where the Conflict ACK frame includes the 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, where the first communication is used to perform the card swiping service of 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, wherein the card type identifier of the second NFC device indicates the type of the second NFC device, for example, indicating that the second NFC device is an active device (such as a mobile phone, computer, or other electronic device) or indicating that the second NFC device is a passive device (such as a physical NFC tag card). Optionally, the card random number of different NFC devices can be different.

[0034] In some examples, the Conflict frame is sent by the first NFC device when it receives ProbeACK frames sent by multiple NFC devices (for example, in PICC mode, where the multiple NFC devices include the second NFC device) (which may be referred to as a card conflict situation). 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 ProbeACK frames to the first NFC device. After receiving the Probe frame sent by the first NFC device, the second NFC device sends a ProbeACK frame to 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. 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) sent by multiple NFC devices (e.g., in PICC mode, where the multiple NFC devices include 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 the multiple NFC devices based on the card identification information of the multiple NFC devices. If the first NFC device only receives the Conflict ACK frame sent by the second NFC device, for example, if the other NFC devices malfunction or experience other abnormalities, the first NFC device can determine that the third NFC device is the second NFC device based on the card identification information of the second NFC device.

[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, so that the first NFC device can determine the target NFC device (i.e., the third NFC device) for the card swiping service from the multiple PICC mode NFC devices 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 the first NFC device and the user, thereby improving the card swiping experience.

[0037] In one possible implementation, when the third NFC device is the second NFC device, after sending a Conflict ACK frame to the first NFC device, the second NFC device receives a Pick frame from the first NFC device. The Pick frame carries the card identification information of the third NFC device. The second NFC device then 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 perform a first communication to execute the third NFC device's card swiping service.

[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 third NFC device's card identification information. Therefore, after 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 first communication between the first and third NFC devices and achieving more reliable communication.

[0039] In one possible implementation, when the third NFC device is the second NFC device, after sending a Conflict ACK frame to the first NFC device, the second NFC device receives a Notify frame from the first NFC device. The Notify frame carries the device feature information of the first NFC device. The second NFC device then sends a Notify ACK frame to the first NFC device. Subsequently, the second NFC device (i.e., the third NFC device) and the first NFC device perform a first communication to execute the third NFC device's card swiping service.

[0040] In some examples, the device feature information of the first NFC device includes one or more of a service identifier (SID), an organization identifier (OUI), and a group identifier (GID) of the first NFC device. The SID indicates the types of NFC services supported by the first NFC device, such as access control, keys, transportation, banking, digital currency, digital IDs, codeless payment, electronic tickets, wireless charging, tap-and-pay, and multi-function cards. The OUI indicates the manufacturer of the NFC service provided by the first NFC device. The GID indicates the group to which the NFC service provided by the first NFC device belongs.

[0041] In the above method, after the first NFC device determines 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 intention of the first NFC device. For example, the type of NFC service that the first NFC device intends to perform is determined by the SID in the device feature information, which facilitates the subsequent first communication between the first NFC device and the third NFC device, achieving more reliability.

[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, where the Probe frame indicates that the first NFC device supports the first NFC protocol. Then, the second NFC device sends a ProbeACK frame to the first NFC device, where the ProbeACK frame indicates that the second NFC device supports the first NFC protocol.

[0043] In one possible implementation, the second NFC device is an active device (such as an electronic device such as a mobile phone or a watch) that supports both the first NFC protocol and the second NFC protocol, and 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 of the second NFC protocol sent by the first NFC device. Although the second NFC device supports the second NFC protocol, it may choose not to return a request response command of the second NFC protocol to the first NFC device after receiving the request command, but instead continue to monitor for polling commands sent by the first NFC device. Then, the second NFC device receives a Probe frame of the first NFC protocol sent by the first NFC device, the Probe frame indicating that the first NFC device supports the first NFC protocol. At this time, the second NFC device sends a Probe ACK frame of the first NFC protocol to the first NFC device in an attempt to communicate with the first NFC device via the first NFC protocol. The Probe ACK 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 send detection 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 the first NFC protocol and the second NFC protocol, it can choose not to respond to the request command of the second NFC protocol, but instead respond to the detection frame 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 another NFC device, the first NFC device can perform the card conflict processing of the first NFC protocol instead of the card conflict processing of the second NFC protocol, thereby ensuring that the first NFC device selects the target NFC device that meets its requirements and improving the card swiping experience.

[0046] In one possible implementation, the second NFC device is an active device (such as a mobile phone, a watch, or other electronic device) that supports the first NFC protocol and the second NFC protocol, the second NFC protocol is the contactless card standard ISO14443 protocol or IEC14443 protocol, and 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 perform first communication, if the second NFC device does not include the NFC emulated card that supports the first NFC protocol required by the first NFC device, for example, the first NFC device fails to verify the card information of the NFC emulated card (supporting the first NFC protocol) sent by the second NFC device, the second NFC device determines, based on the first communication, that the card swiping service of the second NFC device has failed to be executed; then, the second NFC device receives a request command of the second NFC protocol sent by the first NFC device, and at this time, the second NFC device sends a request response command of 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 perform second communication of the second NFC protocol, and the second communication is used to execute the card swiping service of the second NFC device.

[0047] In the above method, if the second NFC device fails to perform the card swiping service of the second NFC device when the second NFC device and the first NFC device perform the first communication, the first NFC device can switch to the second NFC protocol, and the active second NFC device can continue to participate in the communication of the second NFC protocol to attempt to perform the card swiping service of the NFC simulated 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] In a third aspect, the present application provides another card conflict handling method, which is applied to a first NFC device, the method comprising: the first NFC device (for example, in PCD mode, the first NFC device may also be referred to as an NFC card reader) sending (for example, broadcasting) a Probe frame to multiple second NFC devices (for example, in PICC mode), the Probe frame indicating that the first NFC device supports a first NFC protocol; when the first NFC device receives Probe ACK frames sent by multiple second NFC devices (which may also be referred to as a card conflict), the first NFC device sends (for example, broadcasting) a Conflict frame to the multiple second NFC devices, wherein the Probe ACK frame sent by the second NFC device indicates that the second NFC device supports the first NFC protocol, and the Conflict frame includes device feature information of the first NFC device; the first NFC device receives Conflict frames sent by multiple second NFC devices. ACK frame, the conflict confirmation frame sent by the second NFC device includes a matching result of the device feature information of the second NFC device and the first NFC device; the first NFC device determines a 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, where the first communication is used to perform a 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 feature information of the first NFC device includes a service identifier (SID), an organization identifier (OUI), and a group identifier (GID) of the first NFC device. The SID indicates the types of NFC services supported by the first NFC device, such as access control, keys, transportation, banking, digital currency, digital IDs, codeless payment, electronic tickets, wireless charging, tap-and-pay, and multi-function cards. The OUI indicates the manufacturer of the NFC service provided by the first NFC device. The GID indicates the group to which the NFC service provided by the first NFC device belongs.

[0050] In the above method, in the event of a card conflict, the first NFC device can send a conflict frame (carrying the device feature information of the first NFC device) to multiple second NFC devices, so that the multiple second NFC devices return a conflict confirmation frame (carrying the matching result of the device feature information of the second NFC device and the first NFC device). In addition, the first NFC device can select a target NFC device (i.e., a third NFC device) from the multiple second NFC devices for the card swiping service based on the conflict confirmation frames returned by the multiple second NFC devices, instead of randomly selecting an NFC device for the card swiping service. In this way, the selected third NFC device meets the needs of the first NFC device and the user, thereby improving the card swiping experience.

[0051] In one possible implementation, the collision confirmation frame sent by the third NFC device includes a first matching result, indicating that the device feature information of the third NFC device and the first NFC device successfully matches. The above method further includes: after determining the third NFC device, the first NFC device sends (e.g., broadcasts) a Pick frame to multiple second NFC devices, the Pick frame including the card identification information of the third NFC device; and 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, indicating that the card identification information of the third NFC device and the third NFC device in the Pick frame successfully match. Therefore, after receiving the first Pick ACK frame, the first NFC device can perform a first communication with the third NFC device to perform 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 of the third NFC device and a card random number. The card type identifier of the third NFC device indicates the type of the third NFC device, for example, indicating that the third NFC device is an active device (such as a mobile phone, computer, or other electronic device) or a passive device (such as a physical NFC tag). The card random number of different NFC devices can be different.

[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 services. However, the other NFC devices among the multiple second NFC devices, except 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. After receiving the selection frame, the other NFC devices may not return a selection confirmation frame to the first NFC device, thereby allowing the first NFC device to further determine that the third NFC device is the target NFC device, thereby improving the error tolerance rate.

[0054] In one possible implementation, the multiple second NFC devices include a third NFC device and a fourth NFC device, and the conflict confirmation frame sent by the fourth NFC device includes a third matching result, where the third matching result is used to indicate that the device feature information of the fourth NFC device and the first NFC device match successfully, or the third matching result is used to indicate that the device feature information of the fourth NFC device and the first NFC device match fails. The above method further includes: the first NFC device receiving a second selection confirmation frame sent by the fourth NFC device, where the second selection confirmation frame includes a fourth matching result, where the fourth matching result is used to indicate that the card identification information of the fourth NFC device and the third NFC device in the selection frame match fails.

[0055] In the above method, a fourth NFC device other than the third NFC device among the multiple second NFC devices can determine, based on the selection frame, that the fourth NFC device is not the target NFC device of the first NFC device, and return a second selection confirmation frame (carrying a fourth matching result indicating a matching failure) 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 that the third NFC device is the target NFC device, thereby improving the error tolerance rate.

[0056] In a 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 matches successfully, 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 the multiple second NFC devices based on the matching results in the conflict confirmation frames sent by the multiple second NFC devices and the card identification information of the second NFC device in the conflict confirmation frames where the matching results indicate a successful match.

[0058] In one possible implementation, the multiple second NFC devices include a third NFC device and a fourth NFC device; when a first matching result in a conflict confirmation frame sent by the third NFC device indicates that device feature information of the third NFC device and the first NFC device match successfully, and a third matching result in a conflict confirmation frame sent by the fourth NFC device indicates that device feature information of the fourth NFC device and the first NFC device match fails, the first NFC device may determine, from the third and fourth NFC devices, the third NFC device whose device feature information matches successfully with the first NFC device.

[0059] In one possible implementation, the multiple 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 match successfully, 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 match successfully, the first NFC device may determine, from the third NFC device and the fourth NFC device, a third NFC device whose card identification information successfully matches the card identification information of the target NFC device of the first 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 may be determined according to a preset rule, where the preset rule is set according to user requirements.

[0061] In the above method, when the third NFC device and the fourth NFC device both 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, thereby ensuring that the third NFC device selected in the event of a card conflict meets the requirements of the first NFC device. The card identification information of the target NFC device of the first NFC device can be determined according to user needs, thereby ensuring that the third NFC device selected in the event of a card conflict meets the user 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 successfully match, 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 successfully match, 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, the first NFC device can determine the third NFC device that is the active device from the third NFC device and the fourth NFC device.

[0063] In the above method, most users prefer to use NFC simulated cards in active devices such as mobile phones and watches for card swiping. Therefore, the first NFC device selecting an active third 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 match successfully, 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 match successfully, 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 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, the first NFC device can determine the third NFC device with a smaller card random number from the third NFC device and the fourth NFC device.

[0065] In the above method, when the third NFC device and the fourth NFC device both 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 for the card swiping service according to the card random number, ensuring that the target NFC device is selected normally in the event of a card conflict.

[0066] In one possible implementation, the conflict frame includes first information, where the first information is used to instruct the NFC device that receives the conflict frame to feedback 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 is a conflict between multiple NFC devices in PICC mode (also known as a card conflict).

[0067] In some examples, the length of the first information is 1 byte, including 8 bits, namely bit0 to bit7. The first information in the conflict frame can take the value of 0x07. Among them, the value of bit0 in the first information is 1, which is used to indicate that the NFC device that receives the conflict frame feeds back the matching result of the device feature information of the NFC device and the first NFC device in the conflict frame. The value of bit1 in the first information is 1, which is used to indicate that there is a card conflict. The value of bit2 in the first information is 1, which is used to indicate that the NFC device that receives the conflict frame feeds back the card identification information of the NFC device when the device feature information of the first NFC device in the conflict frame is successfully matched. The values ​​of bit3 to bit7 in the first information are 0.

[0068] In a possible implementation, the selection frame includes second information, where the second information is used to instruct the NFC device that receives the selection frame to feed back a matching result between the card identification information of the NFC device and the third NFC device in the selection frame.

[0069] In some examples, the length of the second information is 1 byte, including 8 bits, namely bit0 to bit7. The second information in the selection frame can take the value of 0x04. Among them, the value of bit0 in the second information is 0, which is used to indicate that the NFC device that receives the selection frame does not feedback the matching result of the device feature information of the NFC device and the first NFC device. The value of bit1 in the second information is 0, which is used to indicate that there is no card conflict. The value of bit2 in the second information is 1, which is used to indicate that the NFC device that receives the selection frame feedbacks the matching result of the card identification information of the NFC device and the third NFC device in the selection frame. The values ​​of bits 3 to 7 in the first information are 0.

[0070] In one possible implementation, the collision frame includes a waiting time slot, where the waiting time slot is a 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 collision confirmation frames sent by multiple second NFC devices 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 frame sent to multiple second NFC devices, so that the multiple second NFC devices send conflict confirmation frames in multiple different time slots according to the waiting time slot, thereby avoiding the situation where the first NFC device receives conflict confirmation frames sent by two or more second NFC devices in the same time slot and cannot recognize them, thereby increasing the fault tolerance rate of card conflict processing.

[0072] In one possible implementation, when multiple second NFC devices and a fifth NFC device enter the radio frequency field of a first NFC device, the first NFC device may send detection frames to the multiple second NFC devices and the fifth NFC device. Because the multiple second NFC devices support the first NFC protocol, but the fifth NFC device does not, the first NFC device receives the detection confirmation frames sent by the multiple second NFC devices but does not receive the detection confirmation frame sent by the fifth NFC device. The first NFC device may then perform a card conflict resolution process with the multiple second NFC devices and determine the third NFC device from the multiple second NFC devices for card swiping.

[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, and 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. 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 may send a request command using 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 using the second NFC protocol sent by the seventh NFC device. The sixth NFC device, while supporting the second NFC protocol, may choose not to return a request response command to the first NFC device, attempting to communicate with the first NFC device using the first NFC protocol. Therefore, the first NFC device does not receive the request response command using the second NFC protocol sent by the sixth NFC device. Subsequently, the first NFC device sends a detection frame using the first NFC protocol to the multiple second NFC devices (including the sixth and seventh NFC devices) and may receive a detection confirmation frame from 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 send detection 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 may respond to the detection 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 a first NFC device, the first NFC device may send a request command using 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 ISO 14443 or IEC 14443), the first NFC device may receive a request response command using the second NFC protocol sent by the eighth NFC device. In this case, the first NFC device may select the eighth NFC device and conduct a second communication using the second NFC protocol with the eighth NFC device. The second communication is used to perform the card swiping service of the eighth NFC device.

[0077] In the above method, when the first NFC device only receives a request response command of the second NFC protocol sent by the eighth NFC device, it can directly select the eighth NFC device instead of continuing to send the detection frame of the first NFC protocol. This can avoid the following two situations: the first situation is that when there are multiple NFC devices in the radio frequency field of the first NFC device, the first NFC device performs polling and card conflict processing again, resulting in slow card swiping; the second situation is that when there is only the eighth NFC device in the radio frequency field of the first NFC device, the first NFC device performs at least one more polling before selecting the eighth NFC device, resulting in very slow card swiping, thereby improving the user's card swiping experience.

[0078] In a fourth aspect, the present application provides another card conflict handling method, which is applied to a second NFC device, the method comprising: the second NFC device (for example, in PICC mode) receives a conflict frame sent (for example, broadcast) by a first NFC device (for example, 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 sends a conflict confirmation Conflict ACK frame to the first NFC device, the conflict confirmation 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 successfully matches.

[0079] In some examples, the device feature information of the first NFC device includes a service identifier (SID), an organization identifier (OUI), and a group identifier (GID) of the first NFC device. The SID indicates the types of NFC services supported by the first NFC device, such as access control, keys, transportation, banking, digital currency, digital IDs, codeless payment, electronic tickets, wireless charging, tap-and-pay, and multi-function cards. The OUI indicates the manufacturer of the NFC service provided by the first NFC device. The GID indicates the group to which the NFC service provided by the first NFC device belongs.

[0080] In some examples, the conflict frame is sent by the first NFC device when it receives detection confirmation frames sent by multiple NFC devices (for example, in PICC mode, where the multiple NFC devices include the second NFC device) (which may be referred to as a card conflict situation). After receiving the detection frame sent by the first NFC device (indicating that the first NFC device supports the first NFC protocol), the multiple NFC devices send detection confirmation frames to the first NFC device (indicating that the NFC devices support the first NFC protocol). After receiving the detection frame sent by the first NFC device, the second NFC device sends a detection confirmation frame to the first NFC device (indicating that the second NFC device supports the first NFC protocol).

[0081] In some examples, the first matching result is used to assist the first NFC device in identifying the third NFC device. In the event of a card conflict, when the first NFC device receives a conflict confirmation frame (including a matching result of device feature information between the NFC device and the first NFC device) sent by multiple NFC devices (e.g., in PICC mode, including the second NFC device), the first NFC device can identify the third NFC device from the multiple NFC devices based on the matching results (including the first matching result) in the conflict confirmation frames sent by the multiple NFC devices. If the first NFC device only receives a conflict confirmation frame sent by the second NFC device, for example, if the other NFC devices malfunction or experience other abnormalities, the first NFC device can determine that the third NFC device is 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, so that the first NFC device can determine the target NFC device (i.e., the third NFC device) for the card swiping service from the multiple PICC mode NFC devices in conflict based on the first matching result in the conflict confirmation frame. The third NFC device selected in this way meets the needs of the first NFC device and the user, thereby 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 may receive a Pick frame sent by the first NFC device, where the Pick frame includes the card identification information of the third NFC device. The second NFC device may then send a Pick ACK frame to the first NFC device, where 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 of the third NFC device and a card random number. The card type identifier of the third NFC device indicates the type of the third NFC device, for example, indicating that the third NFC device is an active device (such as a mobile phone, computer, or other electronic device) or a passive device (such as a physical NFC tag). The card random number of different NFC devices can be different.

[0085] In the above method, the second NFC device can determine that the second NFC device 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 the card swiping service. In addition, the second NFC device can return a selection confirmation frame (carrying a second matching result indicating a successful match) to the first NFC device, thereby allowing the first NFC device to further determine that the second NFC device is the target NFC device, thereby increasing the error 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 match successfully, and the second matching result indicates that the card identification information of the second NFC device and the third NFC device match successfully; 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 match fails; 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 match successfully, or the first matching result indicates that the device feature information of the second NFC device and the first NFC device match fails.

[0087] In a possible implementation, when the first matching result indicates that the device feature information of the second NFC device matches the device feature information of the first NFC device successfully, 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 collision confirmation frame is used to assist the first NFC device in identifying the third NFC device. The first NFC device can identify the third NFC device from the at least one NFC device based on a matching result in a collision confirmation frame sent by at least one NFC device (e.g., in PICC mode, where the at least one NFC device includes the second NFC device) and the card identification information of the NFC device in the collision confirmation frame where the matching result indicates a successful match.

[0089] In one possible implementation, the conflict frame includes first information, where the first information is used to instruct the NFC device that receives the conflict frame to feedback 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 is a conflict between multiple NFC devices in PICC mode (also known as a card conflict).

[0090] In some examples, the length of the first information is 1 byte, including 8 bits, namely bit0 to bit7. The first information in the conflict frame can take the value of 0x07. Among them, the value of bit0 in the first information is 1, which is used to indicate that the NFC device that receives the conflict frame feeds back the matching result of the device feature information of the NFC device and the first NFC device in the conflict frame. The value of bit1 in the first information is 1, which is used to indicate that there is a card conflict. The value of bit2 in the first information is 1, which is used to indicate that the NFC device that receives the conflict frame feeds back the card identification information of the NFC device when the device feature information of the first NFC device in the conflict frame is successfully matched. The values ​​of bit3 to bit7 in the first information are 0.

[0091] In a possible implementation, the selection frame includes second information, where the second information is used to instruct the NFC device that receives the selection frame to feed back a matching result between the card identification information of the NFC device and the third NFC device in the selection frame.

[0092] In some examples, the length of the second information is 1 byte, including 8 bits, namely bit0 to bit7. The second information in the selection frame can take the value of 0x04. Among them, the value of bit0 in the second information is 0, which is used to indicate that the NFC device that receives the selection frame does not feedback the matching result of the device feature information of the NFC device and the first NFC device. The value of bit1 in the second information is 0, which is used to indicate that there is no card conflict. The value of bit2 in the second information is 1, which is used to indicate that the NFC device that receives the selection frame feedbacks the matching result of the card identification information of the NFC device and the third NFC device in the selection frame. The values ​​of 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 from the first NFC device, then receives a detection frame for the first NFC protocol from the first NFC device (indicating that the first NFC device supports the first NFC protocol). The second NFC device may then send a detection 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 may choose not to return a request response command to the first NFC device after receiving the request command. Instead, it may continue monitoring and, after receiving the detection frame, return a detection confirmation frame to the first NFC device in an attempt to communicate with the first NFC device using 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 send detection 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 may respond to the detection 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 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.

[0096] In a fifth aspect, the present application provides a communication device comprising a transceiver, a processor, and a memory; the memory is used to store a computer program, the processor calls the computer program, and the communication device executes the card conflict handling method provided by the first aspect, the third aspect, and any one of the implementation methods of the first aspect and the third aspect.

[0097] In the sixth aspect, the present application provides another communication device, including a transceiver, a processor and a memory; the above-mentioned memory is used to store the computer program, and the above-mentioned processor calls the above-mentioned computer program, so that the above-mentioned communication device executes the card conflict handling method provided by the second aspect, the fourth aspect and any one of the implementation methods of the second aspect and the fourth aspect.

[0098] In a seventh aspect, the present application provides a communication device comprising 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 configured to store computer program code. The computer program code comprises computer instructions. When the one or more processors execute the computer instructions, the communication device executes the card conflict handling method provided in the first aspect, the third aspect, or any one of the implementations of the first and third aspects.

[0099] In an eighth aspect, the present application provides a communication device comprising 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 configured to store computer program code. The computer program code comprises computer instructions. When the one or more processors execute the computer instructions, the communication device executes the card conflict handling method provided in the second aspect, the fourth aspect, or any one of the implementations of the second and fourth aspects.

[0100] In the ninth aspect, an embodiment of the present application provides 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 one of the implementation methods of the first aspect and the third aspect.

[0101] In the tenth aspect, an embodiment of the present application provides a computer storage medium, including a computer program, which, when executed by a processor, is used to implement the card conflict handling method provided in the second aspect, the fourth aspect, and any one of the implementation methods of the second aspect and the fourth aspect.

[0102] In the eleventh aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when the computer program runs on a processor, is used to implement the card conflict handling method provided by the first aspect, the third aspect, and any one of the implementation methods of the first aspect and the third aspect.

[0103] In the twelfth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when the computer program runs on a processor, is used to implement the card conflict handling method provided in the second aspect, the fourth aspect, and any one of the implementation methods of the second aspect and the fourth aspect.

[0104] In a thirteenth aspect, the present application provides an electronic device, the electronic device including a method or apparatus for executing any aspect or embodiment of the present application. The electronic device is, for example, a chip.

[0105] It should be understood that the description of technical features, technical solutions, beneficial effects or similar language in this application does not imply that all features and advantages can be realized in any single implementation. On the contrary, 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 description of a technical feature, technical solution or beneficial effect in this application does not necessarily refer to the same implementation. Furthermore, the technical features, technical solutions and beneficial effects described in this application can also be combined in any appropriate 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 specific implementation. In other implementations, additional technical features and beneficial effects can also be identified in specific implementations that do not embody all implementations. BRIEF DESCRIPTION OF THE DRAWINGS

[0106] The following is an introduction to the drawings used in this application.

[0107] Figure 1 This is a schematic diagram of the working principle of near field communication (NFC) provided by this application;

[0108] Figure 2 This is a schematic diagram of the architecture of an NFC system provided by this application;

[0109] Figure 3 This is another architectural diagram of an NFC system provided by this application;

[0110] Figure 4 This is a schematic structural diagram of a passive NFC device provided by the present application;

[0111] Figure 5 This is a schematic structural diagram of an active NFC device provided by this application;

[0112] Figure 6 This is a schematic diagram of the architecture of an NFC protocol stack provided by this application;

[0113] Figures 7A-7C This is a schematic diagram of some card conflict scenarios provided by this application;

[0114] Figure 8 This is a flowchart of a card conflict handling method provided by this application;

[0115] Figure 9 This is a schematic diagram of the format of a notification frame provided by this application;

[0116] Figure 10 This is a format diagram of a notification confirmation frame provided by this application;

[0117] Figure 11This is a flowchart of another card conflict handling method provided by this application;

[0118] Figure 12 This is a schematic diagram of the format of a conflict frame provided by this application;

[0119] Figure 13 This is a schematic diagram of the format of a conflict confirmation frame provided by this application;

[0120] Figure 14 This is a schematic diagram of a format for selecting frames provided by this application;

[0121] Figure 15 This is a flowchart of another card conflict handling method provided by this application;

[0122] Figure 16 This is a flowchart of another card conflict handling method provided by this application;

[0123] Figure 17 This is a flowchart of another card conflict handling method provided by this application;

[0124] Figure 18 This is a flowchart of another card conflict handling method provided by this application;

[0125] Figure 19 This is a flowchart of another card conflict handling method provided by this application;

[0126] Figure 20 This is a flowchart of another card conflict handling method provided by this application;

[0127] Figure 21 This is a schematic diagram of the format of a detection frame provided by this application;

[0128] Figure 22 This is a schematic diagram of the format of a detection confirmation frame provided by this application;

[0129] Figure 23 This is a schematic diagram of another notification frame format provided by this application;

[0130] Figure 24 This is another format diagram of a notification confirmation frame provided by this application;

[0131] Figure 25 This is a flowchart of another card conflict handling method provided by this application;

[0132] Figure 26 This is another format diagram of a conflict frame provided by this application;

[0133] Figure 27 This is a schematic diagram of the format of another conflict confirmation frame provided by this application;

[0134] Figure 28 This is another format diagram of a selection frame provided by this application;

[0135] Figure 29 This is a format diagram of a selection confirmation frame provided by this application;

[0136] Figure 30 This is a flowchart of another card conflict handling method provided by this application;

[0137] Figure 31 This is a flowchart of another card conflict handling method provided by this application;

[0138] Figure 32 This is a flowchart of another card conflict handling method provided by this application;

[0139] Figure 33 This is a flowchart of another card conflict handling method provided by this application;

[0140] Figure 34 This is a flowchart of another card conflict handling method provided by this application;

[0141] Figure 35 This is a flowchart of another card conflict handling method provided by this application;

[0142] Figure 36 This is a schematic diagram of the hardware structure of an electronic device provided by this application;

[0143] Figures 37-40 This is a schematic diagram of the structures of some communication devices provided in this application. DETAILED DESCRIPTION

[0144] The technical solutions in the embodiments of the present application will be described below in conjunction with the accompanying drawings. The terms used in the implementation methods of the embodiments of the present application are only used to explain the specific embodiments of the present application and are not intended to limit the present application.

[0145] In the description of the embodiments of the present application, unless otherwise specified, “ / ” means or, for example, A / B can mean A or B; “and / or” in the text is merely a description of the association relationship of associated objects, indicating that three relationships may exist, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, “multiple” refers to two or more than two.

[0146] In the following, the terms "first" and "second" are used for descriptive purposes only and should not be understood to imply or suggest relative importance or implicitly indicate the number of the technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of this application, unless otherwise specified, "plurality" means two or more.

[0147] The following describes the working principle of the near field communication (NFC) technology in the embodiments of the present application.

[0148] Figure 1 This is a schematic diagram of the NFC working principle provided by an embodiment of the present application.

[0149] like Figure 1 As shown, the two parties communicating using NFC technology may include a proximity coupling device (PCD) and a proximity integrated circuit card (PICC). Among them, the PCD can implement contactless communication with the PICC. The PCD and the PICC can allow near-field communication at a specific data rate (e.g., 106 kilobits per second (kbps), 212kbps, 424kbps, or 848kbps)) and a specific frequency (e.g., 13.56 megahertz (MHz)). The communication between the PCD and the PICC can occur within a close distance between the PCD and the PICC, for example, within a range of approximately 2 cm to 4 cm.

[0150] The PCD can generate high-frequency alternating current to generate a radio frequency field of a specified frequency (for example, 13.56MHz) and send data to the PICC through the radio frequency field. When the PICC is close to the PCD, it can sense the radio frequency field emitted by the PCD. After entering the radio frequency field of the PCD, the PICC can obtain energy from the radio frequency field of the PCD through electromagnetic induction, and use the obtained energy to generate electricity to drive the circuit inside the PICC and analyze the data sent by the PCD through the radio frequency field, thereby realizing data transmission from the PCD to the PICC. The PICC can also send data to the PCD by load modulating the radio frequency field, thereby realizing data transmission from the PICC to the PCD.

[0151] The following describes the NFC system in the embodiments of the present application.

[0152] Figure 2 1 is a schematic diagram of the architecture of an NFC system 10 provided in an embodiment of the present application.

[0153] like Figure 2 As shown, the NFC system 10 may include an NFC device 100 and an NFC card reader 200. The NFC card reader 200 may also be referred to as the NFC device 200. When the NFC device 100 and the NFC card reader 200 are brought into proximity, the NFC card reader 200 may function as a PCD to communicate with the NFC device 100, which functions as a PICC, using NFC technology. When the NFC card reader 200 functions as a PCD to communicate using NFC technology, it may be referred to as being in PCD mode. When the NFC device 100 functions as a PICC to communicate using NFC technology, it may 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 an electronic device 100). The electronic device 100 can simulate itself as a PICC that complies with NFC standards by using data from an NFC emulated card to implement the functions of a PICC. The electronic device 100 can activate one or more NFC emulated cards. An active device is a device that requires a power source to operate, while a passive device is a device that can operate 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, and the electronic device 100 can support both PICC mode and PCD mode. When the electronic device 100 is in PCD mode, it can act as a PCD to transmit a radio frequency field and communicate with the PICC through the radio frequency field. When the electronic device 100 is in PICC mode, it can act as a PICC to passively receive the radio frequency field transmitted by the PCD and communicate with the PCD using NFC technology through load modulation technology. In some examples, after the electronic device 100 turns on the NFC function, it can be in PICC mode. In some examples, after the electronic device 100 turns on the NFC function, it can switch between PICC mode and PCD mode in a time-sharing manner.

[0156] In the embodiment of the present application, the device type of the electronic device 100 can be any of a mobile phone, a tablet computer, a handheld computer, a desktop computer, a laptop computer, an ultra-mobile personal computer (UMPC), a netbook, a cellular phone, a personal digital assistant (PDA), as well as smart home devices such as smart large screens and smart speakers, wearable devices such as smart bracelets, smart watches, 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, etc.

[0157] In the embodiment of the present application, the device type of the NFC card reader 200 can be any one of a mobile phone, a tablet computer, a handheld computer, a desktop computer, a laptop computer, a super mobile personal computer, a netbook, a cellular phone, a personal digital assistant, as well as smart home devices such as smart large screens and smart speakers, wearable devices such as smart bracelets, smart watches, smart glasses, extended reality devices such as augmented reality, virtual reality, and mixed reality, vehicles, gates, smart door locks, card readers, payment terminals (such as point of sales (POS) machines), ticket purchasing and / or ticket verification terminals, bank service terminals, ID card reading devices, etc.

[0158] Figure 3 1 is a schematic diagram of the architecture of another NFC system 10 provided in an embodiment of the present 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 description of the NFC device 300 is similar to that of the NFC device 100. In some embodiments, the NFC device 100 and the NFC device 300 may both be active devices, and the device types of the NFC device 100 and the NFC device 300 may be the same or different. In other embodiments, the NFC device 100 and the NFC device 300 may both be passive devices. In other embodiments, one of the NFC devices 100 and the NFC device 300 is an active device and the other is a passive device. Figure 3 In the example shown, in a specific implementation, the NFC system 10 may have more NFC devices in PICC mode.

[0160] In some embodiments, the NFC card reader 200 can broadcast an NFC signal. The NFC device 100 and the NFC device 300 that enter the radio frequency field of the NFC card reader 200 can both receive the NFC signal broadcast by the NFC card reader 200 and can choose whether to send a corresponding response signal to the NFC card reader 200. If the NFC card reader 200 receives the response signals sent by the NFC device 100 and the NFC device 300, a card conflict exists. The NFC card reader 200 can select one of the NFC devices 100 and 300 through an anti-collision process to communicate using NFC technology. 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). The NFC device selected in this way is random and may not be the one intended by the NFC card reader 200 or the user, resulting in a poor card swiping experience.

[0161] An embodiment of the present application provides a card conflict handling method. In a card conflict scenario, an NFC card reader device 200 can select a target NFC device from multiple NFC devices in PICC mode (e.g., NFC device 100 and NFC device 300), and the NFC card reader device 200 can perform NFC signaling interaction with the target NFC device. In some examples, the device feature information of the target NFC device and the NFC card reader device 200 successfully matches, thereby ensuring that the selected target NFC device meets the requirements of the NFC card reader device 200, and the card identification information of the target NFC device and the card identification information sent by the NFC card reader device 200 successfully match. The card identification information sent by the NFC card reader device 200 is determined by the NFC card reader device 200 according to a preset rule, which is set according to user needs, such as giving priority to active devices. Therefore, it is ensured that the selected target NFC device meets the user's needs, effectively improving the user's card swiping experience. In other examples, the NFC card reader device 200 can select a target NFC device according to preset rules based on the card identification information of multiple PICC mode NFC devices. The preset rules are set according to user needs, such as giving priority to active devices, thereby ensuring that the selected target NFC device meets user needs and effectively improving the user's card swiping experience.

[0162] In the embodiment of the present application, the NFC card reader 200 in the PCD mode may also be referred to as a first NFC device, and the NFC device in the PICC mode may also be referred to as a second NFC device.

[0163] The structure of the NFC device 100 in the embodiment of the present application is described below. The structures of NFC devices such as the NFC device 300 are similar to that of the NFC device 100.

[0164] Figure 4 1 is a schematic structural diagram of a passive NFC device 100 provided in an embodiment of the present 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. The NFC transceiver and the NFC memory may be connected.

[0166] The NFC controller can be used to modulate and demodulate contactless communication signals and control the input and output of data in the NFC memory. In some embodiments, the NFC controller can include a memory that can be used to store instructions or data used or recycled by the NFC controller. If the NFC controller needs to use the instruction or data again, it can be called from the NFC memory.

[0167] The NFC transceiver can be used to transmit and receive NFC signals (e.g., 13.56 MHz radio frequency signals). The NFC device 100 can communicate with the NFC card reader 200 using NFC technology through the NFC transceiver. In some embodiments, the NFC transceiver may include an electromagnetic compatibility (EMC) filter circuit, a matching circuit, a receiving circuit, and an NFC antenna. The NFC antenna may be a loop antenna to implement proximity-based contactless communication capabilities of the NFC device 100.

[0168] The NFC memory can be used to store card information of the passive NFC device 100, that is, card information of the physical NFC tag card. The NFC memory can also be used to store data sent by the NFC transceiver to the NFC card reader 200, and data received from the NFC card reader 200.

[0169] Figure 5 1 is a schematic structural diagram of an active NFC device 100 provided in an embodiment of the present 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, and the like. In some embodiments, the electronic device 100 may further include a secure element (SE) 103 and / or a SIM card 104. The processor 101 may be connected to the NFC module 102, SE 103, and SIM card 104, respectively. The NFC module 102 may also be connected to the SE 103 and SIM card 104.

[0171] In some embodiments, the electronic device 100 can activate one or more NFC simulation cards in the application based on user input, so that the electronic device 100 supports one or more NFC services. The business processing logic of the NFC simulation card in the electronic device 100 is specifically implemented by an applet, and the applet can be stored and run in the hardware device or software module corresponding to the NFC simulation card (such as HCE application, SE103, SIM card 104, etc.).

[0172] The NFC module 102 can be used to implement NFC technology communication between the electronic device 100 and the NFC card reader device 200. The 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 the NFC module 102 can be used to modulate and demodulate contactless communication signals, control the input and output of data in the NFC memory, and interact with the processor 101. The NFC transceiver in the NFC module 102 can be used to transmit and receive NFC signals (e.g., 13.56 MHz radio frequency signals). In some embodiments, the NFC transceiver may include an EMC filter circuit, a matching circuit, a receiving circuit, and an NFC antenna, among others. The NFC antenna may be a loop antenna to implement the proximity-based contactless communication capabilities of the NFC module 102. The NFC memory in the NFC module 102 can be used to store data sent by the NFC module 102 to the NFC card reader 200, as well as data received from the NFC card reader 200.

[0174] In some embodiments, the NFC memory can be a memory that can be shared by the NFC module 102 and other modules in the electronic device 100. For example, some data in the NFC memory can be called by the NFC controller, while other data can be called by the SE103. In other embodiments, the NFC memory can also be a collection of multiple memories. For example, the NFC controller can include a first memory among the multiple memories. The first memory can be used to store instructions or data used or recycled by the NFC controller. If the NFC controller needs to use the instruction or data again, it can be directly called from the first memory, thus reducing the waiting time of the NFC controller. SE103 can include a second memory among the multiple memories. The second memory can be used to store card information of an NFC simulated card based on a secure element (SE). In this way, if SE103 needs to read the card information of the NFC simulated card, the card information of the NFC simulated card can be read from the second memory in SE103. The SIM card 104 may include a third memory among the multiple memories, and the third memory may be used to store card information of an NFC simulated card based on the SIM card, etc. In this way, if the SIM card 104 needs to read the card information of the NFC simulated card, the card information of the NFC simulated card may be read 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, the routing information can be controlled or managed by the NFC controller, and the routing information can include a routing table, which is composed of a list of routing rules. Each routing rule includes 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 simulated card. The destination corresponding to the AID is the place where the applet of the AID runs (that is, the hardware device or software module corresponding to the NFC simulated card of the AID). In some examples, the destination can include at least one of the following: one or more HCE applications in the processor 101, SE103 or SIM card 104.

[0176] In some embodiments, the SE 103 and the NFC module 102 may be two independent chips. In other embodiments, the SE 103 and the NFC module 102 may be packaged in one 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, the electronic device 100 can provide the operating environment of the applet corresponding to the NFC simulated card and the storage and processing of the business data of the NFC simulated card through the SE 103 or SIM card 104. The NFC module 102, as the front end of contactless communication, forwards the NFC signaling received from the external NFC card reader device 200 to the SE 103 or SIM card 104. The applet in the SE 103 or SIM card 104 processes the NFC signaling and generates response data for the NFC card reader device 200. The SE 103 or SIM card 104 can send the response data to the NFC module 102, and the NFC module 102 can send the response data to the external NFC card reader device 200. In some examples, the user can activate one or more NFC simulated cards in the wallet application, the wallet application can write the applets of one or more NFC simulated cards and the card data into SE103, and SE103 can run the applets of one or more NFC simulated cards. In some examples, the user can activate one or more NFC simulated cards in the SIM card application, the SIM card application can write the applets of one or more NFC simulated cards and the card data into the SIM card 104 for storage, and the SIM card 104 can run the applets of one or more NFC simulated cards.

[0179] In software-based HCE mode, the HCE application in processor 101 can provide an operating environment for the applet corresponding to the NFC emulated card, as well as storage and processing of the business data of the NFC emulated card. As the front end of contactless communication, NFC module 102 forwards NFC signaling received from an external NFC card reader 200 to the HCE application in processor 101. The HCE application can process the NFC signaling through an applet running in the HCE application or a cloud server and generate response data for the PCD. The HCE application can then send the response data to NFC module 102, which in turn can send the response data to the external NFC card reader 200. In some examples, a user can activate one or more NFC emulated cards in the HCE application, which can run one or more NFC emulated card applets. The HCE application can then save the card data of the NFC emulated card in the local storage of the electronic device 100 or on a cloud server.

[0180] For example, in the above-mentioned card emulation scenario, the electronic device 100 may be installed with native applications related to NFC, and the user may also download and install third-party applications in the electronic device 100 through the application store. Generally speaking, the native application can adopt a hardware-based virtual card solution, while the third-party application can adopt 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 the present application and should not constitute a limitation.

[0181] In some embodiments, the processor 101 may further include an NFC service module. The NFC service module may be configured to provide common management functions for one or more NFC services. The common management functions may include file management, card long-term activation, security management, service routing management, and other functions.

[0182] The following describes the NFC protocol stack in the embodiments of the present application.

[0183] Figure 6 This is a schematic diagram of the architecture of an NFC protocol stack provided in an embodiment of the present application.

[0184] like Figure 6 As shown in Figure 1, the NFC protocol stack may include a physical layer, a radio frequency layer, an access layer, a transport layer, and an application layer.

[0185] The physical layer can be used to implement the physical characteristics of NFC technology communication.

[0186] The radio frequency layer can be used to implement radio frequency specifications during NFC technology communication, such as data rate, frequency of radio frequency signals, etc.

[0187] The access layer can be used to implement polling and device discovery, service result notification, card conflict management, transmission protocol negotiation, timeout and retransmission mechanism, PICC / PCD mode switching, and integrated card selection.

[0188] The transport layer includes a high-speed data transmission protocol, through which data transmission between the PCD and the PICC at the application layer can be achieved.

[0189] The application layer can be used to implement one or more NFC services and one or more service management strategies. Among them, one or more NFC services may include codeless payment, electronic tickets, access control, digital ID cards, full-scene touch, short-range data transmission, etc. One or more business management strategies may include any one or more of file management, card long activation, security management and service routing management. In some embodiments, the processing logic of the NFC service can be executed by Applet. In some embodiments, the processing logic of the service management strategy can be executed by Figure 5 The NFC service module in the processor 101 is shown to execute.

[0190] Next, some card conflict scenarios are exemplified.

[0191] Figures 7A-7C Schematic diagram illustrating some card conflict scenarios.

[0192] Figures 7A-7C The NFC card reader 200 is used as a bus card reader as an example for illustration.

[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 devices 100 and 300 are stacked together and close to the card swipe 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 NFC signaling exchanges with NFC devices 100 and 300 in an anti-collision process to select one NFC device from NFC device 100 and 300.

[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 for card swiping, thereby enabling the NFC card reader 200 to swipe the NFC device 300. However, in actual scenarios, the user's goal is to swipe the NFC simulated card of the transportation type in the active NFC device 100, so the NFC card reader 200 selecting the NFC device 300 for swiping does not meet user needs. In some embodiments of the present application, the NFC card reader 200 can select the active NFC device 100 for NFC signaling interaction for card swiping, for example, when both the NFC device 100 and the NFC device 300 successfully match the device feature information of the NFC card reader 200, thereby enabling the NFC card reader 200 to swipe the NFC device 100, for example, swiping and deducting the NFC simulated card of the transportation type in the NFC device 100, meeting user needs and improving 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 an active device, such as a mobile phone. NFC devices 100 and 300 can be reversely charged via a charging cable. For example, NFC device 300 can serve as a charging power source to provide power to NFC device 100 via the charging cable. NFC devices 100 and 300 can be stacked together for 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 the presence of a card conflict between NFC devices 100 and 300. NFC card reader 200 can then perform NFC signaling interactions with NFC devices 100 and 300 in an anti-collision process to select one NFC device from NFC device 100 and 300.

[0196] For example, when using a bit-oriented anti-collision mechanism, if the UID sent by the 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 the NFC signaling interaction for swiping the card, resulting in a card swiping failure. In some embodiments of the present application, if the device feature information of the NFC device 100 and the NFC card reader 200 successfully matches, but the device feature information of the NFC device 300 and the NFC card reader 200 fails to match, the NFC card reader 200 may select the NFC signaling interaction for swiping the card with the NFC device 100, thereby enabling the NFC card reader 200 to swipe the NFC device 100, meeting user needs and improving the user's card swiping experience. In other embodiments of the present application, the NFC card reader device 200 may select an NFC device with a smaller card random number to perform NFC signaling interaction for card swiping. Without limitation, in other examples, an NFC device with a larger card random number may also be selected to perform NFC signaling interaction for card swiping, such as when both the NFC device 100 and the NFC device 300 successfully match the device feature information of the NFC card reader device 200.

[0197] like Figure 7C As shown, both NFC devices 100 and 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 devices 100 and 300 are stacked together and close to the swiping area of ​​NFC card reader 200, NFC card reader 200 can detect the presence of a card conflict between NFC devices 100 and 300. NFC card reader 200 can then perform NFC signaling exchanges with NFC devices 100 and 300 in an anti-collision process to select one NFC device from NFC device 100 and 300.

[0198] For example, when using a bit-oriented anti-collision mechanism, if the UID sent by the NFC device 300 is smaller than the UID sent by the NFC device 100, the NFC card reader device 200 will select the NFC device 300 for NFC signaling interaction for card swiping, resulting in a card swiping failure. In some embodiments of the present application, if the device feature information of the NFC device 100 and the NFC card reader device 200 matches successfully, and the device feature information of the NFC device 300 and the NFC card reader device 200 fails to match, the NFC card reader device 200 may select the NFC device 100 for NFC signaling interaction for card swiping, thereby enabling the NFC card reader device 200 to swipe the NFC device 100, meeting user needs and improving the user's card swiping experience. In other embodiments of the present application, the NFC card reader device 200 may select an NFC device with a smaller card random number for NFC signaling interaction for card swiping. Without limitation, in other examples, an NFC device with a larger card random number may also be selected for NFC signaling interaction for card swiping, such as when both the NFC device 100 and the NFC device 300 successfully match the device feature information of the NFC card reader device 200.

[0199] superior Figures 7A-7C The scenarios shown are for illustrative purposes only and should not be construed as limiting the present application. Figure 7B The NFC device 100 and the NFC device 300 shown can be stacked together without reverse charging.

[0200] Next, a card conflict handling method according to an embodiment of the present application is introduced.

[0201] Figure 8 This is a flowchart of a card conflict handling method provided in an embodiment of the present 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 in FIG. 10 , wherein the NFC device 100 may be in PICC mode, for example, the active NFC device 100 is in PICC mode by default after the NFC function is enabled, and the NFC card reader 200 may be in PCD mode.

[0203] Figure 8 The method shown may include, but is not limited to, the following steps:

[0204] S100 : The NFC device 100 enters the radio frequency field of the NFC card reader 200 .

[0205] S101 : The NFC card reader 200 sends a probe frame to the NFC device 100 .

[0206] In some embodiments of the present application, the NFC card reader 200 in PCD mode can broadcast a probe frame through a 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 the present application, a Probe frame can be used to indicate that the NFC card reader 200 supports the first NFC protocol. In some embodiments of the present application, the Probe frame can include a frame header and a check code. For example, the data length of the frame header can be 3 bytes, and the data length of the check code can be 2 bytes. In some examples, the NFC protocol can use a cyclic redundancy check (CRC) to check the NFC transmission frame. Therefore, the check code of the Probe frame can include a CRC code. NFC transmission frames can include a Data frame, a Probe frame, a Probe ACK (Probe acknowledge character) frame, a Conflict frame, a Conflict ACK (Conflict acknowledge character) frame, a Pick frame, a Pick ACK (Pick acknowledge character) frame, a Notify frame, a Notify ACK (Notify ACK) frame, a Reset frame, a Reset ACK (Reset ACK) frame, a Command frame, a Response frame, and the like. The Frame Type field of an NFC transmission frame can be used to indicate the frame type of the NFC transmission frame. For example, the Frame Type field value in a Probe frame can be "0x01", the Frame Type field value in a Probe ACK frame can be "0x02", the Frame Type field value in a Conflict frame can be "0x03", the Frame Type field value in a Conflict ACK frame can be "0x04", the Frame Type field value in a Pick frame can be "0x05", the Frame Type field value in a Pick ACK frame can be "0x06", the Frame Type field value in a Notify frame can be "0x07", the Frame Type field value in a Notify ACK frame can be "0x08", the Frame Type field value in a Reset frame can be "0x09", the Frame Type field value in a Reset ACK frame can be "0x0A", the Frame Type field value in a Command frame can be "0x0B", and the Frame Type field value in a Response frame can be "0x0C". The values ​​of the frame type field "0x0D to 0x88" are reserved values ​​for the expansion of more types of NFC transmission frames in the first NFC protocol. The values ​​of the frame type field "0x09 to 0xFF" can be vendor-defined values. The above examples are only used to explain this application and should not be construed as limiting.

[0208] The frame header in the Probe frame may include a protocol identification field, a frame type field, and a protocol version field. The fields in the frame header can be seen in the description of Table 1 below.

[0209] Table 1

[0210] Field length illustrate 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 card reader 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 in the Probe frame can be "0x01."

[0212] S102 : The NFC device 100 sends a Probe ACK frame to the NFC card reader 200 .

[0213] In some embodiments of the present 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 the Probe ACK frame to the NFC card reader 200 based on the Probe frame. When the NFC device 100 does not support the first NFC protocol corresponding to the Probe frame, the NFC device 100 does not send the Probe ACK frame to the NFC card reader 200.

[0214] In some embodiments of the present application, after the NFC card reader 200 sends a probe (Probe) frame, it can receive a probe confirmation (Probe ACK) frame within a preset time.

[0215] In some embodiments of the present 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 identification field, a frame type field, and a protocol version field. The specific field descriptions are similar to those in Table 1 above. In some examples, the protocol identification 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 identification field may be "0x7C," which is the identifier of the first NFC protocol. 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 in 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 the NFC device 100 in PICC mode, so there is no card conflict. The NFC card reader 200 can execute the following S103-S105.

[0217] S103: The NFC card reader 200 sends a Notify frame (carrying device feature information of the NFC card reader 200) to the NFC device 100.

[0218] In some embodiments of the present application, the Notify frame may include device feature information of the NFC card reader 200 .

[0219] In some embodiments of the present application, a Notify frame may include first control information. The first control information may include at least one of the following fields: a device selection identification field, an anti-collision identification field, and a card selection identification field. Among them, the device selection identification field is used to indicate whether the NFC device (PICC mode) that receives the Notify frame feeds back the matching result of the device feature information of the NFC card reader 200. The anti-collision identification field is used to indicate whether there is a card conflict. The card selection identification field is used to indicate whether the NFC device (PICC mode) that receives the Notify frame feeds back the card identification information of the NFC device. In some examples, the first control information includes a selection identification field and an anti-collision identification field, and the selection identification field is located before the anti-collision identification field. In some examples, the length 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 following Figure 9 The example of the first control information is only used to explain the embodiment of the present application and should not be construed as limiting the present application. The embodiment of the present application does not limit the number, position, and length of the fields included in the first control information, and no further examples are given here.

[0220] In some embodiments of the present application, the first control information in the Notify frame may be used to instruct the NFC device (PICC mode) that receives the Notify frame to feedback the result of the match between the device characteristic information of the NFC device and the NFC card reader 200 in the Notify frame. For example, the first control information in the Notify frame may include a Select Device Identification field, which instructs the NFC device (PICC mode) that receives the Notify frame to feedback the result of the match between the device characteristic information of the NFC device and the NFC card reader 200 in the Notify frame.

[0221] In some examples, the NFC card reader device 200 can broadcast a Notify frame (carrying device feature information of the NFC card reader device 200) through the radio frequency field, so that an NFC device (PICC mode) whose device feature information in the radio frequency field successfully matches that of the NFC card reader device 200 responds with a successful matching result, and an NFC device (PICC mode) whose device feature information in the radio frequency field fails to match that of the NFC card reader device 200 responds with a failed matching result.

[0222] In some embodiments of the present application, device feature information of different NFC card reading devices may be different.

[0223] In some embodiments of the present application, the 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 the present application, the device feature information may include any one or more of a service identifier (SID), a device organization identifier (OUI), and a device group identifier (GID) (also known as an NFC device group identifier (ND_GID)).

[0225] The following examples illustrate the service identifier (SID), the device organization identifier (OUI), and the device group identifier (GID).

[0226] 1. A service identifier (SID) may be used to indicate the type of NFC service supported by the NFC card reader 200 based on the NFC function.

[0227] In some embodiments, the NFC service type 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 may be used to indicate the primary service type supported by the NFC card reader 200, and the sub-service identifier may be used to indicate the sub-service type supported by the NFC card reader 200 under a particular primary service type. The primary service type may include one or more of access control, keys, transportation, banking, digital currency, digital certificates, codeless payment, electronic tickets, wireless charging, tap-to-pay, and multi-function cards. The sub-service types corresponding to access control may include one or more of community access control, enterprise access control, government access control, and campus access control. The sub-service types corresponding to keys may include one or more of smart door locks, car keys from the Intelligent Car Connectivity Industry Ecosystem Alliance (ICCE), car keys from the Car Connectivity Consortium (CCC), car keys from the Intelligent Car Connectivity Open Alliance (ICCOA), and hotel room cards. Sub-service types for transportation cards may include one or more of domestic and overseas transportation cards. Sub-service types for banks may include one or more of UnionPay, UnionPay International, Visa, and MasterCard. Sub-service types for digital currencies may include digital currencies defined by the People's Bank of China. Sub-service types for digital certificates may include one or more of identity cards, Hong Kong and Macau passes, driver's licenses, social security cards, and passports. Sub-service types for codeless payment may include one or more of general services, membership card discount services, and payment institution discount services. Sub-service types for electronic tickets may include electronic ticket purchase and park entry services. Sub-service types for wireless charging may include wireless charging, etc. Sub-service types for tap-to-pay may include one or more of one-tap pairing, one-tap multi-screen collaboration, one-tap voice transmission, one-tap image transmission, one-tap friend addition, and one-tap transfer. Sub-service types for multi-function cards may include one or more of multi-function all-in-one cards, etc.

[0228] The primary service identifier may occupy 1 byte, and the sub-service identifier may occupy 1 byte. For example, the values ​​of the primary service identifier and the sub-service identifier may be as 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 subservice identifier is "0x01," the subservice type is residential access control. If the subservice identifier is "0x02," the subservice type is enterprise access control. If the subservice identifier is "0x03," the subservice type is government access control. If the subservice identifier is "0x04," the subservice type is campus access control. If the main service type is access control, the subservice identifier values ​​"0x00" and "0x05 to 0xFF" are reserved for protocol extensions.

[0235] 1.2. When the main service identifier is "0x02", the main service type is key.

[0236] If the subservice identifier is "0x01," the subservice type is a smart door lock. If the subservice identifier is "0x02," the subservice type is an ICCE car key. If the subservice identifier is "0x03," the subservice type is a CCC car key. If the subservice identifier is "0x04," the subservice type is an ICCOA car key. If the subservice identifier is "0x05," the subservice type is a hotel room card. When the primary service type is a key, the subservice identifier values ​​"0x00" and "0x06 to 0xFF" are reserved for protocol extensions.

[0237] 1.3. When the main service identifier is "0x03", the main service type is transportation.

[0238] If the subservice identifier is "0x01," the subservice type is a domestic transportation card in China. If the subservice identifier is "0x02," the subservice type is a non-domestic transportation card. When the primary service type is transportation, the subservice identifier values ​​"0x00" and "0x03 to 0xFF" are 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. If the main service type is bank, the sub-service identifier values ​​"0x00" and "0x02 to 0xFF" can be reserved for protocol extension.

[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 defined by the People's Bank of China. In the case of digital currency as the main service type, the sub-service identifier value "0x01 to 0xFF" can be reserved for protocol extension.

[0243] 1.6. When the primary service identifier is "0x06", the primary service type is digital certificate.

[0244] If the subservice identifier is "0x01," the subservice type is an ID card. If the subservice identifier is "0x02," the subservice type is a Hong Kong and Macau Pass. If the subservice identifier is "0x03," the subservice type is a driver's license. If the subservice identifier is "0x04," the subservice type is a social security card. If the subservice identifier is "0x05," the subservice type is a passport. When the primary service type is a digital certificate, the subservice identifier values ​​"0x00" and "0x06 to 0xFF" are 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. If the main service type is codeless payment, the sub-service identifier values ​​"0x00" and "0x04 to 0xFF" are 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 the electronic ticket admission service. In the case of the main service type being electronic ticket, the sub-service identifier values ​​"0x00" and "0x04 to 0xFF" can be reserved for protocol extension.

[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. Among them, when the main service type is wireless charging, the value of the sub-service identifier "0x01 to 0xFF" can be reserved for protocol extension.

[0251] 1.10. When the main service identifier is "0x0A", the main service type is the touch-and-pay 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 voice transmission. If the sub-service identifier is "0x04", the sub-service type is one-touch picture 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 transfer. Among them, 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 extension.

[0253] 1.11. When the main service identifier is "0x0B", the main service type is multi-function card.

[0254] If the sub-service identifier is "0x01", the sub-service type is a multi-function card. If the main service type is a multi-function card, the sub-service identifier values ​​"0x00" and "0x02 to 0xFF" can be reserved for protocol extension.

[0255] 1.12. The values ​​of the primary service identifier "0x00" and "0x0B to 0xFF" can be reserved for protocol extension.

[0256] The examples shown in Table 2 above are only used to explain the embodiments of the present application and should not constitute a limitation to the present application.

[0257] 2. The OUI (Organizational Identifier) ​​can be used to identify the manufacturer providing NFC services using the NFC card reader 200. The registration authority of the NFC protocol standards organization can assign different OUIs to different manufacturers. For example, manufacturers providing NFC services may include one or more smart door lock manufacturers, one or more property management companies, one or more auto parts manufacturers, or one or more transportation card management departments.

[0258] For example, if the NFC service of the NFC card reader 200 is community access control, the device organization identifier of the NFC card reader 200 may be the organization identifier applied for by the property management company to which the NFC card reader 200 belongs to the NFC standard organization. For example, the device organization identifier applied for by Vanke Property Management Company to the registration authority of the NFC standard organization may 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 may be an organization identifier applied for by the smart door lock manufacturer to which the NFC card reader 200 belongs to the NFC standard 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 may be an organization identifier applied by the vehicle manufacturer to which the NFC card reader 200 belongs to the NFC standard organization.

[0261] For example, if the NFC service provided by the NFC card reader 200 is a multi-function card, the device organization identifier of the NFC card reader 200 may be the organization identifier applied for by the card issuing organization to which the NFC card reader 200 belongs from the NFC standards organization. The PICC corresponding to the multi-function card may include campus cards, work cards, and other cards with multiple functions such as access control, stored value, and consumption. The card issuing organization to which the NFC card reader 200 belongs may include companies, schools, and other organizations.

[0262] The above examples are only used to explain the embodiments of the present application and should not be construed as limiting the embodiments of the present application.

[0263] 3. The device group identifier (GID) can be used to indicate the group to which the NFC service provided by the NFC card reader device 200 belongs. The device group identifier can be assigned based on the purpose and location of the NFC card reader device 200. Different NFC services can have different group divisions.

[0264] For example, if the NFC service provided by the NFC card reader 200 is community access control, the device group identifier of the NFC card reader 200 may include a hash value obtained by hashing the city name and the community name, and a random number. For example, the data length of the device group identifier of the NFC card reader 200 may be 6 bytes, the hash value obtained by hashing the city name and the community name may be located in the first 4 bytes of the device group identifier, and the random number may be located in the last 2 bytes of the device group identifier.

[0265] For example, if the NFC service provided by the NFC card reader 200 is a smart door lock, the device group identifier of the NFC card reader 200 may include a hash value obtained by hashing the serial number (SN) of the NFC card reader 200 and a random number. For example, the data length of the device group identifier of the NFC card reader 200 may be 6 bytes, the hash value obtained by hashing the serial number (SN) of the NFC card reader 200 may be located in the first 4 bytes of the device group identifier, and the random number may be located in the last 2 bytes of the device group identifier.

[0266] For example, if the NFC service provided by the NFC card reader 200 is a car key, the device group identifier of the NFC card reader 200 may include a hash value obtained by hashing the vehicle identification number (VIN) of the NFC card reader 200 and a random number. For example, the data length of the device group identifier of the NFC card reader 200 may be 6 bytes, the hash value obtained by hashing the vehicle identification number of the NFC card reader 200 may be located in the first 4 bytes of the device group identifier, and the random number may be located in the last 2 bytes of the group identifier.

[0267] For example, if the NFC service provided by the NFC card reader device 200 is a multi-function card, the device group identifier of the NFC card reader device 200 may be a preset value.

[0268] The above examples are only used to explain the embodiments of the present application and should not be construed as limiting the present application.

[0269] In some embodiments of the present application, the Notify frame may include a frame header and a data segment. The frame header may include the above-mentioned first control information, and the data segment may include the device feature information of the NFC card reader device 200. For an example of the format of the Notify frame, see Figure 9 ,like Figure 9 As shown, a Notify frame may include a frame header, a data segment, and a check code. The frame header of the Notify frame may include a protocol identification field, a frame type field, a control information field, and a length field. The data segment of the Notify frame may include a device identification element, and the check code may include a CRC code. The fields in the Notify frame are described in Table 3 below. Table 3 does not show the check code.

[0270] Table 3

[0271]

[0272]

[0273] As shown in Table 3, the protocol identification field in the frame header of the Notify frame can be used to indicate the first NFC protocol adopted by the NFC card reader 200 when sending the Notify frame, for example Figure 9 As shown, the value of the protocol identification 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 the 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 the present application, the control information in the Notify frame may include 8 bits, namely, bits 0 to 7, each of which can take a value of 0 or 1. Bit 0 of the control information can be used as a device identification field, bit 1 can be used as an anti-collision identification field, and bit 2 can be used as a card identification field. When bit 0 of the control information takes a value of 1, it instructs the NFC device (PICC mode) that receives the Notify frame to feedback a match result with the device feature information of the NFC card reader 200. When bit 0 of the control information takes a value of 0, it instructs the NFC device (PICC mode) that receives the Notify frame not to feedback a match result with the device feature information of the NFC card reader 200. When bit 1 of the control information takes a value of 1, it indicates a card conflict exists; when bit 1 of the control information takes a value of 0, it indicates no card conflict exists. When bit 2 of the control information takes a value of 1, it instructs the NFC device (PICC mode) that receives the Notify frame to feedback its card identification information when the device feature information of the NFC card reader 200 successfully matches. When bit 2 in the control information is set to 0, it indicates that the NFC device (PICC mode) that receives the Notify frame does not feedback the card identification information of the NFC device. Bits 3 to 7 in the control information can be reserved. For convenience of explanation, the control information in this embodiment of the application includes bits 3 to 7 with values ​​of 0.

[0275] In some embodiments of the present application, the control information in the frame header of the Notify frame may be the above-mentioned first control information. For example, Figure 9 As shown, the value of the control information in the Notify frame can be 0x01, wherein the value of bit 0 in the control information with the value of 0x01 is 1, which is used to indicate that the NFC device (PICC mode) that receives the Notify frame feeds back the matching result of the device feature information of the NFC card reader 200. The value of bit 1 in the control information with the value of 0x01 is 0, which is used to indicate that there is no card conflict. The value of bit 2 in the control information with the value of 0x01 is 0, which is used to indicate that the NFC device (PICC mode) that receives the Notify frame does not feed back the card identification information of the NFC device. The values ​​of bits 3 to 7 in the control information with the value of 0x01 are 0.

[0276] The control information in the Notify frame is not limited to the above example. In other examples, the control information does not include the card selection identification field. The bit 2 used as the card selection identification 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 the device selection identification field / anti-collision identification field / card selection identification field. The embodiments of the present application do not limit the indicative 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 feature information, which may include a service identifier (SID) and a device organization identifier (OUI). In some embodiments, the device feature information may also include a device group identifier (GID). In some embodiments, the device identification element may include not only device feature information, but also an element code (Element Code), an identification mask, a device type identifier (TID), a device private identifier (PID), and an AID ( Figure 9 (Not shown). The fields in the device identification element can be found in the description of Table 4 below.

[0278] Table 4

[0279]

[0280]

[0281] Among them, the element code can be used to indicate the identification of the control element. The control element may include one or more of the device identification element, the card identification element, the transmission capability element, and the security algorithm element, which are control elements that can be flexibly combined in NFC transmission frames (such as Notify frames, Pick frames, Conflict frames and other NFC control frames). As shown in Table 4, the Notify frame carries the device identification element, so 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 of the device identification element is "0x00", the element code value of the card identification element is "0x01", the element code value of the transmission capability element is "0x02", the element code value of the security algorithm element is "0x03", and the element code value "0x04~0xFF" can be reserved for protocol extension or manufacturer customization.

[0282] As shown in Table 4, the device identification carried in the device identification element of the Notify frame may include one or more of the following: device type identification (TID), service identification (SID), device organization identification (OUI), device group identification (GID), device individual identification (PID) and AID.

[0283] The device type indicated by the device type identifier (TID) can include any of the following: a mobile phone, a wearable device, a card reader device that does not require back-and-forth interaction with an electronic device, a card reader device that does require back-and-forth interaction with an electronic device, and so on. 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 back-and-forth NFC interaction with an electronic device, such as a security gate or wireless charging device. A device type identifier of "0x04" indicates that the NFC card reader device 200 is a card reader device that requires back-and-forth NFC interaction with an electronic device, such as an access control device, a transit card reader, or a vehicle. Device type identifier values ​​of "0x00" and "0x05 to 0xFF" are reserved for protocol extensions.

[0284] Among them, the device individual identification (PID) indicates the individual identification of the NFC card reader device 200 in a class of card reader devices under the same device organization identification and the same device group identification. Among them, the manufacturer of the NFC card reader device 200 needs to ensure that the device individual identifications of a class of card reader devices with the same device organization identification and the same device group identification are different.

[0285] above Figure 9 , Table 3 and Table 4 are only used to explain the embodiments of the present application and should not constitute a limitation to the present application.

[0286] S104 : The NFC device 100 sends a NotifyACK frame to the NFC card reader 200 .

[0287] In some embodiments of the present application, a NotifyACK frame may include a result code, which may indicate a 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 the present application, the NFC device 100 may obtain the device feature information of the NFC card reader 200 carried in the Notify frame and determine, based on the first control information in the Notify frame, that when the device feature information of the NFC device 100 and the NFC card reader 200 matches successfully, a matching result indicating a successful match is returned to the NFC card reader 200; and when the device feature information of the NFC device 100 and the NFC card reader 200 fails to match, a matching result indicating a failed match is returned to the NFC card reader 200.

[0288] In some embodiments of the present 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 format of the NotifyACK frame can be found in Figure 10 ,like Figure 10 As shown, the NotifyACK frame may include a frame header, a data segment, and a check code. The frame header of the NotifyACK frame may include a protocol identification field, a frame type field, and a length field. The data segment of the NotifyACK frame may include a result code, and the check code may include a CRC code. For the fields in the NotifyACK frame, see the description of Table 5 below.

[0289] Table 5

[0290] Field length illustrate 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 check code, that is, the length of the data segment Result code 1 byte Indicates the matching result of the device characteristic information of the NFC card reader 200

[0291] As shown in Table 5, the protocol identification field in the frame 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 identification field can be the identifier of the first NFC protocol "0x7C". The frame type field in the frame header of the NotifyACK frame can be used to indicate the type of the NotifyACK frame, for example Figure 10 As shown, the value of the frame type field in the NotifyACK frame can be "0x08". The length in 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 sending the NotifyACK frame and the NFC card reader 200.

[0292] In some examples, when the value of the result code in the data segment of the NotifyACK frame is 0x00, it indicates that the device feature information of the NFC device 100 and the NFC card reader 200 is successfully matched, and when the value of the result code is 0x01, it indicates that the device feature information of the NFC device 100 and the NFC card reader 200 is failed to match.

[0293] In some embodiments of the present 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 that the NFC device 100 is 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 the present application, 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 in the NFC device 100, wherein the card swiping service may include any one of opening access control, unlocking a door, unlocking a vehicle, transaction payment, electronic ticket verification, digital certificate verification, and getting on and off a bus with a transportation card. In some examples, the NFC device 100 can send the card information of the first PICC to the NFC card reader 200 through NFC signaling interaction, and the NFC card reader 200 can perform the card swiping verification process of the first PICC based on the card information of the first PICC. The NFC card reader 200 can send the card swiping result of the first PICC to the NFC device 100 through NFC signaling interaction. In some examples, when the NFC card reader 200 and the selected NFC device 100 perform NFC signaling interaction, the NFC device 100 can output a first PICC card swipe prompt. For example, the prompt information can be a card-shaped icon with the name of the first PICC displayed on the card-shaped icon. The first PICC card swipe prompt can be used to remind the user that the NFC device 100 is using the first PICC to swipe the card. In some examples, the NFC device 100 can output the card swipe result of the received first PICC, such as a prompt indicating a successful swipe or a failed swipe. If the swipe is successful, it can also prompt information such as payment.

[0296] When the NFC device 100 is a passive device, the first PICC may be the NFC device 100. When the NFC device 100 is an active device, the first PICC may be an NFC simulated card determined from one or more NFC simulated cards included in the NFC device 100, and the first PICC is an NFC simulated 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 access control information, key information, transaction account information, and electronic ticket information. The access control information may include one or more of the card number and the card number's expiration date. The key information may include one or more of the key code and the key code's expiration date. The transaction account information may include one or more of the transaction account identifier and the remaining balance in the transaction account. The electronic ticket information may include one or more of the electronic ticket code, the electronic ticket verification time, and the electronic ticket's expiration date.

[0298] In other embodiments of the present application, when the result code in the NotifyACK frame received by the NFC card reader 200 indicates a failure, the NFC card reader 200 may determine that the NFC device 100 is not the target NFC device (PICC mode) of the NFC card reader 200 in PCD mode, and therefore will not select the NFC device 100. The NFC card reader 200 may continue to send detection frames (for example, periodically send detection frames) to select the target NFC device (PICC mode).

[0299] It is understandable that Figure 8 The communication frame shown is a communication frame of the first NFC protocol. Figure 8 The method shown may be a communication of a first NFC protocol, Figure 8 The NFC card reader 200 and the NFC device 100 shown both support the first NFC protocol.

[0300] exist Figure 8 In the method shown, if the NFC card reader device 200 (PCD mode) receives a detection confirmation frame sent by an NFC device 100 (PICC mode), there is no card conflict. For example, there is only one NFC device 100 in the radio frequency field of the NFC card reader device 200. However, in a specific implementation, there may be multiple NFC devices in PICC mode in the radio frequency field of the NFC card reader device 200. The NFC card reader device 200 may receive detection confirmation frames sent by multiple NFC devices in PICC mode, and then there is a card conflict. In the card conflict scenario, the NFC card reader device 200 can select one NFC device in PICC mode from multiple NFC devices in PICC mode through an anti-collision process to perform NFC signaling interaction. The anti-collision process provided in the embodiment of the present application can be found in Figure 11 .

[0301] Figure 11 This is a flowchart of another card conflict handling method provided in an embodiment of the present application.

[0302] Figure 11 The method shown can be applied to an NFC system including an NFC device 100, an NFC card reader 200 and an NFC device 300, for example Figure 3 The NFC system 10 shown in FIG. 1 includes the NFC device 100 and the NFC device 300 in PICC mode. For example, the active NFC device 100 / NFC device 300 is in PICC mode by default after the NFC function is enabled, and the NFC card reader 200 is in PCD mode.

[0303] Figure 11 The method 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 embodiment of the application 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 : The NFC card reader 200 sends a probe frame to the NFC device 100 and the NFC device 300 .

[0306] In some embodiments of the present application, the NFC card reader 200 in PCD mode can broadcast a Probe frame through a radio frequency field. When the NFC device 100 and the NFC device 300 in PICC mode enter the radio frequency field of the NFC card reader 200, the NFC device 100 and the NFC device 300 can receive the Probe frame broadcast by the NFC card reader 200. The Probe frame can indicate that the NFC card reader 200 supports the first NFC protocol. For a description of the Probe frame, see Figure 8 Description of the Probe frame in S101.

[0307] S202 : The NFC device 100 sends a first Probe ACK frame to the NFC card reader 200 .

[0308] S203 : The NFC device 300 sends a second Probe ACK frame to the NFC card reader 200 .

[0309] The embodiment of the present application does not limit the order of S202 and S203.

[0310] In some embodiments of the present application, the first Probe ACK frame may be used to indicate that the NFC device 100 supports the first NFC protocol corresponding to the Probe frame, and the second Probe ACK frame may be used to indicate that the NFC device 300 supports the first NFC protocol corresponding to the Probe frame. Figure 8 The description of the Probe ACK frame in S102 is similar, and the first Probe ACK frame and the second Probe ACK frame may be the same or different.

[0311] In some embodiments of the present application, after the NFC card reader 200 sends a probe (Probe) frame, it can receive a probe confirmation (Probe ACK) frame within a preset time.

[0312] Figure 11 In the method shown, the NFC card reader device 200 receives Probe ACK frames sent by two NFC devices in PICC mode (i.e., NFC device 100 and NFC device 300), so there is a card conflict. The NFC card reader device 200 can perform an anti-collision process to select one NFC device from the two NFC devices in PICC mode for NFC signaling interaction. The anti-collision process may include the following S204-S210.

[0313] S204: The NFC card reader 200 sends a conflict frame (carrying device feature information of the NFC card reader 200) to the NFC device 100 and the NFC device 300.

[0314] In some embodiments of the present application, the conflict frame may include device feature information of the NFC card reader 200 .

[0315] In some embodiments of the present application, the conflict frame may include second control information. The second control information in the embodiments of the present application may also be referred to as first information. The second control information may include at least one of the following fields: a device selection identification field, an anti-collision identification field, and a card selection identification field. Among them, the device selection identification field is used to indicate whether the NFC device (PICC mode) that receives the Conflict frame feeds back the matching result of the device feature information of the NFC card reader 200. The anti-collision identification field is used to indicate whether there is a card conflict. The card selection identification field is used to indicate whether the NFC device (PICC mode) that receives the Conflict frame feeds back the card identification information of the NFC device. In some examples, the second control information includes a selection identification field and an anti-collision identification field, and the selection identification field is located before the anti-collision identification field. In some examples, the length of the three fields in the above examples is 1 bit. In some examples, the second control information is as follows: Figure 12 The example of the second control information is only used to explain the embodiment of the present application and should not be construed as limiting the present application. The embodiment of the present application does not limit the number, position, and length of the fields included in the second control information, and no further examples are given here.

[0316] In some embodiments of the present application, the second control information in the Conflict frame can be used to instruct the NFC device (PICC mode) that receives the Conflict frame to feedback the matching result of the device feature information of the NFC device and the NFC card reader 200 in the Conflict frame. For example, the second control information in the Conflict frame may include a Select Device Identification field, which instructs the NFC device (PICC mode) that receives the Conflict frame to feedback the matching result of the device feature information of the NFC device and the NFC card 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 can include an Anti-Conflict Identification 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 feedback the card identification information of the NFC device (such as the card type identification and the card random number) when the device feature information of the NFC card reader 200 is successfully matched. The second control information in the Conflict frame may include a card identification selection field. The card identification selection field instructs the NFC device (PICC mode) that receives the Conflict frame to feedback the card identification information of the NFC device when the device feature information of the NFC card reader 200 is successfully matched.

[0317] In some examples, the NFC card reader device 200 can broadcast a collision frame (carrying the device feature information of the NFC card reader device 200) through the radio frequency field, so that the NFC device (PICC mode) whose device feature information in the radio frequency field successfully matches the NFC card reader device 200 responds with a successful matching result and the card identification information of the NFC device, and the NFC device (PICC mode) whose device feature information in the radio frequency field fails to match the NFC card reader device 200 responds with a failed matching result. For a description of device feature information, see Figure 8 Description of the device characteristics information in .

[0318] In some embodiments of the present application, the 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 feature information of the NFC card reader 200. For an example of the format of the conflict frame, see Figure 12 ,like Figure 12 As shown, the collision frame may include a frame header, a data segment and a check code. The frame header of the collision frame may include a protocol identification field, a frame type field, a control information field and a length field. The data segment may include a waiting time slot (slot) and a device identification element. The check code may include a CRC code. Figure 8 The fields in the Notify frame are similar. For example Figure 12 As shown, the value of the protocol identification field in the frame header of the conflict frame may be the identifier of the first NFC protocol "0x7C". The value of the frame type field in the frame header of the conflict frame may be "0x03".

[0319] In some embodiments of the present application, the control information in the frame header of the conflict frame may be the second control information mentioned above. Figure 12 As shown, the value of the control information in the frame header of the conflict frame can be "0x07", wherein the value of bit 0 in the control information with the value of "0x07" is 1, which is used to instruct the NFC device (PICC mode) that receives the conflict frame to feedback the matching result of the device feature information with the NFC card reader 200. The value of bit 1 in the control information with the value of 0x07 is 1, which is used to indicate that there is a card conflict. The value of bit 2 in the control information with the value of 0x07 is 1, which is used to instruct the NFC device (PICC mode) that receives the conflict frame to feedback the card identification information of the NFC device when the device feature information with the NFC card reader 200 successfully matches. The values ​​of bits 3 to 7 in the control information with the value of 0x07 are 0.

[0320] The control information in the conflict frame is not limited to the above-mentioned example. In other examples, the control information does not include a card selection identification field. The bit2 used as the card selection identification field can be reserved to indicate other meanings or no meaning. The value of the control information in the frame header of the conflict frame can be "0x03", wherein the values ​​of bits 2 to 7 in the control information with the value of "0x03" are 0, and the values ​​of bits 0 and 1 in the control information with the value of "0x03" are 1. In other examples, other bits in the control information can also be used as a device selection identification field / anti-collision identification field / card selection identification field. The embodiments of the present application do not limit the indication meaning of each bit in the control information.

[0321] Among them, the length of the waiting time slot in the data segment of the conflict frame can be 1 byte, and the waiting time slot can be the number of time slots / time slots of the timeout period. The timeout period is the time window for the NFC card reader device 200 to receive the response frame (i.e., the conflict confirmation frame) of the conflict frame, for example, it is set to 10 milliseconds. Multiple time slots of the timeout period can be used for the NFC device (PICC mode) that receives the conflict frame to select one of them to return a response frame. In some embodiments of the present application, the waiting time slot can be determined according to a preset value (value), and the waiting time slot is 2 value In some examples, value can be pre-set. For example, if 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 with card conflicts. For example, the larger the number of PICC devices, the larger the value.

[0322] S205 : The NFC device 100 sends a first conflict acknowledgement (Conflict ACK) frame to the NFC card reader 200 .

[0323] S206 : The NFC device 300 sends a second conflict confirmation (Conflict ACK) frame to the NFC card reader 200 .

[0324] The embodiment of the present application does not limit the order of S205 and S206.

[0325] In some embodiments of the present application, the first conflict acknowledgment (Conflict ACK) frame and the second conflict acknowledgment (Conflict ACK) frame may include a result code, which may indicate a matching result between the device feature information of the NFC device (PICC mode) that sent the conflict acknowledgment frame and the NFC card reader 200. In some embodiments of the present 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, based on the second control information in the conflict frame, determine: when the device feature information of the NFC device 100 / NFC device 300 and the NFC card reader 200 successfully matches, return a matching result indicating a successful match and the card identification information of the NFC device 100 / NFC device 300 to the NFC card reader 200; and when the device feature information of the NFC device 100 / NFC device 300 and the NFC card reader 200 fails to match, return a matching result indicating a failed match to the NFC card reader 200.

[0326] In some embodiments of the present application, NFC devices 100 and 300 can obtain the waiting time slots in the collision 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 a time slot from multiple time slots in the timeout period to send the first collision confirmation frame / second collision confirmation frame. For example, if the waiting time slot is four, that is, the timeout period includes four time slots, NFC device 100 can select to send the first collision confirmation frame in the first of these four time slots, and NFC device 300 can select to send the second collision confirmation frame in the third of these four time slots. It is understood that NFC card reader 200 uses the waiting time slots in the collision frame to allow NFC device 100 and NFC device 300 to send collision confirmation frames in different time slots, thereby avoiding conflicts when NFC card reader 200 receives collision confirmation frames, resulting in the inability to properly receive and recognize the collision confirmation frames.

[0327] In some embodiments of the present application, the first conflict confirmation frame and the second conflict confirmation frame may include a frame header and a data segment. The data segment may include the above-mentioned result code, and when the result code indicates a successful match, the data segment also includes the 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. For an example of the format of the conflict confirmation frame, see Figure 13 ,like Figure 13As shown, the conflict confirmation frame may include a frame header, a data segment and a check code. The frame header of the conflict confirmation frame may include a protocol identification 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 the card identification information of the NFC device (PICC mode) that sends the conflict confirmation frame. The card identification information may include a card type identifier and a card random number. The check code may include a CRC code. The conflict confirmation frame and Figure 8 The fields in the collision confirmation frame are similar to those in the notification confirmation frame.

[0328] Table 6

[0329]

[0330] For example Figure 13 As shown, the value of the protocol identification field in the frame header of the conflict confirmation frame may 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 may be "0x04".

[0331] In some embodiments of the present application, the result code in the data segment of the conflict confirmation frame may indicate the matching result of the device feature information of the NFC device (PICC mode) that sends the conflict confirmation frame and the NFC card reader device 200. In some examples, when the value of 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 that sends the conflict determination frame and the NFC card reader device 200 is successfully matched; when the value of 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 that sends the conflict determination frame and the NFC card reader device 200 fails to match.

[0332] In some embodiments of the present 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 a card type identifier and a card random number) of the PICC mode NFC device that sent the conflict determination frame. The card type identifier in the data segment of the conflict confirmation frame may indicate the type of the PICC mode NFC device that sent the conflict determination frame. For example, when the card type identifier is 0x01, it indicates an active device (such as a mobile phone, computer, or other electronic device), and when the card type identifier is 0x02, it indicates a passive device (such as a physical NFC tag card). The card random number in the data segment of the conflict confirmation frame may be the card random number of the PICC mode NFC device that sent the conflict determination frame. The card random numbers of NFC devices with different PICC modes may be different. In some examples, when the result code in the data segment of the conflict confirmation frame indicates a successful match, the length in the frame header of the conflict confirmation frame may 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 : The NFC card reader 200 determines a target NFC device from the NFC devices 100 and 300 .

[0334] In some embodiments of the present application, the NFC card reader 200 can determine the result of the match between the device feature information of the NFC device 100 and the NFC card reader 200 based on the result code in the first collision confirmation frame sent by the NFC device 100. When the match result is a successful match, the NFC card reader 200 can also obtain the card identification information of the NFC device 100 from the first collision confirmation frame. The NFC card reader 200 can determine the result of the match between the device feature information of the NFC device 300 and the NFC card reader 200 based on the result code in the second collision confirmation frame sent by the NFC device 300. When the match result is a successful match, the NFC card reader 200 can also obtain the card identification information of the NFC device 300 from the second collision confirmation frame.

[0335] In some embodiments of the present application, the NFC card reader 200 can determine a target NFC device from the NFC device 100 and the NFC device 300 based on the first conflict confirmation frame and the 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 successfully matches the card identification information required by the NFC card reader 200. Figure 11 The target NFC device is taken as the NFC device 100 as an example for description.

[0336] In some examples, the device feature information of the NFC device 100 and the NFC card reader 200 matches successfully, and the device feature information of the NFC device 300 and the NFC card reader 200 fails to match. That is, the result code in the first conflict confirmation frame indicates that the match is successful, and the result code in the second conflict confirmation frame indicates that the match fails. In this case, the target NFC device is the NFC device 100 whose device feature information matches the NFC card reader 200. For a specific process example, see Figure 15 , no details are given for now.

[0337] In some examples, if both NFC device 100 and NFC device 300 successfully match the device feature information of NFC card reader 200, i.e., the result codes in the first conflict confirmation frame and the second conflict confirmation frame both indicate a successful match, 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, based on a preset rule, a target NFC device from NFC device 100 and NFC device 300 that successfully matches the card identification information required by NFC card reader 200. The preset rule can be determined based on user needs, such as by analyzing the usage habits of a large number of users.

[0338] For example, the card type identifier of the NFC device 100 indicates that the NFC device 100 is an active device, and the card type identifier of the NFC device 300 indicates that the NFC device 300 is a passive device. The preset rule is to give priority to active devices, that is, the card type identifier required by the NFC card reader device 200 indicates an active device, then the target NFC device is the NFC device 100 that successfully matches the device feature information of the NFC card reader device 200 and is an active device. For a specific process example, please refer to Figure 16 , no details are given for now.

[0339] For example, the card type identifier of the NFC device 100 indicates that the NFC device 100 is an active device and the card type identifier of the NFC device 300 indicates that the NFC device 300 is an active device, or the card type identifier of the NFC device 100 indicates that the NFC device 100 is a passive device and the card type identifier of the NFC device 300 indicates that the NFC device 300 is a passive device, that is, the type of the NFC device 100 is the same as the type of the NFC device 300. The preset rule is to give priority to the NFC device with a smaller card random number among multiple NFC devices of the same type, that is, the card random number required by the NFC card reader 200 is smaller. Assuming that the card random number of the NFC device 100 is smaller than the card random number of the NFC device 300, the target NFC device is the NFC device 100 that successfully matches the device feature information of the NFC card reader 200 and has a smaller card random number. Without limitation to this, in a specific implementation, the preset rule may also be to give priority to the NFC device with a larger card random number among multiple NFC devices of the same type. The embodiment of the present application does not limit the preset rule. For specific process examples, please refer to Figure 17 , no details are given for now.

[0340] S208: The NFC card reader 200 sends a Pick frame (carrying the card identification information of the target NFC device) to the NFC device 100 and the NFC device 300.

[0341] In some embodiments of the present application, the Pick frame may include card identification information of a target NFC device (PICC mode) of the NFC card reader 200 .

[0342] In some embodiments of the present application, the Pick frame may include third control information. The third control information in the embodiments of the present application may also be referred to as second information. The third control information may include at least one of the following fields: a selection device identification field, an anti-collision identification field, and a card matching field. Among them, the selection device identification field is used to indicate whether the NFC device (PICC mode) that receives the Pick frame feeds back a matching result with the device feature information of the NFC card reader 200. The anti-collision identification field is used to indicate whether there is a card conflict. The card matching field is used to indicate whether the NFC device (PICC mode) that receives the Pick frame feeds back a matching result with the card identification information of the target NFC device in the Pick frame. In some examples, the third control information includes a selection identification field and a card matching field, and the selection identification field is located before the card matching field. In some examples, the length of the three fields in the above examples is 1 bit. In some examples, the third control information is as follows: Figure 14The example of the third control information is only used to explain the embodiment of the present application and should not be construed as limiting the present application. The embodiment of the present application does not limit the number, position, and length of the fields included in the third control information, and no further examples are given here.

[0343] In some embodiments of the present application, the third control information in the Pick frame may be used to instruct an NFC device (in PICC mode) that has received the Pick frame to feedback a match result between the card identification information of the NFC device and 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 (in PICC mode) that has received the Pick frame to feedback a match result between the card identification information of the NFC device and the target NFC device in the Pick frame.

[0344] In some examples, the NFC card 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 in the radio frequency field successfully matches the card identification information of the target NFC device responds with a successful matching result, and the NFC device (PICC mode) whose card identification information in the radio frequency field fails to match the card identification information of the target NFC device responds with a failed matching result.

[0345] In some embodiments of the present application, the Pick frame may include a frame header and a data segment. The frame header may include the third control information described above, and the data segment may include the card identification information of the target NFC device of the NFC card reader 200. For an example of the format of the Pick frame, see Figure 14 ,like Figure 14 As shown, the Pick frame may include a frame header, a data segment and a check code. The frame header of the Pick frame may include a protocol identification field, a frame type field, a control information field and a length field. The data segment of the Pick frame may include a card identification element, and the check code may include a CRC code. The card identification element may include the card identification information of the target NFC device of the NFC card reader 200 (including a card type identifier and a card random number). Optionally, the card identification element may also include an element code. The fields 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 identification field in the frame header of the Pick frame may be the identifier "0x7C" of the first NFC protocol. The value of the frame type field in the frame header of the Pick frame may be "0x05".

[0346] In some embodiments of the present application, the control information in the Pick frame may include 8 bits, namely bit0 and bit7, and each bit may take a value of 0 or 1. Bit0 in the control information may be used as a selection device identification field, bit1 may be used as an anti-collision identification field, and bit2 may be used as a card matching field. The control information in the Pick frame includes bit0, bit1, and bit3-bit7. Figure 8 The control information in the Notify frame includes bit0, bit1, and bit3-bit7, which are similar. When the value of bit2 included in the control information in the Pick frame is 1, it is used to instruct the NFC device (PICC mode) that receives the Pick frame to feedback the matching result of the card identification information of the target NFC device in the Pick frame. When the value of bit2 included in the control information in the Pick frame is 0, it is used to instruct the NFC device (PICC mode) that receives the Pick frame not to feedback the matching result of the card identification information of the target NFC device in the Pick frame.

[0347] In some embodiments of the present application, the control information in the frame header of the Pick frame may be the third control information mentioned above. For example, Figure 14 As shown, the control information in the header of the Pick frame can have a value of "0x04", wherein bits 0, 1, 3 to 7 of the control information with a value of "0x04" are set to 0, and bit 2 of the control information with a value of "0x04" is set to 1, indicating that the NFC device (PICC mode) receiving the Pick frame feedback matches the card identification information of the target NFC device in the Pick frame. Optionally, the length in the header of the Pick frame can be "0x06", indicating that the length of the data segment of the Pick frame is 6 bytes.

[0348] The control information in the Pick frame is not limited to the above-mentioned example. In other examples, the control information does not include an anti-collision identification field. The bit1 as the anti-collision identification field can be used as a card matching field, and the bit2 as the card matching field can be reserved to indicate other meanings or not indicate any meaning. Then, the value of the control information in the frame header of the Pick frame can be "0x02", wherein the values ​​of bit0, bit2 to bit7 in the control information with the value of "0x02" are 0, and the value of bit1 in the control information with the value of "0x02" is 1. The embodiment of the present application does 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) in the Pick frame can be found in the description of Table 7 below.

[0350] Table 7

[0351]

[0352] Among them, the description of the element code and Figure 8 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 identification 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 card reader 200. For example, a card type identifier value of 0x01 indicates an active device (e.g., a mobile phone, computer, or other electronic device), while a card type identifier value of 0x02 indicates a passive device (e.g., a physical NFC tag). The card random number in the Pick frame can be the card random number of the target NFC device of the NFC card reader 200.

[0354] S209: The NFC device 100 sends a first Pick ACK frame to the NFC card reader 200 (indicating that the card identification information of the NFC device 100 and the target NFC device is successfully matched).

[0355] S210: The NFC device 300 sends a second Pick ACK frame to the NFC card reader 200 (indicating that the card identification information of the NFC device 300 and the target NFC device fails 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 embodiment of the present application does not limit the order of S209 and S210.

[0358] In some embodiments of the present application, the first Pick ACK frame and the second Pick ACK frame may include a result code, which may indicate a match result, such as success or failure, 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. In some embodiments of the present 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, based on the third control information in the Pick frame, that when the card identification information of the NFC device 100 / NFC device 300 and the target NFC device matches successfully, a match result indicating a successful match is returned to the NFC card reader 200; and when the card identification information of the NFC device 100 / NFC device 300 and the target NFC device fails to match, a match result indicating a failed match is returned to the NFC card reader 200.

[0359] In some embodiments of the present application, a successful match between the card identification information of the NFC device 100 / NFC device 300 and the target NFC device may include: the card type identification of the NFC device 100 / NFC device 300 is the same as the card type identification of the target NFC device, and optionally may also include: the card random number of the NFC device 100 / NFC device 300 is the same as the card random number of the target NFC device.

[0360] In some embodiments of the present 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 above-mentioned result code. Figure 8 The NotifyACK frame header is similar. The result code in the data segment of the first selection confirmation frame / second selection confirmation frame can be 1 byte long. The result code in the data segment of the first selection confirmation frame / second selection confirmation frame can indicate the matching result of the card identification information of the NFC device (PICC mode) sending the first selection confirmation frame / second selection confirmation frame and the target NFC device.

[0361] In some examples, when the value of the result code in the data segment of the first selection confirmation frame / the second selection confirmation frame is 0x00, it indicates that the card identification information of the NFC device 100 / NFC device 300 and the target NFC device in the selection frame match successfully; and when the value of the result code in the data segment of the first selection confirmation frame / the second selection confirmation frame is 0x01, it indicates that the card identification information of the NFC device 100 / NFC device 300 and the target NFC device in the selection frame match fails.

[0362] Figure 11 NFC card reader 200 can select NFC device 100 and select the target NFC device in the frame. Figure 8 The example in which the NFC card reader 200 and the selected NFC device 100 perform NFC signaling interaction is similar.

[0363] Without being limited to the above embodiment, in other embodiments of the present application, an 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 card reader 200, that is, S210 is an optional step. The NFC card reader 200 may default to not sending a selection confirmation frame to an NFC device (PICC mode) that fails to match the card identification information of the target NFC device. 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 with a matching result indicating a failed match.

[0364] Figure 11 This is for illustration only and should not be construed as limiting. In other embodiments of the present application, the NFC card reader 200 can communicate with more NFC devices in PICC mode using an anti-collision process, and the NFC card reader 200 can determine a target NFC device from more NFC devices in PICC mode.

[0365] Without limitation, in some other embodiments of the present 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 may 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, and the NFC card reader 200 may continue to send detection frames (for example, periodically send detection frames) to select the target NFC device (PICC mode).

[0366] Without limitation, in some other embodiments of the present application, the NFC card reader 200 may also receive only one conflict confirmation frame. For example, if the NFC device 300 does not send the second conflict confirmation frame due to an abnormal factor such as a malfunction, the NFC card reader 200 only receives 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 successfully matches, the NFC card reader 200 can determine that the NFC device 100 is the target NFC device and can therefore 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 the NFC device 100 and the NFC card reader 200 fails to match, the NFC card reader 200 can determine that the NFC device 100 is not the target NFC device, and therefore will not send the selection frame, that is, will not execute S207-S211. The NFC card reader 200 can continue to send the detection frame (for example, periodically send the detection frame) to select the target NFC device (PICC mode).

[0367] Not limited to the control elements described in the above embodiments, in other embodiments of the present application, the control element may not include an element code. For example, when an NFC transmission frame (such as an NFC control frame such as a Notify frame, a Pick frame, and a Conflict frame) carries different control elements, the value of the frame type field in the frame header of the NFC transmission frame may be different. Therefore, an NFC device that receives an NFC transmission frame carrying a control element can determine the type of the control element through the frame type field.

[0368] The lengths and values ​​of the fields in the NFC transmission frame in the above examples are only used to explain the present application and should not constitute a limitation on the embodiments of the present application.

[0369] The following exemplifies the implementation process of the card conflict handling method in some card conflict scenarios.

[0370] Figure 15 This is a flowchart of another card conflict handling method provided in an embodiment of the present application.

[0371] Figure 15 The process shown can be Figure 11 The implementation process of the card conflict handling method shown in the first card conflict scenario. In the first card conflict scenario, the device feature information of the NFC device 100 and the NFC card reader 200 is matched successfully, and the device feature information of the NFC device 300 and the NFC card reader 200 is matched unsuccessfully. 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 : The NFC device 100 enters the radio frequency field of the NFC card reader 200 , and the NFC device 300 enters the radio frequency field of the NFC card reader 200 .

[0374] S301 : The NFC card reader 200 sends a probe frame to the NFC device 100 and the NFC device 300 .

[0375] S302 : The NFC device 100 sends a first Probe ACK frame to the NFC card reader 200 .

[0376] S303 : The NFC device 300 sends a second Probe ACK frame to the NFC card reader 200 .

[0377] S304: The NFC card reader 200 sends a conflict frame (carrying device feature information of the NFC card reader 200) to the NFC device 100 and the NFC device 300.

[0378] Figure 15 S300-S304 and Figure 11 The S200-S204 are the same and will not be repeated here.

[0379] S305: The NFC device 100 sends a first conflict confirmation (Conflict ACK) frame to the NFC card reader 200 (indicating that the device feature information of the NFC device 100 and the NFC card reader 200 is matched successfully).

[0380] S306: The NFC device 300 sends a second conflict confirmation (Conflict ACK) frame to the NFC card reader 200 (indicating that the device feature information of the NFC device 300 and the NFC card reader 200 fails to match).

[0381] S307 : The NFC card reader 200 determines that the target NFC device is the 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 the NFC device 100 and the NFC card reader 200 is successfully matched, and the result code in the second conflict confirmation frame indicates that the device feature information of the NFC device 300 and the NFC card reader 200 is unsuccessful. Therefore, the NFC card reader 200 can determine that the target NFC device is the NFC device 100 whose device feature information is successfully matched with the NFC card reader 200.

[0383] S308: The NFC card reader 200 sends a Pick frame (carrying the card identification information of the target NFC device) to the NFC device 100 and the 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 the NFC device 100 .

[0385] S309: The NFC device 100 sends a first Pick ACK frame to the NFC card reader 200 (indicating that the card identification information of the NFC device 100 and the target NFC device is 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 card identification information of the NFC device 100 and the target NFC device carried by the Pick frame match successfully, for example, the card type identifier of the NFC device 100 is the same as the card type identifier carried by the Pick frame, and the card random number of the NFC device 100 is the same as the card random number carried by the Pick frame.

[0387] S310: The NFC device 300 sends a second Pick ACK frame to the NFC card reader 200 (indicating that the card identification information of the NFC device 300 and the target NFC device fails 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 card identification information of the NFC device 300 and the target NFC device carried by the Pick frame fails to match, for example, the card type identifier of the NFC device 300 is different from the card type identifier carried by the Pick frame, and / or the card random number of the NFC device 300 is different from the card random number carried by the Pick frame.

[0389] S310 is an optional step, that is, 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 may not send the 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 the present application, after the NFC card reader device 200 receives the first selection confirmation frame, it can determine to select the NFC device 100, that is, determine that the NFC device 100 is the target NFC device (PICC mode) of the NFC card reader device 200 in PCD mode, and the NFC card reader device 200 and the selected NFC device 100 perform NFC signaling interaction to complete the card swiping service of the first PICC. Among them, 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 simulated card determined from one or more NFC simulated cards included in the NFC device 100, and the first PICC is an NFC simulated card that successfully matches the device feature information of the NFC card reader device 200. Specific examples and Figure 8 The example in which the NFC card reader 200 and the selected NFC device 100 perform NFC signaling interaction is similar.

[0392] For example, Figure 15 The device identification element shown indicates that the service type of the NFC card reader device 200 is transportation, and the city where the NFC card reader device 200 is located is A, that is, the NFC card reader device 200 is a card reader of the transportation type of A. Figure 15 The NFC device 100 shown is a passive device and is a transportation card of place A, or the NFC device 100 is an active device and includes an NFC emulated card of a transportation card of place A. Figure 15 The NFC device 300 shown is an access card, a transportation card for location B, a car key, or other NFC device. The NFC card reader 200 can select the NFC device 100 whose device feature information successfully matches 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 device 200 (PCD mode) receives detection confirmation frames sent by multiple NFC devices (PICC mode), that is, in a card conflict scenario, the target NFC device (PICC mode) can be selected according to 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 device 200 is selected. This ensures that the selected NFC device (PICC mode) meets the requirements of the NFC card reader device 200, avoids card swiping failures, and improves the user's card swiping experience.

[0394] Figure 16 This is a flowchart of another card conflict handling method provided in an embodiment of the present application.

[0395] Figure 16 The process shown can be Figure 11 The implementation process of the card conflict handling method shown in the second card conflict scenario. In the second card conflict scenario, both the NFC device 100 and the NFC device 300 successfully match the device feature information of the NFC card reader 200. The NFC device 100 is an active device and the NFC device 300 is a passive device. The second card conflict scenario is, for example, Figure 7A The scene shown.

[0396] Figure 16 The method shown may include, but is not limited to, the following steps:

[0397] S400 : The NFC device 100 enters the radio frequency field of the NFC card reader 200 , and the NFC device 300 enters the radio frequency field of the NFC card reader 200 .

[0398] S401 : The NFC card reader 200 sends a probe frame to the NFC device 100 and the NFC device 300 .

[0399] S402 : The NFC device 100 sends a first Probe ACK frame to the NFC card reader 200 .

[0400] S403 : The NFC device 300 sends a second Probe ACK frame to the NFC card reader 200 .

[0401] S404: The NFC card reader 200 sends a conflict frame (carrying device feature information of the NFC card reader 200) to the NFC device 100 and the NFC device 300.

[0402] Figure 16 S400-S404 and Figure 11 The S200-S204 are the same and will not be repeated here.

[0403] S405: The NFC device 100 sends a first conflict confirmation (Conflict ACK) frame to the NFC card reader 200 (indicating that the device feature information of the NFC device 100 and the NFC card reader 200 is matched successfully).

[0404] S406: The NFC device 300 sends a second conflict confirmation (Conflict ACK) frame to the NFC card reader 200 (indicating that the device feature information of the NFC device 300 and the NFC card reader 200 is matched successfully).

[0405] S407 : The NFC card reader 200 determines that the target NFC device is the 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 successfully matches. 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 an active device, for example, the card type identifier has a value of "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 successfully matches. 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, for example, the card type identifier has a value of "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 prioritizing active devices. Therefore, the NFC card reader 200 determines that the target NFC device is the NFC device 100 that successfully matches the device feature information of the NFC card reader 200 and is an active device.

[0407] S408: The NFC card reader 200 sends a Pick frame (carrying the card identification information of the target NFC device) to the NFC device 100 and the 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 the NFC device 100 .

[0409] S409: The NFC device 100 sends a first Pick ACK frame to the NFC card reader 200 (indicating that the card identification information of the NFC device 100 and the target NFC device is 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 card identification information of the NFC device 100 and the target NFC device carried by the Pick frame match successfully, for example, the card type identifier of the NFC device 100 is the same as the card type identifier carried by the Pick frame, and optionally, the card random number of the NFC device 100 is the same as the card random number carried by the Pick frame.

[0411] S410: The NFC device 300 sends a second Pick ACK frame to the NFC card reader 200 (indicating that the card identification information of the NFC device 300 and the target NFC device fails 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 NFC device 300 and the target NFC device carried by the Pick frame fails to match, for example, the card type identifier of the NFC device 300 is different from the card type identifier carried by the Pick frame, and optionally, the card random number of the NFC device 300 is different from the card random number carried by the Pick frame.

[0413] S410 is an optional step, that is, 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 may not send the 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 The S311 is similar and will not be described in detail.

[0416] For example, Figure 16The NFC card reader 200 shown is the access control gate of cell A, the NFC device 100 is an electronic device such as a mobile phone, the NFC device 100 includes an NFC analog card of the access control card of cell A, and the NFC device 300 is the physical access control card of cell A. The NFC card reader 200 can select the NFC device 100 from the NFC devices 100 and 300, which has a successful match with the device feature information of the NFC card reader 200 and is an active device.

[0417] exist Figure 16 In the method shown, when the NFC card reader 200 (PCD mode) receives detection confirmation frames sent by an active NFC device (PICC mode) and a passive NFC device (PICC mode), that is, in a card conflict scenario, the target NFC device (PICC mode) can be selected according to the device feature information in the conflict frame and the card type identifier 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 successfully matches the card type identifier required by the NFC card reader 200 is selected. The card type identifier required by the NFC card reader 200 can be determined according to user needs. For example, an NFC device (PICC mode) whose card type identifier indicates an active device is selected. In this way, it can be ensured that the selected NFC device (PICC mode) not only meets the needs of the NFC card reader 200, but also meets the needs of the user, thereby improving the user's card swiping experience.

[0418] Figure 17 This is a flowchart of another card conflict handling method provided in an embodiment of the present application.

[0419] Figure 17 The process shown can be Figure 11 The implementation process of the card conflict handling method shown in the third card conflict scenario. In the third card conflict scenario, both the NFC device 100 and the NFC device 300 successfully match the device feature information of the NFC card reader 200. Both the NFC device 100 and the NFC device 300 are passive devices. However, in other examples, both the NFC device 100 and the NFC device 300 can also 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 : The NFC device 100 enters the radio frequency field of the NFC card reader 200 , and the NFC device 300 enters the radio frequency field of the NFC card reader 200 .

[0422] S501 : The NFC card reader 200 sends a probe frame to the NFC device 100 and the NFC device 300 .

[0423] S502 : The NFC device 100 sends a first Probe ACK frame to the NFC card reader 200 .

[0424] S503 : The NFC device 300 sends a second Probe ACK frame to the NFC card reader 200 .

[0425] S504: The NFC card reader 200 sends a conflict frame (carrying device feature information of the NFC card reader 200) to the NFC device 100 and the NFC device 300.

[0426] Figure 17 S500-S504 and Figure 11 The S200-S204 are the same and will not be repeated here.

[0427] S505: The NFC device 100 sends a first conflict confirmation (Conflict ACK) frame to the NFC card reader 200 (indicating that the device feature information of the NFC device 100 and the NFC card reader 200 is matched successfully).

[0428] S506: The NFC device 300 sends a second conflict confirmation (Conflict ACK) frame to the NFC card reader 200 (indicating that the device feature information of the NFC device 300 and the NFC card reader 200 is matched successfully).

[0429] S507 : When the card random number of the NFC device 100 is smaller than the card random number of the NFC device 300 , the NFC card reader 200 determines that the target NFC device is the 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 the NFC device 100 and the NFC card reader 200 successfully matches. The first conflict confirmation frame also includes the card identification information of the NFC device 100. The card type identifier of the NFC device 100 indicates that the NFC device 100 is a passive device. The card identification information of the NFC device 100 includes the card random number 1 of the NFC device 100. The result code in the second conflict confirmation frame indicates that the device feature information of the NFC device 300 and the NFC card reader 200 successfully matches. The second conflict confirmation frame also includes the card identification information of the NFC device 300. The card type identifier of the NFC device 300 indicates that the NFC device 300 is a passive device. The card identification information of the NFC device 300 includes the card random number 2 of the NFC device 300. 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 a smaller card random number among multiple active or passive devices. Since the card random number 1 of NFC device 100 is smaller than the card random number 2 of NFC device 300, NFC card reader 200 determines that the target NFC device is NFC device 100, which successfully matches the device feature information of NFC card reader 200 and has a smaller card random number. Without limitation, in other examples, preset rule 2 may also prioritize the device with a larger card random number among multiple active or passive devices. NFC card reader 200 determines that the target NFC device is the NFC device with a successful match with the device feature information of NFC card reader 200 and has a larger card random number.

[0431] S508: The NFC card reader 200 sends a Pick frame (carrying the card identification information of the target NFC device) to the NFC device 100 and the 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 the NFC device 100 .

[0433] S509: The NFC device 100 sends a first Pick ACK frame to the NFC card reader 200 (indicating that the card identification information of the NFC device 100 and the target NFC device is 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 card identification information of the NFC device 100 and the target NFC device carried by the Pick frame match successfully, for example, the card type identifier of the NFC device 100 is the same as the card type identifier carried by the Pick frame, and the card random number of the NFC device 100 is the same as the card random number carried by the Pick frame.

[0435] S510: The NFC device 300 sends a second Pick ACK frame to the NFC card reader 200 (indicating that the card identification information of the NFC device 300 and the target NFC device fails 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 NFC device 300 and the target NFC device carried by the Pick frame fails to match, for example, the card type identifier of the NFC device 300 is the same as the card type identifier carried by the Pick frame, and the card random number of the NFC device 300 is different from the card random number carried by the Pick frame.

[0437] S510 is an optional step, that is, 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 may not send the 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 The S311 is similar and will not be described in detail.

[0440] For example, Figure 17 The NFC card reading device 200 shown is a bank service terminal of Bank A, and the NFC device 100 and the 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 sent by multiple passive devices (PICC mode) / multiple active devices (PICC mode), that is, in a card conflict scenario, the target NFC device (PICC mode) can be selected according to 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 successfully matches the card random number required by the NFC card reader 200 is selected, for example, the NFC device (PICC mode) with a smaller card random number is selected. In this way, it can be ensured that the selected NFC device (PICC mode) meets the requirements of the NFC card reader 200, solves the problem of multiple passive devices (PICC mode) / multiple active devices (PICC mode) conflicts, and improves the user's card swiping experience.

[0442] Not limited to the above embodiments, in other embodiments of the present application, in the radio frequency field of the NFC card reader 200 (PCD mode), there are not only NFC devices that support the first NFC protocol (PICC mode), but also NFC devices that do not support the first NFC protocol and 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 can give priority to the NFC device that supports the first NFC protocol (PICC mode). For specific process examples, please refer to Figure 18 The communication of the first NFC protocol may be faster than the communication of the second NFC protocol, thus speeding up the card swiping process and improving the user's card swiping experience.

[0443] Figure 18 This is a flowchart of another card conflict handling method provided in an embodiment of the present application.

[0444] Figure 18 The illustrated method can be applied to an NFC system including an NFC device 100, an NFC card reader 200, an NFC device 300, and an NFC device 400. The description of the NFC device 400 is similar to that of the NFC device 100. The NFC devices 100, 300, and 400 can be in PICC mode. For example, after the NFC function of the active NFC device 100 / NFC device 300 / NFC device 400 is enabled, it is in PICC mode by default, and the NFC card reader 200 can be in PCD mode.

[0445] Figure 18The fourth card conflict scenario is used as an example for illustration. In this fourth card conflict scenario, NFC device 100 is an active device that supports the first and second NFC protocols. For example, NFC device 100 is an electronic device such as a mobile phone, and NFC device 100 includes an NFC emulated card 1 that supports the first NFC protocol and an NFC emulated card 2 that supports 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 is a physical NFC tag that supports the first NFC protocol. NFC device 400 is a passive device that supports the second NFC protocol but does not support the first NFC protocol. For example, NFC device 400 is a physical NFC tag that supports 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: The NFC card reader 200 sends a probe frame of the first NFC protocol.

[0448] In some embodiments of the present application, the NFC card reader 200 may broadcast a probe frame of the first NFC protocol through a radio frequency field.

[0449] In some embodiments of the present 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 perform polling of the first NFC protocol and polling of the second NFC protocol. The polling of the first NFC protocol may include sending a detection frame of the first NFC protocol, and the polling of 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 operations in a chronological order within the radio frequency field: broadcasting a detection frame of the first NFC protocol, broadcasting a request command of the second NFC protocol, broadcasting a detection 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 embodiment of the application does not limit the order in which NFC devices 100, 300, and 400 enter the radio frequency field of NFC card reader 200.

[0451] S602 : The NFC card reader 200 sends a request command of the second NFC protocol to the NFC devices 100 , 300 , and 400 .

[0452] In some embodiments of the present application, the request command of the second NFC protocol may be a request command type A (REQA) or a request command type B (REQB) in the ISO14443 / IEC14443 protocol.

[0453] In some embodiments of the present application, the NFC device 100, the NFC device 300, and the NFC device 400 enter the radio frequency field of the NFC card reader 200 after S600 and before S602. Therefore, after the NFC device 100, the NFC device 300, and the NFC device 400 enter the radio frequency field of the NFC card reader 200, they can first receive a request command of the second NFC protocol sent by the NFC card reader 200.

[0454] S603: The NFC device 400 sends a request response command of the second NFC protocol to the NFC card reader 200.

[0455] In some embodiments of the present application, the request response command of the second NFC protocol can be an answer to request type A (ATQA) or an 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 the present application, after receiving the request command, the NFC device 400 that supports the second NFC protocol can send a request response command to the NFC card reader 200.

[0456] In some embodiments of the present application, 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 after receiving the request command.

[0457] In some embodiments of the present application, the NFC device 100 is an active device that supports a first NFC protocol and a second NFC protocol. The NFC device 100 may be preset to prioritize 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 for polling instructions sent by the NFC card reader 200. For example, the NFC device 100 may set the end time of continued monitoring to be the time when the next request command of the second NFC protocol sent by the NFC card reader 200 is received. Before this end time, if the NFC device 100 receives a detection frame of the first NFC protocol, the monitoring of the polling instruction is canceled and a detection confirmation frame is returned (e.g., S604-S605 described below). If the NFC device 100 does not receive a detection frame of the first NFC protocol, the NFC device 100 returns a request response command when the next request command of the second NFC protocol sent by the NFC card reader 200 is received.

[0458] In some embodiments of the present application, the NFC device 100 is an active device and may include an NFC emulated card 1 supporting a first NFC protocol and an NFC emulated card 2 supporting a second NFC protocol. The NFC device 100 may first communicate with the NFC card reader 200 using the NFC emulated card 1 using the first NFC protocol. Therefore, upon receiving a request command using the second NFC protocol, the NFC device 100 may not return a request response command, but instead may continue to monitor for polling instructions sent by the NFC card reader 200 or return a detection confirmation frame after receiving a detection frame using the first NFC protocol (e.g., steps S604-S605 described below). If the NFC emulated card 1 using the first NFC protocol of the NFC device 100 and the NFC card reader 200 fail to match, for example, if no detection frame using the first NFC protocol is received within a predetermined time period, the NFC device 100 may communicate with the NFC card reader 200 using the NFC emulated card 2 using the second NFC protocol. Therefore, upon receiving a request command using the second NFC protocol, the NFC device 100 may return a request response command.

[0459] S604 : The NFC card reader 200 sends a probe frame of the first NFC protocol to the NFC devices 100 , 300 , and 400 .

[0460] In some embodiments of the present application, the NFC card reader 200 may be preset to prioritize the use of 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 and instead continue with the next polling, i.e., execute S604. For example, the NFC card reader 200 may set the polling end time to be the time when it next sends a request command using the second NFC protocol. Before this end time, if the NFC card reader 200 receives a detection confirmation frame after sending a detection frame using the first NFC protocol, the polling ends and communication using the first NFC protocol is continued. If the NFC card reader 200 does not receive a detection confirmation frame after sending a detection frame using the first NFC protocol, the NFC card reader 200 receives a request response frame after sending a request command using the second NFC protocol and communication using the second NFC protocol is continued.

[0461] S605 : The NFC device 100 sends a first Probe ACK frame to the NFC card reader 200 .

[0462] S606 : The NFC device 300 sends a second Probe ACK frame to the NFC card reader 200 .

[0463] The embodiment of the present application does not limit the order of S605 and S606.

[0464] In some embodiments of the present application, the NFC device 100 and the NFC device 300 support the first NFC protocol. Therefore, after receiving the detection frame of the first NFC protocol, they can send a detection confirmation (ProbeACK) frame of the first NFC protocol to the NFC card reader device 200. Therefore, if there is a card conflict, the NFC card reader device 200 can execute the anti-collision process of the first NFC protocol to select one NFC device from the NFC device 100 and the NFC device 300 to communicate with the first NFC protocol. The anti-collision process may include the following S607-S613.

[0465] In some embodiments of the present application, the NFC device 400 does not support the first NFC protocol, and therefore does not return a detection confirmation frame of the first NFC protocol after receiving the detection frame of the first NFC protocol.

[0466] S607: The NFC card reader 200 sends a conflict frame (carrying device feature information of the NFC card reader 200) to the NFC device 100 and the NFC device 300.

[0467] S608: The NFC device 100 sends a first conflict confirmation (Conflict ACK) frame to the NFC card reader 200 (indicating that the device feature information of the NFC device 100 and the NFC card reader 200 is matched successfully).

[0468] S609: The NFC device 300 sends a second conflict confirmation (Conflict ACK) frame to the NFC card reader 200 (indicating that the device feature information of the NFC device 300 and the NFC card reader 200 is matched successfully).

[0469] S610 : The NFC card reader 200 determines that the target NFC device is the NFC device 100 .

[0470] S611: The NFC card reader 200 sends a Pick frame (carrying the card identification information of the target NFC device) to the NFC device 100 and the NFC device 300.

[0471] S612: The NFC device 100 sends a first Pick ACK frame to the NFC card reader 200 (indicating that the card identification information of the NFC device 100 and the target NFC device is successfully matched).

[0472] S613: The NFC device 300 sends a second Pick ACK frame to the NFC card reader 200 (indicating that the card identification information of the NFC device 300 and the target NFC device fails 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 S404-S411 are consistent and will not be repeated here.

[0475] Not limited to Figure 18 In the embodiment shown, in other embodiments of the present application, the NFC device 100, the NFC device 300, and the NFC device 400 may also enter the field after S602 and before S604. In this case, S603 is not executed. That is, after the NFC device 100, the NFC device 300, and the NFC device 400 enter the radio frequency field of the NFC card reader device 200, they first receive the detection frame of the first NFC protocol sent by the NFC card reader device 200. The subsequent process is the same and will not be repeated here.

[0476] Not limited to Figure 18In the embodiment shown, in other embodiments of the present application, when the NFC card reader device 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 device 200 can determine to select the NFC device 400, and the NFC card reader device 200 and the NFC device 400 can communicate using the second NFC protocol without executing S604-S614. This can avoid the situation where the NFC card reader device 200 does not select the NFC device that supports the second NFC protocol (PICC mode) when the RF field of the NFC card reader device 200 (PCD mode) is the only NFC device that supports the second NFC protocol for the first time, resulting in a very slow card swiping. For example, the NFC card reader device 200 can select the NFC device that supports the second NFC protocol and communicate using the second NFC protocol after the next request command for the second NFC protocol is sent, thereby ensuring the user's card swiping experience.

[0477] Without being limited to the above embodiments, in other embodiments of the present application, there are multiple NFC devices (PICC mode) that do not support the first NFC protocol but support the second NFC protocol within the radio frequency field of the NFC card reader 200 (PCD mode). 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, see Figure 19 .

[0478] Figure 19 This is a flowchart of another card conflict handling method provided in an embodiment of the present application.

[0479] Figure 19 The method shown can be applied to an NFC system including an NFC device 100, an NFC card reader 200 and an NFC device 300, for example Figure 3 The NFC system 10 shown in FIG. 1 , wherein the NFC device 100 and the NFC device 300 can be in PICC mode, and the NFC card reader 200 can be in PCD mode.

[0480] Figure 19 The fifth card conflict scenario is taken as an example for description. In the fifth card conflict scenario, the NFC device 100 and the NFC device 300 do not support the first NFC protocol, but support the second NFC protocol.

[0481] Figure 19 The method shown may include, but is not limited to, the following steps:

[0482] S700: The NFC device 100 enters the radio frequency field of the NFC card reader 200, and the NFC device 300 enters the radio frequency field of the NFC card reader 200. This embodiment of the application does not limit the order in which the NFC device 100 and the NFC device 300 enter the radio frequency field of the NFC card reader 200.

[0483] S701 : The NFC card reader 200 sends a request command of the second NFC protocol to the NFC devices 100 and 300 .

[0484] In some embodiments of the present application, the NFC card reader 200 in PCD mode can broadcast a request command via a radio frequency field. When the NFC devices 100 and 300 in PICC mode enter the radio frequency field of the NFC card reader 200, the NFC devices 100 and 300 can receive the request command broadcast by the NFC card reader 200. The request command of the second NFC protocol can be REQA or REQB in the ISO14443 / IEC14443 protocol.

[0485] S702: The NFC device 100 sends a first request response command of the second NFC protocol to the NFC card reader 200.

[0486] S703: The NFC device 300 sends a second request response command of the second NFC protocol to the NFC card reader 200.

[0487] In some embodiments of the present application, the request response command of the second NFC protocol may be ATQA or ATQB in the ISO 14443 / IEC 14443 protocol. In some embodiments of the present application, the NFC device 100 and the NFC device 300 support the second NFC protocol and can therefore send a request response command to the NFC card reader 200 after receiving the request command broadcast by the NFC card reader 200.

[0488] Figure 19 In the method shown, the NFC card reader device 200 receives request response commands sent by two NFC devices in PICC mode (i.e., NFC device 100 and NFC device 300), so there is a card conflict. The NFC card reader device 200 can execute the anti-collision process of the second NFC protocol to select one NFC device from the two NFC devices in PICC mode for NFC signaling interaction. The anti-collision process of the second NFC protocol may include the following S704-S711.

[0489] S704 : The NFC card reader 200 sends a first anti-collision command to the NFC device 100 and the NFC device 300 .

[0490] In some embodiments of the present application, the first anti-collision command may instruct the NFC device in PICC mode to return the entire UID. For example, the value of the field SEL in the first anti-collision command is 93, and the value of the field NVB is 20.

[0491] S705 : The NFC device 100 sends the UID of the NFC device 100 to the NFC card reader 200 .

[0492] S706 : The NFC device 300 sends the UID of the NFC device 300 to the NFC card reader 200 .

[0493] S707 : The NFC card reader 200 determines that the target NFC device is the NFC device 100 .

[0494] In some embodiments of the present application, if an NFC card reader 200 in PCD mode receives UIDs from multiple NFC devices in PICC mode and a card conflict occurs, the NFC card reader 200 may 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 may determine that the target NFC device is NFC device 100 with the smallest UID. This is not limiting and other NFC device selection rules may be used.

[0495] S708: The NFC card reader 200 sends a second anti-collision command (carrying a valid bit of the target NFC device) to the NFC device 100 and the NFC device 300.

[0496] In some embodiments of the present application, the second anti-collision command may carry the valid bits of the target NFC device, where the valid bits of the target NFC device are portions of the UID of the target NFC device (i.e., NFC device 100). In some examples, when the NFC card reader 200 receives the UID sent by the NFC device 100 and the UID sent by the NFC device 300, it may identify the conflicting position of the received UIDs. Assuming that the conflicting position is the Kth bit (a K-bit positive integer) of the UID, i.e., the first K-1 bits of the UIDs of the NFC device 100 and the 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 the present application, the second anti-collision command may include a field SEL and a field NVB, and the value examples are consistent with the value examples of the first anti-collision command.

[0498] S709 : When the UID matches the valid bits of the target NFC device, the NFC device 100 sends the UID of the NFC device 100 to the NFC card reader 200 .

[0499] In some embodiments of the present application, the first K bits of the UID of the NFC device 100 are the same as the valid bits of the target NFC device, that is, the valid bits of the UID of the NFC device 100 and the target NFC device match successfully, and the first K bits of the UID of the NFC device 300 are different from the valid bits of the target NFC device, that is, the valid bits of the UID of the NFC device 300 and the target NFC device fail to match. Therefore, the NFC device 100 can send a response UID to the NFC card reader 200 according to the second anti-collision command of the NFC card reader 200, and the NFC device 300 does not respond to the second anti-collision command of the NFC card reader 200.

[0500] In some embodiments of the present application, the UID sent by the NFC device 100 in S709 may be a partial UID of the NFC device 100. For example, if the valid bits of the target NFC device are the first K bits in the UID of the target NFC device, the NFC device 100 may send the remaining bits of the UID of the NFC device 100 except the first K bits.

[0501] S710 : The NFC card reader 200 sends a select command to the NFC device 100 .

[0502] In some embodiments of the present application, the NFC card reader 200 receives a UID sent by the 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 the present application, the selection command may include a field SEL, a field NVB, and all UIDs and CRCs of the target NFC device. The field SEL may take a value of 20, and the field NVB may take a value of 70.

[0504] S711 : The NFC device 100 sends a select acknowledge (SAK) command to the NFC card reader 200 .

[0505] In some embodiments of the present application, when 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 card swiping service for the first PICC. In some embodiments of the present application, after receiving the selection confirmation command, the NFC card reader 200 may determine that the NFC device 100 is selected, which can be understood as the end of the anti-collision process / card selection process. In some examples, the NFC card reader 200 may verify the selection confirmation command and determine that the NFC device 100 is selected after the verification is successful. For example, the NFC card reader 200 may verify whether the serial bit of the selection confirmation command is set, and if so, the verification is successful.

[0507] In some embodiments of the present application, after the NFC card reader 200 determines to select the NFC device 100, it can perform NFC signaling interaction with the selected NFC device 100 to complete the card swiping service of the first PICC. 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 simulated card among the one or more NFC simulated cards included in the NFC device 100. Specific examples and Figure 8 The example in which the NFC card reader 200 and the selected NFC device 100 perform NFC signaling interaction is similar.

[0508] The description of the first NFC protocol shown in the above embodiment is only for illustration and should not be construed as limiting. The following exemplifies the description of the first NFC protocol in another embodiment.

[0509] Figure 20 This is a flowchart of another card conflict handling method provided in an embodiment of the present 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 in FIG. 10 , wherein the NFC device 100 may be in PICC mode, for example, the active NFC device 100 is in PICC mode by default after the NFC function is enabled, and the NFC card reader 200 may be in PCD mode.

[0511] Figure 20 The method shown may include, but is not limited to, the following steps:

[0512] S1000 : The NFC device 100 enters the radio frequency field of the NFC card reader 200 .

[0513] S1001 : The NFC card reader 200 sends a probe frame to the NFC device 100 .

[0514] Figure 20 S1000-S1001 and Figure 8 The format of the Probe frame can be found in Figure 21 ,like Figure 21 As shown in FIG, the Probe frame may include a frame header and a check code. The frame header of the Probe frame may include a protocol identification field, a frame type field, and a protocol version field. The fields in the frame header may be described in Table 1.

[0515] S1002 : The NFC device 100 sends a Probe ACK frame to the NFC card reader 200 .

[0516] Figure 20 S1002 and Figure 8 Similar to S102, where Figure 20 The format of the Probe ACK frame in Figure 8 The format of the Probe ACK frame in is different. Figure 20 The format of the Probe ACK frame can be found in Figure 22 ,like Figure 22 As shown in Table 1, the Probe ACK frame may include a frame header, a data segment, and a checksum. The frame header in the Probe ACK frame may include a protocol identification field, a frame type field, and a protocol version field. The specific field descriptions are similar to those in Table 1. For specific field examples, see Figure 8 The data segment in the Probe ACK frame may include an anti-collision random number field. For example, the anti-collision random number field is 1 byte long. The value of the anti-collision random number field can be a random number. The anti-collision random number field in the Probe ACK frames sent by different NFC devices can be different. The anti-collision random number field can be used by the NFC card reader 200 to determine the number of NFC devices that sent multiple Probe ACK frames when the NFC card reader 200 receives multiple Probe ACK frames simultaneously.

[0517] Figure 20 In the method shown, the NFC card reader 200 receives a Probe ACK frame sent by the NFC device 100 in PICC mode, so there is no card conflict. The NFC card reader 200 can execute the following S1003-S1007.

[0518] S1003: The NFC card reader 200 sends a Notify frame (carrying device feature information of the NFC card reader 200) to the NFC device 100.

[0519] In some embodiments of the present application, the Notify frame may include device feature information of the NFC card reader 200. The NFC card reader 200 in PCD mode may notify the NFC device 100 in PICC mode of the device feature information of the NFC card reader 200 through the Notify frame, thereby indicating the service intention of the NFC card reader 200 to the NFC device 100. For a description of device feature information, see Figure 8 Description of the device characteristic information in S103.

[0520] In some embodiments of the present application, Figure 20 The format of the Notify frame in Figure 8 The format of the Notify frame in is different. Figure 20 For an example of the Notify frame format, see Figure 23 .like Figure 23 As shown, the Notify frame may include a frame header, a data segment and a check code. The frame header of the Notify frame may include a protocol identification field, a frame type field and a length field. For details, see the description of the relevant fields shown in Table 3. The data segment of the Notify frame may include a device identification element. For details, see Figure 8 The device identification element in S103 is described. The check code may include a CRC code.

[0521] S1004 : The NFC device 100 sends a NotifyACK frame to the NFC card reader 200 .

[0522] In some embodiments of the present application, after receiving the Notify frame, the NFC device 100 in PICC mode may 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 the present application, Figure 20 The format of the NotifyACK frame in Figure 8 The format of the NotifyACK frame in is different. Figure 20 For an example of the NotifyACK frame format, see Figure 24 .like Figure 24 As shown, the NotifyACK frame may include a frame header and a check code. The frame header of the NotifyACK frame may include a protocol identification field and a frame type field. For detailed descriptions, please refer to the descriptions of the relevant fields shown in Table 5. The check code may include a CRC code.

[0524] In some embodiments of the present application, after receiving a Notify frame, the active NFC device 100 may perform an action corresponding to the device characteristic information of the NFC card reader 200 according to the device characteristic information of the NFC card reader 200 carried in the Notify frame. The action corresponding to the device characteristic 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 a card swipe prompt for an NFC simulated card (e.g., an access card, key card, transportation card, bank card, etc.), a wireless charging prompt, a codeless payment prompt, an electronic ticket prompt, a tap-and-pay function prompt, a multi-function card prompt, and the like.

[0525] In some embodiments of the present application, after the active NFC device 100 receives the Notify frame, it can determine the corresponding NFC simulated card from one or more NFC simulated cards of the NFC device 100 based on the device feature information of the NFC card reader device 200 carried in the Notify frame. This can be understood as a successful match between the device feature information of the NFC simulated card and the NFC card reader device 200. The NFC device 100 can display a card swiping interface for the NFC simulated card. In some examples, the NFC simulated card corresponding to the device feature information of the NFC card reader device 200 can be determined at the application layer of the NFC device 100, for example, by Figure 5 The application program in the processor 101 shown is implemented, or by Figure 5 SE103 shown, or by Figure 5 The SIM card 104 shown is implemented. In other examples, the NFC module 102 of the NFC device 100 can determine the NFC simulated card corresponding to the device feature information of the NFC card reader 200. It can be understood that although the card swiping interface of the NFC simulated card is displayed at this time, the card swiping service is not performed at this time. The NFC simulated card that actually performs the card swiping service and the NFC simulated card displayed on the card swiping interface may be the same or different. The card swiping interface of the NFC simulated card displayed here can be understood as allowing the user to perceive the card swiping process as early as possible. In this case, the device feature information of the NFC card reader 200 carried by the Notify frame can be understood as being used to realize the early display and maintenance of the card swiping interface. For the implementation of the card swiping service, please refer to the description of S1007.

[0526] S1005 : The NFC card reader 200 sends a parameter negotiation (Param Negotiation) command to the NFC device 100 .

[0527] S1006 : The NFC device 100 sends a parameter negotiation response (Param NegotiationResponse) to the NFC card reader 200 .

[0528] In some embodiments of the present application, the NFC card reader 200 and the NFC device 100 can negotiate communication parameters using a parameter negotiation command and a parameter negotiation response. The negotiated communication parameters can be used to implement NFC signaling interaction for a card swiping service, for example, for executing 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. The communication parameters can include any one or more of the maximum transmission rate and maximum data transmission length during data transmission.

[0529] S1005 and S1006 are optional steps. In some embodiments of the present 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, does not execute S1005-S1006. In this case, the NFC card reader 200 and the electronic device 100 can perform subsequent communication processes using 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 is similar to S105. In some embodiments of the present 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 device 200, and the Select AID command can carry the identifier of the first Applet (assuming it is the first AID). The active NFC device 100 can determine the first Applet and the target NFC simulated card based on the first AID (optionally and the device feature information of the NFC card reader device 200), run the first Applet, and complete the card swiping service of the target NFC simulated card (i.e., the first PICC) through the first Applet, wherein the NFC device 100 can send the card information of the target NFC simulated card to the NFC card reader device 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 program in the processor 101 shown is implemented, or by Figure 5 SE103 shown, or by Figure 5 The SIM card 104 shown is implemented as shown. The NFC card reader 200 can perform a card swipe verification process based on the card information of the target NFC simulated card and send the card swipe result of the target NFC simulated card to the NFC device 100.

[0532] Figure 25This is a flowchart of another card conflict handling method provided in an embodiment of the present application.

[0533] Figure 25 The method shown can be applied to an NFC system including an NFC device 100, an NFC card reader 200 and an NFC device 300, for example Figure 3 The NFC system 10 shown in FIG. 1 includes the NFC device 100 and the NFC device 300 in PICC mode. For example, the active NFC device 100 / NFC device 300 is in PICC mode by default after the NFC function is enabled, and the NFC card reader 200 is 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 embodiment of the application 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 : The NFC card reader 200 sends a probe frame to the NFC device 100 and the NFC device 300 .

[0537] Figure 25 S2000-S2001 and Figure 11 The S200-S201 is similar. Among them, Figure 25 For a description of the Probe frame, see Figure 20 For a description of the Probe frame in S1001 and an example of its format, see Figure 21 .

[0538] S2002 : The NFC device 100 sends a first Probe ACK frame to the NFC card reader 200 .

[0539] S2003 : The NFC device 300 sends a second Probe ACK frame to the NFC card reader 200 .

[0540] The embodiment of the present application does not limit the order of S2002 and S2003.

[0541] In some embodiments of the present application, the description of the first Probe ACK frame and the second Probe ACK frame can be found in Figure 20 For an explanation of the Probe ACK frame in S1002 and an example of its format, see Figure 22. The first Probe ACK frame is different from the second Probe ACK frame. In some examples, the frame header in the first Probe ACK frame may be the same as or different from the frame header in the second Probe ACK frame. In some examples, the value of the anti-collision random number field in the first Probe ACK frame may be different from the value of the anti-collision random number field in the second Probe ACK frame. Therefore, even if the NFC card reader 200 receives the first Probe ACK frame and the second Probe ACK frame at the same time, it can be determined that the first Probe ACK frame and the second Probe ACK frame are sent by two different PICCs according to the value of the anti-collision random number field.

[0542] Figure 25 In the method shown, the NFC card reader device 200 receives Probe ACK frames sent by two NFC devices in PICC mode (i.e., NFC device 100 and NFC device 300), so there is a card conflict. The NFC card reader device 200 can perform an anti-collision process to select one NFC device from the two NFC devices in PICC mode for NFC signaling interaction. The anti-collision process may include at least one of the following S2004-S2013.

[0543] S2004 : The NFC card reader 200 sends a conflict frame to the NFC device 100 and the NFC device 300 .

[0544] In some embodiments of the present application, Figure 25 The format of the Conflict frame in Figure 11 The format of the Conflict frame in is different. Figure 25 For an example of the format of the Conflict frame in Figure 26 .like Figure 26 As shown, the Conflict frame may include a frame header, a data segment, and a check code. The frame header of the Conflict frame may include a protocol identification field, a frame type field, and a length field. The specific description is similar to the description of the relevant fields shown in Table 3. For example, Figure 26 As shown, the value of the protocol identification field in the frame header of the Conflict 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 frame can be "0x03". The data segment of the Conflict frame can include a waiting slot. The description of the waiting slot can be found in Figure 11 An illustration of a waiting time slot in a contention frame is shown. The check code may include a CRC code.

[0545] S2005: The NFC device 100 sends a first conflict confirmation (Conflict ACK) frame (carrying the card identification information of the NFC device 100) to the NFC card reader 200.

[0546] S2006: The NFC device 300 sends a second conflict confirmation (Conflict ACK) frame (carrying the card identification information of the NFC device 300) to the NFC card reader 200.

[0547] The embodiment of the present application does not limit the order of S2005 and S2006.

[0548] In some embodiments of the present 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, and the Conflict ACK frame carries the card identification information of the NFC device. 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 the present application, the NFC device 100 and the 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 the NFC card reader 200. The NFC device 100 / NFC device 300 can select a time slot from multiple time slots in the timeout period to send the first Conflict ACK frame / the second Conflict ACK frame. For example, if the waiting time slot is four, that is, the timeout period includes four time slots, the NFC device 100 can select to send the first Conflict ACK frame in the first of these four time slots, and the NFC device 300 can select to send the second Conflict ACK frame in the third of these four time slots. It is understood that the NFC card reader 200 uses the waiting time slots in the Conflict frame to allow the NFC device 100 and the NFC device 300 to send the Conflict ACK frame in different time slots, thereby avoiding conflicts when the NFC card reader 200 receives the Conflict ACK frame, which may result in the inability to properly receive and recognize the Conflict ACK frame.

[0550] In some embodiments of the present application, Figure 25The format of the Conflict ACK frame in Figure 11 The format of the ConflictACK frame in . Figure 25 For an example of the format of the Conflict ACK frame, see Figure 27 .like Figure 27 As shown in Table 6, the Conflict ACK frame may include a frame header, a data segment, and a check code. The frame header of the Conflict ACK frame may include a protocol identification field, a frame type field, and a length field. The data segment of the Conflict ACK frame may include a card identification element. The card identification element may include the card identification information of the NFC device sending the Conflict ACK frame (including a card type identifier and a card random number). For specific descriptions, please refer to the descriptions of the relevant fields shown in Table 6. The lengths of the card type identifier and the card random number shown in Table 6 are for example 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 a target NFC device (ie, the NFC device 100 ) from the NFC devices 100 and 300 based on the card identification information of the NFC device 100 and the card identification information of the NFC device 300 .

[0552] In some embodiments of the present application, the NFC card reader 200 can determine the target card identification information required by the NFC card reader 200 from the card identification information of the NFC device 100 and the card identification information of the NFC device 300 according to a preset rule, thereby determining the target NFC device corresponding to the target card identification information. This can also be referred to as determining the target NFC device that successfully matches the card identification information required by the NFC card reader 200. The card identification information of the target NFC device is the target card identification information required by the NFC card reader 200. The preset rule can be determined based on user needs, for example, obtained by statistically analyzing the usage habits of a large number of users.

[0553] Figure 25 The target NFC device is taken as the NFC device 100 as an example for description.

[0554] 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 a passive device. The preset 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. Without limitation, in other examples, the preset rule may also 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 preset rule is not limited in the present embodiment.

[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, i.e., the type of NFC device 100 and the type of 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, i.e., the card random number in the card identification information required by the NFC card reader 200 is the smaller. Assuming that the card random number of NFC device 100 is smaller than that of NFC device 300, the target NFC device is NFC device 100 with the smaller card random number. Without limitation, in a specific implementation, the preset rule may also prioritize the NFC device with the larger card random number among multiple NFC devices of the same type. This preset rule is not limited in this embodiment of the present application.

[0556] S2008: The NFC card reader 200 sends a Pick frame (carrying the card identification information of the target NFC device) to the NFC device 100 and the NFC device 300.

[0557] In some embodiments of the present application, the NFC card reader device 200 may broadcast a Pick frame, and the Pick frame may include card identification information of a target NFC device (ie, the NFC device 100 ) of the NFC card reader device 200 .

[0558] In some embodiments of the present application, Figure 25 The format of the Pick frame and Figure 11 The format of the Pick frame in is different. Figure 25 The format of the Pick frame can be found in Figure 28 .like Figure 28As shown, the Pick frame may include a frame header, a data segment, and a checksum. The frame header of the Pick frame may include a protocol identification field, a frame type field, and a length field. The specific description is similar to the description of the relevant fields shown in Table 3, for example Figure 28 As shown, the value of the protocol identification field in the frame header of the Pick frame can be the identifier of the first NFC protocol "0x7C". The value of the frame type field in the frame header of the Pick frame can be "0x05". The data segment of the Pick frame can include a card identification element, and the card identification element can include the card identification information of the target NFC device of the NFC card reader 200 (including the card type identification and the card random number). Optionally, the card identification element can also include an element code. The description of the data segment of the Pick frame can be found in the description of Table 7. The check code can include a CRC code.

[0559] S2009 : The NFC device 100 sends a Pick ACK frame to the NFC card reader 200 .

[0560] In some embodiments of the present application, after receiving a Pick frame sent by the NFC card reader 200, the NFC device in PICC mode can obtain the card identification information in the Pick frame. If the NFC device in PICC mode determines that the card identification information of the device is the same as the card identification information in the Pick frame, the NFC device sends a Pick ACK frame to the NFC card reader 200. If the NFC device in PICC mode determines that the card identification information of the device is different from the card identification information in the Pick frame, the NFC device does not send a Pick ACK 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 Pick ACK frame to the NFC card reader 200, and the NFC device 300 does not send a Pick ACK frame to the NFC card reader 200.

[0561] In some embodiments of the present application, Figure 25 The format of the Pick ACK frame in Figure 11 The format of the Pick ACK frame in is different. Figure 25 For an example of the format of the Pick ACK frame, see Figure 29 .like Figure 29 As shown, the Pick ACK frame may include a frame header and a check code. The frame header of the Pick ACK frame may include a protocol identification field and a frame type field. The specific description is similar to the description of the relevant fields shown in Table 5. For example, Figure 29As shown, the value of the protocol identifier field in the frame header of the Pick ACK frame may be the identifier of the first NFC protocol "0x7C". The value of the frame type field in the frame header of the Pick ACK frame may be "0x06". The check code may include a CRC code.

[0562] S2010: The NFC card reader 200 sends a Notify frame (carrying device feature information of the NFC card reader 200) to the NFC devices 100 and 300.

[0563] S2011 : The NFC device 100 sends a NotifyACK frame to the NFC card reader 200 .

[0564] In some embodiments of the present application, the NFC card reader 200 may broadcast a Notify frame. When an NFC device in PICC mode receives a Notify frame sent by the NFC card reader 200, if the NFC device in PICC mode is the target NFC device of the NFC card reader 200, that is, the card identification information of the NFC device in PICC mode is the same as the card identification information in the received Pick frame (the NFC device in PICC mode has sent a PickACK frame to the NFC card reader 200), the NotifyACK frame is sent to the NFC card reader 200. If the NFC device in PICC mode is not the target NFC device of the NFC card reader 200, that is, the card identification information of the NFC device in PICC mode is different from the card identification information in the received Pick frame (the NFC device in PICC mode has not sent a PickACK frame to the NFC card reader 200), the NotifyACK frame is not sent 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 , and the NFC device 300 does not send a NotifyACK frame to the NFC card reader 200 .

[0565] S2012: The NFC card reader 200 sends a parameter negotiation (Param Negotiation) command to the NFC device 100.

[0566] S2013: The NFC device 100 sends a parameter negotiation response (Param NegotiationResponse) to the 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 Figure 20 Instructions for S1005-S1007.

[0569] Figure 25 This is for illustration only and should not be construed as limiting. In other embodiments of the present application, the NFC card reader 200 can communicate with more NFC devices in PICC mode using an anti-collision process, and the NFC card reader 200 can determine a target NFC device from more NFC devices in PICC mode.

[0570] Without limitation, in some other embodiments of the present application, the NFC card reader 200 may receive only one collision confirmation frame. For example, the NFC device 300 may not send the second collision confirmation frame due to an abnormal factor such as a malfunction, and the NFC card reader 200 may only receive the first collision confirmation frame sent by the NFC device 100. In this case, the NFC card reader 200 may determine that the NFC device 100 that sent the first collision confirmation frame is the target NFC device.

[0571] The lengths and values ​​of the fields in the NFC transmission frame in the above examples are only used to explain the present application and should not constitute a limitation on the embodiments of the present application.

[0572] The following exemplifies the implementation process of the card conflict handling method in some card conflict scenarios.

[0573] Figure 30 This is a flowchart of another card conflict handling method provided in an embodiment of the present application.

[0574] Figure 30 The process shown can be Figure 25 The implementation process of the card conflict handling method shown in the sixth card conflict scenario. In the sixth card conflict scenario, the NFC device 100 is an active device, and the NFC device 300 is a passive device. For example, the sixth card conflict scenario Figure 7A The scene shown.

[0575] Figure 30 The method shown may include, but is not limited to, the following steps:

[0576] S3000 : The NFC device 100 enters the radio frequency field of the NFC card reader 200 , and the NFC device 300 enters the radio frequency field of the NFC card reader 200 .

[0577] S3001 : The NFC card reader 200 sends a probe frame to the NFC device 100 and the NFC device 300 .

[0578] S3002 : The NFC device 100 sends a first Probe ACK frame to the NFC card reader 200 .

[0579] S3003 : The NFC device 300 sends a second Probe ACK frame to the NFC card reader 200 .

[0580] S3004 : The NFC card reader 200 sends a conflict frame to the NFC device 100 and the NFC device 300 .

[0581] S3005: The NFC device 100 sends a first conflict confirmation (Conflict ACK) frame (carrying the card identification information of the NFC device 100) to the NFC card reader 200.

[0582] S3006: The NFC device 300 sends a second conflict confirmation (Conflict ACK) frame (carrying the card identification information of the NFC device 300) to the NFC card reader 200.

[0583] S3007 : The NFC card reader 200 determines a target NFC device (ie, the active NFC device 100 ) from the NFC devices 100 and 300 based on the card identification information of the NFC device 100 and the card identification information of the NFC device 300 .

[0584] S3008: The NFC card reader 200 sends a Pick frame (carrying the card identification information of the target NFC device) to the NFC device 100 and the NFC device 300.

[0585] S3009 : The NFC device 100 sends a Pick ACK frame to the NFC card reader 200 .

[0586] S3010: The NFC card reader 200 sends a Notify frame (carrying device feature information of the NFC card reader 200) to the NFC devices 100 and 300.

[0587] S3011 : The NFC device 100 sends a NotifyACK frame to the NFC card reader 200 .

[0588] S3012: The NFC card reader 200 sends a parameter negotiation (Param Negotiation) command to the NFC device 100.

[0589] S3013: The NFC device 100 sends a parameter negotiation response (Param NegotiationResponse) to the NFC card reader 200.

[0590] Figure 30 S3000-S3013 and Figure 25 Similar to S2000-S2013. Figure 30 In S3005-S3006, the card identification information of the NFC device 100 carried in the first Conflict ACK frame sent by the NFC device 100 includes the card type identification of the NFC device 100. The card type identification of the NFC device 100 indicates that the NFC device 100 is an active device, for example, the value of the card type identification is "0x01". The card identification information of the NFC device 300 carried in the second Conflict ACK frame sent by the NFC device 300 includes the card type identification of the NFC device 300. The card type identification of the NFC device 300 indicates that the NFC device 300 is a passive device, for example, the value of the card type identification is "0x02". Figure 30 In S3007, the NFC card reader 200 may determine that the target NFC device is an active NFC device 100 according to the preset rule 1, the card type identifier of the NFC device 100, and the card type identifier of the NFC device 300. The preset rule 1 may include giving priority to active devices. Figure 30 In S3008 , the NFC card reader 200 sends a Pick frame to the target NFC device (ie, the NFC device 100 ), where the Pick frame carries the card identification information of the target NFC device (ie, the NFC device 100 ).

[0591] S3014: The NFC card reader 200 and the NFC device 100 perform NFC signaling interaction. If the first NFC simulated card of the NFC device 100 is the target PICC of the NFC card reader 200, the card swiping service of the first NFC simulated card is successfully executed; if the first NFC simulated 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 the present application, Figure 30 S3014 and Figure 20The active NFC device 100 may include one or more NFC simulated cards, and any one of the one or more NFC simulated cards is referred to as a first NFC simulated card. When the NFC card reader device 200 and the NFC device perform NFC signaling interaction, if the first NFC simulated card of the NFC device 100 is the target PICC of the NFC card reader device 200, that is, the NFC device 100 includes an NFC simulated card belonging to the target PICC of the NFC card reader device 200, then the NFC card reader device 200 and the NFC device 100 can successfully execute the card swiping service of the NFC simulated card. If the first NFC simulated card of the NFC device 100 is not the target PICC of the NFC card reader device 200, that is, the NFC device 100 does not include the target PICC belonging to the NFC card reader device 200, then the card swiping service of the NFC device 100 fails to be executed.

[0593] In some examples, the NFC card reader 200 can send a Select AID command to the NFC device 100. The Select AID command can carry the identifier of the first applet (assuming it is the first AID). The active NFC device 100 can determine the corresponding NFC simulated card from one or more NFC simulated cards of the NFC device 100 based on the first AID (optionally and the device feature information of the NFC card reader 200) and send the card information of the NFC simulated card to the NFC card reader 200. The NFC card reader 200 can perform a card swipe verification process based on the card information of the NFC simulated card and send the card swipe result of the NFC simulated card to the NFC device 100. When the NFC simulated card is the target PICC of the NFC card reader 200, the card swipe service is executed successfully, and the card swipe result is a card swipe success. When the NFC simulated card is not the target PICC of the NFC card reader 200, the card swipe service fails, and the card swipe result is a card swipe failure. Without limitation, in other examples, if the active NFC device 100 cannot determine the corresponding NFC simulated card from one or more NFC simulated cards of the NFC device 100 according to 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 a selection failure to the NFC card reader 200, and the card swiping service fails.

[0594] For example, in Figure 30In the sixth card conflict scenario shown, the target PICC of the NFC card reader 200 is a Type A PICC that supports the first NFC protocol, the NFC device 100 is a mobile phone that can include one or more NFC emulated cards, and the NFC device 300 is a physical NFC tag card that supports the first NFC protocol. The NFC card reader 200 can determine the target NFC device (i.e., the active NFC device 100) from the NFC devices 100 and 300. The NFC card reader 200 can perform NFC signaling interaction with the NFC device 100. When the NFC device 100 includes a Type A NFC emulated card that supports the first NFC protocol, the card swipe service of the NFC emulated card is successfully executed. When the NFC device 100 does not include a Type A NFC emulated card that supports the first NFC protocol, the card swipe service fails. Therefore, the target PICC selected by the NFC card reader 200 is likely to be a Type A NFC emulated card that supports the first NFC protocol.

[0595] Figure 31 This is a flowchart of another card conflict handling method provided in an embodiment of the present application.

[0596] Figure 31 The process shown can be Figure 25 The implementation process of the card conflict handling method shown in the seventh card conflict scenario. In the seventh card conflict scenario, the NFC device 100 and the NFC device 300 are both passive devices. However, this is not limiting. In other examples, the NFC device 100 and the NFC device 300 may also 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 : The NFC device 100 enters the radio frequency field of the NFC card reader 200 , and the NFC device 300 enters the radio frequency field of the NFC card reader 200 .

[0599] S4001 : The NFC card reader 200 sends a probe frame to the NFC device 100 and the NFC device 300 .

[0600] S4002 : The NFC device 100 sends a first Probe ACK frame to the NFC card reader 200 .

[0601] S4003 : The NFC device 300 sends a second Probe ACK frame to the NFC card reader 200 .

[0602] S4004 : The NFC card reader 200 sends a conflict frame to the NFC device 100 and the NFC device 300 .

[0603] S4005: The NFC device 100 sends a first conflict confirmation (Conflict ACK) frame (carrying the card identification information of the NFC device 100) to the NFC card reader 200.

[0604] S4006: The NFC device 300 sends a second conflict confirmation (Conflict ACK) frame (carrying the card identification information of the NFC device 300) to the NFC card reader 200.

[0605] S4007 : When the card random number of the NFC device 100 is smaller than the card random number of the NFC device 300 , the NFC card reader 200 determines that the target NFC device is the NFC device 100 .

[0606] S4008: The NFC card reader 200 sends a Pick frame (carrying the card identification information of the target NFC device) to the NFC device 100 and the NFC device 300.

[0607] S4009 : The NFC device 100 sends a Pick ACK frame to the NFC card reader 200 .

[0608] S4010: The NFC card reader 200 sends a Notify frame (carrying device feature information of the NFC card reader 200) to the NFC devices 100 and 300.

[0609] S4011 : The NFC device 100 sends a NotifyACK frame to the NFC card reader 200 .

[0610] S4012: The NFC card reader 200 sends a parameter negotiation (Param Negotiation) command to the NFC device 100.

[0611] S4013: The NFC device 100 sends a parameter negotiation response (Param NegotiationResponse) to the NFC card reader 200.

[0612] Figure 31 S4000-S4013 and Figure 25 Similar to S2000-S2013. Figure 31In S4005-S4006, the card identification information of the NFC device 100 carried in the first Conflict ACK frame sent by the NFC device 100 includes the card type identification of the NFC device 100 and the card random number 3. The card type identification of the NFC device 100 indicates that the NFC device 100 is a passive device. The card identification information of the NFC device 300 carried in the second Conflict ACK frame sent by the NFC device 300 includes the card type identification of the NFC device 300 and the card random number 4. The card type identification of the NFC device 300 indicates that the 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 the NFC device 100, and the card identification information of the NFC device 300. The preset rule 2 may include giving priority to the device with the smaller card random number among multiple active devices or passive devices. Since both the NFC device 100 and the NFC device 300 are passive devices, the card random number 3 of the NFC device 100 is smaller than the card random number 4 of the NFC device 300, so the target NFC device is the NFC device 100. Figure 31 In S4008 , the NFC card reader 200 sends a Pick frame to the target NFC device (ie, the NFC device 100 ), where the Pick frame carries the card identification information of the target NFC device (ie, the NFC device 100 ).

[0613] S4014: The NFC card reader 200 and the NFC device 100 perform NFC signaling interaction to complete the card swiping service of the first PICC (ie, the NFC device 100).

[0614] In some embodiments of the present application, Figure 31 S4014 and Figure 20 The NFC device 100 is a passive device, and 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 type A PICC that supports the first NFC protocol, and both the NFC device 100 and the NFC device 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 the NFC device 100 and the NFC device 300. The NFC device 100 may be type A, in which case the card swiping service is successfully executed, or it may not be type A, in which case the card swiping service fails. Therefore, the target PICC selected by the NFC card reader 200 is likely / likely to be a physical NFC tag card of type A that supports the first NFC protocol.

[0616] Figure 32 This is a flowchart of another card conflict handling method provided in an embodiment of the present application.

[0617] Figure 32 The method shown can be applied to an NFC system including an NFC card reader 200, multiple NFC devices supporting a first NFC protocol, and multiple NFC devices supporting a second NFC protocol. The NFC card 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 card conflict scenario. In the eighth card conflict scenario, multiple NFC devices that support the first NFC protocol are all passive devices and do not support the second NFC protocol. Multiple NFC devices that support the second NFC protocol are all passive devices and do not support the first NFC protocol.

[0619] The NFC card reader device 200 supports the first NFC protocol and the second NFC protocol, and the NFC card reader device 200 can alternately perform polling of the first NFC protocol and polling of the second NFC protocol. The polling of the first NFC protocol may include sending a Probe frame of the first NFC protocol, and the polling of the second NFC protocol may include sending a request command of the second NFC protocol. In some examples, the NFC card reader device 200 may perform the following in chronological order within the radio frequency field: broadcasting the Probe frame of the first NFC protocol, broadcasting the request command of the second NFC protocol, broadcasting the Probe frame of the first NFC protocol, broadcasting the request command of the second NFC protocol, and so on. For an explanation of the Probe frame of the first NFC protocol, please refer to Figure 20 The description of the Probe frame in S1001. The description of the request command of the second NFC protocol can be found in 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 embodiment of the application 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 multiple NFC devices supporting the first NFC protocol, and the NFC card reader 200 sends a probe frame of the first NFC protocol to multiple NFC devices supporting the second NFC protocol.

[0623] S5002: Multiple NFC devices supporting the first NFC protocol respectively send multiple Probe ACK frames of the first NFC protocol to the NFC card reader 200.

[0624] S5003: The NFC card reader 200 performs an anti-collision process of the first NFC protocol with multiple NFC devices supporting the first NFC protocol, wherein the NFC card reader 200 determines a first target NFC device from the multiple NFC devices supporting the first NFC protocol.

[0625] S5004: The NFC card reader 200 performs NFC signaling interaction with the first target NFC device according to the first NFC protocol to complete the card swiping service of the first target NFC device.

[0626] Among them, S5000-S5004 can be Figure 32 The execution is performed under the case 1 shown. Figure 32 The illustrated scenario 1 includes: 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 card reader 200, they first receive the Probe frame of the first NFC protocol broadcast by the NFC card reader 200. Therefore, each of the multiple NFC devices supporting the first NFC protocol can return a Probe ACK frame to the NFC card reader 200. For an explanation of the Probe ACK frame, see Figure 20 The NFC card reader 200 receives Probe ACK frames sent by multiple NFC devices in PICC mode (supporting the first NFC protocol). If there is a card conflict, the anti-collision process of the first NFC protocol can be performed. Figure 11 / Figure 25 After the anti-collision process of the first NFC protocol, the NFC card reader device 200 can determine the first target NFC device from multiple NFC devices that support the first NFC protocol, and perform NFC signaling interaction with the first target NFC device to complete the card swiping service of the first target NFC device. Figure 20 Similar to the 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 embodiment of the application 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 of the second NFC protocol to multiple NFC devices supporting the first NFC protocol. The NFC card reader 200 sends a request command of the second NFC protocol to multiple NFC devices supporting the second NFC protocol.

[0629] S5007: Multiple NFC devices supporting the second NFC protocol respectively send multiple request response commands of the second NFC protocol to the NFC card reader 200.

[0630] S5008: The NFC card reader 200 performs an anti-collision process of the second NFC protocol with multiple NFC devices supporting the second NFC protocol, wherein the NFC card reader 200 determines a 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 of the second NFC protocol with the second target NFC device to complete the card swiping service of the second target NFC device.

[0632] Among them, S5005-S5009 can be Figure 32 The execution is performed under the case 2 shown. Figure 32 The illustrated scenario 2 includes: 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 card reader 200, they first receive a request command of the second NFC protocol broadcast by the NFC card reader 200. Therefore, each of the multiple NFC devices supporting the second NFC protocol can return a request response command to the NFC card reader 200. The description of the request response command can be found in Figure 18 The NFC card reader device 200 receives request response commands sent by multiple NFC devices in PICC mode (supporting the first NFC protocol), and there is a card conflict. Therefore, the anti-collision process of the second NFC protocol can be performed. The anti-collision process is the same as Figure 19 After the anti-collision process of the second NFC protocol, the NFC card reader device 200 can determine the second target NFC device from multiple NFC devices that support the second NFC protocol, and perform NFC signaling interaction with the second target NFC device to complete the card swiping service of the second target NFC device. Figure 19 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 that supports the first NFC protocol, and a PICC of type A that supports the second NFC protocol. Multiple NFC devices that support the first NFC protocol include a physical NFC tag card of type A that supports the first NFC protocol. Multiple NFC devices that support the second NFC protocol include a physical NFC tag card of type A that supports the second NFC protocol. The timing of the entry of the NFC device is uncertain. The NFC card reader 200 may first receive the polling response frame (i.e., ProbeACK frame) of the first NFC protocol sent by the NFC device. At this time, the physical NFC tag card of type A that supports the first NFC protocol may be selected, for example Figure 32 In the case 1 shown, the NFC card reader device 200 may first receive a polling response frame (i.e., a request response command) of the second NFC protocol sent by the NFC device, and at this time may select a physical NFC tag card of type A that supports the second NFC protocol, for example Figure 33 The illustrated case is situation 2. Therefore, the target PICC selected by the NFC card reader 200 is likely to be 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 be only 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, so it can directly interact with the NFC device using the first NFC protocol to complete the card swiping service of the NFC device. For a specific process example, see Figure 8 / Figure 20 .

[0635] Figure 32 Taking multiple NFC devices supporting the second NFC protocol as an example, in other embodiments, there may be only 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, so it can directly perform NFC signaling interaction of the second NFC protocol with the NFC device to complete the card swiping service of the NFC device.

[0636] Figure 33 This is a flowchart of another card conflict handling method provided in an embodiment of the present application.

[0637] Figure 33 The illustrated method can be applied to an NFC system including an NFC card 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 card reader 200 can be in PCD mode. The NFC device 100 can be in PICC mode. One or more NFC devices supporting the first NFC protocol can be in PICC mode. 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, the NFC device 100 is an active device that supports both the first NFC protocol and the second NFC protocol. One or more NFC devices that support the first NFC protocol are passive devices and do not support the second NFC protocol. Multiple NFC devices that support the second NFC protocol are passive devices and do not support the first NFC protocol.

[0639] The NFC card reader device 200 supports the first NFC protocol and the second NFC protocol. The NFC card reader device 200 can alternately perform polling of the first NFC protocol and polling of the second NFC protocol. For details, see Figure 32 Description of the poll in .

[0640] Figure 33 The method shown may include, but is not limited to, the following steps:

[0641] S6000: The NFC device 100 enters the radio frequency field of the NFC card reader 200, one or more 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 embodiment of the application does not limit the order in which the multiple NFC devices enter the radio frequency field of the NFC card reader 200.

[0642] S6001: The NFC card reader 200 sends a request command of the second NFC protocol to the NFC device 100, the NFC card reader 200 sends a request command of the second NFC protocol to one or more NFC devices that support the first NFC protocol, and the NFC card reader 200 sends a request command of the second NFC protocol to multiple NFC devices that support the second NFC protocol.

[0643] S6002: Multiple NFC devices supporting the second NFC protocol respectively send multiple request response commands of the second NFC protocol to the NFC card reader 200.

[0644] S6003: The NFC card reader 200 performs an anti-collision process of the second NFC protocol with multiple NFC devices supporting the second NFC protocol, wherein the NFC card reader 200 determines a 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 Figure 33 The execution is performed under the case 1 shown. Figure 33 The illustrated scenario 1 includes: after the 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 the NFC card reader 200, they first receive a request command of the second NFC protocol broadcast by the NFC card reader 200. Therefore, each of the multiple NFC devices supporting the second NFC protocol can return a request response command to the NFC card reader 200. The description of the request response command can be found in Figure 18 Although the active NFC device 100 supports the second NFC protocol, it may not return a request response command to the NFC card reader 200 if it receives a request command of the second NFC protocol first.

[0647] In some embodiments of the present application, the active NFC device 100 may be preset to prioritize the use of 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 may continue to monitor the polling instructions sent by the NFC card reader 200, for example. Figure 33 In the case 1 shown, after receiving the Probe frame of the first NFC protocol, the NFC device 100 may send a ProbeACK frame to the NFC card reader 200, for example Figure 33 Case 2 shown.

[0648] In some embodiments of the present application, the active NFC device 100 may include an NFC emulated card 1 supporting a first NFC protocol and an NFC emulated card 2 supporting a second NFC protocol. The NFC device 100 may first communicate with the NFC card reader 200 using the NFC emulated card 1 of the first NFC protocol. Therefore, after receiving the request command of the second NFC protocol, the NFC device 100 does not return a request response command, but continues to monitor the polling command sent by the NFC card reader 200, for example Figure 33In the case 1 shown, the NFC device 100 receives the Probe frame of the first NFC protocol and returns a ProbeACK frame, for example Figure 33 Case 2 shown.

[0649] For example, when the NFC device 100 does not send a request response command to the NFC card reader device 200 but continues to monitor the polling instruction sent by the NFC card reader device 200, the end time of continued monitoring can be set to the time when the next request command of the second NFC protocol sent by the NFC card reader device 200 is received. Before the end time, if the NFC device 100 receives a Probe frame of the first NFC protocol, the monitoring of the polling instruction is canceled and a ProbeACK frame is returned. If the NFC device 100 does not receive the Probe frame of the first NFC protocol, the request response command is returned when the next request command of the second NFC protocol sent by the NFC card reader device 200 is received.

[0650] Without being limited to the above embodiments, in other embodiments, the active NFC device 100 may first receive a request command of the second NFC protocol and then return a request response command to the NFC card reader 200. Then, the NFC card reader 200, the NFC device 100 and multiple NFC devices supporting the second NFC protocol may perform the anti-collision process of the second NFC protocol. The anti-collision process of the second NFC protocol and Figure 18 Similar, no further details.

[0651] Among them, S6003 and S6004 are optional steps. In some embodiments of the present application, the NFC card reader device 200 can be preset to give priority to the first NFC protocol. Therefore, after the NFC card reader device 200 receives the request response command sent by multiple NFC devices in PICC mode (supporting the second NFC protocol), it can not perform the anti-collision process of the second NFC protocol first, but continue to the next polling, that is, broadcast the Probe frame of the first NFC protocol first, and S6003-S6004 are not executed at this time. In other embodiments of the present application, after the NFC card reader device 200 receives the request response command sent by multiple NFC devices in PICC mode (supporting the second NFC protocol), it is determined that there is a card conflict, and the anti-collision process of the second NFC protocol can be performed. The anti-collision process and Figure 19 After the anti-collision process of the second NFC protocol, the NFC card reader device 200 can determine the second target NFC device from multiple NFC devices that support the second NFC protocol, and perform NFC signaling interaction with the second target NFC device to complete the card swiping service of the second target NFC device. Figure 19 Similar to the S712.

[0652] S6005: The NFC device 100 enters the radio frequency field of the NFC card reader 200, one or more 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 embodiment of the application does not limit the order in which the multiple NFC devices enter the radio frequency field of the NFC card reader 200.

[0653] S6006: The NFC card reader 200 sends a probe frame of the first NFC protocol to the NFC device 100, the NFC card reader 200 sends a probe frame of the first NFC protocol to one or more NFC devices that support the first NFC protocol, and the NFC card reader 200 sends a probe frame of the first NFC protocol to multiple NFC devices that support the second NFC protocol.

[0654] S6007: The NFC device 100 sends a Probe ACK frame of the first NFC protocol to the NFC card reader 200.

[0655] S6008: One or more NFC devices supporting the first NFC protocol respectively send one or more Probe ACK frames of the first NFC protocol to the NFC card reader 200.

[0656] S6009: The NFC card reader 200 performs an anti-collision process of the first NFC protocol with the NFC device 100 and one or more NFC devices supporting the first NFC protocol, wherein the NFC card reader 200 determines a 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 service of the NFC device 100.

[0658] Among them, S6005-S6010 can be Figure 33 The execution is performed under the case 2 shown. Figure 33 The illustrated scenario 2 includes: after the NFC device 100, one or more NFC devices supporting the first NFC protocol, and multiple NFC devices supporting the second NFC protocol enter the RF field of the NFC card reader 200, they first receive a Probe frame of the first NFC protocol broadcast by the NFC card reader 200. Therefore, each of the one or more NFC devices supporting the first NFC protocol can return a Probe ACK frame to the NFC card reader 200. For a description of the Probe ACK frame, see Figure 20 Based on the above description of the active NFC device 100, the active NFC device 100 can return a Probe ACK frame to the NFC card reader 200 after receiving the Probe frame of the first NFC protocol. The NFC card reader 200 receives Probe ACK frames sent by multiple NFC devices in PICC mode (supporting the first NFC protocol). If there is a card conflict, the anti-collision process of the first NFC protocol can be performed. Figure 11 / Figure 25 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 that support the first NFC protocol, and perform NFC signaling interaction with the NFC device 100 to complete the NFC simulated card swiping service in the NFC device 100. Figure 20 Similar to the 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 that supports the first NFC protocol, and a PICC of type A that supports the second NFC protocol. The NFC device 100 is a mobile phone, and the mobile phone may include one or more NFC emulated cards, including an NFC emulated card of type A that supports the first NFC protocol, and an NFC emulated card of type A that supports the second NFC protocol. One or more NFC devices that support the first NFC protocol include a physical NFC tag card of type A that supports the first NFC protocol. Multiple NFC devices that support the second NFC protocol include a physical NFC tag card of type A that supports the second NFC protocol. The timing of the entry of the NFC device is uncertain. The NFC card reader 200 may first receive the polling response frame (i.e., the request response command) of the second NFC protocol sent by the NFC device. At this time, the physical NFC tag card of type A that supports the ...

Claims

1. A card conflict handling method, characterized in that: Applied to a first near field communication (NFC) device, the method includes: sending a probe frame, wherein the probe frame indicates that the first NFC device supports a first NFC protocol; receiving a first detection confirmation frame sent by a second NFC device, where the first detection confirmation frame indicates that the second NFC device supports the first NFC protocol; receiving a second detection confirmation frame sent by a third NFC device, where the second detection confirmation frame indicates that the third NFC device supports the first NFC protocol; Send conflict frame; receiving a first conflict confirmation frame sent by the second NFC device, where the first conflict confirmation frame includes card identification information of the second NFC device; receiving a second conflict confirmation frame sent by the third NFC device, where the second conflict confirmation frame includes card identification information of the third NFC device; According to the card identification information of the second NFC device and the card identification information of the third NFC device, it is determined that the second NFC device is a target NFC device from among the second NFC device and the third NFC device.

2. The method according to claim 1, characterized in that The method further comprises: Sending a selection frame, where the selection frame includes card identification information of the second NFC device; Receive a selection confirmation frame sent by the second NFC device.

3. The method according to claim 1 or 2, characterized in that The method further comprises: Sending a notification frame, where the notification frame includes device feature information of the first NFC device; Receive a notification confirmation frame sent by the second NFC device.

4. The method according to any one of claims 1 to 3, characterized in that The card identification information of the second NFC device includes a card type identifier and a card random number, and 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, and the card type identifier of the third NFC device indicates the device type of the third NFC device.

5. The method according to claim 4, characterized in that The determining, based on the card identification information of the second NFC device and the card identification information of the third NFC device, that the second NFC device is the target NFC device from among the second NFC device and 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 a target NFC device from among the second NFC device and the third NFC device.

6. The method according to claim 4, characterized in that The determining, based on the card identification information of the second NFC device and the card identification information of the third NFC device, that the second NFC device is the target NFC device from among the second NFC device and 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 among the second NFC device and the third NFC device.

7. The method according to any one of claims 1 to 6, characterized in that The first detection confirmation frame includes a first anti-collision random number, the second detection confirmation frame includes a second anti-collision random number, and the first anti-collision random number and the second anti-collision random number are different.

8. The method according to any one of claims 1 to 7, characterized in that The collision frame includes a waiting time slot, where the waiting time slot is a number S of time slots included in a first time period preset by the first NFC device, the first time period being a time period during which the first NFC device receives the collision confirmation frame, and S is a positive integer.

9. The method according to claim 8, characterized in that The first collision confirmation frame and the second collision confirmation frame are received in different time slots among the S time slots in the first time period.

10. The method according to any one of claims 1 to 9, characterized in that The method further comprises: Performing a first communication with the second NFC device, where the first communication is used to perform a card swiping service of the second NFC device.

11. The method according to any one of claims 1 to 10, characterized in that Before sending the detection frame, the method further includes: A request command of a second NFC protocol is sent, where the second NFC protocol is the contactless card standard ISO14443 protocol or IEC14443 protocol.

12. The method according to claim 10, characterized in that The second NFC device is a passive device that supports the first NFC protocol and does not support the second NFC protocol, the second NFC protocol is the contactless card standard ISO14443 protocol or IEC14443 protocol, and the method further includes: When the second NFC device is not the NFC device required by the first NFC device, it is determined based on the first communication that the card swiping service of the third NFC device fails to be executed.

13. The method according to claim 12, characterized in that The method further comprises: Sending a request command of the second NFC protocol; receiving a request response command of the second NFC protocol sent by a fourth NFC device; Perform a second communication using the second NFC protocol with the fourth NFC device, where the second communication is used to execute a card swiping service of the fourth NFC device.

14. The method according to claim 10, characterized in that The second NFC device is an active device that supports the first NFC protocol and the second NFC protocol, 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 the NFC emulated card supporting the first NFC protocol required by the first NFC device, it is determined based on the first communication that the card swiping service of the second NFC device fails to be executed.

15. The method according to claim 14, characterized in that The method further comprises: Sending a request command of the second NFC protocol; receiving a request response command of the second NFC protocol sent by a fifth NFC device and a sixth NFC device; Determining, from the fifth NFC device and the sixth NFC device, that the fifth NFC device is a target NFC device; Perform a third communication using the second NFC protocol with the fifth NFC device, where the third communication is used to execute a card swiping service of the fifth NFC device.

16. A card conflict handling method, characterized in that: Applied to a second NFC device, the method includes: receiving a collision frame sent by a first NFC device; A conflict confirmation frame is sent to the first NFC device, where the conflict confirmation frame includes the card identification information of the second NFC device, where the card identification information of the second NFC device is used to assist the first NFC device in determining a target NFC device.

17. The method according to claim 16, characterized in that The method further comprises: When the target NFC device is the second NFC device, according to the selection frame sent by the first NFC device, the selection frame includes the card identification information of the second NFC device; A selection confirmation frame is sent to the first NFC device.

18. The method according to claim 16 or 17, characterized in that The method further comprises: When the target NFC device is the second NFC device, receiving a notification frame sent by the first NFC device, the notification frame including device feature information of the first NFC device; A notification confirmation frame is sent to the first NFC device.

19. The method according to any one of claims 16 to 18, characterized in that Before receiving the collision frame sent by the first NFC device, the method further includes: receiving a detection frame sent by the first NFC device, where the detection frame indicates that the first NFC device supports the first NFC protocol; A probe confirmation frame is sent to the first NFC device, where the probe confirmation frame indicates that the second NFC device supports the first NFC protocol.

20. The method according to any one of claims 16 to 18, characterized in that The second NFC device is an active device that supports the first NFC protocol and the second NFC protocol, and the second NFC protocol is the contactless card standard ISO14443 protocol or IEC14443 protocol. Before receiving the collision frame sent by the first NFC device, the method further includes: receiving a request command of the second NFC protocol sent by the first NFC device; receiving a detection frame of the first NFC protocol sent by the first NFC device, where the detection frame indicates that the first NFC device supports the first NFC protocol; A detection confirmation frame of the first NFC protocol is sent to the first NFC device, where the detection confirmation frame indicates that the second NFC device supports the first NFC protocol.

21. The method according to any one of claims 16 to 20, characterized in that The method further comprises: When the target NFC device is the second NFC device, a first communication is performed with the first NFC device, where the first communication is used to perform a card swiping service of the second NFC device.

22. The method according to claim 21, characterized in that The second NFC device is an active device that supports the first NFC protocol and the second NFC protocol, 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 the NFC emulated card supporting the first NFC protocol required by the first NFC device, it is determined based on the first communication that the card swiping service of the second NFC device fails to be executed.

23. The method according to claim 22, characterized in that The method further comprises: receiving a request command of the second NFC protocol sent by the first NFC device; Sending a request response command of the second NFC protocol to the first NFC device; When the NFC device selected by the first NFC device is the second NFC device, the first NFC device performs a second communication with the first NFC device, where the second communication is used to perform a card swiping service of the second NFC device.

24. A communication device, characterized in that: The method comprises a transceiver, a processor and a memory, wherein the memory is used to store a computer program, and the processor calls the computer program to execute the method according to any one of claims 1 to 15.

25. A communication device, characterized in that: The method comprises a transceiver, a processor and a memory, wherein the memory is used to store a computer program, and the processor calls the computer program to execute the method according to any one of claims 16 to 23.

26. A computer storage medium, characterized in that The computer storage medium stores a computer program, and when the computer program is executed by a processor, it is used to implement the method according to any one of claims 1 to 15.

27. A computer storage medium, characterized in that The computer storage medium stores a computer program, and when the computer program is executed by a processor, it is used to implement the method according to any one of claims 16 to 23.

28. A computer program product, characterized in that When the computer program product is run on a processor, it is used to implement the method according to any one of claims 1 to 15.

29. A computer program product, characterized in that When the computer program product is run on a processor, it is used to implement the method according to any one of claims 16 to 23.

30. A chip system, characterized in that: The system comprises a processing circuit and an interface circuit, wherein the interface circuit is used to receive code instructions and transmit the code instructions to the processing circuit, and the processing circuit is used to run the code instructions to execute the method according to any one of claims 1 to 15.

31. A chip system, characterized in that: The system comprises a processing circuit and an interface circuit, wherein the interface circuit is used to receive code instructions and transmit the code instructions to the processing circuit, and the processing circuit is used to run the code instructions to execute the method according to any one of claims 16 to 23.

Citation Information

Patent Citations

  • Anti-collision method and device for recognizing non-contact type IC card

    CN101082954A

  • Non-contact type card and working method

    CN106326797A

  • Non-contact communication anti-collision method, radio frequency identification card and card reader

    CN114742084A

  • Anti-collision coupling for contactless cards

    US20060144943A1

  • NFC controller architecture for emulation of multiple NFC-a devices

    WO2014067547A1

Cited By

  • Method, system and device for solving AID conflict of HCE card and medium

    CN121463019A