Data interaction method and device based on NFC

By using NFC private card search request commands in NFC reader devices, the problems of functional failure and high power consumption caused by NFC tags being continuously brought close together are solved. This enables the on-demand reading of information from other NFC tags, optimizing the power consumption and normal functioning of electronic devices.

CN121531326APending Publication Date: 2026-02-13HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511429552.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2021-06-04
Publication Date
2026-02-13

AI Technical Summary

Technical Problem

In NFC technology, when an NFC tag and an electronic device that supports an NFC reader are constantly in close proximity, the electronic device cannot read information from other NFC tags, resulting in NFC functionality failure and high power consumption.

Method used

By sending an NFC private card search request command, the card reader device continues to send card search request commands after reading the information of the first NFC tag, but no longer reads the information of that tag, thus entering listen mode, allowing the reading of information of other NFC tags, and using identifiers to determine the existence status of tags in order to optimize power consumption.

Benefits of technology

This technology enables the reader device to read information from other NFC tags while the NFC tag remains in place, reducing power consumption and avoiding unnecessary data readings, thus ensuring the normal operation of the NFC function.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121531326A_ABST
    Figure CN121531326A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a data interaction method and device based on NFC, and relates to the technical field of electronics, after a card reader device determines that a tag device approaches through a private card searching request instruction, information of a silent tag of the tag device is read, and when the tag device is continuously in place, the information of the silent tag is not read any more; and the NFC function of the card reader equipment can be normal. The scheme comprises the following steps: a first electronic device sends a first card searching request instruction; after the first electronic equipment receives a first card searching response instruction from the first NFC tag, information of the first NFC tag is read; and after the first electronic equipment reads the information of the first NFC tag, the first electronic equipment continues to send the first card searching request instruction, continues to receive the card searching response instruction from the first NFC tag, and does not read the information of the first NFC tag. The embodiment of the invention is used for reading the NFC tag.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application. The original application has the application number 202110626646.0 and the original application date is June 4, 2021. The entire contents of the original application are incorporated herein by reference. Technical Field

[0002] This application relates to the field of electronic technology, and in particular to a data interaction method and device based on near field communication (NFC). Background Technology

[0003] In homes and offices, users are increasingly using smart electronic devices. Data communication between these devices can further enhance the user experience. More and more wireless technologies are being applied to communication and data exchange between electronic devices. Among them, NFC technology, with its convenience and security, is being used by an increasing number of electronic devices as a bridging medium for rapid data exchange.

[0004] In NFC technology, NFC tags can store data, and when an NFC tag is brought close to an electronic device that supports an NFC reader, the electronic device can read the information from the NFC tag.

[0005] However, according to the NFC protocol and processing flow, when an NFC tag is kept close to an electronic device that supports an NFC reader, the electronic device cannot read information from other NFC tags, causing the NFC function of the electronic device to fail. Summary of the Invention

[0006] This application provides an NFC-based data interaction method and device. The card reader device can use the NFC private card search request command to determine when the tag device is close and read the information of the silent tag. Even if the tag device and the card reader device are always close, the card reader device can still read the information of other NFC tags, and the NFC function of the card reader device can be performed normally.

[0007] To achieve the above objectives, the embodiments of this application adopt the following technical solutions:

[0008] On one hand, this application provides a data interaction method applied to a system including a first electronic device and a first near-field communication (NFC) tag. The method includes: the first electronic device sending a first card-finding request instruction; the first NFC tag receiving the first card-finding request instruction from the first electronic device and sending a first card-finding response instruction to the first electronic device; the first electronic device receiving the first card-finding response instruction from the first NFC tag and reading the information of the first NFC tag; and after reading the information of the first NFC tag, the first electronic device continues to send first card-finding request instructions and continues to receive card-finding response instructions from the first NFC tag, without reading the information of the first NFC tag.

[0009] Based on this scheme, after the first electronic device continues to receive the first card search response command from the first NFC tag, and the first NFC tag remains in place, the first electronic device no longer reads the information of the first NFC tag. Therefore, it is not continuously in the data reading process and can normally detect and send NFC card search commands, including standard and proprietary card search commands. This allows it to normally read information from other NFC tags, enabling NFC card reading, swiping, and peer-to-peer functions to operate normally. Furthermore, by not reading the information of the first NFC tag while it remains in place, the first electronic device saves power consumption. Moreover, the first electronic device reads information from a silent tag that can respond to the first card search request command, rather than any arbitrary general-purpose NFC tag, thus reducing the likelihood of unnecessary data reading and enabling on-demand triggering and on-demand data reading.

[0010] In one possible design, the initial presence state of the first NFC tag is absent. The method further includes: a first electronic device having a first identifier indicating whether the first electronic device has detected the first NFC tag; before the first electronic device receives a first card search response command from the first NFC tag, the value of the first identifier is a first value, indicating that the first electronic device has not detected the first NFC tag; after the first electronic device receives the first card search response command from the first NFC tag, the first electronic device changes the value of the first identifier from the first value to a second value, indicating that the first electronic device has detected the first NFC tag.

[0011] In this way, the first electronic device can use the first identifier to indicate whether the first NFC tag has been detected. Before receiving the first card search response command, the first electronic device determines that the first NFC tag has not been detected; after receiving the first card search response command, the first electronic device determines that the first NFC tag has been detected.

[0012] In one possible design, the method further includes: after the first electronic device continues to send the first card search request instruction: if the first electronic device does not receive the first card search response instruction from the first NFC tag within a preset time period, the first electronic device changes the value of the first identifier from the second value to the first value; if the first electronic device receives the first card search response instruction from the first NFC tag within the preset time period, the value of the first identifier remains at the second value.

[0013] In this scheme, after the first electronic device continues to send the first card search request command, if the first electronic device does not receive the first card search response command from the first NFC tag within a preset time period, the first NFC tag and the first electronic device may have moved apart, the presence state of the first NFC tag switches to absence, the first electronic device cannot detect the first NFC tag, and the first identifier is set to the first value. If the first electronic device receives the first card search response command from the first NFC tag within the preset time period, the first NFC tag and the first electronic device are still in a close proximity state, the first electronic device can still detect the first NFC tag, and the first identifier is set to the second value.

[0014] In another possible design, the method further includes: the first electronic device increasing the time interval for continuing to send the first card search request command.

[0015] Specifically, if the first NFC tag is in a present state and the first electronic device receives a first card search response command from the first NFC tag, it indicates that the first NFC tag is continuously present. In this case, the first electronic device does not need to frequently and in real-time detect whether the first NFC tag is continuously present through the first card search request command, thus increasing the time interval for sending the first card search request command and saving power consumption of the first electronic device.

[0016] In another possible design, the system also includes a second NFC tag. After the first electronic device reads the information of the first NFC tag, the method further includes: the first electronic device sending a second card search request command; if the first electronic device receives a second card search response command from the second NFC tag, the second card search response command being the second NFC tag's response to the second card search request command, then reading the information of the second NFC tag.

[0017] In this way, after the first electronic device finishes reading the information of the first NFC tag, it can still read data from other NFC tags even if the first NFC tag remains in place, and the NFC function of the first electronic device can continue to operate normally.

[0018] In another possible design, after the first electronic device has read the information of the first NFC tag, the method further includes: the first electronic device performing business processing based on the information of the first NFC tag.

[0019] In other words, the first electronic device can perform relevant business processing based on the information read from the first NFC tag.

[0020] In another possible design, the information of the first NFC tag includes the identification information of the second electronic device to which the first NFC tag is located. The first electronic device performs business processing based on the information of the first NFC tag, including: charging the second electronic device based on the identification information of the second electronic device in the first NFC tag.

[0021] In other words, the first electronic device can initiate reverse charging based on NFC.

[0022] In another possible design, the first electronic device performs business processing based on the information of the first NFC tag, including: the first electronic device switches the theme of the first electronic device based on the information of the first NFC tag.

[0023] In other words, the first electronic device can switch themes based on NFC. For example, the information in the first NFC tag can include customized theme information.

[0024] In another possible design, the information of the first NFC tag includes charger anti-counterfeiting identification and / or charging optimization parameters; the first electronic device performs business processing based on the information of the first NFC tag, including: the first electronic device performs charger anti-counterfeiting verification and / or configures charging parameters based on the information of the first NFC tag.

[0025] In other words, the first electronic device can perform charger anti-counterfeiting verification and / or configure charging parameters based on NFC. For example, the information in the first NFC tag may include charger anti-counterfeiting identification and / or charging optimization parameters.

[0026] In another possible design, the first NFC tag is obtained through NFC chip simulation.

[0027] In another possible design, the first NFC tag is placed in another electronic device.

[0028] On the other hand, embodiments of this application provide a data interaction method that can be applied to a first electronic device supporting Near Field Communication (NFC) card reading functionality. The method includes: the first electronic device sending a first card search request command; the first electronic device receiving a first card search response command from a first NFC tag, the first card search response command being the first NFC tag's response to the first card search request command; after receiving the first card search response command from the first NFC tag, the first electronic device reading the information of the first NFC tag; and after reading the information of the first NFC tag, the first electronic device continuing to send first card search request commands and continuing to receive card search response commands from the first NFC tag, without reading the information of the first NFC tag.

[0029] Based on this method, after the first electronic device continues to receive the first card search response command, and the first NFC tag remains in place, the first electronic device no longer reads the information of the first NFC tag. Therefore, it is not continuously in the data reading process and can normally detect and send NFC card search commands, including standard and proprietary card search commands. This allows it to normally read information from other NFC tags, enabling NFC card reading, swiping, and peer-to-peer functions to operate normally. Furthermore, by not reading the information of the first NFC tag while it remains in place, the first electronic device can save power consumption. Moreover, the first NFC tag only responds and activates based on the proprietary NFC first card search request command, allowing the first electronic device to read information; it does not respond or activate based on the standard NFC card search request command. This reduces the likelihood of unnecessary data reading and enables on-demand triggering and on-demand data reading.

[0030] In one possible design, the first electronic device is provided with a first identifier, which indicates whether the first electronic device has detected the first NFC tag; before the first electronic device receives the first card search response command from the first NFC tag, the value of the first identifier is a first value, which indicates that the first electronic device has not detected the first NFC tag; after receiving the first card search response command from the first NFC tag, the first electronic device changes the value of the first identifier from the first value to a second value, which indicates that the first electronic device has detected the first NFC tag.

[0031] In another possible design, the method further includes: after the first electronic device continues to send the first card search request instruction: if the first electronic device does not receive the first card search response instruction from the first NFC tag within a preset time period, the first electronic device changes the value of the first identifier from the second value to the first value; if the first electronic device receives the first card search response instruction from the first NFC tag within the preset time period, the value of the first identifier remains at the second value.

[0032] In another possible design, the method further includes: the first electronic device increasing the time interval for continuing to send the first card search request command.

[0033] In another possible design, after the first electronic device reads the information of the first NFC tag, the method further includes: the first electronic device sending a second card search request instruction; if the first electronic device receives a second card search response instruction from the second NFC tag, the second card search response instruction being the second NFC tag's response to the second card search request instruction, then the information of the second NFC tag is read.

[0034] In another possible design, after the first electronic device reads the information of the first NFC tag, the method further includes: the first electronic device performing business processing based on the information of the first NFC tag.

[0035] In another possible design, the first electronic device performs business processing based on the information of the first NFC tag, including: the first electronic device charging the second electronic device based on the identification information of the second electronic device in the first NFC tag.

[0036] In another possible design, the first electronic device performs business processing based on the information of the first NFC tag, including: the first electronic device switches the theme of the first electronic device based on the information of the first NFC tag.

[0037] In another possible design, the first electronic device performs business processing based on the information of the first NFC tag, including: the first electronic device performs charger anti-counterfeiting verification and / or configures charging parameters based on the information of the first NFC tag.

[0038] On the other hand, embodiments of this application provide a data interaction device, which is included in a first electronic device. This device has the function of implementing the behaviors of the first electronic device in any of the above aspects and any possible implementations. This function can be implemented by hardware or by hardware executing corresponding software. The hardware or software includes one or more modules or units corresponding to the above functions. For example, a sending module or unit, a receiving module or unit, a reading module or unit, a processing module or unit, etc.

[0039] On the other hand, embodiments of this application provide an apparatus including at least one memory, at least one processor, the at least one processor and at least one memory coupled together, and capable of reading instructions from at least one memory and, according to the instructions, causing the apparatus to execute the NFC-based data interaction method executed by the first electronic device in any of the above aspects and any possible implementations. For example, the apparatus may specifically be a chip, component, or module.

[0040] On the other hand, embodiments of this application provide an electronic device, one or more processors, a memory, and one or more computer programs, wherein the one or more computer programs are stored in the memory, and the one or more computer programs include instructions that, when executed by the electronic device, cause the electronic device to perform the NFC-based data interaction method performed by the first electronic device in any of the above aspects and any possible implementations.

[0041] On the other hand, embodiments of this application provide a computer-readable storage medium including computer instructions that, when executed on a first electronic device, cause the first electronic device to perform any of the above aspects and any possible implementations of the NFC-based data interaction method.

[0042] On the other hand, embodiments of this application provide a computer program product that, when run on a computer, causes the computer to execute the NFC-based data interaction method executed by the first electronic device in any of the above aspects and any possible implementations.

[0043] On the other hand, embodiments of this application provide a data interaction system, which may include a first electronic device and a first NFC tag. The first electronic device and the first NFC tag can be used to execute the NFC-based data interaction method in any of the above aspects and any possible implementations.

[0044] Regarding other beneficial effects, please refer to the beneficial effects of the method executed by the first electronic device, which will not be elaborated here. Attached Figure Description

[0045] Figure 1A A schematic diagram illustrating the working mode of an NFC chip provided by existing technology; Figure 1B A schematic diagram of the processing flow of an NFC chip for NFC tags, provided for the prior art; Figure 1C A flowchart of the instruction interaction between stage 2 and stage 3 of an existing NFC chip is provided. Figure 2A A schematic diagram of wireless charging provided for existing technology; Figure 2B A flowchart of a wireless charging process for existing technologies; Figure 3 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application; Figure 4A This is a schematic diagram of the working mode of an NFC module provided in an embodiment of this application; Figure 4BThis is a schematic diagram illustrating another operating mode of an NFC module provided in an embodiment of this application; Figure 4C A schematic diagram illustrating the processing flow of an NFC module for silent tags, provided as an embodiment of this application; Figure 4D A flowchart illustrating the instruction interaction between stages 2 and 3 of an NFC chip provided in this application embodiment; Figure 5 A flowchart of an NFC-based data interaction method provided in this application embodiment; Figure 6A Flowchart of another NFC-based data interaction method provided in this application embodiment; Figure 6B A schematic diagram illustrating a customized theme switching based on NFC, provided as an embodiment of this application; Figure 7A Flowchart of another NFC-based data interaction method provided in this application embodiment; Figure 7B A schematic diagram illustrating wireless charging based on NFC, provided as an embodiment of this application; Figure 8A Flowchart of another NFC-based data interaction method provided in this application embodiment; Figure 8B A schematic diagram illustrating NFC-based reverse charging as provided in an embodiment of this application; Figure 9 A flowchart illustrating a data interaction method provided in an embodiment of this application; Figure 10 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0046] For ease of understanding, the examples provide explanations of some concepts related to the embodiments of this application for reference. As shown below: The technical solutions of the embodiments of this application will be described below with reference to the accompanying drawings. In the description of the embodiments of this application, unless otherwise stated, " / " means "or," for example, A / B can mean A or B; "and / or" in this text is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Furthermore, in the description of the embodiments of this application, "multiple" refers to two or more than two.

[0047] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this embodiment, unless otherwise stated, "a plurality of" means two or more.

[0048] In the embodiments of this application, the words "exemplarily" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design described as "exemplarily" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design solutions. Specifically, the use of the words "exemplarily" or "for example" is intended to present the relevant concepts in a specific manner.

[0049] Currently, NFC technology is finding increasingly diverse applications, and the range of services that can be implemented based on it is also expanding. NFC technology involves two ends: an NFC tag and an NFC reader. An NFC tag can also be called an NFC card or NFC card. An NFC reader can read information from an NFC tag. In the embodiments of this application, a device supporting an NFC reader can be called a reader device, and a device supporting an NFC tag can be called a tag device. When the reader device and the tag device are brought close together, simple data interaction can be completed. Based on this, rich service presentations can be achieved, such as one-touch audio transmission, one-touch screen projection, or one-touch image transfer, etc.

[0050] Current NFC technology has certain problems in practical applications. For example, if the NFC tag is always active, when the reader device is close to the tag, the NFC tag's information can be easily read by the reader device according to the NFC protocol and interface, leading to unnecessary data reading. When the reader device and tag device are constantly close, the reader device will continuously read the NFC tag's information, resulting in high power consumption. Moreover, while the reader device is continuously reading the information of the current NFC tag, it cannot detect other NFC tags and therefore cannot interact with other NFC tags, which may cause the reader device's normal NFC function to fail or be severely affected.

[0051] For example, an NFC card reader can be implemented using an NFC chip. Figure 1AAs shown, the NFC chip includes two operating modes: listen mode and polling mode. For example, each working cycle of the NFC chip can include a listen cycle of approximately 300ms (corresponding to listen mode) and a polling cycle of approximately 20ms (corresponding to polling mode). Listen mode is the card emulation mode of the NFC chip, while polling mode includes the peer-to-peer mode and reader mode of the NFC chip.

[0052] In this context, the point-to-point mode corresponds to the NFC active control modulation (ACM) working phase, while the reader mode includes different working phases corresponding to different NFC protocols, NFC-A / B / F / V. In polling mode, the NFC chip sends standard NFC find request commands according to the NFC protocol. These standard NFC find request commands include those corresponding to each working phase, such as the find request command for NFC-ACM (used to discover peer devices for data exchange in point-to-point mode), and the find request commands REQ-A / B / F / V corresponding to different NFC protocols, NFC-A / B / F / V (used to discover NFC tags corresponding to NFC-A / B / F / V). It is understandable that the duration of each working cycle of the NFC chip, the duration of each working mode within each working cycle, the working phases included in each working mode, the duration of each working phase, and the type and frequency of the sent find request commands can be preset or adjusted according to requirements.

[0053] Figure 1B The diagram illustrates the processing flow of an NFC chip for NFC tags corresponding to the NFC-A protocol (i.e., type A NFC tags). The processing flow for other NFC protocols such as NFC-B / F / V, including type B / F / V NFC tags, is similar to that for type A NFC tags and will not be described in detail here.

[0054] like Figure 1B As shown, this processing flow describes the interaction between the NFC chip in the card reader device and the first NFC tag, including the following three stages (stage 1-stage 3) and three states (state 1-state 3). It can be understood that the interaction process between the NFC chip and the first NFC tag is also the interaction process between the card reader device containing the NFC chip and the tag device containing the first NFC tag.

[0055] about Figure 1B The state transition shown is described as follows: State 1: When the first NFC tag is brought close to the reader device, the NFC chip moves from stage 1 to stage 2.

[0056] State 2: The first NFC tag continues to approach the reader device without moving away, and the NFC chip moves from state 2 to state 3.

[0057] State 3: The first NFC tag leaves the reader device, and the NFC chip moves from stage 3 to stage 1.

[0058] about Figure 1B The descriptions of each stage are as follows: Phase 1: Before the first NFC tag is brought close to the reader device, the NFC chip in the reader device enters listen mode and polling mode according to a preset working cycle. In polling mode, it sends polling signals normally according to the polling cycle. These polling signals include the NFC standard card search request command. This NFC standard card search request command is a general card search request command defined by the NFC protocol. It includes standard card search request commands corresponding to different working stages in polling mode. For example, in each polling cycle, the NFC chip sends the standard card search request command corresponding to NFC-ACM, NFC-A, NFC-B, NFC-F, and NFC-V, respectively. It is understood that the NFC chip's polling mode can also include working stages corresponding to other NFC protocols, and the NFC chip can also send standard card search request commands corresponding to other NFC protocols within the polling cycle; this is not limited.

[0059] Phase 2: When the first NFC tag is brought close to the card reader device, the NFC chip in the card reader device is activated by radio frequency with the first NFC tag, and the NFC chip reads the first NFC tag according to the NFC-A protocol process.

[0060] Phase 3: The first NFC tag and the card reader device continue to approach each other. This phase is in the card-in-place detection process.

[0061] Among them, see Figure 1C , Figure 1B The instruction interaction flow corresponding to stage 2 shown includes: 101. The NFC chip sends a standard card search request (REQ) command.

[0062] The REQ standard card search request command is a command defined by the NFC protocol and used to detect NFC tags. Different NFC protocols correspond to different card search request commands, such as REQA / B / F / V. The NFC chip of the card reader device can periodically poll and send different standard card search request commands such as REQA / B / F / V via radio frequency signals to detect whether various NFC tags are nearby.

[0063] 102. After receiving the card search request instruction REQ, the first NFC tag sends a card search response (ATQ) instruction to the NFC chip.

[0064] When the first NFC tag is brought close to the card reader device, within the communication range of the NFC radio frequency signal, the first NFC tag and the NFC chip are able to receive the standard card search request command REQ and send a card search response command ATQ to the NFC chip.

[0065] After receiving the ATQ card search response command sent by the first NFC tag, the NFC chip determines that the first NFC tag is in place.

[0066] The presence status of the first NFC tag includes being in or out of presence. Being in presence means that the reader device is close to the NFC tag, within the NFC radio frequency communication range, and the NFC chip can detect and discover the NFC tag. Being out of presence means that the reader device is far from the NFC tag, and the NFC chip cannot detect the NFC tag.

[0067] 103. The NFC chip sends the card anti-collision detection command AC / SDD_REQ(CL1).

[0068] This instruction is used to determine which NFC tag to interact with when the NFC chip detects multiple NFC tags (i.e., multiple NFC tags are in place), thereby reading the information of that NFC tag. CL1 indicates that the cascade level of Type A is 1.

[0069] 104. After receiving the anti-collision detection command AC / SDD_REQ(CL1), the first NFC tag sends an anti-collision response (select acknowledge, SAK) command to the NFC chip.

[0070] 105. NFC chip sends card activation command AC / SDD_REQ(CL2).

[0071] The card activation command is generated based on the anti-collision response command received by the NFC chip and is used to determine which NFC tag is activated in this communication. For example, the card activation command is used to indicate the activation of the first NFC tag. CL2 indicates that the cascade level of Type A is 2.

[0072] 106. After receiving the card activation command AC / SDD_REQ(CL2), the first NFC tag sends a card activation response command SAK to the NFC chip.

[0073] 107. The NFC chip sends a read command (Read CMD) to the first NFC tag.

[0074] After receiving the card activation response command, the NFC chip sends a Read CMD command to the first activated NFC tag. This command is used to read the information of the first NFC tag.

[0075] 108. After receiving the Read CMD command, the first NFC tag sends a ReadRSP command to the NFC chip.

[0076] After the first NFC tag is activated and receives the Read CMD command, it sends a ReadRSP command to the NFC chip, carrying the information of the first NFC tag. In this way, the NFC chip reads the information of the first NFC tag.

[0077] In some technical solutions, see Figure 1C , Figure 1B The instruction interaction flow corresponding to stage 3 shown includes: 109. The NFC chip sends a card detection command to the first NFC tag.

[0078] The card detection command is used to detect whether the first NFC tag remains in place.

[0079] 110. After receiving the card detection command, the first NFC tag sends a card detection response command to the NFC chip.

[0080] 111. After receiving the card detection response command, the NFC chip sends a read command (Read CMD) to the first NFC tag.

[0081] After receiving the card detection response command sent by the first NFC chip, the NFC chip determines that the first NFC tag is continuously in place (i.e., the first NFC tag is continuously close to the card reader device), and therefore sends a read command to the first NFC tag to read the information of the first NFC tag again, thereby re-executing the data reading process.

[0082] 112. After receiving the Read CMD command, the NFC tag sends a Read RSP response command.

[0083] In phase 3, the first NFC tag is in active mode, and the first NFC tag and the card reader device are always close to each other, meaning the first NFC tag is constantly in place. The NFC chip and the first NFC tag repeatedly execute steps 109-112. This results in the NFC chip continuously reading information from the first NFC tag, leading to higher power consumption.

[0084] In other technical solutions, Figure 1B In stage 3 shown, the NFC chip triggers a reset command, thereby repeatedly executing steps 101-108 with the first NFC tag. The NFC chip continuously reads the information of the first NFC tag multiple times, resulting in high power consumption of the NFC chip.

[0085] Furthermore, if the first NFC tag remains in place, the NFC chip will remain in the card presence detection process or continuously read information from the first NFC tag, and will be unable to enter listen mode or stage 1 polling mode. Consequently, the NFC chip cannot discover other NFC tags and interact with them, and cannot perform normal NFC card swiping, reading, or peer-to-peer interactions. The NFC function of the NFC chip will be disabled or severely affected.

[0086] The NFC tags mentioned above can be understood as traditional NFC tags, also known as universal NFC tags, universal NFC cards, or standard NFC tags. In contrast to universal NFC tags, there are also silent NFC tags, also called silent NFC cards or proprietary NFC cards. Silent tags are in a silent state by default. They only respond when they receive a specific proprietary NFC card lookup request command, allowing the card reader to read their information. When the card reader sends a standard NFC card lookup request command according to the NFC protocol, the silent tag does not respond, and the card reader cannot read its information.

[0087] In one technical solution, NFC data interaction can be achieved by using silent tags and triggering devices such as Hall sensors in conjunction. For example, see... Figure 2AThe reader device is a mobile phone, and the tag device is a phone case. The silent tag is in a silent state by default; the silent tag will not respond when the mobile phone sends standard NFC commands. When the phone case is placed on the phone, the Hall sensor is triggered. The phone's Hall detector detects the case and initiates the sending of NFC private card search request commands and read commands to interact with the silent tag. After the data interaction is complete or the phone case is removed, the phone stops sending private card search request commands and read commands, closing the silent tag reading process.

[0088] For example, see Figure 2B The card reader is a mobile phone, and the tag device is a wireless charger. When the wireless charger is brought close to the phone, its magnet attracts the phone, and the phone detects that the wireless charger is in the correct charging position using a Hall sensor. The Hall sensor transmits the detection result to the NFC chip, which sets the relevant chip state, initiates the silent tag sending process, and sends a private card search request command and a read command. After the phone reads the information from the silent tag, it stops sending the private card search request command and the read command, and closes the silent tag reading process. The NFC chip sends the read information to the charging anti-counterfeiting module, parses the device identifier, and performs anti-counterfeiting verification. If the verification is successful, the wireless charging function is activated. If the wireless charger is removed while the silent tag reading process is in progress, the silent tag reading process is closed.

[0089] Figure 2A and Figure 2B The proposed solution requires the use of Hall effect sensors, necessitating simultaneous sensor functionality from both the reader and tag devices. This imposes constraints on the hardware design of both devices, limiting its application scenarios and resulting in high hardware costs and complex design. Furthermore, this solution involves interaction between multiple modules, leading to a complex implementation process, numerous constraints, poor real-time performance, and a lack of versatility.

[0090] This application provides an NFC-based data interaction method that can be applied to data interaction between an NFC reader device and a tag device. The reader device supports NFC reader functionality, and the tag device supports silent tag functionality. The reader device can read information from the silent tag via an NFC private card search request command. In this way, the tag device only responds and activates based on the NFC private card search request command, reducing the likelihood of unnecessary data reading and enabling on-demand triggering and on-demand data reading.

[0091] The card reader can read the information of the silent tag after it switches from being absent to being present; alternatively, the card reader can switch the silent tag from being absent to being present after reading its information. This application does not limit the order of switching the present state and reading the information in its embodiments.

[0092] Once the card reader has finished reading the information from the silent tag, it stops the data reading process. Even if the tag remains in place, the card reader will not read the silent tag's information again, thus saving power consumption caused by continuously reading the silent tag's information.

[0093] Furthermore, after the silent tag's information is read, the reader enters listen mode and phase 1 polling mode according to its work cycle. This allows it to poll and send NFC card search request commands, including standard NFC card search request commands and proprietary NFC card search request commands, to identify other NFC tags and perform data interaction. In this way, even if the tag device remains in place, the reader can still read information from other NFC tags, and the reader's NFC function will not be disabled or affected, allowing it to perform NFC card swiping, reading, or peer-to-peer interaction normally.

[0094] Furthermore, the solution provided in this application achieves the above objectives through the NFC protocol interaction process, which is simple, real-time, universal, and widely applicable; moreover, it does not require additional devices such as Hall sensors, thus saving hardware space for card reader devices and tag devices, simplifying hardware design, and reducing device costs.

[0095] The card reader device in this application embodiment can be an electronic device with NFC tag reading function, such as a mobile phone, tablet computer, wearable device, smart home device, in-vehicle device, augmented reality (AR) / virtual reality (VR) device, laptop computer, ultra-mobile personal computer (UMPC), netbook, personal digital assistant (PDA), point of sale (POS) machine, or smart door lock, etc. This application embodiment does not impose any restrictions on the specific device type of the card reader device.

[0096] The silent tag in this application embodiment can be an active tag, a passive tag, or a tag simulated by an NFC chip, and is not limited thereto. The tag device has a silent tag; for example, the tag device can be a phone case, wireless charger, smartwatch, access card, mobile phone, tablet, wearable device, or in-vehicle device, etc. Furthermore, if the silent tag is not integrated into other devices, the silent tag itself can also be called a tag device.

[0097] Some electronic devices can be either card readers or tag devices. When an electronic device is a card reader, it must at least support NFC card reader functionality, and may also support NFC universal tag functionality or silent tag functionality; when an electronic device is a tag device, it must at least support NFC silent tag functionality, and may also support NFC universal tag functionality.

[0098] For example, Figure 3 A schematic diagram of an electronic device 100 is shown. This electronic device 100 can be a card reader or a tag device. The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, antenna 1, antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, a sensor module 180, buttons 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an accelerometer sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0099] Processor 110 may include one or more processing units, such as: application processor (AP), modem processor, graphics processing unit (GPU), image signal processor (ISP), controller, memory, video codec, digital signal processor (DSP), baseband processor, and / or neural network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0100] The controller can be the nerve center and command center of the electronic device 100. The controller can generate operation control signals according to the instruction opcode and timing signals to complete the control of fetching and executing instructions.

[0101] The charging management module 140 receives charging input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 receives charging input from the wired charger via the USB interface 130. In some wireless charging embodiments, the charging management module 140 receives wireless charging input via the wireless charging coil of the electronic device 100. While charging the battery 142, the charging management module 140 can also supply power to the electronic device via the power management module 141.

[0102] The power management module 141 connects the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, providing power to the processor 110, internal memory 121, external memory, display screen 194, camera 193, and wireless communication module 160, etc. The power management module 141 can also monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage current, impedance). In some other embodiments, the power management module 141 may also be located within the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may be located in the same device.

[0103] The wireless communication function of electronic device 100 can be realized through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor, etc.

[0104] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover one or more communication frequency bands. Different antennas can also be multiplexed to improve antenna utilization. For example, antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antennas can be used in conjunction with tuning switches.

[0105] The wireless communication module 160 can provide solutions for wireless communication applications on the electronic device 100, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via antenna 2, performs frequency modulation and filtering of the electromagnetic wave signals, and sends the processed signal to processor 110. The wireless communication module 160 can also receive signals to be transmitted from processor 110, perform frequency modulation and amplification, and convert them into electromagnetic waves for radiation via antenna 2.

[0106] In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, enabling electronic device 100 to communicate with networks and other devices via wireless communication technology. Wireless communication technology may include Global System for Mobile Communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Time Division Code Division Multiple Access (TD-SCDMA), Long Term Evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technologies, etc. GNSS can include the Global Positioning System (GPS), the Global Navigation Satellite System (GLONASS), the BeiDou Navigation Satellite System (BDS), the Quasi-Zenith Satellite System (QZSS), and / or satellite-based augmentation systems (SBAS).

[0107] In some embodiments of this application, the wireless communication module 160 includes an NFC module. This NFC module can be an NFC chip, an integrated circuit, or a combination of circuits and components, etc., and is not limited thereto. The NFC module has NFC reader functionality and / or card emulation functionality. When the electronic device 110 is a reader device, the NFC module has at least NFC reader functionality; when the electronic device is a tag device, the NFC module has at least card emulation functionality, capable of emulating the function of an NFC silent tag.

[0108] Specifically, when the electronic device 100 is a card reader device with an NFC module, the NFC module has tag reading and writing functions, and has both a transmitting and receiving port, enabling it to send and receive signals. Based on the configuration parameters of the processor 110, it can control the sending of standard card search request commands and private card search request commands. After the NFC module determines that the tag device has switched from being absent to being present via the private card search request command, it can read the information of the silent tag in the tag device. Based on this information, it can determine whether the tag device supports wireless charging, obtain the tag device's anti-counterfeiting mark, obtain optimized parameters for wireless charging, or obtain customized theme information, etc. Afterward, even if the silent tag remains present, the NFC module stops reading the silent tag's information. The NFC module can also increase the sending interval of the private card search request command after the tag data reading is complete.

[0109] When electronic device 100 is a tag device, it may have an NFC module that can simulate a silent tag; alternatively, it may have a silent tag without an NFC module. The silent tag contains preset information, such as customized theme information, whether wireless charging is supported, anti-counterfeiting features, or charging optimization parameters. The silent tag is in a silent state by default. Upon detecting an NFC private card search request command, the silent tag activates and allows the card reader device to read the information.

[0110] Electronic device 100 implements display functions through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.

[0111] Display screen 194 is used to display images, videos, etc. For example, display screen 194 can display customized themes or information related to wireless charging. Display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a miniature LED, a microLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, electronic device 100 may include one or N displays 194, where N is a positive integer greater than 1. Electronic device 100 can implement shooting functions through an ISP, a camera 193, a video codec, a GPU, display screen 194, and an application processor.

[0112] Internal memory 121 can be used to store computer executable program code, which includes instructions. Processor 110 executes various functional applications and data processing of electronic device 100 by running the instructions stored in internal memory 121. Internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback, image playback, etc.), etc. The data storage area may store data created during the use of electronic device 100 (such as audio data, phonebook, etc.). Furthermore, internal memory 121 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc.

[0113] In some embodiments, the processor 110 performs business processing by executing instructions stored in the internal memory 121, is able to communicate data with the NFC module or with the silent tag, and is able to determine whether to send a private card search request instruction based on events reported by the NFC module.

[0114] The magnetic sensor 180D includes a Hall sensor. The electronic device 100 can use the magnetic sensor 180D to detect the opening and closing of the flip cover. In some embodiments, when the electronic device 100 is a flip phone, the electronic device 100 can detect the opening and closing of the flip cover using the magnetic sensor 180D. Then, based on the detected opening and closing state of the cover or the flip cover, features such as automatic unlocking of the flip cover can be set. In some embodiments, the Hall sensor can be used to detect whether an NFC tag is nearby.

[0115] Touch sensor 180K, also known as a "touch panel," can be located on display screen 194. The touch sensor 180K and display screen 194 together form a touchscreen, also known as a "touch screen." Touch sensor 180K detects touch operations applied to or near it. The touch sensor can transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through display screen 194. In other embodiments, touch sensor 180K may also be located on the surface of electronic device 100, in a different position than display screen 194.

[0116] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0117] Furthermore, when the electronic device 100 plays different roles as a card reader device and a tag device, it may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently.

[0118] In this embodiment, when the electronic device 100 is a card reader device, the processor 110 executes instructions stored in the internal memory 121, enabling the NFC module to send an NFC private card search request instruction to discover silent tags and read information from the silent tags in the tag device. This way, the tag device only responds and activates based on the NFC private card search request instruction, reducing the likelihood of unnecessary data reading and enabling on-demand triggering and on-demand data reading. Furthermore, after the silent tag information is read, even if the tag device remains in the present position, the card reader device will not read the silent tag information again, thus saving power consumption caused by continuous data reading. After the silent tag information is read, the card reader device can enter listen mode and stage 1 polling mode according to its working cycle, and poll and send NFC card search request instructions, including standard card search request instructions and private card search request instructions, to identify and read information from other NFC tags. Therefore, even if the tag device remains in the present position, the card reader device can still read information from other NFC tags, and the NFC function of the card reader device will not be disabled or affected. The display screen 194 can display customized themes or wireless charging-related information, etc.

[0119] When the electronic device 100 is a tag device, the silent tag contains preset information, such as customized theme information, whether wireless charging is supported, anti-counterfeiting marks, or charging optimization parameters. The processor 110 runs instructions stored in the internal memory 121 to keep the silent tag in a silent state by default. After detecting an NFC private card search request command, the silent tag is activated and allows the card reader device to read the information.

[0120] In the NFC-based data interaction method provided in this application embodiment, the NFC module in the card reader device adjusts the existing polling mode. A new private card search request command is added during the polling cycle of the polling mode to discover silent tags and read their information. After the silent tag's information is read, the NFC module stops the data reading process and enters the listen mode and stage 1 polling mode according to the working cycle, polling and sending NFC card search request commands (including standard and private card search request commands). This allows for lower power consumption of the NFC module while the silent tag remains in place, and the card reader device can also read information from other NFC tags. The normal read / write function of the NFC module is unaffected, enabling normal NFC card swiping, reading, or point-to-point interaction functions.

[0121] In some embodiments, the NFC module can combine the presence flag corresponding to the silent tag to achieve data interaction with the silent tag. For example, in some technical solutions, the processor of the card reader device can add a configuration attribute, which can be called the presence flag, to indicate whether the silent tag is present. This configuration attribute can be configured to a first state or a second state. The configuration attribute can be configured to the first state by default. The presence flag can be a first flag, which is used to indicate whether the NFC module has detected the silent tag. The first flag can include a first value and a second value, corresponding to the first state and the second state, respectively. If no silent tag is detected, the silent tag is not present, and the first flag is the first value; if the silent tag is detected, the silent tag is present, and the first flag is set to the second value.

[0122] Each private card search request command can correspond to an availability flag, indicating whether a silent tag capable of responding to that private card search request command is present. The availability flag, combined with the private card search request command, ensures low power consumption and normal NFC functionality even when the silent tag remains in place.

[0123] In addition, the processor of the card reader device can also configure the registers of the NFC module by issuing NFC controller interface (NCI) commands, thereby controlling the type and cycle of the NFC standard card search request commands and NFC private card search request commands sent.

[0124] In other technical solutions, the presence flag can also be set in the NFC module. This application embodiment does not limit the specific location of the presence flag.

[0125] The following section describes the NFC-based data interaction process based on improvements to the NFC module.

[0126] For example, Figure 4A The diagram illustrates the working mode of the NFC module based on the NFC-A protocol, where an NFC-A-PR working phase is added to the polling cycle. This involves adding the NFC-A-PR-corresponding NFC private card search request command REQ-A-PR to the NFC card search request command within the polling cycle. REQ-A-PR is a customized private card search request command; only type A silent tags can respond to this command, and general NFC tags cannot. Furthermore, REQ-A-PR is merely one representation of the private card search request command provided in this embodiment; other representations or names are also possible and are not limited.

[0127] It should be noted that the method provided in this application is not limited to adding a private card search request command corresponding to the NFC-A protocol; it can also add private card search request commands corresponding to NFC-B / F / V or other NFC protocols, and is not limited thereto. For example, Figure 4B The diagram illustrates the working mode of the NFC module based on the NFC-B protocol, where the NFC module adds the private card search request instruction REQ-B-PR corresponding to the NFC-B-PR working phase during the polling cycle. It is understood that each NFC protocol (e.g., NFC-A protocol) can have one or more private card search request instructions; there is no limitation. The following explanation will use the private card search request instruction corresponding to the NFC-A protocol as an example.

[0128] The logic for determining the presence of the silent tag includes: Presence determination: After the NFC module in the card reader device sends the REQ-A-PR command, it receives the private card search response command ATQ-A-PR sent by the silent tag. The NFC module reports the tag presence event and determines that the tag is present.

[0129] Tag not in place determination: If the NFC module does not receive a private card search response command within the first preset time period after sending the REQ-A-PR command, the NFC module reports a tag not in place event and determines that the tag is not in place.

[0130] See Figure 4C The configuration and change logic of the in-place flag corresponding to the silent tag includes: In-place flag switching logic 1: When the silent tag is not near the card reader device, the in-place flag corresponding to the silent tag is in the first state, for example, the first state is false.

[0131] In-place flag switching logic 2: From the moment the silent tag is brought near the card reader device until the information of the silent tag is read, the in-place flag corresponding to the silent tag is switched to the second state, for example, the second state is true.

[0132] In-place flag switching logic 3: If the silent tag is always close to the card reader device and is not removed, the in-place flag corresponding to the silent tag remains true.

[0133] In-place flag switching logic 4: When a silent tag moves from near the card reader device to far away from the card reader device, the in-place flag corresponding to the silent tag is switched to false.

[0134] Figure 4CThe diagram illustrates the processing flow of the NFC module for type A silent tags according to the NFC-A protocol in this embodiment. The processing flow of the NFC module for silent tags corresponding to NFC-B / F / V protocols is similar to that for type A silent tags and will not be described in detail here.

[0135] like Figure 4C As shown, the processing flow describes the following four states (state 1-state 4) and three stages (stage 1-stage 3) included in the interaction between the NFC module and the first silent tag.

[0136] Among them, regarding Figure 4C The states shown are described below: State 1: When the first silent tag is not near the card reader device, the presence flag corresponding to the first silent tag in the card reader device is false. Here, the presence flag corresponding to the first silent tag is the presence flag corresponding to the first private card search request command that the first silent tag can respond to. When the first silent tag approaches the card reader device from a distance, the NFC module sends a private card search request command REQ-A-PR. After receiving the private card search response command ATQ-A-PR from the first silent tag, the NFC module initiates the first silent tag reading process.

[0137] State 2: The first silent tag is brought close to the card reader device, and the card reader device reads the information of the first silent tag. Specifically, the card reader device reads the information of the silent tag after the first silent tag switches from absent to present; or, the card reader device reads the information of the silent tag and then switches from absent to present, which is not limited to this step. Corresponding to the first silent tag switching to present, the present flag of the first silent tag is set to true. After the information of the first silent tag is read, the NFC module closes the data reading process of the first silent tag. The NFC module continuously receives private card search response commands from the first silent tag, and the first silent tag remains present.

[0138] State 3: Consistent with State 2, the NFC module transitions from State 3 to the polling state of State 1. The NFC module enters listen mode and polling mode of State 1 according to its work cycle, and polls to send NFC card search request commands, including standard card search request commands and proprietary card search request commands.

[0139] State 4: The first silent tag is far from the card reader device, and the NFC module cannot receive the private card search response command from the first silent tag. The presence flag corresponding to the first silent tag is set to false. The NFC module enters the polling state of stage 1 from stage 3. The NFC module enters the listen mode and the polling mode of stage 1 according to the working cycle, and polls to send NFC card search request commands, including standard card search request commands and private card search request commands.

[0140] about Figure 4C The descriptions of each stage are as follows: Phase 1: NFC Module Polling State. The NFC module enters listen mode and Phase 1 polling mode according to its working cycle, polling and sending various standard card search request commands and private card search request commands, including the private card search request command REQ-A-PR. If the first silent tag is not near the card reader device, the presence flag corresponding to the first silent tag in the card reader device is false.

[0141] Phase 2: When the first silent tag approaches the card reader device, the NFC module performs radio frequency activation with the first silent tag. After receiving the private card search request command REQ-A-PR, the first silent tag sends a private card search response command ATQA-A-PR. The NFC module determines that the first silent tag was not in the present state before based on the presence flag being false, and it can also determine that the first silent tag has switched from an absent state to an present state based on the private card search response command. At this time, the NFC module initiates the data reading process of the first silent tag.

[0142] Among them, see Figure 4D The first silent tag reading process in Phase 2 includes: 401. The NFC module sends a card search request command, including a standard card search request command and a proprietary card search request command.

[0143] The proprietary card search request command is used to detect silent tags. Different NFC protocols correspond to different card search request commands such as REQA / B / F / V. For example, the Type A protocol corresponds to the proprietary card search request command REQ-A-PR. The NFC module of the card reader device can periodically poll and send various standard card search request commands such as REQ-A / B / F / V, as well as various proprietary card search request commands, including REQ-A-PR, via radio frequency signals to detect the presence of NFC universal tags or silent tags corresponding to various NFC protocols.

[0144] 402. After receiving the private card search request instruction, the first silent tag sends a private card search response instruction to the NFC module.

[0145] When the first silent tag of type A is not near the NFC module, the presence flag corresponding to the private card search request command that the first silent tag can respond to is false, that is, the presence flag corresponding to the first silent tag is false.

[0146] When the first silent tag is brought close to the NFC module, within the NFC radio frequency communication range, it can receive a private card search request command such as REQ-A-PR, and thus can send a private card search response command such as ATQ-A-PR to the NFC module.

[0147] The NFC module can determine that the first silent tag was not in place before the presence flag is false. At this time, if it receives a private card search response command sent by the first silent tag, the NFC module will initiate the data reading process of the first silent tag.

[0148] Furthermore, after receiving the private card search response command sent by the first silent tag, the NFC module can switch the first silent tag from being absent to being present, and set the presence flag corresponding to the first silent tag to true.

[0149] 403. The NFC module sends the card anti-collision detection command AC / SDD_REQ(CL1).

[0150] 404. After receiving the anti-collision detection command AC / SDD_REQ(CL1), the first silent tag sends an anti-collision response command. SAK.

[0151] 405. The NFC module sends the card activation command AC / SDD_REQ(CL2).

[0152] 406. After receiving the card activation instruction AC / SDD_REQ(CL2), the first silent tag sends the card activation response instruction SAK.

[0153] 407. The NFC module sends a read command (Read CMD) to the first silent tag.

[0154] 408. After receiving the Read CMD command, the first silent tag sends a Read RSP command in response.

[0155] For a description of steps 403-408, please refer to the relevant explanations of steps 103-108 above, which will not be repeated here.

[0156] In some embodiments, after receiving a private card search response command sent by the first silent tag, the NFC module may first switch the first silent tag from being absent to being present, and then read the information of the first silent tag; or the NFC module may first read the information of the first silent tag, and then switch the first silent tag from being absent to being present, without limitation.

[0157] about Figure 4C The description of stage 3 shown is as follows: Phase 3: In this phase, after reading the information from the first silent tag, a single REQ-A-PR instruction is communicated; the information from the first silent tag is not read again. See also... Figure 4D The instruction interaction process in stage 3 includes steps 409-410, which are executed in a loop: 409. The NFC module sends a card search request command, including a standard card search request command and a proprietary card search request command.

[0158] 410. After receiving the private card search request instruction, the first silent tag sends a private card search response instruction to the NFC module.

[0159] After the NFC module finishes reading the information of the first silent tag, it closes the reading process of the first silent tag and no longer sends the read command repeatedly as in existing technologies. As a result, the reading process of the first silent tag is no longer executed, thus saving power consumption of the card reader device.

[0160] In phase 3, after the information of the first silent tag is read, the NFC module sends a private card search request command to determine whether the first silent tag remains in place based on whether a card search response command is received. If the NFC module receives a private card search response command from the first silent tag, and the presence flag corresponding to the first silent tag is true, it determines that the first silent tag remains in place, rather than switching from an absent state to an present state, and the NFC module has already read the information of the first silent tag. Therefore, the NFC module no longer executes the data reading process of the first silent tag, and the presence flag corresponding to the first silent tag remains true. The NFC module continues to send private card search request commands to continue detecting whether the first silent tag remains in place. In other words, when the first silent tag remains in place, the NFC module can continuously send private card search request commands instead of sending read commands, and the NFC module and the first silent tag continuously engage in a response process for private card search request commands.

[0161] If the NFC module does not receive a private card search response command from the first silent tag within the first preset time period, the first silent tag will not respond after the timeout. It is determined that the first silent tag is not in place, the NFC module reports the first silent tag leaving event, and the corresponding presence flag of the first silent tag is set to false.

[0162] Specifically, with the first silent tag always present, the NFC module can enter listen mode and phase 1 polling mode according to its working cycle, periodically sending card search request commands, including standard and proprietary card search request commands. This can also be understood as the NFC module entering phase 1 polling state. After detecting other NFC tags through the card search request commands, the NFC module can interact with these tags to read their information. Thus, with the first silent tag continuously present (also known as always-present), the NFC function of the card reader device remains unaffected, enabling normal NFC card swiping, card reading, or point-to-point interaction. For example, when a mobile phone is wirelessly charged near a wireless charger, it can also perform one-touch image transfer with a laptop or swipe a card at a POS machine.

[0163] In some embodiments, after the information of the first silent tag is read, the interval at which the NFC module of the card reader device sends the private card search request command corresponding to the first silent tag can be adjusted. In some embodiments, after the information of the first silent tag is read, the NFC module does not need to frequently and in real time detect whether the first silent tag is still in place through the private card search request command, so the sending interval of the private card search request command can be increased to save the power consumption of the NFC module.

[0164] In some technical solutions, when the first silent tag remains in place, the NFC module can increase the transmission interval of the private card search request command after the duration of the first silent tag's continued presence is greater than or equal to a second preset duration. In other technical solutions, when the first silent tag remains in place, the NFC module can increase the transmission interval of the private card search request command after the number of private card search response commands received is greater than or equal to a preset number.

[0165] In other technical solutions, while the first silent tag remains in place, the interval between sending the private card search request command can gradually increase with the duration of in-situ presence. For example, when the reader and tag are close together, the user may not quickly adjust their positions (e.g., the user doesn't immediately attach the wireless charger to their phone), and their relative positions will continue to change. After the NFC module has just read the information from the first silent tag, the relative positions of the reader and tag may have changed, and they may have switched between in-situ and out-of-situ states. In this case, the interval between sending the private card search request command can be relatively small to allow for timely determination of the tag's in-situ status and appropriate processing. After the NFC module has read the information from the first silent tag and a considerable amount of time has passed, the relative states of the reader and tag have stabilized. If the tag's in-situ status changes, it likely indicates that the user explicitly wants to separate the reader and tag (e.g., the user wants to remove the wireless charger from their phone). Therefore, even if the NFC module detects the change in the presence status with a delay through the private card search request command with a large interval, the impact is not significant, and it can also save power consumption of the card reader device.

[0166] For example, after the NFC module reads the information of the first silent tag for the first time, it sends a private card search request command once in each polling cycle. After receiving the private card search response command corresponding to the private card search request command for the 5th time, it sends a private card search request command once every 2 polling cycles. After receiving the private card search response command for the 10th time, it sends a private card search request command once every 3 polling cycles, and so on, until it sends a private card search request command once every 5 polling cycles, and then maintains this interval for sending.

[0167] It is understandable that the above Figures 4A-4D The actions performed by the NFC module shown are also the actions performed by the card reader device where the NFC module is located. Therefore, from the perspective of the card reader device and the tag device, the above process can include: The card reader device polls and sends card search request commands, including standard card search request commands and proprietary card search request commands. When the first silent tag is not near the card reader device, the presence flag corresponding to the first silent tag is false. After the first silent tag comes close to the card reader device, the card reader device receives a proprietary card search response command from the first silent tag. Based on the false presence flag of the first silent tag and the received proprietary card search response command, the card reader device reads the information of the first silent tag. Furthermore, the card reader device determines that the first silent tag has switched from being absent to being present, and sets the presence flag of the first silent tag to true. After the information of the first silent tag is read, the data reading process of the first silent tag is not executed again to save power consumption of the card reader device.

[0168] Furthermore, after the information of the first silent tag is read, the card reader device can enter listen mode and phase 1 polling mode according to the NFC module's working cycle, and poll and send NFC card search request commands. These NFC card search request commands include standard card search request commands and proprietary card search request commands, so that the card reader device can read the content of other NFC tags. Therefore, the card reader device's NFC card swiping, card reading, and peer-to-peer interaction functions can operate normally. Moreover, while the first silent tag remains in place, the interval between the card search request commands sent by the card reader device corresponding to the first silent tag can be increased to further save the card reader device's power consumption.

[0169] Furthermore, the first silent tag only responds and activates based on a private card search request command, which reduces the likelihood of unnecessary data reading and enables on-demand triggering and on-demand data reading. After the first silent tag leaves the card reader device, the card reader device sets the corresponding presence flag of the first silent tag to false, so that it can determine whether the first silent tag has switched from absent to present next time, thereby determining whether to execute the data reading process of the first silent tag.

[0170] In addition, other embodiments of this application provide an NFC-based data interaction method that enables a card reader device to read the contents of a silent tag on a tag device. While the silent tag remains in place, the power consumption of the card reader device is low, and the NFC read / write function is unaffected, allowing for normal NFC card swiping, card reading, and peer-to-peer interaction.

[0171] In some embodiments, the NFC-related functions of the card reader device involved in the method can be based on... Figures 4A-4D The NFC module and processing flow shown are used to implement this.

[0172] The following description, in conjunction with the accompanying drawings, uses a card reader device as an example. Figure 3The method provided in this application will be described using an electronic device with the structure shown, taking a tag device that supports silent tags as an example. See also... Figure 5 The method may include: 501. The card reader device sends the first private card search request instruction.

[0173] The card reader device can send a first private card search request command via radio frequency signal according to the user's instructions. For example, the card reader device can send the first private card search request command via radio frequency signal after the user activates the NFC function (such as wireless charging function) corresponding to the first private card search request command on the card reader device.

[0174] Or, such as Figure 4C As shown, the card reader device enters listen mode and phase 1 polling mode according to the NFC module's working cycle, and polls to send NFC card search request commands, including sending standard NFC card search request commands and proprietary NFC card search request commands. The proprietary NFC card search request command includes a first proprietary card search request command.

[0175] The embodiments of this application do not limit the timing of the card reader device sending the first private card search request instruction.

[0176] 502. After receiving the first private card search request instruction, the first tag device sends a private card search response instruction to the card reader device.

[0177] When the first tag device approaches the card reader device, it can receive a first private card search request command. If the first tag device determines that the supported first silent tag can respond to the first private card search request command, it sends a private card search response command to the card reader device. This private card search response command corresponds to the first private card search request command. If the first tag device receives other types of card search request commands, it will not respond and will not send a card search response command to the card reader device.

[0178] 503. After receiving the private card search response command, the card reader device determines that the first tag device has switched from being absent to being present, and reads the information of the first silent tag in the first tag device.

[0179] After receiving the private card search response command, the card reader device determines that the first tag device is close to the card reader device. For example... Figure 4C As shown, the card reader device is in state 1, transitioning from stage 1 to stage 2, and reading the information of the first silent tag. The instruction interaction flow for the card reader device to read the information of the first silent tag can be found in [reference needed]. Figure 4D .

[0180] In some embodiments, the card reader device may be configured with an presence flag corresponding to a silent tag that can respond to a first private card search request instruction, i.e., an presence flag corresponding to the first silent tag is configured.

[0181] It is understandable that, since the silent tag is integrated into the tag device, the presence of the silent tag can be interpreted as the presence of the tag device; conversely, the absence of the silent tag can be interpreted as the absence of the tag device. Therefore, the presence status of the tag device also includes whether it is in place or not. The presence flag corresponding to the silent tag can also be understood as the presence flag corresponding to the tag device containing the silent tag.

[0182] If the presence flag corresponding to the first tag device is in the first state (which could be the default first state, or it could have switched to the second state and then back to the first state, it is not limited), then upon receiving the private card search response command sent by the first tag device, the information of the first silent tag is read. Furthermore, when the first tag device switches from absent to present, the card reader device switches the presence flag corresponding to the first tag device from the first state to the second state. The presence flag corresponding to the first tag device is the same as the presence flag corresponding to the first silent tag within the first tag device.

[0183] 504. The card reader device processes transactions based on the information from the first silent tag.

[0184] The card reader device can perform relevant business processing based on the information of the first silent tag, such as custom theme or wireless charging.

[0185] 505. After the card reader device has finished reading the information of the first silent tag, it stops reading the information of the first silent tag and sends the first private card search request command.

[0186] Once the card reader has finished reading the information of the first silent tag, it will no longer send a read command for the first silent tag and will stop reading the information of the first silent tag, thereby saving power consumption caused by the card reader continuously reading the information of the first silent tag.

[0187] After the information of the first silent tag is read, the card reader device can send a first private card search request command to determine whether the first tag device remains in place.

[0188] For example, card reader devices are made of, for example Figure 4C The process transitions from stage 2 to stage 3, and is now in state 2.

[0189] In addition, after step 505, the method further includes: 506. If the card reader device determines that the first tag device is still in place based on the private card search response instruction sent by the first tag device, then it continues to send the first private card search request instruction and repeats step 506.

[0190] After receiving the private card search response command from the first tag device, the card reader device determines that the first tag device is continuously in place, rather than having just switched from inactive to in place, based on the in-place flag of the first tag device being in the second state. Since the card reader device has already read the information of the first silent tag, it no longer executes the data reading process for the first silent tag. The card reader device keeps the in-place flag of the first tag device set to true. Furthermore, the card reader device continues to send the first private card search request command to continue detecting whether the first tag device remains in place.

[0191] In some embodiments, the method may further include: adjusting the transmission period of the first private card search request instruction while the first tag device remains in place. For example, the card reader device increases the transmission interval of the first private card search request instruction to further save power consumption of the card reader device; this process can be referred to the specific description above regarding increasing the transmission interval, and will not be repeated here.

[0192] If the first tag device remains in place, the card reader device will be in the following state: Figure 4C State 3 is shown.

[0193] In addition, after the reader device has finished reading the information of the first silent tag, it can send other card search request commands besides the first private card search request command, provided the first tag device remains in the present. In this way, the reader device can interact with other NFC tags (including general tags and silent tags) through these other card search request commands, reading information from other NFC tags. This ensures that the reader device can perform normal NFC card swiping, card reading, and peer-to-peer interaction functions while the first tag device remains in the present.

[0194] For example, while the first tag device remains in place, the reader device can also send a second private card search request command. If it receives a private card search response command from the second tag device (corresponding to the second private card search request command), and determines that the second tag device has switched from being inactive to being in place, then it reads the information of the second silent tag in the second tag device. As another example, while the first tag device remains in place, the reader device can also send a first standard card search request command. If it receives a card search response command from the third tag device (corresponding to the first standard card search request command), then it reads the information of the NFC tag in the third tag device.

[0195] In some embodiments, after the information of the first silent tag has been read, while the first tag device remains in place, such as Figure 4C As shown, the card reader device transitions from phase 3 to phase 1. Following the NFC module's operating cycle, the card reader device enters listen mode and polling mode in phase 1, and polls and sends multiple standard card search request commands and private card search request commands to enable interaction with NFC tags other than the first silent tag, ensuring normal NFC card swiping, reading, or peer-to-peer interaction functions.

[0196] After step 505, the method may further include: 507. If the card reader device does not receive a private card search response instruction sent by the first tag device within the first preset time period, it is determined that the first tag device has switched from being in place to being out of place, and then step 501 is executed.

[0197] If the card reader does not receive a private card search response command from the first tag device within a first preset time period, the first tag device leaves, switching from present to absent, and the present flag corresponding to the first tag device is set to false. At this time, the card reader device is in... Figure 4C The state shown is 4, and it proceeds to stage 1.

[0198] In the scheme described in steps 501-507, the card reader device can determine, through the first private card search request command, that the first tag device has switched from being absent to being present before reading the information of the first silent tag in the first tag device. In this way, the first tag device will only respond and activate based on the first private card search request command, reducing the likelihood of unnecessary data reading and enabling on-demand triggering and on-demand data reading. Furthermore, the privatization of the card search request command allows for customization, providing a highly secure solution that meets the privatization and security requirements of customized scenarios.

[0199] Furthermore, once the card reader has finished reading the information of the first silent tag, it will not read the information of the first silent tag again, even if the first tag device remains in place. This saves power consumption caused by the card reader continuously reading the information of the first silent tag.

[0200] Furthermore, after the first silent tag's information is read, the card reader can poll and send NFC card search request commands, including standard NFC card search request commands and proprietary NFC card search request commands, to identify other NFC tags and read their information. In this way, even if the first tag remains in place, the card reader's NFC function will not be disabled or affected, and it can still perform NFC card swiping or reading normally.

[0201] Furthermore, the solution provided in this application achieves the above objectives through the NFC protocol interaction process, which is simple, real-time, and universal; and does not require additional devices such as Hall sensors, thus saving hardware space for the card reader device and the first tag device, simplifying hardware design, and reducing device costs.

[0202] The NFC data interaction method provided in steps 501-507 above can be applied to various business scenarios and has diverse application forms. The following provides an example illustrating this business scenario.

[0203] Example 1: Customized phone case theme scenario: For example, in this scenario, the card reader device can be a mobile phone, and the first tag device can be a phone case (or theme case). The phone case supports a first silent tag, which can be an active tag, a passive tag, or a tag simulated by an NFC module. The first silent tag stores customized theme information. The first silent tag is in a silent state by default and can respond to a first private card search request command.

[0204] In the context of custom phone case themes, see Figure 6A The NFC-based data interaction method provided in this application embodiment may include: 601. The mobile phone sends the first private card search request command.

[0205] For example, the mobile phone can send a first private SIM card search request command via radio frequency signals based on the user's instructions. Alternatively, the mobile phone can... Figure 4C In the polling mode shown, NFC card search request commands are periodically sent. These NFC card search request commands include standard card search request commands and private card search request commands. The private card search request commands include a first private card search request command.

[0206] The embodiments of this application do not limit the timing of the mobile phone sending the first private card search request command.

[0207] 602. After receiving the first private SIM card search request instruction, the phone case sends a private SIM card search response instruction to the phone.

[0208] Before the phone case is brought close to the phone, the presence flag corresponding to the first silent tag in the phone is false. After the phone case is brought close to the phone, it can receive the first private SIM card lookup request command. If the phone case determines that the supported first silent tag can respond to the first private SIM card lookup request command, it sends a private SIM card lookup response command to the phone.

[0209] 603. After receiving the private SIM card search response command sent by the phone case, the mobile phone determines that the phone case has switched from being absent to being present, and reads the information of the first silent tag in the phone case, which includes customized theme information.

[0210] The customized theme information can be encrypted or unencrypted, and is not limited thereto. This embodiment uses encrypted customized theme information as an example for illustration. After receiving the private SIM card search response command sent by the phone case, the mobile phone can set the presence flag corresponding to the first silent tag to true.

[0211] 604. The phone switches the current theme to a customized theme based on the information from the first silent label.

[0212] The phone's NFC module reads the customized theme information and reports it to the phone's theme module. The theme module decrypts the theme information and then switches the current theme to the customized theme. This allows for quick switching to a customized theme (such as a cool theme, a VIP theme, or a theme not available on the official website) simply by bringing the phone close to the phone case, providing a better user experience.

[0213] 605. After the mobile phone finishes reading the information of the first silent tag, it stops reading the information of the first silent tag and sends the first private card search request command.

[0214] Once the mobile phone has finished reading the information of the first silent tag, it will no longer send a read command for the first silent tag, and the mobile phone will no longer read the information of the first silent tag, thus saving power consumption caused by the mobile phone continuously reading the information of the first silent tag.

[0215] After the information from the first silent tag is read, the phone can also send a first private SIM card search request command to determine whether the phone case remains in place.

[0216] 606. If the mobile phone determines that the phone case is still in place based on the private SIM card search response command sent by the phone case, then it continues to send the first private SIM card search request command and repeats step 606.

[0217] After receiving the private SIM card search response command from the phone case, the phone determines that the phone case is still in place based on the presence flag corresponding to the first silent tag being true. Since the phone has already read the information of the first silent tag, it does not read the information of the first silent tag again, keeping the presence flag corresponding to the first silent tag true. Furthermore, the phone continues to send the first private SIM card search request command to continue checking whether the phone case is still in place.

[0218] In some embodiments, the method may further include: after the mobile phone determines that the phone case remains in place, increasing the sending interval of the first private card search request instruction to further save the power consumption of the mobile phone.

[0219] In addition, after the phone has read the information from the first silent tag, it can send other card-finding request commands besides the first private card-finding request command, provided the phone case remains in place. This allows the phone to interact with other NFC tags (including general tags and silent tags) and read their information, ensuring normal NFC card swiping and reading while the phone case remains in place. For example, the phone in... Figure 4C In the polling mode shown, standard card search request commands and private card search request commands are periodically sent in a polling manner.

[0220] Following step 605, the method further includes: 607. If the mobile phone does not receive the private SIM card search response command sent by the phone case within the first preset time period, it is determined that the phone case has switched from being in place to being out of place, and then the above step 601 is executed.

[0221] If the phone does not receive a private SIM card search response command from the phone case within the first preset time period, the first silent tag will leave, the phone will switch from being present to being absent, and the presence flag corresponding to the first silent tag will be set to false. At this time, the phone can switch the customized theme back to the default theme.

[0222] For example, if the first preset duration is longer than the sending interval of the first private card search request instruction, then after the mobile phone sends two first private card search request instructions, it does not receive a private card search response instruction sent by the phone case. In this case, the phone case may have left, and the mobile phone determines that the phone case has switched from being present to being absent.

[0223] It should be noted that regarding steps 601-607 and... Figures 4A-4D The correspondence can be found in steps 501-507. Figures 4A-4D The description of the correspondence is omitted here.

[0224] In some embodiments, based on Figures 4A-4D The NFC processing flow shown, specifically the scheme described in steps 601-607, may include: The mobile phone polls and sends NFC card search request commands according to the NFC module's working cycle, including standard card search request commands and private card search request commands. The private card search request command includes a first private card search request command. When the phone case is not near the phone, the presence flag corresponding to the first silent tag is false. After the phone case comes close to the phone, the phone receives a private card search response command from the first silent tag. Based on the fact that the presence flag corresponding to the first silent tag is false and the phone has received the private card search response command from the first silent tag, it reads the customized theme information stored in the first silent tag, switches the current theme to the customized theme, and switches the first silent tag from absent to present. After the information reading of the first silent tag is completed, the data reading process for the first silent tag is no longer executed. The mobile phone polls and sends standard card search request commands and private card search request commands according to the NFC module's working cycle to enable data interaction with other NFC tags. The private card search request command includes the first private card search request command. Furthermore, when the first silent tag remains present, the interval between the card search request commands sent by the mobile phone corresponding to the first silent tag can be increased. After the phone case is removed from the phone, the phone sets the presence flag corresponding to the first silent tag to false and switches back to the default theme. An example diagram illustrating the switching of customized themes between the phone and phone case via NFC can be found here. Figure 6B .

[0225] In the solution described in Scenario Example 1, the mobile phone can use a first private SIM card search request command to determine when the phone case switches from being absent to being present (e.g., after the phone case is put on the phone). Then, it can read the customized theme information stored in the first silent tag within the phone case, enabling one-touch theme switching. In this way, the phone case only responds and activates based on the first private SIM card search request command, minimizing unnecessary data reading and allowing for on-demand triggering and on-demand data retrieval.

[0226] Furthermore, once the phone has finished reading the information of the first silent tag, even if the phone case remains in place (i.e., the phone case is always on the phone), the phone will not read the information of the first silent tag again, thus saving power consumption caused by the phone continuously reading the information of the first silent tag.

[0227] Furthermore, after the phone has finished reading the information from the first silent tag, it can poll and send NFC card search request commands, including standard NFC card search request commands and proprietary NFC card search request commands, to identify other NFC tags and read their information. In this way, even if the phone case remains in place, the phone's NFC function will not be disabled or affected, and it can still perform NFC card swiping or reading normally.

[0228] Furthermore, the solution provided in this application achieves the above objectives through the NFC protocol interaction process, which is simple, real-time, and universal; and does not require additional devices such as Hall sensors, thus saving hardware space in mobile phones and phone cases, simplifying hardware design, and reducing device costs.

[0229] Scenario Example 2: Device Anti-counterfeiting and Parameter Optimization Scenario: For example, in this scenario, the card reader device can be a mobile phone, and the first tag device can be a wireless charger (or charging case). The wireless charger supports a first silent tag, which can be an active tag, a passive tag, or a tag simulated by an NFC module. The first silent tag stores information such as charger anti-counterfeiting markings and / or charging optimization parameters. The first silent tag is in a silent state by default and can respond to a first private card search request command.

[0230] In the context of device anti-counterfeiting and parameter optimization, see [link / reference]. Figure 7A The NFC-based data interaction method provided in this application embodiment may include: 701. The mobile phone sends the first private card search request command.

[0231] 702. After receiving the first private SIM card search request command, the wireless charger sends a private SIM card search response command to the mobile phone.

[0232] The implementation process of steps 701-702 is similar to that of steps 601-602, and can be found in the relevant descriptions above, which will not be repeated here.

[0233] 703. After receiving the private card search response command sent by the wireless charger, the mobile phone determines that the wireless charger has switched from being out of place to being in place, and reads the information of the first silent tag in the wireless charger, which includes the charger's anti-counterfeiting mark and / or charging optimization parameters.

[0234] After receiving the private SIM card search response command sent by the wireless charger, the mobile phone can set the presence flag corresponding to the first silent tag to true.

[0235] 704. The mobile phone performs anti-counterfeiting verification based on the information of the first silent label, and / or configures and charges according to the optimized parameters.

[0236] The phone's NFC module reads the charger's anti-counterfeiting label and / or charging optimization parameters, and reports this information to the phone's charging module. The charging module then performs anti-counterfeiting verification and / or configures and charges according to the optimized parameters. This way, the phone can quickly perform anti-counterfeiting verification or charge using optimized parameters simply by bringing it close to the wireless charger, resulting in a better user experience.

[0237] 705. After the mobile phone finishes reading the information of the first silent tag, it stops reading the information of the first silent tag and sends the first private card search request command.

[0238] 706. If the mobile phone determines that the wireless charger is still in place based on the private SIM card search response command sent by the wireless charger, it continues to send the first private SIM card search request command and repeats step 706.

[0239] The implementation process of steps 705-706 is similar to that of steps 605-606, and can be found in the relevant descriptions above, which will not be repeated here.

[0240] In some embodiments, the method may further include: after the mobile phone determines that the wireless charger is continuously in place, increasing the sending interval of the first private card search request instruction to further save the power consumption of the mobile phone.

[0241] In addition, after the phone has read the information from the first silent tag, it can send other card-finding request commands besides the first private card-finding request command, provided the wireless charger remains in place. This allows the phone to interact with other NFC tags (including general tags and silent tags) and read their information, ensuring normal NFC card swiping and reading while the wireless charger is still present. For example, the phone in... Figure 4C In the polling mode shown, various standard card search request commands and private card search request commands are periodically sent in a polling manner.

[0242] Following step 705, the method further includes: 707. If the mobile phone does not receive a private SIM card search response command from the wireless charger within the first preset time period, it is determined that the wireless charger has switched from being present to being absent, and then the above step 701 is executed.

[0243] If the phone does not receive a private SIM card search response command from the wireless charger within the first preset time period, the first silent tag leaves, the wireless charger switches from present to absent, and the present flag corresponding to the first silent tag is set to false. At this time, the phone can stop charging.

[0244] It should be noted that regarding steps 701-707 and... Figures 4A-4D The correspondence can be found in steps 501-507. Figures 4A-4D The description of the correspondence is omitted here.

[0245] In some embodiments, based on Figures 4A-4D The NFC processing flow shown, and the scheme described in steps 701-707, may include: The mobile phone polls and sends card-finding request commands according to the NFC module's working cycle, including standard card-finding request commands and private card-finding request commands. The private card-finding request command includes the first private card-finding request command. When the wireless charger is not near the phone, the presence flag corresponding to the first silent tag is false. After the wireless charger approaches the phone, the phone receives a private card-finding response command from the first silent tag. Based on the false presence flag of the first silent tag and the receipt of the private card-finding response command, the phone reads the anti-counterfeiting identifier and / or optimization parameters stored in the first silent tag, performs anti-counterfeiting verification and / or charging optimization; and switches the first silent tag from absent to present. After the information reading of the first silent tag is completed, the data reading process for the first silent tag is no longer executed. The mobile phone polls and sends standard card-finding request commands and private card-finding request commands according to the working cycle to enable data interaction with other NFC tags. The private card-finding request command includes the first private card-finding request command. Furthermore, when the first silent tag remains present, the interval between the card-finding request commands sent by the phone corresponding to the first silent tag can be increased. After the wireless charger is removed from the phone, the phone sets the presence flag corresponding to the first silent tag to false and stops wireless charging. An exemplary diagram illustrating wireless charging between the phone and wireless charger via NFC can be found here. Figure 7B .

[0246] In the solution described in Scenario Example 2, the mobile phone can determine the location of the wireless charger after it switches from absent to present (e.g., the wireless charger is close to the phone) via a first private SIM card search request command. Then, it reads information such as anti-counterfeiting markings and / or charging optimization parameters stored in the first silent tag of the wireless charger, enabling one-touch optimized charging. In this way, the wireless charger only responds and activates based on the first private SIM card search request command, reducing the likelihood of unnecessary data reading and allowing for on-demand triggering and on-demand data reading.

[0247] Furthermore, once the phone has finished reading the information from the first silent tag, even if the wireless charger remains in place (i.e., the wireless charger and the phone are always close together), the phone will not read the information from the first silent tag again, thus saving power consumption caused by the phone continuously reading the information from the first silent tag.

[0248] Furthermore, after the phone has finished reading the information from the first silent tag, it can poll and send NFC card search request commands, including standard NFC card search request commands and proprietary NFC card search request commands, to identify other NFC tags and read their information. In this way, even if the wireless charger is always present, the phone's NFC function will not be disabled or affected, and it can still perform NFC card swiping or reading normally.

[0249] Furthermore, the solution provided in this application achieves the above objectives through the NFC protocol interaction process, which is simple, real-time, and universal; moreover, it does not require additional devices such as Hall sensors, thus saving hardware space for mobile phones and wireless chargers, simplifying hardware design, and reducing device costs.

[0250] Scenario Example 3: Scenario initiating reverse charging: For example, in this scenario, the card reader device can be a mobile phone, and the first tag device can be a smartwatch (hereinafter referred to as the watch). The watch supports a first silent tag, which can be an active tag, a passive tag, or a tag simulated by an NFC module. Generally, the watch has an NFC chip that can simulate the first silent tag; in this case, the watch does not need to set up an additional first silent tag. The first silent tag stores information such as the watch's identification information. The first silent tag is in a silent state by default and can respond to a first private card search request command.

[0251] In the scenario of initiating reverse charging, see [link / reference]. Figure 8A The NFC-based data interaction method provided in this application embodiment may include: 801. The mobile phone sends the first private card search request command.

[0252] 802. After receiving the first private SIM card retrieval request command, the watch sends a private SIM card retrieval response command to the mobile phone.

[0253] The implementation process of steps 801-802 is similar to that of steps 601-602, and can be found in the relevant descriptions above, which will not be repeated here.

[0254] 803. After receiving the private SIM card search response command sent by the watch, the mobile phone determines that the watch has switched from being out of place to being in place, and reads the information of the first silent tag in the watch, which includes the watch's identification information.

[0255] After the mobile phone receives the private card search response command sent by the watch, it can set the presence flag corresponding to the first silent tag to true.

[0256] 804. The phone determines whether to start reverse charging based on the information from the first silent label.

[0257] The phone's NFC module reads the watch's identification information and reports it to the phone's charging module. The charging module maintains a list of identification information that supports charging. Based on the watch's identification information and this list, the charging module determines whether the watch supports wireless charging. If it does, the phone initiates reverse charging to charge the watch; otherwise, it does not. This way, reverse charging is quickly activated simply by bringing the phone and watch close together. Compared to the current method of manually activating reverse charging on the phone, this significantly improves the user experience, saves users many steps, and reduces the learning curve.

[0258] Furthermore, in this solution, the charging coil on the phone used for reverse charging can be placed close to the antenna used for NFC communication, so that the phone can start reverse charging via NFC and charge the watch through the charging coil when the watch is in the same position, avoiding the need to repeatedly adjust the position of the watch.

[0259] 805. After the mobile phone finishes reading the information of the first silent tag, it stops reading the information of the first silent tag and sends the first private card search request command.

[0260] 806. If the mobile phone determines that the watch is still in place based on the private SIM card search response command sent by the watch, it continues to send the first private SIM card search request command and repeats step 806.

[0261] The implementation process of steps 805-806 is similar to that of steps 605-606, and can be found in the relevant descriptions above, which will not be repeated here.

[0262] In some embodiments, the method may further include: after the mobile phone determines that the watch is continuously in place, increasing the sending interval of the first private card search request instruction to further save the power consumption of the mobile phone.

[0263] In addition, after the phone finishes reading the information from the first silent tag, it can send other card-finding request commands besides the first private card-finding request command, while the watch remains in position. This allows the phone to interact with other NFC tags (including general tags and silent tags) and read their information, ensuring normal NFC card swiping and reading while the watch remains in position. For example, the phone... Figure 4C In the polling mode shown, various standard card search request commands and private card search request commands are periodically sent in a polling manner.

[0264] Following step 805, the method further includes: 807. If the mobile phone does not receive the private card search response command sent by the watch within the first preset time period, it is determined that the watch has switched from being present to being absent, and then the above step 801 is executed.

[0265] It should be noted that regarding steps 801-807 and... Figures 4A-4D The correspondence can be found in steps 501-507. Figures 4A-4D The description of the correspondence is omitted here.

[0266] In some embodiments, based on Figures 4A-4D The NFC processing flow shown, and the scheme described in steps 801-807, may include: The mobile phone polls and sends card-finding request commands according to the NFC module's working cycle, including standard card-finding request commands and private card-finding request commands. The private card-finding request command includes a first private card-finding request command. When the watch is not near the phone, the presence flag corresponding to the first silent tag is false. After the watch and phone are close together, the phone receives a private card-finding response command from the first silent tag. Based on the false presence flag of the first silent tag and the received private card-finding response command, the phone determines that the watch has switched from being absent to being present, thereby reading the watch's identity information stored in the first silent tag and determining whether to enable reverse charging based on the identity information; and sets the presence flag of the first silent tag to true. After the information reading of the first silent tag is completed, the data reading process for the first silent tag is no longer executed. The mobile phone polls and sends standard card-finding request commands and private card-finding request commands according to the NFC module's working cycle to read information from other NFC tags, including the first private card-finding request command. Furthermore, when the first silent tag remains present, the interval between the card-finding request commands sent by the mobile phone corresponding to the first silent tag can be increased. After the watch is removed from the phone, the phone sets the presence flag corresponding to the first silent tag to false and stops reverse charging. An example diagram illustrating reverse charging between the phone and watch via NFC can be found here. Figure 8B .

[0267] In the solution described in Scenario Example 3, the mobile phone can use the first private SIM card search request command to determine whether the watch has switched from being absent to being present (e.g., the watch is close to the phone). Then, it reads information such as the watch's identification information stored in the first silent tag on the watch to determine whether to initiate reverse charging, thus enabling one-touch activation of reverse charging. In this way, the watch only responds and activates based on the first private SIM card search request command, minimizing unnecessary data reading and allowing for on-demand triggering and on-demand data retrieval.

[0268] Once the phone has finished reading the information from the first silent tag, it will not read the information from the first silent tag again, even if the watch remains in place (i.e., the watch and the phone remain close). This saves power consumption caused by the phone continuously reading the information from the first silent tag.

[0269] Furthermore, after the phone has finished reading the information from the first silent tag, it can poll and send NFC card search request commands, including standard NFC card search request commands and proprietary NFC card search request commands, to identify other NFC tags and read their information. In this way, even if the watch remains in the device, the phone's NFC function will not be disabled or affected, and it can still perform NFC card swiping or reading normally.

[0270] Furthermore, the solution provided in this application achieves the above objectives through the NFC protocol interaction process, which is simple, real-time, and universal; moreover, it does not require additional devices such as Hall sensors, thus saving hardware space in mobile phones and watches, simplifying hardware design, and reducing device costs.

[0271] It should be noted that the above business scenarios and the card reader devices and tag devices involved in the business scenarios are only examples. The NFC data interaction method provided in this application embodiment can also be applied to other electronic devices or other business scenarios, which will not be listed here.

[0272] In addition, in conjunction with the above embodiments and corresponding drawings, another embodiment of this application provides a data interaction method that can be applied to a first electronic device supporting card reader functionality and a first NFC tag. See also Figure 9 The method may include: 901. The first electronic device sends a first card search request command.

[0273] The first card search request instruction is a proprietary card search request instruction used to discover a silent tag. This silent tag can respond to the first card search request instruction and interact with the first electronic device so that the first electronic device can read the information of the silent tag. For example, the first card search request instruction can be REQ-A-PR in the above embodiment.

[0274] 902. After receiving the first card search request instruction from the first electronic device, the first NFC tag sends a first card search response instruction to the first electronic device.

[0275] If the first NFC tag supports responding to the first card search request command, it can reply to the first electronic device with the first card search response command.

[0276] 903. After receiving the first card search response command from the first NFC tag, the first electronic device reads the information of the first NFC tag.

[0277] If the first electronic device receives a first card search response command from the first NFC tag, it's possible that the first NFC tag and the first electronic device have just moved from being far apart to being close to each other. After detecting the first NFC tag, the first electronic device can read the information from the first NFC tag. For example, the information from the first NFC tag may include customized theme information, charger anti-counterfeiting marks, charging optimization parameters, or device identification information.

[0278] Before the first electronic device receives the first card search response command from the first NFC tag, the first electronic device is not in place; after the first electronic device receives the first card search response command from the first NFC tag, the first electronic device detects the first NFC tag, and the first NFC tag switches to being in place.

[0279] 904. After the first electronic device reads the information of the first NFC tag, the first electronic device continues to send the first card search request command and continues to receive the card search response command from the first NFC tag, without reading the information of the first NFC tag.

[0280] After the first electronic device reads the information of the first NFC tag, if it continues to receive the first card search response command from the first NFC tag, the first NFC tag may remain in a state of being close to the first electronic device, the first NFC tag remains in place, and the first electronic device will no longer read the information of the first NFC tag.

[0281] In this way, while the first NFC tag remains in place, the first electronic device no longer reads the information of the first NFC tag, thus avoiding continuous data reading and enabling normal detection and sending of NFC card search commands, including standard card search commands and proprietary card search commands. This allows it to read the information of other NFC tags normally, enabling NFC card reading, card swiping, and peer-to-peer functions to operate normally.

[0282] Furthermore, by not reading the information from the first NFC tag while the first NFC tag remains in place, the first electronic device can save power consumption.

[0283] Furthermore, the first electronic device reads information from a silent tag that can respond to the first card search request command, rather than any general NFC tag. Therefore, it is less likely to cause unnecessary data reading and can achieve on-demand triggering and on-demand data reading.

[0284] Furthermore, this solution does not require additional components such as Hall sensors to read data from silent tags, thus saving hardware space for the first electronic device and the silent tags, simplifying hardware design, and reducing equipment costs.

[0285] It is understood that, in order to achieve the above functions, the electronic device includes hardware and / or software modules that perform the respective functions. Based on the algorithmic steps of the examples described in conjunction with the embodiments disclosed herein, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is implemented in hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application in conjunction with the embodiments, but such implementation should not be considered beyond the scope of this application.

[0286] This embodiment can divide the electronic device into functional modules according to the above method example. For example, each function can be divided into its own functional modules, or two or more functions can be integrated into one processing module. The integrated modules can be implemented in hardware. It should be noted that the module division in this embodiment is illustrative and only represents one logical functional division. In actual implementation, there may be other division methods.

[0287] When each functional module is divided according to its corresponding function, the above-described embodiment illustrates a possible configuration of the electronic device 100. This electronic device may include a transmitting unit, a receiving unit, a reading unit, and a processing unit. It should be noted that all relevant content regarding the steps in the above method embodiments can be referenced from the functional descriptions of the corresponding functional modules, and will not be repeated here.

[0288] This application also provides an electronic device, which can be the card reader device or tag device described above. For example... Figure 10 As shown, the system includes one or more processors 1001, a memory 1002, and one or more computer programs 1003. These devices can be connected via one or more communication buses 1004. The one or more computer programs 1003 are stored in the memory 1002 and configured to be executed by the one or more processors 1001. The one or more computer programs 1003 include instructions that can be used to execute various steps performed by the card reader device or the tag device in the above embodiments. All relevant content regarding the steps involved in the above method embodiments can be referenced from the functional descriptions of the corresponding physical devices, and will not be repeated here.

[0289] For example, the processor 1001 described above can specifically be... Figure 3 The processor 110 shown above, and the memory 1002 mentioned above, can specifically be... Figure 3 The internal memory 121 shown.

[0290] This application also provides an electronic device, including one or more processors and one or more memories. The one or more memories are coupled to the one or more processors, and the one or more memories are used to store computer program code, including computer instructions. When the one or more processors execute the computer instructions, the electronic device performs the aforementioned method steps to implement the NFC-based data interaction method in the above embodiments.

[0291] Embodiments of this application also provide a computer-readable storage medium storing computer instructions. When the computer instructions are executed on an electronic device, the electronic device performs the steps executed by the card reader device in the above-mentioned related methods, or performs the steps executed by the silent tag in the above-mentioned related methods, thereby realizing the NFC-based data interaction method in the above embodiments.

[0292] The embodiments of this application also provide a computer program product that, when run on a computer, causes the computer to execute the steps performed by the card reader device in the above-mentioned related methods, or to execute the steps performed by the silent tag in the above-mentioned related methods, thereby realizing the NFC-based data interaction method in the above embodiments.

[0293] In addition, embodiments of this application also provide an apparatus, which may specifically be a chip (e.g., an NFC chip), a component, or a module. The apparatus may include a connected processor and a memory. The memory is used to store computer execution instructions. When the apparatus is running, the processor may execute the computer execution instructions stored in the memory to cause the apparatus to perform the steps executed by the card reader device in the above-mentioned related methods, or to perform the steps executed by the silent tag in the above-mentioned related methods, thereby realizing the NFC-based data interaction method in the above embodiments.

[0294] Furthermore, this application also provides an NFC tag that can perform the steps described above for a silent tag, thereby realizing the NFC-based data interaction method described in the above embodiments. This NFC tag can be simulated using an NFC chip. The NFC tag can be a standalone card or can be embedded in an electronic device.

[0295] In this embodiment, the electronic device, computer-readable storage medium, computer program product, device or NFC tag are all used to execute the corresponding methods provided above. Therefore, the beneficial effects they can achieve can be referred to the beneficial effects in the corresponding methods provided above, and will not be repeated here.

[0296] Through the above description of the embodiments, those skilled in the art will understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0297] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0298] The units described as separate components may or may not be physically separate. A component shown as a unit can be one or more physical units; that is, it can be located in one place or distributed in multiple different locations. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0299] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0300] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, essentially or in other words, the parts that contribute to the prior art, or all or part of the technical solutions, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0301] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A data interaction method, characterized in that, Applied to a system comprising a first electronic device and a first near field communication (NFC) tag, the first NFC tag being a silent tag, the method comprises: The first electronic device sends a first card searching request instruction; After the first NFC tag receives the first card searching request instruction from the first electronic device, the first NFC tag sends a first card searching response instruction to the first electronic device; After the first electronic device receives the first card searching response instruction from the first NFC tag, if the in-place state of the first NFC tag is out of place, the first electronic device reads information of the first NFC tag, and the in-place state of the first NFC tag is switched from out of place to in place; After the first electronic device reads the information of the first NFC tag, the in-place state of the first NFC tag is in place, and the first electronic device receives the first card searching response instruction from the first NFC tag without reading the first information.

2. The method of claim 1, wherein, The method further comprises: If the first electronic device does not receive the first card searching response instruction from the first NFC tag within a preset time length, and the in-place state of the first NFC tag is in place, the in-place state of the first NFC tag is switched from in place to out of place; If the first electronic device receives the first card searching response instruction from the first NFC tag within the preset time length, and the in-place state of the first NFC tag is in place, the in-place state of the first NFC tag is maintained in place.

3. The method of claim 2, wherein, The first electronic device is provided with an in-place flag, the in-place flag corresponding to the in-place state of the first NFC tag, and the in-place flag being in a first state by default; When the in-place flag is in the first state, the in-place state of the first NFC tag is out of place; After the in-place state of the first NFC tag is switched from out of place to in place, the in-place flag is switched from the first state to a second state; After the in-place state of the first NFC tag is switched from in place to out of place, the in-place flag is switched from the second state to the first state.

4. The method according to any one of claims 1 to 3, characterized in that, The method further comprises: If the in-place state of the first NFC tag is in place, the first electronic device increases the sending interval of the first card searching request instruction.

5. The method according to any one of claims 1 to 4, characterized in that, After the first electronic device reads the information of the first NFC tag, the method further comprises: The first electronic device sends a second card searching request instruction; If the first electronic device receives a second card searching response instruction from the second NFC tag, the second card searching response instruction being a response of the second NFC tag to the second card searching request instruction, the information of the second NFC tag is read.

6. The method according to any one of claims 1 to 5, characterized in that, The first NFC tag device is obtained by simulation through an NFC chip.

7. A data interaction method applied to a first electronic device supporting a near field communication (NFC) card reading function, characterized in that, The method comprises: The first electronic device sends a first card searching request instruction, the first card searching request instruction being used to discover a first NFC tag, the first NFC tag being a silent tag; The first electronic device receives a first card search response instruction from the first NFC tag, reads information of the first NFC tag if the in-place state of the first NFC tag is not in place, and switches the in-place state of the first NFC tag from not in place to in place; the first card search response instruction is a response of the first NFC tag to the first card search request instruction; After the first electronic device reads the information of the first NFC tag, the in-place state of the first NFC tag is in place, and the electronic device receives a first card search response instruction from the first NFC tag, and does not read the information of the first NFC tag.

8. The method of claim 7, wherein, The method further comprises: If the first electronic device does not receive a first card search response instruction from the first NFC tag within a preset time length, and the in-place state of the first NFC tag is in place, the in-place state of the first NFC tag is switched from in place to not in place; If the first electronic device receives a first card search response instruction from the first NFC tag within the preset time length, and the in-place state of the first NFC tag is in place, the in-place state of the first NFC tag is maintained in place.

9. The method of claim 8, wherein, The first electronic device is provided with an in-place flag corresponding to the in-place state of the first NFC tag, and the in-place flag is in a first state by default; When the in-place flag is in the first state, the in-place state of the first NFC tag is not in place; After the in-place state of the first NFC tag is switched from not in place to in place, the in-place flag is switched from the first state to a second state; After the in-place state of the first NFC tag is switched from in place to not in place, the in-place flag is switched from the second state to the first state.

10. The method according to any one of claims 7-9, characterized in that, The method further comprises: If the in-place state of the first NFC tag is in place, the first electronic device increases the sending interval of the first card search request instruction.

11. The method according to any one of claims 7-10, characterized in that, After the first electronic device reads the information of the first NFC tag, the method further comprises: The first electronic device performs business processing according to the information of the first NFC tag.

12. The method of claim 11, wherein, The first electronic device performs business processing according to the information of the first NFC tag, comprising: The first electronic device charges the second electronic device according to the identification information of the second electronic device in the first NFC tag.

13. The method of claim 11, wherein, The first electronic device performs business processing according to the information of the first NFC tag, comprising: The first electronic device switches the theme of the first electronic device according to the information of the first NFC tag.

14. The method of claim 11, wherein, The first electronic device performs business processing according to the information of the first NFC tag, comprising: The first electronic device performs business processing according to the information of the first NFC tag, comprising:

15. An electronic device, comprising: comprising: one or more processors; memory; and one or more computer programs, wherein the one or more computer programs are stored in the memory, the one or more computer programs including instructions, which when executed by the electronic device, cause the electronic device to perform the data interaction method of any one of claims 7-14.

16. A computer readable storage medium characterized by: including computer instructions, which when run on a computer, cause the computer to perform the data interaction method of any one of claims 1-14.

17. A computer program product, characterised in that, which when run on a computer, cause the computer to perform the data interaction method of any one of claims 1-14.

18. An apparatus, comprising: The apparatus includes at least one memory, at least one processor coupled to the at least one memory and reading instructions from the at least one memory and causing the apparatus to perform the method of any one of claims 7-14 according to the instructions.

19. A data interaction system characterized by including a first electronic device and a first near field communication, NFC, tag, the first electronic device and the first NFC tag being configured to perform the data interaction method of any one of claims 1-14.