A method, module and device for near field communication
Patent Information
- Application Number
- CN202610646326.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-12
- Publication Date
- 2026-10-27
- Estimated Expiration
- 2046-05-12
AI Technical Summary
[0009]本说明书一个或多个实施例能够达到以下有益效果:从设备可以获取在主设备的作用下产生的交互状态信息,判断主设备是否具有通信意图,在主设备具有通信意图的时,从设备可以设定为具有高通信性能的第一增益模式;在主设备具有通信意图时,从设备可以设定为具有低通信性能的第二增益模式,从而可以降低误触发概率,提高通信的安全性。
Smart Images

Figure CN122178946B_ABST
Abstract
Description
Technical Field
[0001] This specification relates to the field of near-field communication technology, and particularly to a method for near-field communication. This specification also relates to a near-field communication module, a near-field communication slave device, and a computing device. Background Technology
[0002] With the continuous development of computer technology, Near Field Communication (NFC) technology has been widely applied in various scenarios due to its convenience, security, and broad device compatibility. These include payment scenarios, access control scenarios, and turnstile scenarios. In everyday consumption environments such as retail stores, public transportation, vending machines, and restaurants, users can use NFC-enabled smartphones, smartwatches, or other wearable devices to perform fast, contactless payment transactions.
[0003] Improving the security of near-field communication is a technical problem that urgently needs to be solved. Summary of the Invention
[0004] In view of this, one or more embodiments of this specification provide a method, module, and device for near-field communication to improve the security of near-field communication.
[0005] According to a first aspect of one or more embodiments of this specification, a method for near-field communication is provided, applied to a slave device in near-field communication, comprising: Obtain the interaction state information generated under the action of the main device; Based on the interaction status information, it is determined whether the master device meets the preset conditions; the preset conditions are conditions indicating that the master device has the intention to conduct near-field communication with the slave device. If the preset conditions are met, the slave device is set to the first gain mode; If the preset conditions are not met, the slave device is set to the second gain mode; the communication performance of the slave device in the first gain mode is higher than that of the slave device in the second gain mode.
[0006] According to a second aspect of one or more embodiments of this specification, a near-field communication module is provided for a slave device used in near-field communication. The module includes: a status information detection module, a control module, and a gain module; the control module is connected to the status information detection module and the gain module. The status information detection module is used to acquire the interactive status information generated under the action of the main device and send it to the control module; The control module is used to determine whether the master device meets the preset conditions based on the interaction status information obtained by the status information detection module, and to control the gain mode of the gain module based on the determination result. The gain module is configured to respond to the control module by setting the master device to a first gain mode when the master device meets preset conditions, and setting the master device to a second gain mode when the master device does not meet preset conditions; the communication performance of the slave device in the first gain mode is higher than that in the second gain mode.
[0007] According to a third aspect of one or more embodiments of this specification, a near-field communication slave device is provided, the slave device being used to perform the above-described near-field communication method or the slave device comprising the above-described near-field communication module.
[0008] According to a fourth aspect of one or more embodiments of this specification, a computing device is provided, comprising: a memory and a processor; the memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions, wherein the computer programs / instructions, when executed by the processor, implement the steps of the above-described near-field communication method.
[0009] One or more embodiments of this specification can achieve the following beneficial effects: the slave device can obtain the interaction state information generated under the action of the master device, determine whether the master device has a communication intention, and when the master device has a communication intention, the slave device can be set to a first gain mode with high communication performance; when the master device has a communication intention, the slave device can be set to a second gain mode with low communication performance, thereby reducing the probability of false triggering and improving the security of communication. Attached Figure Description
[0010] To more clearly illustrate the technical solutions in the embodiments or prior art of this specification, the drawings used in the description of the embodiments or prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this specification. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0011] Figure 1 This is a schematic diagram illustrating an application scenario of a near-field communication method provided in one embodiment of this specification. Figure 2 This is a flowchart illustrating a near-field communication method provided in one embodiment of this specification. Figure 3 This is a flowchart illustrating a near-field communication method provided in one embodiment of this specification. Figure 4This is a schematic diagram of the structure of a near-field communication module provided in one embodiment of this specification; Figure 5 This is a schematic diagram of a near-field communication device provided in one embodiment of this specification; Figure 6 This is a structural block diagram of a computing device provided in one embodiment of this specification. Detailed Implementation
[0012] To enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this specification, and not all embodiments. Based on the embodiments in this specification, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this specification.
[0013] This specification uses specific terms to describe embodiments thereof. Terms such as "an embodiment," "one embodiment," and / or "some embodiments" refer to a particular feature, structure, or characteristic associated with at least one embodiment of this specification. Therefore, it should be emphasized and noted that references to "an embodiment," "one embodiment," or "an alternative embodiment" in different locations throughout this specification do not necessarily refer to the same embodiment. Furthermore, those skilled in the art can combine and integrate the different embodiments or examples described herein, as well as the features of those different embodiments or examples, without contradiction.
[0014] The terminology used in one or more embodiments of this specification is for the purpose of describing particular embodiments only and is not intended to be limiting of the one or more embodiments of this specification. The singular forms “a,” “an,” “an,” “the,” and “the” as used in one or more embodiments of this specification and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in one or more embodiments of this specification includes any or all possible combinations of one or more associated listed items.
[0015] The terms “comprising,” “including,” or any other variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, product, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, product, or apparatus. Without further limitation, the presence of additional identical or equivalent elements in the process, method, product, or apparatus that includes said elements is not excluded.
[0016] Although the terms "first," "second," etc., may be used to describe various information in one or more embodiments of this specification, this information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, "first" may also be referred to as "second," and similarly, "second" may also be referred to as "first," without departing from the scope of one or more embodiments of this specification. Ordinal numbers such as "first," "second," etc., do not necessarily indicate order; often they are used to facilitate the distinction of objects. For example, "first server" and "second server" usually refer to two servers. To distinguish these two servers, they are described as "first server" and "second server." Of course, sometimes these two servers may be the same server.
[0017] The word “if” as used in one or more embodiments of this specification may be interpreted as “when”, “when”, or “in response to determination”, depending on the context.
[0018] In this specification, unless explicitly stated otherwise, "receiving and sending data" does not necessarily mean direct receiving and sending; it can also mean indirect receiving and sending. For example, A receiving data sent by B can be understood as A directly receiving the data sent by B, or it can be understood as A indirectly receiving the data sent by B through other entities such as C. Similarly, B sending data to A can be understood as B sending the data directly to A, or it can be understood as B indirectly sending the data to A through other entities such as C. Here, C can be one entity, or it can be two or more entities.
[0019] In this specification, unless explicitly stated otherwise, the relationships between structures can be direct or indirect. For example, when describing "A is connected to B," unless it is explicitly stated that A and B are directly connected, it should be understood that A can be directly connected to B or indirectly connected to B. Similarly, when describing "A is on top of B," unless it is explicitly stated that A is directly above B (AB is adjacent and A is above B), it should be understood that A can be directly above B or indirectly above B (AB is separated by other elements, and A is above B). And so on.
[0020] The user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in one or more embodiments of this specification are all information and data authorized by the user or fully authorized by all parties. The collection, use and processing of related data shall comply with the relevant laws, regulations and standards of the relevant regions, and corresponding operation entry points shall be provided for users to choose to authorize or refuse.
[0021] The following explains the terms and concepts used in one or more embodiments of this specification.
[0022] NFC (Near Field Communication) is a short-range wireless communication technology operating at a frequency of 13.56 MHz, with a communication distance typically within 10 centimeters. This technology supports fast, secure, two-way communication between devices and is widely used in mobile payments, access control, public transport cards, and smart identification scenarios. In NFC communication, the device that actively transmits a card-finding signal can be called the master device or the transmitting device, such as an NFC card reader or a device in card reader mode. The device that passively responds to the signal transmitted by the master device can be called the slave device or the target device, such as an NFC tag, a device in card emulation mode, or a device with an NFC tag.
[0023] Polling: The process by which an NFC controller actively searches its surroundings for other NFC devices, cards, or tags. By sending specific query signals, the NFC controller can detect available targets and initiate communication. The initiating device can sequentially try different communication protocols to detect the presence of interactive passive devices nearby.
[0024] NFC primarily supports two operating modes: Reader / Writer Mode and Card Emulation Mode. In some business scenarios, the user's mobile terminal can operate in Reader Mode, actively emitting radio frequency fields; the other device, acting as an NFC tag, can passively respond and transmit information if it is in Card Mode or has an NFC tag.
[0025] Due to internal space constraints, the NFC antennas on mobile terminals are typically small, and users are often unaware of their exact location. Some tag-side devices improve communication efficiency by transmitting excitation signals, modulating signals, or increasing antenna area to compensate for differences in NFC reading capabilities and antenna placement between mobile terminals. Thus, when a mobile terminal has strong card-reading capabilities, such as higher RF transmission power and more sensitive reception, the effective communication distance between the mobile terminal and the tag-side device may exceed the standard distance, reaching over 20 centimeters. This could undermine users' trust in the near-field characteristics of NFC, thereby affecting their sense of security and psychological expectations in certain business scenarios.
[0026] The technical solutions provided in the various embodiments of this specification are described in detail below with reference to the accompanying drawings.
[0027] Figure 1 This is a schematic diagram illustrating an application scenario of a near-field communication method provided in one embodiment of this specification.
[0028] like Figure 1 As shown, the master device 100 of near-field communication (NFC) acts as a card reader device and can emit radio frequency (RF) signals to detect the presence of slave devices. In practical applications, to reduce power consumption, the master device 100 can first emit low-power RF signals in LPCD mode to detect the presence of nearby slave devices, such as NFC cards; or the master device can emit normal card-finding signals to detect the presence of cards nearby. After the slave device 200 senses the master device, it can obtain the interaction status information generated by the two, such as detecting the distance between itself and the master device, and detecting the signal strength of the RF signals emitted by the master device, to determine whether the master device intends to engage in NFC communication with the slave device. If it is determined that the master device intends to communicate, the slave device can be in a first gain mode with high communication performance; if it is determined that the master device does not intend to communicate, the slave device can be in a second gain mode with low communication performance. In this way, the slave device can actively adjust the gain mode to avoid misidentification by the master device and improve communication security.
[0029] The main device 100 can be a device with near-field communication (NFC) card reader functionality, such as a smartphone, smartwatch, wristband, laptop, tablet, or other portable terminal device; it can also be a smart home device, in-vehicle device, or a POS machine, self-service checkout device, or other payment device. The slave device 200 can be a device with an NFC tag or a device that can simulate an NFC tag. For example, the slave device 200 can be a device used for processing payment transactions, such as a payment device used at a cashier or self-service checkout; or it can be a device for handling check-in, login, access control, turnstiles, etc., such as a device for checking in at work, school, or events using NFC; a device for member login or application login using NFC; an access control device for residential or office buildings; a card reader for public transportation such as buses and subways; or a device for identity or ticket verification at tourist attractions, events, or concerts. The specific types of the main and slave devices are not limited here.
[0030] This application provides a method for near-field communication, and also relates to a near-field communication module, a near-field communication slave device, a near-field communication apparatus, a computing device, a computer-readable storage medium, and a computer program product, which will be described in detail in the following embodiments.
[0031] Figure 2 This is a flowchart illustrating a near-field communication method provided in one embodiment of this specification.
[0032] From a programming perspective, the execution entity of the process can be a program embedded in a slave device of near-field communication. It can be understood that this method can be executed by any device, equipment, platform, or cluster of devices with computing and processing capabilities.
[0033] like Figure 2 As shown, the process may include the following steps.
[0034] Step 202: Obtain the interaction status information generated under the action of the main device.
[0035] Interaction status information can be information that a slave device can perceive when a master device is nearby. Specifically, interaction status information can be data reflecting the physical interaction status between master and slave devices, and is not limited to field strength and distance.
[0036] As one implementation, the interaction status information may include at least one of the following: field strength information sensed by the device, distance information between the device and the master device, and instructions sent by the master device indicating that the master device has a communication intention.
[0037] The master device, acting as a card reader, can actively emit radio frequency (RF) signals, which the slave device can detect through electromagnetic induction. Field strength information represents the field strength of the RF signal emitted by the master device as sensed by the slave device; specifically, it can be the voltage or current magnitude of the RF signal sensed by the slave device through its antenna.
[0038] The distance information between the slave device and the master device can be a numerical value of the acquired physical distance, such as distance measured via UWB, Bluetooth ranging, or a distance value calculated based on field strength. For example, the slave device can be an electronic device with a distance detection module, such as a camera or distance sensor, capable of sensing the distance to the master device; or the master device can have a distance detection module to determine the distance to the slave device, and the master device can also provide the detected distance information to the slave device for judgment.
[0039] If the master device has the ability to determine the communication intent, for example, the master device can determine whether it has the intent to communicate with the slave device based on the interaction status information generated between the master device and the slave device. If it has the intent to communicate, the master device can send an instruction indicating the intent to communicate to the slave device, and the slave device can adjust the gain mode according to the instruction provided by the master device.
[0040] Step 204: Based on the interaction status information, determine whether the master device meets the preset conditions; the preset conditions are conditions that indicate that the master device has the intention to conduct near-field communication with the slave device.
[0041] Preset conditions can be predefined logical criteria used to quantify valid communication intentions or to assess interaction credibility. Communication intentions can represent the physical behavior of the user on the host device in actively and stably maintaining close-range interaction.
[0042] In practical applications, determining whether a master device meets preset conditions can be done from one dimension or from multiple dimensions. Optionally, in one or more embodiments of this specification, the preset conditions may include at least one of the following conditions: the signal strength of the acquired radio frequency signal of the master device is greater than or equal to a preset strength; the preset strength is a strength threshold set based on a preset safe interaction distance; the distance between the slave device and the master device is less than or equal to a preset distance; the slave device receives a command message from the master device indicating confirmation of near-field communication; and the master device is gradually approaching the slave device within a preset range.
[0043] Among them, radio frequency signal strength can represent the radio frequency signal transmitted by the master device, also known as the carrier signal, and the electric field strength induced at the antenna end of the slave device. It can be the content quantized and output by the signal strength detection module (such as RSSI chip).
[0044] The preset strength represents the signal strength that meets the preset safe interaction distance. As one implementation, the safe interaction distance can be less than or equal to the standard distance for near-field communication (NFC). For example, if the standard communication distance specified by the NFC protocol is 10 centimeters, the safe interaction distance can be 8 centimeters, 5 centimeters, etc. The safe interaction distance can be set according to actual business needs. For example, in situations with high population density, high mobility, or high security requirements, the safe interaction distance can be set smaller; in situations with low population density, the safe interaction distance can be set larger. Alternatively, the safe interaction distance can also be determined based on the interaction distance that users can accept when processing business via NFC. For example, in payment services, information about acceptable interaction distances from consumers can be collected through questionnaires or other methods, and the safe interaction distance can be set based on the collected feedback.
[0045] After determining the safe interaction distance, the preset strength value can be set based on this safe interaction distance. As one implementation, the preset strength can be determined by statistically analyzing the signal strengths of multiple radio frequency signals acquired by the slave device when multiple master devices are at the preset safe distance.
[0046] Multiple master devices can represent a collection of mobile terminal devices covering mainstream brands, models, release dates, and hardware configurations in the target application scenario. Preset safe distance can represent a fixed physical distance that is manually set during the statistical testing phase and meets the security requirements of the application scenario (e.g., 5.0 ± 0.2 cm for payment scenarios).
[0047] Statistics can refer to the combined processing of descriptive and inferential statistics on multiple collected radio frequency signal intensity samples, which may include calculating the arithmetic mean, standard deviation, median, confidence interval, etc.
[0048] The preset intensity can be a field strength threshold selected after statistical analysis, such as choosing the average value as the preset intensity.
[0049] For example, selecting 100 commercially available mobile phones, including various brands and models, and testing them at a distance of 5cm, assuming the mean μ of the detected field strength samples is 2.15V / m and the standard deviation σ is 0.35V / m, we can take μ-2σ=1.45V / m as the preset strength. This way, 97.7% of the tested models will have a field strength ≥1.45V / m at 5cm, stably triggering high-gain mode, applicable to most models. Assuming the field strength drops to 1.38V / m at 7cm for the main device, the slave device can automatically enter low-gain mode, effectively blocking long-distance communication.
[0050] Setting a preset strength threshold by statistically analyzing field strength data from multiple master devices at a preset safe distance can improve the universality and engineering reliability of the preset strength threshold across the differences in NFC performance of different brands and models of mobile phones. It can also avoid the risk of overprotection or underprotection caused by setting the preset strength based on experience.
[0051] As another implementation, the preset strength can be a field strength threshold calculated by back-calculating an inverse cubic attenuation model of the electromagnetic field based on a preset safe interaction distance (e.g., 5cm). For example, multiple master devices can be selected, and their respective inverse cubic attenuation models can be determined. Then, the signal strength of each master device at the preset safe interaction distance can be calculated, and the preset strength can be determined from the statistical data of the multiple signal strengths. For example, the maximum, minimum, median, or average of the multiple signal strengths can be used as the preset strength.
[0052] Judging by the field strength threshold eliminates the need for complex algorithms, reducing tag power consumption and processing latency; the field strength threshold is linked to the safe distance, providing a basis for safety; as a rapid initial screening condition, it can trigger the high-gain mode in advance, improving system response efficiency.
[0053] The distance between the slave device and the master device can be detected by a detection module capable of detecting distance, such as a camera or distance sensor, or it can be determined based on the correspondence between field strength and distance. The preset distance can represent a safe communication distance set according to actual needs, and this preset distance can be the same as or similar to the preset safe interaction distance used to determine the preset strength.
[0054] Distance determination aligns with user intuition, enhancing the interpretability of the solution. Furthermore, it can complement field strength parameters, improving adaptability to variations in master device performance and enhancing communication security.
[0055] The instruction sent by the master device to confirm near-field communication can be an encrypted and authenticated explicit confirmation instruction sent by the master device at the NFC protocol stack application layer, or it can be an instruction sent by the master device via Bluetooth, UWB, or other methods. For example, if the slave device has tag information that triggers a certain business process, the master device can start executing the corresponding business process after obtaining the tag information. If, during execution, the slave device receives an instruction from the master device indicating confirmation processing, the slave device can continue processing the business, such as sending more information back to the master device or sending information to the server or other devices to facilitate business processing. If no confirmation instruction is received from the master device, the slave device can interrupt the current communication or interrupt the subsequent processing flow of the current business. Furthermore, the master device can have judgment logic to determine whether the master device has a communication intention, such as the preset conditions described in one or more embodiments of this specification. The master device can determine whether it has a communication intention based on the information it has collected, and then send the corresponding instruction back to the slave device based on the judgment result.
[0056] By introducing a method where the master device actively sends commands, the logical processing of the slave device can be simplified; alternatively, the slave device can combine the commands sent by the master device to comprehensively determine the required gain mode, which can further improve the accuracy of the determination and enhance communication security.
[0057] Within a preset range, the master device gradually approaching the slave device indicates a decreasing trend in the distance between them. For example, within a continuous time window (e.g., 500ms), the relative distance decreases. For instance, if a user moves their phone at a constant speed from 12cm to 3cm, the sampled data would be: 12→9→6→4→3cm, with a consistently negative slope, indicating the master device is gradually approaching the slave device. If the phone remains stationary at 8cm, the sampled data would be: 8.0→8.1→7.9→8.0cm, with a slope of 0, indicating the master device is not gradually approaching the slave device.
[0058] Motion trend analysis can reduce the static false trigger rate. Furthermore, it can be integrated with static parameters (such as field strength and distance) to form a joint judgment, which can improve the accuracy of identification.
[0059] In practical applications, if the master device meets one of the above preset conditions, it can be determined that the master device has a communication intention, and the slave device can be set to a high-gain first gain mode. If the master device does not meet any of the above conditions, the slave device can be set to a second gain mode. Alternatively, a combined judgment can be made, and the master device can be determined to have a communication intention only if it meets two or more of the above conditions. The specific preset conditions can be determined according to actual needs. For example, in scenarios with dense crowds or high mobility, or in scenarios with high security requirements for business processing, the preset conditions can be set to multiple of the above conditions.
[0060] Step 206: If the preset conditions are met, the slave device is set to the first gain mode.
[0061] Step 208: If the preset conditions are not met, the slave device is set to the second gain mode.
[0062] In the first gain mode, the communication performance of the slave device is higher than that of the slave device in the second gain mode.
[0063] Communication performance refers to the set of physical layer radio frequency parameters that affect the effective range and interaction reliability of the near-field electromagnetic coupling link from the device. The level of these parameters reflects the degree to which the parameter values contribute to the quality of the communication link and determines the signal interaction quality between the master and slave devices.
[0064] The first gain mode can represent a high-performance communication state. Specifically, it can be a communication state that meets the requirements of near-field communication, or a communication state that is superior to the standard communication state required by the near-field communication protocol or regulations. It can communicate with the master device in a timely, efficient, and stable manner. For example, in the first gain mode, the resonant frequency of the slave device meets the operating resonant frequency of the master device, enabling normal communication with the master device. Another example is that in the first gain mode, the slave device can provide an excitation signal or perform load modulation to help the master device exit the low-power mode, thus allowing the master device to quickly enter the normal card search mode and interact with the slave device. Yet another example is that in the first gain mode, the RF sensing range of the slave device is relatively small. The second gain mode can represent a low-performance communication state. Specifically, it can be a communication state that does not meet the requirements of near-field communication, or a state in which there is no effective near-field communication interaction with the master device. For example, it may not respond to the card search signal issued by the master device, or not send excitation or modulation signals to help the master device exit the LPCD low-power mode, or not feed back communication information to the master device, or the resonant frequency may deviate from the operating frequency of the master device, or the sensing range of the slave device may be relatively large.
[0065] As one implementation, the above-mentioned communication performance may include at least one of receiving sensitivity and modulation depth of the response modulation signal.
[0066] Receiver sensitivity can be expressed as the minimum input field strength threshold at which the slave device's RF receive link can correctly demodulate the master device's carrier signal. In practical applications, it can be determined by hardware parameters such as the gain of the low-noise amplifier (LNA) and the characteristics of the filters.
[0067] The modulation depth of the response modulation signal can represent the degree or proportion of amplitude variation of the modulated signal generated by the slave device through active load modulation and superimposed on the carrier of the master device. The greater the modulation depth, the higher the signal-to-noise ratio (SNR) of the response signal received by the master device.
[0068] The response modulation signal can represent the slave device as an active tag, which has an active load modulation module inside. This module can generate a compensation signal with the same frequency (e.g., 13.56MHz) as the carrier signal of the master device but with a controllable phase. Its amplitude and phase are dynamically controlled by the baseband signal.
[0069] For example, the control module of the slave device can send commands to the receiver control module via I / O interface or configuration bus to instruct it to switch the LNA (Low Noise Amplifier) gain level. Alternatively, the bandwidth of the bandpass filter can be adjusted, such as widening the bandwidth (e.g., 200kHz) in high-gain mode to improve weak signal acquisition capability, or narrowing the bandwidth (e.g., 50kHz) in low-gain mode to suppress out-of-band noise and reduce power consumption, thus achieving dynamic adjustment of receiver sensitivity.
[0070] For example, for slave devices with low-cost tags that lack active modulation modules, performance can be adjusted through LNA gain switching. For instance, when the phone is 6cm away from the tag, the LNA is in low gain mode, and the signal cannot be demodulated; when the phone moves to 4cm, it switches to high gain mode, and the link is successfully established. In practical applications, slave devices acting as active tags or those with active modulation modules can also use LNA gain switching.
[0071] For example, the device control module can send parameter commands to adjust the amplitude (such as PWM duty cycle control) or phase (such as DDS phase register) of the compensation signal in the active load modulation module, thereby changing the intensity of the modulation signal superimposed on the antenna port and realizing dynamic adjustment of the modulation depth.
[0072] For example, a slave device has a fixed LNA gain and an active modulation module. A high-power mobile phone triggers the slave device at 8cm, but the slave device's modulation depth is set relatively low, such as 3%. The master device's received signal-to-noise ratio (SNR) does not meet the communication requirements, and communication fails. When the signal depth is moved to 3cm, the slave device's modulation depth is increased, such as to 10%. The master device's received signal-to-noise ratio (SNR) meets the communication requirements, and communication succeeds.
[0073] For example, the receiving sensitivity and modulation depth of the response modulation signal can be adjusted synchronously from the device.
[0074] In one implementation, if the communication performance includes receiving sensitivity, the amplification factor of the signal amplifier of the slave device in the first gain mode is greater than the amplification factor in the second gain mode.
[0075] A signal amplifier refers to a low-noise amplifier at the front end of the RF receiver link in a device. Its core function is to amplify the carrier signal from the host device with low noise. The amplification factor represents the gain; the higher the value, the stronger the amplification capability for weak signals and the higher the receiver sensitivity.
[0076] The amplification factor of the signal amplifier is positively correlated with the receiver sensitivity. The first gain mode uses a high amplification factor to ensure reliable acquisition of weak signals at close range; the second gain mode uses a low amplification factor to keep weak signals at long range below the demodulation threshold, achieving physical layer suppression.
[0077] In one implementation, if the communication performance includes the modulation depth of the response modulation signal, the amplitude of the response modulation signal provided by the slave device in the first gain mode is greater than the amplitude of the response modulation signal in the second gain mode; and / or, the absolute value of the phase difference between the response modulation signal and the master device carrier in the first gain mode is greater than the absolute value of the phase difference in the second gain mode.
[0078] The amplitude of the response modulation signal represents the signal amplitude of the compensation signal generated by the active load modulation module of the device. It can be expressed in terms of voltage, current, or other forms. The larger the amplitude, the greater the change in carrier amplitude caused by superposition at the antenna port, and the higher the modulation depth. For example, the control module can adjust the PWM duty cycle or the DAC output voltage to regulate the amplitude.
[0079] The absolute value of the phase difference represents the absolute value of the phase offset between the response modulation signal of the slave device and the carrier signal of the master device, and its value can be in the range of [0°, 180°]. The closer to 180°, the greater the carrier amplitude modulation depth; the closer to 0°, the weaker the modulation effect. For example, the slave device can generate modulation signals with different phases through signal clock and phase offset.
[0080] While one or more embodiments of this specification provide method steps as described in the embodiments or flowcharts, it is understood that the order of steps listed in the embodiments or flowcharts is merely one possible execution order among many steps and does not represent the only possible execution order. The order of some steps may be adjusted according to actual needs, or some steps may be omitted. When the claims involve method steps, changes in the order of such steps, or parallel execution between steps, are also within the scope of protection of the claims.
[0081] Figure 2 The method described above uses the interaction status information generated by the slave device under the action of the master device to determine whether the master device has a communication intention. When the master device has a communication intention, the slave device can be set to a first gain mode with high communication performance; when the master device has a communication intention, the slave device can be set to a second gain mode with low communication performance, thereby reducing the probability of false triggering and improving the security of communication.
[0082] By acquiring interaction status information from the device and determining whether the master device meets preset conditions representing communication intent, the closed-loop control logic of the first or second gain mode is dynamically set. When the interaction status information indicates that the master device has no valid communication intent (such as at long distances or with unstable signals), the second gain mode is activated to suppress communication performance, making the signal-to-noise ratio of the response signal received by the master device lower than the demodulation threshold. This physically blocks the establishment of long-distance links, dynamically constructs a configurable security boundary, and effectively prevents remote data theft. When a valid communication intent is determined to exist (such as at a stable short distance), the first gain mode is activated to release high-performance parameters, improving the reliability of short-distance interactions.
[0083] In addition, it also resolves the contradiction between the limitations of safe distance and the high recognition rate at close range in traditional solutions. Furthermore, it can be implemented independently from the device side without the need for main device protocol or firmware modification. It has the advantages of zero intrusion, high compatibility, and easy deployment, providing a unified solution for NFC near-field interaction that is secure, universal, and feasible to implement.
[0084] based on Figure 2 In addition to the method described herein, this specification also provides some specific or improved implementation methods, which will be described below.
[0085] In practical applications, the slave device can determine its operating mode based on the signal strength of the acquired radio frequency field. As one implementation, acquiring the interaction state information generated under the action of the master device can include: acquiring the radio frequency signal emitted by the master device.
[0086] Correspondingly, the above-mentioned determination of whether the master device meets the preset conditions based on the interaction status information may include: determining whether the signal strength of the radio frequency signal is greater than or equal to a preset strength; if it is greater than or equal to the preset strength, then the master device is determined to meet the preset conditions; if it is less than the preset strength, then the master device is determined to not meet the preset conditions.
[0087] The main device, acting as a card reader, can actively emit detection or card-finding signals. The device's near-field antenna can sense the surrounding field signals. The radio frequency signal emitted by the main device can be a 13.56MHz signal transmitted by the main device. This signal can be a low-power signal emitted by the main device in low-power LPCD mode, or it can be a normal card-finding polling signal emitted by the main device in non-low-power mode.
[0088] Signal strength can represent the amplitude of the electric field strength induced by the radio frequency signal at the antenna end of the device, and can be quantized and output by a signal strength detection module (such as an RSSI circuit). The preset strength can be a signal strength set based on a preset safe interaction distance and used to trigger gain mode switching.
[0089] If the default state of the device is the first gain mode, and the signal strength sensed by the device is greater than or equal to a preset threshold, the device can maintain the first gain mode. If the sensed signal strength is less than the preset threshold, the device can switch to the second gain mode. After a preset time or after no signal is sensed, the device can revert to the first gain mode, or it can maintain the second gain mode until it senses an RF signal greater than or equal to the preset threshold again, at which point it can switch back to the first gain mode.
[0090] If the default state of the slave device is the second gain mode, and the signal strength sensed by the slave device is greater than or equal to a preset threshold, the slave device can switch from the second gain mode to the first gain mode. It can also revert to the second gain mode after the current communication with the master device ends, or it can remain in the first gain mode until it senses an RF signal below the preset threshold, at which point it can switch back to the second gain mode. If the sensed signal strength is less than the preset threshold, the slave device can remain in the second gain mode.
[0091] In practical applications, distance can also be used to make the judgment. Optionally, the above-mentioned acquisition of interaction state information generated under the action of the main device may also include: acquiring distance information between the device and the main device.
[0092] Correspondingly, determining whether the master device meets the preset conditions based on the interaction state information may further include: determining whether the distance between the master device and the distance information is less than or equal to a preset distance; if it is less than or equal to the preset distance, then the master device is determined to meet the preset conditions. Correspondingly, determining whether the master device meets the non-preset conditions if the signal strength is less than the preset strength may include: if the signal strength is less than the preset strength and the distance is greater than the preset distance, then the master device is determined to meet the non-preset conditions.
[0093] The slave device can have a distance sensing component for measuring the distance to nearby objects, or the master device can provide the measured distance information to the slave device, allowing the slave device to obtain the distance information between itself and the master device. The preset distance can be a predefined safe communication distance. Typically, this preset distance is less than the maximum distance specified by the near-field communication protocol.
[0094] If the slave device determines that the distance between itself and the master device is less than a preset distance, it can be determined that the master device meets the preset conditions and has the intention to communicate, and the slave device can be set to the first gain mode. If the default state of the slave device is the first gain mode, the slave device can maintain the first gain mode unchanged.
[0095] If the distance between the slave device and the master device is greater than a preset distance, and the detected signal strength of the master device is less than a preset strength, it indicates that the master device does not intend to communicate, and the slave device can be set to the second gain mode. If the default state of the slave device is the first gain mode, the slave device can switch from the first gain mode to the second gain mode.
[0096] In scenarios with higher security requirements, the slave device can be set to high-gain mode when both signal strength and distance requirements are met. For example, if the distance between the slave device and the master device is less than or equal to a preset distance, and the detected signal strength of the master device is greater than a preset strength, it indicates that the master device intends to communicate, and the slave device can be set to the first gain mode. If the distance between the slave device and the master device is greater than a preset distance and the signal strength is greater than a preset strength, or if the distance between the slave device and the master device is less than or equal to a preset distance and the signal strength is less than a preset strength, the slave device can be set to the second gain mode.
[0097] For applications requiring high responsiveness or compatibility, the device can be set to high-gain mode when either signal strength or distance meets the requirements. Specific mode switching conditions can be set according to actual needs.
[0098] Figure 3 This is a flowchart illustrating a near-field communication method provided in one embodiment of this specification. Figure 3 As shown, assuming a user uses a mobile terminal such as a smartphone to approach an NFC tag device (also known as a slave device), the mobile terminal will emit a polling signal to detect the presence of the tag. The tag device can detect the signal in real time and measure the signal field strength. Assuming the tag device's default mode is high-gain, when the signal field strength reaches a certain threshold, the tag device will enter a high-gain mode to maintain both receiving and transmitting, increasing the sensing range until the communication ends. If the signal field strength does not reach the threshold, the tag device can simultaneously detect the distance. If the detected distance exceeds the expected communication range (outside the effective range), the tag device can adjust its receiving and transmitting capabilities to low gain, reducing the sensing range until no field is detected. The adjustment then ends, and the tag device can revert to its default mode. This dynamic adjustment process can accompany the entire communication process, ensuring that the communication range remains controllable throughout.
[0099] In practical applications, the master device may emit a low-power LPCD signal or a normal card detection polling signal. One approach is for the slave device to determine whether the master device is emitting a polling signal; if it is, the signal strength is then assessed, and the gain mode is determined. Another approach is for the slave device to not need to determine whether the acquired field signal is an LPCD signal or a polling signal, but only to detect the field strength and then determine the gain mode. Distance detection and signal strength detection can be performed in parallel or sequentially; this is not limited here. To further improve accuracy, distance information can be used to determine whether the master device is approaching the slave device. For a approaching master device, the slave device can provide a high-gain mode to facilitate communication. Optionally, the above-mentioned determination of whether the master device meets the preset conditions based on the interaction state information may further include: Determine whether the master device is gradually approaching the slave device.
[0100] Correspondingly, determining that the master device meets the preset condition if the distance is less than or equal to the preset distance may include: if the distance is less than or equal to the preset distance and the master device is gradually approaching the slave device, then determining that the master device meets the preset condition.
[0101] The "gradually approaching" state indicates that the relative distance between the master device and the slave device decreases within a continuous time window (e.g., 500ms). By superimposing the master device's active state, if the distance between the master and slave devices is less than a preset distance, and they are in a gradually approaching state, it can be determined that the master device meets the preset conditions and has the intention to communicate. The slave device can then be set to high-gain mode, further improving communication accuracy.
[0102] If the master device is not gradually approaching the slave device, it indicates that the master device does not meet the preset conditions and does not have the intention to communicate. The slave device can be set to low gain mode to avoid establishing communication with the master device as much as possible.
[0103] The steps for determining whether the devices are in a close proximity state, whether the distance between the master and slave devices is less than a preset distance, and whether the signal strength of the master device obtained by the slave device is greater than or equal to a preset strength can be performed in parallel, or the other determination steps can be omitted after obtaining at least one determination result that can determine the gain mode. The specific settings can be configured according to actual needs, and no limitation is made here.
[0104] In practical applications, the user of the main device might unintentionally place it stationary about 5cm away from the slave device (assuming this distance is less than the preset distance), but without any intention to interact. They might simply be doing something else and have temporarily placed the main device next to the slave device. In this case, the high-gain mode might be accidentally triggered, causing the main device to perform short-range interactive tasks with the slave device, such as launching a payment application. This could disturb or confuse the user of the main device, causing inconvenience. Similarly, the user of the main device might simply pass by the slave device without any intention to interact, which could also accidentally trigger the slave device's high-gain mode, potentially disturbing the user of the main device as well.
[0105] In one or more embodiments of this specification, by fusing dynamic behavioral features with static parameters, intentional touching can be effectively distinguished from unintentional events such as static placement or rapid passing, thereby improving communication accuracy, reducing false triggering rates, and enhancing user experience. Furthermore, high-performance mode is only activated when the user demonstrates a clear interaction intent, avoiding excessive device response to static environments, improving the naturalness of interaction and psychological security, which aligns better with the product concept of contactless payment. Moreover, security determination is upgraded from location-based matching to behavior-based matching; even if the main device briefly enters the safe distance (e.g., is passed by someone else), communication is not triggered due to the lack of sustained proximity characteristics, enhancing anti-spying and anti-accidental touch capabilities.
[0106] In practical applications, the slave device can be an active device, which may have a module capable of distance detection, or it may obtain distance information from the master device to switch modes. Optionally, obtaining the distance information with the master device may include: determining the distance information with the master device based on the detection information detected by the sensor components; the sensor components include at least one of a distance sensor, an accelerometer, and a camera. Alternatively, obtain the distance information sent by the master device.
[0107] In this context, sensor components can represent a collection of environmental perception hardware modules integrated into the device. Distance sensors, such as infrared ranging (triangulation), time-of-flight (TOF), and lidar (LiDAR), measure physical distance and provide numerical distance values. Accelerometers, like accelerometers, calculate displacement changes through acceleration integration and indirectly estimate the current distance by combining this with an initial distance. Cameras, representing optical imaging sensors, can convert pixel-level data into physical distance using computer vision algorithms (such as object detection and monocular depth estimation), making them suitable for slave devices with image processing capabilities.
[0108] Slave devices can also obtain distance information from master devices. For example, slave devices can receive and parse distance data actively reported by master devices through short-range communication methods such as NFC radio frequency links or Bluetooth. This data can be measured by the distance measurement module on the master device.
[0109] The slave device can determine the distance between itself and the master device based on the distance information it measures, or it can determine the distance between the two based on the distance information obtained from the master device, or it can determine the distance between the two based on the distance information it measures and the distance information obtained from the master device.
[0110] To further improve the accuracy of distance perception and communication, the aforementioned detection information may optionally include detection information detected by multiple sensor components.
[0111] The aforementioned determination of the distance information with respect to the main device may include: performing multimodal perception fusion on the detection information detected by multiple sensor components to determine the distance information with respect to the main device.
[0112] Among them, multiple sensor components refer to at least two types of sensors with different principles, such as a combination of a distance sensor and an accelerometer, a combination of a distance sensor and a camera, or a combination of all three.
[0113] Detection information can represent the output or preprocessed data of various sensors. For example, a distance sensor can provide information such as time-of-flight (TOF) values and analog voltage; an accelerometer can provide information such as triaxial acceleration sequences; and a camera can provide information such as image frames, target detection box coordinates, and pixel scale. Detection information can include detection information acquired from the device itself, or it can include information acquired by the main device.
[0114] Multimodal perception fusion refers to an intelligent processing method that transforms heterogeneous detection information into a single optimized distance estimate through algorithms such as spatiotemporal alignment, dynamic confidence weighting, and error compensation. Multimodal perception fusion can be implemented through a pre-set rule engine, a pre-trained computer model, or a generative model; the specific implementation is not limited here.
[0115] For example, the distance can be evaluated separately using data detected by each sensor component, and then the uncertainty or confidence weights of each evaluated distance can be applied to finally output the fused distance.
[0116] For example, multi-source data can be synchronized and preprocessed first. Specifically, time alignment can be performed first, followed by mode conversion, and quality screening can also be carried out. Time alignment can be based on the system clock, interpolating or aligning asynchronously acquired sensor data to ensure all data corresponds to the same physical moment. Mode conversion can output distance values after temperature / ambient light compensation of the raw TOF values from the distance sensor, or the three-axis acceleration sequence from the accelerometer can be zero-biased, low-pass filtered, and combined with the initial distance integral to generate displacement change and output dynamic distance estimates. Alternatively, the camera image can be used to identify the outline of the main device through a target detection model and converted into visual distance based on pixel scale and pre-stored calibration parameters. Initial quality screening can remove obvious outliers, such as negative distance sensor outputs or camera target confidence scores less than 30%.
[0117] Then, the confidence scores for each single source are evaluated, allowing for the generation of independent real-time confidence scores for the distance estimates from each sensor. For example, for distance sensors, confidence scores can be determined based on signal strength (RSSI), ambient light intensity (if optical), and historical data volatility. Similarly, for accelerometers, confidence scores can be determined based on motion continuity (e.g., the rate of change of acceleration between adjacent frames) and integration duration (e.g., longer durations indicate higher drift risk). For cameras, confidence scores can be determined based on image sharpness (e.g., gradient variance), target detection confidence, and lighting condition scores. Furthermore, the weighting bias can be dynamically adjusted by incorporating the current interaction state (e.g., whether the system is in the process of determining proximity) (e.g., increasing the confidence score of the accelerometer when proximity is determined).
[0118] Next, weighted fusion and result generation are performed. Specifically, weight normalization can be performed first, normalizing the confidence scores of each sensor into weight coefficients, with lower confidence scores having smaller weights. Then, fusion calculation is performed, which can be done using a weighted median method, such as sorting the distance estimates of each sensor by weight and taking the value where the cumulative weight reaches 50% as the fusion result; alternatively, if the confidence scores of all sensors are relatively high, a weighted average method can be used to further smooth the result. Finally, the fused result is obtained.
[0119] To improve accuracy, abnormal data can be eliminated. For example, if the relative deviation between the distance estimate of a certain sensor and the fusion result is large, the data of that sensor can be removed and the distance can be recalculated based on the data of other sensors.
[0120] In one or more embodiments of this specification, by introducing intelligent sensing and dynamic control mechanisms from the device side, the inherent defects of traditional distance limitation schemes are effectively overcome, and the synergistic optimization of security and user experience is achieved.
[0121] This specification, in one or more embodiments, can be applied to slave devices with active load modulation capabilities. Compared to passive solutions, which are highly sensitive to reader performance, active tags can detect reader signal strength in real time. For devices with poor reader performance, they can automatically improve receiving sensitivity and modulation depth. It does not rely on physical antenna size limitations, maintains a reasonable antenna size to ensure close-range coupling efficiency, and achieves long-range suppression through software-adjustable transmit and receive parameters (rather than hardware attenuation), balancing communication stability and security boundaries.
[0122] In one or more embodiments of this specification, an intent-aware mechanism is introduced. This mechanism combines signal strength and distance estimation for dual judgment, enabling full-function response (high-gain mode) when the user actually touches the device (near distance, stable signal strength); and actively desensitizing long-distance probing signals (low-gain mode) to reduce the probability of false triggering. Closed-loop dynamic control can be implemented throughout the entire communication process, not only judging during the initialization phase but also continuously monitoring and adjusting parameters throughout the entire communication link, adapting to dynamic scenarios such as mobile phone movement and posture changes.
[0123] In one or more embodiments of this specification, long-distance reading exceeding a preset safety distance can be effectively suppressed, preventing attacks such as wireless skimming and information theft, and meeting the needs of high-security scenarios such as payment. It maintains a high recognition success rate for various mobile phones (including low-power models), outperforming fixed small antenna or weak passive tag solutions. Furthermore, it does not rely on specific reader performance, adapting to the differences in NFC performance of mainstream Android or iOS devices, providing a consistent user experience. Additionally, in one or more embodiments of this specification, it primarily relies on software control, allowing communication thresholds (such as field strength threshold and maximum allowable distance) to be updated and adjusted through configuration or OTA (Over-the-Air Technology), supporting different application scenarios and communication security requirements.
[0124] The control methods in one or more embodiments of this specification can be deployed on the tag (from the device side), with zero intrusion into the existing NFC ecosystem. All intelligent logic runs inside the tag device, without requiring modification to the operating system, card reader firmware, or communication protocol of the main device such as a mobile phone. It can be seamlessly integrated into the existing NFC application ecosystem and has high practicality.
[0125] The various technical features in the above embodiments can be combined arbitrarily, as long as there is no conflict or contradiction between the combinations of features. However, due to space limitations, they have not been described one by one. Therefore, the arbitrary combination of various technical features in the above embodiments is also within the scope of this specification.
[0126] Based on the same idea, this specification also provides near-field communication modules corresponding to the above methods in its embodiments. Figure 4This is a schematic diagram of a near-field communication module provided in one embodiment of this specification. This module can be applied to a slave device in near-field communication.
[0127] like Figure 4 As shown, module 400 may include a status information detection module 402, a control module 404, and a gain module 406. The control module 404 is connected to both the status information detection module 402 and the gain module 406. The status information detection module 402 can acquire interactive status information generated under the action of the master device and send it to the control module 404. The control module 404 can determine whether the master device meets preset conditions based on the interactive status information acquired by the status information detection module, and control the gain mode of the gain module 406 based on the determination result. The gain module 406 can respond to the control module 404 by setting a first gain mode when the master device meets the preset conditions and a second gain mode when the master device does not meet the preset conditions; the communication performance of the slave device in the first gain mode is higher than that in the second gain mode.
[0128] like Figure 4 As shown, the control module 404 can be a different control module from the device control module 204 of the slave device 200. The two can be connected via a communication bus or I / O interface. The device control module 204, as the control core of the entire slave device, can control various functions of the slave device. For example, it can act as an NFC tag chip, controlling communication with the master device, or controlling the tag data sent after establishing communication with the master device. The device control module 204 can also control the control module 404, such as controlling whether it is in a working state, sending data to the control module 404, or acquiring data from the control module 404. The status information detection module 402 can be connected to the control module 404, or the status information detection module 402 can be connected to the device control module 204. The device control module 204 can provide the information detected by the status information detection module 402 to the control module 404, so that the control module 404 can control the slave device to be in low-gain mode or high-gain mode. In practical applications, the device control module 204 and the control module 404 can also be the same control module, such as the same MCU, as long as it can control the slave device.
[0129] like Figure 4 As shown, the master device 100 may include a card reader antenna 102 and a card reader control unit 104, and the slave device 200 and the master device may interact with each other via near-field electromagnetic coupling.
[0130] Optional, such as Figure 4As shown, the status information detection module 402 may include at least one of a signal strength detection unit 4022 and a distance detection unit 4024; the signal strength detection unit is used to detect the signal strength of the radio frequency signal of the master device; the distance detection unit is used to detect the distance between the master device and the master device.
[0131] The signal strength detection unit 4022 can be connected to the near-field antenna 202 of the slave device 200 to acquire the field signal emitted by the master device, also known as the radio frequency signal. The signal strength detection unit 4022 can convert the detected field signal into a voltage or current signal and provide it to the control module 404 so that the control module 404 can control the gain mode of the slave device based on the signal strength.
[0132] The distance detection unit 4024 can be connected to the device control module of the slave device. The device control module can provide the detection signal output by the distance detection unit to the control module of the module, so that the control module can adjust the gain mode of the slave device. Alternatively, the distance detection unit 4024 can be connected to the control module of the module, eliminating the need for the device control module to forward the signal.
[0133] In practical applications, the status information detection module 402 can also include detection units that perform detection through other methods, such as a detection unit for Bluetooth signals or a detection unit for thermal energy. It can determine whether an active master device is approaching based on whether a Bluetooth signal is acquired or a thermal signal is detected, rather than simply the approach of an NFC tag. Once the attached object is determined to be a master device, the slave device then switches its gain mode. Alternatively, the distance between the master and slave devices can be assessed based on factors such as the strength of the Bluetooth signal and the intensity of thermal energy.
[0134] Gain module 406 can represent a module that performs gain processing on signals received or transmitted by the slave device, and can be used to adjust the signal strength of the transmitted or received signals, etc. In one or more embodiments of this specification, the signal receiving link of the slave device can be adjusted to adjust the signal sensitivity of the slave device, or the signal transmitting link of the slave device can be adjusted to adjust the gain mode of the slave device. Optionally, gain module 406 includes at least one of a receive control unit 4062 and a transmit control unit 4064. The receive control unit 4062 can be used to adjust the receive sensitivity of the slave device; the transmit control unit 4064 can be used to adjust the modulation depth of the response modulation signal.
[0135] The receiving control unit 4062 may include a signal amplifier, which amplifies the field signal received by the near-field antenna of the slave device, thereby triggering the slave device's control unit to perform corresponding actions, such as responding to the field signal emitted by the master device or sending tag information according to the communication protocol. The signal amplifier can be connected in series between the near-field antenna and the control unit; specific connection methods can be found in the circuit connection diagrams of existing tag devices, and will not be elaborated here. By adjusting the amplification factor of the signal amplifier, the sensing range of the slave device can be adjusted. For example, a larger amplification factor results in a larger sensing range and higher sensitivity, while a smaller amplification factor results in a smaller sensing range and lower sensitivity, thus allowing for selective communication with the master device.
[0136] The slave device can be a device with source modulation capability, which can actively emit radio frequency signals to promote communication stability between the master and slave devices. The transmit control unit 4064 can be a control unit for controlling the signal parameters of the transmitted response modulation signal, and can be used to control the signal phase and / or amplitude of the response modulation signal. For example, the transmit control unit can be connected to the signal generation circuit that generates the response modulation signal, thereby controlling the generated response modulation signal. For example, for a master device in low-power LPCD mode, it needs to exit low-power mode before communicating with the slave device. The response modulation signal sent by the slave device can act as an excitation signal or load modulation signal to affect the amplitude of the field strength change on the master device side, thereby prompting the master device to exit low-power mode and communicate with the slave device as soon as possible. The specific modulation process can be found in related technologies and will not be elaborated here.
[0137] For ease of description, the above modules are described separately according to their functions, divided into various modules or units. Of course, when implementing one or more of this specification, the functions of each module or unit can be implemented in the same or different software and / or hardware, or a module that performs the same function can be implemented by a combination of multiple sub-modules or sub-units, etc. The device embodiments described above are merely illustrative. For example, the division of units is only a logical functional division; in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed.
[0138] The above is an illustrative scheme of a near-field communication module according to this embodiment. It should be noted that the technical solution of this near-field communication module and the technical solution of the near-field communication method described above belong to the same concept. For details not described in detail in the technical solution of this near-field communication module, please refer to the description of the technical solution of the near-field communication method described above.
[0139] Based on the same idea, embodiments of this specification also provide apparatus corresponding to the above methods. Figure 5This is a schematic diagram of a near-field communication device provided in one embodiment of this specification.
[0140] like Figure 5 As shown, the device may include: The information acquisition module 502 is used to acquire the interactive status information generated under the action of the main device.
[0141] The condition judgment module 504 is used to determine whether the master device meets a preset condition based on the interaction state information; the preset condition is a condition indicating that the master device has the intention to conduct near-field communication with the slave device.
[0142] The first gain module 506 is used to set the slave device to the first gain mode if the preset conditions are met. The second gain module 508 is used to set the slave device to a second gain mode if the preset conditions are not met; the communication performance of the slave device in the first gain mode is higher than that of the slave device in the second gain mode.
[0143] It is understood that the modules mentioned above refer to computer programs or program segments used to perform one or more specific functions. Furthermore, the distinction between these modules does not imply that the actual program code must also be separate.
[0144] For ease of description, the above devices are described by dividing them into various modules or units based on their functions. Of course, when implementing one or more of these specifications, the functions of each module or unit can be implemented in the same or different software and / or hardware, or a module that performs the same function can be implemented by a combination of multiple sub-modules or sub-units, etc. The device embodiments described above are merely illustrative. For example, the division of units is only a logical functional division; in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed.
[0145] The above is an illustrative scheme of a near-field communication device according to this embodiment. It should be noted that the technical solution of this near-field communication device and the technical solution of the near-field communication method described above belong to the same concept. For details not described in detail in the technical solution of the near-field communication device, please refer to the description of the technical solution of the near-field communication method described above.
[0146] Based on the same idea, this specification also provides devices corresponding to the above methods in its embodiments.
[0147] Figure 6 A structural block diagram of a computing device 600 provided according to one embodiment of this specification is shown.
[0148] The computing device 600 includes: Memory 610 and processor 620; The memory 610 is used to store computer programs / instructions, and the processor 620 is used to execute the computer programs / instructions, which, when executed by the processor 620, implement the steps of the above-described near-field communication method.
[0149] Specifically, the components of the computing device 600 include, but are not limited to, a memory 610 and a processor 620. The processor 620 is connected to the memory 610 via a bus 630, and the database 650 is used to store data.
[0150] The computing device 600 also includes an access device 640, which enables the computing device 600 to communicate via one or more networks 660. Examples of these networks include Public Switched Telephone Network (PSTN), Local Area Network (LAN), Wide Area Network (WAN), Personal Area Network (PAN), or combinations of communication networks such as the Internet. The access device 640 may include one or more of any type of wired or wireless network interface (e.g., a network interface card (NIC)), such as an IEEE 802.11 Wireless Local Area Network (WLAN) wireless interface, a Wi-MAX (Worldwide Interoperability for Microwave Access) interface, an Ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a Bluetooth interface, a Near Field Communication (NFC) interface, and so on.
[0151] In one embodiment of this specification, the above-described components of the computing device 600 and Figure 6 Other components, not shown, can also be connected to each other, for example, via a bus. It should be understood that... Figure 6 The block diagram of the computing device shown is for illustrative purposes only and is not intended to limit the scope of this application. Those skilled in the art can add or replace other components as needed.
[0152] The computing device 600 can be any type of stationary or mobile computing device, including mobile computers or mobile computing devices (e.g., tablet computers, personal digital assistants, laptop computers, notebook computers, netbooks, etc.), mobile phones (e.g., smartphones), wearable computing devices (e.g., smartwatches, smart glasses, etc.) or other types of mobile devices, or stationary computing devices such as desktop computers or personal computers (PCs). The computing device 600 can also be a mobile or stationary server.
[0153] The processor 620 executes the computer instructions to implement the steps of the above-described near-field communication method.
[0154] The above is an illustrative scheme of a computing device according to this embodiment. It should be noted that the technical solution of this computing device and the technical solution of the near-field communication method described above belong to the same concept. For details not described in detail in the technical solution of the computing device, please refer to the description of the technical solution of the near-field communication method described above.
[0155] An embodiment of this specification also provides a computer-readable storage medium storing computer instructions that, when executed by a processor, implement the steps of the above-described near-field communication method.
[0156] The above is an illustrative scheme of a computer-readable storage medium according to this embodiment. It should be noted that the technical solution of this storage medium and the technical solution of the near-field communication method described above belong to the same concept. For details not described in detail in the technical solution of the storage medium, please refer to the description of the technical solution of the near-field communication method described above.
[0157] An embodiment of this specification also provides a computer program product, including a computer program / instructions that, when executed by a processor, implement the steps of the above-described near-field communication method.
[0158] The above is an illustrative scheme of a computer program product according to this embodiment. It should be noted that the technical solution of this computer program product and the technical solution of the above-described near-field communication method belong to the same concept. For details not described in detail in the technical solution of the computer program product, please refer to the description of the technical solution of the above-described near-field communication method.
[0159] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, for the module, device, and equipment embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiments. The modules, devices, equipment, and methods provided in the embodiments of this specification correspond to each other, and therefore the modules, devices, and equipment also have similar beneficial technical effects as the corresponding methods. Since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the corresponding modules, devices, and equipment will not be repeated here.
[0160] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.
[0161] In the 1990s, improvements to a technology could be clearly distinguished as either hardware improvements (e.g., improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to methodology). However, with technological advancements, many methodological improvements today can be considered direct improvements to hardware circuit structures. Designers almost always obtain the corresponding hardware circuit structure by programming the improved methodology into the hardware circuit. Therefore, it cannot be said that a methodological improvement cannot be implemented using hardware physical modules. For example, a Programmable Logic Device (PLD) (such as a Field Programmable Gate Array (FPGA)) is such an integrated circuit whose logic function is determined by the user programming the device. Designers can program a digital system themselves to "integrate" it onto a PLD, without needing chip manufacturers to design and manufacture dedicated integrated circuit chips. Furthermore, nowadays, instead of manually manufacturing integrated circuit chips, this programming is mostly implemented using "logic compiler" software. Similar to the software compiler used in program development, the original code before compilation must also be written in a specific programming language, called a Hardware Description Language (HDL). There are many HDLs, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, and RHDL (Ruby Hardware Description Language). Currently, the most commonly used are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also understand that by simply performing some logic programming on the method flow using one of these hardware description languages and programming it into an integrated circuit, the hardware circuit implementing the logical method flow can be easily obtained.
[0162] The controller can be implemented in any suitable manner. For example, it can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro)processor, logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicon Labs C8051F320. A memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art will also recognize that, in addition to implementing the controller in purely computer-readable program code form, the same functionality can be achieved by logically programming the method steps to make the controller take the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers. Therefore, such a controller can be considered a hardware component, and the means included therein for implementing various functions can also be considered as structures within the hardware component. Alternatively, the means for implementing various functions can be considered as both software modules implementing the method and structures within the hardware component.
[0163] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, a computer can be, for example, a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email device, game console, tablet computer, wearable device, or any combination of these devices.
[0164] For ease of description, the above devices are described separately by function as various units. Of course, in implementing this application, the functions of each unit can be implemented in one or more software and / or hardware.
[0165] Those skilled in the art will understand that one or more embodiments of this specification can be provided as a method, system, or computer program product. Therefore, the invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0166] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0167] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0168] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0169] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0170] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0171] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital character versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0172] This application can be described in the general context of computer-executable instructions, such as program modules, that are executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform a specific task or implement a specific abstract data type. This application can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.
[0173] The above description is merely an embodiment of this application and is not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A near-field communication method, applied to a slave device in near-field communication, comprising: Obtain the interaction state information generated under the action of the main device; Based on the interaction status information, determine whether the master device meets the preset conditions; The preset condition is a condition indicating that the master device has the intention to conduct near-field communication with the slave device; If the preset conditions are met, the slave device is set to the first gain mode; wherein, the value of the preset strength is determined based on the preset safe interaction distance. If the signal strength of the radio frequency signal of the master device is greater than or equal to the preset strength, or if the distance between the master device and the slave device is less than or equal to the preset safe interaction distance, it indicates that the master device has the intention to communicate, and the slave device is set to the first gain mode. If the preset conditions are not met, the slave device is set to the second gain mode; wherein, if the RF signal strength of the master device is less than the preset strength and the distance between the master device and the slave device is greater than the preset safe interaction distance, it indicates that the master device does not have the intention to communicate, and the slave device is set to the second gain mode; the communication performance of the slave device in the first gain mode is higher than that in the second gain mode; the communication performance represents the set of physical layer RF parameters of the slave device that affect the effective range and interaction reliability of the near-field electromagnetic coupling link, and the level of the communication performance reflects the degree of contribution of the parameter values to the quality of the communication link, which determines the signal interaction quality between the master and slave devices.
2. The method according to claim 1, wherein the preset conditions include at least one of the following: The signal strength of the acquired radio frequency signal of the main device is greater than or equal to a preset strength; The preset intensity is an intensity threshold set based on a preset safe interaction distance; The distance between the slave device and the master device is less than or equal to a preset distance; The slave device receives a command message from the master device confirming the commencement of near-field communication; Within a preset range, the master device is gradually moving closer to the slave device.
3. The method according to claim 2, wherein the preset strength is determined by statistically analyzing the signal strengths of multiple radio frequency signals acquired by the slave device when multiple master devices are at a preset safe distance.
4. The method according to claim 1, wherein obtaining the interaction state information generated under the action of the master device includes: Acquire the radio frequency signal emitted by the master device; The step of determining whether the master device meets the preset conditions based on the interaction state information includes: Determine whether the signal strength of the radio frequency signal is greater than or equal to a preset strength; If the strength is greater than or equal to the preset strength, then the main device is determined to meet the preset condition; If the strength is less than the preset strength, then the main device is determined not to meet the preset conditions.
5. The method according to claim 4, wherein obtaining the interaction state information generated under the action of the master device further includes: Obtain distance information from the master device; The step of determining whether the master device meets the preset conditions based on the interaction state information further includes: Based on the distance information, determine whether the distance between the device and the main device is less than or equal to a preset distance; If the distance is less than or equal to the preset distance, then the main device is determined to meet the preset conditions; If the strength is less than the preset strength, then the main device is determined not to meet the preset condition, including: If the signal strength is less than the preset strength and the distance is greater than the preset distance, then it is determined that the master device does not meet the preset conditions.
6. The method according to claim 5, wherein determining whether the master device meets the preset conditions based on the interaction state information further includes: Determine whether the master device is gradually approaching the slave device; If the distance is less than or equal to a preset distance, then the main device is determined to meet the preset condition, including: If the distance is less than or equal to the preset distance, and the master device is gradually approaching the slave device, then the master device is determined to meet the preset condition.
7. The method according to claim 5, wherein obtaining the distance information between the device and the master device comprises: Based on the detection information detected by the sensor components, the distance information between the device and the master device is determined; The sensor assembly includes at least one of a distance sensor, an acceleration sensor, and a camera; Alternatively, obtain the distance information sent by the master device.
8. The method according to claim 7, wherein the detection information includes detection information detected by multiple sensor components; The determination of the distance information between the device and the master device includes: By fusing detection information from multiple sensor components into multimodal perception data, the distance information between the device and the main device can be determined.
9. The method according to claim 1, wherein the communication performance includes at least one of receiving sensitivity and modulation depth of the response modulation signal.
10. The method according to claim 9, wherein if the communication performance includes receiving sensitivity, the amplification factor of the signal amplifier of the slave device in the first gain mode is greater than the amplification factor in the second gain mode; If the communication performance includes the modulation depth of the response modulation signal, the amplitude of the response modulation signal provided by the slave device in the first gain mode is greater than the amplitude of the response modulation signal in the second gain mode, and / or, the absolute value of the phase difference between the response modulation signal and the master device carrier in the first gain mode is greater than the absolute value of the phase difference in the second gain mode.
11. A near-field communication module, used as a slave device in near-field communication, the module comprising: Status information detection module, control module, gain module; The control module is connected to the status information detection module and the gain module; The status information detection module is used to acquire the interactive status information generated under the action of the main device and send it to the control module; The control module is used to determine whether the master device meets the preset conditions based on the interaction status information obtained by the status information detection module, and to control the gain mode of the gain module based on the determination result. The gain module is configured to respond to the control module by setting the master device to a first gain mode when the master device meets preset conditions, and setting it to a second gain mode when the master device does not meet preset conditions. The communication performance of the slave device in the first gain mode is higher than that in the second gain mode. A preset strength value is determined based on a preset safe interaction distance. If the signal strength of the master device's radio frequency signal is greater than or equal to the preset strength, or if the distance between the master device and the slave device is less than or equal to the preset safe interaction distance, it indicates that the master device has a communication intention, and the slave device is set to the first gain mode. If the radio frequency signal strength of the master device is less than the preset strength and the distance between the master device and the slave device is greater than the preset safe interaction distance, it indicates that the master device does not have a communication intention, and the slave device is set to the second gain mode. The communication performance represents the set of physical layer radio frequency parameters that affect the effective range and interaction reliability of the near-field electromagnetic coupling link. The level of communication performance reflects the contribution of parameter values to the quality of the communication link, determining the signal interaction quality between the master and slave devices.
12. The near-field communication module according to claim 11, wherein the status information detection module includes at least one of a signal strength detection unit and a distance detection unit; the signal strength detection unit is used to detect the signal strength of the radio frequency signal of the master device; and the distance detection unit is used to detect the distance between the master device and the master device.
13. The near-field communication module according to claim 11, wherein the gain module includes at least one of a receiving control unit and a transmitting control unit; the receiving control unit is used to adjust the receiving sensitivity of the slave device; and the transmitting control unit is used to adjust the modulation depth of the response modulation signal.
14. A near-field communication slave device, the slave device being used to perform the method of any one of claims 1 to 10, or the slave device comprising a near-field communication module of any one of claims 11 to 13.
15. A computing device, comprising: Memory and processor; The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions, which, when executed by the processor, implement the steps of the method according to any one of claims 1 to 10.
Citation Information
Patent Citations
Data interaction method, device and equipment
CN108811178A
Card reading method and device for entering school and leaving school and computer storage medium
CN112419527A
Ultra-low power consumption electronic tag and control method
CN114519409A
Communication device, chip and equipment
CN118133869A
Bluetooth field intensity calibration method and device, computer equipment and readable storage medium
CN119450421A