NFC chip control method, terminal device and storage medium
By detecting the NFC RF card in the RF field of the NFC chip and sending a shutdown command, the conflict between the NFC chip card simulation function and the card reader function is resolved, ensuring the normal use of the NFC RF card and the normal operation of other functions of the NFC chip.
Patent Information
- Application Number
- CN202310842674.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-10
- Publication Date
- 2025-01-10
AI Technical Summary
When using an NFC radio frequency card, the card simulation function of the NFC chip may conflict with the card reader function, resulting in card reading failure.
By determining whether there is an NFC RF card in the RF field of the NFC chip, and sending control instructions to the NFC chip to turn off the card simulation function, avoiding conflicts.
The normal use of NFC radio frequency cards is realized, and the conflict between the card simulation function and the target function is avoided, and it does not affect other functions of the NFC chip.
Smart Images

Figure CN119294430A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the technical field of terminal devices, and specifically relates to a control method of an NFC chip, a terminal device, and a storage medium. Background Art
[0002] In some scenarios, the user may be very close to the mobile phone terminal when using an NFC card. For example, in the related technology, a back cover can be designed on the back of the mobile phone, and the user can insert NFC cards such as bus cards and access cards on the back cover, or put the NFC card into the mobile phone case. When the user uses the bus card or access card to pass through the gate or punch in, if the card simulation function of the NFC chip of the mobile phone terminal is enabled, it may cause the NFC card to conflict with the card simulation function of the NFC chip, causing the card reader to fail to read the card. Summary of the invention
[0003] The present application aims to provide a control method, terminal device and storage medium of an NFC chip, which can solve the problem of conflict between an NFC radio frequency card and the card simulation function of an NFC chip.
[0004] In a first aspect, an embodiment of the present application proposes a control method for an NFC chip, comprising: determining that there is an NFC radio frequency card in the radio frequency field of the NFC chip; sending a first control instruction to the NFC chip, wherein the first control instruction instructs to turn off a card simulation function of the NFC chip.
[0005] In a second aspect, an embodiment of the present application proposes a terminal device, comprising a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the method described in the first aspect.
[0006] In a third aspect, an embodiment of the present application proposes a storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.
[0007] In an embodiment of the present application, when it is determined that there is an NFC radio frequency card in the radio frequency field of the NFC chip, the card emulation function of the NFC chip is dynamically turned off by sending a first control instruction to the NFC chip, so that after the card emulation function of the NFC chip is turned off, the NFC radio frequency card can be used normally, thereby avoiding the conflict between the NFC radio frequency card and the card emulation function of the NFC chip, and turning off the card emulation function of the NFC chip alone will not affect the use of other functions of the NFC chip. BRIEF DESCRIPTION OF THE DRAWINGS
[0008] The above and / or additional aspects and advantages of the present invention will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:
[0009] Figure 1 It is a structural block diagram of a software system provided according to an embodiment of the present application;
[0010] Figure 2 This is a flow chart of a control method of an NFC chip provided in an embodiment of the present application;
[0011] Figure 3 It is a structural diagram of a terminal device provided in an embodiment of the present application;
[0012] Figure 4 This is another flow chart of the control method of the NFC chip provided in the embodiment of the present application;
[0013] Figure 5 This is another flow chart of the control method of the NFC chip provided in the embodiment of the present application;
[0014] Figure 6 It is a structural diagram of a terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0015] Embodiments of the present invention will be described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0016] In order to better understand the technical solution provided by this application, the technology involved in this application is first introduced.
[0017] In the related art, a target function of an NFC chip is proposed. The target function is a special card reader function. The special card reader function is activated only after the user uses an NFC radio frequency card to consume or punch in. The consumption or punch-in record of the NFC radio frequency card is read, and the read result is sent to an account specified by the user, for example, a user-specified mailbox or a user-specified instant messaging account. The target function can be called a touch mail send (TMS) function, or a passcase function.
[0018] The card emulation function refers to the NFC chip emulating the behavior of an NFC card and sending data to other NFC readers. For example, through card emulation, users can add the card information corresponding to their access card, bank card or bus card to a mobile phone or other device, and then use the access card, bank card or bus card through the device without carrying the physical card.
[0019] In the related art, the above target function is implemented by a separate NFC chip. If the above target function and other functions of the existing NFC chip share the same NFC chip, such as Figure 1 As shown, for example, the target function and the card simulation function and card reader function of the NFC chip share the same NFC chip. When the target function is enabled, since the card simulation function of the NFC chip is to use the NFC chip to simulate a physical radio frequency card, and the target function is to use the NFC chip as a special card reader function, the two functions are mutually exclusive. Therefore, the NFC chip can only use one of the card simulation function and the target function. In addition, in some scenarios, users may put the relevant NFC radio frequency card in the mobile phone case to facilitate the carrying of the NFC radio frequency card. Similarly, when using the NFC radio frequency card to swipe the card, since the NFC radio frequency card and the NFC chip in the mobile phone exist in the radio frequency field of the card reader at the same time, if the NFC chip has the card simulation function turned on, for the card reader, there are 2 NFC radio frequency cards in the current card reading range at the same time, which may cause the card reader to fail to read the card.
[0020] By adopting the technical solution provided in the embodiment of the present application, when it is determined that there is an NFC radio frequency card in the radio frequency field of the NFC chip, the card simulation function of the NFC chip is turned off separately. When the above-mentioned target function shares the same NFC chip with the card simulation function and the card reader function of the NFC chip, since the NFC chip needs to read the consumption record or punch-in record of the NFC radio frequency card when using the target function, there must be an NFC radio frequency card in the radio frequency field of the NFC chip. Therefore, by adopting the technical solution provided in the embodiment of the present application, in this scenario, the card simulation function of the NFC chip will be turned off, so that the target function of the NFC chip can be realized normally, and in the case that there is no NFC radio frequency card in the radio frequency field of the NFC chip, the card simulation function of the NFC chip will not be turned off, so that the card simulation function of the NFC chip can be used normally. Therefore, through the technical solution provided in the embodiment of the present application, it is possible to achieve the above-mentioned target function and the card simulation function sharing the same NFC chip. In addition, in the scenario where both an NFC card and an NFC chip in a mobile phone are present in the RF field of the card reader, the NFC card must also be present in the RF field of the NFC chip. Therefore, the card emulation function of the NFC chip will be turned off, so that the card reader can only read the NFC card, avoiding card reading failure.
[0021] The control scheme of the NFC chip provided in the embodiment of the present application is described in detail below through some embodiments and their application scenarios in conjunction with the accompanying drawings.
[0022] Figure 2 A flow chart of a control method of an NFC chip in an embodiment of the present application is shown. The method 200 can be executed by a first device including an NFC chip, wherein the first device can be a terminal, which is not limited in the embodiment of the present application. In other words, the method can be executed by software or hardware installed on the first device. Figure 1 As shown, the method may include the following steps.
[0023] S210: Determine whether an NFC radio frequency card exists in the radio frequency field of the NFC chip.
[0024] It is understandable that when it is determined that there is an NFC radio frequency card in the radio frequency field of the NFC chip, it means that the current NFC application scenario can be a usage scenario of the NFC radio frequency card. Therefore, in order to avoid conflicts, the card emulation function of the NFC chip can be turned off.
[0025] In the embodiment of the present application, whether there is an NFC radio frequency card in the radio frequency field of the NFC chip can be determined by whether the distance between the NFC chip and the NFC radio frequency card exceeds the communication distance of the NFC chip. For example, the card reader function of the NFC chip can be enabled to send a detection signal of a certain power. If there is an NFC radio frequency card within the coverage range of the detection signal, the NFC radio frequency card will respond to the detection signal and send a response message. When the NFC chip receives the response message, it is determined that the distance with the NFC radio frequency card does not exceed the communication distance of the NFC chip, that is, it is determined that there is an NFC radio frequency card in the radio frequency field of the NFC chip.
[0026] S220: Send a first control instruction to the NFC chip.
[0027] The first control instruction instructs to turn off the card emulation function of the NFC chip, and the first control instruction may be an NCI command.
[0028] For example, the first control instruction may be an initialization command that does not include turning on the card emulation function of the NFC chip. After receiving the initialization command, the NFC chip executes the initialization process, and does not execute the command to turn on the card emulation function of the NFC chip during the initialization process, thereby turning off the card emulation function of the NFC chip.
[0029] Of course, it is not limited to this, in practical applications, the first control instruction may also be other instructions for shutting down the card simulation function. For example, a switch for starting and stopping the card simulation function may be set, and the first control instruction may control the switch to stop the card simulation function.
[0030] In an embodiment of the present application, when it is determined that there is an NFC radio frequency card in the radio frequency field of the NFC chip, the card simulation function of the NFC chip is dynamically turned off by sending a first control instruction to the NFC chip, so that after the card simulation function of the NFC chip is turned off, the NFC radio frequency card can be used normally, avoiding the conflict between the NFC radio frequency card and the card simulation function of the NFC chip, and turning off the card simulation function of the NFC chip alone will not affect the use of other functions of the NFC chip. In addition, by turning off the card simulation function of the NFC chip when there is an NFC radio frequency card in the radio frequency field of the NFC chip, the normal use of the above-mentioned target function of the NFC chip can also be guaranteed, so that the target function can share the same NFC chip with the card simulation function.
[0031] In one implementation, after determining that an NFC radio frequency card exists in the radio frequency field of the NFC chip and before sending the first control instruction to the NFC chip, the method further includes: determining that a card emulation function of the NFC chip needs to be turned off.
[0032] In a possible implementation, the determination that the card simulation function of the NFC chip needs to be turned off includes: obtaining an input first operation instruction; and determining that the card simulation function of the NFC chip needs to be turned off based on the first operation instruction. The first operation instruction may be input through a switch, and the switch may include a physical switch or an analog switch. For example, a prompt message for turning off the card simulation function may be displayed on the touch screen, and the user determines the first operation instruction for turning off the card simulation function through the touch screen input. That is, in this implementation, when the first operation instruction from the user indicating turning off the card simulation function is received, it is determined that the card simulation function needs to be turned off. Alternatively, the first operation instruction may also be a first operation instruction indicating turning on the above-mentioned target function. Since the above-mentioned target function and the card simulation function are mutually exclusive, when the first operation instruction indicating turning on the above-mentioned target function is received, it may also be determined that the card simulation function of the NFC chip needs to be turned off.
[0033] In a possible implementation, determining that an NFC radio frequency card exists in the radio frequency field of the NFC chip may include one of the following:
[0034] (1) The NFC radio frequency card is detected through the card reading function of the NFC chip.
[0035] For example, the NFC chip can start the card reader function and periodically send a detection signal of a certain power. If there is an NFC radio frequency card within the coverage range of the detection signal, the NFC radio frequency card will respond to the detection signal and send a response message. When the NFC chip receives the response message, it determines that the distance to the NFC radio frequency card does not exceed the communication distance of the NFC chip, that is, it determines that there is an NFC radio frequency card in the radio frequency field of the NFC chip.
[0036] (2) A first distance between the NFC radio frequency card and the NFC chip is detected, and the first distance is less than a predetermined value.
[0037] The predetermined value may be the maximum effective communication distance between the NFC card and the NFC chip, beyond which the NFC card cannot be detected in the NFC chip's radio frequency field. Alternatively, the predetermined value may be a value set according to a specific application.
[0038] For example, assuming that a terminal with an NFC chip is equipped with an inductive sensor, when a user brings the NFC card close to the terminal, the inductive sensor can detect the NFC card and obtain a first distance between the NFC card and the terminal. When the first distance is less than a predetermined value, it is considered to be within the radio frequency range of the NFC chip, and it is determined that there is an NFC card in the radio frequency field of the NFC chip. In this way, it can be determined whether the NFC card is in the radio frequency field of the NFC chip by the first distance between the NFC card and the NFC chip.
[0039] Furthermore, when judging whether there is an NFC radio frequency card in the radio frequency field of the NFC chip by detecting the distance, further judgment can be made based on the holding time. That is to say, when the first distance between the NFC radio frequency card and the NFC chip is less than a predetermined value and is maintained within a certain time range, it can be determined that there is an NFC radio frequency card in the radio frequency field of the NFC chip. This is because in some application scenarios, reliable NFC communication can only be carried out when the first distance between the NFC radio frequency card and the NFC chip remains relatively constant. The distance remains relatively constant means that the duration of the first distance being less than the predetermined value is greater than the preset time. Based on the condition that the duration is greater than the preset time, some short-term contact or interference situations can be excluded, ensuring that the distance between the NFC radio frequency card and the NFC chip is stable and lasts for a preset period of time, which can reduce the possibility of misoperation, thereby accurately confirming the user's intention.
[0040] (3) Detecting that the NFC radio frequency card is inserted into the target card slot.
[0041] For example, Figure 3As shown, it is a schematic diagram of a terminal device 300, wherein a target card slot 301 is provided on the back of the terminal device, and an NFC radio frequency card 302 is installed in the target card slot 301. That is, when the NFC radio frequency card 302 is inserted into the target card slot 301, it can be determined that the NFC radio frequency card currently needs to be used, so the card emulation function of the NFC chip needs to be turned off.
[0042] In one implementation, a flag bit can be stored to record whether an NFC card is inserted into the target card slot. For example, when an NFC card is detected to be inserted into the target card slot, the value of the flag bit is set to true, and when an NFC card is detected to be not inserted into the target card slot, the value of the flag bit is set to false. Therefore, it can be determined whether the card simulation function of the NFC chip needs to be turned off based on the value of the flag bit. For example, when the value of the flag bit is true, it is determined that the card simulation function of the NFC chip needs to be turned off, and when the value of the flag bit is false, it is determined that the card simulation function of the NFC chip needs to be turned on. It should be noted that Figure 3 The target card slot in the present application is only an example, and other target objects that achieve the same function as the target card slot in the present application can also be used.
[0043] In one implementation, after determining that there is an NFC radio frequency card in the radio frequency field of the NFC chip and before sending the first control instruction to the NFC chip, the method further includes: detecting the NFC radio frequency field strength through the NFC chip, and the detected NFC radio frequency field strength is greater than a preset field strength threshold. It is understandable that whether the NFC chip enters the radio frequency field of another card reader can be determined based on whether the NFC radio frequency field strength is greater than the preset field strength threshold. If so, it means that the current scenario may be a NFC radio frequency card swiping scene. In order to avoid conflicts, the card simulation function can be turned off.
[0044] Optionally, the RF_FIELD_INFO_NTF parameter in the NFC controller interface (NCI) protocol of the NFC chip can be used to determine whether the NFC card has entered the RF field of the NFC chip. When the NFC card enters the RF field of the NFC chip, the terminal will obtain a message corresponding to the RF_FIELD_INFO_NTF parameter.
[0045] In the above implementation, when it is determined that there is an NFC radio frequency card in the radio frequency field of the NFC chip, if it is detected that the NFC chip is in the NFC radio frequency field of other devices, it means that the NFC radio frequency card is currently being read and written by other card readers. Therefore, in order to ensure that the NFC radio frequency card can be read and written normally, a first control instruction is sent to the NFC chip to turn off the card emulation function of the NFC chip.
[0046] In one implementation, the sending of the first control instruction to the NFC chip includes: sending a first initialization instruction to the NFC chip, wherein the first initialization instruction does not include an instruction to instruct to turn on the card emulation function of the NFC chip. It can be understood that the first initialization instruction means that when the user chooses to turn on the card emulation function of the NFC chip, the NFC initialization work can be completed through the enable() interface provided by the NFC service, and the initialization work includes enabling the secure element (SE) function, that is, turning on the card emulation function of the NFC chip; when the user chooses to turn off the card emulation function of the NFC chip, the NFC initialization work can be completed through the enable() interface provided by the NFC service, and the initialization work does not include enabling the SE function, that is, skipping enabling the SE function, that is, skipping enabling the SE function to turn off the card emulation function of the NFC chip.
[0047] Figure 4 Another flow chart of the control method of the NFC chip in the embodiment of the present application is shown. The method 400 can be executed by a first device including the NFC chip, wherein the first device can be a terminal, which is not limited in the embodiment of the present application. In other words, the method can be executed by software or hardware installed on the first device. Figure 4 As shown, the method may include the following steps.
[0048] S410: Determine whether an NFC radio frequency card exists in the radio frequency field of the NFC chip.
[0049] S420: Send a first control instruction to the NFC chip.
[0050] The first control instruction instructs to turn off the card emulation function of the NFC chip.
[0051] It should be noted that S410 and S420 can refer to Figure 2 The description of S210 and S220 in the embodiment will not be repeated here.
[0052] S430: Send a second control instruction to the NFC chip.
[0053] The second control instruction instructs to turn on the card emulation function of the NFC chip, and the second control instruction may be an NCI command.
[0054] It is understandable that when the user chooses to turn on the card emulation function of the NFC chip, the second control instruction may be used to instruct to turn on the card emulation function of the NFC chip.
[0055] In this embodiment, after determining that there is an NFC radio frequency card in the radio frequency field of the NFC chip, different instructions are sent to control the turning on and off of the card simulation function of the NFC chip, thereby realizing dynamic switching of the card simulation function of the NFC chip. By dynamically switching the NFC card simulation function, the terminal device can be switched from the NFC radio frequency card reading mode to the card simulation function in a timely manner, thereby providing a better user experience.
[0056] Furthermore, by sending different instructions to control the opening and closing of the card emulation function of the NFC chip, it is achieved that only one NFC chip is used so that the same terminal can switch freely between the NFC and target functions.
[0057] In an implementation manner, sending the second control instruction to the NFC chip includes: when it is determined that a card emulation function of the NFC chip needs to be enabled, sending the second control signaling to the NFC chip.
[0058] In one implementation, determining that the card emulation function of the NFC chip needs to be turned on includes: determining that there is no NFC radio frequency card in the radio frequency field of the NFC chip. In other words, if there is no NFC radio frequency card in the radio frequency field of the NFC chip, it means that the current NFC application scenario is not a usage scenario of the NFC radio frequency card, and therefore, the card emulation function can be turned on.
[0059] In yet another implementation, determining that there is no NFC radio frequency card in the radio frequency field of the NFC chip may include one of the following:
[0060] (1) The NFC card cannot be detected by the card reading function of the NFC chip.
[0061] It is understandable that the card reading function of the NFC chip can be used to detect and read NFC radio frequency cards. When the NFC chip of the terminal uses the card reading function, the presence of the NFC radio frequency card can be detected by approaching or touching it. If the presence of the NFC radio frequency card is not detected when the card reading function is used, it means that the distance between the NFC radio frequency card and the NFC chip is greater than the communication distance of the NFC chip.
[0062] (2) A second distance between the NFC radio frequency card and the NFC chip is detected, and the second distance is greater than a predetermined value.
[0063] The predetermined value refers to the maximum effective communication distance between the NFC radio frequency card and the NFC chip. If the predetermined value is exceeded, the NFC radio frequency card cannot be detected in the radio frequency field of the NFC chip.
[0064] For example, assuming that a terminal with an NFC chip is equipped with an inductive sensor, when a user brings the NFC card close to the terminal, the inductive sensor can detect the NFC card and obtain a second distance between the NFC card and the terminal. When the second distance is greater than a predetermined value, it is deemed to be beyond the radio frequency range of the NFC chip, and it is determined that there is no NFC card in the radio frequency field of the NFC chip. In this way, it can be determined that the NFC card is not in the radio frequency field of the NFC chip through the second distance between the NFC card and the NFC chip.
[0065] Further, similar to the above determination that the NFC card simulation function needs to be turned off, when determining whether there is an NFC card in the NFC chip's RF field by detecting the distance, further determination can be made based on the holding time. That is, when the second distance between the NFC card and the NFC chip is greater than a predetermined value and is maintained within a certain time range, it can be determined that there is no NFC card in the NFC chip's RF field.
[0066] (3) It is detected that no NFC radio frequency card is inserted into the target card slot.
[0067] Continue to refer Figure 3 If the NFC radio frequency card 302 is out of the target card slot 301, that is, the target card slot does not have an NFC radio frequency card inserted, it means that the user will not use the NFC radio frequency card for the time being. In order to ensure the normal implementation of the NFC function, the card simulation function of the NFC chip can be turned on. It should be noted that Figure 3 The target card slot in the present application is only an example, and other target objects that achieve the same function as the target card slot in the present application can also be used.
[0068] Similar to the above determination that the NFC card simulation function needs to be turned off, a flag bit built into the terminal can be used, and the value of the flag bit can include but is not limited to true or false, where True indicates that the card simulation function needs to be turned off, and false indicates that the card simulation function needs to be turned on; when it is detected that no NFC radio frequency card is inserted into the target card slot, the value of the flag bit can be determined to be false. When the value of the flag bit is determined to be false, it is determined that the card simulation function of the NFC chip needs to be turned on. It should be noted that the value of the flag bit can be set according to actual conditions, and this application does not make specific restrictions.
[0069] In one implementation, the determining that the card emulation function of the NFC chip needs to be turned on includes: obtaining an input second operation instruction; and determining that the card emulation function of the NFC chip needs to be turned on based on the second operation instruction. It is understandable that the second operation instruction may refer to an operation instruction for the terminal where the NFC chip is located, and the second operation instruction may or may not indicate turning on the card emulation function of the NFC chip. However, when it is determined that the second operation instruction indicates turning on the card emulation function of the NFC chip, it is determined that the card emulation function of the NFC chip needs to be turned on.
[0070] In the above implementation, the second operation instruction can be input through a switch, which can be a physical switch or an analog switch. The specific input method is similar to the above first operation instruction and will not be repeated here.
[0071] In one implementation, the sending of the second control instruction to the NFC chip includes: sending a second initialization instruction to the NFC chip, wherein the second initialization instruction includes an instruction to instruct to turn on the card emulation function of the NFC chip. It can be understood that the second initialization instruction means that when the user chooses to turn on the card emulation function of the NFC chip, the NFC initialization work can be completed through the enable() interface provided by the NFC service, and the initialization work includes enabling the SE function, that is, turning on the card emulation function of the NFC chip; when the user chooses to turn on the card emulation function of the NFC chip, the NFC initialization work can be completed through the enable() interface provided by the NFC service, and the initialization work includes enabling the SE function, that is, not skipping the enabling of the SE function, that is, turning on the card emulation function of the NFC chip by enabling the SE function.
[0072] It should be noted that the above-mentioned first control instruction, first operation instruction, first initialization instruction, second control instruction, second operation instruction, second initialization instruction and second preset value can be stored in a database file of a terminal device, a network server, etc., and this application does not make specific limitations.
[0073] Figure 5 A flowchart of a specific embodiment of the control method of the NFC chip provided in the embodiment of the present application is shown as follows: Figure 5 As shown, this embodiment includes the following steps.
[0074] S510: Whether to enable the card emulation function.
[0075] If yes, jump to S530; otherwise, jump to S520.
[0076] Furthermore, the judgment may be realized by storing a variable in the mobile phone, or a menu may be used to allow the user to select and then inform the NFC service.
[0077] Furthermore, since the NFC function and the target function use the same NFC hardware, the two functions also use the same NFC underlying service. Turning on or off the card emulation function can be achieved through the enable() related interface provided by the NFC underlying service to the upper layer.
[0078] S520: Send an NCI command to enable SE.
[0079] Send an NCI command to the NFC chip to enable SE. The command may be: NFCEE_MODE_SET_CMD, which is a standard NFC NCI command. The SE referred to by the command may be a Universal Integrated Circuit Card (UICC) or an Embedded Secure Element (ESE).
[0080] S530: Complete the underlying NFC service enable() interface related process and end the enable() process.
[0081] In this embodiment, when the user selects the NFC function, the NFC initialization can be completed through the enable() interface provided by the NFC service. When the user selects the target function, the NCI command to enable the SE function can be skipped during the process of the NFC service starting the enable() interface to complete the initialization. In this way, the SE can be initialized without turning off the SE, and the NFC and target functions can be switched freely without affecting each other.
[0082] like Figure 6 As shown, the embodiment of the present application further provides a terminal device 600, including a processor 601 and a memory 602, wherein the memory 602 stores a program or instruction that can be run on the processor 601, and when the program or instruction is executed by the processor 601, the above Figures 1 to 5 The various steps of the illustrated embodiments can achieve the same technical effect, and will not be described again here to avoid repetition.
[0083] The embodiment of the present application also provides a storage medium on which a program or instruction is stored, and when the program or instruction is executed by a processor, the above Figures 1 to 5 The various processes of the illustrated embodiments can achieve the same technical effect, and will not be described again here to avoid repetition.
[0084] The processor is the processor in the terminal described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk. In some examples, the readable storage medium may be a non-transient readable storage medium.
[0085] The present application also provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the above Figures 1 to 5 The various processes of the illustrated embodiments can achieve the same technical effect, and will not be described again here to avoid repetition.
[0086] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0087] The present application embodiment further provides a computer program / program product, wherein the computer program / program product is stored in a storage medium, and the computer program / program product is executed by at least one processor to implement the above Figures 1 to 5 The various processes of the illustrated embodiments can achieve the same technical effect, and will not be described again here to avoid repetition.
[0088] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises one..." does not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the method and device in the embodiment of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0089] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of a computer software product plus a necessary general hardware platform, and of course, can also be implemented by hardware. The computer software product is stored in a storage medium (such as ROM, RAM, disk, CD, etc.), including several instructions to enable a terminal or a network-side device to execute the methods described in each embodiment of the present application.
[0090] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms of implementation methods without departing from the purpose of the present application and the scope of protection of the claims, and these implementation methods are all within the protection of the present application.
Claims
1. A control method for an NFC chip, characterized in that: include: Determine that there is an NFC radio frequency card in the radio frequency field of the NFC chip; A first control instruction is sent to the NFC chip, wherein the first control instruction instructs to disable a card emulation function of the NFC chip.
2. The method according to claim 1, characterized in that After determining that there is an NFC radio frequency card in the radio frequency field of the NFC chip and before sending the first control instruction to the NFC chip, the method further includes: It is determined that the card emulation function of the NFC chip needs to be disabled.
3. The method according to claim 2, characterized in that The determining that the card emulation function of the NFC chip needs to be disabled includes: Obtaining a first input operation instruction; Based on the first operation instruction, it is determined that a card emulation function of the NFC chip needs to be disabled.
4. The method according to claim 1, characterized in that: Determining that there is an NFC radio frequency card in the radio frequency field of the NFC chip includes one of the following: The NFC radio frequency card is detected by the card reading function of the NFC chip; Detecting a first distance between the NFC radio frequency card and the NFC chip, and the first distance is less than a predetermined value; It is detected that the NFC radio frequency card is inserted into the target card slot.
5. The method according to claim 1 or 4, characterized in that: After determining that there is an NFC radio frequency card in the radio frequency field of the NFC chip and before sending the first control instruction to the NFC chip, the method further includes: The NFC radio frequency field strength is detected by the NFC chip, and the detected NFC radio frequency field strength is greater than a preset field strength threshold.
6. The method according to any one of claims 1 to 4, characterized in that: The sending a first control instruction to the NFC chip includes: A first initialization instruction is sent to the NFC chip, wherein the first initialization instruction does not include an instruction instructing to enable a card emulation function of the NFC chip.
7. The method according to claim 1, characterized in that After sending the first control instruction to the NFC chip, the method further includes: A second control instruction is sent to the NFC chip, wherein the second control instruction instructs to turn on a card emulation function of the NFC chip.
8. The method according to claim 7, characterized in that The sending a second control instruction to the NFC chip includes: When it is determined that the card emulation function of the NFC chip needs to be enabled, the second control signaling is sent to the NFC chip.
9. The method according to claim 8, characterized in that The determining that the card emulation function of the NFC chip needs to be enabled includes: Obtaining a second input operation instruction; Based on the second operation instruction, it is determined that a card emulation function of the NFC chip needs to be enabled.
10. The method according to claim 8, characterized in that The determining that the card emulation function of the NFC chip needs to be enabled includes: It is determined that the NFC radio frequency card does not exist in the radio frequency field of the NFC chip.
11. The method according to claim 10, characterized in that The determining that the NFC radio frequency card does not exist in the radio frequency field of the NFC chip includes one of the following: The NFC radio frequency card cannot be detected through the card reading function of the NFC chip; Detecting a second distance between the NFC radio frequency card and the NFC chip, and the second distance is greater than a predetermined value; It is detected that the NFC radio frequency card is not inserted into the target card slot.
12. The method according to any one of claims 7 to 11, characterized in that: The sending a second control instruction to the NFC chip includes: A second initialization instruction is sent to the NFC chip, wherein the second initialization instruction includes an instruction to enable a card emulation function of the NFC chip.
13. A terminal device, characterized in that: The invention comprises a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein when the program or instruction is executed by the processor, the steps of the control method of the NFC chip according to any one of claims 1 to 12 are implemented.
14. A storage medium, characterized in that: The storage medium stores a program or instruction, and when the program or instruction is executed by the processor, the steps of the NFC chip control method according to any one of claims 1 to 12 are implemented.