Method for enhancing multi-card conflict detection on NFC card reader
The method enhances NFC reader conflict detection by integrating real-time load monitoring with protocol-based detection to address multiple card conflicts, improving reliability and consistency.
Patent Information
- Application Number
- CN202510482854.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-17
- Publication Date
- 2025-07-15
AI Technical Summary
When multiple cards are approaching at the same time, existing NFC card readers cannot effectively identify multiple card conflicts, resulting in misreading or misreading, degraded user experience and potential security risks.
In the card detection process of the NFC card reader, the load value in the card reader's electric field is monitored in real time, the load threshold is dynamically set, and the anti-collision mechanism of the ISO/IEC 14443-3 protocol is combined to realize the detection of multiple card conflicts.
It significantly improves the success rate of multi-card conflict detection, avoids the complexity and instability of hardware debugging, and improves the stability and consistency of detection.
Smart Images

Figure CN120317263A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of NFC (Near Field Communication), and particularly to a method for enhancing the detection of multi-card conflicts on an NFC card reader. Background Art
[0002] With the wide application of Near Field Communication (NFC) technology, NFC card readers play an important interaction function in scenarios such as transportation, payment, and access control. However, when multiple NFC cards or tags approach the card reader simultaneously (for example, when a user accidentally stacks a bank card and a transportation card on a subway turnstile), the card reader may misread or miss reading due to its inability to effectively identify multi-card conflicts. For example, the card reader may incorrectly read a non-target card (such as a bank card instead of a transportation card), or completely ignore the conflict and directly enter the single-card operation process, resulting in a decline in user experience and potential safety hazards.
[0003] The existing technology mainly relies on the anti-collision mechanism of the NFC protocol layer (such as the ISO / IEC 14443-3 protocol) to judge multi-cards. This mechanism is achieved by detecting the conflict signal in the card response stage. However, in actual applications, due to the overlapping of card response timings or signal attenuation, some conflict scenarios may be missed. Especially when the interference of multi-card loads on the electromagnetic field is not effectively quantified, the reliability of the protocol layer detection is further reduced. Summary of the Invention
[0004] The present invention provides a method for detecting multi-card conflicts that is decoupled from hardware and does not require repeated debugging. By optimizing the card reading process, the stability and consistency of detection are improved, and at the same time, it forms a complement to the existing protocol layer mechanism, thereby significantly increasing the comprehensive success rate of multi-card conflict recognition.
[0005] The technical solution adopted by the present invention is: a method for enhancing the detection of multi-card conflicts on an NFC card reader, including the following steps:
[0006] Step 1: In the card detection process of the NFC card reader, insert a load detection instruction before each card detection instruction is sent to monitor the load value in the electric field of the card reader in real time;
[0007] Step 2: Record the current load value obtained by the load detection instruction and compare it with a preset load threshold;
[0008] Step 3: If the current load value exceeds the load threshold, it is determined that there is a multi-card conflict, and an alarm is directly triggered and the subsequent card reading operation is terminated;
[0009] Step 4: If the current load value does not exceed the load threshold, continue to execute the card detection instruction and perform multi-card detection according to the NFC protocol;
[0010] Step 5: If multi-card conflict is detected through the NFC protocol in Step 4, trigger the alarm again;
[0011] Among them, the load threshold is dynamically set according to the load range during normal card reading of a single card.
[0012] As a further improvement of the present invention, the load detection instruction in Step 1 is implemented by reading the impedance change in the electric field of the card reader, specifically including: monitoring the resonance frequency offset and energy absorption change of the card reader antenna, and converting them into corresponding load values.
[0013] As a further improvement of the present invention, the dynamic setting of the load threshold includes the following steps:
[0014] S1: Record the reference load value when no card is present and the reader is in an idle state;
[0015] S2: Record the maximum load value when a single card is being read normally;
[0016] S3: Set the load threshold to 1.2 to 1.5 times the maximum load value.
[0017] As a further improvement of the present invention, the specific method for multi-card detection through the NFC protocol in Step 5 is: during the card response stage, detect whether there are collision response signals from multiple cards, and make a judgment based on the anti-collision mechanism in the ISO / IEC 14443-3 protocol.
[0018] As a further improvement of the present invention, after the alarm is triggered in Step 3, the card reader automatically enters the sleep mode and restarts the card detection process after a preset time.
[0019] As a further improvement of the present invention, the execution frequency of the load detection instruction is 1 / 3 to 1 / 2 of the card detection instruction cycle to ensure that the load detection does not affect the normal communication timing.
[0020] An NFC card reader consists of a load detection module, a comparison module, and a control module.
[0021] The load detection module is used to perform load detection before each card detection instruction is sent and output the current load value; the comparison module is used to compare the current load value with the preset load threshold; the control module is used to control the triggering of the alarm and the termination and continuation of the card reading process according to the comparison result.
[0022] The load detection module, comparison module, and control module work together through an embedded program to implement the above method.
[0023] As a further improvement of the present invention, the load detection module is integrated inside the NFC driver chip, and the load value is calculated by collecting the voltage and current signals at the antenna end in real time.
[0024] Advantages of the present invention: Through the dual collaborative mechanism of load detection and protocol detection, the present invention significantly improves the detection success rate of multi-card conflicts without relying on hardware adjustment. Specifically, by monitoring the electric field load value in real time and dynamically setting the threshold, it can quickly identify the multi-card overlap scenario at the early stage of the card detection process, and form a redundant judgment in combination with the anti-collision mechanism of the NFC protocol layer. This not only avoids the complexity and instability of hardware debugging, but also makes up for the missed detection defect of single protocol detection, and finally realizes high-robustness and high-consistency multi-card conflict detection in multiple scenarios. Description of the Drawings
[0025] Figure 1 is a flowchart of a method for enhancing multi-card conflict detection on an NFC card reader according to the present invention. Detailed Embodiments
[0026] In order to make the technical problems, technical solutions and beneficial effects to be solved by the present application clearer, the present application will be further described in detail below with reference to the drawings and embodiments. It should be understood that the embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0027] The present invention provides a method for enhancing multi-card conflict detection on an NFC card reader, including the following steps:
[0028] Step 1: In the card detection process of the NFC card reader, insert a load detection instruction before each card detection instruction is sent, and monitor the load value in the electric field of the card reader in real time;
[0029] Step 2: Record the current load value obtained by the load detection instruction and compare it with a preset load threshold;
[0030] Step 3: If the current load value exceeds the load threshold, it is determined that there is a multi-card conflict, and an alarm is directly triggered and the subsequent card reading operation is terminated;
[0031] Step 4: If the current load value does not exceed the load threshold, continue to execute the card detection instruction and perform multi-card detection according to the NFC protocol;
[0032] Step 5: If a multi-card conflict is detected through the NFC protocol in Step 4, an alarm is triggered again;
[0033] Among them, the load threshold is dynamically set according to the load range during normal card reading of a single card.
[0034] The load detection instruction in step 1 of the present invention is implemented by reading the impedance change in the electric field of the card reader, specifically including: monitoring the resonant frequency offset and energy absorption change of the card reader antenna, and converting them into corresponding load values.
[0035] The dynamic setting of the load threshold in the present invention includes the following steps: (1) recording the reference load value when no-load in the card-free state; (2) recording the maximum load value when a single card is read normally; (3) setting the load threshold to 1.2 to 1.5 times the maximum load value.
[0036] The specific method of performing multi-card detection through the NFC protocol in step five of the present invention is: in the card response phase, detecting whether there are conflicting response signals from multiple cards, and making a judgment based on the anti-collision mechanism in the ISO / IEC 14443-3 protocol.
[0037] After the alarm is triggered in step three of the present invention, the card reader automatically enters a sleep mode and restarts the card checking process after a preset time.
[0038] The execution frequency of the load detection instruction in the present invention is 1 / 3 to 1 / 2 of the card detection instruction cycle to ensure that the load detection does not affect the normal communication timing.
[0039] An NFC card reader is composed of a load detection module, a comparison module, and a control module. The load detection module is used to perform load detection and output the current load value before sending a card inspection instruction each time; the comparison module is used to compare the current load value with a preset load threshold; and the control module is used to control the alarm triggering and the termination and continuation of the card reading process according to the comparison result. The load detection module, the comparison module, and the control module work together through an embedded program to implement the above method.
[0040] The load detection module in the present invention is integrated into the NFC driver chip, and the load value is calculated by collecting the voltage and current signals of the antenna end in real time.
[0041] Example:
[0042] The following describes the specific implementation process of the method of the present invention in detail in combination with the application scenario of the subway gate. In this embodiment, the NFC card reader uses the STM32F4 series microcontroller as the main control unit, integrates the NXP PN5180 NFC driver chip, and the antenna is designed as a 13.56MHz standard loop antenna, supporting the ISO / IEC 14443-3 protocol. The system schedules tasks through an embedded real-time operating system to ensure the accuracy of timing control.
[0043] Step 1 (Device initialization and load threshold dynamic calibration)
[0044] Obtaining the no-load reference value: After the device starts up, the control module controls the card reader to enter the no-load state (no card approaching). The load detection module continuously collects the electric field load values multiple times, and obtains the reference load value by removing outliers and taking the average. For example, the reference load value measured in the laboratory environment is 18 mV (the specific value may vary slightly due to hardware differences).
[0045] Calibrating the maximum load value for a single card: The user places a single standard-compliant transportation card (such as the Shanghai Public Transportation Card) within the effective area of the card reader (0 - 5 cm from the antenna surface). The load detection module monitors the load changes during the card reading process in real time and records the maximum load value. For example, the maximum load value for a single card is measured to be 92 mV.
[0046] Dynamically setting the load threshold: The control module sets the threshold within the range of 1.2 to 1.5 times the maximum load value for a single card. For example, the threshold is set to 119 mV and stored in the non-volatile memory. This threshold can be automatically calibrated periodically to adapt to environmental changes or hardware aging.
[0047] Step 2 (Multi-card conflict detection process)
[0048] Inserting and executing the load detection instruction: Before each card detection instruction is sent (with a period of 120 ms), the control module inserts a load detection instruction, and the execution frequency is 1 / 2 of the card detection period (i.e., at 60 ms intervals). The load detection module collects the voltage and current signals at the antenna end in real time, and converts the signal changes into the current load value through analysis. For example, the current load value is measured to be 102 mV.
[0049] Comparing the load threshold and determining conflicts: The comparison module compares the current load value with the preset threshold. If the load value does not exceed the threshold (e.g., 102 mV < 119 mV), it is determined to be a single-card scenario, and the card detection instruction continues to be executed; if it exceeds the threshold (e.g., 135 mV > 119 mV), an alarm is immediately triggered and the card reading process is terminated.
[0050] Redundancy detection at the protocol layer: During the card response stage, the card reader detects whether there are conflict response signals from multiple cards. For example, two different card identifiers (UID1 and UID2) are detected. According to the ISO / IEC 14443-3 anti-collision mechanism, the card with the higher priority is selected for interaction, and a secondary alarm is triggered to prompt "multi-card conflict".
[0051] Handling abnormal scenarios: (1) Load exceeding the threshold: If it is detected that the load value significantly exceeds the threshold (such as when two bank cards are stacked), the control module triggers an audible and visual alarm (the buzzer sounds and the red light flashes), and forces the card reader to enter the sleep mode and automatically restart after 10 seconds. (2) Load fluctuation interference: In an environment with strong electromagnetic interference, the load detection module filters out transient interference signals by taking the average of multiple samples to ensure the detection stability.
[0052] Step 3 (Hardware Collaboration and Module Integration)
[0053] (1) Load Detection Module: Integrated inside the NFC driver chip, it determines load changes by collecting voltage and current signals at the antenna end in real time. The module has a built-in temperature compensation function to reduce the impact of ambient temperature on the detection results.
[0054] (2) Comparison Module: The microcontroller is used to achieve high-speed numerical comparison, supporting dynamic threshold update.
[0055] (3) Control Module: Based on the task priority scheduling mechanism, it gives priority to processing load detection tasks to ensure real-time performance.
[0056] Effect Verification and Comparative Testing
[0057] Multiple groups of tests were carried out in the laboratory simulation environment:
[0058] (1) Dual Card Superposition (Transportation Card + Bank Card): In 99 out of 100 tests of the method of the present invention, the alarm was successfully triggered, and the detection success rate reached 99%; only 83 times were successfully detected by the traditional protocol, with 17 missed detections.
[0059] (2) Triple Card Superposition (Two Transportation Cards + Access Control Card): The method of the present invention directly determines conflicts in load detection, with a success rate of 100%; due to the complex response of the protocol layer in the traditional method, the success rate drops to 67%.
[0060] (3) Edge Scenario (Single Card Slightly Tilted): When the load value is close to the threshold, the protocol layer detects and successfully makes up the judgment without false alarms.
[0061] As can be seen from the above embodiments, the method of the present invention realizes efficient detection of multi-card conflicts on the NFC card reader through deep collaboration between hardware and software. At the hardware level, the load detection module is integrated inside the NFC driver chip, collecting voltage and current signals at the antenna end in real time, accurately judging load changes, and having a built-in temperature compensation function, effectively reducing the impact of ambient temperature on the detection results. At the software level, the comparison module uses the microcontroller to achieve high-speed numerical comparison, supporting dynamic threshold update to ensure detection accuracy; the control module is based on the task priority scheduling mechanism, giving priority to processing load detection tasks, further improving the real-time performance of detection.
[0062] In the effect verification and comparative testing, the method of the present invention performs excellently in complex situations such as multi-card superposition, triple card superposition, and edge scenarios, and the detection success rate is much higher than that of the traditional protocol detection method. This fully proves the effectiveness and reliability of the method of the present invention, providing a new solution for multi-card conflict detection on NFC card readers.
[0063] In summary, a method for enhancing the detection of multi-card conflicts on an NFC card reader according to the present invention realizes the efficient and accurate identification of multi-card conflicts by combining load detection at the hardware level and protocol detection at the software level. This method not only improves the detection success rate but also reduces the complexity and instability of hardware debugging, providing a strong guarantee for the stable operation of the NFC card reader in multi-card application scenarios. In addition, the implementation manner of the present invention is flexible and can be applied to different types of NFC card readers and cards, having strong versatility and practicability. In the future, with the continuous development and popularization of NFC technology, the method of the present invention is expected to be widely applied in more fields, further improving the user experience and system efficiency.
[0064] The above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments or perform equivalent replacements for some of the technical features. These modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for enhancing the detection of multi-card conflicts on an NFC card reader, characterized in that, It includes the following steps: Step 1: In the card detection process of the NFC reader, insert a load detection instruction before each card detection instruction is sent to monitor the load value in the reader's electric field in real time; Step 2: Record the current load value obtained by the load detection instruction and compare it with a preset load threshold; Step 3: If the current load value exceeds the load threshold, it is determined that there is a multi-card conflict, and an alarm is directly triggered and the subsequent card reading operation is terminated; Step 4: If the current load value does not exceed the load threshold, continue to execute the card detection instruction and perform multi-card detection according to the NFC protocol; Step 5: If a multi-card conflict is detected through the NFC protocol in Step 4, an alarm is triggered again; Among them, the load threshold is dynamically set according to the load range during normal single-card reading.
2. The method for enhancing the detection of multi-card conflicts on an NFC card reader according to claim 1, wherein The load detection instruction in Step 1 is realized by reading the impedance change in the reader's electric field, specifically including: monitoring the resonance frequency offset and energy absorption change amount of the reader antenna and converting them into corresponding load values.
3. A method for enhancing the detection of multi-card conflicts on an NFC card reader according to claim 1, characterized in that, The dynamic setting of the load threshold includes the following steps: S1: Record the reference load value when it is no-load in the no-card state; S2: Record the maximum load value during normal single-card reading; S3: Set the load threshold to 1.2 to 1.5 times the maximum load value.
4. The method for enhancing the detection of multi-card conflicts on an NFC card reader according to claim 1, characterized in that The specific method for multi-card detection through the NFC protocol in Step 5 is: in the card response stage, detect whether there are conflict response signals of multiple cards and make a judgment based on the anti-collision mechanism in the ISO / IEC 14443-3 protocol.
5. A method for enhancing the detection of multi-card conflicts on an NFC card reader according to claim 1, characterized in that, After the alarm is triggered in Step 3, the reader automatically enters the sleep mode and restarts the card detection process after a preset time.
6. The method for enhancing the detection of multi-card conflict on an NFC card reader according to claim 1, wherein, The execution frequency of the load detection instruction is 1 / 3 to 1 / 2 of the card detection instruction cycle to ensure that the load detection does not affect the normal communication timing.
7. An NFC card reader, characterized in that, It consists of a load detection module, a comparison module, and a control module. The load detection module is used to execute load detection before each card detection instruction is sent and output the current load value; the comparison module is used to compare the current load value with a preset load threshold; the control module is used to control the alarm trigger and the termination and continuation of the card reading process according to the comparison result. The load detection module, comparison module, and control module work together through an embedded program to implement the method described in any one of claims 1 to 6.
8. An NFC card reader according to claim 7, characterized in that, The load detection module is integrated inside the NFC driver chip, and the load value is calculated by collecting the voltage and current signals at the antenna end in real time.