Near field communication (NFC) function control method and device and storage medium
Through the three-stage sliding position selection function of the NFC function control, the NFC function mode is separated, which solves the power consumption and mistouch problems when the NFC function is turned on, and optimizes the user experience and power use.
Patent Information
- Application Number
- CN202310552538.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-16
- Publication Date
- 2024-11-22
AI Technical Summary
In the prior art, the NFC function operates simultaneously in the card simulation mode and the read and write card mode when the NFC function is turned on, resulting in an increase in terminal power consumption. When other NFC devices or cards are accidentally touched, pop-ups will be triggered, affecting the user experience, and the existing Read and write, do not disturb' optimization solution only works for some types of cards.
Through the NFC function control, the function control with three-segment sliding position is provided. The user can select the NFC function mode as the off mode, the card simulation mode or the read and write card mode, and send corresponding functional instructions based on the selected mode to separate the card simulation and read and write card. Function to avoid power consumption problems and accidentally touching pop-ups caused by simultaneously enabling them.
It effectively avoids the increase in power consumption and false touch pop-up problems when the NFC function is turned on, optimizes the user experience, and by separating the NFC working mode, only the corresponding functions are enabled when needed, reducing unnecessary power consumption and false touch activation.
Smart Images

Figure CN119002773A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of near field communication (NFC) function control, and in particular to a near field communication (NFC) function control method, device and storage medium. Background Art
[0002] When the NFC function of the terminal is turned on, it mainly has card simulation mode and card reading and writing mode. The card simulation mode is a mode that simulates the functions of a transportation card and an access card; the card reading and writing mode is a function that reads card information and adds it to the NFC device, and can also interact with other NFC devices.
[0003] In the related technology, the control of the NFC (Near Field Communication) function only has two modes: on and off. However, when the NFC function is turned on, the card simulation mode and the card reading and writing mode will run at the same time, resulting in increased terminal power consumption. When in contact with other cards or NFC devices, the terminal will issue a reminder, affecting the user experience.
[0004] In the related art, there are optimization solutions like "Do Not Disturb Read / Write" to avoid accidental touches on some NFC Data Exchange Format (NDEF) type cards, but even if Do Not Disturb Read / Write is turned on, it only works for some types of cards, and the pop-up window for reading other types of cards will not be blocked. In addition, the related art only blocks the relevant notifications, and the two working modes are still running at the same time, which still leads to increased power consumption. Summary of the invention
[0005] In order to overcome the problems existing in the related art, the present disclosure provides a near field communication (NFC) function control method, device and storage medium.
[0006] According to a first aspect of an embodiment of the present disclosure, a near field communication (NFC) function control method is provided, which is applied to a terminal, and the method includes: in response to detecting that an NFC function control of the terminal is triggered, determining the NFC function mode currently triggered to execute by the NFC function control, the NFC function mode provided by the NFC function control when triggered including an NFC function off mode, a card emulation mode, or a card reading and writing mode; based on the NFC function mode currently triggered to execute, providing an NFC function corresponding to the NFC function mode currently triggered to execute.
[0007] In one embodiment, the NFC function control is a function control that provides three-stage sliding positions through the sliding of a slider, and different positions of the three-stage sliding positions correspond to different NFC function modes; determining the NFC function mode currently triggered to execute by the NFC function control includes: in response to detecting that the slider is triggered to slide to the middle position of the three-stage sliding positions of the NFC function control, determining that the NFC function mode currently triggered to execute by the NFC function control is an off mode; or in response to detecting that the slider is triggered to slide to one side of the three-stage sliding positions of the NFC function control, determining that the NFC function mode currently triggered to execute by the NFC function control is a card emulation mode; or in response to detecting that the slider is triggered to slide to the other side of the three-stage sliding positions of the NFC function control, determining that the NFC function mode currently triggered to execute by the NFC function control is a card reading and writing mode.
[0008] In one embodiment, providing an NFC function corresponding to the NFC function mode currently triggered for execution based on the NFC function mode currently triggered for execution includes: sending an NFC function instruction matching the NFC function mode currently triggered for execution to an NFC agent by an NFC function setting interface where the NFC function control is located; calling an NFC function service of an NFC service layer to execute the NFC function instruction, and providing an NFC function matching the NFC function mode currently triggered for execution.
[0009] In one implementation, the NFC function mode currently triggered to be executed is an NFC function off mode, and the NFC function instruction includes a stop card emulation function instruction and a stop card reading and writing function instruction.
[0010] In one implementation, the NFC function mode currently triggered to be executed is a card emulation mode, and the NFC function instruction includes an instruction to enable a card emulation function and an instruction to stop a card reading and writing function.
[0011] In one implementation, the NFC function mode currently triggered to be executed is a card reading and writing mode, and the NFC function instruction includes a stop card simulation function instruction and an enable card reading and writing function instruction.
[0012] According to a second aspect of an embodiment of the present disclosure, a near field communication NFC function control device is provided, which is applied to a terminal, and the device includes: a determination unit, in response to detecting that an NFC function control of the terminal is triggered, determining the NFC function mode currently triggered to execute by the NFC function control, wherein the NFC function mode provided by the NFC function control when triggered includes an NFC function off mode, a card emulation mode, or a card reading and writing mode; a processing unit, based on the NFC function mode currently triggered to execute, providing an NFC function corresponding to the NFC function mode currently triggered to execute.
[0013] In one embodiment, the NFC function control is a function control that provides three-stage sliding positions through the sliding of a slider, and different positions of the three-stage sliding positions correspond to different NFC function modes; the determination unit determines the NFC function mode currently triggered to execute by the NFC function control in the following manner: in response to detecting that the slider is triggered to slide to the middle position of the three-stage sliding positions of the NFC function control, determining that the NFC function mode currently triggered to execute by the NFC function control is an off mode; or in response to detecting that the slider is triggered to slide to one side of the three-stage sliding positions of the NFC function control, determining that the NFC function mode currently triggered to execute by the NFC function control is a card emulation mode; or in response to detecting that the slider is triggered to slide to the other side of the three-stage sliding positions of the NFC function control, determining that the NFC function mode currently triggered to execute by the NFC function control is a card reading and writing mode.
[0014] In one embodiment, the processing unit provides an NFC function corresponding to the NFC function mode currently being triggered for execution based on the NFC function mode currently being triggered for execution in the following manner: an NFC function setting interface where the NFC function control is located sends an NFC function instruction that matches the NFC function mode currently being triggered for execution to an NFC agent; and calls the NFC function service of the NFC service layer to execute the NFC function instruction, and provides an NFC function corresponding to the NFC function mode currently being triggered for execution.
[0015] In one implementation, the NFC function mode currently triggered to be executed is an NFC function off mode, and the NFC function instruction includes a stop card emulation function instruction and a stop card reading and writing function instruction.
[0016] In one implementation, the NFC function mode currently triggered to be executed is a card emulation mode, and the NFC function instruction includes an instruction to enable a card emulation function and an instruction to stop a card reading and writing function.
[0017] In one implementation, the NFC function mode currently triggered to be executed is a card reading and writing mode, and the NFC function instruction includes a stop card simulation function instruction and an enable card reading and writing function instruction.
[0018] According to a third aspect of an embodiment of the present disclosure, a near field communication (NFC) function control device is provided, comprising: a processor; and a memory for storing processor executable instructions; wherein the processor is configured to: execute the near field communication (NFC) function control method described in the first aspect or any one of the implementations of the first aspect.
[0019] According to a fourth aspect of an embodiment of the present disclosure, a storage medium is provided, in which instructions are stored. When the instructions in the storage medium are executed by a processor, the processor is enabled to execute the near field communication NFC function control method described in the first aspect or any one of the embodiments of the first aspect.
[0020] The technical solution provided by the embodiments of the present disclosure may include the following beneficial effects: triggering the execution of NFC function modes such as NFC function off mode, card emulation mode or card reading and writing mode through the NFC function control, and providing corresponding NFC functions based on the triggered NFC function mode. Separating the three NFC working modes of card emulation, card reading and writing, and NFC off, avoiding the power consumption problem caused by enabling the card emulation function and the card reading and writing function at the same time when the NFC function is turned on, and avoiding triggering a pop-up window when accidentally touching a card with an NFC data exchange format.
[0021] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0023] Figure 1 It is a schematic diagram of a near field communication NFC function control according to an exemplary embodiment of the present disclosure.
[0024] Figure 2 It is a schematic diagram showing a terminal device contacting a card surface having an NFC data exchange format type to trigger a pop-up window according to an exemplary embodiment of the present disclosure.
[0025] Figure 3 The present invention is a flowchart of a method for controlling a near field communication (NFC) function according to an exemplary embodiment.
[0026] Figure 4The present invention is a flowchart showing a method for triggering an NFC function mode executed by an NFC function control according to an exemplary embodiment.
[0027] Figure 5 It is a schematic diagram of a near field communication NFC function control according to another exemplary embodiment of the present disclosure.
[0028] Figure 6 The present invention is a block diagram showing a method of triggering an NFC function mode through a near field communication (NFC) function control according to an exemplary embodiment of the present disclosure.
[0029] Figure 7 The invention is a flowchart showing a method for triggering an NFC function mode to provide a corresponding NFC function according to an exemplary embodiment.
[0030] Figure 8 The present invention is a flowchart showing a method for triggering an NFC function mode to provide a corresponding NFC function according to yet another exemplary embodiment.
[0031] Fig. 9 The present invention is a flowchart showing a method for triggering an NFC function mode to provide a corresponding NFC function according to yet another exemplary embodiment.
[0032] Fig.10 The present invention is a flowchart showing a method for triggering an NFC function mode to provide a corresponding NFC function according to yet another exemplary embodiment.
[0033] Fig.11 The present invention is a block diagram showing a method for controlling a near field communication (NFC) function according to an exemplary embodiment of the present invention.
[0034] Fig.12 The present invention is a block diagram of a device for controlling a near field communication (NFC) function according to an exemplary embodiment.
[0035] Fig.13 The invention is a block diagram of a device for controlling a near field communication (NFC) function according to an exemplary embodiment. DETAILED DESCRIPTION
[0036] Here, exemplary embodiments will be described in detail, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present disclosure.
[0037] The near field communication NFC function control method provided by the embodiment of the present disclosure is applied to a scenario in which a terminal device with an NFC function triggers execution of a corresponding NFC function mode based on requirements for different NFC functions.
[0038] At present, most mobile terminals such as mobile phones are equipped with NFC functions, which provide users with a convenient lifestyle and are widely popular. It has also become a major selling point when major manufacturers launch new mobile phones. The NFC function of the terminal often uses NFC function modes: card simulation and card reading and writing: 1. Card simulation: This mode is to simulate a mobile phone with NFC function into a contactless card through the mobile phone software, such as access card, bank card, transportation card, car key, etc., write the functions of various cards into the NFC function module of the terminal, and realize the functions of various cards through the terminal. It solves the trouble of people carrying multiple cards when going out, and can also realize the function of "mobile wallet". 2. Card reading and writing: This mode is used as a contactless card reader, which is similar to the working principle of today's barcode scanning. In this mode, the mobile phone with NFC function can collect data from the TAG and then process it according to the requirements of the application. TAG represents a passive readable NFC target. Terminal devices with NFC function enabled can read the information contained in the TAG, for example, read bus card information and realize the recharge function; read access control card and add the card information to the mobile phone; connect Bluetooth to realize file transfer by bringing the mobile phone into close contact with the tag on the computer; read detailed information from posters or exhibition information electronic tags, etc.
[0039] In the related technologies, all manufacturers use the same solution for the combination of card reading and writing mode and card emulation mode, that is, the underlying chip of the NFC function has two stages: card emulation function (Listening) and card reading and writing function (Polling). Figure 1 As shown in the schematic diagram of the near field communication NFC function control, the terminal control of the NFC function in the related technology only includes turning on and off the NFC function. When the NFC function is turned on, the card simulation mode and the card reading and writing mode are enabled at the same time, and the card simulation function and the card reading and writing function in the underlying chip are kept turned on. Through continuous polling within a certain time period, it is determined whether the current application scenario is card simulation or card reading and writing, and then the corresponding logical processing is entered. However, in daily use, users often only perform card reading operations when using the card for the first time. After that, most of the scenarios where the NFC function is used are card simulation (Listening). Undoubtedly, the underlying card reading (Polling) stage during polling has increased the power consumption of our mobile phones in vain. And as Figure 2 As shown in the schematic diagram of the pop-up box triggered by the terminal device touching the card with NFC data exchange format type, there is a possibility of accidental touch when the card simulation mode and the card reader and writer mode are enabled at the same time. Accidentally touching a card with NFC data exchange format or placing two NFC-enabled terminals close together will cause the mobile phone to pop up the corresponding label or interface, affecting the user experience.
[0040] In order to solve the problem of pop-up windows caused by accidentally touching other NFC-enabled terminals or cards with NFC data exchange format, there are optimization solutions such as "Read and Write Do Not Disturb" in related technologies to avoid some accidental touches on NDEF type cards. However, even if Read and Write Do Not Disturb is turned on, the pop-up windows for reading other types of cards will not be blocked. In addition, the bottom layer of this solution will always maintain the polling state, which only blocks the notifications of the upper layer, and does not optimize the power consumption.
[0041] In view of this, the present disclosure proposes a near field communication NFC function control method, which triggers the execution of NFC function modes such as NFC function off mode, card emulation mode or card reading and writing mode through an NFC function control, and separates the three NFC working modes of card emulation, card reading and writing, and NFC off.
[0042] Figure 3 FIG. 1 is a flow chart of a method for controlling a near field communication (NFC) function according to an exemplary embodiment. Figure 3 As shown, the method includes step S101 to step S102.
[0043] In step S101, in response to detecting that an NFC function control of a terminal is triggered, an NFC function mode in which the NFC function control is currently triggered to execute is determined.
[0044] Among them, the NFC function mode provided by the NFC function control when triggered includes NFC function off mode, card emulation mode or card reading and writing mode.
[0045] In the disclosed embodiment, the NFC function control is a user interface (UI) with three levels of switching, which can be entered through interface navigation in the terminal's setting interface, or can be set in a drop-down window of the terminal and entered in the drop-down window by calling the drop-down window in the current interface.
[0046] In step S102, based on the NFC function mode currently triggered for execution, an NFC function corresponding to the NFC function mode currently triggered for execution is provided.
[0047] In the disclosed embodiment, the NFC function control with a switching function is used to trigger the execution of NFC function modes such as NFC function off mode, card emulation mode or card reading and writing mode, and provide corresponding NFC functions based on the triggered NFC function mode. The three NFC working modes of card emulation, card reading and writing, and NFC off are separated to avoid power consumption problems caused by enabling the card emulation function and the card reading and writing function at the same time when the NFC function is turned on, and to avoid triggering a pop-up window when accidentally touching a card with an NFC data exchange format.
[0048] In the embodiments of the present disclosure, different NFC function modes are triggered by controlling the NFC function control, and the NFC function off mode, card emulation mode or card reading and writing mode correspond to different NFC function control states. The following embodiments of the present disclosure illustrate the steps of the NFC function mode triggered by the NFC function control.
[0049] Figure 4 FIG. 1 is a flow chart showing a method for triggering an NFC function mode executed by an NFC function control according to an exemplary embodiment. Figure 4 As shown, the method includes step S201, step S202A, step S202B and step S202C.
[0050] In step S201, the NFC function mode is triggered and executed by the NFC function control.
[0051] In step S202A, in response to detecting that the slider is triggered to slide to the middle position of the three-stage sliding positions of the NFC function control, it is determined that the NFC function mode currently triggered to execute by the NFC function control is the off mode.
[0052] In step S202B, in response to detecting that the slider is triggered to slide to one side of the three-stage sliding position of the NFC function control, it is determined that the NFC function mode currently triggered to execute by the NFC function control is the card emulation mode.
[0053] In step S202C, in response to detecting that the slider is triggered to slide to the other side of the three-stage sliding position of the NFC function control, it is determined that the NFC function mode currently triggered to execute by the NFC function control is the card reading and writing mode.
[0054] In the embodiment of the present disclosure, the NFC menu bar is changed in the page that controls the NFC function mode, and the NFC function control, i.e., the NFC switch, is adjusted from the original two states of "on-off" to three states of "card emulation mode-off mode-card reading and writing mode", so that the user can select the corresponding NFC function mode according to the current application scenario of the NFC function. Figure 5 Schematic diagram of NFC function control and Figure 6The block diagram of triggering the NFC function mode through the near field communication NFC function control is shown in the figure. The NFC function control is an operating interface with a three-stage slider, and the user can select the corresponding NFC function mode by sliding the slider. In this example, the slider is in the middle to trigger the execution of the off mode, that is, to turn off the NFC function. The slider is on the left to turn on the card simulation mode, that is, the card swiping mode. The slider is on the right to turn on the card reading and writing mode (that is, the card reading mode). It can be understood that the NFC function mode corresponding to different slider positions of the NFC function control is not fixed, and can be adjusted based on needs. The display method of the NFC function control is not limited to the capsule form in the figure, and can change based on the display interface theme selected by the user.
[0055] In the disclosed embodiment, by sliding the slider of the NFC function control to select the off mode, the card reading and writing mode or the card simulation mode in the NFC function mode, the NFC function of the terminal enables one of the card reading and writing mode and the card simulation mode when it is turned on, and the card reading and writing mode and the card simulation mode are separated. This avoids the power consumption problem caused by the NFC bottom layer constantly polling to determine the current usage scenario when the card simulation function and the card reading and writing function are enabled at the same time when the NFC function is turned on, and avoids triggering a pop-up window when accidentally touching a card with an NFC data exchange format when the card simulation mode is enabled.
[0056] In the present disclosure, Figure 6 As shown, different functional modes of the NFC function are realized by enabling corresponding functions in the service layer. After the user selects the NFC functional mode in the NFC control, the corresponding control instruction needs to be transmitted to the service layer and the corresponding function needs to be enabled to complete the selection of the NFC mode. The following embodiments of the present disclosure further illustrate the steps of the NFC functional mode triggered and executed by the NFC functional control.
[0057] Figure 7 FIG. 1 is a flow chart showing a method for triggering an NFC function mode to provide a corresponding NFC function according to an exemplary embodiment. Figure 7 As shown, the method includes step S301 to step S302.
[0058] In step S301, the NFC function setting interface where the NFC function control is located sends an NFC function instruction matching the NFC function mode currently triggered to be executed to the NFC agent.
[0059] In step S302, the NFC function service of the NFC service layer is called to execute the NFC function instruction, and provide an NFC function corresponding to the NFC function mode currently triggered for execution.
[0060] In the disclosed embodiment, in response to the user selecting the NFC function mode in the NFC function control, the NFC function setting interface sends an NFC function instruction, i.e., an NFC function mode switching instruction, to the NFC agent. The NFC agent sends the NFC function instruction to the NFC function service layer and calls the NFC function service. The underlying code corresponding to different modes in the NFC chip is changed through the NFC chip driver, and the modified underlying code is sent to the NFC protocol stack. After the modified underlying code takes effect, the corresponding NFC function is turned on to complete the switching of the NFC function mode.
[0061] The following embodiments of the present disclosure illustrate the steps of triggering the execution of the NFC function off mode through the NFC function control.
[0062] Figure 8 FIG. 1 is a flowchart of a method for triggering an NFC function mode to provide a corresponding NFC function according to another exemplary embodiment. Figure 8 As shown, the method includes step S401 to step S402.
[0063] In step S401, the NFC function setting interface where the NFC function control is located sends an NFC function instruction matching the NFC function mode currently triggered to be executed to the NFC agent.
[0064] In step S402, the NFC function mode triggered to be executed is the NFC function off mode.
[0065] Among them, the NFC function instructions include a stop card emulation function instruction and a stop card reading and writing function instruction.
[0066] In the embodiment of the present disclosure, the card simulation function corresponds to the card simulation mode, and the card reading and writing function corresponds to the card reading and writing mode. The NFC function shutdown mode is realized by issuing instructions to shut down the card simulation function and the card reading and writing function.
[0067] The following embodiments of the present disclosure illustrate the steps of triggering the execution of the card emulation mode through the NFC function control.
[0068] Fig. 9 FIG. 1 is a flowchart of a method for triggering an NFC function mode to provide a corresponding NFC function according to another exemplary embodiment. Fig. 9 As shown, the method includes step S501 to step S502.
[0069] In step S501, the NFC function setting interface where the NFC function control is located sends an NFC function instruction matching the NFC function mode currently triggered to be executed to the NFC agent.
[0070] In step S502, the NFC function mode triggered to be executed is the card emulation mode.
[0071] The NFC function instructions include an instruction to enable a card simulation function and an instruction to stop reading and writing a card.
[0072] In the disclosed embodiment, the card reading and writing function is turned off and the card simulation function is turned on by enabling the NFC function instruction. The card simulation mode is realized. In the card simulation mode, the terminal can be used as a card with NFC function such as an access card, a bank card, a transportation card, a car key, etc. At this time, the card reading and writing mode of the NFC function is in a closed state, and it does not have the ability to exchange data with other NFC devices, nor does it have the ability to read other NFC targets such as cards. When contacting other NFC devices or other NFC targets such as cards, the terminal will not trigger a pop-up window, thereby optimizing the user experience.
[0073] The following embodiments of the present disclosure illustrate the steps of triggering the execution of the card reading and writing mode through the NFC function control.
[0074] Fig.10 FIG. 1 is a flowchart of a method for triggering an NFC function mode to provide a corresponding NFC function according to another exemplary embodiment. Fig.10 As shown, the method includes step S601 to step S602.
[0075] In step S601, the NFC function setting interface where the NFC function control is located sends an NFC function instruction matching the NFC function mode currently triggered to be executed to the NFC agent.
[0076] In step S602, the NFC function mode triggered to be executed is the card reading and writing mode.
[0077] The NFC function instructions include a stop card simulation function instruction and an enable card reading and writing function instruction.
[0078] In the embodiment of the present disclosure, the card simulation function is turned off by enabling the NFC function instruction, and the card reading and writing function is turned on. The card reading and writing mode is realized. In the card reading and writing mode, the terminal can perform point-to-point data transmission with other NFC devices, or be used as a card reader. The user can turn on the card reading and writing mode when he needs to read the information in the NFC target, or write the NFC function of the access control card, bank card, transportation card, car key and other cards with NFC function, and then turn off the card reading and writing mode to prevent accidental touching of other NFC targets to trigger pop-up windows.
[0079] In an exemplary embodiment of the present disclosure, a method for starting a card emulation mode based on an instruction of a user triggering execution of a card emulation function mode is shown. Fig.11 As shown in the block diagram of the near field communication NFC function control method, the method includes the following steps:
[0080] 1. Change the display on the upper UI interface, that is, select the card simulation mode in the NFC function control.
[0081] 2. In the NFC function setting (Setting) interface, issue a card simulation instruction (nfcmode) to the NFC agent (NfcAdapter).
[0082] 3. The NFC agent transmits the card emulation instruction to the NFC service layer (NfcService) and calls the method (SetDiscoveryTech) in the NFC service layer to set the underlying code of the NFC chip.
[0083] 4. Set the NFC chip underlying code. According to the card emulation instructions issued by the NFC function setting interface, corresponding to the instructions for turning on the card emulation function and turning off the card reading and writing function, call the method (changeDiscoveryTech) for modifying the NFC chip underlying code in the NFC chip driver (NxpAdapter), modify the underlying code, and send the modified underlying code to the NFC protocol stack (NativeNfcManager) to take effect, turn on the card emulation function and turn off the card reading and writing function, and switch to the card emulation mode.
[0084] It can be understood that the implementation process of the NFC function off mode and the card reader / writer mode is similar to the above process, the difference lies in the different functions of modifying the code and the NFC protocol stack in step 4.
[0085] In the disclosed embodiment, NFC function modes such as NFC function off mode, card simulation mode or card reading and writing mode are triggered and executed through the NFC function control. The NFC function setting interface where the NFC function control is located sends an NFC function instruction that matches the NFC function mode currently being triggered to execute to the NFC agent. The NFC function service of the NFC service layer is called to execute the NFC function instruction, and the NFC function corresponding to the NFC function mode currently being triggered to execute is provided to realize the switching of the NFC function mode. The three NFC working modes of card simulation, card reading and writing, and NFC off are separated to avoid power consumption problems caused by enabling the card simulation function and the card reading and writing function at the same time when the NFC function is turned on, and to avoid triggering a pop-up window when accidentally touching a card with an NFC data exchange format.
[0086] Based on the same concept, the embodiment of the present disclosure also provides a near field communication NFC function control device 100 .
[0087] It is understandable that the near field communication NFC function control device 100 provided in the embodiment of the present disclosure includes hardware structures and / or software modules corresponding to the execution of each function in order to realize the above functions. In combination with the units and algorithm steps of each example disclosed in the embodiment of the present disclosure, the embodiment of the present disclosure can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the technical solution of the embodiment of the present disclosure.
[0088] Fig.12 is a block diagram of a near field communication NFC function control device 100 according to an exemplary embodiment. Fig.12 The device includes a determining unit 101 and a processing unit 102.
[0089] The determining unit 101 is configured to, in response to detecting that an NFC function control of the terminal is triggered, determine an NFC function mode in which the NFC function control is currently triggered to execute.
[0090] Among them, the NFC function control is triggered to provide NFC function modes including NFC function off mode, card simulation mode or card reading and writing mode
[0091] The processing unit 102 is configured to provide an NFC function corresponding to the NFC function mode currently triggered to be executed based on the NFC function mode currently triggered to be executed.
[0092] In one embodiment, the NFC function control is a function control that provides three-stage sliding positions through the sliding of a slider, and different positions of the three-stage sliding positions correspond to different NFC function modes; the determination unit 101 determines the NFC function mode currently triggered to be executed by the NFC function control in the following manner: in response to detecting that the slider is triggered to slide to the middle position of the three-stage sliding positions of the NFC function control, determining that the NFC function mode currently triggered to be executed by the NFC function control is an off mode; or in response to detecting that the slider is triggered to slide to one side of the three-stage sliding positions of the NFC function control, determining that the NFC function mode currently triggered to be executed by the NFC function control is a card emulation mode; or in response to detecting that the slider is triggered to slide to the other side of the three-stage sliding positions of the NFC function control, determining that the NFC function mode currently triggered to be executed by the NFC function control is a card reading and writing mode.
[0093] In one embodiment, the processing unit 102 provides an NFC function corresponding to the NFC function mode currently triggered for execution based on the NFC function mode currently triggered for execution in the following manner: an NFC function setting interface where the NFC function control is located sends an NFC function instruction that matches the NFC function mode currently triggered for execution to the NFC agent; and calls the NFC function service of the NFC service layer to execute the NFC function instruction, and provides an NFC function corresponding to the NFC function mode currently triggered for execution.
[0094] In one implementation, the NFC function mode currently triggered for execution is the NFC function off mode, and the NFC function instruction includes a stop card emulation function instruction and a stop card reading and writing function instruction.
[0095] In one implementation, the NFC function mode currently triggered for execution is a card emulation mode, and the NFC function instruction includes an instruction for enabling a card emulation function and an instruction for stopping a card reading and writing function.
[0096] In one implementation, the NFC function mode currently triggered for execution is a card reading and writing mode, and the NFC function instruction includes a card emulation function stop instruction and a card reading and writing function enable instruction.
[0097] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0098] Fig.13 1 is a block diagram of a device 200 for near field communication (NFC) function control according to an exemplary embodiment. The device 200 may be provided as a terminal. For example, the device 200 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0099] Reference Fig.13 , the device 200 may include one or more of the following components: a processing component 202 , a memory 204 , a power component 206 , a multimedia component 208 , an audio component 210 , an input / output (I / O) interface 212 , a sensor component 214 , and a communication component 216 .
[0100] The processing component 202 generally controls the overall operation of the device 200, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 202 may include one or more processors 220 to execute instructions to perform all or part of the steps of the above-described method. In addition, the processing component 202 may include one or more modules to facilitate interaction between the processing component 202 and other components. For example, the processing component 202 may include a multimedia module to facilitate interaction between the multimedia component 208 and the processing component 202.
[0101] The memory 204 is configured to store various types of data to support operations on the device 200. Examples of such data include instructions for any application or method operating on the device 200, contact data, phone book data, messages, pictures, videos, etc. The memory 204 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0102] The power component 206 provides power to the various components of the device 200. The power component 206 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 200.
[0103] The multimedia component 208 includes a screen that provides an output interface between the device 200 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 208 includes a front camera and / or a rear camera. When the device 200 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0104] The audio component 210 is configured to output and / or input audio signals. For example, the audio component 210 includes a microphone (MIC), and when the device 200 is in an operation mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 204 or sent via the communication component 216. In some embodiments, the audio component 210 also includes a speaker for outputting audio signals.
[0105] I / O interface 212 provides an interface between processing component 202 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
[0106] The sensor assembly 214 includes one or more sensors for providing various aspects of the status assessment of the device 200. For example, the sensor assembly 214 can detect the open / closed state of the device 200, the relative positioning of components, such as the display and keypad of the device 200, the sensor assembly 214 can also detect the position change of the device 200 or a component of the device 200, the presence or absence of user contact with the device 200, the orientation or acceleration / deceleration of the device 200 and the temperature change of the device 200. The sensor assembly 214 can include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 214 can also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 214 can also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor or a temperature sensor.
[0107] The communication component 216 is configured to facilitate wired or wireless communication between the device 200 and other devices. The device 200 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 216 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 216 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0108] In an exemplary embodiment, the apparatus 200 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the above method.
[0109] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 204 including instructions, and the instructions can be executed by the processor 220 of the device 200 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0110] It is to be understood that in the present disclosure, "plurality" refers to two or more than two, and other quantifiers are similar. "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. The character " / " generally indicates that the associated objects before and after are in an "or" relationship. The singular forms "a", "the" and "the" are also intended to include plural forms, unless the context clearly indicates other meanings.
[0111] It is further understood that the terms "first", "second", etc. are used to describe various information, but such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other, and do not indicate a specific order or degree of importance. In fact, the expressions "first", "second", etc. can be used interchangeably. For example, without departing from the scope of the present disclosure, the first information can also be referred to as the second information, and similarly, the second information can also be referred to as the first information.
[0112] It can be further understood that, unless otherwise specified, “connection” includes a direct connection without other components between the two, and also includes an indirect connection with other components between the two.
[0113] It is further understood that, although the operations are described in a specific order in the drawings in the embodiments of the present disclosure, it should not be understood as requiring that the operations be performed in the specific order shown or in a serial order, or requiring that all the operations shown be performed to obtain the desired results. In certain environments, multiple people and parallel processing may be advantageous.
[0114] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any modifications, uses or adaptations of the present disclosure, which follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure.
[0115] It should be understood that the present disclosure is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the scope of the appended claims.
Claims
1. A near field communication (NFC) function control method, characterized in that: Applied to a terminal, the method comprises: In response to detecting that the NFC function control of the terminal is triggered, determining the NFC function mode currently triggered to be executed by the NFC function control, wherein the NFC function mode provided by the NFC function control when triggered includes an NFC function off mode, a card emulation mode, or a card reading and writing mode; Based on the NFC function mode currently being triggered for execution, an NFC function corresponding to the NFC function mode currently being triggered for execution is provided.
2. The method according to claim 1, characterized in that The NFC function control is a function control that provides three-stage sliding positions by sliding the slider, and different positions of the three-stage sliding positions correspond to different NFC function modes; The determining the NFC function mode in which the NFC function control is currently triggered to execute includes: In response to detecting that the slider is triggered to slide to a middle position of the three-stage sliding positions of the NFC function control, determining that the NFC function mode currently triggered to execute by the NFC function control is an off mode; or In response to detecting that the slider is triggered to slide to one side of the three-stage sliding position of the NFC function control, determining that the NFC function mode currently triggered to execute by the NFC function control is a card emulation mode; or In response to detecting that the slider is triggered to slide to the other side of the three-stage sliding position of the NFC function control, it is determined that the NFC function mode currently triggered to execute by the NFC function control is a card reading and writing mode.
3. The method according to claim 1 or 2, characterized in that: The providing, based on the currently triggered NFC function mode, an NFC function corresponding to the currently triggered NFC function mode includes: The NFC function setting interface where the NFC function control is located sends an NFC function instruction matching the currently triggered NFC function mode to the NFC agent; The NFC function service of the NFC service layer is called to execute the NFC function instruction, and provide an NFC function corresponding to the NFC function mode currently triggered for execution.
4. The method according to claim 3, characterized in that The NFC function mode currently triggered for execution is the NFC function off mode, and the NFC function instruction includes a stop card emulation function instruction and a stop card reading and writing function instruction.
5. The method according to claim 3, characterized in that: The NFC function mode currently triggered for execution is the card emulation mode, and the NFC function instruction includes an instruction to enable the card emulation function and an instruction to stop the card reading and writing function.
6. The method according to claim 3, characterized in that The NFC function mode currently triggered for execution is the card reading and writing mode, and the NFC function instruction includes a stop card simulation function instruction and an enable card reading and writing function instruction.
7. A near field communication (NFC) function control device, characterized in that: Applied to a terminal, the device comprises: a determining unit, configured to, in response to detecting that an NFC function control of the terminal is triggered, determine an NFC function mode currently triggered to be executed by the NFC function control, wherein the NFC function mode provided by the NFC function control when triggered includes an NFC function off mode, a card emulation mode, or a card reading and writing mode; The processing unit is used to provide an NFC function corresponding to the NFC function mode currently triggered to be executed based on the NFC function mode currently triggered to be executed.
8. The device according to claim 7, characterized in that The NFC function control is a function control that provides three-stage sliding positions by sliding the slider, and different positions of the three-stage sliding positions correspond to different NFC function modes; The determining unit determines the NFC function mode currently triggered to be executed by the NFC function control in the following manner: In response to detecting that the slider is triggered to slide to a middle position of the three-stage sliding positions of the NFC function control, determining that the NFC function mode currently triggered to execute by the NFC function control is an off mode; or In response to detecting that the slider is triggered to slide to one side of the three-stage sliding position of the NFC function control, determining that the NFC function mode currently triggered to execute by the NFC function control is a card emulation mode; or In response to detecting that the slider is triggered to slide to the other side of the three-stage sliding position of the NFC function control, it is determined that the NFC function mode currently triggered to execute by the NFC function control is a card reading and writing mode.
9. The device according to claim 7 or 8, characterized in that The processing unit provides an NFC function corresponding to the NFC function mode currently triggered to be executed based on the NFC function mode currently triggered to be executed in the following manner: The NFC function setting interface where the NFC function control is located sends an NFC function instruction matching the currently triggered NFC function mode to the NFC agent; The NFC function service of the NFC service layer is called to execute the NFC function instruction, and provide an NFC function corresponding to the NFC function mode currently triggered for execution.
10. The device according to claim 9, characterized in that The NFC function mode currently triggered for execution is the NFC function off mode, and the NFC function instruction includes a stop card emulation function instruction and a stop card reading and writing function instruction.
11. The device according to claim 9, characterized in that The NFC function mode currently triggered for execution is the card emulation mode, and the NFC function instruction includes an instruction to enable the card emulation function and an instruction to stop the card reading and writing function.
12. The device according to claim 9, characterized in that The NFC function mode currently triggered for execution is the card reading and writing mode, and the NFC function instruction includes a stop card simulation function instruction and an enable card reading and writing function instruction.
13. A near field communication (NFC) function control device, characterized in that: include: processor: a memory for storing processor-executable instructions; The processor is configured to: execute the near field communication NFC function control method according to any one of claims 1 to 6.
14. A storage medium, characterized in that: The storage medium stores instructions, and when the instructions in the storage medium are executed by a processor, the processor is enabled to execute the near field communication NFC function control method according to any one of claims 1 to 6.
