Near field communication method and electronic equipment

By optimizing parameter sets for different scenarios for different scenarios and preserving the corresponding relationship with the scenarios in the NFC design stage, the problem of inconsistent response speed of NFC technology in different scenarios is solved, which significantly improves user experience and response speed.

CN119109484APending Publication Date: 2024-12-10HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311182999.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2023-06-09
Filing Date
2023-09-13
Publication Date
2024-12-10

AI Technical Summary

Technical Problem

The existing NFC technology has inconsistent response speeds in different scenarios, resulting in poor user experience, especially in some uncommon scenarios, which requires multiple sensing to complete near-field communication.

Method used

By optimizing the default parameter set for different application scenarios during the NFC design stage, pre-store the parameter set corresponding to the scenario, and calling the corresponding parameter set according to the identified application scenario when the NFC interaction request is detected, to improve the response speed of NFC and the user Experience.

Benefits of technology

In different scenarios, the response speed of NFC is significantly improved, and the user experience of using NFC functions is improved. By optimizing the compatibility, sensitivity, response range and signal capture performance of the parameter set, the shortest response time is ensured.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119109484A_ABST
    Figure CN119109484A_ABST
Patent Text Reader

Abstract

The invention provides a near field communication method and electronic equipment. The method comprises the following steps: after a near field communication interaction request is detected, determining an application scene of NFC as a first scene; based on a preset mapping relation, a first parameter set corresponding to the first scene is determined, the mapping relation indicates one parameter set corresponding to each application scene in multiple application scenes, the multiple application scenes comprise the first scene, multiple parameter sets are indicated in the mapping relation, and each parameter set in the multiple parameter sets comprises multiple parameters; and calling the first parameter set for near field communication in the first scene. According to the method provided by the invention, the response speed of the NFC in multiple scenes can be improved, and the experience of the user in using the NFC is improved.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application claims the priority of the Chinese patent application filed with the China Patent Office on June 9, 2023, with application number 202310685779.4 and application name “NFC identification and sensing method and related device”, the entire contents of which are incorporated by reference in this application. Technical Field

[0002] The present application relates to the field of terminal technology, and in particular to a near field communication method and electronic device. Background Art

[0003] Near field communication (NFC) is a short-range, high-frequency radio technology. Devices using NFC technology can exchange data when they are close to each other. For example, electronic devices with NFC function can be used for contactless payment, access control, anti-counterfeiting verification, information reading or data exchange.

[0004] At present, when users use electronic devices with specific NFC functions to sense different scenarios, the response speed is faster for some scenarios (for example, swiping buses, swiping subways, etc.), but slower for other scenarios (for example, swiping access control, reading data, etc.). Multiple sensings are required to complete near-field communication, so the user experience is poor. Summary of the invention

[0005] The present application provides a near field communication method and electronic device, which can improve the response speed of NFC in multiple scenarios and enhance the user experience of using NFC.

[0006] In a first aspect, the present application provides a near field communication method, which can be performed by an electronic device, or can also be performed by a component configured in the electronic device, such as a chip, a chip system, etc. The embodiments of the present application are not limited to this.

[0007] Exemplarily, the method includes: after detecting an NFC interaction request, determining that the application scenario of NFC is a first scenario; based on a preset mapping relationship, determining a first parameter set corresponding to the first scenario, the mapping relationship indicating a set of parameter sets corresponding to each application scenario in a plurality of application scenarios, the plurality of application scenarios including the first scenario, the mapping relationship indicating multiple parameter sets, each parameter set in the multiple parameter sets including multiple parameters; calling the first parameter set for near field communication in the first scenario.

[0008] For example, the electronic device can perform NFC protocol recognition based on the received radio frequency signal, determine the protocol corresponding to NFC, and then determine the application scenario of NFC. It can be understood that since the protocols transmitted by radio frequency signals from different devices are different, after the electronic device determines the protocol corresponding to NFC, it can identify the current application scenario of NFC.

[0009] The optimized parameters in each parameter set indicated by the above mapping relationship are determined according to the compatibility, sensitivity, response range and signal capture performance when the parameter set is applied to the corresponding scenario for NFC.

[0010] For example, when applying NFC for bank card payment, the debugging compatibility and sensitivity of NFC can be optimized, and the DLMA parameters and analog threshold parameters in the default parameter set can be optimized.

[0011] For another example, when applying NFC for subway card payment, the response range and signal capture performance of NFC can be optimized, and the phase parameters and operating voltage parameters in the default parameter set can be optimized.

[0012] Based on the above scheme, the electronic device is pre-set with multiple application scenario types and debugged parameter sets. After receiving the user operation of NFC interaction, it identifies the current application scenario and calls the corresponding parameter set according to the scenario type, so that the electronic device can call the most suitable parameter set in different scenarios, that is, the parameter set with the shortest response time, thereby achieving the best working state of NFC and improving the user experience of using NFC.

[0013] In combination with the first aspect, in certain implementations of the first aspect, the method also includes: detecting the NFC interaction request again; determining that the application scenario of NFC is a second scenario, and the second scenario does not belong to the multiple scenarios; in the second scenario, calling the multiple sets of parameter sets in sequence for near field communication to obtain multiple response times; determining a second parameter set corresponding to the shortest response time among the multiple response times; and updating the mapping relationship based on the correspondence between the second scenario and the second parameter set.

[0014] In combination with the first aspect, in some implementations of the first aspect, the multiple parameter sets further include a second parameter set, and the multiple parameters included in the second parameter set are different from the multiple parameters included in the first parameter set.

[0015] Among them, that multiple parameters in the first parameter set are different from multiple parameters in the second set can be understood as: at least one parameter among the multiple parameters in the first parameter set is different from the multiple parameters included in the second parameter set, or at least one parameter among the multiple parameters in the second parameter set is different from the parameters included in the first parameter set.

[0016] Exemplarily, the multiple parameters included in each parameter set may include one or more of the following: dynamic load modulation amplitude (DLMA), analog threshold, phase, or operating voltage.

[0017] In the present application, updating the mapping relationship can be understood as adding the correspondence between the second scene and the second parameter set to the existing mapping relationship; or, adding the second scene to at least one application scenario corresponding to the second parameter set, that is, the correspondence indicated by the updated mapping relationship includes the correspondence between the second scene and the second parameter set.

[0018] In this way, when the electronic device detects the NFC interaction request again and determines that the application scenario of NFC is the second application scenario, the second parameter set can be directly called for near field communication, which is conducive to improving the efficiency of NFC recognition and sensing.

[0019] In combination with the first aspect, in some implementations of the first aspect, the first scenario is bank card payment, access control, subway card payment, or card reading.

[0020] The second scenario may be other scenarios besides bank card payment, access control, subway card payment, and card reading, such as car keys, shared bicycles, bus cards, and the like.

[0021] In combination with the first aspect, in certain implementations of the first aspect, the multiple parameter sets are obtained by optimizing a default parameter set, and the default parameter set is a parameter set preset when the NFC chip leaves the factory.

[0022] Optionally, the multiple parameter sets indicated by the above mapping relationship may include a default parameter set.

[0023] In a second aspect, the present application provides an electronic device, including a processor coupled to a memory, the memory being used to store code instructions; the processor being used to execute the code instructions so that the electronic device executes the method described in the first aspect or any one of the implementations of the first aspect.

[0024] Optionally, the electronic device further comprises a memory for storing a computer program and / or a configuration file of the logic circuit.

[0025] Optionally, the electronic device further includes a communication interface, and the processor is coupled to the communication interface for inputting and / or outputting signals.

[0026] In a third aspect, the present application provides a processor, comprising: an input circuit, an output circuit, and a processing circuit. The processing circuit is used to receive a signal through the input circuit and transmit a signal through the output circuit, so that the processor executes the method in any possible implementation of the first aspect above.

[0027] In the specific implementation process, the above-mentioned processor can be a chip, the input circuit can be an input pin, the output circuit can be an output pin, and the processing circuit can be a transistor, a gate circuit, a trigger, and various logic circuits. The input signal received by the input circuit can be, for example, but not limited to, received and input by a receiver, and the signal output by the output circuit can be, for example, but not limited to, output to a transmitter and transmitted by the transmitter, and the input circuit and the output circuit can be the same circuit, which is used as an input circuit and an output circuit at different times. This application does not limit the specific implementation of the processor and various circuits.

[0028] In a fourth aspect, the present application provides a computer-readable storage medium, which stores instructions. When the instructions are executed, the computer executes the method described in the first aspect or any implementation of the first aspect.

[0029] In a fifth aspect, the present application provides a computer program product, including a computer program, which, when executed, enables a computer to execute the method described in the first aspect or any one of the implementations of the first aspect.

[0030] It should be understood that the second to fifth aspects of the present application correspond to the technical solution of the first aspect of the present application, and the beneficial effects achieved by each aspect and the corresponding feasible implementation methods are similar and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application;

[0032] Figure 2 It is a schematic diagram of the three major working modes of NFC provided in the embodiment of the present application;

[0033] Figure 3 is a schematic diagram of a scene recognition process provided by an embodiment of the present application;

[0034] Figure 4 This is a software architecture diagram of an NFC system provided in an embodiment of the present application;

[0035] Figure 5 is a schematic flow chart of a near field communication method provided by an embodiment of the present application;

[0036] Figures 6 to 8It is a schematic diagram of an optimization method of a parameter set provided in an embodiment of the present application;

[0037] Fig. 9 It is another schematic flowchart of the near field communication method provided in an embodiment of the present application. DETAILED DESCRIPTION

[0038] The technical solution in this application will be described below in conjunction with the accompanying drawings.

[0039] To facilitate understanding of the embodiments of the present application, the following points are first explained:

[0040] First, in the embodiments of the present application, the use of prefixes such as "first" and "second" is only to facilitate the distinction and description of different things belonging to the same name category, and does not restrict the order, size or quantity of things. For example, "first parameter set" and "second parameter set" are just different parameter sets, and do not limit the number of parameter sets or the priority relationship; for another example, "first scene" and "second scene" are just different scenes, and there is no time sequence, size relationship or priority relationship between the two.

[0041] Second, in the embodiments shown below, the words "exemplarily" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplarily" or "for example" in this application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplarily" or "for example" is intended to present related concepts in a specific way.

[0042] Third, in the embodiments of the present application, "at least one" refers to one or more, and "more" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship, but it does not exclude the situation where the previous and next associated objects are in an "and" relationship. The specific meaning can be understood in conjunction with the context. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c can represent: a, b, c; a and b; a and c; b and c; or a and b and c. Where a, b, c can be single or multiple.

[0043] The electronic device of the embodiment of the present application may also be referred to as terminal equipment, user equipment (UE), mobile station (MS), mobile terminal (MT), etc.

[0044] Exemplarily, the electronic device is a mobile phone, a tablet computer, a laptop computer, a PDA, a mobile internet device (MID), a wearable device, a virtual reality (VR) device, an augmented reality (AR) device, an artificial intelligence (AI) device, a wireless terminal in industrial control, a wireless terminal in self-driving, a wireless terminal in remote medical surgery, a wireless terminal in a smart grid, a wireless terminal in transportation safety, a wireless terminal in a smart city, a wireless terminal in a smart home, or other processing devices capable of installing an operating system, vehicle-mounted equipment, wearable devices, terminal devices in a 5G network, or terminal devices in a future evolved public land mobile communication network (PLMN), etc., and the embodiments of the present application are not limited to this.

[0045] In order to better understand the embodiments of the present application, the structure of the electronic device according to the embodiments of the present application is introduced below.

[0046] Figure 1 Schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 1As shown, the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a sensor module 180, a button 190, an indicator 192, a camera 193, and a display screen 194, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0047] It is to be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the electronic device. It should be understood that the electronic device may include more or fewer components than shown in the figure, or combine certain components, or split certain components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0048] The processor 110 may include one or more processing units. Different processing units may be independent devices or integrated into one or more processors. The processor 110 may also be provided with a memory for storing instructions and data.

[0049] The universal serial bus (USB) interface 130 is an interface that complies with the USB standard specification. The USB interface 130 can be used to connect a charger to charge the terminal device, and can also be used to transmit data between the terminal device and peripheral devices. It can also be used to connect headphones to play audio through the headphones. The interface can also be used to connect other electronic devices.

[0050] The charging management module 140 is used to receive charging input from a charger, which may be a wireless charger or a wired charger. The power management module 141 is used to connect the charging management module 140 to the processor 110 .

[0051] The wireless communication function of the electronic device can be implemented through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor.

[0052] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. The antenna in the terminal device can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of the antenna.

[0053] The mobile communication module 150 can provide wireless communication solutions including second generation (2th-generation, 2G) wireless technology communication / third generation (3th-generation, 3G) mobile communication technology / fourth generation (4th-generation, 4G) mobile communication technology / fifth generation (5th-generation, 5G) mobile communication technology applied to the terminal device. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, etc. the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation.

[0054] The wireless communication module 160 can provide wireless communication solutions for application in the electronic device 100, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared technology (IR), etc.

[0055] The electronic device implements the display function through a graphics processing unit (GPU), a display screen 194, and an application processor. The GPU connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering.

[0056] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. In some embodiments, the electronic device may include 1 or N display screens 194, where N is a positive integer greater than 1.

[0057] The electronic device can realize the shooting function through image signal processing (ISP), camera 193, video codec, GPU, display screen 194 and application processor.

[0058] The camera 193 is used to capture static images or videos. In some embodiments, the terminal device may include 1 or N cameras 193, where N is a positive integer greater than 1.

[0059] The external memory interface 120 can be used to connect an external memory card to expand the storage capacity of the terminal device. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music and videos can be stored in the external memory card.

[0060] The internal memory 121 can be used to store computer executable program codes, and the executable program codes include instructions. The internal memory 121 can include a program storage area and a data storage area.

[0061] The electronic device can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, and the application processor.

[0062] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The speaker 170A, also known as the "speaker", is used to convert audio electrical signals into sound signals. The terminal device can listen to music or listen to hands-free calls through the speaker 170A. The receiver 170B, also known as the "earpiece", is used to convert audio electrical signals into sound signals. When the terminal device answers a call or voice message, the voice can be answered by placing the receiver 170B close to the human ear. The microphone 170C, also known as the "microphone" or "microphone", is used to convert sound signals into electrical signals.

[0063] The pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A can be set on the display screen 194. The gyroscope sensor 180B can be used to determine the motion posture of the terminal device. The air pressure sensor 180C is used to measure the air pressure. The magnetic sensor 180D includes a Hall sensor. The acceleration sensor 180E can detect the magnitude of the acceleration of the terminal device in all directions (generally three axes). The distance sensor 180F is used to measure the distance. The proximity light sensor 180G can include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The ambient light sensor 180L is used to sense the brightness of the ambient light. The fingerprint sensor 180H is used to collect fingerprints. The temperature sensor 180J is used to detect the temperature. The touch sensor 180K, also known as a "touch device". The bone conduction sensor 180M can obtain a vibration signal.

[0064] The touch sensor 180K may be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, or a "touch screen". In the embodiment of the present application, a capacitive sensing node grid (hereinafter referred to as a capacitive sensor) may be disposed in the touch screen. When the terminal device determines that the value of the capacitance in at least one grid received by the capacitive sensor exceeds the capacitance threshold, it may be determined that a touch operation has occurred; further, the terminal device may determine the touch area corresponding to the touch operation based on the area occupied by at least one grid exceeding the capacitance threshold.

[0065] The button 190 includes a power button, a volume button, etc. The button 190 may be a mechanical button. It may also be a touch button. The terminal device may receive the button input and generate a key signal input related to the user settings and function control of the terminal device. The indicator 192 may be an indicator light, which may be used to indicate the charging status, power change, message, missed call, notification, etc.

[0066] The SIM card interface 195 is used to connect a SIM card. The SIM card can be connected to and separated from the electronic device 100 by inserting it into the SIM card interface 195 or pulling it out from the SIM card interface 195. The electronic device 100 can support one or more SIM card interfaces. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, etc. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of multiple cards can be the same or different. The SIM card interface 195 can also be compatible with different types of SIM cards. The SIM card interface 195 can also be compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to implement functions such as calls and data communications. In some embodiments, the electronic device 100 uses an eSIM, that is, a pre-set SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.

[0067] The software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. This application does not limit the type of operating system of the electronic device. For example, Android system, Hongmeng OS, etc.

[0068] NFC is an emerging technology. Devices using NFC technology can exchange data when they are close to each other. It is evolved from the integration of contactless radio frequency identification (RFID) and interconnection technology. By integrating the functions of inductive card reader, inductive card and point-to-point communication on a single chip, it uses mobile terminals to realize mobile payment, electronic ticketing, access control, mobile identity recognition, anti-counterfeiting and other applications.

[0069] At present, the working modes of NFC are mainly divided into: Figure 2 The three major categories shown are: card mode, reader mode and peer-to-peer (P2P) mode.

[0070] The card mode is to use an electronic device with NFC function as a contactless card, such as a bus card, access card, or bank card. In this mode, even if the electronic device has no power or is turned off, it can still be used as a card.

[0071] In the card reader mode, an electronic device with NFC function is used as a contactless card reader. The data in the NFC tag is read from a poster, card or device with an NFC tag. For example, the application scenarios of the card reader mode may include card recharge, card payment, smart packaging, anti-counterfeiting, games and other scenarios.

[0072] P2P mode means that two electronic devices with NFC function can establish a communication link between them to achieve data transmission, such as quick pairing, link sharing, data exchange, etc.

[0073] Based on different classification methods, NFC working modes can also be divided into active mode and passive mode. In passive mode, the NFC initiator (also called the master device) needs a power supply device. The master device uses the energy of the power supply device to provide a radio frequency field and send data to the NFC target device (also called the slave device). In this working mode, the slave device does not generate a radio frequency field, but passively receives the radio frequency field generated by the master device, so it is called passive mode. For example, in NFC card mode, the gate NFC master device provides a radio frequency field, and the electronic device with NFC function detects the received radio frequency field, identifies the current scene and switches to card mode. For example, in NFC reader mode, the master device that provides the radio frequency field is changed to an electronic device with NFC function, and the slave device reads the card. NFC detects the transmitted radio frequency field, identifies the current scene and switches to reader mode. In active mode, both the initiator and the target device must actively generate a radio frequency field when sending data to each other, so it is called active mode. For example, in P2P mode, two master devices with NFC function provide radio frequency fields at the same time, and one of the master devices detects the transmitted and received radio frequency fields, identifies the current scene and switches to P2P mode.

[0074] Figure 3 FIG. 1 is a schematic diagram of a scene recognition process provided by an embodiment of the present application. Figure 3 As shown, when a user uses an electronic device with NFC function to perform near-field communication, the electronic device can determine the current NFC working mode and the current application scenario of NFC by detecting nearby radio frequency signals and identifying the NFC protocol.

[0075] Exemplarily, the electronic device acts as a device that transmits radio frequency signals, and determines that the current NFC working mode is the card reader mode; the electronic device acts as a device that receives radio frequency signals, and determines that the current NFC working mode is the card mode; the electronic device acts as both a device that transmits radio frequency signals and a device that receives radio frequency signals, and determines that the current NFC working mode is the P2P mode.

[0076] Since the NFC protocol can be transmitted during the transmission of RF signals, when the electronic device detects the RF signal, it can identify the NCF protocol based on the received RF signal. Secondly, since different scenarios correspond to different NCF protocols, or the RF signals emitted by different devices transmit different protocols, the electronic device can determine the current application scenario of NFC based on the identified NFC protocol.

[0077] For example, when a user uses an electronic device with NFC function to swipe a card to enter or exit a subway station in City A, when the electronic device is close to the gate, it will receive the radio frequency signal emitted by the gate, so that the NFC protocol corresponding to the radio frequency signal can be identified, and the current application scenario of NFC is determined to be the subway card payment scenario of City A. It can be understood that when the electronic device detects the radio frequency signal emitted by the gate of the subway station in City A, the simulated card of the subway card of City A can be called.

[0078] In summary, when an electronic device identifies an NFC application scenario, it can determine the NFC working mode through physical layer identification, and determine the NCF application scenario through protocol layer identification.

[0079] Figure 4 : is a software architecture diagram of an NFC system provided in an embodiment of the present application. Figure 4As shown, the NFC system includes an application (APP), an NFC service (service), a protocol and a chip. Among them, the APP can be a wallet, a bag, etc. The NFC service includes a bottom layer and an upper layer, which are used to manage the chip downward and provide an application programming interface (API) service upward; the chip includes an NFC chip, a subscriber identity module (SIM) card and an external point of sale (POS); the protocol defines the communication data format and sequence between each chip and software, including three types of protocols: NFC controller interface (NCI), radio frequency (RF) and single wire protocol (SWP). The external POS and the NFC chip communicate through the RF protocol, the NFC chip and the NFC service communicate through the NCI protocol, and the NFC chip and the SIM card communicate through the SWP protocol.

[0080] Among them, the external POS and NFC chip communicate through the RF protocol, and the corresponding working mode is the passive mode; when the NFC chip and the SIM card communicate through the SWP protocol, the corresponding working mode is the active mode.

[0081] It should be understood that Figure 4 The NFC system shown can be deployed in Figure 1 The electronic device 100 is shown, so that the electronic device 100 has the NFC function.

[0082] Exemplarily, when a user uses an electronic device with NFC function for near-field communication, the electronic device realizes near-field communication in different scenarios by calling the parameter set preset in the register of the NFC chip. However, at present, in the NFC design stage, only one set of parameter sets is preset in the NFC register, and the parameter set is obtained by optimizing the default parameter set for a single scenario. Since the parameters in the parameter set cannot be modified again after the electronic device leaves the factory, when the user performs near-field communication in different scenarios, the parameter set needs to be called to complete. Therefore, in some common scenarios (for example, swiping buses, swiping subways, etc.), the NFC response speed is faster, and in some uncommon scenarios (for example, swiping access control, reading data, etc.), the NFC response speed is slower, and multiple inductions are required to complete near-field communication, resulting in a poor user experience.

[0083] In view of this, the present application provides a near field communication method and an electronic device. In the method, during the NFC design stage, some parameters in a default parameter set are optimized for different application scenarios, and the correspondence between the parameter sets optimized for different scenarios and the application scenarios is pre-stored in the electronic device, so that when the electronic device detects an NFC interaction request, it can call the parameter set corresponding to the scenario from the pre-stored correspondence according to the identified application scenario to realize the recognition of the scenario, thereby improving the response speed of NFC in different scenarios and enhancing the user experience of using the NFC function.

[0084] The method provided by the embodiment of the present application is described in detail below in conjunction with the accompanying drawings. The method provided by the embodiment of the present application can be applied to any electronic device with NFC function, such as Figure 1 Electronic equipment shown.

[0085] Figure 5 It is a schematic flowchart of a near field communication method 500 provided in an embodiment of the present application.

[0086] It should be noted that before executing method 500, the NFC function of the electronic device has not been used, and before the electronic device leaves the factory, four sets of parameter sets corresponding to four scenarios are preset in the register of the NFC chip, wherein the four sets of parameters are parameter set 0, parameter set 1, parameter set 2 and parameter set 3, and the four scenarios are card reading, bank card payment, access control and subway card payment. Among them, parameter set 0 is the default parameter set, parameter set 1 is obtained by optimizing the default parameter set for the bank card payment scenario, parameter set 2 is obtained by optimizing the default parameter set for the access control scenario, and parameter set 3 is obtained by optimizing the default parameter set for the subway card payment scenario, so at least one parameter in parameter sets 0 to 3 is different.

[0087] It should be understood that the correspondence between the aforementioned four sets of parameter sets and the four scenarios is only an example, and more or fewer sets of correspondence between parameter sets and scenarios may be preset before the electronic device leaves the factory.

[0088] like Figure 5 As shown, the method 500 includes S501 to S505. Each step in the method 500 is described in detail below.

[0089] S501: When an NFC interaction request is detected, an application scenario of NFC is determined.

[0090] Among them, the application scenarios of NFC include bank card payment scenarios, access control scenarios, subway card payment scenarios, card reading scenarios, car key scenarios and other scenarios where NFC can be applied.

[0091] Exemplarily, the NFC interaction request may be a near field communication request received by the electronic device from another device, for example, a radio frequency signal provided by another device such as a gate.

[0092] Exemplarily, the NFC interaction request may also be a near field communication request actively sent by the electronic device, for example, may be a radio frequency signal actively sent by the electronic device.

[0093] For the description of electronic devices determining NFC application scenarios, please refer to the previous article Figure 3 The relevant description in will not be repeated here. However, it should be noted that when an electronic device uses the NFC function for the first time, when it detects a radio frequency signal emitted by other devices (such as a subway station gate), the identified protocol can be saved.

[0094] Optionally, the electronic device can also pre-identify the application scenario of NFC through the positioning function. For example, if the electronic device is located near a subway station, it can identify the current NFC application scenario as a subway card payment scenario. For another example, if the electronic device is located near home, it can identify the current NFC application scenario as a door access control scenario.

[0095] S502, when it is determined that the application scenario of NFC is card reading, bank card payment, access control and subway card payment, a target parameter set is determined according to a corresponding relationship preset in the NFC chip register.

[0096] Exemplarily, when the application scenario of NFC is determined to be card reading, the target parameter set is parameter set 0; when the application scenario of NFC is determined to be bank card payment, the target parameter set is parameter set 2; when the application scenario of NFC is determined to be access control, the target parameter set is parameter set 2; when the application scenario of NFC is determined to be subway card payment, the target parameter set is parameter set 3.

[0097] Table 1 shows a corresponding relationship.

[0098] Table 1

[0099] Application scenario category Parameter Set Card reading Parameter Set 0 Bank card payment Parameter Set 1 Scan access control Parameter Set 2 Subway card payment Parameter Set 3

[0100] In the process of optimizing parameters for different scenarios, the factors considered in this application mainly include compatibility, sensitivity, response range and signal capture performance when the parameter set is applied to the scenario for NFC. The parameters affecting these factors are DLMA, analog threshold, phase, or operating voltage. Therefore, different parameter sets can be obtained by optimizing one or more parameters of DLMA, analog threshold, phase, or operating voltage in the default parameter set.

[0101] Among them, compatibility is used to indicate that the electronic device can be compatible with various types of devices when performing NFC identification and sensing. For example, Android phones, laptops, smart home devices, etc. As long as they all support the NFC function, they can achieve the ability to exchange data; sensitivity is used to indicate the sensitivity of the electronic device when performing NFC identification and sensing; response range is used to indicate the effective area of ​​the electronic device when performing NFC identification and sensing. Too large a sensing range will lead to unnecessary false sensing operations, and a reasonable response range is conducive to reducing false sensing; signal capture performance is used to indicate the ability of the electronic device to capture signals when performing NFC identification and sensing.

[0102] It should be understood that in the parameter optimization process, different scenarios may consider different influencing factors, so the parameters to be optimized are also different. For example, for the bank card payment scenario, the debugging compatibility and sensitivity of NFC are mainly optimized, so the DLMA parameters and analog threshold parameters can be optimized; for the access control swiping scenario, the response range and signal capture performance of NFC are mainly optimized, so the phase parameters and operating voltage parameters can be optimized; for the subway card payment scenario, the debugging compatibility and sensitivity of NFC are mainly optimized, so the DLMA parameters and analog threshold parameters can be optimized.

[0103] Combine the following Figures 6 to 8 The optimization process of parameter sets is described in detail.

[0104] The parameter set of the register of the NFC chip includes: NXP_RF_CONF_BLK1, NXP_RF_CONF_BLK2, ..., NXP_RF_CONF_BLK11 and NXP_RF_CONF_BLK12, a total of 12 parameter areas, each of the 12 parameter areas may include at least one parameter, and the present application optimizes the performance of NFC by debugging one or more parameters contained in each of the 12 parameter areas.

[0105] Figure 6 An optimization method of the parameter set provided in the embodiment of the present application is shown. Figure 6As shown, the DLMA parameters and analog threshold parameters in the parameter set are debugged. Among them, the DLMA parameters are located in NXP_RF_CONF_BLK2, and the analog threshold parameters are located in NXP_RF_CONF_BLK3. The analog threshold parameters are used to adjust the sensitivity of the analog threshold device when it is working. For the bank card payment scenario, the hexadecimal parameters corresponding to the DLMA parameters in NXP_RF_CONF_BLK2 and the hexadecimal parameters corresponding to the analog threshold parameters in NXP_RF_CONF_BLK3 are optimized respectively, so that when the debugged parameter set is called in the bank card payment scenario, it can obtain greater compatibility and higher sensitivity.

[0106] For example, Figure 6 As shown, for the DLMA parameter, "04" is the main changing character; for the analog threshold parameter, "64" and "00" are the main changing characters.

[0107] Figure 7 Another optimization method of the parameter set provided in the embodiment of the present application is shown. Figure 7 As shown, the phase and working voltage parameters in the parameter set are debugged. The phase parameter is located in NXP_RF_CONF_BLK4, and the working voltage parameter is located in NXP_RF_CONF_BLK6. For the access control scene, the hexadecimal parameters corresponding to the phase parameter of NXP_RF_CONF_BLK4 and the hexadecimal parameters of the working voltage parameter in NXP_RF_CONF_BLK6 are optimized, so that when the debugged parameter set is called in the access control scene, a larger response range and better signal capture performance can be obtained.

[0108] For example, Figure 7 As shown, for the phase parameters, "B4", "B5", "64", "00", and "05" are the main changing characters; for the operating voltage parameters, "1B" and "1A" are the main changing characters.

[0109] Figure 8 Another optimization method of the parameter set provided in the embodiment of the present application is shown. Figure 8As shown, the DLMA parameters and analog threshold parameters in the parameter set are debugged. Among them, the DLMA parameters are located in NXP_RF_CONF_BLK2, and the analog threshold parameters are located in NXP_RF_CONF_BLK3. The analog threshold parameters are used to adjust the sensitivity of the analog threshold device when it is working. For the scenario of subway card payment, the hexadecimal parameters corresponding to the DLMA parameters in NXP_RF_CONF_BLK2 and the hexadecimal parameters corresponding to the analog threshold parameters in NXP_RF_CONF_BLK3 are optimized respectively, so that when the debugged parameter set is called in the subway card payment scenario, it can obtain greater compatibility and higher sensitivity.

[0110] For example, Figure 8 As shown, for the DLMA parameter, "06" is the main changing character; for the analog threshold parameter, "77" and "0E" are the main changing characters.

[0111] S503: When it is determined that the application scenario of NFC is other scenarios, determine the response time required when calling parameter sets 0 to 4 to perform near field communication respectively.

[0112] It should be understood that other scenarios refer to any scenario in which near-field communication can be performed except bank card payment scenarios, access control scenarios, subway card payment scenarios and card reading scenarios, such as car keys, shared bicycles, data interaction, etc.

[0113] S504: Determine the parameter set with the shortest response time as the target parameter set.

[0114] Optionally, when it is determined that the application scenario of NFC is another scenario, the NFC card of the current scenario can be saved. It should be understood that the saving operation needs to be performed by the user, that is, the user confirms whether the NFC card of the scenario needs to be saved on the electronic device.

[0115] The NFC card here has different forms in different working modes. For example, in card mode and card reader mode, the NFC card is a simulated card; in P2P mode, the NFC card can be the name of the electronic device that interacts with it, etc.

[0116] Optionally, when the electronic device identifies other scenarios other than the multiple application scenarios indicated by the pre-stored mapping relationship, the mapping relationship can be updated based on the correspondence between the other scenarios and the parameter set. In this way, the response time of NFC in more scenarios can be improved.

[0117] Exemplarily, updating the mapping relationship may include adding a correspondence between other scenarios and new parameter sets in the NFC register, or adding a correspondence between other scenarios and original parameter sets in the NFC register, or replacing the correspondence in the original NFC register, etc., to obtain an updated correspondence.

[0118] It should be noted that the above S502, S503 and S504 are optional steps, that is, when S502 is executed, S503 and S504 may not be executed; when S503 and S504 are executed, S502 may not be executed. Which one or which steps to execute needs to be determined based on the NFC application scenario determined in S501.

[0119] S505: In the current application scenario, call the target parameter set to perform near field communication.

[0120] For example, in the scenario of access control, parameter set 1 is called for near field communication; in the scenario of bank card payment, parameter set 2 is called for near field communication.

[0121] Exemplarily, in other scenarios, if the response time required when calling parameter 1 for near field communication is the shortest, then in other scenarios, calling parameter set 1 for near field communication.

[0122] Optionally, the correspondence relationship preset in the NFC chip register of the electronic device before leaving the factory can be updated through over-the-air technology (OTA) push. For example, the correspondence relationship in the NFC register can be updated by upgrading the application or upgrading the system to meet the needs of NFC fast response in more scenarios.

[0123] Table 2

[0124]

[0125] Table 2 shows the comparison results of the recognition range after the experimental mobile phone prototype is flashed with the default parameter set 0 and the parameter set 1 debugged for the bank card payment scenario, and calling different parameter sets in the bank card payment scenario.

[0126] As shown in Table 2, in the bank card payment scenario, when parameter set 1 is called, the maximum card swiping distance measured in the test area can reach 94 millimeters (millimeter, mm), while when parameter set 0 is called, the maximum card swiping distance measured in the test area is only 87 mm; through the grid table calculation, it is found that in the bank card payment scenario, compared with calling parameter set 0, the card swiping range in the 0 centimeter (centimeter, cm) plane is increased from 270 square cm (cm 2 ) increased to 286cm 2The 2cm flat surface can be swiped from 213cm2 to 236cm 2 .

[0127] Table 3

[0128]

[0129] Table III shows the comparison results of the recognition range of the experimental mobile phone prototype after the default parameter set 0 and the parameter set 2 debugged for the access control scenario are flashed, and different parameter sets are called in the access control scenario.

[0130] As shown in Table 3, in the access control scenario, when parameter set 2 is called, the maximum card swiping distance measured in the test area can reach 90mm, while when parameter set 0 is called, the maximum card swiping distance measured in the test area is only 88mm; through the grid table calculation, it is found that in the access control scenario, the card swiping range of 0cm plane is increased from 270cm when parameter set 2 is called compared with parameter set 0. 2 Increased to 284cm 2 , 2cm flat surface can swipe card range from 215cm 2 Increased to 227cm 2 .

[0131] Table 4

[0132]

[0133] Table 4 shows the comparison results of the recognition range after the experimental mobile phone prototype is flashed with the default parameter set 0 and the parameter set 3 after debugging for the subway card payment scenario, and calling different parameter sets in the subway card payment scenario.

[0134] As shown in Table 4, in the subway card payment scenario, when parameter set 3 is called, the maximum card swiping distance measured in the test area can reach 99mm, while when parameter set 0 is called, the maximum card swiping distance measured in the test area is only 88mm; through the grid table calculation, it is found that in the subway card payment scenario, the card swiping range of the 0cm plane is increased from 270.40cm when parameter set 3 is called compared with parameter set 0. 2 Increased to 289.65cm 2 , 2cm flat surface can be swiped from 215.75cm 2 Increased to 233.98cm 2 .

[0135] Table 5

[0136]

[0137] Table 5 shows the comparison results of the recognition range after the experimental mobile phone prototype is flashed with parameter set 0, parameter set 1, parameter set 2 and parameter set 3, and different parameter sets are called in the card reading scenario.

[0138] As shown in Table 5, in the card reading scenario, when parameter set 0 is called, the farthest card swiping distance measured in the test area can reach 13mm, while when parameter set 1, parameter set 2, and parameter set 3 are called, the farthest card swiping distances measured in the test area are 12mm and 11mm respectively, both less than 13mm; through the grid table calculation, it is found that in the card reading scenario, the 0cm plane card swiping range when parameter set 0 is called is larger than the 0cm plane card swiping range when parameters 1 to 3 are called in the scenario, and can reach 46cm 2 ; In the card reading scenario, the 2cm plane card swiping range when calling parameter set 0 is larger than the 2cm plane card swiping range when calling parameters 1 to 3 in the same scenario, and can reach 30cm 2 .

[0139] It can be seen that calling the NFC register parameter set that matches the scenario in different scenarios can meet the user's requirements for response time and sensing range when conducting near-field communication in different scenarios, thereby improving the user's experience of using the NFC function.

[0140] Fig. 9 FIG. 9 is another schematic flow chart of a near field communication method 900 provided in an embodiment of the present application. Fig. 9 As shown, the method 900 may include S901 to S903. The various steps shown in the method 900 are described in detail below.

[0141] S901: After detecting an NFC interaction request, determine that an application scenario of NFC is a first scenario.

[0142] Among them, the application scenarios of NFC may include bank card payment, access control, subway card payment or card reading and other scenarios. The first scenario may be any scenario in the NFC application scenario. That is, the first scenario may be any scenario such as bank card payment, access control, subway card payment or card reading.

[0143] For the description of determining the NFC application scenario, please refer to the description in S501, which will not be repeated here.

[0144] S902: Determine a first parameter set corresponding to a first scene based on a preset mapping relationship.

[0145] The mapping relationship indicates a set of parameter sets corresponding to each application scenario in the multiple application scenarios, the multiple application scenarios include the first scenario, the mapping relationship includes multiple parameter sets, and each parameter set includes multiple parameters.

[0146] Optionally, the multiple parameter sets also include a second parameter set, and the multiple parameters included in the second parameter set are different from the multiple parameters included in the first parameter set.

[0147] Exemplarily, the multiple parameters included in each parameter set may include: DLMA, analog threshold, phase, or operating voltage, etc.

[0148] Exemplarily, the preset mapping relationship may be the corresponding relationship in the above method 500, that is, the multiple parameter sets indicated by the mapping relationship are obtained by the developer optimizing the default parameter set based on multiple different application scenarios before the electronic device leaves the factory. Generally speaking, a parameter set is obtained by optimizing the default parameter set based on one scenario.

[0149] Exemplarily, the preset mapping relationship may also be the corresponding relationship updated in the above method 500. That is, among the multiple application scenarios indicated by the mapping relationship, there may be multiple scenarios corresponding to the same parameter set, that is, the number of multiple application scenarios is greater than or equal to the number of multiple parameter sets.

[0150] In the case where the number of multiple application scenarios is greater than the number of multiple parameter sets, among the multiple application scenarios corresponding to each parameter set, in addition to one application scenario preset before the electronic device leaves the factory, other application scenarios can be updated to the mapping relationship during the use of the NFC function of the electronic device. The specific update method is described in detail below.

[0151] If the preset mapping relationship is a corresponding relationship updated by the above-mentioned OTA push method, the number of multiple parameter sets indicated by the mapping relationship and the number of multiple application scenarios are generally the same.

[0152] Exemplarily, when the first parameter set is the bank card payment scenario in the above method 500, the first parameter set is parameter set 1 in the method 500, or the first parameter set can also be referred to as the above target parameter set.

[0153] S903: Call a first parameter set to perform near field communication in a first scenario.

[0154] In the embodiment of the present application, the electronic device is pre-set with multiple application scenario types and debugged parameter sets. After receiving a user operation for NFC interaction, the current application scenario is identified, and the corresponding parameter set is called according to the scenario type, so that the electronic device can call the most suitable parameter set in different scenarios, that is, the parameter set with the shortest response time, thereby achieving the optimal working state of NFC identification sensing and improving the user experience of using NFC.

[0155] Optionally, the method 900 also includes: detecting the NFC interaction request again; determining that the application scenario of NFC is a second scenario, and the second scenario does not belong to the multiple application scenarios included in the mapping relationship; in the second scenario, calling multiple sets of parameter sets in sequence for near field communication to obtain multiple response times; determining a second parameter set corresponding to the shortest response time among the multiple response times; and updating the above mapping relationship based on the correspondence between the second scenario and the second parameter set.

[0156] It should be understood that the prerequisite for updating the mapping relationship is that the user has stored the NFC card in the application scenario. The description of the NFC card can refer to the above description, which will not be repeated here.

[0157] Exemplarily, based on the correspondence between the second scene and the second parameter set, the above-mentioned mapping relationship is updated, including: adding the correspondence between the second scene and the second parameter set to the existing mapping relationship; or, adding the second scene to at least one application scenario corresponding to the second parameter set, that is, the correspondence indicated by the updated mapping relationship includes the correspondence between the second scene and the second parameter set.

[0158] In this way, when the electronic device detects the NFC interaction request again and determines that the application scenario of NFC is the second application scenario, the second parameter set can be directly called for near field communication, which is conducive to improving the performance of NFC.

[0159] The present application also provides an electronic device, which may include: a processor coupled to a memory. The memory may be used to store a computer program; the processor may be used to call the computer program in the memory so that the electronic device executes Figure 5 and Fig. 9 A method according to any one of the embodiments shown.

[0160] It should be understood that the processor in the embodiment of the present application can be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method embodiment can be completed by the hardware integrated logic circuit or software instructions in the processor. The above processor can be a general processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to perform, or the hardware and software modules in the decoding processor can be combined to perform. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.

[0161] It should also be understood that the memory in the embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM (DR RAM). It should be noted that the memory of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0162] The present application also provides a computer program product, which includes: a computer program (also referred to as code, or instruction), which enables an electronic device to execute each step in each method embodiment when the computer program is executed.

[0163] The present application also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program (also referred to as code or instruction). When the computer program is executed, the electronic device executes each step in each method embodiment.

[0164] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0165] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described systems, terminal devices and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0166] In the several embodiments provided in the present application, it should be understood that the disclosed systems, terminal devices and methods can be implemented in other ways. For example, the terminal device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the terminal device or unit can be electrical, mechanical or other forms.

[0167] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0168] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0169] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage media include: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memories (ROM), random access memories (RAM), magnetic disks or optical disks.

[0170] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A near field communication method, characterized in that: include: After detecting a near field communication (NFC) interaction request, determining that the NFC application scenario is a first scenario; Determining, based on a preset mapping relationship, a first parameter set corresponding to the first scenario, where the mapping relationship indicates a parameter set corresponding to each of a plurality of application scenarios, the plurality of application scenarios including the first scenario, the mapping relationship indicating multiple parameter sets, each of the multiple parameter sets including multiple parameters; The first parameter set is called to perform near field communication in the first scenario.

2. The method according to claim 1, characterized in that The multiple parameter sets also include a second parameter set, and the multiple parameters included in the first parameter set are different from the multiple parameters included in the second parameter set.

3. The method according to claim 1 or 2, characterized in that The multiple parameters include: dynamic load modulation (DLMA), analog threshold, phase, or operating voltage.

4. The method according to any one of claims 1 to 3, characterized in that The method further comprises: NFC interaction request is detected again; Determining that the application scenario of NFC is a second scenario, and the second scenario does not belong to the multiple application scenarios; In the second scenario, the multiple parameter sets are sequentially called to perform near field communication to obtain multiple response times; determining a second parameter set corresponding to the shortest response time among the multiple response times; Based on the correspondence between the second scenario and the second parameter set, the mapping relationship is updated.

5. The method according to any one of claims 1 to 4, characterized in that The first scenario includes bank card payment, access control, subway card payment or card reading.

6. The method according to any one of claims 1 to 5, characterized in that The multiple parameter sets are obtained by optimizing a default parameter set, which is a parameter set preset when the NFC chip leaves the factory.

7. An electronic device, characterized in that: include: A processor, configured to cause the electronic device to implement the method according to any one of claims 1 to 6 by executing a computer program and / or a logic circuit.

8. The electronic device according to claim 7, wherein: The system further comprises a memory for storing a computer program and / or a configuration file of the logic circuit.

9. The electronic device according to claim 7 or 8, characterized in that: A communication interface is also included for inputting and / or outputting signals.

10. A computer-readable storage medium, characterized in that Used to store a computer program, the computer program comprising instructions for implementing the method according to any one of claims 1 to 6.

11. A computer program product, characterized in that The invention comprises a computer program, and when the computer program is run, the method according to any one of claims 1 to 6 is performed.