A method, apparatus, device, medium and product of near field communication

By enabling NFC tag devices to proactively enter a silent state when they detect a card detection signal from a card reader, the problem of card readers failing to fully acquire tag information is solved, thus improving the success rate of near-field communication and user experience.

CN121436008BActive Publication Date: 2026-05-19ALIPAY (HANGZHOU) INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ALIPAY (HANGZHOU) INFORMATION TECH CO LTD
Filing Date
2025-12-30
Publication Date
2026-05-19

AI Technical Summary

Technical Problem

In existing technologies, when a card reader fails to fully acquire NFC tag information, it mistakenly assumes that it has acquired all the information and enters a card presence detection state, leading to near-field communication failure and affecting transaction success rate and user experience.

Method used

If an NFC tag device detects a card detection signal from a card reader before the tag information has been completely read, it will actively enter a silent state and stop responding to the card reader's communication commands, so as to prompt the card reader device to re-enter the polling card detection state and conduct the next communication.

Benefits of technology

It improves the success rate of near-field communication, avoids prolonged invalid communication, and enhances the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121436008B_ABST
    Figure CN121436008B_ABST
Patent Text Reader

Abstract

Embodiments of the present specification provide a near field communication method, device, equipment, medium and product. The method comprises: an NFC tag device acquires a near field communication trigger signal sent by a card reader device; based on the near field communication trigger signal, the NFC tag device sends NFC tag information to the card reader device; if a card presence detection signal sent by the card reader device is acquired before the NFC tag information is read, the NFC tag device switches to a silent state; the NFC tag device does not respond to the near field communication instruction sent by the card reader device when the NFC tag device is in the silent state, so that the card reader device reenters a polling card state.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This specification relates to one or more embodiments in the field of near-field communication (NFC) technology, and particularly to a method for NFC communication. This specification also relates to an NFC tag device, a NFC communication apparatus, a computing device, a computer-readable storage medium, and a computer program product. Background Technology

[0002] With the continuous development of computer technology, Near Field Communication (NFC) technology has been widely applied in various scenarios due to its convenience, security, and broad device compatibility. These include payment scenarios, access control scenarios, and turnstile scenarios. In everyday consumption environments such as retail stores, public transportation, vending machines, and restaurants, users can use NFC-enabled smartphones, smartwatches, or other wearable devices to perform fast, contactless payment transactions.

[0003] At the same time, users have raised higher demands for the stability of the payment process and the success rate of transactions. In these scenarios, a successful NFC interaction is not only crucial for the smooth completion of a single transaction, but may also affect overall traffic efficiency, queue length, and user satisfaction.

[0004] Therefore, improving the success rate of near-field communication is a technical problem that urgently needs to be solved. Summary of the Invention

[0005] In view of the above, one or more embodiments of this specification provide a method, apparatus, device, medium, and product for near-field communication to improve the success rate of near-field communication.

[0006] According to a first aspect of one or more embodiments of this specification, a near-field communication method is provided, applied to an NFC tag device, comprising:

[0007] The NFC tag device acquires the near-field communication trigger signal sent by the card reader device;

[0008] Based on the near-field communication trigger signal, NFC tag information is sent to the card reader device;

[0009] If a card presence detection signal is obtained from the card reader device before the NFC tag information is fully read, the device switches to a silent state. When the NFC tag device is in a silent state, it does not respond to the near-field communication commands issued by the card reader device, so that the card reader device can re-enter the polling card detection state.

[0010] According to a second aspect of one or more embodiments of this specification, an NFC tag device is provided, including a control module and an NFC tag module; the control module is communicatively connected to the NFC tag module.

[0011] The NFC tag module is used to send NFC tag information to the card reader device based on the near-field communication trigger signal emitted by the card reader device;

[0012] The control module is used to switch the NFC tag device to a silent state if it receives a card presence detection signal from the card reader device before the tag information is read completely; when the NFC tag device is in a silent state, it does not respond to the commands issued by the card reader device so that the card reader device can re-enter the tag polling and card detection state.

[0013] According to a third aspect of one or more embodiments of this specification, a near-field communication apparatus is provided, comprising:

[0014] The signal acquisition module is used to acquire the near-field communication trigger signal emitted by the card reader device;

[0015] The information sending module is used to send NFC tag information to the card reader device based on the near-field communication trigger signal;

[0016] The state switching module is used to switch to a silent state if a card presence detection signal issued by the card reader device is obtained before the NFC tag information is read completely; when the device is in the silent state, it does not respond to the near-field communication command issued by the card reader device so that the card reader device can re-enter the polling card detection state.

[0017] According to a fourth aspect of one or more embodiments of this specification, a computing device is provided, including a memory, a processor, and computer instructions stored in the memory and executable on the processor, wherein the processor, when executing the computer instructions, implements the steps of the above-described near-field communication method.

[0018] According to a fifth aspect of one or more embodiments of this specification, a computer-readable storage medium is provided that stores computer instructions which, when executed by a processor, implement the steps of the near-field communication method described above.

[0019] According to a sixth aspect of the embodiments of this specification, a computer program product is provided, including a computer program / instructions that, when executed by a processor, implement the steps of the near-field communication method described above.

[0020] One embodiment of this specification can achieve at least the following beneficial effects: The NFC tag device can send NFC tag information to the card reader device via NFC based on the near-field communication trigger signal issued by the card reader device. In practical applications, due to unstable communication, interference, or other reasons, the card reader device may mistakenly believe that it has obtained all the tag information when it has only obtained part of the NFC tag information and enters the card presence detection stage, issuing a card presence detection signal. In this case, the card reader device cannot obtain the complete NFC tag information and cannot successfully complete the near-field communication service. Before the NFC tag information is fully read, if the NFC tag device receives a card presence detection signal from the card reader device, it can proactively enter a silent state and stop responding to near-field communication commands from the card reader device. For example, it can stop responding to the card presence detection signal from the card reader device. This allows the card reader device to quickly end local communication and re-enter the polling card detection state for the next communication. This promotes the card reader device to obtain complete NFC tag information in the next communication, rather than remaining in the card presence detection stage for a long time without obtaining complete tag information, which could prevent successful near-field communication. The method in one embodiment of this specification, where the NFC tag device proactively enters a silent state to facilitate the card reader device entering a new round of near-field communication interaction, can improve the success rate of near-field communication and avoid users keeping the card reader device close to the NFC tag device for extended periods, thus improving the user experience. Attached Figure Description

[0021] To more clearly illustrate the technical solutions in the embodiments or prior art of this specification, the drawings used in the description of the embodiments or prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this specification. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0022] Figure 1 This is a schematic diagram illustrating an application scenario of a near-field communication method provided in one embodiment of this specification.

[0023] Figure 2 A flowchart illustrating a near-field communication method provided in one embodiment of this specification;

[0024] Figure 3 A flowchart illustrating a near-field communication method provided in one embodiment of this specification;

[0025] Figure 4 This is a schematic diagram of the structure of an NFC tag device provided in one embodiment of this specification;

[0026] Figure 5 A schematic diagram of a near-field communication device provided in one embodiment of this specification;

[0027] Figure 6 This is a structural block diagram of a computing device provided for one embodiment of this specification. Detailed Implementation

[0028] To enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this specification, and not all embodiments. Based on the embodiments in this specification, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this specification.

[0029] This specification uses specific terms to describe embodiments thereof. Terms such as "an embodiment," "one embodiment," and / or "some embodiments" refer to a particular feature, structure, or characteristic associated with at least one embodiment of this specification. Therefore, it should be emphasized and noted that references to "an embodiment," "one embodiment," or "an alternative embodiment" in different locations throughout this specification do not necessarily refer to the same embodiment. Furthermore, those skilled in the art can combine and integrate the different embodiments or examples described herein, as well as the features of those different embodiments or examples, without contradiction.

[0030] The terminology used in one or more embodiments of this specification is for the purpose of describing particular embodiments only and is not intended to be limiting of the one or more embodiments of this specification. The singular forms “a,” “an,” “an,” “the,” and “the” as used in one or more embodiments of this specification and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in one or more embodiments of this specification includes any or all possible combinations of one or more associated listed items.

[0031] The terms “comprising,” “including,” or any other variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, product, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, product, or apparatus. Without further limitation, the presence of additional identical or equivalent elements in the process, method, product, or apparatus that includes said elements is not excluded.

[0032] Although the terms "first," "second," etc., may be used to describe various information in one or more embodiments of this specification, this information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, "first" may also be referred to as "second," and similarly, "second" may also be referred to as "first," without departing from the scope of one or more embodiments of this specification. Ordinal numbers such as "first," "second," etc., do not necessarily indicate order; often they are used to facilitate the distinction of objects. For example, "first server" and "second server" usually refer to two servers. To distinguish these two servers, they are described as "first server" and "second server." Of course, sometimes these two servers may be the same server.

[0033] Depending on the context, the word "if" as used here can be interpreted as "when," "when," or "in response to determination."

[0034] In this specification, unless explicitly stated otherwise, "receiving and sending data" does not necessarily mean direct receiving and sending; it can also mean indirect receiving and sending. For example, A receiving data sent by B can be understood as A directly receiving the data sent by B, or it can be understood as A indirectly receiving the data sent by B through other entities such as C. Similarly, B sending data to A can be understood as B sending the data directly to A, or it can be understood as B indirectly sending the data to A through other entities such as C. Here, C can be one entity, or it can be two or more entities.

[0035] In this specification, unless explicitly stated otherwise, the relationships between structures can be direct or indirect. For example, when describing "A is connected to B," unless it is explicitly stated that A and B are directly connected, it should be understood that A can be directly connected to B or indirectly connected to B. Similarly, when describing "A is on top of B," unless it is explicitly stated that A is directly above B (AB is adjacent and A is above B), it should be understood that A can be directly above B or indirectly above B (AB is separated by other elements, and A is above B). And so on.

[0036] The user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in one or more embodiments of this specification are all information and data authorized by the user or fully authorized by all parties. The collection, use and processing of related data shall comply with the relevant laws, regulations and standards of the relevant regions, and corresponding operation entry points shall be provided for users to choose to authorize or refuse.

[0037] The following explains the terms and concepts used in one or more embodiments of this specification.

[0038] NFC (Near Field Communication) is a short-range wireless communication technology that typically operates within a 10cm range in the 13.56MHz frequency band. It is used in scenarios such as mobile payments, access cards, and public transport cards. In NFC, the device that actively transmits signals can be called the master device, such as an NFC card reader or a device in card reader mode, acting as the card reader end of the NFC communication process; these can also be collectively referred to as card reader devices. The device that passively responds to the signals transmitted by the master device can be called the slave device, such as an NFC tag, a device in card emulation mode, or a device with an NFC tag, acting as the tag end of the NFC communication process; these can also be called NFC tag devices, NFC card devices, etc.

[0039] In related technologies, during the interaction between a card reader device and an NFC tag device, taking the 14443 Type A protocol as an example, the card reader device first sends a radio frequency field to activate the NFC tag and sends a REQA (Request Type A) command to request a response from the NFC tag. After receiving the request command, the NFC tag replies with ATQA (Answer To Request Type A). Subsequently, the card reader device sends an anti-collision command and selects a specified tag to start data transmission via a SELECT command. Finally, after the data within the tag is read, it enters a card presence detection state until the card moves away from the effective communication distance, communication is interrupted, and the card reader device returns to the default state, ready to start the next communication. Then, when a communication anomaly occurs, such as the card reader device failing to completely read the tag content, the card reader device prematurely enters the card presence detection state. In this stage, the card reader device will poll and send ATQA commands. The NFC tag will respond normally by replying with the ATQA command, but will not continue subsequent interactions, such as no longer sending tag information. In this situation, the card reader cannot obtain complete tag information and will not terminate the communication, resulting in unsuccessful business processing, such as the inability to successfully complete a payment via near-field communication. Furthermore, because the polling cycle of the card reader is often quite long, even if the card reader is picked up and re-sensing the tag—for example, if the user quickly picks up and puts their phone down from the tag—the card reader may still be in this state, causing unsuccessful transaction processing and inconvenience to the user.

[0040] To address the shortcomings in related technologies, in the embodiments of this specification, if the NFC tag device receives a card presence detection signal from the card reader device before the NFC tag information is fully read, it can proactively enter a silent state and no longer respond to near-field communication commands issued by the card reader device. For example, it can stop responding to the card presence detection signal issued by the card reader device. This allows the card reader device to quickly end local communication and re-enter the polling card detection state for the next communication, thereby improving the success rate of near-field communication and enhancing the user experience.

[0041] The technical solutions provided in the various embodiments of this specification are described in detail below with reference to the accompanying drawings.

[0042] Figure 1 This diagram illustrates an application scenario of a near-field communication method provided in one embodiment of this specification. Figure 1 As shown, this solution may include an NFC tag device 102 and a card reader device 104. The NFC tag device 102 can act as a slave device in NFC near-field communication, and the card reader device 104 can act as a master device in NFC near-field communication. The card reader device 104 can emit radio frequency signals to trigger nearby slave devices to communicate with it. If the NFC tag device 102 is within the radio frequency field range of the card reader device 104, it can respond to the radio frequency signals emitted by the card reader device 104 and can also send NFC tag information to the card reader device 104. After obtaining the NFC tag information, the card reader device 104 can execute the corresponding business processing flow based on the tag information.

[0043] In practical applications, the card reader device 104 can be one or more of the following: smartphone, laptop, tablet, IoT device, portable wearable device, or immersive image display device. Specifically, IoT devices can be one or more of the following: smart speaker, smart TV, smart air conditioner, or smart in-vehicle device. Portable wearable devices can be one or more of the following: smartwatch, smart bracelet, or head-mounted device. Immersive image display devices include, but are not limited to, augmented reality (AR) devices and virtual reality (VR) devices.

[0044] The NFC tag device 102 can be a device with near-field communication capabilities or a device with an NFC tag. It can be a standalone electronic device or a component integrated into other devices.

[0045] For example, in a payment scenario, the card reader device 104 can be a user terminal, and the NFC tag device 102 can be a device associated with or fixed to a merchant device. Specifically, it can be an electronic device that is fixed or movable and placed at the cashier, or it can be a component located in a self-checkout device or an electronic device that is connected to the self-checkout device via wired or wireless means.

[0046] This application provides a method for near-field communication, and also relates to an NFC tag device, a near-field communication apparatus, a computing device, a computer-readable storage medium, and a computer program product, which will be described in detail in the following embodiments.

[0047] Figure 2 This is a flowchart illustrating a near-field communication method provided in one embodiment of this specification.

[0048] From a programming perspective, the entity executing this process can be a program hosted on an application server or application terminal. It can be understood that this method can be executed by any device, equipment, platform, or cluster of devices with computing and processing capabilities. From a hardware perspective, the entity executing this process can be an NFC tag device.

[0049] like Figure 2 As shown, the process may include the following steps:

[0050] Step 202: The NFC tag device acquires the near-field communication trigger signal sent by the card reader device.

[0051] Among them, NFC tag devices can refer to contactless devices that act as communication slaves, such as passive NFC tags, active NFC tags, smart cards, electronic devices in card emulation mode, and electronic devices containing passive NFC tags, active NFC tags, or smart cards, which can passively respond to the instructions of the card reader.

[0052] A card reader device can refer to a device that acts as the communication master, such as a POS terminal, a turnstile, or an access control reader, or it can be a user terminal device such as a smartphone or smartwatch in card reader mode, capable of actively initiating radio frequency fields and communication commands.

[0053] Near-field communication trigger signals can represent card search commands issued by the card reader device, such as the REQA (0x26) command or WUPA (0x52) command in ISO / IEC 14443 Type A, which are used to activate or wake up the tag.

[0054] NFC tag information can represent the identity or business data of the NFC tag device and is returned to the card reader device during the card selection or data interaction stage.

[0055] In practical applications, the near-field communication (NFC) function of the card reader device can be enabled, or the card reader device can be in reader mode, capable of sending electromagnetic signals to establish NFC communication. For example, the card reader device can send a card search command (such as the REQA command) via NFC to detect the presence of an NFC tag nearby. The NFC tag device can sense the radio frequency field established by the card reader device through its antenna. After receiving the trigger signal broadcast by the card reader, such as the card search command, it can respond to the command, for example, by replying with an ATQA command.

[0056] Step 204: Based on the near-field communication trigger signal, send NFC tag information to the card reader device.

[0057] NFC tag devices can respond to signals sent by card reader devices. If the near-field communication uses the 14443 Type A protocol, the card reader device can send a REQA command to request a response from the card. After receiving the request command, the NFC tag device can reply with an ATQA command so that the card reader device can identify the NFC tag to be communicating with.

[0058] In practical applications, the reader device can also send an anti-collision command and use the SELECT command to select a specific tag to begin data transmission. The NFC tag device can then send NFC tag information to the reader device. Sending NFC tag information to the reader device here indicates the execution of the tag information transmission process, not the completion of the information transmission. In practice, NFC tag information may be transmitted to the reader device through multiple transmission processes. For specific near-field communication processes, please refer to relevant known technologies, which will not be elaborated here.

[0059] Step 206: If a card presence detection signal is obtained from the card reader device before the NFC tag information is read, switch to silent mode.

[0060] When the NFC tag device is in a silent state, it does not respond to the near-field communication commands issued by the card reader device, so that the card reader device can re-enter the polling card detection state.

[0061] A card presence detection signal is a lightweight probe command periodically sent by a card reader during communication to determine whether a tag is still within the sensing area. It detects whether the card being communicated with is still within the radio frequency field. In practical applications, after acquiring tag information, the card reader can enter a card presence detection state and issue a card presence detection signal. In related technologies, when the card reader executes the corresponding business process based on the acquired tag information, it can exit the card presence detection state after the process is completed and start a new round of communication. For example, the card reader triggers a payment process based on the acquired tag information; after obtaining the payment result, it can exit the card presence detection state and prepare for the next communication.

[0062] The silent state can represent a non-response mode that the NFC tag device actively enters. In this state, it does not respond to any communication commands from the reader, such as REQA, ANTICOLLISION, SELECT, etc., which is logically equivalent to leaving the communication field of the reader device.

[0063] The polling state can represent the initial card-finding phase of the card reader device, the card-finding phase triggered by the card reader device to initiate near-field communication, or the initial part of a near-field communication, such as sending a REQA command to detect if there is a card nearby.

[0064] In one example of this specification, if the card reader enters the card presence detection state prematurely before the main transaction ends due to communication instability, timeout, state machine malfunction, or high-frequency polling, and issues a card presence detection signal, and then sends one or more REQA commands to detect the presence of a card nearby, the NFC tag device can detect whether the NFC tag information has been completely transmitted. If it receives the card presence detection signal from the card reader before transmission is complete, it indicates that the card reader has mistakenly entered the card presence detection state. Therefore, it needs to stop interacting with the card reader, end the current communication, and quickly restart a new round of communication so that the card reader can obtain the complete tag information as soon as possible. In this case, the NFC tag device can actively switch to a silent state and no longer respond to any subsequent commands until external conditions change (such as the radio frequency field disappearing and then being rebuilt).

[0065] The purpose of switching the NFC tag device to silent mode is to allow the card reader device to re-enter the polling card detection state and restart a new round of communication. In silent mode, the NFC tag device no longer responds to the card reader device's commands. For example, if the card reader device issues a REQA command after entering card presence detection mode, and the NFC tag device no longer replies with an ATQA command, the card reader will not receive an ATQA response in subsequent polling and will determine that there is no card or the original card has been removed. The card reader device can then exit the current chaotic or blocked communication context and return to the clean initial polling state to restart the standard card search → card selection → interaction process. This avoids communication deadlocks, prolonged inability to transact, or transaction failures due to incomplete tag information.

[0066] While one or more embodiments of this specification provide method steps as described in the embodiments or flowcharts, it is understood that the order of steps listed in the embodiments or flowcharts is merely one possible execution order among many steps and does not represent the only possible execution order. The order of some steps may be adjusted according to actual needs, or some steps may be omitted. When the claims involve method steps, changes in the order of such steps, or parallel execution between steps, are also within the scope of protection of the claims.

[0067] In one embodiment of this specification, by endowing the NFC tag device with the ability to actively sense and respond to abnormal card presence detection signals, it can autonomously enter a silent state, thereby actively releasing communication resources and avoiding invalid interactions with the card reader. This also allows the card reader device to quickly return to the standard polling process, improving system performance and increasing the overall success rate and response efficiency of NFC interactions. Furthermore, no modifications to the card reader device's firmware are required; system behavior can be optimized solely through intelligent responses on the tag side, resulting in strong compatibility.

[0068] based on Figure 2 In addition to the method described herein, this specification also provides some improved implementation methods, which will be described below.

[0069] To achieve more accurate state switching, in one or more embodiments of this specification, the decision to switch states can be made by determining whether the card reader device is close to the NFC device. Optionally, the method in one embodiment of this specification may further include:

[0070] Determine whether the card reader device is in a state of proximity to the NFC tag device.

[0071] Correspondingly, if a card presence detection signal is received from the card reader device before the tag information is fully read, switching to a silent state may include:

[0072] If the card reader device is close to the NFC tag device, and if a card presence detection signal is received from the card reader device before the tag information is read, then the device switches to a silent state.

[0073] The proximity status of the reader to the NFC tag can indicate that the distance between the reader and the NFC tag is gradually decreasing, or that the distance between the reader and the NFC tag is less than or equal to the communication distance of near-field communication (NFC); ​​or it can indicate that the NFC tag is within the field of view of the reader. In practical applications, distance detection or signal strength detection can be used to determine whether the reader is close to the NFC tag.

[0074] In one embodiment of this specification, before switching to the silent state, it can be determined whether the card reader device is close to the NFC tag device. If the card reader device is close to the NFC tag device and receives a card presence detection signal from the card reader device before the NFC tag information is sent, the NFC tag device can switch to the silent state. This can eliminate false triggering scenarios. For example, if the card reader device has left (the radio frequency field disappears) and then approaches the NFC tag device again and sends the initial card presence detection signal (such as REQA), this is a completely new normal card search and should not trigger the silent state. In practical applications, when the card reader never leaves (e.g., continuously powered, continuously polling), and sends a card presence detection signal prematurely during the interaction, it indicates a communication process disorder. In this case, switching the NFC tag device to the silent state is meaningful.

[0075] For example, when a user places their mobile phone (i.e., a card reader device) on an NFC tag device (such as a payment device), the NFC tag device receives a card presence detection signal from the mobile phone after sending some tag data. In this case, the NFC tag device can switch to a silent state so that the mobile phone can start a new round of interaction, obtain complete tag information through the new round of interaction, and perform business processing.

[0076] For example, in practical applications, during communication, if the user removes the phone, the radio frequency field of the card reader disappears. If the phone is put back after 2 seconds, this is a new interaction. The NFC tag device does not receive the card presence detection signal from the card reader device after sending part of the tag information. In this case, the NFC tag device does not switch to silent mode, but remains in normal communication mode.

[0077] In one embodiment of this specification, by determining whether the card reader device is close to the NFC tag device, the accuracy of the silencing mechanism can be improved, the risk of false silencing can be reduced, and the user experience can be improved, thus preventing false failures such as card unresponsiveness caused by unnecessary silencing.

[0078] As one implementation, the NFC tag device may have a sensor module; the above determination of whether the card reader device is close to the NFC tag device may include: determining whether the card reader device is close to the NFC tag device based on the distance signal detected by the sensor module.

[0079] The sensor module can be a hardware unit integrated into the NFC tag device for sensing the distance to external objects. For example, it can include one or more hardware modules such as infrared proximity sensors, ultrasonic sensors, capacitive proximity sensors, ToF (Time of Flight) sensors, and UWB (Ultra Wide Band) ranging modules.

[0080] Distance signals can represent analog or digital signals output by sensors that reflect the physical distance between the reader device and the NFC tag device, such as voltage values, distance values ​​in millimeters, etc.

[0081] In practical applications, NFC tag devices can activate the sensor module; the sensor module can continuously or periodically detect the distance to objects in front; when a card presence detection signal is received during NFC communication, the distance signal currently output by the sensor can be queried simultaneously, before, or after receiving the card presence detection signal, or the distance information between the current moment of receiving the card presence detection signal and a period of time before; if the distance is less than or equal to a preset threshold (for example, the preset distance threshold is 5~10 cm, matching the effective distance range of NFC communication), or if the distance shows a gradual decreasing trend over a period of time, it can be determined that the card reader is close to the NFC tag device. Further, whether to trigger a silent state can be determined by combining whether the tag information has been completely read. Specifically, if the card reader device is close to the NFC tag device and receives the card presence detection signal sent by the card reader device before the NFC tag information has been completely read, the NFC tag device can be switched to a silent state.

[0082] If the reader is moved away from the NFC tag, it indicates that the user intends to remove the reader to begin a new interaction, or that the user intends to end the communication. In this case, the NFC tag does not need to perform a silent state transition process, allowing for the next new communication interaction.

[0083] In practical applications, the sensor module can be kept in a normally-on state or woken up as needed. For example, it can be woken up when NFC communication has started or when a reader's radio frequency field is detected for subsequent proximity detection. When communication ends or no reader radio frequency field is detected, the sensor module can be in a sleep state. This on-demand wake-up capability reduces power consumption and prevents accidental triggering.

[0084] In this embodiment of the specification, the NFC tag device can also detect whether the tag information has been completely read, and can determine whether the tag information has been completely read according to a preset frequency or periodically. Optionally, the above-mentioned detection of whether the tag information has been completely read may include: detecting whether the data at the target address in the storage unit used to store the tag information has been read; the target address is used to store the last data read in the tag information.

[0085] If the data at the target address has been read, it means that the tag information has been read completely; if the data at the target address has not been read, it means that the tag information has not been read completely.

[0086] In practical applications, tag information is stored in a storage unit, which can be located in the NFC tag chip or in the control module of the NFC tag device. For example, in scenarios based on NDEF (NFC Data Exchange Format) messages, tag information is typically stored in a specific storage area of ​​the tag in NDEF format. Reading completion indicates that the data block corresponding to the last valid address (e.g., the end address) of the NDEF data has been read. If a card presence detection signal is received before the data block corresponding to the preset tag information end address is read, the system can switch to a silent state.

[0087] As one implementation method, the NFC tag chip in the NFC tag device can determine whether data has been read completely. This NFC tag chip can have the ability to detect and output an event indicating that a certain address (such as a target address) has been read. The tag chip can control the transmission and reception of data throughout the entire NFC communication process. Once it determines that the transmitted data is the last data or that the end address has been accessed, it can be determined that the data has been read completely. Specifically, an "End-of-Read" monitoring address (such as NDEF end page) can be configured. When the card reader accesses this address via a READ command or the NFC chip accesses this address based on a card reader command, the NFC tag chip can automatically set an internal flag bit or output a high level through an interrupt pin (such as GPO). An external control module (such as an MCU microcontroller unit) can query this status to perform subsequent actions, or the NFC chip's internal logic can directly trigger subsequent actions, such as switching to a silent state. If a card presence detection signal is received from the card reader device, but no instruction information indicating access to the end address is received from the NFC tag chip, it indicates that the current tag information has not been read completely, and the NFC tag device can switch to a silent state.

[0088] As another implementation, the control module in the NFC tag device can also determine whether the tag information has been completely read. The control module can work with the NFC tag chip to simulate NFC communication in software. The general process is that the NFC chip receives data, then transmits it to the control module, which then sends back the data to be replied to the NFC chip. The NFC chip then sends the data back, allowing the control module to monitor the entire communication process and detect whether the tag information has been completely read. Optionally, the NFC tag device can include an NFC tag chip and a control module; the NFC tag chip transmits the received read command to the control module; the control module parses the read command and determines the feedback data. If the address corresponding to the feedback data is a preset end address, it is determined that the tag information has been completely read.

[0089] The card reader device can send a command to read tag information (such as a READ command). After receiving the command, the NFC tag chip can transmit it to the control module. The control module parses the command, retrieves the data at the corresponding address from its local cache or Flash memory, constructs response data, and sends it back to the NFC tag chip. The NFC tag chip can then modulate and send this data to the card reader device. The control module can also record the address being read. When a preset end address is detected, it can determine that the information reading is complete. If a card presence detection signal is received from the card reader device before the reading is complete, the NFC tag device can be controlled to switch to a silent state.

[0090] Optionally, if a card presence detection signal is received from the card reader device before the tag information is fully read, switching to a silent state may include:

[0091] Detect whether the tag information has been completely read;

[0092] If the tag information is not fully read, then it is checked whether a card presence detection signal is received from the card reader device;

[0093] If a card presence detection signal is received from the card reader device, the system switches to silent mode.

[0094] In practical applications, the steps of detecting whether the tag information has been completely read and detecting whether a card presence detection signal has been received from the card reader can be executed synchronously and in parallel. Based on these two detection results, it is determined whether to switch to the silent state. Optionally, after obtaining the first detection result indicating that the tag information has not been completely read and the second detection result indicating that a card presence detection signal has been received from the card reader, the timing of the first and second detection results can be used to determine whether the card presence detection signal was received from the card reader when the tag information had not been completely read. If so, the silent state can be switched to.

[0095] As another implementation, the step of detecting whether the tag information has been completely read can be performed first, followed by the step of detecting whether a card presence detection signal from the card reader device has been received. This detection process can be executed cyclically. For example, after the NFC tag device sends data to the card reader device once, it can perform a detection once until the tag data is completely sent or a card presence detection signal from the card reader device is detected.

[0096] Figure 3 This is a flowchart illustrating a near-field communication method according to one embodiment of this specification. Figure 3As shown, the NFC tag device can detect whether the card reader device is nearby. If the card reader device is detected nearby, it can check whether the tag information has been completely read. If not, it can check whether the card reader device has entered a card presence detection state, i.e., whether it has received a card presence detection signal from the card reader device. If the card reader device has not entered a card presence detection state, it can continuously check the status of the card reader device until the tag information is completely read or the card reader device enters a card presence detection state. If the card reader device enters a card presence detection state before the tag information is completely read, the NFC tag device can switch to a silent state, actively interrupting the current communication. It can also restore to the normal communication state after a period of time, or after detecting that the card reader device has re-entered a new round of communication, and restart the communication to conduct the next near-field communication interaction process. If no card presence detection signal from the card reader device is received before the tag information is completely read, i.e., the card reader device has not abnormally entered a card presence detection state before the tag information is completely read, the communication can be considered successful after the tag information is read, and the process can end.

[0097] As another implementation, the NFC tag device can first perform a step to detect whether a card presence detection signal from the card reader device has been received, and then perform a step to detect whether the tag information has been read completely or obtain result information indicating whether the tag information has been read completely. If the tag information has not been read completely when the card presence detection signal from the card reader device is received, it can be indicated that the card reader device has mistakenly entered the card presence detection stage. The NFC tag device can then switch to a silent state to facilitate the end of this communication and allow the card reader device to start the next communication as soon as possible.

[0098] In practical applications, a near-field communication (NFC) interaction process can be broadly divided into four stages: card search, anti-collision card selection, interaction, and presence detection. The card search stage involves the reader sending a card search signal and the NFC tag responding with a corresponding message. For example, the reader might send a REQA command, and the NFC tag might respond with an ATQA command. If multiple cards are nearby, the reader can receive multiple response commands and select the target card for interaction according to a pre-defined anti-collision procedure, sending a SELECT command and a data reading command. The selected card, i.e., the NFC tag, can send its tag information to the reader. After the reader receives the tag information (perhaps complete or partially due to interference), it can enter the card presence detection stage, sending a card presence detection signal, such as a REQA command, to check if the card is still present. In the embodiments of this specification, the card presence detection signal issued by the card reader device obtained before the NFC tag information is read is obtained after the NFC tag device has started or is about to start (e.g., the tag is already in an active state) the process of sending tag information data. It is not the signal issued by the card reader device in the card search stage before the anti-collision card selection stage to detect whether a card exists.

[0099] In practical applications, if the tag information has already been read when the card reader device sends a card presence detection signal, the NFC tag device can maintain its normal state without switching states. Optionally, the method in one embodiment of this specification may further include:

[0100] If no card presence detection signal is received from the card reader device before the NFC tag information is read, the normal response state is maintained.

[0101] A normal response status indicates the status of responding to the instructions issued by the card reader device according to the communication protocol requirements. Specifically, if no card presence detection signal is received from the card reader device before the NFC tag information is completely read, it indicates that the tag information has been completely sent to the card reader device. After the tag information has been completely sent to the card reader device, if the card reader device issues a card presence detection signal, the NFC tag device can respond normally to this signal. Subsequently, when the card reader device moves away from the NFC tag device, or when the NFC tag device moves away from the card reader device and is no longer within the card reader device's field of view, the communication can end. Alternatively, the NFC tag device can end the communication after the card reader device issues a command to end the communication, or after the card reader device stops transmitting radio frequency signals.

[0102] To facilitate a rapid resumption of communication, the NFC tag device can also return to a normal response state after a period of silence, allowing it to resume interaction with the reader device. Optionally, the method in this embodiment may further include: returning to the normal response state after a preset duration of silence.

[0103] The preset duration can be a pre-configured or hard-coded time threshold (such as 100ms, 500ms, 1s, etc.) used to control the duration of silence. This duration can be set through registers, firmware parameters, or external configuration. The preset duration can be set based on expert experience or the communication protocol used, and is usually in the second range, as long as it allows the card reader device to determine that the card is not present and can restart the next round of communication.

[0104] In one embodiment of this specification, the NFC tag device can remain in a silent state for a period of time before returning to a normal response state. This eliminates the need for the user to restart the device or re-swipe the card, improving the user experience. It can also be seamless for the user. For example, if a user uses their mobile phone as a card reader for business transactions, and for some reason the phone fails to successfully read the tag information during the initial interaction with the NFC tag device, the NFC tag device can automatically enter a silent state and return to a normal response state after a period of time. The phone can then re-establish communication with the NFC tag device. This eliminates the need for the user to pick up the phone, remove it from the NFC tag device, and then touch it back to the NFC tag device; the user can simply keep the phone in contact with the NFC tag device, simplifying the user operation.

[0105] Furthermore, this also avoids the communication restarting due to different user habits or the speed of their actions. For example, in practical applications, to reduce power consumption, the card reader device usually sends a low-frequency card presence detection signal when it receives complete tag information or, for some reason, incomplete tag information. The interval between the two signals may be 200 to 500 milliseconds. If the user picks up and puts down the card reader device quickly, completing the action within the interval between the two signals, although the distance between the card reader device and the NFC tag device is greater than the near-field communication distance after the user picks up the card reader device, the communication will not end because the frequency of the card reader's signal is low and the interval is long. This will also cause inconvenience to the user, making it impossible for the user to terminate the communication by moving away. In the embodiments of this specification, the NFC tag device can actively enter a silent state. Even if the time taken for the user to pick up and put down the card is less than the time interval between two adjacent card presence detection signals sent by the card reader device, the NFC tag device in the silent state will also prompt the card reader device to end the local communication.

[0106] As another implementation, the NFC tag device can also determine the timing of restoring to the normal response state based on the state of the reader device. Optionally, the method in the embodiments of this specification, after switching to the silent state, may further include:

[0107] Detect whether a field signal is received from the card reader device.

[0108] If no presence signal is received, the system will revert from the silent state to the normal response state.

[0109] The field signal represents the radio frequency carrier emitted by the reader device at a near-field communication frequency (e.g., 13.56MHz). It may or may not contain specific instruction information and can be used to power NFC tags and establish a communication link. The tag side can sense the field strength through its antenna.

[0110] Even in a silent state, NFC tag devices can continuously monitor the radio frequency (RF) field. They can sense the RF field through their antennas, but they do not respond to commands sent by the reader device via the RF field. After sending one or more card presence detection signals, if the reader does not receive feedback from the tag, it can actively turn off the RF field. Alternatively, if the user moves the reader device or NFC tag device away, making the distance between them greater than the near-field communication distance, the NFC tag device can sense the drop in field strength. The lack of a field signal indicates that the field strength is less than or equal to a preset threshold, which also indicates that the reader device has ended the previous communication. The NFC tag device can then return from a silent state to a normal response state, preparing for the next interaction. When the reader approaches again and turns on the RF field, the tag can participate in a new session normally.

[0111] In practical applications, NFC tag chips can have field detection capabilities. For example, NXP NTAG series NFC chips can be configured as field detection output pins via the GPO pin; and MIFARE series NFC chips have internal field detection flags.

[0112] NFC tag chips can have an energy harvesting circuit that can convert radio frequency fields into DC voltage to power the chip; they can also have a field strength detection pin to reflect the field strength by the voltage level; and they can also have a low-power comparator to determine whether the voltage is higher than a threshold, thereby determining whether a field signal exists.

[0113] Alternatively, a field detection circuit or program can be set in the control module of the NFC tag device, allowing the control module to detect the field signal. If the NFC tag chip has field detection capability, the control module can obtain the field information detected by the NFC tag chip, or the result information of whether field information exists. Then, if no field signal is present, the NFC tag device can be restored from the silent state to the normal response state.

[0114] In practical applications, NFC tag devices can be switched to silent mode in one or more of the following ways:

[0115] NFC tag chips can have a silent function. For example, the chip has a silent control register inside. When the silent conditions are met, the NFC tag chip can switch to a silent state, or the control module can send a command to the NFC tag chip to make the NFC tag chip switch to a silent state and no longer respond to the commands of the card reader device.

[0116] Alternatively, the control module connected to the NFC tag chip can control the data sent by the NFC tag chip. After the silent condition is met, the control module can instruct the NFC tag chip to stop sending data, or the control module can stop sending instructions to the NFC tag chip to send data. In this way, the NFC tag chip can stop responding to the instructions issued by the card reader device.

[0117] Alternatively, when the silent condition is met, the control module can control the power module of the NFC tag chip to stop working, the radio frequency signal sensed by the antenna will no longer be converted into electrical energy to power the chip, or the power supply in the active chip will no longer supply power to the chip, and the NFC tag chip will also stop working and no longer respond to the instructions issued by the card reader device.

[0118] Alternatively, other hardware or software methods can be used to switch NFC tag devices to a silent state.

[0119] The normal response state can be the opposite of the silent state. The NFC tag device can be restored to the normal response state by performing the reverse operation of the silent state. For example, the silent state of the NFC tag chip can be cleared when the restoration conditions are met; alternatively, the control module can send an instruction to the NFC tag chip to respond, or the control module can control the power module to operate normally, etc. These will not be elaborated further here.

[0120] In one embodiment of this specification, the reader device's attempt to read tag content is sensed from the tag side. This can be combined with the reader device's spatial location and NFC communication commands to identify communication anomalies. The reader then proactively intervenes, autonomously entering a silent state to help restore normal communication. If a communication interruption occurs when the reader device first approaches and senses a tag, the method described in this embodiment can automatically recover after the reading anomaly, without requiring further user intervention. Furthermore, for scenarios where the user attempts to repeatedly sense the tag, this method can encourage the reader device to restart reading, effectively mitigating situations where the reader device or NFC tag cannot be read normally after being removed and then brought back close.

[0121] The various technical features in the above embodiments can be combined arbitrarily, as long as there is no conflict or contradiction between the combinations of features. However, due to space limitations, they have not been described one by one. Therefore, the arbitrary combination of various technical features in the above embodiments is also within the scope of this specification.

[0122] Based on the same idea, this specification also provides NFC tag devices corresponding to the above methods in its embodiments. Figure 4 This is a schematic diagram of the structure of an NFC tag device provided in one embodiment of this specification.

[0123] like Figure 4 As shown, the NFC tag device may include a control module 402 and an NFC tag module 404; the control module 402 is communicatively connected to the NFC tag module 404.

[0124] The NFC tag module 404 can be used to send NFC tag information to the card reader device based on the near-field communication trigger signal emitted by the card reader device.

[0125] The control module 402 can be used to switch the NFC tag device to a silent state if a card presence detection signal is obtained from the card reader device before the tag information is read completely; when the NFC tag device is in a silent state, it does not respond to the command issued by the card reader device so that the card reader device can re-enter the tag polling and card detection state.

[0126] The NFC tag module can be used to perform low-level radio frequency (RF) communication functions. Specifically, this module may include an NFC tag chip and a matching antenna. The NFC tag chip may be, for example, a Type A or Type B chip conforming to the ISO / IEC 14443 standard. The antenna can be used to sense the RF field emitted by the reader device at a preset frequency (e.g., 13.56MHz) and provide operating power to the NFC tag chip (for passive tags) or to enable bidirectional communication (for active or semi-active tags). Under normal operating conditions, when the reader device sends a near-field communication trigger signal, the NFC tag module will return corresponding response information to the reader according to the protocol specifications, as well as application data (such as tag information in NDEF format) stored in the chip's internal memory.

[0127] The control module can be used to implement high-level communication status monitoring and decision control. This control module can be a microcontroller unit (MCU) or part of an application processor integrated into a system-on-a-chip (SoC), such as the main control chip running the operating system and applications. In certain security-sensitive scenarios, the control module can also be handled by a Secure Element (SE) or an embedded security chip (eSE), interacting with the NFC tag module through a secure channel. The control module establishes a communication connection with the NFC tag module via I²C (Inter-Integrated Circuit), SPI (Serial Peripheral Interface), UART (Universal Asynchronous Receiver / Transmitter), or other bus interfaces. Specifically, it can communicate with the NFC chip within the NFC tag module, enabling real-time acquisition of information such as the content of instructions received by the NFC tag module, accessed storage addresses, and current communication status. It can also send control commands, such as commands to switch to a silent state or restore to a normal response state.

[0128] As one implementation method, the control module can continuously monitor the reading progress of the entire tag information. For example, if the preset complete tag information is stored within a specific address range of the NFC tag chip (such as from Page 0x04 to Page 0x0A), the control module can determine whether the tag information has been completely read by recording the address that has been read or parsing the target address of the READ command. If the control module detects a card presence detection signal from the card reader before the reading is completed, it can determine that the card reader may be exhibiting abnormal polling behavior. In this case, the control module can proactively trigger a silent mechanism.

[0129] Specifically, the control module can send a control command to the NFC tag module to put it into a silent state. In this state, the NFC tag module no longer responds to any near-field communication commands issued by the reader device. From the reader's perspective, this is equivalent to the card leaving the sensing area, thus prompting the reader device to exit the current chaotic communication context, return to the initial polling card detection state, and initiate a new, clean communication process in the next detection. Once subsequent conditions are met (such as the radio frequency field disappearing and then re-establishing, or after a preset time), the control module can further control the NFC tag module to exit the silent state and restore normal responsiveness.

[0130] In practical applications, the control module can determine whether the tag information has been read completely in several ways. In one implementation, the control module can parse each read instruction transmitted by the NFC tag module to track the address progress. In another implementation, the NFC tag chip can be configured to automatically generate an event signal and notify the control module when a preset key address (such as the NDEF end address) is accessed, and the control module updates the read status accordingly. Specifically, the NFC tag chip can integrate a memory management unit and address monitoring logic. During the initialization phase, the user can configure one or more key addresses or target addresses (such as the end address of the NDEF data, like Page 0x0A) to the chip via interfaces such as I²C and SPI. When the reader device accesses this address via a standard READ instruction, the NFC tag chip automatically recognizes this event and triggers its internal mechanism. Secondly, the chip can notify the control module of the read completion event in one or more ways. Specifically, it can do so via an interrupt pin output. For example, the NFC tag chip provides a general-purpose output pin that can be configured to pull high or low when a specified page is read. The control module can detect this level change through this pin to determine if an event has occurred. Alternatively, the NFC tag chip can set a flag indicating read completion in its status register. The control module can then periodically poll the register or respond to interrupts to read the flag, thus determining whether the target address has been reached and whether the tag information has been read completely. Alternatively, event data can be transmitted transparently. Upon receiving a READ command from the reader, the NFC tag chip can not only return data but also report the address of the current access to the control module, which can then compare it to determine if it is the end address.

[0131] In one embodiment of this specification, a control module is added to the NFC tag device and made to work in conjunction with the NFC tag module, enabling the NFC tag device to have proactive sensing and decision-making capabilities. This solution does not require modification of the reader device's firmware or protocol; it effectively solves the communication failure problem caused by abnormal polling of the reader through intelligent control on the tag side, significantly improving user experience and system robustness.

[0132] To further improve the reliability of the silent triggering mechanism and avoid misinterpreting normal user movement and subsequent approach as abnormal polling, in one embodiment of this specification, the NFC tag device may also include a sensor module for measuring the physical distance between itself and the card reader device. The control module can combine this distance information to trigger silence in scenarios where the card reader continuously approaches but sends a pre-emptive card presence detection signal, thereby achieving smarter and more robust communication optimization. Optionally, the NFC tag device also includes a sensor module 406 for measuring distance, which is communicatively connected to the control module 402.

[0133] The sensor module 406 can be used to measure the distance between the card reader device and the NFC tag device.

[0134] The control module 402 can be used to determine whether the card reader device is close to the NFC tag device based on the distance; if the card reader device is close to the NFC tag device and a card presence detection signal is obtained from the card reader device before the tag information is read, then the NFC tag device is switched to a silent state.

[0135] The NFC tag module can be used for near-field communication with the card reader device; the sensor module communicates with the control module (e.g., through I²C, SPI, or GPIO interfaces) to measure the physical distance between the card reader device and the NFC tag device in real time; the control module is configured to: determine whether the card reader device is in a close proximity state based on the distance data output by the sensor module, and then make a comprehensive decision to determine whether to enter a silent state.

[0136] The control module can preset a distance threshold (e.g., 2 cm, 5 cm, etc.). When the distance detected by the sensor module is less than or equal to this threshold, it determines that the card reader device is approaching; otherwise, it can be determined that it is moving away. Alternatively, the control module can determine whether the card reader device is gradually approaching or gradually moving away from the NFC tag device based on multiple collected distance data. If multiple consecutively collected distance data show a decreasing trend in distance, it can indicate that the card reader device is gradually approaching the NFC tag device, or it can indicate that the card reader device is approaching the NFC tag device.

[0137] Before the sensor module determines that the card reader is nearby and before the tag information has been fully read, the NFC tag receives a card presence detection signal from the card reader. The control module can then switch the NFC tag to a silent state. This prevents users from re-entering the device after it has been moved away and triggering a new session, thus improving communication success rates.

[0138] Optionally, the control module can also control the NFC tag device to return from a silent state to a normal response state. Optionally, the control module can also be used to restore the NFC tag device to the normal response state after it has been in the silent state for a preset duration. Alternatively, the control module can also be used to restore the NFC tag device from the silent state to the normal response state if the NFC tag device fails to acquire a near-field communication signal after being in the silent state.

[0139] When the control module enters a silent state, it can start a software or hardware timer (such as 300 milliseconds, 500 milliseconds, 1 second, etc.). After the timeout, the silent flag is automatically cleared, and the module resumes responding to various commands issued by the card reader device.

[0140] Alternatively, the NFC tag device can monitor the presence of a radio frequency field at a preset frequency (e.g., 13.56MHz) through its internal rectifier circuit. This can be performed by the NFC tag chip or the control module. When the voltage falls below the operating threshold (e.g., less than 1.5V), the field signal is considered to have disappeared, and the NFC tag device can exit the silent state and return to its normal response state.

[0141] The above is an illustrative scheme of an NFC tag device according to this embodiment. It should be noted that the technical solution of this NFC tag device and the technical solution of the aforementioned near-field communication method belong to the same concept. Details not described in detail in the technical solution of this NFC tag device can be found in the description of the technical solution of the aforementioned near-field communication method. This NFC tag device can be used to perform the aforementioned near-field communication method.

[0142] Based on the same idea, embodiments of this specification also provide apparatus corresponding to the above methods.

[0143] Figure 5 This is a schematic diagram of a near-field communication device provided in one embodiment of this specification.

[0144] like Figure 5 As shown, the device may include:

[0145] The signal acquisition module 502 is used to acquire the near-field communication trigger signal sent by the card reader device;

[0146] The information sending module 504 is used to send NFC tag information to the card reader device based on the near-field communication trigger signal;

[0147] The state switching module 506 is used to switch to a silent state if a card presence detection signal issued by the card reader device is obtained before the NFC tag information is read. When the device is in the silent state, it does not respond to the near-field communication command issued by the card reader device so that the card reader device can re-enter the polling card detection state.

[0148] based on Figure 5 The embodiments of this specification also provide some specific implementation schemes of the method, which are described below.

[0149] Optionally, the device may also include a status determination module for determining whether the card reader device is in a state of proximity to the NFC tag device.

[0150] The above-mentioned switch to a silent state if a card presence detection signal from the card reader device is obtained before the tag information is read completely can include: if the card reader device is close to the NFC tag device, and if a card presence detection signal from the card reader device is obtained before the tag information is read completely, then switch to a silent state.

[0151] Optionally, the above-mentioned switch to a silent state if a card presence detection signal issued by the card reader device is obtained before the tag information is completely read may include: detecting whether the tag information has been completely read; if the tag information has not been completely read, detecting whether a card presence detection signal issued by the card reader device is obtained; if a card presence detection signal issued by the card reader device is obtained, switching to a silent state.

[0152] Optionally, the device may also include a state holding module for maintaining a normal response state if no card presence detection signal is received from the card reader device before the NFC tag information is read.

[0153] Optionally, the device may also include a state restoration module for restoring the device to a normal response state after a preset duration of the silent state.

[0154] Optionally, the device may also include a state restoration module, which is used to detect whether a field signal is received from the card reader device after switching to the silent state. If no field signal is received, the device is restored from the silent state to the normal response state.

[0155] Optionally, the device may also have a sensor module; the above-mentioned determination of whether the card reader device is close to the NFC tag device may include: determining whether the card reader device is close to the NFC tag device based on the distance signal detected by the sensor module.

[0156] It is understood that the modules mentioned above refer to computer programs or program segments used to perform one or more specific functions. Furthermore, the distinction between these modules does not imply that the actual program code must also be separate.

[0157] For ease of description, the above devices are described by dividing them into various modules or units based on their functions. Of course, when implementing one or more of these specifications, the functions of each module or unit can be implemented in the same or different software and / or hardware, or a module that performs the same function can be implemented by a combination of multiple sub-modules or sub-units, etc. The device embodiments described above are merely illustrative. For example, the division of units is only a logical functional division; in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed.

[0158] The above is a schematic representation of a near-field communication (NFC) device according to this embodiment. It should be noted that the technical solution of this NFC device and the technical solution of the aforementioned NFC method belong to the same concept. Details not described in detail in the technical solution of this NFC device can be found in the description of the technical solution of the aforementioned NFC method. This device can be used to execute the aforementioned NFC method, and it can function as an NFC tag device or as a module within an NFC tag device.

[0159] Based on the same idea, this specification also provides devices corresponding to the above methods in its embodiments.

[0160] Figure 6 A structural block diagram of a computing device 600 provided according to an embodiment of this specification is shown.

[0161] The computing device 600 includes:

[0162] Memory 610 and processor 620;

[0163] The memory 610 is used to store computer programs / instructions, and the processor 620 is used to execute the computer programs / instructions, which, when executed by the processor 620, implement the steps of the above-described near-field communication method.

[0164] Specifically, the components of the computing device 600 include, but are not limited to, a memory 610 and a processor 620. The processor 620 is connected to the memory 610 via a bus 630, and the database 650 is used to store data.

[0165] The computing device 600 also includes an access device 640, which enables the computing device 600 to communicate via one or more networks 660. Examples of these networks include Public Switched Telephone Network (PSTN), Local Area Network (LAN), Wide Area Network (WAN), Personal Area Network (PAN), or combinations of communication networks such as the Internet. The access device 640 may include one or more of any type of wired or wireless network interface (e.g., a network interface card (NIC)), such as an IEEE 802.11 Wireless Local Area Network (WLAN) wireless interface, a Wi-MAX (Worldwide Interoperability for Microwave Access) interface, an Ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a Bluetooth interface, a Near Field Communication (NFC) interface, and so on.

[0166] In one embodiment of this specification, the above-described components of the computing device 600 and Figure 6 Other components, not shown, can also be connected to each other, for example, via a bus. It should be understood that... Figure 6 The block diagram of the computing device shown is for illustrative purposes only and is not intended to limit the scope of this application. Those skilled in the art can add or replace other components as needed.

[0167] The computing device 600 can be any type of stationary or mobile computing device, including mobile computers or mobile computing devices (e.g., tablet computers, personal digital assistants, laptop computers, notebook computers, netbooks, etc.), mobile phones (e.g., smartphones), wearable computing devices (e.g., smartwatches, smart glasses, etc.) or other types of mobile devices, or stationary computing devices such as desktop computers or personal computers (PCs). The computing device 600 can also be a mobile or stationary server.

[0168] The processor 620 executes the computer instructions to implement the steps of the above-described near-field communication method.

[0169] The above is an illustrative scheme of a computing device according to this embodiment. It should be noted that the technical solution of this computing device and the technical solution of the near-field communication method described above belong to the same concept. For details not described in detail in the technical solution of the computing device, please refer to the description of the technical solution of the near-field communication method described above.

[0170] An embodiment of this specification also provides a computer-readable storage medium storing computer instructions that, when executed by a processor, implement the steps of the near-field communication method described above.

[0171] The above is an illustrative scheme of a computer-readable storage medium according to this embodiment. It should be noted that the technical solution of this storage medium belongs to the same concept as the technical solution of the near-field communication method described above. For details not described in detail in the technical solution of the storage medium, please refer to the description of the technical solution of the near-field communication method described above.

[0172] An embodiment of this specification also provides a computer program product, including a computer program / instructions that, when executed by a processor, implement the steps of the above-described near-field communication method.

[0173] The above is an illustrative scheme of a computer program product according to this embodiment. It should be noted that the technical solution of this computer program product and the technical solution of the near-field communication method described above belong to the same concept. For details not described in detail in the technical solution of the computer program product, please refer to the description of the technical solution of the near-field communication method described above.

[0174] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, for apparatuses, devices, and embodiments, since they are basically similar to the method embodiments, the descriptions are relatively simple, and relevant parts can be referred to the descriptions of the method embodiments. The apparatuses, devices, and methods provided in the embodiments of this specification are corresponding to each other, and therefore the apparatuses and devices also have similar beneficial technical effects as the corresponding methods. Since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the corresponding apparatuses and devices will not be repeated here.

[0175] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.

[0176] In the 1990s, improvements to a technology could be clearly distinguished as either hardware improvements (e.g., improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to methodology). However, with technological advancements, many methodological improvements today can be considered direct improvements to hardware circuit structures. Designers almost always obtain the corresponding hardware circuit structure by programming the improved methodology into the hardware circuit. Therefore, it cannot be said that a methodological improvement cannot be implemented using hardware physical modules. For example, a Programmable Logic Device (PLD) (such as a Field Programmable Gate Array (FPGA)) is such an integrated circuit whose logic function is determined by the user programming the device. Designers can program a digital system themselves to "integrate" it onto a PLD, without needing chip manufacturers to design and manufacture dedicated integrated circuit chips. Furthermore, nowadays, instead of manually manufacturing integrated circuit chips, this programming is mostly implemented using "logic compiler" software. Similar to the software compiler used in program development, the original code before compilation must also be written in a specific programming language, called a Hardware Description Language (HDL). There are many HDLs, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, and RHDL (Ruby Hardware Description Language). Currently, the most commonly used are VHDL (Very-High-Speed ​​Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also understand that by simply performing some logic programming on the method flow using one of these hardware description languages ​​and programming it into an integrated circuit, the hardware circuit implementing the logical method flow can be easily obtained.

[0177] The controller can be implemented in any suitable manner. For example, it can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro)processor, logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicon Labs C8051F320. A memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art will also recognize that, in addition to implementing the controller in purely computer-readable program code form, the same functionality can be achieved by logically programming the method steps to make the controller take the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers. Therefore, such a controller can be considered a hardware component, and the means included therein for implementing various functions can also be considered as structures within the hardware component. Alternatively, the means for implementing various functions can be considered as both software modules implementing the method and structures within the hardware component.

[0178] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, a computer can be, for example, a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email device, game console, tablet computer, wearable device, or any combination of these devices.

[0179] For ease of description, the above devices are described separately by function as various units. Of course, in implementing this application, the functions of each unit can be implemented in one or more software and / or hardware.

[0180] Those skilled in the art will understand that one or more embodiments of this specification can be provided as a method, system, or computer program product. Therefore, the invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0181] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0182] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0183] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0184] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory. Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0185] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital character versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0186] This application can be described in the general context of computer-executable instructions, such as program modules, that are executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform a specific task or implement a specific abstract data type. This application can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.

[0187] The above description is merely an embodiment of this application and is not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.

Claims

1. A near-field communication method applied to an NFC tag device, comprising: The NFC tag device acquires the near-field communication trigger signal sent by the card reader device; Based on the near-field communication trigger signal, NFC tag information is sent to the card reader device; If a card presence detection signal is received from the card reader device before the NFC tag information is fully read, the device switches to a silent state. When the NFC tag device is in a silent state, it does not respond to the near-field communication commands issued by the card reader device, so that the card reader device can re-enter the polling card detection state. "Before the NFC tag information is fully read" means that the NFC tag device has started or is preparing to execute the process of sending tag information data, but before the NFC tag information is fully read.

2. The method according to claim 1, further comprising: Determine whether the card reader device is in a state of proximity to the NFC tag device; If a card presence detection signal is received from the card reader device before the tag information is fully read, the process of switching to a silent state includes: If the card reader device is close to the NFC tag device, and if a card presence detection signal is received from the card reader device before the tag information is read, then the device switches to a silent state.

3. The method according to claim 1, wherein if a card presence detection signal is received from the card reader device before the tag information is fully read, switching to a silent state includes: Detect whether the tag information has been completely read; If the tag information is not fully read, then it is checked whether a card presence detection signal is received from the card reader device; If a card presence detection signal is received from the card reader device, the system switches to silent mode.

4. The method according to claim 3, wherein detecting whether the tag information has been completely read includes: Detect whether the data at the target address in the storage unit used to store the tag information has been read; The target address is used to store the last data read from the tag information.

5. The method according to claim 3, further comprising: If no card presence detection signal is received from the card reader device before the NFC tag information is read, the normal response state is maintained.

6. The method according to claim 1, further comprising: After a preset duration of silence, the system returns to its normal response state.

7. The method according to claim 1, further comprising, after switching to the silent state: Detect whether a field signal is emitted by the card reader device; If no presence signal is received, the system will revert from the silent state to the normal response state.

8. The method according to claim 2, wherein the NFC tag device has a sensor module; The step of determining whether the card reader device is close to the NFC tag device includes: Based on the distance signal detected by the sensor module, it is determined whether the card reader device is close to the NFC tag device.

9. An NFC tag device, comprising a control module and an NFC tag module; the control module is communicatively connected to the NFC tag module; The NFC tag module is used to send NFC tag information to the card reader device based on the near-field communication trigger signal emitted by the card reader device; The control module is used to switch the NFC tag device to a silent state if it receives a card presence detection signal from the card reader device before the tag information is completely read; when the NFC tag device is in a silent state, it does not respond to commands issued by the card reader device so that the card reader device can re-enter the tag polling and card detection state; "before the tag information is completely read" means that the NFC tag device has started or is preparing to execute the process of sending tag information data, but before the tag information is completely read.

10. The device according to claim 9, wherein the NFC tag device further comprises a sensor module for measuring distance, the sensor module being communicatively connected to the control module; The sensor module is used to measure the distance between the card reader device and the NFC tag device; The control module is used to determine whether the card reader device is close to the NFC tag device based on the distance. If the card reader device is close to the NFC tag device and receives a card presence detection signal from the card reader device before the tag information is read, then the NFC tag device is switched to a silent state.

11. The device according to claim 9, wherein the control module is further configured to restore the NFC tag device to the normal response state after the NFC tag device has been in the silent state for a preset time; Alternatively, the control module is further configured to restore the NFC tag device from the silent state to the normal response state if the NFC tag device fails to acquire the near-field communication field signal after being in the silent state.

12. A near-field communication device, comprising: The signal acquisition module is used to acquire the near-field communication trigger signal emitted by the card reader device; The information sending module is used to send NFC tag information to the card reader device based on the near-field communication trigger signal; The state switching module is used to switch to a silent state if a card presence detection signal is obtained from the card reader device before the NFC tag information is read completely; when the device is in the silent state, it does not respond to the near-field communication command issued by the card reader device so that the card reader device can re-enter the polling card detection state; "before the NFC tag information is read completely" means that the NFC tag device has started executing or is preparing to execute the process of sending tag information data, but before the NFC tag information is read completely.

13. A computing device, comprising: Memory and processor; The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions, which, when executed by the processor, implement the steps of the method according to any one of claims 1 to 8.

14. A computer-readable storage medium storing computer instructions that, when executed by a processor, implement the steps of the method according to any one of claims 1 to 8.

15. A computer program product comprising a computer program / instructions that, when executed by a processor, implement the steps of the method according to any one of claims 1 to 8.