WO2018218662A1 - 一种nfc业务处理方法、终端及nfc芯片 - Google Patents

一种nfc业务处理方法、终端及nfc芯片 Download PDF

Info

Publication number
WO2018218662A1
WO2018218662A1 PCT/CN2017/087006 CN2017087006W WO2018218662A1 WO 2018218662 A1 WO2018218662 A1 WO 2018218662A1 CN 2017087006 W CN2017087006 W CN 2017087006W WO 2018218662 A1 WO2018218662 A1 WO 2018218662A1
Authority
WO
WIPO (PCT)
Prior art keywords
main processor
terminal
nfc
application
power
Prior art date
Application number
PCT/CN2017/087006
Other languages
English (en)
French (fr)
Inventor
常新苗
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to PCT/CN2017/087006 priority Critical patent/WO2018218662A1/zh
Priority to US16/618,515 priority patent/US11200561B2/en
Priority to CN201780045286.7A priority patent/CN109478904B/zh
Priority to CN202011232324.XA priority patent/CN112492562B/zh
Publication of WO2018218662A1 publication Critical patent/WO2018218662A1/zh

Links

Images

Classifications

    • H04B5/79
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/30Payment architectures, schemes or protocols characterised by the use of specific devices or networks
    • G06Q20/32Payment architectures, schemes or protocols characterised by the use of specific devices or networks using wireless devices
    • G06Q20/327Short range or proximity payments by means of M-devices
    • G06Q20/3278RFID or NFC payments by means of M-devices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/30Payment architectures, schemes or protocols characterised by the use of specific devices or networks
    • G06Q20/34Payment architectures, schemes or protocols characterised by the use of specific devices or networks using cards, e.g. integrated circuit [IC] cards or magnetic cards
    • G06Q20/352Contactless payments by cards
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B5/00Near-field transmission systems, e.g. inductive loop type
    • H04B5/77
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Definitions

  • the present application relates to the field of terminal technologies, and in particular, to an NFC service processing method, a terminal, and an NFC chip.
  • NFC Near Field Communication
  • RFID Radio Frequency Identification
  • RFID Radio Frequency Identification
  • Point-to-point function for identification and data exchange with other NFC-enabled devices over short distances.
  • more and more terminals are equipped with NFC functions.
  • mobile phones with NFC functions can be used as airport boarding verification, access keys, and card simulation, for example, as a traffic card, credit card, payment card, etc.
  • NFC business processing can be used as airport boarding verification, access keys, and card simulation, for example, as a traffic card, credit card, payment card, etc.
  • SE Secure Elemen
  • SIM-SE Subscriber Identification Module
  • eSE a separate chip
  • the NFC chip forwards the commands or data received from the external reader to the SE, processes it by the SE, and interacts with the external reader through the NFC chip.
  • the mobile phone does not need to provide the SE, but the host-based card emulation (HCE) application running in the mobile phone or the cloud server completes the SE function.
  • HCE host-based card emulation
  • the NFC chip sends commands or data received from the external reader to the HCE application in the mobile phone, or through the mobile network to the server in the cloud to complete the interaction.
  • the embodiment of the present application provides an NFC service processing method, a terminal, and an NFC chip, so as to solve the problem that the inSE or HCE application cannot work when the terminal is powered off, and the terminal cannot process the NFC service by using the inSE or the HCE.
  • an NFC service processing method is provided, the method being applied to a first terminal, the first terminal comprising a main processor and an NFC chip, the main processor being integrated with a first SE and/or running an HCE application.
  • the NFC service processing method includes: when the main processor of the first terminal is powered off, the first terminal receives an application selection instruction sent by the second terminal, where the application selection instruction is used to indicate The application in the first SE or the HCE application processes the NFC service. After receiving the application selection instruction, the first terminal controls the main processor to be powered on. The first terminal then routes the application selection instruction to the main processor to process the NFC service through the main processor.
  • the first terminal when the first terminal receives an application selection instruction sent by the second terminal to instruct the first terminal to process the NFC service through the application in the first SE or the HCE application, the first terminal controls The main processor is powered on.
  • the SE in the main processor or the HCE application running in the main processor can process the NFC service. Therefore, by the above method, even if the SE is integrated in the main processor or the HCE application is installed in the main processor, the terminal can wake up the main processor when the power is off, so that the SE integrated in the main processor or the main operation
  • the HCE application in the processor can work normally, thereby completing the NFC service processing.
  • the first terminal further includes a second SE, where the second SE and the main processor are independently set.
  • the method further includes: determining, by the first terminal, whether the application identifier AID carried in the application selection instruction belongs to the AID in the preset AID set, if the AID belongs to the foregoing, before the first terminal controls the powering of the main processor.
  • the AID in the set of AIDs is preset, and the first terminal controls the main processor to be powered on.
  • the preset AID set includes an application installed in the first SE and/or an AID of the HCE application.
  • the method before the first terminal controls the powering of the main processor, the method further includes: the first terminal sending a delay instruction to the second terminal, the delay instruction The delay instruction is used to indicate that the second terminal increases the communication waiting duration and the increased waiting duration is the to-be-extended duration.
  • the controlling, by the first terminal, the powering of the main processor includes: determining, by the first terminal, a current battery power. If the current battery power is greater than the threshold, the first terminal wakes up the main processor in the first clock sequence. If the current battery power is less than the threshold, the first terminal wakes up the main processor in the second clock sequence.
  • the first clock sequence is a power-on sequence, and the second clock sequence is used to wake up only modules for processing NFC services.
  • the method further includes: when the first terminal processes the NFC service, the first terminal prompts the user to complete the NFC business.
  • the method further includes: when the first terminal processes the NFC service, the first terminal The current battery power is determined; if the current battery power is greater than the threshold, the first terminal prompts the user whether to shut down; if the current battery power is less than the threshold, the first terminal controls the main processor to power off.
  • a second aspect provides an NFC service processing method, where the method is applied to a first terminal, where the first terminal includes a main processor, an NFC chip, and a power management unit (PMU), where the main processor is integrated
  • the method includes: when the main processor is powered off, the NFC chip receives an application selection instruction sent by the second terminal, where the application selection instruction is used to indicate that the NFC service is processed by the application in the first SE or the HCE application. Then, the NFC chip sends a power-on trigger signal to the PMU.
  • the PMU controls the main processor to be powered according to the power-on trigger signal. After the main processor is powered on, the NFC chip routes the application selection command to the main The processor processes the NFC service by the main processor.
  • the first terminal further includes a second SE, where the second SE and the main processor are independently set.
  • the method further includes: determining, by the NFC chip, whether the application identifier (AID) carried in the application selection instruction belongs to the AID in the preset AID set. If the AID belongs to the AID in the preset AID set, the NFC chip sends a power-on trigger signal to the PMU.
  • the preset AID set includes an application installed in the first SE and/or an AID of the HCE application.
  • the method before the sending, by the NFC chip, the power-on trigger signal to the PMU, the method further includes: the NFC chip sending a delay instruction to the second terminal, where the delay instruction carries the duration to be extended The delay instruction is used to indicate that the second terminal increases the communication waiting duration and the increased waiting time is the length of the waiting period.
  • the second terminal increases the duration of waiting for the response of the first terminal after receiving the delay instruction, and the first terminal can have sufficient time. Start the power-on process.
  • the controlling, by the PMU, the powering of the main processor according to the power-on triggering signal includes: determining, by the PMU, a current battery power. If the current battery power is greater than a threshold, the PMU wakes up the main processor in a first clock sequence. If the current battery power is less than the threshold, the PMU wakes up the main processor in a second clock sequence.
  • the first clock sequence is a power-on sequence, and the second clock sequence is used to wake up only modules for processing NFC services.
  • the method further includes: when the main processor processes the NFC service, prompting the user to complete the NFC service.
  • the method further includes: when the main processor processes the NFC service, the main processor determines a current battery power. If the current battery power is greater than the threshold, the main processor prompts the user whether to shut down; if the current battery power is less than the threshold, the PMU controls the main processor to power off.
  • the NFC chip of the first terminal when the NFC chip of the first terminal receives an application selection instruction sent by the second terminal to instruct the first terminal to process the NFC service through the application in the first SE or the HCE application, the NFC The chip sends a power-on trigger signal to the PMU, and the PMU triggers the power-on of the main processor according to the power-on trigger signal.
  • the SE in the main processor or the HCE application running in the main processor can process the NFC service.
  • the terminal can wake up the main processor when the power is off, so that the SE integrated in the main processor or the main operation
  • the HCE application in the processor can work normally, thereby completing the NFC service processing.
  • a terminal in a third aspect, includes a near field communication NFC chip, a power management unit PMU, and a main processor, where the main processor is configured with a first security module SE or a host based
  • the card emulates an HCE application, wherein: the NFC chip is configured to receive, when the main processor is powered off, an application selection instruction sent by a second terminal, where the application selection instruction is used to indicate that the first SE is in the first SE
  • the application or the HCE application processes the NFC service.
  • the NFC The chip is further configured to send a power-on trigger signal to the PMU.
  • the PMU is configured to wake up the main processor according to the power-on trigger signal sent by the NFC chip.
  • the NFC chip is further configured to route the application selection instruction to the main processor.
  • the main processor is configured to process the NFC service.
  • the first terminal further includes a second SE, where the second SE and the main processor are independently set.
  • the NFC chip is further configured to determine whether an application identifier AID carried in the application selection instruction belongs to an AID in a preset AID set; when the AID belongs to an AID in the preset AID set, the NFC The chip sends a power-on trigger signal to the PMU.
  • the preset AID set includes the application installed in the first SE and/or an AID of the HCE application.
  • the NFC chip is further configured to send a delay instruction to the second terminal, where the delay instruction carries a duration to be extended, and the delay instruction is used to indicate The second terminal increases the communication waiting duration and increases the waiting duration to be the length of time to be extended.
  • the PMU is further configured to determine a current battery power; when the current battery power is greater than a threshold, the PMU wakes up the main processor in a first clock sequence; When the current battery power is less than the threshold, the PMU wakes up the main processor in a second clock sequence.
  • the first clock sequence is a power-on sequence, and the second clock sequence is used to wake up only modules for processing NFC services.
  • the main processor is further configured to prompt the user to complete the NFC service when the NFC service is completed.
  • the main processor is further configured to: when the NFC service is completed, determine a current battery power; when the current battery power is greater than a threshold, prompt the user whether to shut down; When the current battery power is less than the threshold, the main processor is controlled to be powered off.
  • the first terminal when the NFC chip of the first terminal receives an application selection instruction sent by the second terminal to instruct the first terminal to process the NFC service through the application in the first SE or the HCE application,
  • the NFC chip sends a power-on trigger signal to the PMU, and the PMU triggers the power-on of the main processor according to the power-on trigger signal.
  • the SE in the main processor or the HCE application running in the main processor can process the NFC service.
  • the terminal can wake up the main processor when the power is off, so that the SE integrated in the main processor or the main operation
  • the HCE application in the processor can work normally, thereby completing the NFC service processing.
  • an NFC chip is provided, where the NFC chip is located at a first terminal, the first terminal further includes a main processor and a PMU, where the main processor is integrated with the first security module SE and/or The card of the host simulates the HCE application.
  • the NFC chip is configured to receive an application selection instruction sent by the second terminal, where the application selection instruction is used to indicate that the NFC service is processed by the application in the first SE or the HCE application.
  • the NFC chip is further configured to determine whether the main processor is powered off; when the main processor is powered off, sending a power-on trigger signal to the PMU, so that the PMU is configured according to the power-on trigger signal The main processor is electrically woken up.
  • the NFC chip is further configured to route the application selection instruction to the main processor to facilitate processing by the main processor Said NFC business.
  • the NFC chip is further configured to determine, when the first terminal further includes a second SE, whether the application identifier AID carried in the application selection instruction belongs to a preset AID set. When the AID belongs to the preset AID set, sending a power-on trigger signal to the PMU.
  • the second SE and the main processor are independently set.
  • the NFC chip is further configured to send a delay instruction to the second terminal, where the delay instruction carries a duration to be extended, and the delay instruction is used to indicate The second terminal increases the communication waiting duration and increases the waiting duration to be the length of time to be extended.
  • the NFC chip sends power to the PMU when receiving the application selection instruction sent by the second terminal to instruct the first terminal to process the NFC service through the application in the first SE or the HCE application.
  • the trigger signal is caused to cause the PMU to trigger the main processor to be powered according to the power-on trigger signal.
  • the SE in the main processor or the HCE application running in the main processor can process the NFC service. Therefore, by the above method, even if the SE is integrated in the main processor or the HCE application is installed in the main processor, the NFC chip can wake up the main processor when the power is off, so that the SE integrated in the main processor runs or The HCE application in the main processor can work normally, and then complete the NFC service processing.
  • a computer readable storage medium is provided, the instructions being stored in a computer readable storage medium, when executed on a computer, causing the computer to perform the method of the first aspect described above.
  • a computer program product comprising instructions which, when executed on a computer, cause the computer to perform the method of the first aspect above.
  • FIG. 1a and FIG. 1b are schematic diagrams of application scenarios of an NFC service
  • FIG. 2 is a schematic structural view of a mobile phone
  • FIG. 3 is a schematic flowchart of a method for processing an NFC service according to an embodiment of the present disclosure
  • FIG. 4 is a schematic flowchart diagram of another NFC service processing method according to an embodiment of the present disclosure.
  • FIG. 5 is a schematic flowchart of still another NFC service processing method according to an embodiment of the present disclosure.
  • FIG. 6 is a schematic flowchart of a preset AID set configured by a host processor in an NFC according to an embodiment of the present disclosure
  • FIG. 7 is a schematic flowchart of a method for processing the foregoing NFC service in a mobile phone according to an embodiment of the present disclosure
  • FIG. 8 is a schematic diagram of a processing flow of a mobile phone after processing an NFC service according to an embodiment of the present disclosure
  • FIG. 9 is a schematic diagram of an interface for processing an NFC service in a shutdown state of a mobile phone according to an embodiment of the present disclosure.
  • FIG. 10 is a schematic structural diagram of a terminal according to an embodiment of the present application.
  • NFC service processing is widely used in scenarios such as card payment and authentication due to its convenience.
  • the bus card machine supports the NFC function
  • the user can use the NFC-enabled mobile phone 12 to touch the bus credit card machine 11 to implement card payment.
  • the POS at the merchant When the terminal supports the NFC function, the user can also use the mobile phone 22 supporting the NFC function to touch the POS terminal 21 to perform card payment.
  • the NFC-enabled mobile phone can act as a car key, and NFC interaction with the smart car to open the car door when approaching the smart car. In these scenarios, the mobile phone simulates a "bank card", "public card” or "car key” to implement credit card payment or swipe to open the smart car.
  • the embodiment of the present application provides a terminal that supports an NFC function
  • the terminal can be a mobile phone, a tablet computer, a notebook computer, a super mobile personal computer, a netbook, a personal digital assistant, and a wearable device.
  • Equipment etc.
  • the mobile phone 100 includes an NFC chip 110, a main processor 120, a memory 130, a power source 140, a PMU 150, an input unit 160, a display unit 170, and an audio circuit 180. , RF circuit 190 and other components.
  • NFC chip 110 for example, the structure of the handset shown in FIG. 2 does not constitute a limitation to the handset, and may include more or less components than those illustrated, or some components may be combined, or different component arrangements.
  • the NFC chip 110 includes a NFC controller (Near Field Communication Cntroller, NFCC) 111 and a radio frequency antenna 112, and its functions include modulation and demodulation of radio frequency signals and NFC protocol processing.
  • the NFCC 111 connects the RF antenna 112 on the one hand to transmit and receive the 13.56 MHz signal, and on the other hand communicates with the SE.
  • the SE in the mobile phone may be integrated in the main processor 120, or located in a Subscriber Identification Module (SIM) card of the mobile phone, or in a Secure Digital Memory Card (SD) of the mobile phone. It can also be a stand-alone chip.
  • SIM Subscriber Identification Module
  • SD Secure Digital Memory Card
  • the main processor 120 is the control center of the handset 100, which connects various portions of the entire handset using various interfaces and lines, by running or executing software programs and/or modules stored in the memory 130, and recalling data stored in the memory 130.
  • the various functions and processing data of the mobile phone 100 are executed to perform overall monitoring of the mobile phone.
  • the main processor 120 may include one or more processing units.
  • the main processor 120 integrates an Application Processor (AP) 121 and a Baseband Processor. BP) 122, wherein the application processor 121 mainly processes an operating system, a user interface, an application, and the like.
  • the application processor 121 integrates the SE1211.
  • the baseband processor 122 primarily handles wireless communications. It can be understood that the above baseband processor 122 may not be integrated into the main processor 120.
  • the main processor 120 of the embodiment of the present disclosure may be a system on chip (SoC) or a central processing unit (CPU).
  • SoC system on chip
  • CPU central processing unit
  • the memory 130 can be used to store software programs and modules, and the main processor 120 executes various functional applications and data processing of the mobile phone 100 by running software programs and modules stored in the memory 130.
  • the memory 130 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application required for at least one function, and the like, such as a sound playing function, an image playing function, and the like; and the storage data area may be stored according to the mobile phone.
  • the data created by the use of 100 (such as audio data, image data, phone book, etc.).
  • the memory 130 can include a high speed
  • the machine access memory may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
  • the mobile phone 100 also includes a power source 140 (such as a battery) and a PMU 150 for powering various components.
  • the PMU 150 is a highly integrated power management solution for portable devices, which is a series of traditional discrete power management chips, such as a low dropout linear regulator. (low dropout regulator, LDO), DC converter (DC / DC) integrated into the phone's PMU, which can reduce board space, improve efficiency, and lower cost.
  • the trigger condition of the PMU is that the user presses the power button, the power button is connected to the pin of the PMU, and the power button is pressed to give the PMU a signal. Then, the PMU gradually controls the power source 140 to the processor, the display unit, the input unit, etc. according to a predetermined clock sequence. The module is powered on.
  • the input unit 160 can be configured to receive input numeric or character information and to generate key signal inputs related to user settings and function control of the handset 100.
  • the input unit 160 may include a touch screen 161 and other input devices 162.
  • a touch screen 161 also referred to as a touch panel, can collect touch operations on or near the user (such as the user's operation on or near the touch screen 161 using any suitable object or accessory such as a finger, stylus, etc.), and The corresponding connecting device is driven according to a preset program.
  • the touch screen 161 may include two parts of a touch detection device and a touch controller.
  • the touch detection device detects the touch orientation of the user, and detects a signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts the touch information into contact coordinates, and sends the touch information.
  • the main processor 120 is provided and can receive commands from the main processor 120 and execute them.
  • the touch screen 161 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves.
  • the input unit 160 may also include other input devices 162.
  • other input devices 162 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control buttons, power switch buttons, etc.), trackballs, mice, joysticks, and the like.
  • the display unit 170 can be used to display information input by the user or information provided to the user and various menus of the mobile phone 100.
  • the display unit 170 may include a display panel 171.
  • the display panel 171 may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.
  • the touch screen 161 may cover the display panel 171, and when the touch screen 161 detects a touch operation on or near it, it is transmitted to the main processor 120 to determine the type of the touch event, and then the main processor 120 is in accordance with the type of the touch event. A corresponding visual output is provided on display panel 171.
  • touch screen 161 and the display panel 171 are used as two separate components to implement the input and input functions of the mobile phone 100 in FIG. 2, in some embodiments, the touch screen 161 and the display panel 171 may be integrated to implement the mobile phone 100. Input and output functions.
  • the audio circuit 180, the speaker 181, and the microphone 182 can provide an audio interface between the user and the handset 100.
  • the audio circuit 180 can transmit the converted electrical data of the received audio data to the speaker 181 for conversion to the sound signal output by the speaker 181; on the other hand, the microphone 182 converts the collected sound signal into an electrical signal by the audio circuit 180. After receiving, it is converted into audio data, and then the audio data is output to the RF circuit 190 for transmission to, for example, another mobile phone, or the audio data is output to the memory 130 for further processing.
  • the RF circuit 190 can be used for receiving and transmitting signals during the transmission or reception of information or during a call. Specifically, after receiving the downlink information of the base station, it is processed by the main processor 120. In addition, the uplink data is sent to the base station.
  • RF circuits include, but are not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier (LNA), a duplexer, and the like.
  • RF circuitry 190 can also communicate with the network and other devices via wireless communication.
  • the wireless communication may use any communication standard or protocol, including but not limited to global system of mobile communication (GSM), general packet radio service (GPRS), code division multiple access (code) Division multiple access (CDMA), wideband code division multiple access (WCDMA), long term evolution (LTE), e-mail, short messaging service (SMS), and the like.
  • GSM global system of mobile communication
  • GPRS general packet radio service
  • code code division multiple access
  • WCDMA wideband code division multiple access
  • LTE long term evolution
  • SMS short messaging service
  • the handset 100 may also include a Bluetooth module, a global positioning system (GPS) module, a speaker, an accelerometer, a gyroscope, a gravity sensor, a light sensor, and the like.
  • GPS global positioning system
  • the PMU is used for power management of each module in the mobile phone.
  • the user presses the power button to trigger the PMU to power up the processor and display unit in the mobile phone in sequence according to a certain clock sequence.
  • Input modules and other modules when the phone is turned off, the PMU also triggers the power-off of each module such as the processor, display unit, and input unit in the mobile phone according to a certain clock sequence.
  • the type of SE as shown in Table 1, whether the different types of SE in the prior art can work when the mobile phone is turned off and the working principle is as follows:
  • the inventors found in the research that in the prior art, when the mobile phone is turned off, the main processor in the mobile phone is in a power-off state, and the inSE integrated in the main processor or runs in the main processor.
  • the inSE and/or HCE applications cannot work.
  • the mobile phone cannot use the inSE or HCE application to process the NFC service.
  • the embodiment of the present application provides an NFC service processing method, where the method is applied to a terminal supporting an NFC function, the terminal includes a main processor and an NFC chip, and the main processor is integrated with an SE (implemented by the present application)
  • the SE implemented by the present application
  • the method includes the following steps:
  • the first terminal receives an application selection instruction sent by the second terminal.
  • the first terminal includes a terminal that supports an NFC function, such as a mobile phone.
  • the second terminal includes other terminals that support the NFC function, such as a POS machine.
  • the second terminal sends an application selection instruction to the first terminal, where the application selection instruction is used to indicate that the first terminal passes the An application in an SE or the HCE application processes an NFC service.
  • the application selection instruction carries an AID, and is used to instruct the first terminal to process the NFC service by using an application corresponding to the AID.
  • the main processor of the first terminal is powered off when the first terminal is powered off. Therefore, the shutdown of the terminal or the power off of the main processor described in the embodiment of the present application refers to powering off the main processor.
  • the first terminal controls the main processor to be powered on.
  • the specific process for the first terminal to wake up the main processor is: the first terminal determines the current battery power; if the current battery power is greater than the threshold, the first terminal wakes up according to the first clock sequence The main processor. If the current battery power is less than the threshold, the first terminal wakes up the main processor in a second clock sequence.
  • the first clock sequence is a power-on sequence.
  • the power-on sequence refers to the power-on sequence executed when the first terminal is normally powered on, such as the power-on sequence executed when the user presses the power button to turn on the power.
  • the second clock sequence is used to wake up only the module for processing the NFC service.
  • the first terminal stores two or more clock sequences in advance.
  • the first terminal determines the current battery power. If the current battery power is sufficient to maintain the normal power on of the terminal, the first terminal sequentially wakes up each module in the first terminal according to the clock sequence in the normal startup, including the main processor and the display of the first terminal.
  • Bluetooth module e.g., Bluetooth module, gravity sensor, etc.
  • Some of these modules are related to the processing of NFC services, such as the main processor where inSE is located; some are modules that are not related to NFC service processing, such as Bluetooth modules, gravity sensors, and so on.
  • the first terminal uses battery power or uses the potential in the magnetic field generated by the interaction between the first terminal and the second terminal to supply power, and only wakes up the modules related to the NFC service processing according to other clock sequences.
  • the main processor where inSE is located there is no need to wake up other modules that are not related to NFC service processing, such as display screens, Bluetooth modules, and so on.
  • the first terminal routes the application selection instruction to the main processor to process the NFC service by using the main processor.
  • the first terminal when the first terminal includes only the inSE and/or the HCE application, and does not include other types of SE, the first terminal, after receiving the application selection instruction, routes the application selection instruction to the Main processor.
  • the first terminal When the first terminal includes multiple types of SEs, the first terminal routes the application selection instruction to the SE or HCE application in the main processor to perform NFC service according to the AID carried in the application selection instruction. deal with.
  • the first terminal when the first terminal receives an application selection instruction sent by the second terminal to instruct the first terminal to process the NFC service through the application in the first SE or the HCE application, the first terminal controls The main processor is powered on.
  • the SE in the main processor or the HCE application running in the main processor can process the NFC service. Therefore, by the above method, Even if the SE is integrated in the main processor or the HCE application is installed in the main processor, the terminal can wake up the main processor when the power is off, so that the SE integrated in the main processor or the HCE application running in the main processor Can work normally, and then complete NFC business processing.
  • the communication failure is considered.
  • the embodiment of the present application further includes the following steps: The first terminal sends a delay instruction to the second terminal, where the delay instruction carries a length of time to be extended, and the delay instruction is used to indicate that the second terminal increases the communication waiting duration and the waiting time is increased. The length of time to be extended.
  • the delay instruction carries a length of time to be extended
  • the delay instruction is used to indicate that the second terminal increases the communication waiting duration and the waiting time is increased.
  • the length of time to be extended by adding a process in which the first terminal sends a delay instruction to the second terminal, after receiving the delay instruction, the second terminal increases the waiting time for waiting for the response of the first terminal, and thus the first terminal can have sufficient The time starts the power-on process.
  • the first terminal determines the current battery power again. If the current battery power is greater than the threshold, the first terminal prompts the user whether to enter the power-off state again by the power-on state, and keeps the power-on state according to the user's selection or powers off again. If the current battery power is less than the threshold, the first terminal automatically powers off.
  • the first terminal includes, in addition to the foregoing SE integrated in the main processor, other types of SEs, and the other types of SEs are SEs independently set with the main processor, such as SIM-SE or eSE, etc. (this embodiment of the application refers to this type of SE as the second SE).
  • the method further includes the following steps:
  • the first terminal determines whether the AID carried in the application selection instruction belongs to an AID in a preset AID set.
  • the first terminal performs the foregoing step 202 to control the main processor to be powered on.
  • the preset AID set includes an AID of an application in the first SE and/or an AID of the HCE application.
  • the first terminal determines a type of the SE that is included in the first terminal, and when the first terminal includes an SE (inSE) integrated in the main processor, the application installed in the inSE is The AID is added to the preset AID collection.
  • the AID of the HCE application is added to the preset AID set.
  • inSE and other types of SEs have the same application installed (with the same AID), such as inSE and SIM-SE have a bus application installed, because SIM-SE can be independent of the first terminal when it is shut down.
  • the main processor is powered on, and can be powered from the magnetic field of the battery or the second terminal. Therefore, it is not necessary to power on the main processor to process certain NFC services, and it is not necessary to add the AID of such an application to the preset AID. In the collection.
  • the user operates the handset to set certain applications to applications that still have a shutdown card requirement in the off state.
  • the AID of such an application is added to the preset AID set.
  • an application or HCE application in the inSE is not activated, it is not necessary to add the AID of such an application to the preset AID set.
  • the application corresponding to the AID carried in the application selection command is installed in the inSE or is the HCE.
  • the application, the first terminal needs to wake up the main processor after power-on to perform the step 204 to process the NFC service by the main processor after waking up the main processor.
  • the first terminal when the first terminal receives the application selection command carrying the AID in the shutdown state, it determines whether the AID belongs to the AID in the preset AID set, and when the AID belongs to the AID in the preset AID set, the main control The processor is powered on. Therefore, by the above method, even if the SE is integrated in the main processor or the HCE application is installed in the main processor, the terminal can wake up the main processor when the power is off, so that the SE integrated in the main processor or the main operation The HCE application in the processor can work normally, thereby completing the NFC service processing.
  • the first terminal referred to in the embodiment of the present application includes a main processor, an NFC chip, and a PMU.
  • the main processor is integrated with the first SE and/or runs with the HCE application.
  • the NFC chip is used to process an NFC service
  • the PMU is used to manage the power-on and power-off process of the first terminal.
  • the triggering condition for triggering the first terminal to enter the power-off state includes: the current battery power of the first terminal is less than a certain threshold, and the first terminal automatically shuts down; or, when the current battery power is sufficient, the user presses a physical button to trigger The first terminal is powered off. In either case, the battery still has power when the first terminal is turned off.
  • the NFC chip in the first terminal requires a very small amount of power. Even in the off state, the NFC chip can still be powered by the power in the battery, or can be powered by the potential in the magnetic field generated by the interaction between the first terminal and the second terminal. And then work normally. Therefore, before the main processor powers up, the NFC chip in the first terminal may perform the above steps 201 to 203 to wake up the main processor.
  • the embodiment of the present application provides an NFC service processing method, where the method includes the following steps:
  • the NFC chip receives an application selection instruction sent by the second terminal.
  • the application selection instruction is used to indicate that the NFC service is processed by the application in the first SE or the HCE application.
  • a notification signal is sent to the NFC chip; or the NFC chip can locally save the configuration file of the system, and the configuration file records the state of the main processor, including the power-on state or the power-off state. Then, the NFC chip determines whether the main processor is powered off according to the power-off signal or the read configuration file sent by the main processor.
  • the NFC chip sends a power-on trigger signal to the PMU.
  • the PMU controls the main processor to be powered according to the power-on trigger signal.
  • the main processor After the main processor is powered on, the main processor sends a notification signal to the NFC to notify the NFC chip that the main processor is powered on.
  • This process can be seen as a handshake between the main processor and the NFC chip to inform the NFC chip that the main processor is powered.
  • the NFC chip routes the application selection instruction to the main processor.
  • the main processor processes the NFC service.
  • the NFC chip of the first terminal when the NFC chip of the first terminal receives an application selection instruction sent by the second terminal to instruct the first terminal to process the NFC service through the application in the first SE or the HCE application, the NFC The chip sends a power-on trigger signal to the PMU, and the PMU triggers the power-on of the main processor according to the power-on trigger signal.
  • the SE in the main processor or the HCE application running in the main processor can process the NFC service.
  • the terminal can wake up the main processor when the power is off, so that the SE integrated in the main processor or the main operation
  • the HCE application in the processor can work normally, thereby completing the NFC service processing.
  • the first terminal further includes a second SE.
  • the second SE includes other SEs that are not integrated with the host processor, such as SIM-SE, inSE, and the like.
  • the method further includes the step of: determining, by the NFC chip, whether the AID carried in the application selection instruction belongs to an AID in the preset AID set. If the AID belongs to the AID in the preset AID set, the NFC chip sends a power-on trigger signal to the PMU.
  • the preset AID set includes an application installed in the first SE and/or an AID of the HCE application.
  • the preset AID set is determined by the main processor and configured for the NFC chip.
  • the method further includes: sending, by the NFC chip, a delay instruction to the second terminal, where the delay instruction carries a duration to be extended The delay instruction is used to indicate that the second terminal increases the communication waiting duration and the increased waiting time is the length of the to-be-extended period.
  • the process for the PMU to control the powering of the main processor according to the power-on triggering signal specifically includes: determining, by the PMU, a current battery power. If the current battery power is greater than the threshold, the PMU wakes up the main processor in the first clock sequence. If the current battery level is less than the threshold, the PMU wakes up the main processor in a second clock sequence.
  • the first clock sequence is a power-on sequence
  • the second clock sequence is used to wake up only modules for processing NFC services.
  • the method further includes: when the main processor processes the NFC service, prompting the user to complete the NFC service.
  • the method further includes: when the main processor processes the NFC service, the main processor determines a current battery power. If the current battery power is greater than a threshold, the main processor prompts the user whether to shut down; if the current battery power is less than the threshold, the PMU controls the main processor to power off.
  • the first terminal performs a process of: determining a preset AID, and processing, by using the determined preset AID, when the first terminal is powered off.
  • the process of determining the preset AID by the mobile phone includes the following steps:
  • the main processor acquires the type and identifier of the SE and the HCE application on the mobile phone.
  • the mobile phone system supports the NFC protocol stack.
  • the NFC protocol stack defines a variety of commands, and executing different commands will result in different execution results.
  • the main processor executes a SE Discovery command to determine the type and identity of the SE on the mobile phone and the identifier of the HCE application.
  • the phone When the phone contains inSE or HCE, the phone performs the following steps.
  • the main processor acquires an AID of the activated application installed on each SE.
  • the main processor sends an indication message to each SE for instructing the SE to reply to the AID of the activated application.
  • the SE obtains the status of all applications, including activation and inactivity, according to the attribute information of the installed application.
  • the SE feeds back the AID of the activated application to the host processor, which gets the AID of all activated applications.
  • the following step 503a is performed to add the AID of the activated application on the inSE to the preset AID set.
  • the mobile phone performs the following step 503b to add the AID of the HCE application to the preset AID set.
  • an activated application is installed in both inSE and SIM-SE, the phone does not need to add the AID of the app to the preset AID collection.
  • the main processor adds the AID of all activated applications on the inSE to the preset AID set.
  • the main processor adds the AIDs of all activated HCE applications to the preset AID set.
  • the main processor does not need to configure the AID of the application to the NFC, only The NFC configuration only installs the AID of the activated application on the inSE.
  • the main processor determines, according to the configuration information of the application, whether the application is related to the card swipe requirement, and the main processor only meets the foregoing conditions and the related card swipe requirements are met.
  • the AID of the app is added to the preset AID collection.
  • the main processor configures the preset AID set to the NFC.
  • the main processor configures the preset AID set only to the NFC. AID in. Then, when the NFC receives the SELECT AID instruction, if the AID carried in the SELECT AID instruction belongs to the AID in the preset AID set, the NFC routes the SELECT AID instruction to the corresponding SE according to the standard routing table.
  • the standard routing table describes how to route the routing rule to the corresponding SE according to the AID. For the specific implementation, reference may be made to the prior art, and details are not described herein.
  • the main processor configures, by the NFC, a preset AID set and an identifier of the SE where the application corresponding to each AID in the preset AID set is located. Then, when the NFC receives the SELECT AID command, if the AID carried in the SELECT AID command belongs to the AID in the preset AID set, the NFC routes the SELECT AID command to the corresponding SE according to the identifier of the SE corresponding to the AID.
  • the above steps 501 to 504 shown in FIG. 6 may be automatically executed when the mobile phone is initialized or when the mobile phone starts the NFC function, or the user selects to add the AID of some applications to the preset AID set.
  • the process of implementing the NFC service processing when the mobile phone is turned off according to the determined preset AID set includes the following steps:
  • the NFC receives the SELECT AID instruction.
  • the SELECT AID carries an application identifier AID.
  • the mobile phone when the mobile phone and other non-contact terminals supporting the NFC function are within the distance specified by the NFC protocol, the mobile phone enters the magnetic field of the non-contact terminal, and the non-contact terminal sends a SELECT AID command to the mobile phone, where the command carries AID.
  • a notification signal is sent to the NFC chip; or the NFC chip can locally save the configuration file of the system, and the configuration file records the state of the main processor, including the power-on state or the power-off state. Then, the NFC chip determines whether the main processor is powered off according to the power-off signal or the read configuration file sent by the main processor. When the NFC chip determines that the mobile phone is powered off, the following step 602 is performed.
  • the NFC determines whether the AID belongs to a preset AID set.
  • the NFC sends a power-on trigger signal to the PMU.
  • the NFC sends a current signal to the PMU through the bus, and the current signal is used to trigger the PMU to be powered on.
  • the PMU receives the power-on trigger signal sent by the NFC, and wakes up the main processor according to the power-on trigger signal.
  • the PMU determines the current battery power. If the current battery power is greater than the threshold, the PMU performs the same clock sequence as the power-on button to trigger the PMU, and wakes up the main processor, the screen, and other modules in the mobile phone; if less than the threshold, the PMU In combination with the current battery power and the potential generated from the magnetic field, the other clock sequence can be powered up to wake up only the modules related to the NFC service processing. These modules do not include modules that are not related to NFC service processing such as screens and coprocessors.
  • the main processor handshakes with the NFC to notify the NFC that the main processor is powered on.
  • the NFC routes the SELECT AID instruction to an SE or HCE application in the main processor to process the NFC service according to the AID carried in the SELECT AID instruction.
  • the SELECT AID instruction is routed to the SE corresponding to the AID according to the correspondence. If the NFC does not store the correspondence between each AID and SE in the preset AID, the NFC will route the SELECT AID instruction to the corresponding SE according to the standard routing table. Alternatively, NFC routes the SELECT AID instruction to the default SE or HCE application.
  • the mobile phone After the NFC service processing is completed by using the method shown in FIG. 7, as shown in FIG. 8, the mobile phone performs the following processing, including:
  • the NFC chip confirms that the service processing is completed, and sends a notification message to the main processor.
  • the NFC chip determines that the mobile phone has left the POS machine magnetic field, or judges that the card reading message has been sent to the POS machine, the NFC chip confirms that the NFC service processing is completed, and the NFC chip sends a notification message to the main processor.
  • the notification message is used to notify the main processor that the NFC service processing has been completed.
  • the NFC sends a notification message to the main processor after waiting for the preset duration.
  • the main processor determines whether the current battery power is greater than a threshold.
  • the main processor determines that the power-on type is a power-on type triggered by the NFC chip. Then, the main processor determines the current battery power. When the current battery power is greater than the threshold, indicating that the current battery power is sufficient to maintain the mobile phone state, the following step 703 is performed. When the current battery power is less than the threshold, the following step 704 is performed.
  • the main processor instructs the display to display a prompt option.
  • the prompt option is used to indicate whether the user keeps the power on state.
  • the mobile phone remains powered on.
  • the following step 704 is performed.
  • the main processor sends a power-off trigger signal to the PMU.
  • the PMU is powered off according to the power-off trigger signal.
  • the process 802 in FIG. 9 when the mobile phone is in a shutdown state close to the bus card reader, the process 802 in FIG.
  • the power-on sequence controls the main processor to be powered on to process the NFC service.
  • the mobile phone displays a prompt message according to the process 803 in FIG. 9, the prompt information includes prompting the user to complete the NFC payment and the amount of the NFC payment.
  • the prompt information for asking the user whether to turn off the power is further included.
  • the mobile phone re-enters the power-off state as shown in process 804 in FIG.
  • the embodiment of the present application provides a terminal, which includes a near field communication NFC chip 910, a PMU 920, and a main processor 930 as a first terminal.
  • the NFC chip 910 includes an NFC controller (Near Field Communication Controller, NFCC) and an NFC antenna.
  • the main processor 930 is integrated with a security module SE931 or a host-based card emulation HCE application 932.
  • the terminal 900 also includes a memory 940, a transceiver 950, and a bus 960.
  • the NFC chip 910, the PMU 920, the main processor 930, the memory 940, and the transceiver 950 are connected to each other through the bus 960.
  • the main processor 930 may be a central processing unit (CPU), a general-purpose processor, a digital signal processor (DSP), and an application-specific integrated circuit (ASIC). Field Programmable Gate Array (FPGA) or other programmable logic device, transistor logic device, hardware component, or any combination thereof. It is possible to implement or carry out the various illustrative logical blocks, modules and circuits described in connection with the present disclosure.
  • the processor may also be a combination of computing functions, for example, including one or more microprocessor combinations, a combination of a DSP and a microprocessor, and the like.
  • the memory 940 can be used to store software programs and modules that execute various functional applications and data processing of the terminal 900 by running software programs and modules stored in the memory 940.
  • the memory 940 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application required for at least one function, and the like, such as a sound playing function, an image playing function, and the like; and the storage data area may be stored according to the terminal.
  • the data created by the use of 900 (such as audio data, image data, phone book, etc.).
  • memory 940 can include high speed random access memory, and can also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
  • the transceiver 950 is configured to support the terminal 900 to interact with other devices.
  • the bus 960 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus.
  • PCI Peripheral Component Interconnect
  • EISA Extended Industry Standard Architecture
  • the bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is shown in Figure 8, but it does not mean that there is only one bus or one type of bus.
  • the NFC chip 910 is configured to receive an application selection instruction sent by the second terminal when the main processor of the first terminal is powered off, where the application selection instruction is used to indicate that the first SE is in the first SE.
  • the application or the HCE application processes the NFC service.
  • the NFC chip 910 is further configured to send a power-on trigger signal to the PMU.
  • the PMU 920 is configured to wake up the main processor 930 according to the power-on trigger signal sent by the NFC chip 910.
  • the NFC chip 910 is further configured to route the application selection instruction to the main processor 930.
  • the main processor 930 is configured to process the NFC service.
  • the NFC chip 910 is further configured to determine whether the application identifier AID carried in the application selection instruction belongs to an AID in the preset AID set.
  • the NFC chip 910 sends a power-on trigger signal to the PMU 920.
  • the second SE and the main processor are independently set.
  • the preset AID set includes an application installed in an SE of the main processor or an AID of the HCE application.
  • the PMU 920 is configured to wake up the main processor 930 according to the power-on trigger signal sent by the NFC chip 910.
  • the NFC chip 910 is further configured to select a finger according to the application.
  • the AID carried in the command routes the application selection instruction to the SE or HCE application in the main processor 930 for NFC service processing.
  • the main processor 930 is further configured to add an application identifier AID of the target application to the preset AID set; the target application includes an application installed in the SE of the main processor or the HCE application.
  • the main processor 930 is further configured to configure the preset AID to the NFC chip 910.
  • the NFC chip 910 is further configured to send a delay instruction to the second terminal, where the delay instruction carries a duration to be extended, and the delay instruction is used to indicate that the second terminal increases communication.
  • the waiting time is established and the waiting time is increased for the length of time to be extended.
  • the PMU 920 is further configured to determine a current battery power; when the current battery power is greater than a threshold, powering up the main processor according to a first clock sequence; when the current battery power is less than the threshold When the second clock sequence is powered on, the main processor is woken up.
  • the first clock sequence is a power-on sequence, and the second clock sequence is used to wake up only modules for NFC service processing.
  • the main processor 930 is further configured to prompt the user to complete the NFC service when the NFC service is completed.
  • the NFC chip 910 is further configured to send a notification message to the main processor 930, where the notification message is used to notify the main processor that the NFC service has been processed.
  • the main processor 930 is further configured to determine, according to the notification message sent by the NFC chip 910, a current battery power, when the current battery power is greater than the threshold, prompting the user whether to shut down; when the current battery When the amount of power is less than the threshold, a power-off trigger signal is sent to the PMU 920.
  • the PMU 920 is further configured to power off the terminal according to the power-off trigger signal sent by the main processor 930.
  • the first terminal when the NFC chip of the first terminal receives an application selection instruction sent by the second terminal to instruct the first terminal to process the NFC service through the application in the first SE or the HCE application,
  • the NFC chip sends a power-on trigger signal to the PMU, and the PMU triggers the power-on of the main processor according to the power-on trigger signal.
  • the SE in the main processor or the HCE application running in the main processor can process the NFC service.
  • the terminal can wake up the main processor when the power is off, so that the SE integrated in the main processor or the main operation
  • the HCE application in the processor can work normally, thereby completing the NFC service processing.
  • the embodiment of the present application further provides an NFC chip, where the near field communication NFC chip is located at a first terminal, the first terminal further includes a main processor and a power management unit PMU, and the main processor is integrated with the first
  • the security module SE and/or the host-based card emulates the HCE application.
  • the NFC chip is configured to receive an application selection instruction sent by the second terminal, where the application selection instruction is used to indicate that the NFC service is processed by the application in the first SE or the HCE application.
  • the NFC chip is further configured to determine whether the main processor is powered off; when the main processor is powered off, sending a power-on trigger signal to the PMU, so that the PMU is configured according to the power-on trigger signal
  • the main processor is electrically woken up.
  • the NFC chip is further configured to route the application selection instruction to the main processor to facilitate the main processor to process the NFC service.
  • a notification signal is sent to the NFC chip; or the NFC chip can locally save the configuration file of the system, and the configuration file records the state of the main processor, including the power-on state or the power-off state. Then, the NFC chip determines whether the main processor is powered off according to the power-off signal or the read configuration file sent by the main processor.
  • the NFC chip is further configured to determine, when the first terminal further includes the second SE, whether the application identifier AID carried in the application selection instruction belongs to a preset AID.
  • the AID belongs to the preset AID, a power-on trigger signal is sent to the PMU.
  • the second SE and the main processor are independently set.
  • the NFC chip is further configured to send a delay instruction to the second terminal, where the delay instruction carries a duration to be extended, and the delay instruction is used to indicate that the second terminal increases the communication waiting duration. And the increased waiting time is the length of time to be extended.
  • the NFC chip sends power to the PMU when receiving the application selection instruction sent by the second terminal to instruct the first terminal to process the NFC service through the application in the first SE or the HCE application.
  • the trigger signal is caused to cause the PMU to trigger the main processor to be powered according to the power-on trigger signal.
  • the SE in the main processor or the HCE application running in the main processor can process the NFC service. Therefore, by the above method, even if the SE is integrated in the main processor or the HCE application is installed in the main processor, the NFC chip can wake up the main processor when the power is off, so that the SE integrated in the main processor runs or The HCE application in the main processor can work normally, and then complete the NFC service processing.
  • the steps of a method or algorithm described in connection with the present disclosure may be implemented in a hardware or may be implemented by a processor executing software instructions.
  • the software instructions may be composed of corresponding software modules, which may be stored in a random access memory (RAM), a flash memory, a read only memory (ROM), an erasable programmable read only memory ( Erasable Programmable ROM (EPROM), electrically erasable programmable read only memory (EEPROM), registers, hard disk, removable hard disk, compact disk read only (CD-ROM) or any other form of storage medium known in the art.
  • An exemplary storage medium is coupled to the processor to enable the processor to read information from, and write information to, the storage medium.
  • the storage medium can also be an integral part of the processor.
  • the processor and the storage medium can be located in an ASIC.
  • Computer readable medium includes computer storage medium And a communication medium, wherein the communication medium includes any medium that facilitates transfer of a computer program from one location to another.
  • a storage medium may be any available media that can be accessed by a general purpose or special purpose computer.

Abstract

本申请提供一种NFC业务处理方法、终端及NFC芯片,涉及终端技术领域,为了解决现有技术中在终端关机时,终端无法利用inSE或HCE处理NFC业务的问题而发明。其中,该方法应用于第一终端,第一终端包括主处理器和NFC芯片,主处理器集成有第一SE和/或运行有HCE应用。该方法包括:当第一终端的主处理器下电时,第一终端接收第二终端发送的应用选择指令,该应用选择指令用于指示通过第一SE中的应用或者HCE应用处理NFC业务。第一终端在收到该应用选择指令后,控制主处理器上电,并将该应用选择指令路由至主处理器以通过主处理器处理NFC业务。本申请应用在终端处理NFC业务的过程中。

Description

一种NFC业务处理方法、终端及NFC芯片 技术领域
本申请涉及终端技术领域,尤其涉及一种NFC业务处理方法、终端及NFC芯片。
背景技术
近距离无线通信(Near Field Communication,NFC)技术是由非接触式射频识别(Radio Frequency Identification,RFID)及互联互通技术整合演变而来,在单一芯片上结合感应式读卡器、感应式卡片和点对点的功能,能在短距离内与其他支持NFC功能的设备进行识别和数据交换。目前,越来越多的终端配备NFC功能,以手机为例,配备NFC功能的手机可以用作机场登机验证、门禁钥匙,还可以实现卡模拟,例如用作交通一卡通、信用卡、支付卡等实现NFC业务处理。
配备NFC功能的手机实现卡模拟时,目前提供两种实现方式:一种是基于硬件的,称为虚拟卡模式(Virtual Card Mode);一种是基于软件的,称为主机卡模式(Host Card Mode)。
在虚拟卡模式下,手机需要提供安全模块(Secure Elemen,SE),以实现对敏感信息的安全存储和对交易事务提供安全的执行环境。目前,SE在手机中的存在形式包括:集成在客户识别模块(Subscriber Identification Module,SIM)卡中,称为SIM-SE;集成在主处理器中,称为inSE;或者单独芯片,称为eSE。在虚拟卡模式下,NFC芯片将从外部读写器接收到的命令或数据转发到SE,由SE进行处理,并通过NFC芯片与外部读写器进行交互。
在主机卡模式下,手机不需要提供SE,而是由在手机中运行的基于主机的卡模拟(host-based cardemulation,HCE)应用或云端的服务器完成SE的功能。在这种模式下,NFC芯片将从外部读写器接收到的命令或数据发送至手机中的HCE应用,或通过移动网络发送至云端的服务器来完成交互。
现有技术中,当手机中存在集成在主处理器中的inSE或手机安装了HCE应用时,在终端关机时,inSE或HCE应用无法工作,进而终端无法利用inSE或HCE处理NFC业务。
发明内容
本申请实施例提供一种NFC业务处理方法、终端及NFC芯片,以解决现有技术中存在的在终端关机时,inSE或HCE应用无法工作,进而终端无法利用inSE或HCE处理NFC业务的问题。
第一方面,提供一种NFC业务处理方法,该方法应用于第一终端,该第一终端包括主处理器和NFC芯片,所述主处理器集成有第一SE和/或运行有HCE应用。该NFC业务处理方法包括:当第一终端的主处理器下电时,该第一终端接收第二终端发送的应用选择指令,该应用选择指令用于指示通过所 述第一SE中的应用或者所述HCE应用处理NFC业务。第一终端在收到该应用选择指令后,控制主处理器上电。然后第一终端将该应用选择指令路由至主处理器以通过主处理器处理所述NFC业务。
上述方法中,当第一终端接收到第二终端发送的用于指示第一终端通过所述第一SE中的应用或者所述HCE应用处理NFC业务的应用选择指令时,所述第一终端控制主处理器上电。这样在主处理器上电后,主处理器中的SE或运行在主处理器中的HCE应用能够处理该NFC业务。因此,通过上述方法,即使SE集成在主处理器中或HCE应用安装在主处理器中,终端能够在关机状态时上电唤醒主处理器,使得集成在主处理器中的SE或运行在主处理器中的HCE应用能够正常工作,进而完成NFC业务处理。
在第一方面的一种实现方式中,所述第一终端还包括第二SE,该第二SE和所述主处理器独立设置。则在第一终端控制所述主处理器上电之前,上述方法还包括:第一终端确定应用选择指令中携带的应用标识AID是否属于预设AID集合中的AID,如果所述AID属于所述预设AID集合中的AID,则第一终端控制所述主处理器上电。其中,所述预设AID集合包括安装于所述第一SE中的应用和/或所述HCE应用的AID。
在第一方面的一种实现方式中,在所述第一终端控制所述主处理器上电之前,上述方法还包括:第一终端向所述第二终端发送延时指令,该延时指令中携带待延长时长,该延时指令用于指示所述第二终端增加通信等待时长且增加的等待时长为所述待延长时长。
在第一方面的一种实现方式中,第一终端控制所述主处理器上电包括:第一终端确定当前电池电量。如果当前电池电量大于阈值,则第一终端按照第一时钟顺序上电唤醒主处理器。如果当前电池电量小于所述阈值,则第一终端按照第二时钟顺序上电唤醒主处理器。其中,所述第一时钟顺序为开机上电顺序,所述第二时钟顺序用于仅唤醒用于处理NFC业务的模块。
在第一方面的一种实现方式中,在第一终端将应用选择指令路由至主处理器之后,上述方法还包括:当第一终端处理完成NFC业务时,第一终端提示用户已完成所述NFC业务。
在第一方面的一种实现方式中,在第一终端将所述应用选择指令路由至所述主处理器之后,上述方法还包括:当第一终端处理完成所述NFC业务时,第一终端确定当前电池电量;如果当前电池电量大于阈值,则第一终端提示用户是否关机;如果当前电池电量小于阈值,第一终端控制主处理器下电。
第二方面,提供一种NFC业务处理方法,该方法应用于第一终端,该第一终端包括主处理器、NFC芯片和电源管理单元(power management unit,PMU),所述主处理器集成有第一SE和/或运行有HCE应用。该方法包括:当主处理器下电时,NFC芯片接收第二终端发送的应用选择指令,该应用选择指令用于指示通过所述第一SE中的应用或者所述HCE应用处理NFC业务。然后,NFC芯片向PMU发送上电触发信号。PMU根据该上电触发信号控制主处理器上电。在主处理器上电后,NFC芯片将上述应用选择指令路由至主 处理器,由主处理器处理所述NFC业务。
在第二方面的一种实现方式中,所述第一终端还包括第二SE,该第二SE和所述主处理器独立设置。则在NFC芯片向PMU发送上电触发信号之前,上述方法还包括:NFC芯片确定应用选择指令中携带的应用标识(application identifier,AID)是否属于预设AID集合中的AID。如果所述AID属于所述预设AID集合中的AID,则所述NFC芯片向所述PMU发送上电触发信号。其中,该预设AID集合包括安装于所述第一SE中的应用和/或所述HCE应用的AID。
在第二方面的一种实现方式中,在NFC芯片向PMU发送上电触发信号之前,上述方法还包括:NFC芯片向所述第二终端发送延时指令,该延时指令中携带待延长时长,该延时指令用于指示所述第二终端增加通信等待时长且增加的所述等待时长为所述待延长时长。在该实现方式中,通过增加第一终端向第二终端发送延时指令的过程,第二终端收到该延时指令后增加等待第一终端响应的时长,进而第一终端能够有充足的时间启动上电过程。
在第二方面的一种实现方式中,所述PMU根据所述上电触发信号控制所述主处理器上电包括:PMU确定当前电池电量。如果所述当前电池电量大于阈值,则PMU按照第一时钟顺序上电唤醒所述主处理器。如果所述当前电池电量小于所述阈值,则PMU按照第二时钟顺序上电唤醒所述主处理器。其中,所述第一时钟顺序为开机上电顺序,所述第二时钟顺序用于仅唤醒用于处理NFC业务的模块。
在第二方面的一种实现方式中,在主处理器处理NFC业务之后,上述方法还包括:当主处理器处理完成NFC业务时,提示用户已完成所述NFC业务。
在第二方面的一种实现方式中,在主处理器处理所述NFC业务之后,上述方法还包括:当主处理器处理完成所述NFC业务时,主处理器确定当前电池电量。如果所述当前电池电量大于阈值,则主处理器提示用户是否关机;如果当前电池电量小于所述阈值,则PMU控制所述主处理器下电。
上述方法中,当第一终端的NFC芯片接收到第二终端发送的用于指示第一终端通过所述第一SE中的应用或者所述HCE应用处理NFC业务的应用选择指令时,所述NFC芯片向PMU发送上电触发信号,PMU根据该上电触发信号触发主处理器上电。这样在主处理器上电后,主处理器中的SE或运行在主处理器中的HCE应用能够处理该NFC业务。因此,通过上述方法,即使SE集成在主处理器中或HCE应用安装在主处理器中,终端能够在关机状态时上电唤醒主处理器,使得集成在主处理器中的SE或运行在主处理器中的HCE应用能够正常工作,进而完成NFC业务处理。
第三方面,提供一种终端,所述终端作为第一终端包括近场通信NFC芯片、电源管理单元PMU和主处理器,所述主处理器设置有第一安全模块SE或运行有基于主机的卡模拟HCE应用,其中:所述NFC芯片,用于当所述主处理器下电时,接收第二终端发送的应用选择指令,所述应用选择指令用于指示通过所述第一SE中的应用或者所述HCE应用处理NFC业务。所述NFC 芯片,还用于向所述PMU发送上电触发信号。所述PMU,用于根据所述NFC芯片发送的所述上电触发信号上电唤醒所述主处理器。所述NFC芯片,还用于将所述应用选择指令路由到所述主处理器。所述主处理器,用于处理所述NFC业务。
在第三方面的一种实现方式中,所述第一终端还包括第二SE,该第二SE和所述主处理器独立设置。则所述NFC芯片,还用于确定所述应用选择指令中携带的应用标识AID是否属于预设AID集合中的AID;当所述AID属于所述预设AID集合中的AID时,所述NFC芯片向所述PMU发送上电触发信号。其中,所述预设AID集合包括所述安装于所述第一SE中的应用和/或所述HCE应用的AID。
在第三方面的一种实现方式中,所述NFC芯片,还用于向所述第二终端发送延时指令,所述延时指令中携带待延长时长,所述延时指令用于指示所述第二终端增加通信等待时长且增加的所述等待时长为所述待延长时长。
在第三方面的一种实现方式中,所述PMU,还用于确定当前电池电量;当所述当前电池电量大于阈值时,所述PMU按照第一时钟顺序上电唤醒所述主处理器;当所述当前电池电量小于所述阈值,则所述PMU按照第二时钟顺序上电唤醒所述主处理器。其中,所述第一时钟顺序为开机上电顺序,所述第二时钟顺序用于仅唤醒用于处理NFC业务的模块。
在第三方面的一种实现方式中,所述主处理器,还用于当处理完成所述NFC业务时,提示用户已完成所述NFC业务。
在第三方面的一种实现方式中,所述主处理器,还用于在处理完成所述NFC业务时,确定当前电池电量;当所述当前电池电量大于阈值时,提示用户是否关机;当所述当前电池电量小于所述阈值时,控制所述主处理器下电。
上述第一终端,当第一终端的NFC芯片接收到第二终端发送的用于指示第一终端通过所述第一SE中的应用或者所述HCE应用处理NFC业务的应用选择指令时,所述NFC芯片向PMU发送上电触发信号,PMU根据该上电触发信号触发主处理器上电。这样在主处理器上电后,主处理器中的SE或运行在主处理器中的HCE应用能够处理该NFC业务。因此,通过上述方法,即使SE集成在主处理器中或HCE应用安装在主处理器中,终端能够在关机状态时上电唤醒主处理器,使得集成在主处理器中的SE或运行在主处理器中的HCE应用能够正常工作,进而完成NFC业务处理。
第四方面,提供一种NFC芯片,所述NFC芯片位于第一终端,所述第一终端还包括主处理器和PMU,所述主处理器集成有第一安全模块SE和/或运行有基于主机的卡模拟HCE应用。其中,所述NFC芯片,用于接收第二终端发送的应用选择指令,所述应用选择指令用于指示通过所述第一SE中的应用或者所述HCE应用处理NFC业务。所述NFC芯片,还用于确定所述主处理器是否下电;当所述主处理器下电时,向所述PMU发送上电触发信号以使得所述PMU根据所述上电触发信号上电唤醒所述主处理器。所述NFC芯片,还用于将所述应用选择指令路由到所述主处理器以便于所述主处理器处理所 述NFC业务。
在第四方面的一种实现方式中,所述NFC芯片,还用于当所述第一终端还包括第二SE时,确定所述应用选择指令中携带的应用标识AID是否属于预设AID集合;当所述AID属于所述预设AID集合时,向所述PMU发送上电触发信号。其中,所述第二SE和所述主处理器独立设置。
在第四方面的一种实现方式中,所述NFC芯片,还用于向所述第二终端发送延时指令,所述延时指令中携带待延长时长,所述延时指令用于指示所述第二终端增加通信等待时长且增加的所述等待时长为所述待延长时长。
上述NFC芯片,当接收到第二终端发送的用于指示第一终端通过所述第一SE中的应用或者所述HCE应用处理NFC业务的应用选择指令时,所述NFC芯片向PMU发送上电触发信号,以使得PMU根据该上电触发信号触发主处理器上电。这样在主处理器上电后,主处理器中的SE或运行在主处理器中的HCE应用能够处理该NFC业务。因此,通过上述方法,即使SE集成在主处理器中或HCE应用安装在主处理器中,NFC芯片能够在关机状态时上电唤醒主处理器,使得集成在主处理器中的SE或运行在主处理器中的HCE应用能够正常工作,进而完成NFC业务处理。
第五方面,提供一种计算机可读存储介质,所述计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机执行上述第一方面的方法。
第六方面,提供一种计算机程序产品,所述计算机程序产品包含指令,当其在计算机上运行时,使得计算机执行上述第一方面的方法。
附图说明
图1a和图1b为NFC业务的应用场景示意图;
图2为一种手机的结构示意图;
图3为本申请实施例提供的一种NFC业务处理方法的流程示意图;
图4为本申请实施例提供的另一种NFC业务处理方法的流程示意图;
图5为本申请实施例提供的又一种NFC业务处理方法的流程示意图;
图6为本申请实施例提供的手机中的主处理器为NFC配置预设AID集合的流程示意图;
图7为本申请实施例提供的一种在手机中实现上述NFC业务处理方法的流程示意图;
图8为本申请实施例提供的一种手机在处理完成NFC业务后的处理流程示意图;
图9为本申请实施例提供的一种手机在关机状态下处理NFC业务的界面示意图;
图10为本申请实施例提供的一种终端的结构示意图。
具体实施方式
目前,NFC业务处理由于其便利性而广泛应用于刷卡支付、身份验证等场景。如图1a,在公交刷卡机支持NFC功能时,用户可利用该支持NFC功能的手机12碰触公交刷卡机11以实现刷卡支付。如图1b所示,在商户的POS 终端支持NFC功能时,用户还可以利用支持NFC功能的手机22触碰POS终端21进行刷卡支付。在其他应用场景中,当智能汽车支持NFC功能时,支持NFC功能的手机可以充当车钥匙,在靠近智能汽车时与智能汽车进行NFC交互以打开汽车车门。在这些场景中,手机模拟为“银行卡”、“公家卡”或“车钥匙”来实现刷卡支付或刷卡开启智能汽车。
结合图1a或图1b所示的应用场景,本申请实施例提供一种支持NFC功能的终端,该终端可以为手机、平板电脑、笔记本电脑、超级移动个人计算机、上网本、个人数字助理、可穿戴设备等。
以该支持NFC功能的终端为手机为例,如图2所示,手机100包括:NFC芯片110、主处理器120、存储器130、电源140、PMU150、输入单元160、显示单元170、音频电路180、射频电路190等部件。本领域技术人员可以理解,图2中示出的手机结构并不构成对手机的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。
下面分别对手机100的各功能组件进行介绍:
NFC芯片110包括NFC控制器(Near Field Communication Cntroller,NFCC)111和射频天线112,其功能包括射频信号的调制解调以及NFC协议处理。NFCC111一方面连接射频天线112实现13.56MHz信号的发送与接收,另一方面与SE通信。
可选的,手机中的SE可以集成在主处理器120中,或者位于手机的客户识别模块(Subscriber Identification Module,SIM)卡,或者位于手机的安全数字存储卡(Secure Digital Memory Card,SD)中,也可以为独立的芯片。
主处理器120是手机100的控制中心,利用各种接口和线路连接整个手机的各个部分,通过运行或执行存储在存储器130内的软件程序和/或模块,以及调用存储在存储器130内的数据,执行手机100的各种功能和处理数据,从而对手机进行整体监控。可选的,主处理器120可包括一个或多个处理单元;可选的,如图2所示,主处理器120集成应用处理器(Application Processor,AP)121和基带处理器(Baseband Processor,BP)122,其中,应用处理器121主要处理操作系统、用户界面和应用程序等,可选的,如图2所示,应用处理器121集成SE1211。基带处理器122主要处理无线通信。可以理解的是,上述基带处理器122也可以不集成到主处理器120中。
需要说明时,本申请实施例所指的所述主处理器120具体可以为片上系统SoC(System on Chip,SoC),还可以为中央处理器(Central Processing Unit,CPU)。SOC和CPU的具体实现可参考现有技术,此处不再赘述。
存储器130可用于存储软件程序以及模块,主处理器120通过运行存储在存储器130的软件程序以及模块,从而执行手机100的各种功能应用以及数据处理。存储器130可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序等,比如声音播放功能、图像播放功能等;存储数据区可存储根据手机100的使用所创建的数据(比如音频数据、图像数据、电话本等)等。此外,存储器130可以包括高速随 机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。
手机100还包括给各个部件供电的电源140(比如电池)和PMU150,PMU150一种高集成的、针对便携式设备的电源管理方案,即将传统分立的若干类电源管理芯片,如低压差线性稳压器(low dropout regulator,LDO)、直流转换器(DC converter,DC/DC)集成到手机的PMU,这样可相应缩小板级空间,提高效率,成本更低。PMU的触发条件是检测到用户按压电源键,电源按键连接PMU的管脚,按压电源键给PMU一个信号,则PMU按照预定时钟顺序,逐步控制电源140给处理器、显示单元、输入单元等不同模块上电。
输入单元160可用于接收输入的数字或字符信息,以及产生与手机100的用户设置以及功能控制有关的键信号输入。具体地,输入单元160可包括触摸屏161以及其他输入设备162。触摸屏161,也称为触控面板,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触摸屏161上或在触摸屏161附近的操作),并根据预先设定的程式驱动相应的连接装置。可选的,触摸屏161可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给主处理器120,并能接收主处理器120发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触摸屏161。除了触摸屏161,输入单元160还可以包括其他输入设备162。具体地,其他输入设备162可以包括但不限于物理键盘、功能键(比如音量控制按键、电源开关按键等)、轨迹球、鼠标、操作杆等中的一种或多种。
显示单元170可用于显示由用户输入的信息或提供给用户的信息以及手机100的各种菜单。显示单元170可包括显示面板171,可选的,可以采用液晶显示器(liquid crystal display,LCD)、有机发光二极管(organic light-emitting diode,OLED)等形式来配置显示面板171。进一步的,触摸屏161可覆盖显示面板171,当触摸屏161检测到在其上或附近的触摸操作后,传送给主处理器120以确定触摸事件的类型,随后主处理器120根据触摸事件的类型在显示面板171上提供相应的视觉输出。虽然在图2中,触摸屏161与显示面板171是作为两个独立的部件来实现手机100的输入和输入功能,但是在某些实施例中,可以将触摸屏161与显示面板171集成而实现手机100的输入和输出功能。
音频电路180、扬声器181、麦克风182可提供用户与手机100之间的音频接口。音频电路180可将接收到的音频数据转换后的电信号,传输到扬声器181,由扬声器181转换为声音信号输出;另一方面,麦克风182将收集的声音信号转换为电信号,由音频电路180接收后转换为音频数据,再将音频数据输出至RF电路190以发送给比如另一手机,或者将音频数据输出至存储器130以便进一步处理。
RF电路190可用于收发信息或通话过程中,信号的接收和发送,特别地,将基站的下行信息接收后,给主处理器120处理;另外,将上行的数据发送给基站。通常,RF电路包括但不限于天线、至少一个放大器、收发信机、耦合器、低噪声放大器(low noise amplifier,LNA)、双工器等。此外,RF电路190还可以通过无线通信与网络和其他设备通信。所述无线通信可以使用任一通信标准或协议,包括但不限于全球移动通讯系统(global system of mobile communication,GSM)、通用分组无线服务(general packet radio service,GPRS)、码分多址(code division multiple access,CDMA)、宽带码分多址(wideband code division multiple access,WCDMA)、长期演进(long term evolution,LTE)、电子邮件、短消息服务(short messaging service,SMS)等。
尽管未示出,手机100还可以包括蓝牙模块、全球定位系统(global positioning system,GPS)模块、扬声器、加速计、陀螺仪、重力传感器、光传感器等。
结合图2所示的手机结构,PMU用于对手机中各个模块进行供电管理,在手机开机时,用户按压电源键触发PMU按照一定的时钟顺序依次上电唤醒手机中的处理器、显示单元、输入单元等各个模块;在手机关机时,同样由PMU按照一定的时钟顺序触发手机中的处理器、显示单元、输入单元等各个模块下电。结合SE的类型,如表一所示,现有技术中不同类型的SE在手机关机时的是否能够工作以及工作原理具体为:
表一
Figure PCTCN2017087006-appb-000001
结合上述表一,发明人在研究中发现,现有技术中,在手机关机时,手机中的主处理器处于下电状态,则对于集成在主处理器中的inSE或运行在主处理器中的HCE应用而言,inSE和/或HCE应用无法工作,则当某些卡应用安装在inSE中或为HCE应用时,手机无法利用inSE或HCE应用实现处理NFC业务。
为了解决上述问题,本申请实施例提供一种NFC业务处理方法,该方法应用于支持NFC功能的终端,所述终端包括主处理器和NFC芯片,所述主处理器集成有SE(本申请实施例称之为第一SE)或运行有HCE应用,如图3所示,该方法包括以下步骤:
201、当所述第一终端的主处理器下电时,所述第一终端接收第二终端发送的应用选择指令。
其中,所述第一终端包括手机等支持NFC功能的终端。所述第二终端包括其他支持NFC功能的终端,如POS机等。当第一终端与第二终端的距离在NFC协议规定的距离范围内时,所述第二终端向该第一终端发送应用选择指令,所述应用选择指令用于指示第一终端通过所述第一SE中的应用或者所述HCE应用处理NFC业务。此外,该应用选择指令中携带AID,用于指示第一终端通过所述AID对应的应用处理所述NFC业务。
其中,当第一终端关机时,第一终端的主处理器下电。因此,本申请实施例中所描述的终端关机或主处理器下电均是指主处理器下电。
202、第一终端控制所述主处理器上电。
可选的,第一终端上电唤醒主处理器的具体实现过程包括:第一终端确定当前电池电量;如果所述当前电池电量大于阈值,则所述第一终端按照第一时钟顺序上电唤醒所述主处理器。如果所述当前电池电量小于所述阈值,则所述第一终端按照第二时钟顺序上电唤醒所述主处理器。其中,所述第一时钟顺序为开机上电顺序。该开机上电顺序是指第一终端正常开机时执行的开机上电顺序,如用户按压开机键进行开机时执行的开机上电顺序。所述第二时钟顺序用于仅上电唤醒用于处理NFC业务的模块。
具体的,第一终端预先存储两种或多种时钟顺序。则第一终端确定当前电池电量,如果当前电池电量足以维持终端正常开机,第一终端按照正常开机时的时钟顺序依次唤醒第一终端中的各个模块,包括第一终端的主处理器、显示屏、蓝牙模块、重力传感器等。这些模块有些为NFC业务处理所关联的模块,如inSE所在的主处理器等;有些为与NFC业务处理无关的模块,如蓝牙模块、重力传感器等。如果当前电池电量不足以维持终端正常开机,第一终端利用电池供电或利用第一终端与第二终端交互产生的磁场中的电势能供电,按照其他时钟顺序仅唤醒与NFC业务处理相关的模块,如inSE所在的主处理器;无需唤醒其他与NFC业务处理无关的模块,如显示屏、蓝牙模块等。
203、第一终端将所述应用选择指令路由至所述主处理器以通过所述主处理器处理所述NFC业务。
在一种实现方式中,当第一终端中只包含inSE和/或HCE应用,不包含其他类型的SE时,第一终端在收到该应用选择指令后默认将该应用选择指令路由至所述主处理器。
当第一终端中包含多种类型的SE时,第一终端根据所述应用选择指令中携带的AID,将所述应用选择指令路由至所述主处理器中的SE或HCE应用以进行NFC业务处理。
上述方法中,当第一终端接收到第二终端发送的用于指示第一终端通过所述第一SE中的应用或者所述HCE应用处理NFC业务的应用选择指令时,所述第一终端控制主处理器上电。这样在主处理器上电后,主处理器中的SE或运行在主处理器中的HCE应用能够处理该NFC业务。因此,通过上述方法, 即使SE集成在主处理器中或HCE应用安装在主处理器中,终端能够在关机状态时上电唤醒主处理器,使得集成在主处理器中的SE或运行在主处理器中的HCE应用能够正常工作,进而完成NFC业务处理。
现有技术中第二终端在发送应用选择指令后,如果在一定时间内没有收到第一终端的响应,就会认为此次通信失败。本申请实施例中由于在收到第二终端的应用选择指令后增加了第一终端控制主处理器上电的过程,响应速度较慢。因此,可选的,为了避免第二终端的等待时间较短而认为此次通信失败,在第一终端判断主处理器已下电需要启动上电流程时,本申请实施例还包括以下步骤:所述第一终端向所述第二终端发送延时指令,该延时指令中携带待延长时长,该延时指令用于指示所述第二终端增加通信等待时长且增加的所述等待时长为所述待延长时长。这样,本申请实施例中通过增加第一终端向第二终端发送延时指令的过程,第二终端收到该延时指令后增加等待第一终端响应的时长,进而第一终端能够有充足的时间启动上电过程。
可选的,在NFC业务处理结束后,所述第一终端再次确定当前电池电量。如果所述当前电池电量大于阈值,则第一终端提示用户是否由开机状态再次进入关机状态,并根据用户的选择保持开机状态或再次下电关机。如果所述当前电池电量小于所述阈值,第一终端则自动下电关机。
可选的,所述第一终端中除了包括上述集成在主处理器中的SE,还可能包括其他类型的SE,该其他类型的SE为与主处理器独立设置的SE,如SIM-SE或eSE等(本申请实施例将这种类型的SE称为第二SE)。在这种情况下,如图4所示,在步骤202“第一终端控制所述主处理器上电”之前,所述方法还包括以下步骤:
301、所述第一终端确定所述应用选择指令中携带的所述AID是否属于预设AID集合中的AID。
如果所述AID属于所述预设AID集合,则所述第一终端执行上述步骤202以控制所述主处理器上电。
其中,所述预设AID集合包括所述第一SE中的应用的AID和/或所述HCE应用的AID。
在一种实现方式中,第一终端确定所述第一终端中已包含的SE的类型,当第一终端中包含集成于主处理器中的SE(inSE)时,将inSE中安装的应用的AID添加到预设AID集合。当第一终端中还包含HCE应用时,将HCE应用的AID添加到预设AID集合。当inSE和其它类型的SE中安装了相同的应用(具备相同的AID)时,如inSE和SIM-SE都安装了某个公交应用时,由于SIM-SE在第一终端关机时可以不依赖于主处理器上电,可从电池或第二终端的磁场中取电,因此不需要主处理器上电即可正常工作处理某些NFC业务,则无需将这类应用的AID添加到预设AID集合中。
可选的,在一种实现方式中,通过查看inSE中的应用或HCE应用的注册信息,确定其是否在终端关机状态下依然有刷卡需求。当有在终端关机状态下仍然有刷卡需求的应用时,将这类应用的AID添加到预设AID集合中;当 在终端关机状态下不存在有刷卡需求的应用时,则无需将这类应用的AID确定为所述预设AID。在另一种实现方式中,用户操作手机以将某些应用设置为在关机状态下仍有关机刷卡需求的应用。
可选的,通过查看inSE中的应用或HCE应用的注册信息,确定其是否处于激活状态。当inSE中的某个应用或HCE应用已激活时,将这类应用的AID添加到预设AID集合中。当inSE中的某个应用或HCE应用未激活时,无需将这类应用的AID添加到预设AID集合中。
其中,当根据步骤302确定所述应用选择指令中携带的AID属于所述预设AID集合中的AID时,则表明所述应用选择指令中携带的AID所对应的应用安装在inSE中或为HCE应用,则第一终端需要上电唤醒主处理器以在唤醒主处理器后执行步骤204由主处理器处理NFC业务。
上述方法中,第一终端在关机状态下接收到携带有AID的应用选择指令时,判断该AID是否属于预设AID集合中的AID,当该AID属于预设AID集合中的AID时,控制主处理器上电。因此,通过上述方法,即使SE集成在主处理器中或HCE应用安装在主处理器中,终端能够在关机状态时上电唤醒主处理器,使得集成在主处理器中的SE或运行在主处理器中的HCE应用能够正常工作,进而完成NFC业务处理。
本申请实施例所指的所述第一终端包括主处理器、NFC芯片和PMU。其中,所述主处理器集成有第一SE和/或运行有HCE应用。所述NFC芯片用于处理NFC业务,所述PMU用于管理第一终端的上下电过程。实际应用中,触发第一终端进入下电关机状态的触发条件包括:第一终端的当前电池电量小于一定阈值,第一终端自动关机;或者,在当前电池电量充足时,用户按压物理按键等触发第一终端关机。无论上述哪种情况,第一终端在关机状态时,电池仍有电量。而第一终端中的NFC芯片所需的电量极小,即使在关机状态下,NFC芯片仍可利用电池中的电量供电,或者利用第一终端与第二终端交互产生的磁场中的电势能供电,进而正常工作。因此,在主处理器上电唤醒之前,第一终端中的NFC芯片可执行上述步骤201至步骤203以唤醒主处理器。
因此,如图5所示,本申请实施例提供一种NFC业务处理方法,该方法包括以下步骤:
401、当主处理器下电时,NFC芯片接收第二终端发送的应用选择指令。
其中,该应用选择指令用于指示通过所述第一SE中的应用或者所述HCE应用处理NFC业务。
其中,主处理器下电时,会向NFC芯片发送通知信号;或者NFC芯片可本地保存系统的配置文件,该配置文件中记载了主处理器的状态,包括上电状态或下电状态。则NFC芯片根据主处理器发送的下电信号或读取配置文件确定主处理器是否下电。
402、所述NFC芯片向所述PMU发送上电触发信号。
403、所述PMU根据所述上电触发信号控制所述主处理器上电。
其中,主处理器上电后,主处理器向NFC发送通知信号以通知所述NFC芯片,所述主处理器已上电。该过程可看做主处理器和NFC芯片握手以通知NFC芯片主处理器已上电。
404、所述NFC芯片将所述应用选择指令路由至所述主处理器。
405、所述主处理器处理所述NFC业务。
上述方法中,当第一终端的NFC芯片接收到第二终端发送的用于指示第一终端通过所述第一SE中的应用或者所述HCE应用处理NFC业务的应用选择指令时,所述NFC芯片向PMU发送上电触发信号,PMU根据该上电触发信号触发主处理器上电。这样在主处理器上电后,主处理器中的SE或运行在主处理器中的HCE应用能够处理该NFC业务。因此,通过上述方法,即使SE集成在主处理器中或HCE应用安装在主处理器中,终端能够在关机状态时上电唤醒主处理器,使得集成在主处理器中的SE或运行在主处理器中的HCE应用能够正常工作,进而完成NFC业务处理。
可选的,所述第一终端还包括第二SE。该第二SE包括其他不与主处理器集成的SE,如SIM-SE、inSE等。则在所述NFC芯片向所述PMU发送上电触发信号之前,所述方法还包括以下步骤:所述NFC芯片确定所述应用选择指令中携带的AID是否属于预设AID集合中的AID。如果所述AID属于所述预设AID集合中的AID,则所述NFC芯片向所述PMU发送上电触发信号。
其中,所述预设AID集合包括安装于所述第一SE中的应用和/或所述HCE应用的AID。所述预设AID集合由主处理器确定并为所述NFC芯片配置该预设AID集合。
可选的,在所述NFC芯片向所述PMU发送上电触发信号之前,上述方法还包括:所述NFC芯片向所述第二终端发送延时指令,所述延时指令中携带待延长时长,所述延时指令用于指示所述第二终端增加通信等待时长且增加的所述等待时长为所述待延长时长。
可选的,所述PMU根据所述上电触发信号控制所述主处理器上电的过程具体包括:PMU确定当前电池电量。如果当前电池电量大于阈值,则PMU按照第一时钟顺序上电唤醒所述主处理器。如果当前电池电量小于所述阈值,则PMU按照第二时钟顺序上电唤醒所述主处理器。其中,如前文所述,所述第一时钟顺序为开机上电顺序,所述第二时钟顺序用于仅唤醒用于处理NFC业务的模块。
可选的,在所述主处理器处理所述NFC业务之后,上述方法还包括:当所述主处理器处理完成所述NFC业务时,提示用户已完成所述NFC业务。
可选的,在所述主处理器处理所述NFC业务之后,上述方法还包括:当所述主处理器处理完成所述NFC业务时,所述主处理器确定当前电池电量。如果所述当前电池电量大于阈值,则所述主处理器提示用户是否关机;如果所述当前电池电量小于所述阈值,则所述PMU控制所述主处理器下电。
综上所述,在实现本申请实施例提供的上述方法时,所述第一终端执行以下过程:确定预设AID、利用确定的所述预设AID在第一终端关机时处理 NFC业务以及在终端处理完成NFC业务后维持开机或自动关机的处理过程。
结合图2所示手机的结构,如图6所示,手机确定预设AID的过程包括以下步骤:
501、主处理器获取手机上SE以及HCE应用的类型和标识。
具体的,为了实现NFC业务处理,手机系统支持NFC协议栈。NFC协议栈定义了多种命令,执行不同的命令会得到不同的执行结果。则本步骤中,主处理器执行SE发现(SE Discovery)命令确定手机上的SE的类型和标识以及HCE应用的标识。
当手机上包含inSE或HCE时,手机执行下述步骤。
502、主处理器获取每个SE上安装的已激活应用的AID。
具体的,主处理器给每个SE发送指示消息,用于指示SE回复激活的应用的AID。SE收到该指示消息后,根据已安装的应用的属性信息得到所有应用的状态,包括激活和未激活。SE将激活的应用的AID反馈给主处理器,主处理器得到所有已激活应用的AID。
示例性的,已激活应用的AID以及已激活应用所在的SE的标识如下表表二所示:
表二
已激活应用的AID 所在SE标识
AID1 SIM-SE1、inSE1
AID2 SIM-SE1
AID3 inSE1
AID4 HCE1
根据已激活应用所在的SE,当inSE上包含已激活应用时,执行下述步骤503a以将inSE上的已激活应用的AID添加到预设AID集合中。当所有HCE应用为激活状态时,手机执行下述步骤503b将HCE应用的AID添加到预设AID集合中。当某个已激活应用既安装在inSE又安装在SIM-SE时,手机则无需将此应用的AID添加到预设AID集合中。
503a、主处理器将inSE上的所有已激活应用的AID添加到预设AID集合中。
503b、主处理器将所有已激活的HCE应用的AID添加到预设AID集合中。
可选的,在其他实现方式中,如果inSE或者其它类型的SE如SIM-SE上安装有相同的应用(具有相同的AID),则主处理器无需将该应用的AID配置给NFC,仅为NFC配置只安装在inSE上的已激活应用的AID。
可选的,在其他实现方式中,在确定预设AID集合时,主处理器根据应用的配置信息确定该应用是否有关机刷卡需求,主处理器仅将满足前文所述条件且有关机刷卡需求的应用的AID添加到预设AID集合中。
504、主处理器向NFC配置所述预设AID集合。
可选的,在一种实现方式中,主处理器仅向NFC配置所述预设AID集合 中的AID。则NFC在收到SELECT AID指令时,如果该SELECT AID指令中携带的AID属于预设AID集合中的AID,则NFC按照标准路由表将该SELECT AID指令路由至相应的SE。其中,所述标准路由表中描述了如何根据AID路由至相应的SE的路由规则,其具体实现可参考现有技术,此处不再赘述。
在另一种实现方式中,主处理器向NFC配置预设AID集合和预设AID集合中每个AID对应的应用所在的SE的标识。则NFC在收到SELECT AID指令时,如果该SELECT AID指令中携带的AID属于预设AID集合中的AID,则NFC根据该AID对应的SE的标识,将该SELECT AID指令路由至相应的SE。
其中,图6示的上述步骤501至步骤504可以在手机开机初始化时或者手机启动NFC功能时自动执行,或者由用户选择将某些应用的AID添加到预设AID集合中。
在采用图6所示的方法确定预设AID集合之后,如图7所示,手机根据确定的所述预设AID集合在手机关机时实现NFC业务处理的过程包括以下步骤:
601、NFC接收SELECT AID指令。
其中,所述SELECT AID中携带应用标识AID。
示例性的,当手机与其他支持NFC功能的非接触终端在NFC协议规定的距离内时,手机进入所述非接触终端的磁场,所述非接触终端向手机发送SELECT AID指令,该指令中携带AID。
此外,主处理器下电时,会向NFC芯片发送通知信号;或者NFC芯片可本地保存系统的配置文件,该配置文件中记载了主处理器的状态,包括上电状态或下电状态。则NFC芯片根据主处理器发送的下电信号或读取配置文件确定主处理器是否下电。在NFC芯片确定手机下电时,执行下述步骤602。
602、NFC确定所述AID是否属于预设AID集合。
603、当所述AID属于所述预设AID集合时,所述NFC向PMU发送上电触发信号。
具体实现中,NFC通过总线向PMU发送电流信号,该电流信号用于触发PMU上电。
604、所述PMU接收所述NFC发送的上电触发信号,并根据所述上电触发信号上电唤醒所述主处理器。
其中,PMU判断当前电池电量,若当前电池电量大于阈值,则PMU执行同开机键触发PMU时一样的时钟顺序上电唤醒手机中的主处理器、屏幕等各个模块;若小于阈值,则PMU则结合当前电池电量以及从磁场产生的电势能取电激发另一个时钟顺序仅上电唤醒与NFC业务处理相关的模块,这些模块不包括屏幕、协处理器等对NFC业务处理无关的模块。
605、主处理器与NFC握手以告知所述NFC所述主处理器已上电。
606、NFC根据所述SELECT AID指令中携带的AID,将所述SELECT AID指令路由到所述主处理器中的SE或HCE应用以处理所述NFC业务。
具体的,如果NFC存储了预设AID集合中的每个AID和SE的对应关系,则根据该对应关系将SELECT AID指令路由到AID对应的SE。如果NFC未存储预设AID中每个AID和SE的对应关系,则NFC根据标准路由表将将SELECT AID指令路由到对应的SE。或者,NFC将SELECT AID指令路由到默认的SE或HCE应用。
在采用图7所示的方法完成NFC业务处理后,如图8所示,手机进行以下处理过程,包括:
701、NFC芯片确认业务处理已完成,向主处理器发送通知消息。
具体的,当NFC芯片判断手机已离开POS机磁场,或者判断已经给POS机发送完卡片读取的消息,则NFC芯片确认此次NFC业务处理已完成,则NFC芯片向主处理器发送通知消息,该通知消息用于通知主处理器此次NFC业务处理已完成。
考虑到在完成该NFC业务处理后,其他非接触设备可能还有指令,为了给此次通信提供足够的时间,设置预设时长,NFC在等待该预设时长后,向主处理器发送通知消息。
702、主处理器在接收到NFC芯片的通知消息后,确定当前电池电量是否大于阈值。
具体的,主处理器在接收到NFC芯片的通知消息后,确定本次上电类型为由NFC芯片触发的上电类型。则主处理器确定当前电池电量,当当前电池电量大于阈值时表明当前电池电量足以维持手机保持开机状态,则执行下述步骤703。当当前电池电量小于阈值时,执行下述步骤704。
703、主处理器指示显示器显示提示选项。
其中,该提示选项用于示用户是否保持开机状态,当用户确定保持开机状态时,手机保持开机状态。当用户确定不保持开机状态时,执行下述步骤704
704、主处理器向PMU发送下电触发信号。
705、PMU根据所述下电触发信号下电关机。
参照图9,为了更清楚的说明本申请实施例提供的NFC业务处理方法,如图9中过程801,当手机在关机状态下靠近公交刷卡器时,如图9中过程802手机按照正常开机的上电顺序控制主处理器上电以处理NFC业务;在手机处理完成NFC业务后,如图9中过程803,手机显示提示信息,该提示信息包括提示用户已完成NFC支付以及NFC支付的金额,还包括询问用户是否重新关机的提示信息,当用户点击确认时,如图9中的过程804,手机重新进入关机状态。
为了实现本申请实施例提供的上述方法,如图10所示,本申请实施例提供一种终端,该终端900作为第一终端包括近场通信NFC芯片910、PMU920和主处理器930。其中,所述NFC芯片910包括NFC控制器(Near Field Communication Controller,NFCC)和NFC天线。所述主处理器930集成有安全模块SE931或安装有基于主机的卡模拟HCE应用932。此外,所述终端 900还包括存储器940、收发器950和总线960。所述NFC芯片910、PMU920、主处理器930、存储器940、收发器950通过所述总线960互相连接。
其中,所述主处理器930可以是中央处理器(Central Processing Unit,CPU),通用处理器,数字信号处理器(Digital Signal Processor,DSP),专用集成电路(Application-Specific Integrated Circuit,ASIC),现场可编程门阵列(Field Programmable Gate Array,FPGA)或者其他可编程逻辑器件、晶体管逻辑器件、硬件部件或者其任意组合。其可以实现或执行结合本申请公开内容所描述的各种示例性的逻辑方框,模块和电路。所述处理器也可以是实现计算功能的组合,例如包含一个或多个微处理器组合,DSP和微处理器的组合等等。
所述存储器940可用于存储软件程序以及模块,该主处理器930通过运行存储在存储器940的软件程序以及模块,从而执行终端900的各种功能应用以及数据处理。存储器940可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序等,比如声音播放功能、图像播放功能等;存储数据区可存储根据终端900的使用所创建的数据(比如音频数据、图像数据、电话本等)等。此外,存储器940可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。
所述收发器950用于支持终端900和其他设备交互。
总线960可以是外设部件互连标准(Peripheral Component Interconnect,PCI)总线或扩展工业标准结构(Extended Industry Standard Architecture,EISA)总线等。所述总线可以分为地址总线、数据总线、控制总线等。为便于表示,图8中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。
其中,所述NFC芯片910,用于当所述第一终端的主处理器下电时,接收第二终端发送的应用选择指令,所述应用选择指令用于指示通过所述第一SE中的应用或者所述HCE应用处理NFC业务。该NFC芯片910,还用于向所述PMU发送上电触发信号。所述PMU920,用于根据所述NFC芯片910发送的所述上电触发信号上电唤醒所述主处理器930。所述NFC芯片910,还用于将所述应用选择指令路由到所述主处理器930。所述主处理器930,用于处理所述NFC业务。
可选的,当所述第一终端还包括第二SE时,所述NFC芯片910,还用于确定所述应用选择指令中携带的应用标识AID是否属于预设AID集合中的AID。当所述AID属于所述预设AID集合中的AID时,所述NFC芯片910向所述PMU920发送上电触发信号。其中,所述第二SE和所述主处理器独立设置。所述预设AID集合包括安装于所述主处理器的SE中的应用或者所述HCE应用的AID。
所述PMU920,用于根据所述NFC芯片910发送的所述上电触发信号上电唤醒所述主处理器930。所述NFC芯片910,还用于根据所述应用选择指 令中携带的AID,将所述应用选择指令路由到所述主处理器930中的SE或HCE应用以进行NFC业务处理。
可选的,所述主处理器930还用于将目标应用的应用标识AID添加到预设AID集合中;该目标应用包括安装于所述主处理器的SE中的应用或者所述HCE应用。所述主处理器930,还用于向所述NFC芯片910配置所述预设AID。
可选的,所述NFC芯片910,还用于向所述第二终端发送延时指令,所述延时指令中携带待延长时长,所述延时指令用于指示所述第二终端增加通信建立等待时长且增加的所述等待时长为所述待延长时长。
可选的,所述PMU920,还用于确定当前电池电量;当所述当前电池电量大于阈值时,按照第一时钟顺序上电唤醒所述主处理器;当所述当前电池电量小于所述阈值时,按照第二时钟顺序上电唤醒所述主处理器。其中,所述第一时钟顺序为开机上电顺序,所述第二时钟顺序用于仅唤醒用于NFC业务处理的模块。
可选的,所述主处理器930,还用于当处理完成所述NFC业务时,提示用户已完成所述NFC业务。
可选的,所述NFC芯片910,还用于向所述主处理器930发送通知消息,该通知消息用于通知所述主处理器已处理完成NFC业务。则所述主处理器930,还用于根据所述NFC芯片910发送的所述通知消息确定当前电池电量,当所述当前电池电量大于所述阈值时,提示用户是否关机;当所述当前电池电量小于所述阈值时,向所述PMU920发送下电触发信号。所述PMU920,还用于根据所述主处理器930发送的所述下电触发信号将所述终端下电关机。
上述第一终端,当第一终端的NFC芯片接收到第二终端发送的用于指示第一终端通过所述第一SE中的应用或者所述HCE应用处理NFC业务的应用选择指令时,所述NFC芯片向PMU发送上电触发信号,PMU根据该上电触发信号触发主处理器上电。这样在主处理器上电后,主处理器中的SE或运行在主处理器中的HCE应用能够处理该NFC业务。因此,通过上述方法,即使SE集成在主处理器中或HCE应用安装在主处理器中,终端能够在关机状态时上电唤醒主处理器,使得集成在主处理器中的SE或运行在主处理器中的HCE应用能够正常工作,进而完成NFC业务处理。
本申请实施例还提供一种NFC芯片,其中,所述近场通信NFC芯片位于第一终端,所述第一终端还包括主处理器和电源管理单元PMU,所述主处理器集成有第一安全模块SE和/或运行有基于主机的卡模拟HCE应用。所述NFC芯片,用于接收第二终端发送的应用选择指令,所述应用选择指令用于指示通过所述第一SE中的应用或者所述HCE应用处理NFC业务。所述NFC芯片,还用于确定所述主处理器是否下电;当所述主处理器下电时,向所述PMU发送上电触发信号以使得所述PMU根据所述上电触发信号上电唤醒所述主处理器。所述NFC芯片,还用于将所述应用选择指令路由到所述主处理器以便于所述主处理器处理所述NFC业务。
其中,主处理器下电时,会向NFC芯片发送通知信号;或者NFC芯片可本地保存系统的配置文件,该配置文件中记载了主处理器的状态,包括上电状态或下电状态。则NFC芯片根据主处理器发送的下电信号或读取配置文件确定主处理器是否下电。
可选的,所述NFC芯片,还用于当所述第一终端还包括第二SE时,确定所述应用选择指令中携带的应用标识AID是否属于预设AID。当所述AID属于所述预设AID时,向所述PMU发送上电触发信号。其中,所述第二SE和所述主处理器独立设置。
可选的,所述NFC芯片,还用于向所述第二终端发送延时指令,该延时指令中携带待延长时长,所述延时指令用于指示所述第二终端增加通信等待时长且增加的所述等待时长为所述待延长时长。
上述NFC芯片,当接收到第二终端发送的用于指示第一终端通过所述第一SE中的应用或者所述HCE应用处理NFC业务的应用选择指令时,所述NFC芯片向PMU发送上电触发信号,以使得PMU根据该上电触发信号触发主处理器上电。这样在主处理器上电后,主处理器中的SE或运行在主处理器中的HCE应用能够处理该NFC业务。因此,通过上述方法,即使SE集成在主处理器中或HCE应用安装在主处理器中,NFC芯片能够在关机状态时上电唤醒主处理器,使得集成在主处理器中的SE或运行在主处理器中的HCE应用能够正常工作,进而完成NFC业务处理。
本领域技术人员应该很容易意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,本申请能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
结合本申请公开内容所描述的方法或者算法的步骤可以硬件的方式来实现,也可以是由处理器执行软件指令的方式来实现。软件指令可以由相应的软件模块组成,软件模块可以被存放于随机存取存储器(Random Access Memory,RAM)、闪存、只读存储器(Read Only Memory,ROM)、可擦除可编程只读存储器(Erasable Programmable ROM,EPROM)、电可擦可编程只读存储器(Electrically EPROM,EEPROM)、寄存器、硬盘、移动硬盘、只读光盘(CD-ROM)或者本领域熟知的任何其它形式的存储介质中。一种示例性的存储介质耦合至处理器,从而使处理器能够从该存储介质读取信息,且可向该存储介质写入信息。当然,存储介质也可以是处理器的组成部分。处理器和存储介质可以位于ASIC中。
本领域技术人员应该可以意识到,在上述一个或多个示例中,本申请所描述的功能可以用硬件、软件、固件或它们的任意组合来实现。当使用软件实现时,可以将这些功能存储在计算机可读介质中或者作为计算机可读介质上的一个或多个指令或代码进行传输。计算机可读介质包括计算机存储介质 和通信介质,其中通信介质包括便于从一个地方向另一个地方传送计算机程序的任何介质。存储介质可以是通用或专用计算机能够存取的任何可用介质。
以上所述的具体实施方式,对本申请的目的、技术方案和有益效果进行了进一步详细说明,所应理解的是,以上所述仅为本申请的具体实施方式而已,并不用于限定本申请的保护范围,凡在本申请的技术方案的基础之上,所做的任何修改、等同替换、改进等,均应包括在本申请的保护范围之内。

Claims (23)

  1. 一种NFC业务处理方法,其特征在于,所述方法应用于第一终端,所述第一终端包括主处理器和近场通信NFC芯片,所述主处理器集成有第一安全模块SE和/或运行有基于主机的卡模拟HCE应用;
    所述方法包括:
    当所述第一终端的主处理器下电时,所述第一终端接收第二终端发送的应用选择指令,所述应用选择指令用于指示通过所述第一SE中的应用或者所述HCE应用处理NFC业务;
    所述第一终端控制所述主处理器上电;
    所述第一终端将所述应用选择指令路由至所述主处理器以通过所述主处理器处理所述NFC业务。
  2. 根据权利要求1所述的方法,其特征在于,所述第一终端还包括第二SE,所述第二SE和所述主处理器独立设置;
    在所述第一终端控制所述主处理器上电之前,所述方法还包括:
    所述第一终端确定所述应用选择指令中携带的应用标识AID是否属于预设AID集合中的AID,所述预设AID集合包括安装于所述第一SE中的应用和/或所述HCE应用的AID;
    如果所述AID属于所述预设AID集合中的AID,则所述第一终端控制所述主处理器上电。
  3. 根据权利要求1或2所述的方法,其特征在于,在所述第一终端控制所述主处理器上电之前,所述方法还包括:
    所述第一终端向所述第二终端发送延时指令,所述延时指令中携带待延长时长,所述延时指令用于指示所述第二终端增加通信等待时长且增加的所述等待时长为所述待延长时长。
  4. 根据权利要求1至3任一项所述的方法,其特征在于,所述第一终端控制所述主处理器上电包括:
    所述第一终端确定当前电池电量;
    如果所述当前电池电量大于阈值,则所述第一终端按照第一时钟顺序上电唤醒所述主处理器;
    如果所述当前电池电量小于所述阈值,则所述第一终端按照第二时钟顺序上电唤醒所述主处理器;
    所述第一时钟顺序为开机上电顺序,所述第二时钟顺序用于仅唤醒用于处理NFC业务的模块。
  5. 根据权利要求1至4任一项所述的方法,其特征在于,在所述第一终端将所述应用选择指令路由至所述主处理器之后,所述方法还包括:
    当所述第一终端处理完成所述NFC业务时,所述第一终端提示用户已完成所述NFC业务。
  6. 根据权利要求1至5任一项所述的方法,其特征在于,在所述第一终端将所述应用选择指令路由至所述主处理器之后,所述方法还包括:
    当所述第一终端处理完成所述NFC业务时,所述第一终端确定当前电池电量;
    如果所述当前电池电量大于阈值,则所述第一终端提示用户是否关机;
    如果所述当前电池电量小于所述阈值,所述第一终端控制所述主处理器下电。
  7. 一种NFC业务处理方法,其特征在于,所述方法应用于第一终端,所述第一终端包括主处理器、近场通信NFC芯片和电源管理单元PMU,所述主处理器集成有第一安全模块SE和/或运行有基于主机的卡模拟HCE应用;
    所述方法包括:
    当所述主处理器下电时,所述NFC芯片接收第二终端发送的应用选择指令,所述应用选择指令用于指示通过所述第一SE中的应用或者所述HCE应用处理NFC业务;
    所述NFC芯片向所述PMU发送上电触发信号;
    所述PMU根据所述上电触发信号控制所述主处理器上电;
    所述NFC芯片将所述应用选择指令路由至所述主处理器;
    所述主处理器处理所述NFC业务。
  8. 根据权利要求7所述的方法,其特征在于,所述第一终端还包括第二SE,所述第二SE和所述主处理器独立设置;
    在所述NFC芯片向所述PMU发送上电触发信号之前,所述方法还包括:
    所述NFC芯片确定所述应用选择指令中携带的应用标识AID是否属于预设AID集合中的AID,所述预设AID集合包括安装于所述第一SE中的应用和/或所述HCE应用的AID;
    如果所述AID属于所述预设AID集合中的AID,则所述NFC芯片向所述PMU发送上电触发信号。
  9. 根据权利要求7或8所述的方法,其特征在于,在所述NFC芯片向所述PMU发送上电触发信号之前,所述方法还包括:
    所述NFC芯片向所述第二终端发送延时指令,所述延时指令中携带待延长时长,所述延时指令用于指示所述第二终端增加通信等待时长且增加的所述等待时长为所述待延长时长。
  10. 根据权利要求7至9任一项所述的方法,其特征在于,所述PMU根据所述上电触发信号控制所述主处理器上电包括:
    所述PMU确定当前电池电量;
    如果所述当前电池电量大于阈值,则所述PMU按照第一时钟顺序上电唤醒所述主处理器;
    如果所述当前电池电量小于所述阈值,则所述PMU按照第二时钟顺序上电唤醒所述主处理器;
    所述第一时钟顺序为开机上电顺序,所述第二时钟顺序用于仅唤醒用于处理NFC业务的模块。
  11. 根据权利要求7至10任一项所述的方法,其特征在于,在所述主处理 器处理所述NFC业务之后,所述方法还包括:
    当所述主处理器处理完成所述NFC业务时,提示用户已完成所述NFC业务。
  12. 根据权利要求7至11任一项所述的方法,其特征在于,在所述主处理器处理所述NFC业务之后,所述方法还包括:
    当所述主处理器处理完成所述NFC业务时,所述主处理器确定当前电池电量;
    如果所述当前电池电量大于阈值,则所述主处理器提示用户是否关机;
    如果所述当前电池电量小于所述阈值,则所述PMU控制所述主处理器下电。
  13. 一种终端,其特征在于,所述终端作为第一终端包括近场通信NFC芯片、电源管理单元PMU和主处理器,所述主处理器设置有第一安全模块SE或运行有基于主机的卡模拟HCE应用,其中:
    所述NFC芯片,用于当所述主处理器下电时,接收第二终端发送的应用选择指令,所述应用选择指令用于指示通过所述第一SE中的应用或者所述HCE应用处理NFC业务;
    所述NFC芯片,还用于向所述PMU发送上电触发信号;
    所述PMU,用于根据所述NFC芯片发送的所述上电触发信号上电唤醒所述主处理器;
    所述NFC芯片,还用于将所述应用选择指令路由到所述主处理器;
    所述主处理器,用于处理所述NFC业务。
  14. 根据权利要求13所述的终端,其特征在于,所述第一终端还包括第二SE,所述第二SE和所述主处理器独立设置;
    所述NFC芯片,还用于确定所述应用选择指令中携带的应用标识AID是否属于预设AID集合中的AID;当所述AID属于所述预设AID集合中的AID时,所述NFC芯片向所述PMU发送上电触发信号;所述预设AID集合包括所述安装于所述第一SE中的应用和/或所述HCE应用的AID。
  15. 根据权利要求13或14所述的终端,其特征在于,
    所述NFC芯片,还用于向所述第二终端发送延时指令,所述延时指令中携带待延长时长,所述延时指令用于指示所述第二终端增加通信等待时长且增加的所述等待时长为所述待延长时长。
  16. 根据权利要求13至15任一项所述的终端,其特征在于,
    所述PMU,还用于确定当前电池电量;当所述当前电池电量大于阈值时,所述PMU按照第一时钟顺序上电唤醒所述主处理器;当所述当前电池电量小于所述阈值,则所述PMU按照第二时钟顺序上电唤醒所述主处理器;
    所述第一时钟顺序为开机上电顺序,所述第二时钟顺序用于仅唤醒用于处理NFC业务的模块。
  17. 根据权利要求13至16任一项所述的终端,其特征在于,
    所述主处理器,还用于当处理完成所述NFC业务时,提示用户已完成所述 NFC业务。
  18. 根据权利要求13至17任一项所述的终端,其特征在于,
    所述主处理器,还用于在处理完成所述NFC业务时,确定当前电池电量;当所述当前电池电量大于阈值时,提示用户是否关机;当所述当前电池电量小于所述阈值时,控制所述主处理器下电。
  19. 一种NFC芯片,其特征在于,所述近场通信NFC芯片位于第一终端,所述第一终端还包括主处理器和电源管理单元PMU,所述主处理器集成有第一安全模块SE和/或运行有基于主机的卡模拟HCE应用;
    所述NFC芯片,用于接收第二终端发送的应用选择指令,所述应用选择指令用于指示通过所述第一SE中的应用或者所述HCE应用处理NFC业务;
    所述NFC芯片,还用于确定所述主处理器是否下电;当所述主处理器下电时,向所述PMU发送上电触发信号以使得所述PMU根据所述上电触发信号上电唤醒所述主处理器;
    所述NFC芯片,还用于将所述应用选择指令路由到所述主处理器以便于所述主处理器处理所述NFC业务。
  20. 根据权利要求19所述的NFC芯片,其特征在于,
    所述NFC芯片,还用于当所述第一终端还包括第二SE时,确定所述应用选择指令中携带的应用标识AID是否属于预设AID;当所述AID属于所述预设AID时,向所述PMU发送上电触发信号;
    其中,所述第二SE和所述主处理器独立设置。
  21. 根据权利要求19或20所述的NFC芯片,其特征在于,
    所述NFC芯片,还用于向所述第二终端发送延时指令,所述延时指令中携带待延长时长,所述延时指令用于指示所述第二终端增加通信等待时长且增加的所述等待时长为所述待延长时长。
  22. 一种计算机可读存储介质,所述计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机执行上述权利要求1至6任一项所述的方法。
  23. 一种计算机程序产品,所述计算机程序产品包含指令,当其在计算机上运行时,使得计算机执行权利要求1至6任一项所述的方法。
PCT/CN2017/087006 2017-06-02 2017-06-02 一种nfc业务处理方法、终端及nfc芯片 WO2018218662A1 (zh)

Priority Applications (4)

Application Number Priority Date Filing Date Title
PCT/CN2017/087006 WO2018218662A1 (zh) 2017-06-02 2017-06-02 一种nfc业务处理方法、终端及nfc芯片
US16/618,515 US11200561B2 (en) 2017-06-02 2017-06-02 NFC service processing method, terminal, and NFC chip
CN201780045286.7A CN109478904B (zh) 2017-06-02 2017-06-02 一种nfc业务处理方法、终端及存储介质
CN202011232324.XA CN112492562B (zh) 2017-06-02 2017-06-02 一种nfc业务处理方法、终端及nfc芯片

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2017/087006 WO2018218662A1 (zh) 2017-06-02 2017-06-02 一种nfc业务处理方法、终端及nfc芯片

Publications (1)

Publication Number Publication Date
WO2018218662A1 true WO2018218662A1 (zh) 2018-12-06

Family

ID=64454273

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/087006 WO2018218662A1 (zh) 2017-06-02 2017-06-02 一种nfc业务处理方法、终端及nfc芯片

Country Status (3)

Country Link
US (1) US11200561B2 (zh)
CN (2) CN112492562B (zh)
WO (1) WO2018218662A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112788604A (zh) * 2019-11-01 2021-05-11 中国移动通信有限公司研究院 一种近场通信路由配置方法、装置和计算机可读存储介质

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108415512B (zh) * 2018-03-06 2020-05-19 三星半导体(中国)研究开发有限公司 具有近场通信功能的可穿戴设备以及近场通信控制系统
US11443323B2 (en) * 2018-03-07 2022-09-13 Samsung Electronics Co., Ltd. System and method for secure transactions with a trusted execution environment (TEE)
CN112863151B (zh) * 2021-01-28 2023-06-16 大陆汽车电子(长春)有限公司 防止智能钥匙被车载的无线充电器损伤的方法和系统
EP4060588A1 (en) * 2021-02-05 2022-09-21 Shenzhen Goodix Technology Co., Ltd. Virtual electronic card management method and system, security chip, terminal, and storage medium
CN113869074A (zh) * 2021-09-09 2021-12-31 维沃移动通信(杭州)有限公司 基于业务码的业务处理方法、装置和电子设备
EP4354330A1 (en) * 2022-03-09 2024-04-17 Huawei Technologies Co., Ltd. Transaction method for secure service and terminal
CN114819953A (zh) * 2022-03-15 2022-07-29 中国人民银行数字货币研究所 一种数字货币交易方法和装置
CN115016624A (zh) * 2022-05-27 2022-09-06 维沃移动通信有限公司 电子设备和电子设备套装
CN115016625A (zh) * 2022-05-31 2022-09-06 维沃移动通信有限公司 电子设备控制方法、电子设备及电子设备套装
CN117376880A (zh) * 2022-06-30 2024-01-09 华为技术有限公司 安全业务的切换方法及终端
CN115412382B (zh) * 2022-11-02 2023-01-06 北京紫光青藤微系统有限公司 一种针对eSE芯片的电源管理方法及装置

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101841604A (zh) * 2010-06-02 2010-09-22 中兴通讯股份有限公司 一种在移动终端上自动显示近场通信交易信息的方法及装置
WO2016081013A1 (en) * 2014-11-21 2016-05-26 Empire Technology Development Llc Adaptable coil-nfc antenna for powered and unpowered applications
WO2016183736A1 (zh) * 2015-05-15 2016-11-24 华为技术有限公司 一种具备近距离无线通信功能的移动设备

Family Cites Families (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7032119B2 (en) * 2000-09-27 2006-04-18 Amphus, Inc. Dynamic power and workload management for multi-server system
CN101770435B (zh) * 2009-01-05 2012-07-04 联想(北京)有限公司 一种数据处理设备和数据处理方法
CN101916950B (zh) 2010-04-06 2013-06-12 上海复旦微电子集团股份有限公司 安全芯片集线器
US8934387B2 (en) * 2010-05-07 2015-01-13 Qualcomm Incorporated Detecting a WLAN signal using a bluetooth receiver during bluetooth scan activity
US8977195B2 (en) * 2011-01-06 2015-03-10 Texas Insruments Incorporated Multiple NFC card applications in multiple execution environments
CN102075598B (zh) 2011-01-11 2015-06-10 中兴通讯股份有限公司 移动支付终端
US20180130548A1 (en) * 2011-02-14 2018-05-10 Blaze Mobile Using an NFC Enabled Mobile Device To Manage Digital Medical Artifacts
CN102209129B (zh) 2011-05-30 2014-04-02 惠州Tcl移动通信有限公司 一种手机
CN102968864B (zh) 2012-10-31 2015-05-20 中兴通讯股份有限公司 一种基于nfc的开机控制方法、装置及终端
JP6188497B2 (ja) 2013-09-03 2017-08-30 キヤノン株式会社 通信装置、通信装置の制御方法、及びコンピュータプログラム
CN104463255B (zh) * 2013-09-12 2018-03-23 中国银联股份有限公司 用于与nfc芯片自动连接并切换安全载体的切换装置及方法
CN203643943U (zh) 2013-12-31 2014-06-11 青岛歌尔声学科技有限公司 一种多功能开机电路及蓝牙产品
US20160267486A1 (en) * 2015-03-13 2016-09-15 Radiius Corp Smartcard Payment System and Method
CN107534462A (zh) * 2015-04-22 2018-01-02 森特Id公司 使用nfc前端对电子器件进行充电
CN105550870B (zh) 2015-11-27 2020-02-21 东莞酷派软件技术有限公司 一种路由策略处理的方法、装置以及终端
CN105472546B (zh) * 2015-12-31 2019-05-24 华为技术有限公司 近场通信方法及移动终端

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101841604A (zh) * 2010-06-02 2010-09-22 中兴通讯股份有限公司 一种在移动终端上自动显示近场通信交易信息的方法及装置
WO2016081013A1 (en) * 2014-11-21 2016-05-26 Empire Technology Development Llc Adaptable coil-nfc antenna for powered and unpowered applications
WO2016183736A1 (zh) * 2015-05-15 2016-11-24 华为技术有限公司 一种具备近距离无线通信功能的移动设备

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112788604A (zh) * 2019-11-01 2021-05-11 中国移动通信有限公司研究院 一种近场通信路由配置方法、装置和计算机可读存储介质
CN112788604B (zh) * 2019-11-01 2023-03-28 中国移动通信有限公司研究院 一种近场通信路由配置方法、装置和计算机可读存储介质

Also Published As

Publication number Publication date
CN109478904A (zh) 2019-03-15
CN112492562B (zh) 2022-09-23
CN112492562A (zh) 2021-03-12
CN109478904B (zh) 2020-12-15
US20200126064A1 (en) 2020-04-23
US11200561B2 (en) 2021-12-14

Similar Documents

Publication Publication Date Title
WO2018218662A1 (zh) 一种nfc业务处理方法、终端及nfc芯片
EP3633571B1 (en) Nfc payment method and terminal
EP3709612B1 (en) Method for selecting emulated card, and mobile device
US8639291B1 (en) Mobile phone operation during low battery condition
EP3749001B1 (en) Electronic device and method for switching electronic device between dual standby mode and single standby mode
CN104601207A (zh) 一种数据传输方法、用户终端及系统
EP4209961A1 (en) Emulation card switching method, electronic device, and communication system
WO2019134591A1 (zh) 一种电子交易的方法及终端
US20190200203A1 (en) Data Sharing Method and Terminal
CN106534093B (zh) 一种终端数据的处理方法、装置及系统
JP2012518821A (ja) 無線モジュール内蔵コンピュータとその待機および復帰方法
WO2021223672A1 (zh) 近场通信nfc通信方法、装置及电子设备
CN104936128A (zh) 一种离线数据转移方法、装置及系统
WO2011103734A1 (zh) 终端设备的近场通信实现方法及实现近场通信的终端设备
US9768835B2 (en) Method and electronic equipment for near field communication
WO2018223402A1 (zh) 功能控制方法及终端
US10476889B2 (en) Information interaction method, apparatus and system
CN107480996A (zh) 一种支付方法及终端
US20190340601A1 (en) Method And Mobile Device For Transmitting Data By Using Barcode
CN106507357A (zh) 一种接入控制方法,及终端设备
EP4145875A1 (en) Smart card sharing method, electronic device, and computer-readable storage medium
CN110874130B (zh) 通知信息的处理方法和电子设备
WO2022057475A1 (zh) 近场通信的控制方法、电子设备及存储介质
JP2009277106A (ja) 非接触icカード、非接触icカードの制御方法及び制御プログラム、携帯情報端末
CN109815749B (zh) 控制se的系统、方法及芯片

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17912214

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17912214

Country of ref document: EP

Kind code of ref document: A1