Information transmission method, device and equipment based on NFC

By detecting wireless signal switching modes in NFC devices and being compatible with card reader and card emulation functions, the problem of inconvenient and costly device configuration under the diversified needs of NFC is solved, and low-cost and efficient information interaction is achieved.

CN122120740APending Publication Date: 2026-05-29ALIPAY (HANGZHOU) INFORMATION TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ALIPAY (HANGZHOU) INFORMATION TECH CO LTD
Filing Date
2025-10-31
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

In the current diverse NFC demand scenarios, service providers need to configure a variety of different types of NFC-enabled devices, which is inconvenient and costly.

Method used

A method and apparatus for sending information based on NFC are provided, which have a card reader mode and a card emulation mode. By detecting a preset type of wireless signal switching mode, the method receives a card reading request signal and sends tag information to wake up the application. It is compatible with three interaction methods: physical NFC cards, simulated NFC cards and NFC "tap".

Benefits of technology

It enables compatibility with different NFC interaction methods in multiple scenarios, reduces device configuration costs, improves user experience and information interaction success rate, and avoids business failures caused by device mismatch.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122120740A_ABST
    Figure CN122120740A_ABST
Patent Text Reader

Abstract

The embodiment of the present specification provides a kind of information sending method, device and equipment based on NFC.Scheme includes: the first device with NFC function continuously detects the preset type of non-NFC wireless signal supported by mobile communication terminal with NFC function;If the preset type of wireless signal is detected, the first device is switched from card reader mode to card simulation mode;Afterwards, receive the NFC type of card request signal transmitted by the second device transmitting the preset type of wireless signal;And send tag information to the second device in response to the card request signal, the tag information is used to arouse the application program on the second device.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application of Chinese invention patent application No. 202511580669.7, filed on October 31, 2025, entitled "Information Transmission Method, Apparatus and Device Based on NFC". Technical Field

[0002] This specification relates to the field of near-field communication technology, and particularly to an NFC-based information transmission method. This specification also relates to an NFC-based information transmission apparatus and a computing device. Background Technology

[0003] Near Field Communication (NFC) is a short-range wireless communication technology that enables contactless data transfer between two devices over short distances, providing electronic devices with a secure, fast, and cost-effective communication method. With the increasing prevalence of NFC technology, NFC-enabled communication devices are being used more and more in people's daily lives. People can use NFC-enabled devices to actively or passively communicate with NFC-enabled devices of service providers to obtain a variety of services.

[0004] However, due to the diversification of NFC applications and scenarios, service providers may need to configure a variety of different types of NFC-enabled devices to meet the diverse NFC needs of different users or users in different scenarios, which is inconvenient and costly. Summary of the Invention

[0005] In view of this, one or more embodiments of this specification provide an NFC-based information transmission method, apparatus, and device to solve the problem that in the current diversified NFC demand scenarios, service providers need to configure a variety of different types of NFC-enabled devices, which is inconvenient and costly.

[0006] According to a first aspect of one or more embodiments of this specification, an NFC-based information transmission method is provided, applied to a first device having NFC functionality, wherein the NFC functionality specifically includes a reader mode and a card emulation mode; the method includes: Detect wireless signals of a preset type; the preset type of wireless signal is a wireless signal supported by a mobile communication terminal with NFC function, but does not include NFC signals; If the preset type of wireless signal is detected, the first device is switched from card reader mode to card emulation mode; Receives a card reader request signal from a second device that transmits a wireless signal of the preset type; the card reader request signal is an NFC signal. In response to the card reader request signal, tag information is sent; the tag information is used to activate the application on the second device.

[0007] According to a second aspect of one or more embodiments of this specification, an NFC-based information transmitting device is provided, applied to a first device having NFC functionality; the NFC functionality specifically includes a card reader mode and a card emulation mode; the information transmitting device includes a main control module and an NFC module, the NFC module being connected to the main control module: The main control module is used to detect wireless signals of a preset type; the preset type of wireless signal is a wireless signal supported by a mobile communication terminal with NFC function, but does not include NFC signals; if the preset type of wireless signal is detected, the NFC module is switched from card reader mode to card emulation mode. The NFC module is used to receive a card read request signal from a second device that transmits a wireless signal of the preset type in card emulation mode; the card read request signal is an NFC signal; in response to the card read request signal, it sends tag information to the second device; the tag information is used to activate an application on the second device.

[0008] According to a third 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 NFC-based information transmission method.

[0009] One embodiment of this specification can achieve at least the following beneficial effects: The first device in NFC card emulation mode continuously detects a preset type of wireless signal and switches to card emulation mode after detecting a wireless signal. It can then receive an NFC card reading request signal transmitted by the second device and, in response to the card reading request signal, send tag information to the second device to launch an application on the second device. Thus, the first device can support both reading information from an NFC card when the user uses an NFC card and providing tag information to the second device when the user uses a second device with NFC functionality to launch an application on the second device. This can simultaneously meet the diverse near-field communication needs of users in multiple scenarios. On the one hand, service providers do not need to set up multiple NFC devices, resulting in low deployment costs and convenient management. On the other hand, users do not need to select the device to interact with from multiple NFC devices, which is highly convenient and can avoid service failures caused by users selecting an incompatible device, thereby improving the overall success rate of NFC-based information interaction services. Attached Figure Description

[0010] 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.

[0011] Figure 1 This specification illustrates an application scenario of an NFC-based information transmission method according to an embodiment of the present invention. Figure 2 A flowchart illustrating an embodiment of an NFC-based information transmission method provided in this specification is shown. Figure 3 This diagram illustrates the state changes of a first device as a second device approaches a first device according to an embodiment of this specification. Figure 4 This specification illustrates a flowchart of an NFC-based information exchange process between a first device and a second device or a physical NFC card in a practical application scenario provided by an embodiment of this specification. Figure 5 This specification shows a schematic diagram of the structure of an NFC-based information transmission device according to an embodiment of the present specification; Figure 6 This specification shows an optional structural diagram of an NFC-based information transmission device according to an embodiment of the present specification; Figure 7 This specification shows a schematic diagram of another optional structure of an NFC-based information transmission device according to one embodiment of the present specification; Figure 8 This specification shows a schematic diagram of another optional structure of an NFC-based information transmission device according to one embodiment of the present specification; Figure 9 This specification shows a structural block diagram of a computing device provided in one embodiment. Detailed Implementation

[0012] 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.

[0013] 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.

[0014] 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.

[0015] 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.

[0016] 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.

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

[0018] 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.

[0019] 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.

[0020] 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.

[0021] In existing life scenarios, there are various types of NFC-based information interaction methods.

[0022] One NFC-based information interaction method uses a physical NFC card as an NFC slave device. Responding to the radio frequency field provided by the NFC master device, the slave device provides the card information stored in the physical NFC card to the master device. For example, in scenarios such as two-wheeled vehicles, smart locks, smart access control systems, attendance systems, and group catering, NFC cards can be used as the primary unlocking solution. The advantage of using NFC cards is convenient unlocking, but there are some disadvantages. For instance, NFC cards only support unlocking and cannot support other functions. Taking the two-wheeled vehicle scenario as an example, either the NFC card only supports unlocking the vehicle but not opening the seat, or it only supports unlocking both the vehicle and the seat simultaneously, failing to achieve single-function control. Furthermore, NFC cards do not support anti-theft; for example, if an NFC card is lost, anyone who finds it can unlock the vehicle, lock, and access control system, resulting in poor security. Finally, NFC cards are difficult to prevent copying and information theft, leading to low security.

[0023] Another NFC-based information exchange method involves using a mobile terminal device (e.g., a smartphone) to simulate an NFC card. Specifically, an NFC-enabled mobile terminal device (e.g., a smartphone) simulates the electronic identity and data of a physical contactless smart card (such as an access card, transportation card, or work card), enabling the mobile terminal device (e.g., the smartphone) to replace the physical NFC card in completing authentication or payment transactions on an NFC reader. In this method, the mobile terminal device (e.g., the smartphone) simulating the NFC card acts as an NFC slave device, responding to the radio frequency field provided by the NFC master device and providing the NFC master device with card information corresponding to the simulated NFC card. Since mobile terminal devices (e.g., smartphones) typically require unlocking before use, this mitigates the security risk of physical NFC cards lacking anti-theft features to some extent. Furthermore, since the NFC card function of mobile terminal devices (e.g., smartphones) can be disabled by default, this mitigates the security risk of physical NFC cards being difficult to prevent copying to some extent. However, simulating NFC cards with mobile terminal devices (e.g., smartphones) still lacks universality. Furthermore, the widespread application of smartphones simulating NFC cards is limited because some smartphone manufacturers do not support this feature.

[0024] Another NFC-based information interaction method involves using a mobile terminal device (e.g., a smartphone) as the NFC master device, actively providing a radio frequency field, and acquiring tag information from the NFC slave device within the radio frequency field. Furthermore, when the tag information contains a Uniform Resource Locator (URL) for accessing an application, it can be implemented so that the mobile terminal device (e.g., a smartphone) can "tap" the NFC interface to activate the application, facilitating subsequent business operations within the application. This NFC "tap" interaction method can be applied to business scenarios including but not limited to "tap payment," "tap vehicle control," and "tap door opening." Furthermore, the NFC "tap" function offers high security. Specifically, after activating the application with a "tap," it can be identified using strongly encrypted biometric information such as facial recognition or fingerprints to prevent unauthorized use. For example, in an attendance system, the application can be activated via an NFC "tap," and then facial recognition can be used within the application to achieve accurate attendance tracking and prevent proxy clocking. After NFC "tap" to activate the application, different functions can be independently controlled through the application. For example, in the case of two-wheeled vehicles, the application can control functions such as the lock, seat switch, lights, and navigation information. Since NFC "tap" is implemented to activate the application, as long as the application is protected against theft and misuse, even if the tag information is leaked, it will not cause security problems. For example, in the case of smart door locks, after obtaining the tag information, third parties can only activate the application based on the Uniform Resource Locator (URL), and the biometric identification function in the application's security identification process can prevent the door lock from being opened.

[0025] Given that different types of NFC-based information interaction methods have their own advantages and disadvantages, in real-world scenarios, different users may choose different interaction methods for the same service. For example, in a lock-unlocking scenario, some users may prefer to use an NFC card, while others may prefer to use the NFC "tap" function. For service providers, meeting diverse user needs may require configuring multiple types of NFC-enabled devices, which is inconvenient and costly.

[0026] Therefore, in one or more embodiments of this specification, an NFC-based integrated solution is provided, which provides a device that supports both reader mode and card emulation mode in hardware, and is compatible with three interaction methods: physical NFC cards, simulated NFC cards, and NFC "tap-to-pay". Thus, it can combine the advantages of multiple NFC-based information interaction methods, making it easier for users to complete business in their preferred or habitual way, thereby improving the user's NFC experience.

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

[0028] Figure 1 This specification illustrates an application scenario of an NFC-based information transmission method according to an embodiment of this specification.

[0029] This specification provides a communication device through one or more embodiments. For example... Figure 1 As shown, the communication device can be installed in the first device 100 to enable the first device 100 to have near-field communication functionality. Specifically, the communication device can be used to sense a second device 200 or NFC card 300 with NFC functionality that is close to its sensing area (usually the antenna coverage area), thereby communicating with the second device 200 or NFC card 300.

[0030] The communication device provided in one or more embodiments of this specification can be applied to various types of first devices 100 to enable these first devices 100 to perform near-field communication as communication devices. The application of the communication device to the first device 100 may include configuring the communication device as a corresponding circuit in the first device 100, or packaging the communication device as a chip and configuring it as a communication chip in the first device 100, etc., without limitation. Furthermore, when the communication device is packaged as a chip, it may be packaged into other communication chips or as a separate chip, without limitation. In practical applications, the first device 100 can be implemented as any type of device. For example, the first device 100 may include, but is not limited to, access control devices, cash register devices, lock control devices, smart vehicles, smart home devices, etc.

[0031] although Figure 1 The illustration shows a specific example of the second device 200 as a smartphone, but in practical applications, the second device 200 can also be implemented as other types of terminal devices or terminals, user equipment (UE), mobile stations (MS), mobile terminals (MT), etc. Specifically, the second device 200 can include, but is not limited to, smartphones, smart TVs, wearable devices, tablets, computers with wireless transceiver capabilities, virtual reality (VR) terminal devices, augmented reality (AR) terminal devices, wireless terminals in industrial control, and self-driving vehicles. Wireless terminals in various fields, including driving, remote medical surgery, smart grids, transportation safety, smart cities, and smart homes.

[0032] like Figure 1 As shown, a first device 100 equipped with one or more of the communication devices provided in this specification can perform near-field communication with a second device 200 or an NFC card 300. The communication device in the first device 100 is compatible with three NFC interaction methods simultaneously: NFC "tap-to-pay," physical NFC cards, and simulated NFC cards. Furthermore, in practical applications, it can quickly and easily switch between the three methods according to user needs, improving the user experience.

[0033] Optionally, a user can bring the NFC card 300 close to the first device 100. In this case, the communication device in the first device 100 is in card reader mode and can read the card information in the NFC card 300.

[0034] Optionally, a user can bring a second device 200, such as a smartphone, close to the first device 100. In this case, the first device 100 can detect the second device 200 based on the wireless signal (non-NFC signal) emitted by the second device 200 and actively switch to card emulation mode. Thus, the second device 200 in card reader mode can read the tag information in the first device 100.

[0035] Optionally, if a user brings a second device 200, such as a smartphone, close to the first device 100 and the first device 100 actively switches to card emulation mode, and if the tag information in the first device 100 is not successfully read within a timeout period, the first device 100 can switch back to card reader mode. This triggers the second device 200 to switch from card reader mode to card emulation mode and activates the simulated NFC card in the second device 200. Subsequently, the first device 100 can read the card information corresponding to the simulated NFC card stored in the second device 200.

[0036] This application provides an NFC-based information transmission method and also relates to an NFC-based information transmission device and a computing device, which will be described in detail in the following embodiments.

[0037] Figure 2A flowchart illustrating an NFC-based information transmission method according to an embodiment of this specification is shown.

[0038] From a procedural perspective, the entity executing the process can be a program installed on the application terminal. It can be understood that this method can be executed by any device or equipment with computing and processing capabilities.

[0039] This NFC-based information transmission method can be applied to a first device equipped with NFC functionality. Specifically, the NFC functionality includes a reader mode and a card emulation mode.

[0040] like Figure 2 As shown, the process may include the following steps: Step 202: Detect a wireless signal of a preset type; the wireless signal of the preset type is a wireless signal supported by a mobile communication terminal with NFC function, but does not include NFC signals.

[0041] The communication distance of the wireless signal can be greater than that of the NFC signal.

[0042] Furthermore, the wireless signal may include at least one of Bluetooth signal, cellular network signal, and satellite navigation signal. The cellular network signal may further include 4G signal, 5G signal, etc. The satellite navigation signal may further include GPS signal, BeiDou signal, etc.

[0043] In practical applications, mobile terminal devices (e.g., smartphones, smart wearable devices, etc.) are typically able to emit the wireless signal. Since the communication distance of the wireless signal is usually greater than that of the NFC signal, the first device can detect whether a mobile terminal device is approaching the first device by monitoring the surrounding wireless signals (e.g., Bluetooth signals) in real time.

[0044] Step 204: If the preset type of wireless signal is detected, the first device is switched from card reader mode to card emulation mode.

[0045] In one or more embodiments of this specification, the first device may have both NFC card reader capability and NFC card emulation capability in hardware. In practical applications, the first device may default to NFC card reader mode to facilitate identification and information reading of nearby NFC cards, while it may switch to card emulation mode when a mobile terminal device such as a smartphone is detected in the vicinity.

[0046] Further, step 204, which involves switching the first device from card reader mode to card emulation mode if the preset type of wireless signal is detected, may specifically include: if the preset type of wireless signal is detected, calculating the distance between the second device transmitting the preset type of wireless signal and the first device based on the characteristic parameters of the wireless signal; if the distance is less than or equal to a first distance threshold, then switching the first device from card reader mode to card emulation mode.

[0047] In one or more embodiments of this specification, a specific method is further provided for calculating the distance between a second device and a first device based on the characteristic parameters of wireless signals for different types of wireless signals.

[0048] If the wireless signal is Bluetooth information, the distance between the second device and the first device can be determined using the Received Signal Strength Indicator (RSSI) method. Specifically, the signal strength information of the Bluetooth signal can be obtained; then, based on a pre-established mapping relationship between signal strength and distance, the distance between the second device and the first device can be determined. More specifically, since the Bluetooth signal strength attenuates with increasing propagation distance, the first device can measure the strength value of the Bluetooth signal received from the second device and estimate the distance between the second device and the first device using a pre-established signal attenuation model (e.g., a path loss model).

[0049] As an example, a pre-established mapping relationship between signal strength and distance (signal attenuation model) can be d = 10^((|RSSI|-A) / (10*n)), where RSSI can represent the signal strength value received by the first device, A can represent the empirical value of signal strength at a distance of 1 meter from the signal source (e.g., the second device transmitting the Bluetooth signal), and n can represent the path loss exponent or environmental attenuation factor. In practical applications, the values ​​of A and n can be determined by calibration using actual business scenario data or experimental scenario data.

[0050] If the wireless signal is a cellular network signal, specifically, since cellular network signals have a fixed frequency band, the signal strength information of the cellular network signal emitted by the second device in the environment (or the response signal emitted in response to the received cellular network signal) can be obtained by scanning the signals in the fixed frequency band. More specifically, similar to the Received Signal Strength Indication (RSSI) method, the strength information of the signal emitted by the second device can be obtained; then, based on a pre-established mapping relationship between signal strength and distance, the distance between the second device and the first device can be determined.

[0051] If the wireless signal is a satellite navigation signal, specifically, since satellite navigation signals have a fixed frequency band, the signal strength information of the satellite navigation signal emitted by the second device in the environment (or the positioning signal emitted to the server in response to the received satellite navigation signal) can be obtained by scanning the signals in the fixed frequency band. More specifically, similar to the Received Signal Strength Indication (RSSI) method, the strength information of the signal emitted by the second device can be obtained; then, based on a pre-established mapping relationship between signal strength and distance, the distance between the second device and the first device can be determined.

[0052] The specific method for calculating the distance between the second device and the first device based on the characteristic parameters of the wireless signal given above is only an example. Different wireless signals, different characteristic parameters, and different methods can also be used to determine the distance between the second device and the first device.

[0053] In practical applications, when a user brings the second device close to the first device, the first device can monitor the distance between the second device and the first device by continuously monitoring the characteristic parameters of the wireless signal emitted by the second device. When the distance between the second device and the first device reaches less than or equal to a first distance threshold as the user approaches the first device, the first device can switch from card reader mode to card emulation mode, so that the second device can successfully read the tag information from the first device.

[0054] The first distance threshold can be used to reflect the normal distance at which a user intends to use the first device. In other words, when the distance between the user and the second device is less than the first distance threshold, there is a higher probability that the user has a need to use the first device. By setting the first distance threshold, near-field communication mode switching can be avoided when the user does not intend to use the first device, reducing resource waste on the first device side caused by such erroneous operations.

[0055] In one or more embodiments of this specification, the first distance threshold may be greater than or equal to the first characteristic distance; when the distance between the second device and the first device is less than or equal to the first characteristic distance, the probability that the radio frequency field emitted by the first device in reader mode successfully activates the simulated NFC card in the second device is greater than or equal to the first probability threshold.

[0056] The first characteristic distance can be used to represent the distance at which the probability that the radio frequency field emitted by the first device in reader mode successfully activates the simulated NFC card in the second device is greater than or equal to a first probability threshold. The first probability threshold is typically a high value, such as 99%, 95%, 90%, or 80%.

[0057] Furthermore, the first characteristic distance can be used to represent the shortest distance at which the radio frequency field emitted by the first device in reader mode can activate the simulated NFC card in the second device.

[0058] In practical applications, since the first device defaults to reader mode and continuously emits a radio frequency field, in some scenarios, this radio frequency field may read the first card information from a physical NFC card entering the radio frequency field (a radio frequency field capable of reading the first card information from a physical NFC card is referred to as the first card search signal below); in other scenarios, this radio frequency field may also trigger a second device entering the radio frequency field to switch to card emulation mode and activate a simulated NFC card (a radio frequency field capable of activating a simulated NFC card is referred to as the second card search signal below), thereby reading the second card information corresponding to the simulated NFC card. Therefore, it can be understood that if the distance between the second device and the first device is less than the first feature distance, the second device may be triggered to switch to card emulation mode and activate the simulated NFC card.

[0059] Therefore, when a user brings a second device close to the first device, considering the higher security and flexibility of the NFC "tap-to-read" function, in order to enable the user to prioritize using the second device in reader mode to read the tag information in the first device, it is necessary to prevent the second device from being unintentionally switched to card emulation mode. Thus, once the distance between the second device and the first device is detected to reach the first distance threshold (but has not yet reached the first characteristic distance), the first device can be switched from reader mode to card emulation mode.

[0060] Based on one or more embodiments of this specification, by setting a first distance threshold greater than a first characteristic distance, and immediately switching the first device to card emulation mode after detecting that the distance between the second device and the first device can meet the condition of being less than or equal to the first distance threshold (before the distance between the second device and the first device reaches the first characteristic distance), it is ensured that when a user holds a mobile terminal device with NFC function (e.g., a smartphone) close to the first device, the tag information in the first device can be read efficiently and reliably, thereby enabling the application to be launched on the second device to perform various subsequent business operations and realize various business functions.

[0061] In one or more embodiments of this specification, the first characteristic distance may be positively correlated with the transmit power of the radio frequency field emitted by the first device. In practical applications, the first characteristic distance can be determined by calibration in actual business or experimental scenarios. In some cases, to avoid the first characteristic distance being too large, which would lead to an excessively large first distance threshold (if the first distance threshold is set too large, it may cause near-field communication mode switching when the user is far from the first device and does not intend to use the first device, thus resulting in a certain degree of resource waste on the first device side), the transmit power of the radio frequency field emitted by the first device can be appropriately reduced.

[0062] Step 206: Receive a card reading request signal from the second device that transmits the preset type of wireless signal; the card reading request signal is an NFC signal.

[0063] The card reader request signal can be a signal transmitted by the second device through the NFC module. Specifically, it can be a signal conforming to the Near Field Communication (NFC) protocol standard. For example, it can be a signal with a carrier frequency of 13.56MHz.

[0064] In practical applications, during near-field communication (NFC) between a second device (as an NFC master) and a first device (as an NFC slave), the first device can first receive a card-finding signal emitted by the second device and then send a response signal in response to the card-finding signal to establish an NFC connection with the second device. Typically, the card-finding signal can be a null carrier signal without carrying service information. Once the first device and the second device have established an NFC connection, the first device can further send a card-reading request signal to the second device. Optionally, this card-reading request signal can carry card-reading request information to request reading information from the first device's NFC chip or to request writing information to the first device, etc.

[0065] Step 208: In response to the card reader request signal, send tag information; the tag information is used to wake up the application on the second device.

[0066] Specifically, in response to the card reading request signal, tag information can be sent to the second device in a load-modulated manner.

[0067] Typically, tag information refers to information stored in an NFC tag. In one or more embodiments of this specification, the tag information may represent information stored in the NFC module of a first device, further, it may represent information stored in the NFC chip of the NFC module of the first device, and even further, it may represent information stored in the NFC chip of the NFC module of the first device that has card emulation functionality.

[0068] Furthermore, the tag information may include a Uniform Resource Locator URL for opening a specified page in the application.

[0069] In practical applications, the invoked applications can include any type of business application, including but not limited to payment applications, financial management applications, lifestyle service applications, government affairs applications, shopping applications, traffic navigation applications, car service applications, smart home control applications, browser applications, etc.

[0070] Furthermore, if the second device is a mobile terminal device with a display screen, such as a smartphone or smart glasses, it can invoke the application to display a page, allowing the user to interact with the application through a graphical user interface. If the second device is a mobile terminal device without a display screen, such as a smart headset or other smart wearable device, it can invoke the application and play relevant voice information, allowing the user to interact with the application through a voice input device.

[0071] Optionally, the tag information may be pre-stored in the first device. Optionally, the tag information may be generated based on the information carried in the card reader request signal after receiving the card reader request signal.

[0072] Furthermore, when the first device includes an NFC chip for card emulation and an NFC chip for card reading, the tag information can be stored or generated by the NFC chip for card emulation.

[0073] 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.

[0074] Figure 2 The method described above involves a first device in NFC card emulation mode continuously detecting a preset type of wireless signal. Upon detecting a wireless signal, the device switches to card emulation mode and is then able to receive an NFC card reading request signal transmitted by a second device. In response to the card reading request signal, the first device sends tag information to the second device to activate an application on the second device. This enables the first device to support both reading information from an NFC card when the user uses an NFC card and providing tag information to the second device when the user uses an NFC-enabled second device to activate an application on the second device. This method is compatible with users' diverse near-field communication needs across multiple scenarios.

[0075] Based on one or more embodiments of this specification, on the one hand, service providers do not need to set up multiple NFC devices, resulting in low deployment costs and convenient management; on the other hand, users do not need to select the device to interact with from multiple NFC devices, which is highly convenient and can avoid service failures caused by users selecting and interacting with incompatible devices (for example, when there is both device A that supports actively obtaining card information from NFC cards and device B that supports passively providing tag information to mobile terminal devices, users will experience service failures if they interact with device B using an NFC card or with device A using a mobile terminal device). This can improve the overall success rate of NFC-based information interaction services.

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

[0077] In one or more embodiments of this specification, the first device with NFC functionality can be hardware compatible with both card reader and card emulation functions. In practical applications, this can be achieved using one or two NFC chips.

[0078] In an optional embodiment, the first device includes an NFC chip with both card reader and card emulation functions; the near-field communication mode of the NFC chip can be preset to card reader mode. Accordingly, step 204, which involves switching the first device from card reader mode to card emulation mode if the preset type of wireless signal is detected, can specifically include: if the preset type of wireless signal is detected, switching the NFC chip from card reader mode to card emulation mode.

[0079] In practical applications, the NFC chip can be used as both a card reader chip and a card emulation chip. Typically, the NFC chip can function as a card reader chip in a first time period and as a card emulation chip in a second time period, with the first and second time periods not overlapping. Therefore, the first device can have a card reader function in the first time period, used as an NFC master device to read information from the target device; the first device can have a card emulation function in the second time period, used as an NFC slave device to have information read by the NFC master device.

[0080] In an optional embodiment, the first device includes a first NFC chip with card reader functionality and a second NFC chip with card emulation functionality; the first NFC chip is in an on-default state; the second NFC chip is in a off-default state. Accordingly, step 204, which states that if the preset type of wireless signal is detected, the first device will be switched from card reader mode to card emulation mode, may specifically include: if the preset type of wireless signal is detected, the second NFC chip will be turned on.

[0081] In practical applications, the first NFC chip is used as a card reader chip, and the second NFC chip is used as a card emulation chip. Furthermore, within the same time period, the first NFC chip can function as a card reader chip, and the second NFC chip can function as a card emulation chip. Thus, within the same time period, the first device can have a card reader function, capable of actively emitting an electromagnetic field; and the first device can simultaneously have a card emulation function, capable of sending tag information to the second device in response to the radio frequency field emitted by the second device.

[0082] Furthermore, when the second NFC chip is enabled, the first NFC chip can optionally be disabled, or the first NFC chip can be left undisabled. That is, when the first device is in card emulation mode, the first NFC chip and the second NFC chip can be enabled simultaneously.

[0083] Furthermore, without shutting down the first NFC chip, the first NFC chip can be used to transmit an excitation signal to prompt the second device to switch from a low-power card detection mode to a standard card detection mode, thereby improving the success rate of the second device reading tag information from the first device, increasing the success rate of terminal wake-up based on the read tag (i.e., the success rate of waking up the application), and thus improving the success rate of NFC-based communication between the second device and the first device.

[0084] In practical applications, optionally, the first device can use an NFC chip that simultaneously functions as a card reader and a card emulation device. The advantage of using a single chip is its relatively low cost. Alternatively, the first device can use a first NFC chip with card reader functionality and a second NFC chip with card emulation functionality. The advantage of using two chips is that, when the second NFC chip is a readable tag, the first NFC chip, which can actively emit excitation signals, can trigger the second device to smoothly enter the standard card detection mode, thereby improving the reading efficiency and the probability of successful reading of tag information in the second NFC chip, and thus improving the success rate of NFC-based communication.

[0085] In one or more embodiments of this specification, a specific method is further provided in which the first device improves the communication success rate by transmitting an excitation signal when the second device is a mobile terminal device with NFC functionality, such as a smartphone.

[0086] In practical applications, taking a smartphone as an example as the second device, the smartphone's power consumption needs to be considered when using it as a card reader. Typically, to reduce power consumption and save battery, smartphones use the following method to read tag information from the other end's NFC device: first, they use low-power card detection (LPCD) mode to detect the presence of an NFC device nearby; if an NFC device is detected, they exit LPCD mode and use standard card detection mode to read the NFC device's tag information. The LPCD mode consumes less power than the standard card detection mode, thus reducing the phone's power consumption.

[0087] For example, a smartphone can determine the presence of an NFC device nearby by transmitting a probe signal in LPCD mode. If an NFC device is nearby, the NFC device will cause a change in the probe signal transmitted by the smartphone. For example, the NFC device may consume some of the probe signal's energy, thus reducing the amplitude or phase of the probe signal. The smartphone can detect whether the change in the probe signal exceeds a detection threshold using software or hardware. If the change in the probe signal exceeds the detection threshold, the phone confirms the presence of an NFC device, exits LPCD mode, and switches to standard card detection mode to read the NFC device's information. If the change in the probe signal does not exceed the detection threshold, the phone confirms that no NFC device is nearby and continues to transmit the probe signal in LPCD mode.

[0088] While LPCD mode can reduce smartphone power consumption, the weaker signal strength of the emitted probe signal means that changes in the probe signal triggered by NFC devices are minimal and may not exceed the detection threshold. Consequently, in LPCD mode, the sensing distance for the phone to read NFC device information is significantly reduced, resulting in decreased sensitivity. Therefore, the probability of a smartphone detecting a change in the probe signal is likely lower in LPCD mode, leading to a lower card reading success rate and impacting user experience.

[0089] In one or more embodiments of this specification, to address the problem of low card reading success rate when a second device, such as a smartphone, is used as a card reader due to being in LPCD mode, the NFC-based information transmission method may further include: if a first device detects a wireless signal of the preset type, it transmits an excitation signal; the excitation signal is used to excite the second device to switch from a low-power card detection mode to a standard card detection mode.

[0090] Accordingly, receiving the card reading request signal from the second device that transmits the preset type of wireless signal in step 206 may specifically include receiving the card reading request signal transmitted by the second device in standard card detection mode.

[0091] In practical applications, the first device can be switched from card reader mode to card emulation mode first. That is, the second device can transmit the excitation signal after it is ready to read the tag information.

[0092] Furthermore, the excitation signal can be a null carrier signal. The card search signal (e.g., the first card search signal or the second card search signal) mentioned in the context of this specification can also be a null carrier signal. The excitation signal can be an intermittently transmitted radio frequency field, or in other words, a field with a short duration. Unlike the excitation signal, the card search signal (e.g., the first card search signal or the second card search signal) mentioned in the context of this specification can be a continuously transmitted radio frequency field, or in other words, a field with a long duration. Typically, the single duration of the card search signal can be related to preset parameter information of the peer NFC slave device. For example, the single duration of the first card search signal used to read first card information from a physical NFC card can be determined based on the parameter information of the physical NFC card to successfully read the information in the physical NFC card; the single duration of the second card search signal used to activate a simulated NFC card in a second device can be determined based on preset parameter information of the second device to successfully activate the simulated NFC card. The single duration of the excitation signal is usually shorter than the single duration of the card search signal (e.g., the first card search signal or the second card search signal). For ease of understanding, as an example, the duration of an excitation signal can be approximately 20 microseconds, and the duration of a card search signal can be approximately 1 millisecond. Therefore, for a second device entering the radio frequency field emitted by the first device, it can distinguish between the card search signal and the excitation signal by the duration of the radio frequency signal emitted by the first device.

[0093] Furthermore, when the first device includes a first NFC chip with card reader functionality and a second NFC chip with card emulation functionality, and both the first and second NFC chips are enabled, an excitation signal can be emitted through the first NFC chip with card reader functionality. Thus, when the first device is set to card emulation mode, on the one hand, the first NFC chip with card reader functionality can emit an excitation signal to encourage the first device to quickly detect the first NFC device and establish an NFC connection with it in standard card detection mode; on the other hand, after the second device establishes a communication connection with the first device (specifically, with the second NFC chip with card emulation functionality), the second NFC chip can send its stored tag information to the second device via load modulation.

[0094] In one or more embodiments of this specification, a specific method for the first device to transmit an excitation signal is further provided.

[0095] Specifically, before transmitting the excitation signal, the process may further include: monitoring the distance between the second device and the first device; the transmission of the excitation signal may specifically include: transmitting the excitation signal if the distance is less than or equal to a second distance threshold.

[0096] Furthermore, the second distance threshold may be less than or equal to the second characteristic distance; when the distance between the second device and the first device is less than or equal to the second characteristic distance, the probability that the excitation signal emitted by the first device successfully excites the second device to switch from the low-power card detection mode to the standard card detection mode is greater than or equal to the second probability threshold.

[0097] The second characteristic distance can be used to represent the distance at which the probability that the excitation signal successfully excites the second device to switch from the low-power card detection mode to the standard card detection mode is greater than or equal to a second probability threshold. The second probability threshold is typically a high value, such as 99%, 95%, 90%, or 80%.

[0098] Furthermore, the second characteristic distance can be used to represent the shortest distance at which the excitation signal can excite the second device to switch from the low-power card detection mode to the standard card detection mode.

[0099] Figure 3 This diagram illustrates the state changes of a first device as a second device approaches a first device, according to an embodiment of this specification. Specifically, Figure 3 The diagram illustrates the timing of the first device switching its near-field communication mode and transmitting an excitation signal as the second device approaches the first device.

[0100] like Figure 3As shown, the first device is initially in card reader mode by default. When a user brings the first device (such as a smartphone) from a distance closer to the first device, and the distance between the second device and the first device decreases to X (e.g., 1 meter), it is determined that the user may have a need to use the second device to read tag information from the first device, and the first device can switch to card emulation mode.

[0101] Wherein, distance X can be less than or equal to the first distance threshold. The first distance threshold can be used to reflect the normal distance at which a user intends to use the first device. Furthermore, the first distance threshold can be greater than or equal to a first characteristic distance, which can be used to represent the distance at which the probability that the radio frequency field emitted by the first device in reader mode successfully activates the simulated NFC card in the second device is greater than or equal to a first probability threshold.

[0102] In practical applications, as the distance between the second device and the first device continuously decreases, when the distance between them triggers a condition that is less than or equal to the first distance threshold, the first device can be immediately switched to card emulation mode. Furthermore, the first device can be switched to card emulation mode before the distance between the second device and the first device further decreases to the first characteristic distance. That is, when the first device is switched to card emulation mode, the distance between the second device and the first device is greater than the first characteristic distance. In other words, when the first device is switched to card emulation mode, the distance between the second device and the first device is less than the first distance threshold, and the distance difference between the second device and the first distance threshold is less than or equal to a preset distance difference.

[0103] Furthermore, as the user continues to approach the first device with the second device, when the distance between the second device and the first device decreases to Y (e.g., 0.5 meters), it is determined that the user may be performing or about to perform an operation to read tag information from the first device using the second device. At this time, the tag reading efficiency and success rate can be improved by actively transmitting an excitation signal.

[0104] Wherein, distance Y can be less than or equal to a second distance threshold. The second distance threshold can be less than or equal to a second characteristic distance, which can be used to represent the distance at which the probability that the excitation signal successfully excites the second device to switch from low-power card detection mode to standard card detection mode is greater than or equal to a second probability threshold.

[0105] In practical applications, as the distance between the second device and the first device continuously decreases, when the distance between them triggers a condition that is less than or equal to the second distance threshold, the first device can begin to emit an excitation signal. Furthermore, the first device can continuously emit the excitation signal until the second device reads the tag information from the first device.

[0106] like Figure 3 As shown, compared to starting to transmit the excitation signal after the distance between the second device and the first device reaches X, the advantage of starting to transmit the excitation signal after the distance between the second device and the first device reaches Y is that, considering the short duration of the excitation signal, if the distance between the second device and the first device is far, the success rate of switching the second device from the low-power card detection mode to the standard card detection mode based on the excitation signal is relatively low. Therefore, transmitting the excitation signal after the distance between the second device and the first device reaches a suitable distance that can trigger the second device to switch the detection mode can improve the success rate of the excitation signal triggering the second device to switch the detection mode. This achieves the goal of improving tag reading efficiency and success rate while minimizing the energy and resources used for transmitting the excitation signal.

[0107] Of course, in optional embodiments, the excitation signal can be emitted after the distance between the second device and the first device reaches X, which can also achieve the technical effect of improving tag reading efficiency and success rate.

[0108] The distance X and distance Y values ​​given above are just examples. In actual applications, they may vary depending on factors such as the type of the second device, the type of the first device, the model of the NFC chip, the specifications of the NFC antenna, and the implementation environment.

[0109] In one or more embodiments of this specification, when the first device is switched to card emulation mode to support the first device (such as a smartphone) to perform NFC "tap-to-pay", there may be situations where the NFC "tap-to-pay" cannot be executed successfully for various reasons. Therefore, a fallback solution is further provided in the case where the NFC "tap-to-pay" cannot be executed successfully, that is, to realize NFC-based information interaction and business processing by emulating an NFC card.

[0110] In practical applications, even if the first device actively transmits an excitation signal, there may still be situations where the second device (such as a smartphone) cannot switch from LPCD mode to standard card detection mode. Furthermore, even if the second device (such as a smartphone) switches to standard card detection mode, various factors such as environmental conditions and user operation may still prevent it from successfully reading the tag information from the first device within the expected timeframe. Therefore, in one or more embodiments of this specification, to avoid the poor user experience caused by the user needing to perform the operation of touching the first device (such as a smartphone) for an extended period or multiple times (i.e., to avoid the user repeatedly performing the "touch" or "swipe" operation), the first device can be switched to reader mode in a timely manner to trigger the second device to activate the simulated NFC card, thereby enabling the first device to read information from the simulated NFC card from the second device.

[0111] Specifically, after switching the first device from card reader mode to card emulation mode in step 204, the process may further include: monitoring the distance between the second device and the first device for a first duration under a preset distance condition; the preset distance condition includes a distance less than or equal to a third characteristic distance. If the first duration is greater than or equal to a first duration threshold and the tag information is not successfully read, then the first device is switched from card emulation mode to card reader mode.

[0112] The third characteristic distance can be used to reflect the statistical distance between the second device and the first device during near-field communication. Further, the third characteristic distance can be used to reflect the statistical distance between the second device and the first device when reading tag information using near-field communication. This statistical distance can be obtained based on a large amount of actual business data, or it can be obtained based on experimental data. For example, the statistical distance can be the median, average, or maximum value obtained based on a large amount of actual business data or experimental data of users reading tag information with smartphones.

[0113] In practical applications, if the distance between the second device and the first device is less than or equal to the third feature distance, it can indicate that the user's state is: performing an operation to read tag information from the first device using the second device.

[0114] The first duration threshold can be used to reflect the statistical time taken for the second device to successfully conduct near-field communication with the first device. Further, the first duration threshold can be used to reflect the statistical time taken for the second device to read tag information from the first device using near-field communication. This statistical time can be obtained based on a large amount of actual business data, or it can be obtained based on experimental data. For example, the statistical time can be the median, average, or maximum value calculated based on a large amount of actual business data or experimental data of users reading tag information with smartphones.

[0115] In practical applications, if the duration after the distance between the second device and the first device reaches less than or equal to the third characteristic distance reaches the first duration threshold and the tag information is not successfully read, it can be indicated that the event of the second device reading the tag information from the first device has most likely failed, that is, the NFC-based "tap to tap" has failed.

[0116] In this case, in one or more embodiments of this specification, in order to improve the user experience and avoid user service execution failure, the first device can be actively switched from card emulation mode to card reader mode, thereby using the second device as a card reader to read information of the simulated NFC card from the user's second device.

[0117] Further optionally, the third characteristic distance can be equal to the second characteristic distance. In this case, the preset distance condition can be set to be less than or equal to the second characteristic distance. Thus, in practical applications, the first duration can be counted from the time the first device starts transmitting the excitation signal. Alternatively, the third characteristic distance may not be equal to the second characteristic distance.

[0118] Additionally, the tag information being successfully read indicates that the tag information has been completely read. In practical applications, the NFC chip can output an interrupt signal indicating that the data reading is complete when the data reading is finished. Thus, the first device can determine that the data tag data has been successfully read based on the interrupt signal indicating that the data reading is complete.

[0119] In one or more embodiments of this specification, another method is also provided to determine when to switch the first device from card emulation mode to card reader mode, or in other words, another method is provided to determine when an NFC-based "tap-to-pay" operation fails.

[0120] Specifically, in the application scenarios of one or more embodiments of this specification, since the tag information stored in the first device is known, and further, the amount or length of the tag information stored in the first device is known, the time required for the tag information in the first device to be completely read is known. Therefore, by comparing the duration for which the second device reads the tag information from the first device with the time required for the tag information to be completely read, it can be determined whether a timeout has occurred, and thus whether the "touch" execution has failed and whether the communication mode of the first device needs to be switched.

[0121] More specifically, after switching the first device from card reader mode to card emulation mode, the process may further include: acquiring a first interrupt signal, the first interrupt signal indicating that the tag information in the first device has begun to be read; if a second duration after the reception time of the first interrupt signal is greater than or equal to a second duration threshold and the tag information has not been successfully read, then switching the first device from card emulation mode to card reader mode; wherein the second duration threshold is greater than or equal to the duration required for the tag information to be fully read.

[0122] Wherein, the second duration threshold is less than the first duration threshold.

[0123] In practical applications, if the tag information has started being read and the duration exceeds the time required for complete reading, and the tag information is still not successfully read, then the tag reading has failed, meaning the NFC-based "tap-to-read" operation has failed. In this case, the first device can be switched to reader mode to trigger the second device to eject a simulated NFC card and read its information. This avoids situations where service delivery is disrupted due to tag reading failure on the first device, increasing the success rate of users successfully completing NFC-based services with a single "swipe" operation and improving the user experience.

[0124] In one or more embodiments of this specification, after switching the first device from card emulation mode to card reader mode, the process may further include: transmitting a second card search signal, the second card search signal being used to trigger the second device to activate a simulated NFC card; and obtaining second card information corresponding to the simulated NFC card sent by the second device.

[0125] Specifically, the first device can continuously emit a radio frequency field, that is, emit a second card search signal. If a second device carrying a simulated NFC card enters the radio frequency field emitted by the first device, the antenna of the second device's NFC module can obtain the energy in the radio frequency field, thereby setting the second device's NFC module to card emulation mode.

[0126] In practical applications, if the NFC module of the second device is currently in reader mode, it can be switched to card emulation mode. For example, if the NFC module of the second device contains an NFC chip that has both reader and card emulation functions, that NFC chip can be switched from reader mode to card emulation mode. Alternatively, if the NFC module of the second device contains both an NFC chip with reader function and an NFC chip with card emulation function, and the NFC chip with reader function is currently enabled while the NFC chip with card emulation function is disabled, then the NFC chip with card emulation function in the NFC module can be enabled.

[0127] Furthermore, after the NFC module in the second device is set to card emulation mode, it can return the second card information corresponding to the simulated NFC card to the first device through load modulation. This enables the first device to read the second card information corresponding to the simulated NFC card in the second device.

[0128] As an example, the second card information may include, but is not limited to, access card information, transportation card information, car key information, etc.

[0129] In one or more embodiments of this specification, if the first device includes a first NFC chip with card reader functionality and a second NFC chip with card emulation functionality, then switching the first device from card emulation mode to card reader mode may specifically include: turning off the second NFC chip. The first NFC chip remains on.

[0130] In practical applications, the second card-finding signal can be transmitted via the first NFC chip. Furthermore, the second card information corresponding to the simulated NFC card can be read via the first NFC chip.

[0131] In one or more embodiments of this specification, the first device may default to reader mode, continuously transmit radio frequency fields, and read information from physical NFC cards that enter the radio frequency field.

[0132] Specifically, the NFC-based information transmission method may further include: transmitting a first card-finding signal, the first card-finding signal being used to establish an NFC connection with a physical NFC card; and acquiring first card information transmitted by the physical NFC card based on the NFC connection.

[0133] Specifically, the first device can continuously emit a radio frequency field, that is, emit a first card search signal. If a physical NFC card enters the radio frequency field emitted by the first device, the physical NFC card can obtain energy from the radio frequency field through its antenna, thereby waking up the NFC chip in the physical NFC card. After the NFC chip in the physical NFC card is woken up, it can send the first card information stored in the NFC chip to the first device through load modulation. Thus, the first device can read the first card information in the physical NFC card.

[0134] In practical applications, when the first device includes a first NFC chip with card reader functionality and a second NFC chip with card emulation functionality, and the first device is in card reader mode by default, the first NFC chip is enabled by default, while the second NFC chip is disabled by default. Therefore, the first NFC chip can transmit a first card search signal. Furthermore, the first NFC chip can be used to read the first card information from a physical NFC card.

[0135] As an example, the first card information may include, but is not limited to, access card information, transportation card information, car key information, etc.

[0136] Furthermore, the power of the radio frequency field emitted by the first device in card reader mode can be dynamically adjusted. Specifically, in the initial state, the power of the radio frequency field continuously emitted by the first device (e.g., the first NFC chip) can be low to avoid triggering mobile terminal devices at a greater distance to switch to card emulation mode and eject simulated NFC cards. Subsequently, when a physical NFC card enters the radio frequency field emitted by the first device (e.g., the first NFC chip), the first device (e.g., the first NFC chip) can sense the physical NFC card. In this case, the power of the emitted radio frequency field can be increased, thereby improving the efficiency and success rate of the first device (e.g., the first NFC chip) in reading information from the physical NFC card.

[0137] Based on the above description, this specification provides a flowchart illustrating the NFC-based information exchange process between a first device and a second device or a physical NFC card in a practical application scenario, as shown in the embodiment below. Figure 4 As shown in the image.

[0138] like Figure 4 As shown in the figure, 1) the first device with NFC function is in reader mode by default; 2) The first device continuously monitors preset types of wireless signals in the surrounding environment; 3) If the first device does not detect a wireless signal, the first device may continue to transmit the first card search signal in card reader mode; 4) If the physical NFC card receives the first card search signal, it returns a response signal to the first device, and then the first device reads the card information from the physical NFC card based on NFC; 5) If the first device detects the wireless signal of the second device, the first device switches to card emulation mode; 6) Optionally, in card emulation mode, the first device may transmit an excitation signal; 7) The second device can switch from LPCD mode to standard check mode in response to the excitation signal; 8) In standard card detection mode, after establishing an NFC connection with the first device, the second device can send a card reading request signal to the first device; 9) The first device may send tag information to the second device in response to the card reading request signal, that is, the second device reads the tag information; 10) The first device can invoke the application based on the read tag information, and then perform various business operations in the application; 11) Optionally, if the tag information in the first device is not successfully read within a timeout, the first device may switch to card reader mode; 12) In card reader mode, the first device can continuously transmit the second card search signal; 13) The second device can activate an analog NFC card in response to the second card search signal; 14) The first device reads the card information corresponding to the simulated NFC card from the second device based on NFC.

[0139] like Figure 4 As shown, based on one or more embodiments of this specification, an NFC solution compatible with multiple NFC interaction methods is provided. Specifically, a communication device compatible with multiple NFC interaction methods in both hardware and interaction process, and a first device including the communication device, are provided.

[0140] More specifically, the first device defaults to card reader mode, capable of recognizing physical NFC cards when a user brings them near. In practical applications, users can use physical NFC cards to make NFC card swipes on the first device.

[0141] The first device uses itself or associated devices to detect wireless signals in the surrounding environment, such as Bluetooth signals, cellular network signals, and satellite navigation signals, to monitor whether a user carrying a mobile terminal device such as a smartphone (the second device) is approaching. As the user approaches the first device with the second device, the wireless signal gradually strengthens, and the distance between the second and first devices can be determined based on the signal strength. When the detected distance is less than a preset distance threshold, it can be assumed that the user wants to use the NFC "tap-to-pay" function, and the first device can be switched to card emulation mode, waiting for the user to perform the "tap-to-pay" action. In practical applications, the user can use their smartphone to "tap" the first device, thereby activating the application on the smartphone, and then the user can perform various business operations based on the application.

[0142] To further enhance the user's NFC experience, a preset time threshold can be set. If the duration of the process of a user holding a second device to read tag information from a first device exceeds the preset time threshold, the NFC "tap" function can be considered to be disabled. In this case, the first device can be switched to card reader mode. Thus, the first device can actively emit a high-power radio frequency field to trigger the simulated NFC card function of the second device. Consequently, the user can use the second device as a simulated NFC card to perform NFC "swipe" at the second device.

[0143] Therefore, the NFC solution (communication device / first device) provided in one or more embodiments of this specification is compatible with various NFC interaction methods, including users using physical NFC cards, NFC "tap" on mobile terminals, and mobile terminals simulating NFC cards. It can also achieve seamless and imperceptible switching between functions without requiring users to select an interaction device or perform redundant operations, thus greatly improving the user's NFC experience.

[0144] Furthermore, in practical applications, server providers can easily configure a communication device to accommodate various NFC interaction needs that users may have, reducing hardware deployment costs and facilitating management. For example, in NFC vehicle control scenarios applied to smart cars, by installing an NFC solution as provided in one or more embodiments of this specification on the vehicle, the need for NFC vehicle control can be met regardless of whether the user holds a physical NFC card or a smartphone, providing users with greater convenience and flexibility.

[0145] 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.

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

[0147] Figure 5 A schematic diagram of an NFC-based information transmission device provided in one embodiment of this specification is shown.

[0148] like Figure 5 As shown, this NFC-based information transmission device is applied to a first device 100 with NFC functionality; the NFC functionality specifically includes a card reader mode and a card emulation mode; the information transmission device includes a main control module 502 and an NFC module 504, the NFC module 504 being connected to the main control module 502. The main control module 502 is used to detect wireless signals of a preset type; the wireless signals of the preset type are wireless signals supported by mobile communication terminals with NFC function, but do not include NFC signals; if the wireless signals of the preset type are detected, the NFC module 504 is switched from card reader mode to card emulation mode. The NFC module 504 is used to receive a card reading request signal from the second device 200 that transmits a wireless signal of the preset type in card emulation mode; the card reading request signal is an NFC signal; in response to the card reading request signal, it sends tag information; the tag information is used to wake up the application on the second device 200.

[0149] The card reader request signal is an NFC signal.

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

[0151] Optionally, the main control module 502 can be specifically used to: if a wireless signal of the preset type is detected, calculate the distance between the second device 200 and the first device 100 based on the characteristic parameters of the wireless signal; if the distance is less than or equal to a first distance threshold, switch the NFC module 504 from card reader mode to card emulation mode.

[0152] Optionally, the information transmitting device may further include a detection module for collecting wireless signals and providing them to the main control module 502; the detection module includes at least one of a Bluetooth signal detection module, a cellular network signal detection module, and a satellite navigation signal detection module.

[0153] In practical applications, the detection module may optionally be a module in the first device 100 that is communicatively connected to the main control module 502; or alternatively, the detection module may be part of the main control module 502.

[0154] Furthermore, the NFC module 504 may include an NFC antenna and an NFC chip.

[0155] Figure 6 This specification shows an optional structural diagram of an NFC-based information transmission device according to an embodiment of the present specification.

[0156] like Figure 6 As shown, optionally, the NFC module 504 may specifically include an NFC antenna 5041 and an NFC chip 5042 with card reader and card emulation functions; the NFC antenna 5041 is connected to the NFC chip 5042; the NFC chip 5042 is connected to the main control module 502; the near-field communication mode of the NFC chip 5042 is preset to card reader mode; The main control module 502 is specifically used to switch the NFC chip from reader mode to card emulation mode if the preset type of wireless signal is detected.

[0157] In practical applications, the NFC antenna 5041 can be used to sense the card reading request signal transmitted by the second device 200; the NFC chip 5042 can be used to respond to the card reading request signal in card emulation mode and determine the tag information; the NFC antenna 5041 can also be used to send the tag information to the second device 200.

[0158] Figure 7 This specification shows a schematic diagram of another alternative structure of an NFC-based information transmission device provided in one embodiment.

[0159] like Figure 7As shown, optionally, the NFC module 504 may specifically include an NFC antenna 5041, a first NFC chip 5043 with card reader function, and a second NFC chip 5044 with card emulation function; the NFC antenna 5041 is connected to the first NFC chip 5043 and the second NFC chip 5044; the first NFC chip 5043 and the second NFC chip 5044 are connected to the main control module 502; the first NFC chip 5043 is in the on state by default; the second NFC chip is in the off state by default. The main control module 502 is specifically used to activate the second NFC chip if a wireless signal of the preset type is detected.

[0160] In practical applications, the NFC antenna 5041 can be used to sense the card reading request signal transmitted by the second device 200; the second NFC chip 5044 can be used to determine the tag information in response to the card reading request signal; the NFC antenna 5041 can also be used to send the tag information to the second device 200.

[0161] Figure 8 This specification shows another alternative structural diagram of an NFC-based information transmission device provided in one embodiment.

[0162] like Figure 8 As shown, optionally, the NFC module 504 may specifically include a first NFC chip 5043 with card reader function, a first NFC antenna 5045 connected to the first NFC chip 5043, a second NFC chip 5044 with card emulation function, and a second NFC antenna 5046 connected to the second NFC chip 5044; the first NFC chip 5043 and the second NFC chip 5044 are connected to the main control module 502; the first NFC chip 5043 is in the on state by default; the second NFC chip 5044 is in the off state by default. The main control module 502 is specifically used to activate the second NFC chip 5044 if a wireless signal of the preset type is detected.

[0163] In practical applications, the second NFC antenna 5046 can be used to sense the card reading request signal transmitted by the second device 200; the second NFC chip 5044 can be used to determine the tag information in response to the card reading request signal; and the second NFC antenna 5046 can also be used to send the tag information to the second device 200.

[0164] In an optional embodiment, the main control module 502 may also be used to send an excitation command to the NFC module 504 if the preset type of wireless signal is detected; the NFC module 504 may also be used to transmit an excitation signal in response to the excitation command; the excitation signal is used to excite the second device 200 to switch from a low-power card detection mode to a standard card detection mode.

[0165] Specifically, the main control module 502 can be used to monitor the distance between the second device 200 and the first device 100; if the distance between the second device 200 transmitting wireless signals and the first device 100 reaches a preset distance threshold, an excitation command can be sent to the NFC module 504.

[0166] In practical applications, Figure 7 or Figure 8 Taking the structure shown as an example, if the NFC module 504 includes a first NFC chip 5043 with card reader function and a second NFC chip 5044 with card emulation function, when the first device 100 is in card emulation mode, the first NFC chip 5043 and the second NFC chip 5044 can be simultaneously turned on. Specifically, the first NFC chip 5043 can be used to transmit an excitation signal through the NFC antenna 5041 or the first NFC antenna 5045 connected to the first NFC chip 5043 in response to the excitation command from the main control module 502.

[0167] In an optional embodiment, the NFC module 504 is in reader mode; the NFC module 504 is further configured to: transmit a first card search signal, the first card search signal being used to establish an NFC connection with the physical NFC card 300; and acquire first card information sent by the physical NFC card 300 based on the NFC connection.

[0168] In practical applications, Figure 7 or Figure 8 Taking the structure shown as an example, if the NFC module 504 includes a first NFC chip 5043 with card reader function and a second NFC chip 5044 with card emulation function, the first NFC chip 5043 is in the default enabled state. Specifically, the first NFC chip 5043 can be used to: transmit a first card search signal via NFC antenna 5041 or first NFC antenna 5045 connected to the first NFC chip 5043, the first card search signal being used to establish an NFC connection with the physical NFC card 300; and acquire first card information sent by the physical NFC card 300 based on the NFC connection via NFC antenna 5041 or first NFC antenna 5045 connected to the first NFC chip 5043.

[0169] In an optional embodiment, the main control module 502 can also be used to: monitor the distance between the second device 200 and the first device 100 for a first duration under a preset distance condition, the preset distance condition including a distance less than or equal to a third characteristic distance; if the first duration is greater than or equal to a first duration threshold and the tag information is not successfully read, then the NFC module 504 is switched from card emulation mode to card reader mode.

[0170] In an optional embodiment, the main control module 502 may further be used to: obtain a first interrupt signal from the NFC module 504; the first interrupt signal is used to indicate that the tag information in the NFC module 504 has begun to be read; if the second duration after the reception time of the first interrupt signal is greater than or equal to a second duration threshold and the tag information has not been successfully read, then the NFC module 504 is switched from card emulation mode to card reader mode; wherein, the second duration threshold is greater than or equal to the duration required for the tag information to be completely read.

[0171] In an optional embodiment, after the NFC module 504 switches from card emulation mode to card reader mode, the NFC module 504 can also be used to: transmit a second card search signal; the second card search signal is used to trigger the first device 100 to activate the simulated NFC card; and obtain the second card information corresponding to the simulated NFC card sent by the second device 200.

[0172] In optional embodiments, such as Figure 7 and Figure 8 As shown, the NFC module 504 may include a first NFC chip 5043 with card reader functionality and a second NFC chip 5044 with card emulation functionality; the main control module 502 is specifically used to: turn off the second NFC chip 5044. The first NFC chip 5043 remains on.

[0173] In practical applications, the main control module 502 can specifically be used to obtain a first interrupt signal from the second NFC chip 5044; the first interrupt signal is used to indicate that the tag information in the NFC module 504 has started to be read; if the second duration after the reception time of the first interrupt signal is greater than or equal to a second duration threshold and the tag information has not been successfully read, then the second NFC chip 5044 is turned off, while the first NFC chip 5043 remains on.

[0174] Specifically, the first NFC chip 5043 can be used to: transmit a second card search signal through the NFC antenna 5041 or the first NFC antenna 5045 connected to the first NFC chip 5043, the second card search signal being used to trigger the first device 100 to activate the simulated NFC card; and obtain the second card information corresponding to the simulated NFC card sent by the second device 200 through the NFC antenna 5041 or the first NFC antenna 5045 connected to the first NFC chip 5043.

[0175] 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.

[0176] 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.

[0177] The above is an illustrative scheme of an NFC-based information transmission device according to this embodiment. It should be noted that the technical solution of this NFC-based information transmission device and the technical solution of the NFC-based information transmission method described above belong to the same concept. Details not described in detail in the technical solution of the NFC-based information transmission device can be found in the description of the technical solution of the NFC-based information transmission method described above.

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

[0179] Figure 9 A structural block diagram of a computing device provided in one embodiment of this specification is shown.

[0180] The computing device 900 includes: Memory 910 and processor 920; The memory 910 is used to store computer programs / instructions, and the processor 920 is used to execute the computer programs / instructions. When the computer programs / instructions are executed by the processor 920, they implement the steps of the NFC-based information transmission method.

[0181] Specifically, the components of the computing device 900 include, but are not limited to, a memory 910 and a processor 920. The processor 920 is connected to the memory 910 via a bus 930, and a database 950 is used to store data.

[0182] The computing device 900 also includes an access device 940, which enables the computing device 900 to communicate via one or more networks 960. 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 940 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.

[0183] In one embodiment of this specification, the above-described components of the computing device 900 and Figure 9 Other components, not shown, can also be connected to each other, for example, via a bus. It should be understood that... Figure 9 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.

[0184] The computing device 900 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 900 can also be a mobile or stationary server.

[0185] Specifically, when the processor 920 executes the computer instructions, it implements the steps of the NFC-based information transmission method.

[0186] 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 NFC-based information transmission 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 NFC-based information transmission method described above.

[0187] 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 NFC-based information transmission method described above.

[0188] 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 NFC-based information transmission method described above. Details not described in detail in the technical solution of the storage medium can be found in the description of the NFC-based information transmission method described above.

[0189] 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 NFC-based information transmission method.

[0190] 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 above-described NFC-based information transmission method 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 above-described NFC-based information transmission method.

[0191] 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 the apparatus and device embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiments. The apparatus, device and method provided in the embodiments of this specification are corresponding to each other, and therefore the apparatus and device 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 apparatus and device will not be repeated here.

[0192] 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.

[0193] 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.

[0194] 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.

[0195] 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.

[0196] 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.

[0197] 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.

[0198] 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.

[0199] 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.

[0200] 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.

[0201] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0202] 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.

[0203] 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.

[0204] 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.

[0205] 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. An NFC-based communication method, applied to a first device with NFC functionality, wherein the NFC functionality specifically includes a reader mode and a card emulation mode; the method includes: In card emulation mode, if the tag information in the first device is detected to have timed out and not been successfully read, the first device will be switched from card emulation mode to card reader mode. In reader mode, near-field communication is performed with the second device.

2. The method as described in claim 1, wherein if the tag information in the first device is detected to have timed out and not been successfully read, the step of switching the first device from card emulation mode to card reader mode specifically includes: The first duration for which the distance between the second device and the first device meets a preset distance condition; The preset distance condition includes a distance less than or equal to a third feature distance; wherein, the third feature distance is used to reflect the statistical distance at which the second device reads tag information from the first device based on near-field communication; If the first duration is greater than or equal to the first duration threshold and the tag information is not successfully read, then the first device is switched from card emulation mode to card reader mode.

3. The method as described in claim 1, wherein if the tag information in the first device is detected to have timed out and not been successfully read, the step of switching the first device from card emulation mode to card reader mode specifically includes: Obtain the first interrupt signal; The first interrupt signal is used to indicate that the tag information in the first device has begun to be read; If the second duration after the reception of the first interrupt signal is greater than or equal to the second duration threshold and the tag information is not successfully read, then the first device is switched from card emulation mode to card reader mode; wherein the second duration threshold is greater than or equal to the duration required for the tag information to be fully read.

4. The method as described in claim 1, wherein the near-field communication with the second device in card reader mode specifically includes: In card reader mode, a card search signal is emitted to trigger the second device to activate a simulated NFC card; Obtain the card information corresponding to the simulated NFC card sent by the second device.

5. The method of claim 1, wherein the first device comprises a first NFC chip having a card reader function and a second NFC chip having a card emulation function; The step of switching the first device from card emulation mode to card reader mode specifically includes: The second NFC chip is turned off; the first NFC chip remains on.

6. The method of claim 1, wherein the first device includes an NFC chip having card reader functionality and card emulation functionality; The step of switching the first device from card emulation mode to card reader mode specifically includes: Switch the NFC chip from card emulation mode to card reader mode.

7. An NFC-based communication method, applied to a first device with NFC functionality, wherein the NFC functionality specifically includes a reader mode and a card emulation mode; the method includes: Detect wireless signals of a preset type; the preset type of wireless signal is a wireless signal supported by a mobile communication terminal with NFC function; The communication distance of the wireless signal is greater than that of the NFC signal; If the preset type of wireless signal is detected, the first device is switched from card reader mode to card emulation mode; In card emulation mode, near-field communication is performed with a second device that transmits a wireless signal of the preset type.

8. The method of claim 7, wherein in card emulation mode, performing near-field communication with a second device transmitting a wireless signal of the preset type specifically includes: In card emulation mode, receive the card reading request signal from the second device; The card reader request signal is an NFC signal; In response to the card reader request signal, tag information is sent; the tag information is used to activate the application on the second device.

9. The method of claim 7, wherein, The wireless signal includes at least one of Bluetooth signal, cellular network signal and satellite navigation signal.

10. The method of claim 7, wherein if a wireless signal of the preset type is detected, switching the first device from card reader mode to card emulation mode specifically includes: If the preset type of wireless signal is detected, the distance between the second device and the first device is calculated based on the characteristic parameters of the wireless signal; If the distance is less than or equal to the first distance threshold, the first device is switched from card reader mode to card emulation mode.

11. The method of claim 10, wherein, The first distance threshold is greater than or equal to the first characteristic distance; when the distance between the second device and the first device is less than or equal to the first characteristic distance, the probability that the radio frequency field emitted by the first device in reader mode successfully activates the simulated NFC card in the second device is greater than or equal to the first probability threshold.

12. The method of claim 11, further comprising: If the distance is less than or equal to the first distance threshold and greater than the first feature distance, the first device is switched from reader mode to card emulation mode.

13. The method of claim 7, wherein the first device includes an NFC chip having card reader function and card emulation function; the near field communication mode of the NFC chip is preset to card reader mode; If the preset type of wireless signal is detected, the first device is switched from card reader mode to card emulation mode, specifically including: If the preset type of wireless signal is detected, the NFC chip is switched from reader mode to card emulation mode.

14. The method of claim 7, wherein the first device comprises a first NFC chip having a card reader function and a second NFC chip having a card emulation function; the first NFC chip is in an on state by default; and the second NFC chip is in a off state by default. If the preset type of wireless signal is detected, the first device is switched from card reader mode to card emulation mode, specifically including: If the preset type of wireless signal is detected, the second NFC chip is activated.

15. The method of claim 7, further comprising: If the preset type of wireless signal is detected, an excitation signal is transmitted; the excitation signal is used to excite the second device to switch from low-power card detection mode to standard card detection mode.

16. The method of claim 15, further comprising, before transmitting the excitation signal: Monitor the distance between the second device and the first device; The transmitted excitation signal specifically includes: If the distance is less than or equal to the second distance threshold, then an excitation signal is emitted.

17. The method of claim 16, wherein, The second distance threshold is less than or equal to the second characteristic distance; when the distance between the second device and the first device is less than or equal to the second characteristic distance, the probability that the excitation signal emitted by the first device successfully excites the second device to switch from the low-power card detection mode to the standard card detection mode is greater than or equal to the second probability threshold.

18. The method of claim 7, wherein the first device is in card reader mode; the method further comprises: Transmit the first card search signal; The first card search signal is used to establish an NFC connection with a physical NFC card; Obtain the first card information sent by the physical NFC card based on the NFC connection.

19. The method of claim 7, further comprising: In card emulation mode, if the tag information in the first device is detected to have timed out and not been successfully read, the first device will be switched from card emulation mode to card reader mode. In reader mode, near-field communication is performed with the second device.

20. The method as described in claim 19, wherein if it is detected that the tag information in the first device has not been successfully read within a timeout period, the step of switching the first device from card emulation mode to card reader mode specifically includes: The first duration for which the distance between the second device and the first device meets a preset distance condition; The preset distance condition includes a distance less than or equal to a third feature distance; wherein, the third feature distance is used to reflect the statistical distance at which the second device reads tag information from the first device based on near-field communication; If the first duration is greater than or equal to the first duration threshold and the tag information is not successfully read, then the first device is switched from card emulation mode to card reader mode.

21. The method as described in claim 19, wherein if it is detected that the tag information in the first device has not been successfully read within a timeout period, the step of switching the first device from card emulation mode to card reader mode specifically includes: Obtain the first interrupt signal; The first interrupt signal is used to indicate that the tag information in the first device has begun to be read; If the second duration after the reception of the first interrupt signal is greater than or equal to the second duration threshold and the tag information is not successfully read, then the first device is switched from card emulation mode to card reader mode; wherein the second duration threshold is greater than or equal to the duration required for the tag information to be fully read.

22. The method of claim 19, wherein in reader mode, performing near-field communication with the second device specifically includes: In card reader mode, a second card search signal is transmitted; The second card search signal is used to trigger the second device to activate the simulated NFC card; Obtain the second card information corresponding to the simulated NFC card sent by the second device.

23. The method of claim 19, wherein the first device comprises a first NFC chip with card reader functionality and a second NFC chip with card emulation functionality; the step of switching the first device from card emulation mode to card reader mode specifically includes: Turn off the second NFC chip.

24. An NFC-based communication device, applied to a first device having NFC functionality, wherein the NFC functionality specifically includes a card reader mode and a card emulation mode; the communication device includes a main control module and an NFC module, wherein the NFC module is connected to the main control module; The main control module is used to switch the first device from card emulation mode to card reader mode if it detects that the tag information in the first device has not been successfully read within a timeout in card emulation mode. The NFC module is used for near-field communication with a second device in reader mode.

25. The apparatus of claim 24, wherein the main control module is specifically used for: The monitoring device is used to determine the first duration for which the distance between the second device and the first device meets a preset distance condition; the preset distance condition includes a distance less than or equal to a third characteristic distance; wherein... The third feature distance is used to reflect the statistical distance of reading tag information from the first device using the second device based on near-field communication; If the first duration is greater than or equal to the first duration threshold and the tag information is not successfully read, then the NFC module is switched from card emulation mode to card reader mode.

26. The apparatus of claim 24, wherein the main control module is specifically used for: A first interrupt signal is obtained from the NFC module; the first interrupt signal is used to indicate that the tag information in the NFC module has started to be read. If the second duration following the reception of the first interrupt signal is greater than or equal to a second duration threshold and the tag information is not successfully read, then the NFC module switches from card emulation mode to reader mode; wherein, The second duration threshold is greater than or equal to the duration required for the tag information to be fully read.

27. The apparatus of claim 24, wherein the NFC module is specifically used for: In card reader mode, a second card search signal is transmitted; the second card search signal is used to trigger the second device to activate a simulated NFC card. Obtain the second card information corresponding to the simulated NFC card sent by the second device.

28. The apparatus of claim 24, wherein the NFC module comprises a first NFC chip having card reader functionality and a second NFC chip having card emulation functionality; the main control module is specifically used for: Turn off the second NFC chip.

29. The apparatus of claim 24, wherein the NFC module comprises an NFC chip having reader functionality and card emulation functionality; the main control module is specifically used for: Switch the NFC chip from card emulation mode to card reader mode.

30. An NFC-based communication device, applied to a first device with NFC functionality; the NFC functionality specifically includes a reader mode and a card emulation mode; the communication device includes a main control module and an NFC module, the NFC module being connected to the main control module: The main control module is used to detect wireless signals of a preset type; the preset type of wireless signal is a wireless signal supported by a mobile communication terminal with NFC function; the communication distance of the wireless signal is greater than the communication distance of the NFC signal; if the preset type of wireless signal is detected, the NFC module is switched from card reader mode to card emulation mode. The NFC module is used to perform near-field communication with a second device that transmits a wireless signal of the preset type in card emulation mode.

31. The apparatus of claim 30, wherein the NFC module is specifically used for: In card emulation mode, a card reader request signal from the second device is received; the card reader request signal is an NFC signal; and In response to the card reader request signal, tag information is sent; the tag information is used to activate the application on the second device.

32. The apparatus of claim 30 further includes a detection module for acquiring wireless signals and providing them to the main control module; the detection module includes at least one of a Bluetooth signal detection module, a cellular network signal detection module, and a satellite navigation signal detection module.

33. The apparatus of claim 30, wherein the main control module is specifically used for: If the preset type of wireless signal is detected, the distance between the second device and the first device is calculated based on the characteristic parameters of the wireless signal; If the distance is less than or equal to a first distance threshold, the NFC module is switched from reader mode to card emulation mode.

34. The apparatus of claim 30, wherein the NFC module specifically includes an NFC antenna and an NFC chip having card reader and card emulation functions; the NFC antenna is connected to the NFC chip; the NFC chip is connected to the main control module; and the near-field communication mode of the NFC chip is preset to card reader mode. The main control module is specifically used to switch the NFC chip from reader mode to card emulation mode if the preset type of wireless signal is detected.

35. The apparatus of claim 30, wherein the NFC module specifically comprises an NFC antenna, a first NFC chip having a card reader function, and a second NFC chip having a card emulation function; the NFC antenna is connected to the first NFC chip and the second NFC chip; the first NFC chip and the second NFC chip are connected to the main control module; the first NFC chip is in an on state by default; and the second NFC chip is in an off state by default. The main control module is specifically used to activate the second NFC chip if a wireless signal of the preset type is detected.

36. The apparatus of claim 30, wherein the NFC module specifically comprises a first NFC chip having a card reader function, a first NFC antenna connected to the first NFC chip, a second NFC chip having a card emulation function, and a second NFC antenna connected to the second NFC chip; the first NFC chip and the second NFC chip are connected to the main control module; the first NFC chip is in an on state by default; the second NFC chip is in a off state by default; The main control module is specifically used to activate the second NFC chip if a wireless signal of the preset type is detected.

37. The apparatus of claim 30, wherein, The main control module is also used to send an excitation command to the NFC module if the preset type of wireless signal is detected. The NFC module is also used to transmit an excitation signal in response to the excitation command; the excitation signal is used to excite the second device to switch from low-power card detection mode to standard card detection mode.

38. The apparatus of claim 30, wherein the NFC module is in reader mode; The NFC module is further configured to: transmit a first card search signal, the first card search signal being used to establish an NFC connection with a physical NFC card; and acquire first card information sent by the physical NFC card based on the NFC connection.

39. The apparatus of claim 30, wherein the main control module is further configured to: In card emulation mode, if the tag information in the first device is detected to have timed out and not been successfully read, the first device will be switched from card emulation mode to card reader mode. In reader mode, near-field communication is performed with the second device.

40. The apparatus of claim 39, wherein the main control module is specifically used for: The monitoring device is used to determine the first duration for which the distance between the second device and the first device meets a preset distance condition; the preset distance condition includes a distance less than or equal to a third characteristic distance; wherein... The third feature distance is used to reflect the statistical distance of reading tag information from the first device using the second device based on near-field communication; If the first duration is greater than or equal to the first duration threshold and the tag information is not successfully read, then the NFC module is switched from card emulation mode to card reader mode.

41. The apparatus of claim 39, wherein the main control module is specifically used for: A first interrupt signal is obtained from the NFC module; the first interrupt signal is used to indicate that the tag information in the NFC module has started to be read. If the second duration following the reception of the first interrupt signal is greater than or equal to a second duration threshold and the tag information is not successfully read, then the NFC module switches from card emulation mode to reader mode; wherein, The second duration threshold is greater than or equal to the duration required for the tag information to be fully read.

42. The apparatus of claim 39, wherein the NFC module is specifically used for: In card reader mode, a second card search signal is transmitted; the second card search signal is used to trigger the second device to activate a simulated NFC card. Obtain the second card information corresponding to the simulated NFC card sent by the second device.

43. The apparatus of claim 39, wherein the NFC module comprises a first NFC chip having a card reader function and a second NFC chip having a card emulation function; the main control module is specifically used for: Turn off the second NFC chip.

44. An NFC-based communication device, applied to a first device, comprising: Main control module; An NFC chip, connected to the main control module, has card reader and card emulation functions, and is preset to card reader mode; The main control module is used to switch the NFC chip from reader mode to card emulation mode when a preset type of wireless signal is detected.

45. The apparatus of claim 44, further comprising an NFC antenna connected to the NFC chip; The NFC antenna is used to sense the card read request signal transmitted by the second device; The NFC chip can be used to determine tag information in response to the card reading request signal in card emulation mode; The NFC antenna can also be used to send the tag information to the second device.

46. ​​The apparatus of claim 44, wherein the main control module is further configured to: In card emulation mode, if the tag information in the first device is detected to have timed out and not been successfully read, the NFC chip is switched from card emulation mode to card reader mode.

47. An NFC-based communication device, applied to a first device, comprising: Main control module; The first NFC chip, connected to the main control module, has a card reader function and is in the enabled state by default. The second NFC chip, connected to the main control module, has card emulation functionality and is disabled by default. The main control module is used to activate the second NFC chip when a preset type of wireless signal is detected, so that the device has card emulation function.

48. The apparatus of claim 47, further comprising: An NFC antenna is connected to the first NFC chip and the second NFC chip; The NFC antenna is used to sense the card read request signal transmitted by the second device; The second NFC chip is used to determine tag information in response to the card reader request signal; The NFC antenna is also used to send the tag information to the second device.

49. The apparatus of claim 47, further comprising: The first NFC antenna is connected to the first NFC chip; as well as The second NFC antenna is connected to the second NFC chip; The second NFC antenna is used to sense the card reader request signal transmitted by the second device; The second NFC chip is used to determine tag information in response to the card reader request signal; The second NFC antenna is also used to send the tag information to the second device.

50. The apparatus of claim 47, wherein, The first NFC chip is also used to transmit an excitation signal; the excitation signal is used to excite the second device to switch from a low-power card detection mode to a standard card detection mode.

51. The apparatus of claim 47, wherein, The main control module is also used to: in card emulation mode, if it is detected that the tag information in the first device has not been successfully read within a timeout period, then turn off the second NFC chip.

52. 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 23.