Service execution method based on NFC dual mode and NFC device

By introducing a card reader device detection module into the NFC device, identifying close objects and switching modes, the problem that existing NFC technology is difficult to support two-way flexible interaction scenarios is solved, and more efficient and secure data interaction and service execution are achieved.

CN120200637APending Publication Date: 2025-06-24ANT BLOCKCHAIN TECHNOLOGY (SHANGHAI) CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510289298.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-11
Publication Date
2025-06-24

AI Technical Summary

Technical Problem

The existing NFC technology is difficult to support two-way flexible interaction scenarios, resulting in low service security and reduced communication efficiency. Equipment manufacturers need to avoid risks through restricting functions, which limits the further application of NFC technology.

Method used

A service execution method based on NFC dual-mode is provided, by introducing a card reader device detection module into the NFC device, identifying close objects, stopping broadcast signals, switching modes, and providing tag data to avoid mist touching and improve interaction efficiency.

Benefits of technology

The service trigger conditions are clarified, the efficiency of data interaction and business execution is improved, the error contact problem between dual-mode NFC devices is avoided, and the correctness and security of business logic is ensured.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120200637A_ABST
    Figure CN120200637A_ABST
Patent Text Reader

Abstract

The invention provides an NFC dual-mode-based service execution method and NFC equipment, the method is applied to the NFC equipment, the NFC equipment is dual-mode equipment of a card reader mode and a card simulation mode, the NFC equipment at least comprises a card reading equipment detection module, and in the card reader mode, in response to the fact that the card reading equipment detection module recognizes that the card reading equipment is close, the NFC equipment detects that the card reading equipment is close. And when the card reading equipment sends a detection signal, stopping broadcasting the signal to the outside, after the card reading equipment sends the detection signal, sending an activation signal to the card reading equipment, switching to a card simulation mode, receiving a standard reading signal sent by the card reading equipment, determining pre-stored label data, and returning the pre-stored label data to the card reading equipment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This specification relates to the field of near field communication technology, and particularly to a service execution method based on NFC dual mode and an NFC device. Background Art

[0002] Near Field Communication (NFC) is a short-range wireless communication technology. NFC devices transmit data non-contact through radio frequency signals. NFC technology enables fast device pairing, has low power consumption, and supports both active and passive modes. Due to its security and convenience, it is widely used in the Internet of Things and consumer electronics fields, such as in service scenarios like mobile payment, card verification, and device pairing.

[0003] In the prior art, when two NFC devices both support dual-mode interaction for business execution, the interaction between NFC devices may be chaotic. For example, device A can actively send a read signal to activate a passive-mode device to obtain data, and can also provide data in the passive mode (card emulation). When device B, which also supports dual mode, enters the detection range of device A, device B may be activated by the RF field of A and switch to the card mode, and device B may also actively trigger the card mode of device A. That is to say, which device is activated is random, and misoperation is likely to occur.

[0004] This scenario will disrupt the business logic (such as the inversion of the master-slave role in payment), leading to data leakage or operation chaos. Especially when there is no clear master-slave negotiation mechanism, devices may repeatedly switch modes due to competing for the RF field, further resulting in communication failure or a sharp increase in power consumption. Therefore, generally, only the NFC device on the non-user side can be disabled to be set to only one mode, and only the user-side NFC device (such as a mobile phone with NFC function) supports dual mode.

[0005] It can be seen that the current NFC technology is difficult to support large-scale applications in two-way flexible interaction scenarios, which not only leads to low service security and reduced communication efficiency, but also forces device manufacturers to avoid risks by restricting functions (such as fixing a single mode), limiting the further application of NFC technology. Summary of the Invention

[0006] In view of this, this specification provides a service execution method based on NFC dual mode and an NFC device to solve the deficiencies in the related art.

[0007] Specifically, this specification is implemented through the following technical solutions:

[0008] According to the first aspect of the embodiments of the present specification, a service execution method based on NFC dual mode is provided. The method is applied to an NFC device. The NFC device is a dual-mode device in card reader mode and card emulation mode, and the NFC device at least includes a card reader device detection module, including:

[0009] In card reader mode, identify a proximity object through the card reader device detection module;

[0010] In response to the card reader device detection module identifying the approach of a card reader device, stop broadcasting signals externally;

[0011] In response to the detection signal sent by the card reader device, send an activation signal to the card reader device and switch to card emulation mode;

[0012] Receive the standard read signal sent by the card reader device, determine the pre-stored tag data, and return it to the card reader device.

[0013] According to the second aspect of the embodiments of the present specification, an NFC device is provided. The NFC device includes: an antenna, an NFC chip, an NFC signal wave detection module, a processor, and a card reader device detection module. The antenna, the NFC chip, and the processor are connected to form a first circuit. The antenna, the NFC signal wave detection module, and the processor are connected to form a second circuit. The card reader device detection module is connected to the processor, where:

[0014] The NFC signal wave detection module is configured to sample the antenna side voltage and send it to the processor;

[0015] The card reader device detection module is configured to detect whether a card reader device is approaching around the NFC device, and when detecting the approach of a card reader device, notify the processor;

[0016] The NFC chip is configured to switch between card emulation mode and card reader mode according to the switching instruction of the processor; and receive the control instruction of the processor, broadcast a detection signal, send an activation signal, send a standard read signal, or stop broadcasting signals externally through the antenna; when in card emulation mode, determine the pre-stored tag data according to the standard read signal sent by the card reader device received on the antenna side, and return it to the card reader device;

[0017] The processor is configured to, when in the card reader mode, identify an approaching object through the card reader device detection module; in response to the card reader device detection module notifying that a card reader device is approaching, send a control instruction to the NFC chip to stop broadcasting signals externally; in response to the detection signal of the card reader device sent by the NFC signal wave detection module, send a control instruction to the NFC chip to send an activation signal, and switch the NFC chip to the card emulation mode by means of a switching instruction.

[0018] According to the third aspect of the embodiments of the present specification, a service execution device based on NFC dual mode is provided. The device is applied to an NFC device, which is a dual-mode device with a card reader mode and a card emulation mode, and the NFC device at least includes a card reader device detection module, wherein:

[0019] An identification module, when in the card reader mode, identifies an approaching object through the card reader device detection module;

[0020] An anti-misoperation module, in response to the card reader device detection module identifying that a card reader device is approaching, stops broadcasting signals externally;

[0021] A switching module, in response to the detection signal sent by the card reader device, sends an activation signal to the card reader device and switches to the card emulation mode;

[0022] A sending module, receives the standard read signal sent by the card reader device, determines the pre-stored tag data, and returns it to the card reader device.

[0023] According to the fourth aspect of the embodiments of the present specification, a computer-readable storage medium is provided, on which a computer program is stored. When the program is executed by a processor, the steps of the method described in the first aspect are implemented.

[0024] According to the fifth aspect of the embodiments of the present specification, a computer program product is provided, including a computer program / instructions. When the computer program / instructions are executed by a processor, the steps of the method described in the first aspect are implemented.

[0025] In the technical solution provided in this specification, a dual-mode NFC device that can operate in a card reader mode and a card emulation mode includes at least a card reader device detection module, which is initialized to the card reader mode and monitors whether a card reader device is approaching through the card reader device detection module. When a card reader device is detected, it stops broadcasting external signals, and after sending an activation signal to the card reader device, it switches to the card emulation mode to provide the tag data stored in itself to the card reader device in the identity of a card. It can be seen that when there is no card reader device approaching, this NFC device is a card reader that broadcasts standard read signals and can support obtaining tag data from a physical card. When it is determined through the card reader device detection module that a card reader device is approaching, it no longer broadcasts data and switches itself to the card emulation mode to provide tag data, preventing the dual-mode card reader device from being erroneously activated as a card. That is to say, even if the card reader device also supports active and passive NFC modes, when approaching the NFC device provided in this specification in the active NFC mode, it will not be erroneously activated, and the NFC device provided in this specification can also read the data in other cards in the card reader mode when there is no card reader device approaching. This avoids the situation of chaotic service invocation in the interaction between dual-mode NFC devices, not only clarifies the service trigger conditions, but also improves the efficiency of data interaction and business execution. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 is a schematic flowchart of a service execution method based on NFC dual mode shown in an exemplary embodiment of this specification;

[0027] Figure 2 is a schematic diagram of a broadcast radio frequency signal shown in an exemplary embodiment of this specification;

[0028] Figure 3 is a schematic diagram of stopping broadcasting external radio frequency signals shown in an exemplary embodiment of this specification;

[0029] Figure 4 is a schematic diagram of sending an activation signal shown in an exemplary embodiment of this specification;

[0030] Figure 5 is a schematic structural diagram of sending an activation signal multiple times shown in an exemplary embodiment of this specification;

[0031] Figure 6 is a schematic flowchart of an interaction process for a service executed based on an NFC device shown in an exemplary embodiment of this specification;

[0032] Figure 7 is a schematic structural diagram of an NFC device shown in an exemplary embodiment of this specification;

[0033] Figure 8It is a schematic structural diagram of an NFC device shown in an exemplary embodiment of this specification;

[0034] Figure 9 It is a schematic structural diagram of an NFC device shown in an exemplary embodiment of this specification;

[0035] Figure 10 It is a schematic circuit diagram corresponding to the NFC signal wave detection module shown in an exemplary embodiment of this specification;

[0036] Figure 11 It is a schematic circuit diagram corresponding to the NFC signal wave detection module shown in an exemplary embodiment of this specification;

[0037] Figure 12 It is a schematic structural diagram of a service execution device based on NFC dual-mode shown in an exemplary embodiment of this specification. Detailed implementation manners

[0038] Near Field Communication (NFC) is a short-range high-frequency wireless communication technology that allows simple and secure data exchange between electronic devices. The roots of NFC technology can be traced back to the radio frequency identification (RFID) technology in the late 1980s and early 1990s. With the wide promotion and standardization of NFC technology, it has gradually become one of the key technologies in modern mobile devices.

[0039] NFC technology is based on the principle of electromagnetic induction and operates at a frequency of 13.56 MHz, supporting a communication distance of up to about 10 centimeters. It realizes data transmission through the interaction of antennas between two devices. For multi-mode NFC devices, it usually includes the following several modes:

[0040] Reader mode: The NFC device acts as a reader to read or write information on the NFC tag.

[0041] Card emulation mode: The NFC device emulates a smart card and can be used in scenarios such as payment and access control systems.

[0042] Peer-to-peer mode: The NFC device can directly interact with another NFC device for data, such as file transfer or business card exchange.

[0043] Typical NFC devices mainly include an antenna and an NFC chip. Among them, the antenna is responsible for transmitting and receiving radio frequency signals and is the basis for energy transmission and data communication. The NFC chip is the core processing unit that manages all communication tasks related to the NFC device to ensure that the device can efficiently and securely interact with other NFC devices or tags.

[0044] In some cases, NFC chips can be further divided into tag chips (NFC Tag chips) and reader chips (NFC Reader chips). Among them, tag chips are used to store data and respond to requests from external readers, and return the stored data through the antenna. Reader chips are used to transmit signals through the antenna to read the data stored in external NFC tags or communicate with other NFC devices through the antenna.

[0045] Specifically, the NFC antenna is responsible for transmitting and receiving radio frequency signals in the NFC device. It is usually composed of a small loop antenna. The aforementioned antenna for energy transfer means that for passive NFC tags, the NFC tag can capture energy from the radio frequency field generated by the reader through the antenna and convert it into electrical energy to activate the circuit inside the NFC tag, that is, the NFC tag obtains the energy transmitted by the reader. For example, when the reader sends a detection signal to the NFC tag, the NFC tag reflects the modified signal back to the reader by adjusting its antenna load (i.e., load modulation Load Modulation), completing the process of transmitting the tag data stored in the NFC tag to the reader.

[0046] The NFC chip can be regarded as integrating the processing units of tag chips and reader chips, and is responsible for managing and controlling the entire communication process of the NFC device. The NFC chip needs to ensure compatibility with other NFC devices, that is, the communication process complies with the communication protocols specified by standards such as ISO / IEC 14443 and ISO / IEC 18092. And generally, the NFC chip supports functions such as data encryption and authentication to improve the security of stored data and the security of the business execution process. For example, NFC devices applied in mobile payment or other sensitive scenarios.

[0047] In addition, for multi-mode NFC devices, the NFC device is not just an NFC tag or an NFC reader. The NFC device can also switch between multiple modes. Therefore, the NFC chip also supports switching between multiple modes, that is, it supports switching between reader mode, card emulation mode, and peer-to-peer mode, enabling the NFC device to be flexibly used in different application scenarios.

[0048] Furthermore, in the aforementioned classification of NFC chips, it includes tag chips and reader chips.

[0049] The specific tag chip is a microcontroller embedded in the NFC tag for storing and transmitting data. NFC tags are usually passive devices and thus rely on externally provided energy to operate. Depending on different types (such as Type 1 to Type 4), the tag chip can provide storage space ranging from a few hundred bytes to several KB. Also, the tag chip generally does not require a complex programming interface, and users can interact with it through simple read and write commands. Of course, in some advanced tag chips, data encryption and authentication are also supported to prevent unauthorized access.

[0050] The reader chip is used to read the tag data in the NFC tag, or write tag data into the NFC tag, or communicate with other NFC devices. Therefore, the reader chip generally has high sensitivity and can detect the weak reflected signals of other NFC devices, so as to identify and read the nearby NFC tags.

[0051] Based on the components of the above NFC devices, the following are several common hardware connection relationships of the components in NFC devices:

[0052] First, multi-mode NFC devices, such as the NFC module in a smartphone. In this case, the antenna is generally located on the back of the phone and is responsible for transmitting and receiving radio frequency signals. The NFC chip is integrated on the phone's motherboard and is responsible for handling all NFC-related communication tasks, including interactions with NFC tags and readers. The antenna is connected to the NFC chip through a microstrip line or coaxial cable, and the NFC chip then communicates with the processor through an I2C or SPI interface.

[0053] Second, card reading devices, generally dedicated NFC readers, such as POS machines integrated with NFC readers, access control card readers, smart home door locks, vehicles supporting card keys, etc. In this case, the antenna is installed inside the card reader housing, usually larger and optimized in design to ensure a relatively long communication distance. The reader chip is integrated on the card reader's circuit board and is responsible for managing communication with the physical card. The antenna is directly soldered or connected to the reader chip through a coaxial cable, and the reader chip then communicates with the processor through a USB or other interface.

[0054] Second, NFC tags, generally referring to physical cards or NFC devices in card emulation mode. Taking the physical card as an example, the antenna is embedded inside the physical card, usually a simple loop antenna, used to capture energy and reflect signals. The tag chip is mounted on the PCB of the physical card, or encapsulated with other circuits and the antenna on the physical card, mainly responsible for storing data and communicating with the reader. Usually due to volume limitations, the antenna is directly soldered to the tag chip to form a complete passive tag.

[0055] These combined structures demonstrate the flexibility and adaptability of NFC technology in different application scenarios. Whether it is a smartphone, a card reader or a simple NFC tag, each device achieves efficient and reliable near-field communication through reasonable hardware design and connection methods.

[0056] In addition, when the card reader is working, it needs to actively broadcast a standard read signal to activate the passive NFC tag and charge the NFC tag to complete the data acquisition process. However, even if the transmission power of the standard read signal is not high, it still needs to last for a long time to maintain data transmission. Therefore, when the card reader maintains the broadcast of the standard read signal, it needs to continue to consume more power to transmit the radio frequency field. For battery-powered card readers, the continuous broadcast of standard signals has a heavy burden on energy consumption and will significantly shorten the battery life of the card reader. Even for card readers that use an external power supply, if the application scenario is that there is no NFC tag close to the card reader most of the time, the continuous broadcast of standard read signals is also a waste of energy and increases operating costs.

[0057] Therefore, in general, when the card reader device does not perform business for a period of time, it will switch to low-power mode, namely Low Power Card Detection (LPCD) mode. LPCD mode is a technology specially designed to reduce the energy consumption of NFC devices, especially in application scenarios that require long standby time, which can effectively improve the standby time. Compared with traditional card readers that usually need to continuously generate radio frequency fields to detect nearby tags, LPCD mode significantly reduces energy consumption without sacrificing performance by introducing an intelligent detection mechanism.

[0058] Specifically, the core idea of ​​LPCD mode is to reduce unnecessary energy consumption by periodically generating detection signals and entering a low-power state between two detections. The following is its specific workflow:

[0059] First, the card reader generates a short-duration radio frequency field at a certain period, such as once per second, to detect whether there is an NFC tag nearby. The duration of each detection is very short, usually only a few milliseconds to tens of milliseconds, which can minimize energy consumption.

[0060] After that, after each detection signal is transmitted, the card reader enters a low-power standby mode. That is, during the interval between two detections, the main circuit of the card reader is turned off or enters a sleep mode, and only the necessary monitoring circuit is retained to wait for the next detection cycle. This low-power standby state can significantly reduce energy consumption and extend the battery life of battery-powered card readers.

[0061] Then, once an NFC tag or physical card approaches the card reader device, the most recently transmitted detection signal will be acquired by the antenna in the NFC tag, and the antenna load will modulate and return an activation signal. For example, the physical card returns its unique identifier (UID, Unique Identifier), or the NFC device returns a custom wake-up pulse signal.

[0062] Finally, the card reader device monitors the amplitude change of the RF field through the antenna, or detects the activation signal returned by the NFC tag by monitoring its own demodulation circuit. Based on this activation signal, it determines that an NFC tag has entered its communication range. Then it immediately exits the low-power LDPC mode and switches to the card reader mode (or the standard operating mode of the card reader device). In the card reader mode, the card reader device can increase the RF field strength to ensure stable communication, and initialize based on the protocol, and start continuously sending standard read signals through the antenna. Of course, in some cases, to prevent multi-card conflicts, the card reader device can also execute an anti-collision algorithm to determine the physical card to be read from multiple physical cards.

[0063] Currently, this mode of the card reader device transmitting detection signals periodically in the low-power mode and then starting to send standard read signals when the NFC tag returns an activation signal ensures the quick wake-up of the card reader device, so that users will not feel obvious delays during actual use. It achieves a balance between efficiency and power consumption, which can not only meet the requirement of the card reader device for long-term standby, but also maintain the business execution efficiency.

[0064] However, at least one party in the above interaction process is a single-mode NFC device. In more complex business scenarios, multi-mode NFC devices are required to execute services, and support complex services by flexibly switching between the card reader mode and the card emulation mode. This gives rise to the scenario of interaction between multi-mode NFC devices. For example, to improve security, two-way authentication of identity is required between a smart door lock and a mobile phone. For multi-scenario compatibility, a POS machine can not only act as a card reader device, but also provide data as an emulated card, etc. The need for interaction between dual-mode NFC devices stems from the flexibility of business scenarios and the trend of decentralization. Its core advantage lies in breaking the one-way communication limit, realizing equal cooperation between devices, and can also reduce the complexity of system design and support multi-functional integration through hardware reuse.

[0065] However, there is also a problem of difficult mode selection in the interaction between multi-mode NFC devices. Taking the dual-mode NFC device with more prominent problems as an example, two NFC devices that support active and passive modes are prone to role conflict problems when cooperating, that is, the two NFC devices try to activate each other at the same time, resulting in communication failure.

[0066] Taking the above payment business scenario as an example, in the current payment business, the NFC devices used by merchants need to support both the role of an NFC tag to provide the ability for consumers' mobile phones to perform NFC touch payments, and the role of a card reader device to support consumers' direct swiping of physical cards. During the execution of the business, it is difficult to ensure that the NFC device is in the mode required by the business design, resulting in business logic errors or requiring additional operations from the user.

[0067] For example, for the NFC device on the merchant side, when it is recognized by the NFC card reader on the mobile phone side in passive mode, the consumer's mobile phone acts as a card reader to obtain the information in the NFC tag of the NFC device to trigger subsequent services. This can effectively solve the problem of needing to issue cards on the mobile phone, and the service can be executed even if there is no virtual card set on the mobile phone. Also, it can avoid the problem that the user still needs to manually select a card when there are multiple virtual cards set in the mobile phone NFC card package. However, the NFC device on the merchant side still needs to retain the ability to act as a card reader to support the situation where the user uses a physical card or the user uses a virtual card on the mobile phone to execute the service. Therefore, the NFC device on the merchant side cannot determine whether the next service interaction is with a card reader device or a physical card. If the NFC device always operates in passive mode, when the consumer interacts with a physical card, the NFC device cannot be triggered to read data, resulting in the inability to conduct the service. Therefore, for the dual-mode NFC device on the merchant side, it needs to default to the card reader mode to support interactions with physical cards.

[0068] When the NFC device defaults to the card reader mode, it will cause the problem that when the consumer uses the mobile phone (as a card reader device) to enter the usage scenario, the NFC device may trigger the mobile phone to switch to a virtual card. Especially when there are multiple virtual cards set in the user's card package, the user will find that in the expected service process, a screen suddenly appears that requires them to select a virtual card in the card package, resulting in ambiguity in use for the user. Obviously, the problem of accidental touch between dual-mode NFC devices is difficult to solve, making it difficult to promote the use of dual-mode NFC devices and difficult to design services using the advantage of flexible switching between dual modes.

[0069] Based on this, this specification proposes a service execution solution based on NFC dual modes, which will be introduced in detail below with reference to the accompanying drawings.

[0070] Figure 1 It is a flowchart showing a service execution method based on NFC dual modes shown in an exemplary embodiment of this specification. As Figure 1 shown, this method is applied to an NFC device. The NFC device is a dual-mode device with a card reader mode and a card emulation mode, and the NFC device at least includes a card reader device detection module. This method may include the following steps:

[0071] Step 100, in the card reader mode, identify the approaching object through the card reading device detection module.

[0072] In one or more embodiments of the present specification, the NFC device is an NFC device that can switch between active and passive dual modes. Among them, the active mode is the card reader mode, and the passive mode is the card emulation mode. When the NFC device is in the card reader mode, the NFC device can be referred to as a card reading device, and the NFC device can broadcast a standard read signal outward, or broadcast a detection signal periodically in the LPCD mode. When the NFC device is in the card emulation mode, the NFC device can be called an emulated card. Of course, as an emulated card, it will not actively send signals to the outside world. Then the NFC device stops broadcasting signals to the outside world and waits for the standard read signal sent by the external card reading device. After the label chip of itself is sufficiently energized, the label data is returned. Among them, the standard read signal is generally a radio frequency electromagnetic field of 13.56 MHz.

[0073] As described above, in the embodiments provided in the present specification, the NFC device is a device that supports interaction with external emulated cards, physical cards or card reading devices on the premise of avoiding accidental touch problems. Therefore, after the NFC device is powered on and started, it defaults to running in the card reader mode to avoid being unable to interact and execute services when a physical card or emulated card approaches. And, after the NFC device is started, it also needs to pass through the card reading device detection module to identify the approaching object, so as to determine whether a mode switch is required based on the type of the identified approaching object.

[0074] Specifically, after the NFC device is powered on, it broadcasts a standard read signal in the default card reader mode. At the same time, start the circuit of the card reading device detection module and receive the detection result returned by the card reading device detection module.

[0075] Optionally, in the embodiments of the present specification, according to the service trigger frequency in the application service scenario of the NFC device, the way of broadcasting the standard read signal when the NFC device works in the card reader mode can be preset. For example, when the NFC device is in a scenario that requires high-frequency execution of services, the NFC device can continuously broadcast the standard read signal to improve the service execution efficiency. Or when the NFC device is in a scenario with low-frequency triggered services, the NFC device can be set to broadcast the standard read signal periodically. In this way, during the service execution process, the periodically broadcast standard read signal is equivalent to the signal for activating the physical card or emulated card. When it is determined that there is a physical card or emulated card nearby, the service process of reading data with a standard card reading device is used to execute the service.

[0076] For example, if the NFC device is a card reader in a community access control system, the NFC device can continuously broadcast a standard read signal to improve the efficiency of users using the access control and avoid congestion. Or, if the NFC device is a door lock in a smart home, since the frequency of users using the door lock is low and the door lock is generally powered by batteries with higher energy consumption requirements, the NFC device can periodically send a standard read signal to reduce energy consumption.

[0077] In addition, in the embodiments of this specification, the function of the card reader detection module is to detect the card reader approaching the NFC device. Generally speaking, a card reader must be a device with the ability to actively emit radio frequency signals, so a certain proportion of metal must be included in the card reader. Therefore, in this specification, the card reader detection module can adopt an electromagnetic sensor. When the metal contained in the card reader enters the magnetic field of the electromagnetic sensor and generates a new opposite secondary magnetic field, the electromagnetic sensor can determine whether the approaching object is a card reader by monitoring the change of the magnetic field. Or, in this specification, the card reader detection module can also adopt an infrared detection sensor. The infrared detection sensor can emit infrared rays in a matrix form and determine the volume of the approaching object through the reflected optical signal. Since a card reader is usually larger in volume than a physical card, it is determined whether the approaching object is a card reader by identifying whether the volume of the approaching object exceeds the upper threshold.

[0078] Of course, in the embodiments of this specification, the specific principle of the card reader detection module for identifying a card reader and the specific method adopted are not limited. As long as it is a method that can distinguish a card reader from a physical card in any dimension, it can be applied in the embodiments of this specification as the card reader detection module. For example, the two sensors mentioned above distinguish a card reader from a physical card in terms of the difference in the content of metal objects and the difference in volume.

[0079] Optionally, in order to improve the accuracy of identification, in the embodiments of this specification, the card reader detection module can also combine multiple detection methods to identify the type of the approaching object to determine whether the approaching object is a card reader or a physical card.

[0080] It should be noted that the function of the card reader device detection module in the embodiments of this specification is to identify whether the approaching object is a card reader device, so as to determine whether to switch to the card emulation mode in the subsequent steps, and prevent the signal broadcast by the NFC device in the card reader mode from erroneously activating the passive mode of the approaching card reader device. Therefore, the recognition distance of the card reader device detection module should be greater than the effective distance at which the radio frequency signal emitted by the NFC device in the card reader mode activates the physical card. For example, if the radio frequency signal emitted by the NFC device can effectively activate the physical card or activate the dual-mode NFC device to switch to the passive mode at a distance of 10 cm, then the recognition distance of the card reader device detection module for the card reader device should be greater than 10 cm.

[0081] On the one hand, the NFC device can be optimized in terms of the recognition distance and sensitivity of the card reader device detection module to support the required recognition distance. On the other hand, the NFC device can also reduce the power of the radio frequency signal emitted in the card reader mode to reduce the effective distance of the radio frequency signal for performing operations. For example, by adjusting the transmission power, the radio frequency signal can only effectively activate the physical card at a distance of 2 cm. Then the recognition distance of the card reader device detection module can also be correspondingly reduced. Of course, in order to ensure that when the card reader device approaches, the recognition distance of the card reader device detection module for the card reader device is greater than the distance at which the standard read signal emitted by the NFC device activates the card reader device to jump to the passive mode, the NFC device can transmit the standard read signal according to the preset low power. First, different card reader devices can be used to approach the card reader device detection module to test the effective recognition distance of the card reader device detection module for the card reader device, and determine the maximum distance at which the standard read signal can activate the card reader device. For example, if it is tested that the card reader device detection module can effectively recognize various card reader devices at 10 cm, then the activation distance of the standard read signal cannot be greater than 10 cm. The preset power can be determined according to the relationship between power and transmission distance. So that the activation distance of the standard read signal emitted by the NFC device at the preset power is less than 10 cm, such as 2 cm. Here, the activation distance refers to the distance at which the standard read signal emitted by the NFC device can effectively activate the physical card and return the tag data.

[0082] Furthermore, since the NFC device in the embodiments of this specification requires several subsequent steps to accurately determine that the approaching object is a card reader device, and this process takes a certain amount of time, in order to avoid the situation where although the card reader device is recognized, there is not enough time to switch to the emulated card mode, in the embodiments of this specification, there should be a certain distance between the recognition distance of the card reader device detection module and the effective distance of the radio frequency signal. For example, if the effective distance of the radio frequency signal is 2 cm and the recognition distance of the card reader device detection module is 7 cm, then when the card reader device approaches, the NFC device can recognize the card reader device at a distance of 7 cm, and switch to the card emulation mode through subsequent steps before the card reader device enters 2 cm.

[0083] Step 102: Stop broadcasting the external signal in response to the card reader device detection module identifying the approach of a card reader device.

[0084] In one or more embodiments of this specification, when the NFC device identifies the approach of a card reader device through the card reader device detection module, to avoid the aforementioned problem of accidental touch, it can first stop broadcasting the radio frequency signal externally.

[0085] Optionally, in one or more embodiments of this specification, when the NFC device is in the card reader mode, to reduce power consumption, it can choose to broadcast the standard read signal periodically. On the other hand, to reduce the charging time of the physical card, the duration of the standard read signal can be set relatively long. In this way, even if the charging speed cannot reach the level of continuously broadcasting the standard read signal, the charging speed can still be increased as much as possible to achieve a balance between power consumption and service execution efficiency. For example, the transmission duration of the standard read signal can be 4 milliseconds. In this way, in most cases, after two cycles, the physical card will have enough energy to execute the service.

[0086] The broadcast period of the standard read signal can also be set as needed, which is not limited in this specification. For example, the broadcast period can be set according to the service trigger frequency in the application scenario of the NFC device. The lower the service trigger frequency, the longer the broadcast period. The card reader device detection module works continuously. Once the NFC device determines the approach of a card reader device, regardless of whether the NFC device is in the state of transmitting the radio frequency signal or in the transmission interval, the NFC device can determine to stop broadcasting the radio frequency signal externally.

[0087] Furthermore, in the embodiments of this specification, if in order to further reduce power consumption, the NFC device can also operate in the existing LPCD mode. When there is no service execution triggered within a period of time, it switches to the low-power mode and only periodically sends detection signals. As mentioned above, the duration of the detection signal is shorter and thus the power consumption is lower. In the embodiments of this specification, the transmission duration of the detection signal can be 35 microseconds.

[0088] In addition, in the embodiments of this specification, in the scenario of broadcasting a detection signal, since the detection signal cannot support service execution, there is also a problem that the activation process takes a long time during charging, resulting in a long service process. To balance energy consumption and simplify the service process, the NFC device can also alternately broadcast a detection signal and a standard read signal. Of course, the ratio of broadcasting the detection signal to broadcasting the standard read signal can be set as needed. If it is necessary to generally reduce the service time, when periodically broadcasting a radio frequency signal, every time a detection signal is transmitted, a standard read signal is transmitted next time, so that the detection signal and the standard read signal are alternately broadcast at a ratio of 1:1. If more emphasis is placed on reducing energy consumption, a read signal can be broadcast after broadcasting the detection signal a specified number of times. For example, a standard read signal is broadcast every 3 times the detection signal is broadcast.

[0089] Of course, it should be noted that the power of the standard read signal and the power of the detection signal can be the same, or the power of the detection signal can also be lower than that of the standard read signal to further reduce energy consumption.

[0090] Figure 2 It is a schematic diagram of the radio frequency signal broadcast provided in this specification. Among them, the horizontal axis is the time axis, and the vertical axis is the energy, that is, the voltage converted from the radio frequency signal received by the antenna. It can be seen that 3 detection signals are received and 1 standard read signal is received. And the transmission powers of the two signals are significantly different, but the durations are similar. The threshold voltage refers to the voltage threshold that can identify the signal sent by the NFC device to distinguish the background electromagnetic noise from the signal. At Figure 2 any time point, as long as the detection module of the card reader device recognizes that the card reader device is approaching, the transmission of the radio frequency signal is stopped, as Figure 3 shown.

[0091] Figure 3 It can be seen in that the time point when the NFC device determines that the card reader device is approaching is exactly within the duration of the transmission of the radio frequency signal. To avoid the aforementioned problem of accidental touch, the external broadcast of the radio frequency signal can be immediately stopped. The dotted waveform indicates the video signal that is no longer being transmitted. That is, even when in the transmission state, as long as it is recognized that there is a card reader device in the near field, the transmission of the radio frequency signal is stopped and waiting for the radio frequency signal of the card reader device to be received begins.

[0092] Step 104: In response to the detection signal sent by the card reader device, send an activation signal to the card reader device and switch to the card emulation mode.

[0093] In one or more embodiments of this specification, since the card-reading device detection module also has a certain error rate in recognition, and also to avoid the occurrence of accidental touch problems as much as possible, the recognition distance set by the card-reading device detection module may be relatively far, and there may also be a situation where the card-reading device is recognized when it "passes by". Therefore, the NFC device may not switch to the card emulation mode first, but wait for the detection signal emitted by the card-reading device first. If a detection signal is received through the antenna, it indicates that there is indeed a card-reading device approaching and wants to obtain the tag data stored in itself. Therefore, the NFC device can return an activation signal and switch to the card emulation mode. On the contrary, if no detection signal is received through the antenna within the second duration, it can be determined that the card-reading device recognized by the card-reading device detection module in step 102 is not approaching to execute the service. Then, it can return to the state of step 100, continue to emit radio frequency signals externally in the card reader mode, and monitor the approaching card-reading devices. Among them, the second duration can be set as needed, and this specification does not make any restrictions.

[0094] Specifically, since the dual-mode NFC device receives or transmits in a time-sharing manner. After step 102, it no longer switches the working content, but only receives signals through the antenna. Once a detection signal sent by the card-reading device is received, it can be determined that there is a card-reading device in the LPCD mode approaching, and it is necessary to activate the card-reading device to make it switch to the standard state and send a standard read signal.

[0095] For example, taking a mobile phone with an NFC module as the card-reading device as an example, when the mobile phone is in the screen-on state, the NFC module operates in the LPCD mode and broadcasts detection signals at a fixed period. When approaching the NFC device in the embodiment of this specification, the NFC device can receive the detection signal and return an activation signal to the mobile phone. After receiving the activation signal, the NFC module of the mobile phone can determine that there is an NFC tag that needs to read data, and then send a standard read signal to this NFC device to execute the classic process of reading tag data from the NFC tag.

[0096] It should be noted that in step 102 of the embodiment of this specification, although the NFC device recognizes the card-reading device, it does not switch to the card emulation mode, but only stops broadcasting signals. Only when a detection signal is received in step 104, it is determined that there is indeed a working card-reading device approaching, and then it switches to the card emulation mode to work.

[0097] In addition to the situation where it may only be recognized when the card-reading device "passes by" as described above, it is also possible that the card-reading device is in a closed state. The card-reading device detection module in the embodiments of this specification is used to identify whether the approaching object is a card-reading device, rather than whether the card-reading device is in a startup state. Therefore, when a card-reading device in a closed state approaches the NFC device, the NFC device will not switch to the card emulation mode, but wait for the card-reading device to send a detection signal.

[0098] For example, when the user's mobile phone is in the screen-off state, the NFC module of the mobile phone usually stops sending signals to save energy. At this time, since the NFC module of the mobile phone is not running and the NFC device also stops sending signals externally, this means that even if the mobile phone and the NFC device are physically close, no relevant service process will be started because the NFC function is not activated.

[0099] However, this situation also provides the user with an opportunity to actively start the mobile phone. Since the user holds the mobile phone close to the NFC device but does not activate the service process expected by the user, it is equivalent to reminding the user to check the mobile phone. Then the user can manually light up the screen to activate the NFC module of the mobile phone, thereby allowing the NFC device to establish a connection with the mobile phone and complete the necessary interactions. In addition, in some cases, the mobile phone can also monitor the movement of the user's hand when holding the mobile phone, and automatically light up the screen when it recognizes that the user needs to use the mobile phone. For example, when the user holds the screen-off mobile phone in front of him / her, the mobile phone will automatically light up. Therefore, in some cases, the user does not need to manually light up the screen, and the mobile phone may also wake up from the screen-off state and switch to the screen-on state by itself. Once the screen is lit up, the NFC module of the mobile phone will also be activated accordingly, enabling the mobile phone to communicate with the NFC device and thus promoting the smooth progress of the service process.

[0100] Of course, due to the more complex actual service scenarios, it cannot be guaranteed that the card-reading device not in the working state will switch to the working state later, that is, the mobile phone changes from the screen-off state to the screen-on state. Therefore, if the card-reading device does not send a detection signal all the time, it can return to step 100 after waiting for the second time period to avoid affecting the execution of other services.

[0101] In addition, the card-reading device approaching the NFC device may also be a dual-mode NFC device. For a dual-mode NFC device, as described above, it transmits and receives in a time-sharing manner, and is generally in an activatable state only when transmitting a detection signal.

[0102] Therefore, in order to quickly activate the card-reading device, in this specification, when the NFC device determines that it has received the detection signal sent by the card-reading device, it synchronously sends an activation signal to the card-reading device. As Figure 4 shown Figure 4Schematic diagram for sending an activation signal provided in this specification. Here, the horizontal axis above represents the detection signal received by the NFC device antenna, which is the signal sent by the card reader device, and the horizontal axis below represents the activation signal sent by the NFC device. It can be seen that when the detection signal is received for the first time, that is, when the voltage of the antenna measurement circuit exceeds the threshold voltage, the NFC device synchronously returns an activation signal to the card reader device.

[0103] Furthermore, to ensure that the card reader device can be effectively activated by the activation signal, the NFC device can also send the activation signal multiple times.

[0104] Specifically, after the NFC device first determines that it has received the detection signal sent by the card reader device, in addition to synchronously transmitting an activation signal to the card reader device, it can also record the number of times the activation signal is sent. And when receiving the detection signal and returning the activation signal subsequently, it will record each time. When the recorded number of times the activation signal is sent reaches the preset number, it is determined that the card reader device has been activated, and no more activation signals are sent. Instead, it waits for the standard read signal sent by the card reader device. Of course, the preset number can be set as needed, and this specification does not limit it. Figure 5 Schematic diagram for sending the activation signal multiple times provided in this specification, similar to Figure 4 , where each activation signal is sent when the detection signal is received. Figure 5 If the preset number in

[0105] is 2, then even if the detection signal is received subsequently, no activation signal will be sent. Instead, it waits for the standard read signal.

[0106] In the embodiments of this specification, the sending duration of the activation signal can be determined according to the minimum duration of the detection signals sent by different card reader devices. For example, if the minimum sending duration of the detection signal is 5 microseconds, then the sending duration of the activation signal is set to 5 microseconds.

[0107] In this specification, the NFC device can also dynamically adjust the duration of the activation signal it sends according to the duration of the detection signal sent by the card reader device. Since the duration of the detection signal can be determined after the detection signal is received for the first time, the NFC device can adjust the duration of the activation signal it sends according to the duration of the detection signal, so that the duration of the activation signal sent covers the duration of the detection signal sent by the card reader device.

[0108] Step 106: Receive the standard read signal sent by the card reader device, determine the pre-stored tag data, and return it to the card reader device.

[0109] In one or more embodiments of this specification, after switching to the analog card mode, the NFC device can wait for the standard read signal sent by the card reader device. After receiving the standard read signal, it determines the pre-stored tag data and returns it to the card reader device, enabling the card reader device to perform operations based on the tag data. This process is the process of a card reader device reading an NFC tag in the standard NFC technology, and this specification will not elaborate further. It should be noted that in this specification, the tag data (tag data) is the data stored as an NFC tag. If there is an independent tag chip in the NFC device, the tag data is the data stored in the tag chip.

[0110] In addition, if the standard read signal sent by the card reader device is not received after waiting for the first duration after switching to the analog card mode, it may indicate two situations. One is that the card reader device has left the communication range of the NFC device after step 104, and the other is that the card reader device was not activated in step 104. Among them, the first duration can be set as needed, and this specification does not make any restrictions.

[0111] Therefore, in the embodiments of this specification, when the NFC device does not receive the standard read signal within the first duration after switching to the analog card mode, it can identify whether the card reader device is still in the near field through the card reader device detection module.

[0112] If it is determined through the card reader device detection module that the card reader device is still within the near field range, the NFC device can synchronously send an activation signal based on the detection signal sent by the card reader device to activate the card reader device again. That is, steps 104 and 106 are repeated.

[0113] If the card reader device cannot be identified through the card reader device detection module, it indicates that the card reader device has left. Then the NFC device can switch to the card reader mode and continue to broadcast the standard read signal according to the requirements of the card reader mode.

[0114] In the embodiments of this specification, after the NFC device returns the tag data to the card reader device, if the card reader device correctly receives the tag data, it will return a notification of correct reception to the NFC device. Then, in response to the notification from the card reader device indicating the reception of the tag data, the NFC device can also wait for a third period of time to allow the card reader device to leave the communication range and avoid repeating the execution of the service.

[0115] After that, after waiting for the third period of time, the card reader device can be identified again through the card reader device detection module. That is, whether there is still a card reader device around. If there is, steps 102-106 can be repeated. If not, switch back to the card reader mode and broadcast a standard read signal.

[0116] Optionally, generally, the same card reader device does not have a need to repeatedly obtain tag data within a short period of time. Therefore, it is rare for a card reader device to obtain the same tag data multiple times through the standard read signal. In order to prevent the situation where the card reader device has not left the communication range within the third period of time after obtaining the tag data, resulting in the situation of repeatedly reading the same tag data. In the embodiments of this specification, the NFC device can also determine whether the data carried by the detection signal or the characteristics of the detection signal match the detection signal of the card reader device that obtained the tag data last time when executing the reception of the detection signal in the repeated steps 102-106, so as to determine whether it is still the same card reader device that is repeatedly executing steps 102-106 with itself. If so, it can not respond to its standard read signal or no longer send the activation signal. Until no card reader device is identified, the NFC device switches to the card reader mode, or when another card reader device is identified, steps 102-106 are repeated.

[0117] In summary, in the technical solution provided in this specification, a dual-mode NFC device that can operate in a card reader mode and a card emulation mode includes at least a card reader device detection module, which is initialized to the card reader mode, monitors whether a card reader device is approaching through the card reader device detection module, stops broadcasting external signals when a card reader device is detected, and switches to the card emulation mode after sending an activation signal to the card reader device to provide the tag data stored in itself in the identity of a card. It can be seen that when no card reader device is approaching, the NFC device is a card reader that broadcasts a standard read signal and can support obtaining tag data from an emulated card or a physical card. When it is determined through the card reader device detection module that a card reader device is approaching, it no longer broadcasts data and switches itself to the card emulation mode to provide tag data, preventing the dual-mode card reader device from being incorrectly activated as an emulated card. That is to say, even if the card reader device also supports active and passive NFC modes, it will not be activated by the NFC device provided in this specification. The NFC device provided in this specification can also read data in other cards in the card reader mode when no card reader device is approaching, without causing confusion in service invocation, not only clarifying the service trigger conditions, but also improving the efficiency of data interaction and service execution.

[0118] Figure 6 It is an interaction flowchart for executing services based on an NFC device provided in this specification. Figure 6 It also exemplarily shows a card reader device and a physical card to illustrate the steps executed by the NFC device when facing different devices, where:

[0119] Step 600: After the NFC device is started, it defaults to running in the card reader mode and broadcasts a standard read signal and a detection signal. Among them, the signal emission strategy of the NFC device can refer to the foregoing Figure 1 In the embodiments of emitting a standard read signal and a detection signal in the card reader mode, this specification will not elaborate here.

[0120] Step 601: The NFC device determines whether the card reader recognition module recognizes that a card reader device is approaching. If so, it executes step 602; otherwise, it executes step 609. That is to say, if the approaching is a physical card, steps 609-611 are executed in the card reader mode; if the approaching is a card reader device, steps 602-608 are executed.

[0121] Step 602: The NFC device stops broadcasting signals.

[0122] Step 603: The card reader device periodically sends a detection signal in the LPCD mode.

[0123] Step 604: The NFC device synchronizes with the detection signal period and returns an activation signal. When the number of times of emitting the activation signal reaches a preset number, it switches to the card emulation mode.

[0124] Step 605: The card reader device exits the LPCD mode and sends a standard read signal.

[0125] Step 606: The NFC device returns the tag data.

[0126] Step 607: After receiving the tag data, the card reader device returns a notification.

[0127] Step 608: After waiting for the third duration, the NFC device switches to the card reader mode and returns to the state of step 600. At this time, it can detect whether there is a card reader device. If so, it continues to execute steps 602 - 607. If not, it continues to broadcast the standard read signal or the detection signal in the state of step 600.

[0128] Step 609: The NFC device sends a standard read signal. At this time, if it is determined that there is a physical card approaching, the standard read signal can be directly sent.

[0129] Step 610: The physical card returns the tag data.

[0130] Step 611: After receiving the tag data, the NFC device returns a notification.

[0131] Figure 7 This is an NFC device shown in an exemplary embodiment of this specification. The NFC device includes an antenna 700, an NFC chip 701, an NFC signal wave detection module 702, a processor 703, and a card reader device detection module 704. The antenna 700, the NFC chip 701, and the processor 703 are connected to form a first circuit. The antenna 700, the NFC signal wave detection module 702, and the processor 703 are connected to form a second circuit. The card reader device detection module 704 is connected to the processor 703. The NFC device can execute the service execution process shown in the above - mentioned embodiment, where

[0132] The NFC signal wave detection module 702 is configured to sample the voltage on the side of the antenna 700 and send it to the processor 703;

[0133] The card reader device detection module 704 is configured to detect whether there is a card reader device approaching around the NFC device, and when detecting that there is a card reader device approaching, notify the processor 703;

[0134] The NFC chip 701 is configured to switch between the card emulation mode and the card reader mode according to the switching instruction of the processor 703; and receive the control instruction of the processor 703, broadcast a detection signal, send an activation signal, send a standard read signal, or stop broadcasting signals externally through the antenna 700; when in the card emulation mode, determine the pre - stored tag data according to the standard read signal sent by the card reader device received on the side of the antenna 700, and return it to the card reader device;

[0135] The processor 703 is configured to, when in the card reader mode, identify an approaching object through the card reader device detection module 704; in response to the card reader device detection module 704 notifying that a card reader device is approaching, send a control instruction to the NFC chip 701 to stop broadcasting signals externally; in response to the detection signal of the card reader device sent by the NFC signal wave detection module 702, send a control instruction to the NFC chip 701 to send an activation signal, and switch the NFC chip 701 to the card emulation mode through a switching instruction.

[0136] Optionally, the NFC chip 701 is further configured to broadcast a standard read signal when in the card reader mode.

[0137] Optionally, the NFC chip 701 is further configured to receive tag data sent by a physical card through the antenna 700 side to perform subsequent services according to the tag data, where the tag data is sent after the physical card is activated by the standard read signal.

[0138] Optionally, the processor 703 is further configured to, in response to the card reader device notifying that the tag data has been received, wait for a third duration, and then identify through the card reader device detection module 704 whether the card reader device is still in the near field; if the card reader device is not identified, send a switching instruction to the NFC chip 701.

[0139] The NFC chip 701 then switches back to the card reader mode according to the switching instruction and broadcasts a standard read signal.

[0140] Optionally, the NFC chip 701 includes: a tag chip 7011 and a card reader chip 7012. As Figure 8 shown, when the card reader chip 7012 stops working, the NFC chip 701 is in the card emulation mode, and when the card reader chip 7012 starts working, the NFC chip 701 is in the card reader mode. The card reader chip 7012 is initialized to start working; where:

[0141] The tag chip 7011 is configured to determine pre-stored tag data according to the standard read signal sent by the card reader device received through the antenna 700 side and return it to the card reader device;

[0142] The card reader chip 7012 is configured to receive the control instruction of the processor 703 and broadcast a detection signal, send an activation signal, send a standard read signal, or stop broadcasting signals externally through the antenna 700; and is configured to receive the switching instruction sent by the processor 703 and switch between starting work and stopping work;

[0143] The processor 703 is configured to, in response to the card reader device detection module 704 notifying that a card reader device is approaching, send a control instruction to the card reader chip 7012 to stop broadcasting signals externally; in response to the detection signal of the card reader device sent by the NFC signal wave detection module 702, send a control instruction to the card reader chip 7012 to send an activation signal, and send a switching instruction to the card reader chip 7012 to switch the card reader chip 7012 from the startup working state to the stop working state.

[0144] Moreover, in Figure 8 it can be seen that since the NFC chip 701 is divided into a tag chip 7011 and a card reader chip 7012, the first circuit is also split into two branches, which is equivalent to the circuit connecting the antenna 700, the tag chip 7011, and the processor 703, and the circuit connecting the antenna 700, the card reader chip 7012, and the processor 703, forming two parallel circuits in the first circuit.

[0145] In addition, the NFC device can also be provided with two antennas 700, as Figure 9 shown. The antenna 700 includes a first antenna 7001 and a second antenna 7002. The first antenna 7001, the tag chip 7011, and the processor 703 are connected to form the first branch of the first circuit. The second antenna 700, the card reader chip 7012, and the processor 703 are connected to form the second branch of the first circuit. The second antenna 700, the NFC signal wave detection module 702, and the processor 703 are connected to form a second circuit.

[0146] In addition, in the embodiments of this specification, the NFC signal wave detection module is configured to detect the voltage value corresponding to the signal received by the antenna and convert the analog signal into a digital signal. By analyzing the voltage amplitude, duration, etc. of the signal, the type of the received signal can be determined.

[0147] Among them, the circuit corresponding to the NFC signal wave detection module is specifically as Figure 10 shown, Figure 10 which includes an antenna, an NFC signal wave detection module, and a processor. The NFC signal wave detection module includes a U1 circuit for amplifying, shaping, and sampling the signal, and also includes diodes, resistors, capacitors, and a ground. If an analog-to-digital conversion circuit is provided in the NFC signal wave detection module, the conversion of the digital signal can be completed outside the processor. If the processor itself has an analog-to-digital conversion circuit, the NFC signal wave detection module may not be provided with an analog-to-digital conversion circuit, and the analog-to-digital conversion is directly performed by the processor, as Figure 11 shown.

[0148] The processor can then sample the converted voltage value to identify what signal is received. Also, since the radio frequency signal is usually 13.56 MHz in NFC technology, in order to ensure the sampling effect, according to the Nyquist sampling theorem, the sampling frequency of the analog-to-digital conversion is at least twice the frequency of the signal of interest. Considering the possible aliasing situation in the actual application environment, in order to avoid aliasing, in the embodiments of this specification, the sampling frequency of the analog signal is at least 2.56 times the signal frequency.

[0149] In summary, in the technical solution provided in this specification, when there is no card reader device approaching, the NFC device is a card reader that broadcasts a standard read signal and can support obtaining tag data from an analog card or a physical card. When it is determined by the card reader device detection module that a card reader device is approaching, it no longer broadcasts data and switches itself to the card simulation mode to provide tag data, preventing the dual-mode card reader device from being incorrectly activated as an analog card. That is to say, even if the card reader device also supports active and passive NFC modes, it will not be activated by the NFC device provided in this specification. Moreover, the NFC device provided in this specification can also read data from other cards in the card reader mode when there is no card reader device approaching, without causing confusion in service invocation. This not only clarifies the service trigger conditions but also improves the efficiency of data interaction and service execution.

[0150] Corresponding to the foregoing embodiments of the method for executing NFC dual-mode services in the blockchain system, this specification also provides an embodiment of an apparatus for executing NFC dual-mode services. This apparatus is applied to an NFC device, which is a dual-mode device with a card reader mode and a card simulation mode, and the NFC device at least includes a card reader device detection module. The card reader device detection module is a physical module on the NFC device.

[0151] Please refer to Figure 12 , the apparatus may include:

[0152] A card reader module 1200, which, when the NFC device is in the card reader mode, identifies an approaching object through the card reader device detection module;

[0153] A detection module 1201, which stops broadcasting signals externally in response to the card reader device detection module identifying that a card reader device is approaching;

[0154] A card simulation module 1202, which, in response to the detection signal sent by the card reader device, sends an activation signal to the card reader device and switches to the card simulation mode;

[0155] A sending module 1203, which receives the standard read signal sent by the card reader device, determines the pre-stored tag data, and returns it to the card reader device.

[0156] Optionally, in response to determining that a physical card is approaching the NFC device, the card reader module 1200 sends a standard read signal to the physical card and receives the tag data returned by the physical card to perform subsequent services.

[0157] Optionally, when determining that the detection signal sent by the card reading device is received, the analog card module 1202 synchronously sends an activation signal to the card reading device.

[0158] Optionally, the analog card module 1202 synchronously sends an activation signal to the card reading device and records the number of times the activation signal is synchronously sent to the card reading device. When the recorded number of times the activation signal is sent reaches a preset number of times, the synchronous sending of the activation signal is stopped.

[0159] Optionally, in response to not receiving the standard read signal sent by the card reading device within the first time period after switching to the card emulation mode, the analog card module 1202 identifies the card reading device. If the card reading device is identified, the activation signal is synchronously sent based on the detection signal sent by the card reading device. If the card reading device is not identified, the card reader mode is switched back and the standard read signal is continuously broadcast.

[0160] Optionally, when the card reading device is identified as approaching, the analog card module 1202 waits for the detection signal sent by the card reading device within the second time period. If the detection signal sent by the card reading device is not received within the second time period, the standard read signal is continuously broadcast in the card reader mode.

[0161] Optionally, after returning the tag data to the card reading device, in response to the card reading device notifying that the tag data has been received, the sending module 1203 waits for the third time period and identifies the card reading device again through the card reading device detection module. If the card reading device is not identified, the card reader mode is switched back and the standard read signal is broadcast.

[0162] Optionally, the card reader module 1200 of the NFC device broadcasts the standard read signal at a first time interval and broadcasts the detection signal at a second time interval, where the first time interval is longer than the second time interval.

[0163] Optionally, the card reader module 1200 emits the standard read signal at a preset power, and the activation distance of the physical card based on the standard read signal emitted at the preset power is less than the detection distance of the card reading device by the card reading device detection module.

[0164] Optionally, the sending duration of the activation signal is not less than the sending duration of the detection signal.

[0165] Optionally, the simulation card module 1202 determines the transmission duration of the detection signal sent by the card reader device; and adjusts the transmission duration of the subsequent activation signal according to the transmission duration of the detection signal.

[0166] For the specific implementation processes of the functions and effects of each unit in the above device, please refer to the implementation processes of the corresponding steps in the above method, which will not be elaborated here.

[0167] Based on the same concept as the above method, this specification also provides an electronic device, including: a processor; a memory for storing executable instructions that can be executed by the processor; wherein, the processor realizes the steps of the method as described in any one of the above embodiments by running the executable instructions.

[0168] Based on the same concept as the above method, this specification also provides a computer-readable storage medium, on which computer instructions are stored, and when the instructions are executed by a processor, the steps of the method as described in any one of the above embodiments are realized.

[0169] Based on the same concept as the above method, this specification also provides a computer program product, including a computer program / instructions, and when the computer program / instructions are executed by a processor, the steps of the method as described in any one of the above embodiments are realized.

Claims

1. A service execution method based on NFC dual-mode, the method is applied to an NFC device, the NFC device is a dual-mode device of a card reader mode and a card emulation mode, and the NFC device at least includes a card reader device detection module, including: In the card reader mode, the approaching object is identified by the card reader device detection module; In response to the card reader detection module identifying that the card reader is approaching, stopping the external broadcast signal; In response to the detection signal sent by the card reading device, sending an activation signal to the card reading device and switching to a card emulation mode; Receive the standard read signal sent by the card reading device, determine the pre-stored tag data, and return it to the card reading device.

2. The method according to claim 1, further comprising: In response to determining that a physical card is in proximity to the NFC device, sending a standard read signal to the physical card; Receive the label data returned by the physical card to execute subsequent business.

3. The method according to claim 1, in response to the detection signal sent by the card reader device, sending an activation signal to the card reader device, comprising: When it is determined that the detection signal sent by the card reading device is received, an activation signal is synchronously sent to the card reading device.

4. The method according to claim 3, synchronously sending an activation signal to the card reader device, comprises: synchronously sending an activation signal to the card reading device, and recording the number of times the activation signal is synchronously sent to the card reading device; When the recorded number of activation signal sending reaches the preset number, the synchronous sending of the activation signal stops.

5. The method according to claim 3, further comprising: In response to not receiving a standard read signal sent by the card reader device within a first time period after switching to the card emulation mode, identifying the card reader device; If the card reader device is identified, then continue to synchronously send an activation signal based on the detection signal sent by the card reader device; If the card reader device is not identified, it switches back to the card reader mode and continues to broadcast the standard read signal.

6. The method according to claim 1, further comprising: When the card reader device is identified to be approaching, waiting for a detection signal sent by the card reader device within a second time period; If the detection signal from the card reader device is not received within the second time period, the standard read signal continues to be broadcast in the card reader mode.

7. The method according to claim 1, further comprising: After returning the tag data to the card reader, in response to the card reader notifying receipt of the tag data, waiting for a third time period, and identifying the card reader again through the card reader detection module; If the card reader device is not recognized, it switches back to the card reader mode and broadcasts the standard read signal.

8. The method according to any one of claims 6 or 7, broadcasting a standard read signal, comprising: The NFC device broadcasts a standard read signal at a first time interval and broadcasts a detection signal at a second time interval, wherein the first time interval is longer than the second time interval.

9. The method according to claim 1, broadcasting a standard read signal, comprising: The standard read signal is transmitted according to the preset power, and the activation distance of the physical card based on the standard read signal transmitted based on the preset power is smaller than the detection distance of the card reader device detection module to the card reader device.

10. According to the method according to any one of claims 1, 3 to 5, the sending duration of the activation signal is not less than the sending duration of the detection signal.

11. The method according to claim 1, further comprising: Determining the sending duration of the detection signal sent by the card reader; According to the sending duration of the detection signal, the sending duration of the subsequent activation signal is adjusted.

12. An NFC device, comprising: An antenna, an NFC chip, an NFC signal wave detection module, a processor, and a card reader device detection module, wherein the antenna, the NFC chip, and the processor are connected to form a first circuit, the antenna, the NFC signal wave detection module, and the processor are connected to form a second circuit, and the card reader device detection module is connected to the processor, wherein: The NFC signal wave detection module is used to sample the voltage on the antenna side and send it to the processor; The card reader device detection module is used to detect whether there is a card reader device approaching the NFC device, and notify the processor when a card reader device is detected approaching; The NFC chip is used to switch between the card emulation mode and the card reader mode according to the switching instruction of the processor; and receive the control instruction of the processor to broadcast the detection signal, send the activation signal, send the standard read signal or stop broadcasting the signal to the outside through the antenna; when in the card emulation mode, according to the standard read signal sent by the card reader device received by the antenna side, determine the pre-stored tag data and return it to the card reader device; The processor is used to, when in the card reader mode, identify approaching objects through the card reader device detection module; in response to the card reader device detection module notifying that a card reader device is approaching, issue a control instruction to the NFC chip to stop broadcasting external signals; in response to the detection signal of the card reader device sent by the NFC signal wave detection module, issue a control instruction to the NFC chip to send an activation signal, and switch the NFC chip to the card emulation mode through a switching instruction.

13. The NFC device according to claim 12, wherein the NFC chip is further configured to broadcast a standard read signal when in a card reader mode.

14. The NFC device according to claim 13, wherein the NFC chip is further used to receive tag data sent by the physical card through the antenna side, so as to perform subsequent services according to the tag data; in, The tag data is sent after the physical card is activated by the standard read signal.

15. The NFC device according to claim 12, wherein the processor is further configured to, in response to the card reader device notifying receipt of the tag data, wait for a third time period, and identify again through the card reader device detection module whether the card reader device is still in the near field; if the card reader device is not identified, send a switching instruction to the NFC chip; The NFC chip switches back to the card reader mode according to the switching instruction and broadcasts a standard read signal.

16. The NFC device according to claim 12, wherein the NFC chip comprises: Tag chip and card reader chip; when the card reader chip stops working, the NFC chip is in card simulation mode, when the card reader chip starts working, the NFC chip is in card reader mode, and the NFC chip is initialized to the card reader chip initialization startup work; wherein: The tag chip is used to determine the pre-stored tag data according to the standard read signal sent by the card reader device and received by the antenna side, and return the pre-stored tag data to the card reader device; The card reader chip is used to receive the control instruction of the processor, broadcast the detection signal, send the activation signal, send the standard read signal or stop the external broadcast signal through the antenna; and is used to receive the switching instruction sent by the processor to switch between starting and stopping the work; The processor is used for sending a control instruction to the card reader chip to stop broadcasting external signals in response to the notification of the card reader device detection module that a card reader device is approaching; in response to the detection signal of the card reader device sent by the NFC signal wave detection module, sending a control instruction to the card reader chip to send an activation signal, and sending a switching instruction to the card reader chip to switch the card reader chip from starting to working and switching to stopping working.

17. The NFC device according to claim 16, wherein the antenna comprises a first antenna and a second antenna, the first antenna, the tag chip and the processor are connected to form a first branch of the first circuit, the second antenna, the card reader chip and the processor are connected to form a second branch of the first circuit, and the second antenna, the NFC signal wave detection module and the processor are connected to form a second circuit.

18. A service execution device based on NFC dual-mode, the device is applied to an NFC device, the NFC device is a dual-mode device of a card reader mode and a card emulation mode, and the NFC device at least includes a card reader device detection module, including: an identification module, in the card reader mode, identifying approaching objects through the card reader device detection module; an anti-mistouch module, in response to the card reader detection module identifying the card reader approaching, stopping the external broadcast signal; a switching module, in response to a detection signal sent by the card reading device, sending an activation signal to the card reading device and switching to a card emulation mode; The sending module receives the standard read signal sent by the card reading device, determines the pre-stored tag data, and returns it to the card reading device.

19. A computer-readable storage medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the steps of the method according to any one of claims 1 to 11.

20. A computer program product, comprising a computer program / instruction, which, when executed by a processor, implements the steps of the method according to any one of claims 1 to 11.

Citation Information

Cited By

  • Information sending method, device and equipment based on NFC (Near Field Communication)

    CN121037826A

  • Near field communication module, near field communication control method, equipment, medium and product

    CN121902829A