NFC alignment method, NFC control terminal and storage medium

By acquiring tag information and field strength change information from NFC passive electronic locks and updating movement indication information, the problem of NFC alignment relying on user experience is solved, achieving higher alignment accuracy and efficiency.

CN116647808BActive Publication Date: 2026-06-12SHENZHEN KAICONN INNOVATIVE TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHENZHEN KAICONN INNOVATIVE TECH CO LTD
Filing Date
2023-06-26
Publication Date
2026-06-12

AI Technical Summary

Technical Problem

In existing technologies, the alignment of the NFC control terminal and the NFC passive electronic lock relies on the user's experience, resulting in low alignment accuracy.

Method used

The NFC control terminal acquires the NFC tag information, position change information, and field strength change information of the NFC passive electronic lock, updates the movement indication information to indicate the movement of the terminal until the preset field strength threshold is reached, and achieves precise alignment.

🎯Benefits of technology

It improves the accuracy and efficiency of NFC alignment and reduces reliance on user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116647808B_ABST
    Figure CN116647808B_ABST
Patent Text Reader

Abstract

The application discloses a NFC alignment method, a NFC control terminal and a storage medium; the method is applied to the NFC control terminal, and comprises the following steps: establishing a near field communication connection with a NFC passive electronic lock, and generating a magnetic field through the NFC control terminal; acquiring NFC tag information; acquiring first field strength information; when the first field strength information is smaller than a preset field strength threshold, outputting movement instruction information to prompt moving the NFC control terminal; acquiring position change information and second field strength information of the position after the NFC control terminal is moved; if the second field strength information is smaller than the preset field strength threshold, acquiring field strength change information according to the first field strength information and the second field strength information; updating the movement instruction information according to the NFC tag information, the position change information and the field strength change information, returning to the step of acquiring the first field strength information, and ending the NFC alignment when the second field strength information is not smaller than the preset field strength threshold. The application is beneficial to improving the accuracy of the NFC alignment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of near-field communication technology, specifically to an NFC alignment method, an NFC control terminal, and a storage medium. Background Technology

[0002] With the development of Near Field Communication (NFC) technology, the application of NFC-based passive tags is becoming increasingly widespread. NFC-based passive tags can collect energy from the electromagnetic field emitted by an NFC control terminal, requiring no external power supply. For example, an NFC passive electronic lock can collect energy from the electromagnetic field emitted by an NFC control terminal (such as an NFC-enabled smartphone or smartwatch) to drive a motor, thereby unlocking the lock.

[0003] When controlling an NFC passive electronic lock using an NFC control terminal, the NFC passive electronic lock needs to acquire sufficient energy to achieve the power required for control. Therefore, alignment between the NFC control terminal and the NFC passive electronic lock is necessary. In existing technologies, the alignment between the NFC control terminal and the NFC passive electronic lock relies on the user's experience; that is, the user determines the appropriate position based on their usage experience, which is not conducive to improving the accuracy of NFC alignment. Summary of the Invention

[0004] This invention provides an NFC alignment method, an NFC control terminal, and a storage medium. During the NFC alignment process, the corresponding movement indication information can be updated based on NFC tag information, position change information, and field strength change information, thereby indicating the movement of the NFC control terminal and improving the accuracy of NFC alignment.

[0005] This invention provides an NFC alignment method for use in an NFC control terminal, the method comprising:

[0006] Establish a near-field communication connection with the NFC passive electronic lock and generate a magnetic field through the NFC control terminal;

[0007] Obtain the NFC tag information of the NFC passive electronic lock;

[0008] Acquire the first field strength information, wherein the first field strength information is the magnetic field strength sensed by the NFC passive electronic lock when the NFC control terminal is at the current location;

[0009] When the first field strength information is less than the preset field strength threshold, the NFC control terminal outputs movement indication information to prompt the NFC control terminal to move.

[0010] If the NFC control terminal moves, it acquires position change information and second field strength information at the new position, wherein the second field strength information is the magnetic field strength sensed by the NFC passive electronic lock when the NFC control terminal is at the new position.

[0011] When the second field strength information is less than the preset field strength threshold, field strength change information is obtained based on the first field strength information and the second field strength information;

[0012] The movement indication information is updated based on the NFC tag information, the location change information, and the field strength change information, and the process returns to the step of obtaining the first field strength information until the second field strength information is not less than the preset field strength threshold, at which point the NFC alignment ends.

[0013] In some optional embodiments, the location change information is obtained via a gyroscope in the NFC control terminal.

[0014] In some optional embodiments, if the NFC control terminal moves, acquiring location change information and second field strength information at the new location includes:

[0015] Obtain the first location information of the NFC control terminal at its current location;

[0016] If the NFC control terminal moves, obtain the second position information and the second field strength information of the NFC control terminal at the new position after the movement;

[0017] The location change information is obtained based on the first location information and the second location information.

[0018] In some optional embodiments, updating the movement indication information based on the NFC tag information, the location change information, and the field strength change information includes:

[0019] Based on the NFC tag information, the location change information, and the field strength change information, target indication information is obtained through a preset motion indication data table or a trained motion indication model, and the target indication information is used as the updated motion indication information.

[0020] In some optional embodiments, the movement indication model is trained according to the following steps:

[0021] The training NFC tag information, training position change information, and training field strength change information in the training data are input into the motion indication model to obtain the training indication information output by the motion indication model. The training data includes multiple sets of training information, and each set of training information includes training NFC tag information, training position change information, training field strength change information, and annotation indication information.

[0022] Based on the training instruction information and the labeling instruction information, the model parameters of the motion indication model are adjusted, and the steps of inputting the training NFC tag information, training position change information and training field strength change information from the training data into the motion indication model are continued until the preset training conditions are met to obtain the trained motion indication model.

[0023] In some optional embodiments, the method further includes:

[0024] Obtain the battery information corresponding to the NFC passive electronic lock;

[0025] The battery information is output to the target object through the visual interface of the NFC control terminal.

[0026] In some optional embodiments, the method further includes:

[0027] When the battery level exceeds a preset threshold, the NFC control terminal outputs a charging completion notification to the target object.

[0028] In some optional embodiments, the method further includes:

[0029] Obtain the module control instructions input by the target object;

[0030] The NFC control terminal sends a module control command to the NFC passive electronic lock to trigger the NFC passive electronic lock to adjust the module power supply status according to the module control command.

[0031] Accordingly, embodiments of the present invention provide an NFC control terminal, including a memory and a processor; the memory stores an application program, and the processor is used to run the application program in the memory to execute the steps in any of the NFC alignment methods provided in the embodiments of the present invention.

[0032] Accordingly, embodiments of the present invention also provide a computer-readable storage medium storing a plurality of instructions adapted for loading by a processor to execute steps in any of the NFC pairing methods provided in embodiments of the present invention.

[0033] Furthermore, embodiments of the present invention also provide a computer program product, including a computer program or instructions, which, when executed by a processor, implement the steps in any of the NFC pairing methods provided in the embodiments of the present invention.

[0034] According to the scheme of this embodiment of the invention, the NFC control terminal can establish a near-field communication connection with the NFC passive electronic lock, generate a magnetic field through the NFC control terminal; acquire the NFC tag information of the NFC passive electronic lock; acquire first field strength information, wherein the first field strength information is the magnetic field strength sensed by the NFC passive electronic lock when the NFC control terminal is at its current position; when the first field strength information is less than a preset field strength threshold, the NFC control terminal outputs movement indication information to prompt the NFC control terminal to move; if the NFC control terminal moves, acquire position change information and second field strength information at the moved position, wherein the second field strength information is the magnetic field strength sensed by the NFC passive electronic lock at the moved position; when the second field strength information is less than the preset field strength threshold, acquire field strength change information based on the first field strength information and the second field strength information; update the movement indication information based on the NFC tag information, the position change information, and the field strength change information, and return to execute the step of acquiring the first field strength information, until the second field strength information is not less than the preset field strength threshold, at which point the current NFC alignment ends.

[0035] In this embodiment of the invention, the placement of the NFC control terminal does not solely depend on the user's experience. Instead, it updates the corresponding movement indication information based on NFC tag information, position change information, and field strength change information. The movement of the NFC control terminal is then indicated based on the movement indication information to determine the final precise alignment position, which helps improve the accuracy of NFC alignment. Attached Figure Description

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

[0037] Figure 1 This is a flowchart of the NFC alignment method provided in an embodiment of the present invention;

[0038] Figure 2 This is a schematic diagram of the structure of the NFC control terminal provided in an embodiment of the present invention;

[0039] Figure 3This is a schematic diagram of the structure of the electronic device provided in an embodiment of the present invention. Detailed Implementation

[0040] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0041] This invention provides an NFC alignment method, an NFC control terminal, and a computer-readable storage medium. Specifically, this invention provides an NFC alignment method suitable for an NFC control terminal, which can be integrated into an electronic device.

[0042] This electronic device can be a terminal device, such as a smartphone, smartwatch, tablet, laptop, or smart car.

[0043] The following sections provide detailed descriptions of each example. It should be noted that the order in which the embodiments are described is not intended to limit the preferred order of the embodiments.

[0044] This invention provides an NFC positioning method applied to an NFC control terminal to achieve accurate positioning between the NFC control terminal and an NFC passive electronic lock (or its NFC tag), thereby improving the accuracy and efficiency of NFC positioning. Specifically, this embodiment will be described from the perspective of the NFC control terminal, such as... Figure 1 As shown, the specific process of the NFC alignment method in this embodiment can be as follows:

[0045] 101. Establish a near-field communication connection with the NFC passive electronic lock and generate a magnetic field through the NFC control terminal.

[0046] Specifically, the NFC control terminal establishes an approach communication connection with the NFC passive electronic lock, generates a magnetic field, and sends it to the NFC passive electronic lock. The NFC passive electronic lock is an NFC device that needs to be controlled by the NFC control terminal. It should be noted that, based on the NFC alignment method provided in this embodiment, alignment between the NFC control terminal and other NFC devices or NFC tags can also be achieved. This embodiment uses an NFC passive electronic lock as an example for specific explanation.

[0047] 102. Obtain the NFC tag information of the NFC passive electronic lock.

[0048] The NFC tag information includes the model information, size information, and shape information of the NFC tag in the NFC passive electronic lock.

[0049] Specifically, the NFC control terminal sends a tag information acquisition command to the NFC passive electronic lock, triggering the NFC passive electronic lock to respond to the command and send its own NFC tag information back to the NFC control terminal. The NFC passive electronic lock contains an NFC tag, and different NFC passive electronic locks may use different NFC tags. Therefore, acquiring the corresponding NFC tag information is beneficial for determining the direction of movement by combining the specific NFC tag's model, size, and shape information, thereby improving the accuracy of the movement indication information and ultimately enhancing the accuracy and efficiency of NFC alignment.

[0050] 103. Obtain the first field strength information, wherein the first field strength information is the magnetic field strength sensed by the NFC passive electronic lock when the NFC control terminal is at the current location.

[0051] It should be noted that the NFC alignment method in this embodiment involves a cyclical step. For each cycle, the current position refers to the position before the NFC control terminal performs the movement action, and the corresponding position after the movement refers to the position after the NFC control terminal performs the movement action. The first and second field strength information are recalculated during each cycle.

[0052] In some optional embodiments, the NFC control terminal sends a first field strength information acquisition command to the NFC passive electronic lock to trigger the NFC passive electronic lock to respond to the first field strength information acquisition command and feed back the first field strength information to the NFC control terminal.

[0053] 104. Determine whether the first field strength information is less than the preset field strength threshold. If yes, proceed to step 105; if no, proceed to step 110.

[0054] 105. The NFC control terminal outputs movement indication information to prompt the NFC control terminal to move.

[0055] The preset field strength threshold is a pre-set critical value for determining whether NFC positioning is complete. It can be set and adjusted according to actual needs and is not specifically limited here. The movement indication information is used to instruct the target object (e.g., a user) to move the NFC control terminal. Specifically, the movement indication information can be displayed and output through the visual interface of the NFC control terminal, or it can be output in the form of voice broadcast by the NFC control terminal, or other output forms, which are not specifically limited here.

[0056] It should be noted that during the first execution of step 105, the movement instruction information is the initial movement instruction information. In subsequent loops, the corresponding movement instruction information is the updated movement instruction information. Before the movement instruction information is updated, the preset (or initial) movement instruction information is directly output; after the movement instruction information is updated, the updated movement instruction information is output. The initial movement instruction information can be set to empty (i.e., the content is empty), random content (e.g., randomly selecting one of moving up, moving down, moving left, or moving right), or preset fixed content (e.g., please make any initial movement, please move up, etc.), without specific limitations.

[0057] In some optional embodiments, the NFC control terminal is a self-moving intelligent mobile device, such as an NFC-enabled drone or autonomous robot. In this case, the NFC control terminal automatically executes the movement action based on the movement instruction information. Alternatively, the NFC control terminal is a mobile device controlled by an operating object (e.g., a user, operator), such as an NFC-enabled smartphone or smartwatch. In this case, the movement instruction information is output to the operating object to trigger the operating object to control the NFC control terminal to execute the corresponding movement action. Specifically, this embodiment uses a smartphone as an example of an NFC control terminal, but this is not intended to be a specific limitation.

[0058] It should be noted that when the first field strength information is not less than the preset field strength threshold, NFC alignment can be directly considered complete.

[0059] 106. If the NFC control terminal moves, it acquires position change information and second field strength information at the new position, wherein the second field strength information is the magnetic field strength sensed by the NFC passive electronic lock when the NFC control terminal is at the new position.

[0060] The position change information refers to the change in position of the NFC control terminal before and after performing a movement action. In some optional embodiments, the position change information can be directly obtained through the gyroscope in the NFC control terminal. Alternatively, when the first field strength information is less than a preset field strength threshold, performing a movement action and obtaining position change information according to the movement indication information includes: obtaining the first position information of the NFC control terminal at its current position; if the NFC control terminal moves, obtaining the second position information and the second field strength information of the NFC control terminal at the position after the movement; and obtaining the position change information based on the first position information and the second position information. The first position information and the second position information can be obtained by a positioning module (e.g., a GPS positioning module) in the NFC control terminal, or based on UWB positioning technology, or other methods, which are not specifically limited here. The position change information may include the direction of movement and the distance of movement, which are also not specifically limited here.

[0061] After the position movement is completed (i.e., the movement action is performed), the second field strength information after the position movement is acquired. In some optional embodiments, the NFC control terminal sends a second field strength information acquisition command to the NFC passive electronic lock to trigger the NFC passive electronic lock to respond to the second field strength information acquisition command and feed back the second field strength information to the NFC control terminal.

[0062] 107. Determine whether the second field strength information is less than the preset field strength threshold. If yes, proceed to step 108; if no, proceed to step 110.

[0063] 108. Obtain field strength change information based on the first field strength information and the second field strength information.

[0064] 109. Update the movement indication information based on the NFC tag information, the location change information, and the field strength change information, and return to step 103.

[0065] 110. End this NFC pairing.

[0066] Specifically, when the second field strength information is less than the preset field strength threshold, field strength change information is obtained based on the first field strength information and the second field strength information. The movement indication information is updated based on the NFC tag information, the position change information and the field strength change information. Then, the process returns to the step of obtaining the first field strength information and subsequent steps until the second field strength information is not less than the preset field strength threshold and NFC alignment is completed.

[0067] It should be noted that when returning from step 109 to step 103, the current second field strength information in step 109 can be directly used as the first field strength information in step 103 of the next loop, thereby reducing the amount of data calculation and improving NFC alignment efficiency. In this embodiment, when executing step 103 in the new loop, the NFC control terminal reacquires the first field strength information to improve the accuracy of NFC alignment.

[0068] The field strength change information reflects the change in the magnetic field strength of the electromagnetic field received by the NFC passive electronic lock after the movement action is performed. It can be obtained by calculating the difference between the second field strength information and the first field strength information, and no specific limitation is made here.

[0069] In some optional embodiments, updating the motion indication information based on the NFC tag information, the location change information, and the field strength change information includes: obtaining target indication information through a preset motion indication data table or a trained motion indication model based on the NFC tag information, the location change information, and the field strength change information, and using the target indication information as the updated motion indication information.

[0070] The preset motion indication data table is a pre-set table used to store the correspondence between NFC tag information, location change information, field strength change information and target indication information. The preset motion indication data table contains associated NFC tag information, location change information, field strength change information and target indication information, so that the corresponding target indication information can be determined by querying the motion indication data table.

[0071] The trained motion indication model is a pre-trained model used to perform calculations based on the input data to obtain the corresponding target indication information. For example, it can be a pre-trained neural network model, and the specific structure of the neural network model is not specifically limited here.

[0072] In some optional embodiments, the motion indication model is trained according to the following steps: Training NFC tag information, training location change information, and training field strength change information from the training data are input into the motion indication model to obtain training indication information output by the motion indication model. The training data includes multiple sets of training information, each set including training NFC tag information, training location change information, training field strength change information, and annotation indication information. Based on the training indication information and the annotation indication information, the model parameters of the motion indication model are adjusted, and the step of inputting the training NFC tag information, training location change information, and training field strength change information from the training data into the motion indication model continues until preset training conditions are met, thus obtaining a trained motion indication model.

[0073] The training data is pre-set data for model training. The preset training conditions may include the number of model iterations reaching a preset iteration threshold, or the loss value between the training indication information and the annotation indication information being less than a preset loss threshold. Other training stopping conditions may also be included, which are not specifically limited here.

[0074] It should be noted that both the target indication information and the movement indication information are information used to instruct the NFC control terminal, and may include information such as movement direction (or movement angle) and movement distance. In some optional embodiments, the movement indication information can be output visually or as audio by the NFC control terminal. For example, when the NFC control terminal is a smartphone, the movement indication information can be displayed on the phone's screen or output via voice, so that the user can move the phone to a suitable location according to the movement indication information.

[0075] In some optional embodiments, the NFC alignment method further includes: obtaining the power information corresponding to the NFC passive electronic lock; and outputting the power information to the target object through the visual interface of the NFC control terminal.

[0076] The target object is the object operated by the NFC control terminal, such as a user using the NFC control terminal. The battery information of the NFC passive electronic lock can be retrieved by the NFC passive electronic lock after the NFC control terminal sends a battery acquisition command to it. The NFC control terminal can display the battery information of the NFC passive electronic lock through its output display interface, allowing the user to promptly know the charging status of the NFC passive electronic lock for user convenience.

[0077] Furthermore, when the battery level exceeds a preset battery threshold, the NFC control terminal outputs a charging completion notification to the target object. This battery threshold is a pre-set minimum battery level required for the NFC passive electronic lock to complete charging; that is, the minimum battery level required for the NFC passive electronic lock to perform its functions (e.g., unlocking). The specific threshold can be set and adjusted according to actual needs and is not limited here. The charging completion notification can be output through the NFC control terminal's display interface, via voice broadcast, or through other methods, which are also not specifically limited here.

[0078] In some optional embodiments, the NFC alignment method further includes: acquiring a module control command input by the target object; and sending the module control command to the NFC passive electronic lock via the NFC control terminal to trigger the NFC passive electronic lock to adjust the module power supply state according to the module control command.

[0079] In one application scenario, the NFC passive electronic lock may include an NFC module (with an NFC tag), an energy storage module, a communication module, a chip, a driver module, and other power-consuming modules (such as a display module, indicator lights, etc.). The NFC control terminal can send a module information acquisition command to the NFC passive electronic lock, causing the NFC passive electronic lock to respond to the command by feeding back its module information to the NFC control terminal. The NFC control terminal can output the module information of the NFC passive electronic lock to a target object through an interactive visual interface, allowing the target object to input module control commands through the interactive visual interface. These module control commands can be used to control the power supply status of each module in the NFC passive electronic lock. Furthermore, the module control commands can also be used to control the working status of each module in the NFC passive electronic lock. For example, when the NFC passive electronic lock has low power, the user can control some modules (such as other power-consuming modules) to shut off power, thereby saving energy to complete the basic functions of the NFC passive electronic lock; or, the user can control the driver module to unlock the lock through module control commands.

[0080] As can be seen from the above, in the embodiment of the present invention, the NFC control terminal can establish a near-field communication connection with the NFC passive electronic lock, generate a magnetic field through the NFC control terminal; obtain the NFC tag information of the NFC passive electronic lock; obtain first field strength information, wherein the first field strength information is the magnetic field strength sensed by the NFC passive electronic lock when the NFC control terminal is at its current position; when the first field strength information is less than a preset field strength threshold, the NFC control terminal outputs movement indication information to prompt the NFC control terminal to move; if the NFC control terminal moves, obtain position change information and second field strength information at the moved position, wherein the second field strength information is the magnetic field strength sensed by the NFC passive electronic lock at the moved position; when the second field strength information is less than the preset field strength threshold, obtain field strength change information based on the first field strength information and the second field strength information; update the movement indication information based on the NFC tag information, the position change information and the field strength change information, and return to execute the step of obtaining the first field strength information until the second field strength information is not less than the preset field strength threshold, at which point the current NFC alignment ends.

[0081] In this embodiment of the invention, the placement of the NFC control terminal does not solely depend on the user's experience. Instead, it updates the corresponding movement indication information based on NFC tag information, position change information, and field strength change information. The movement of the NFC control terminal is then guided according to the movement indication information to determine the final precise alignment position, which helps improve the accuracy and efficiency of NFC alignment.

[0082] To better implement the above methods, this embodiment of the invention also provides an NFC control terminal. The NFC control terminal includes a memory and a processor. The memory stores an application program, and the processor runs the application program in the memory to execute any of the above-described NFC pairing methods. For example, the following steps are performed:

[0083] Establish a near-field communication connection with the NFC passive electronic lock and generate a magnetic field through the NFC control terminal;

[0084] Obtain the NFC tag information of the NFC passive electronic lock;

[0085] Acquire the first field strength information, wherein the first field strength information is the magnetic field strength sensed by the NFC passive electronic lock when the NFC control terminal is at the current location;

[0086] When the first field strength information is less than the preset field strength threshold, the NFC control terminal outputs movement indication information to prompt the NFC control terminal to move.

[0087] If the NFC control terminal moves, it acquires position change information and second field strength information at the new position, wherein the second field strength information is the magnetic field strength sensed by the NFC passive electronic lock when the NFC control terminal is at the new position.

[0088] When the second field strength information is less than the preset field strength threshold, field strength change information is obtained based on the first field strength information and the second field strength information;

[0089] The movement indication information is updated based on the NFC tag information, the location change information, and the field strength change information, and the process returns to the step of obtaining the first field strength information until the second field strength information is not less than the preset field strength threshold, at which point the NFC alignment ends.

[0090] In some alternative embodiments, reference is made to Figure 2 The NFC control terminal includes:

[0091] The magnetic field transmitting module 201 is used to establish a near-field communication connection with the NFC passive electronic lock, generate a magnetic field and send it to the NFC passive electronic lock.

[0092] The tag information acquisition module 202 is used to acquire the NFC tag information of the NFC passive electronic lock;

[0093] The NFC alignment module 203 is used to repeatedly execute the following steps until the second field strength information is not less than the preset field strength threshold, at which point NFC alignment is completed: acquiring first field strength information, wherein the first field strength information is the magnetic field strength sensed by the NFC passive electronic lock when the NFC control terminal is at its current position; when the first field strength information is less than the preset field strength threshold, outputting movement indication information through the NFC control terminal to prompt the NFC control terminal to move; if the NFC control terminal moves, acquiring position change information and second field strength information at the moved position, wherein the second field strength information is the magnetic field strength sensed by the NFC passive electronic lock when the NFC control terminal is at the moved position; when the second field strength information is less than the preset field strength threshold, acquiring field strength change information based on the first field strength information and the second field strength information; updating the movement indication information based on the NFC tag information, the position change information, and the field strength change information.

[0094] Specifically, in this embodiment, the specific functions of the NFC control terminal and its modules can be referred to the corresponding description in the NFC alignment method, and will not be repeated here.

[0095] It should be noted that the division of the various modules of the NFC-based control terminal is not unique and is not intended as a specific limitation.

[0096] As can be seen from the above, a near-field communication connection can be established with an NFC passive electronic lock through an NFC control terminal. The NFC control terminal generates a magnetic field; acquires the NFC tag information of the NFC passive electronic lock; acquires first field strength information, where the first field strength information is the magnetic field strength sensed by the NFC passive electronic lock when the NFC control terminal is at its current position; when the first field strength information is less than a preset field strength threshold, the NFC control terminal outputs movement indication information to prompt movement of the NFC control terminal; if the NFC control terminal moves, it acquires position change information and second field strength information at the new position, where the second field strength information is the magnetic field strength sensed by the NFC passive electronic lock at the new position; when the second field strength information is less than the preset field strength threshold, it acquires field strength change information based on the first and second field strength information; it updates the movement indication information based on the NFC tag information, the position change information, and the field strength change information, and returns to the step of acquiring the first field strength information, until the second field strength information is not less than the preset field strength threshold, at which point the current NFC alignment ends.

[0097] In this embodiment of the invention, the placement of the NFC control terminal does not solely depend on the user's experience. Instead, it updates the corresponding movement indication information based on NFC tag information, position change information, and field strength change information. The movement of the NFC control terminal is then indicated based on the movement indication information to determine the final precise alignment position, which helps improve the accuracy of NFC alignment.

[0098] Furthermore, embodiments of the present invention also provide an electronic device, which may be a terminal or a server, etc. Figure 3 As shown, it illustrates a structural schematic diagram of the electronic device involved in an embodiment of the present invention, specifically:

[0099] The electronic device may include a radio frequency (RF) circuit 301, a memory 302 including one or more computer-readable storage media, an input unit 303, a display unit 304, a sensor 305, an audio circuit 306, a wireless Fidelity (WiFi) module 307, a processor 308 including one or more processing cores, and a power supply 309, etc. Those skilled in the art will understand that... Figure 3 The electronic device structure shown does not constitute a limitation on the electronic device and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0100] in:

[0101] RF circuit 301 can be used for receiving and transmitting signals during information transmission or calls. Specifically, it receives downlink information from the base station and hands it over to one or more processors 308 for processing; additionally, it transmits uplink data to the base station. Typically, RF circuit 301 includes, but is not limited to, an antenna, at least one amplifier, a tuner, one or more oscillators, a Subscriber Identity Module (SIM) card, a transceiver, a coupler, a low-noise amplifier (LNA), a duplexer, etc. Furthermore, RF circuit 301 can also communicate wirelessly with networks and other devices. Wireless communication can use any communication standard or protocol, including but not limited to GSM, GPRS, CDMA, WCDMA, LTE, email, and SMS.

[0102] The memory 302 can be used to store software programs and modules. The processor 308 executes various functional applications and NFC pairing by running the software programs and modules stored in the memory 302. The memory 302 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, application programs required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device (such as audio data, phone book, etc.). In addition, the memory 302 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 302 may also include a memory controller to provide access to the memory 302 for the processor 308 and the input unit 303.

[0103] The input unit 303 can be used to receive input digital or character information, and to generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function control. Specifically, in one embodiment, the input unit 303 may include a touch-sensitive surface and other input devices. The touch-sensitive surface, also known as a touch display or touchpad, can collect user touch operations on or near it (e.g., user operations using fingers, styluses, or any suitable object or accessory on or near the touch-sensitive surface) and drive corresponding connection devices according to a pre-set program. Optionally, the touch-sensitive surface may include a touch detection device and a touch controller. The touch detection device detects the user's touch position and the signal generated by the touch operation, transmitting the signal to the touch controller; the touch controller receives touch information from the touch detection device, converts it into touch point coordinates, sends it to the processor 308, and can receive and execute commands from the processor 308. Furthermore, various types of touch-sensitive surfaces, such as resistive, capacitive, infrared, and surface acoustic wave, can be used. In addition to the touch-sensitive surface, the input unit 303 may also include other input devices. Specifically, other input devices may include, but are not limited to, one or more of the following: physical keyboard, function keys (such as volume control buttons, power buttons, etc.), trackball, mouse, joystick, etc.

[0104] Display unit 304 can be used to display information input by the user or information provided to the user, as well as various graphical user interfaces of electronic devices. These graphical user interfaces can be composed of graphics, text, icons, video, and any combination thereof. Display unit 304 may include a display panel, optionally configured as a liquid crystal display (LCD), organic light-emitting diode (OLED), or similar form. Furthermore, a touch-sensitive surface may cover the display panel. When the touch-sensitive surface detects a touch operation on or near it, it transmits the information to processor 308 to determine the type of touch event. Subsequently, processor 308 provides corresponding visual output on the display panel according to the type of touch event. Although in Figure 3 In this context, the touch-sensitive surface and the display panel are two separate components for implementing input and output functions. However, in some embodiments, the touch-sensitive surface and the display panel can be integrated to achieve both input and output functions.

[0105] The electronic device may also include at least one sensor 305, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor can adjust the brightness of the display panel according to the ambient light level, and the proximity sensor can turn off the display panel and / or backlight when the electronic device is moved to the ear. As a type of motion sensor, a gravity acceleration sensor can detect the magnitude of acceleration in various directions (generally three axes), and can detect the magnitude and direction of gravity when stationary. It can be used for applications that recognize the phone's posture (such as landscape / portrait switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc. Other sensors that may be configured in the electronic device, such as gyroscopes, barometers, hygrometers, thermometers, and infrared sensors, will not be described in detail here.

[0106] Audio circuitry 306, a speaker, and a microphone provide an audio interface between the user and the electronic device. Audio circuitry 306 converts received audio data into electrical signals, transmits them to the speaker, and the speaker converts them into sound signals for output. Conversely, the microphone converts collected sound signals into electrical signals, which are then received by audio circuitry 306, converted back into audio data, and processed by processor 308. The processed data is then transmitted via RF circuitry 301 to, for example, another electronic device, or output to memory 302 for further processing. Audio circuitry 306 may also include an earphone jack to facilitate communication between external headphones and the electronic device.

[0107] WiFi is a short-range wireless transmission technology. Electronic devices using the WiFi module 307 can help users send and receive emails, browse web pages, and access streaming media, providing users with wireless broadband internet access. Although Figure 3 WiFi module 307 is shown, but it is understood that it is not a necessary component of an electronic device and can be omitted as needed without changing the nature of the invention.

[0108] The processor 308 is the control center of the electronic device, connecting various parts of the phone via various interfaces and lines. It executes various functions and processes data by running or executing software programs and / or modules stored in the memory 302, and by calling data stored in the memory 302. Optionally, the processor 308 may include one or more processing cores; preferably, the processor 308 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 308.

[0109] The electronic device also includes a power supply 309 (such as a battery) that supplies power to various components. Preferably, the power supply can be logically connected to the processor 308 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. The power supply 309 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.

[0110] Although not shown, the electronic device may also include a camera, Bluetooth module, etc., which will not be described in detail here. Specifically, in this embodiment, the processor 308 in the electronic device loads the executable files corresponding to the processes of one or more applications into the memory 302 according to the following instructions, and the processor 308 runs the applications stored in the memory 302, thereby controlling the NFC control terminal to perform various functions, as follows:

[0111] Establish a near-field communication connection with the NFC passive electronic lock and generate a magnetic field through the NFC control terminal;

[0112] Obtain the NFC tag information of the NFC passive electronic lock;

[0113] Acquire the first field strength information, wherein the first field strength information is the magnetic field strength sensed by the NFC passive electronic lock when the NFC control terminal is at the current location;

[0114] When the first field strength information is less than the preset field strength threshold, the NFC control terminal outputs movement indication information to prompt the NFC control terminal to move.

[0115] If the NFC control terminal moves, it acquires position change information and second field strength information at the new position, wherein the second field strength information is the magnetic field strength sensed by the NFC passive electronic lock when the NFC control terminal is at the new position.

[0116] When the second field strength information is less than the preset field strength threshold, field strength change information is obtained based on the first field strength information and the second field strength information;

[0117] The movement indication information is updated based on the NFC tag information, the location change information, and the field strength change information, and the process returns to the step of obtaining the first field strength information until the second field strength information is not less than the preset field strength threshold, at which point the NFC alignment ends.

[0118] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by instructions, or by instructions controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.

[0119] To this end, embodiments of the present invention provide a computer-readable storage medium storing a plurality of instructions that can be loaded by a processor to execute steps in any of the NFC pairing methods provided in the embodiments of the present invention. For example, the instructions can execute the following steps:

[0120] Establish a near-field communication connection with the NFC passive electronic lock and generate a magnetic field through the NFC control terminal;

[0121] Obtain the NFC tag information of the NFC passive electronic lock;

[0122] Acquire the first field strength information, wherein the first field strength information is the magnetic field strength sensed by the NFC passive electronic lock when the NFC control terminal is at the current location;

[0123] When the first field strength information is less than the preset field strength threshold, the NFC control terminal outputs movement indication information to prompt the NFC control terminal to move.

[0124] If the NFC control terminal moves, it acquires position change information and second field strength information at the new position, wherein the second field strength information is the magnetic field strength sensed by the NFC passive electronic lock when the NFC control terminal is at the new position.

[0125] When the second field strength information is less than the preset field strength threshold, field strength change information is obtained based on the first field strength information and the second field strength information;

[0126] The movement indication information is updated based on the NFC tag information, the location change information, and the field strength change information, and the process returns to the step of obtaining the first field strength information until the second field strength information is not less than the preset field strength threshold, at which point the NFC alignment ends.

[0127] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.

[0128] The computer-readable storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.

[0129] Since the instructions stored in the computer-readable storage medium can execute the steps in any of the NFC alignment methods provided in the embodiments of the present invention, the beneficial effects that any of the NFC alignment methods provided in the embodiments of the present invention can achieve can be realized, as detailed in the preceding embodiments, and will not be repeated here.

[0130] According to one aspect of the present invention, a computer program product or computer program is also provided, comprising computer instructions stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the electronic device to perform the methods provided in the various optional implementations of the above embodiments.

[0131] The foregoing has provided a detailed description of an NFC pairing method, an NFC control terminal, and a storage medium provided by embodiments of the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. An NFC alignment method, applied to an NFC control terminal, characterized in that, The method includes: Establish a near-field communication connection with the NFC passive electronic lock and generate a magnetic field through the NFC control terminal; Obtain the NFC tag information of the NFC passive electronic lock; wherein, the NFC tag information includes model information, size information, and shape information; Acquire the first field strength information, wherein the first field strength information is the magnetic field strength sensed by the NFC passive electronic lock when the NFC control terminal is at the current location; When the first field strength information is less than the preset field strength threshold, the NFC control terminal outputs movement indication information to prompt the NFC control terminal to move. Obtain the first location information of the NFC control terminal at its current location; If the NFC control terminal moves, the system acquires second position information and second field strength information of the NFC control terminal at the new position. The second field strength information is the magnetic field strength sensed by the NFC passive electronic lock at the new position of the NFC control terminal. The location change information is obtained based on the first location information and the second location information; When the second field strength information is less than the preset field strength threshold, field strength change information is obtained based on the first field strength information and the second field strength information; Based on the NFC tag information, the location change information, and the field strength change information, target indication information is obtained through a preset movement indication data table or a trained movement indication model. The target indication information is used as the updated movement indication information, and the process returns to the step of obtaining the first field strength information until the second field strength information is not less than the preset field strength threshold, at which point the current NFC alignment ends. The preset motion indication data table is a pre-set table used to store the correspondence between the NFC tag information, the location change information, the field strength change information, and the target indication information. The preset motion indication data table sets the associated NFC tag information, the location change information, the field strength change information, and the target indication information to determine the corresponding target indication information. The trained motion indication model is a pre-trained model used to calculate and process the input data to obtain the corresponding target indication information. The target indication information includes the movement direction and movement distance. The motion indication information is output visually or as audio through the NFC control terminal.

2. The NFC alignment method according to claim 1, characterized in that, The location change information is obtained through the gyroscope in the NFC control terminal.

3. The NFC alignment method according to claim 1, characterized in that, The movement indication model is trained according to the following steps: The training NFC tag information, training position change information, and training field strength change information in the training data are input into the motion indication model to obtain the training indication information output by the motion indication model. The training data includes multiple sets of training information, and each set of training information includes training NFC tag information, training position change information, training field strength change information, and annotation indication information. Based on the training instruction information and the labeling instruction information, the model parameters of the motion indication model are adjusted, and the steps of inputting the training NFC tag information, training position change information and training field strength change information from the training data into the motion indication model are continued until the preset training conditions are met to obtain the trained motion indication model.

4. The NFC alignment method according to claim 1, characterized in that, The method further includes: Obtain the battery information corresponding to the NFC passive electronic lock; The battery information is output to the target object through the visual interface of the NFC control terminal.

5. The NFC alignment method according to claim 4, characterized in that, The method further includes: When the battery level exceeds a preset threshold, the NFC control terminal outputs a charging completion notification to the target object.

6. The NFC alignment method according to claim 4, characterized in that, The method further includes: Obtain the module control instructions input by the target object; The NFC control terminal sends a module control command to the NFC passive electronic lock to trigger the NFC passive electronic lock to adjust the module power supply status according to the module control command.

7. An NFC control terminal, characterized in that, It includes a memory and a processor; the memory stores an application program, and the processor is used to run the application program within the memory to perform the steps in the NFC alignment method according to any one of claims 1 to 6.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a plurality of instructions adapted for loading by a processor to perform the steps of the NFC alignment method according to any one of claims 1 to 6.