WO2023185731A1 - Nfc-based card swiping method, medium, and electronic device - Google Patents

Nfc-based card swiping method, medium, and electronic device Download PDF

Info

Publication number
WO2023185731A1
WO2023185731A1 PCT/CN2023/084062 CN2023084062W WO2023185731A1 WO 2023185731 A1 WO2023185731 A1 WO 2023185731A1 CN 2023084062 W CN2023084062 W CN 2023084062W WO 2023185731 A1 WO2023185731 A1 WO 2023185731A1
Authority
WO
WIPO (PCT)
Prior art keywords
card
electronic device
simulation
cards
mobile phone
Prior art date
Application number
PCT/CN2023/084062
Other languages
French (fr)
Chinese (zh)
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 华为技术有限公司
Publication of WO2023185731A1 publication Critical patent/WO2023185731A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K7/00Methods or arrangements for sensing record carriers, e.g. for reading patterns
    • G06K7/10Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
    • G06K7/10009Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation sensing by radiation using wavelengths larger than 0.1 mm, e.g. radio-waves or microwaves
    • G06K7/10297Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation sensing by radiation using wavelengths larger than 0.1 mm, e.g. radio-waves or microwaves arrangements for handling protocols designed for non-contact record carriers such as RFIDs NFCs, e.g. ISO/IEC 14443 and 18092
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K7/00Methods or arrangements for sensing record carriers, e.g. for reading patterns
    • G06K7/10Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K7/00Methods or arrangements for sensing record carriers, e.g. for reading patterns
    • G06K7/10Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
    • G06K7/10009Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation sensing by radiation using wavelengths larger than 0.1 mm, e.g. radio-waves or microwaves
    • G06K7/10366Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation sensing by radiation using wavelengths larger than 0.1 mm, e.g. radio-waves or microwaves the interrogation device being adapted for miscellaneous applications
    • G06K7/10376Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation sensing by radiation using wavelengths larger than 0.1 mm, e.g. radio-waves or microwaves the interrogation device being adapted for miscellaneous applications the interrogation device being adapted for being moveable
    • G06K7/10386Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation sensing by radiation using wavelengths larger than 0.1 mm, e.g. radio-waves or microwaves the interrogation device being adapted for miscellaneous applications the interrogation device being adapted for being moveable the interrogation device being of the portable or hand-handheld type, e.g. incorporated in ubiquitous hand-held devices such as PDA or mobile phone, or in the form of a portable dedicated RFID reader

Definitions

  • This application relates to the field of near field communication technology, and in particular to an NFC-based card swiping method, readable media and electronic equipment.
  • NFC Near field communication
  • P2P mode point-to-point mode
  • reader/writer mode is an integrated circuit (IC) card that uses radio frequency identification (RFID) technology to simulate physical cards, such as bus cards, access control cards, membership cards, bank cards, etc., and replaces physical cards with Card reading devices, such as card readers, provide card information for physical cards.
  • RFID radio frequency identification
  • electronic devices usually store physical card information in the embedded secure element (eSE) of the electronic device.
  • eSE embedded secure element
  • the electronic device When the electronic device simulates the physical card through the card emulation mode of NFC, the electronic device first obtains it from the card reading device.
  • the business identifier of the current scenario such as application identifier (AID).
  • AID application identifier
  • the electronic device obtains the card information of the simulated card corresponding to the AID from the eSE based on the obtained AID, and then writes the card information of the simulated card into the NFC controller, thereby transmitting the card information of the simulated card to the card reading device, completing Swipe your card.
  • some physical cards, such as access control cards do not have a unified business identifier.
  • the electronic device does not store the AID corresponding to this type of card, and the card reading device of this type of card does not provide AID to the electronic device, resulting in When there are multiple cards without AID in the electronic device, the user is required to manually select the simulated card, which affects the user experience.
  • embodiments of the present application provide an NFC-based card swiping method, a readable medium, and an electronic device.
  • the card information of multiple first-class simulation cards is stored in the electronic device, selecting the first-class simulation cards one by one to swipe the card will help improve the user experience.
  • embodiments of the present application provide a card swiping method based on NFC.
  • the method includes: the electronic device enters a card simulation mode, in which the card information of multiple first-type simulated cards is stored on the electronic device; when the electronic device When the service identification is not received, the electronic device selects the first type simulation cards one by one from multiple first type simulation cards for simulation.
  • the electronic device when the electronic device stores multiple first-type simulation cards (such as the simulation cards without AID below, such as access control cards, membership cards, etc.), the electronic device can automatically use the first-type simulation cards one by one.
  • One type of model card can be simulated and tried to swipe without requiring the user to manually switch, which improves the user experience.
  • the above electronic device selects the first type simulation cards one by one from multiple first type simulation cards for simulation, including: the electronic device selects the first type simulation cards one by one from the multiple first type simulation cards.
  • the first type of simulation card performs card simulation until the preset termination conditions are met.
  • the electronic device can cycle through each first-type simulation card for simulation until the preset termination conditions are met. This can avoid the situation where the card reader fails to swipe the card due to the card reader not reading the card information of the correct simulated card when the electronic device simulates the correct first-type simulated card, and the functionality rate of the user using the electronic device to swipe the card can be improved.
  • the above preset termination condition includes any one of the following conditions:
  • the electronic device performs card emulation for longer than the preset time
  • the NFC function of the electronic device is turned off
  • the electronic device detects that the card has been successfully swiped
  • the electronic device does not detect near field communication signals for more than the preset time
  • the electronic device detects the user's cancellation operation or instruction.
  • the electronic device includes a memory; and card information of the first type of analog card is stored in the memory.
  • the electronic device stores the card information of the first type of simulation card in the memory instead of the security unit or the embedded security unit, so that no security unit or embedded security unit is needed in the process of switching the first type of simulation card.
  • the participation of the security unit can increase the speed of electronic devices switching among the above-mentioned first-class simulation cards, thereby increasing the speed of users using electronic devices to swipe cards and improving user experience.
  • the card information of the first type of simulation card since the card information of the first type of simulation card is stored in the memory, it can be stored in large quantities, and the security unit or embedded security unit can be used to store the card information of other simulation cards with higher security requirements, which can improve the support of electronic equipment.
  • the number of emulated cards Since no more security units or embedded security units are needed to store the card information of the first type of analog card, the manufacturing cost of the electronic device can be saved.
  • the card information of the above first type simulation card is stored in the memory by the electronic device when opening each first type simulation card without obtaining the business identifier. middle.
  • the card information of the first type of simulation card is directly stored in the memory instead of the security unit or the embedded security unit, so that the electronic device There is no need to obtain the relevant procedures for opening the first type of simulation card from the network, and there is no need for the participation of a security unit or an embedded security unit, which can improve the speed of the electronic device for opening the first type of simulation card.
  • the above electronic device further includes an NFC controller; and, the electronic device selects the first type simulation cards one by one from a plurality of first type simulation cards for simulation, including: the electronic device selects the first type simulation card from the memory The card information of each first-type simulation card is obtained one by one, and the obtained card information is written to the NFC controller for card simulation.
  • the electronic device includes a security unit SE or an embedded security unit eSE; and the card information of the first type of simulated card is stored in the security unit SE or the embedded security unit eSE.
  • a trusted application is run in the trusted execution environment of the electronic device, and the electronic device further includes an NFC controller; and, the electronic device selects one by one from multiple first-type simulation cards.
  • the simulation of the first type of simulation card includes: the electronic device uses the trusted application, security unit SE or embedded security unit eSE to write the card information of the first type of simulation card into the NFC controller one by one to perform card simulation.
  • the card information includes a unique identifier UID; the service identifier includes an application identifier AID.
  • the above electronic device enters the card emulation mode when detecting a user's preset operation on the electronic device and/or detecting a near field communication signal.
  • embodiments of the present application provide an electronic device in which card information of multiple first-type analog cards is stored.
  • the electronic device includes: a memory storing instructions; and a processor for instructing Execute the command to make the electronic device enter the card mode. After entering the simulation mode, when the electronic device does not receive the service identification, it selects the first type simulation cards one by one from multiple first type simulation cards for simulation.
  • the above-mentioned selection of the first type simulation cards from multiple first type simulation cards one by one for simulation includes: the electronic device selects the first type first simulation cards one by one from the multiple first type simulation cards.
  • Class simulation card performs card simulation until the preset termination conditions are met.
  • the above preset termination condition includes any one of the following conditions:
  • the electronic device performs card emulation for longer than the preset time
  • the NFC function of the electronic device is turned off
  • the electronic device detects that the card has been successfully swiped
  • the electronic device does not detect near field communication signals for more than the preset time
  • the electronic device detects the user's cancellation operation or instruction.
  • the card information of the above first type of simulation card is stored in the memory.
  • the card information of the above first type of simulation card is stored in the memory by the electronic device when opening each first type of simulation card without obtaining the business identifier. middle.
  • the electronic device further includes an NFC controller; and the first-type simulation cards are selected one by one from multiple first-type simulation cards for simulation, including:
  • the electronic device obtains the card information of each first-type simulation card one by one from the memory, and writes the obtained card information into the NFC controller for card simulation.
  • the electronic device further includes a security unit SE or an embedded security unit eSE; and the card information of the first type of simulated card is stored in the security unit SE or the embedded security unit eSE.
  • a trusted application is run in the trusted execution environment of the electronic device, and the electronic device further includes an NFC controller; and the first one is selected one by one from multiple first-type simulation cards.
  • Simulation of a class of simulation cards includes: the electronic device uses a trusted application, security unit SE or embedded security unit eSE to write the card information of the first type of simulation card into the NFC controller one by one for card simulation.
  • the card information includes a unique identifier UID; the service identifier includes an application identifier AID.
  • the electronic device when the above instructions are executed by the processor, the electronic device also causes the electronic device to control the The electronic device enters card emulation mode.
  • embodiments of the present application provide a readable medium that stores instructions.
  • the electronic device When the instructions are executed on an electronic device, the electronic device enables the electronic device to implement the first aspect and various possibilities of the first aspect. Implement any of the provided methods.
  • Figure 1 shows a schematic structural diagram of an access control system 00 according to some embodiments of the present application
  • Figure 2 shows a schematic diagram of a card swiping interface displayed by a mobile phone 10 according to some embodiments of the present application
  • Figure 3 shows a technical architecture diagram of an NFC-based card swiping method according to some embodiments of the present application
  • Figure 4 shows a schematic flow chart of an NFC-based card swiping method according to some embodiments of the present application
  • Figure 5A shows a schematic diagram of the main interface of the wallet application 11A displayed on the mobile phone 10 when the user sets the default card of the mobile phone 10 through the wallet application 11A according to some embodiments of the present application;
  • Figure 5B shows a schematic diagram of the setting interface of the wallet application 11A displayed on the mobile phone 10 when the user sets the default card of the mobile phone 10 through the wallet application 11A according to some embodiments of the present application;
  • Figure 5C shows a schematic diagram of the card swiping setting interface of the wallet application 11A displayed on the mobile phone 10 when the user sets the default card of the mobile phone 10 through the wallet application 11A according to some embodiments of the present application;
  • Figure 5D shows a schematic diagram of the default card setting interface of the wallet application 11A displayed on the mobile phone 10 when the user sets the default card of the mobile phone 10 through the wallet application 11A according to some embodiments of the present application;
  • Figure 6 shows a schematic diagram of a card swiping failure interface displayed by the mobile phone 10 according to some embodiments of the present application
  • Figure 7 shows a schematic technical architecture diagram of another NFC-based card swiping method according to some embodiments of the present application.
  • Figure 8 shows a schematic flow chart of another NFC-based card swiping method according to some embodiments of the present application.
  • Figure 9 shows a schematic log diagram of the data transmitted by the mobile phone 10 during the process of automatically switching access control cards obtained by using the NFC air interface packet capture tool according to some embodiments of the present application;
  • Figure 10 shows a battery of the mobile phone 10 when the mobile phone 10 terminates activation/activation of the simulated card through the eSE 13, reads the card information of the simulated card from the memory 103 and writes it to the NFC controller 14, according to some embodiments of the present application. changes in current;
  • Figure 11 shows a schematic technical architecture diagram of yet another NFC-based card swiping method according to some embodiments of the present application.
  • Figure 12 shows a schematic flow chart of yet another NFC-based card swiping method according to some embodiments of the present application.
  • Figure 13 shows a schematic flow chart of a near field communication simulation card opening method according to some embodiments of the present application
  • Figure 14A shows a schematic diagram of the main interface of the wallet application 11A displayed on the mobile phone 10 when the mobile phone 10 enters the card opening mode according to some embodiments of the present application;
  • Figure 14B shows a schematic diagram of the card package interface of the wallet application 11A displayed on the mobile phone 10 when the mobile phone 10 enters the card opening mode according to some embodiments of the present application;
  • Figure 14C shows a schematic diagram of the card-adding interface of the wallet application 11A displayed on the mobile phone 10 when the mobile phone 10 enters the card opening mode according to some embodiments of the present application;
  • Figure 14D shows a schematic diagram of the key-adding interface of the wallet application 11A displayed on the mobile phone 10 when the mobile phone 10 enters the card opening mode according to some embodiments of the present application;
  • Figure 14E shows a schematic diagram of the simulated access card interface of the wallet application 11A displayed on the mobile phone 10 when the mobile phone 10 enters the card opening mode according to some embodiments of the present application;
  • Figure 15 shows a schematic flow chart of another near field communication simulation card opening method according to some embodiments of the present application.
  • Figure 16 shows a schematic flow chart of yet another near field communication simulation card opening method according to some embodiments of the present application.
  • Figure 17 shows a schematic structural diagram of a mobile phone 10 according to some embodiments of the present application.
  • Illustrative embodiments of the present application include, but are not limited to, NFC-based card swiping methods, readable media, and electronic devices.
  • the NFC-based card swiping method provided by the embodiment of the present application is applicable to any electronic device that can simulate a physical card through the NFC function, including but not limited to mobile phones, laptop computers, tablet computers, wearable devices, and headsets. display, mobile email device, portable game console, portable music player, reader device, etc., the embodiments of this application are not limited.
  • the following introduction takes the mobile phone 10 as an electronic device that can simulate a physical card through the NFC function.
  • the NFC-based card swiping method provided by the embodiment of the present application is suitable for any scenario where the NFC function of an electronic device is used to simulate a physical card, such as simulating access control cards, membership cards, etc.
  • the following uses an access control card as an example to introduce the technical solutions of the embodiments of the present application.
  • Figure 1 shows a schematic structural diagram of an access control system 00 according to some embodiments of the present application.
  • the access control system 00 includes an NFC reader 01, a door controller 02 and a door 03.
  • the NFC card reader 01 obtains the unique identifier (UID) of the simulated access card of the mobile phone 10 and sends the obtained UID to the door controller 02; the door After controller 02 receives the UID, it compares the UID with each UID in the pre-stored UID white list. If the received UID exists in the UID white list, it means that the UID has the access authority of door 03. Door controller 02 Open door 03; otherwise, it means that the UID does not have the permission to pass door 03, and keep door 03 closed.
  • UID unique identifier
  • the access control card does not have a unified AID
  • the mobile phone 10 can simulate the card through NFC when it does not receive the AID.
  • the mobile phone 10 cannot determine the simulation card corresponding to the current scene, and the user needs to manually select the simulation card to be simulated.
  • the interface shown in Figure 2 will be displayed. The user needs to perform operations on the mobile phone 10. For example, sliding up and down, clicking, etc., to select the simulated card simulated by mobile phone 10 will affect the user's card swiping experience.
  • the embodiment of the present application provides a card swiping method based on NFC.
  • the mobile phone 10 is close to the NFC card reader 01, if the AID sent by the NFC card reader 01 is not received, the AID stored in the mobile phone 10 will be swiped one by one.
  • the card information of the simulated card without AID is written into the NFC controller of the mobile phone 10 until the card is swiped successfully (for example, door 03 is opened) or the user cancels the card swipe.
  • the mobile phone 10 can automatically select the simulated card stored in the mobile phone 10 to complete the card swiping without the user having to manually select, which improves the user experience.
  • the card information of the simulated card includes but is not limited to the UID and Select Acknowledge (SAK) identification of the simulated card.
  • UID can be used to uniquely identify a simulation card.
  • SAK can be used to indicate the card type of the simulated card.
  • emulated cards with different SAKs can have different lengths and/or types of UIDs.
  • the NFC card reading device may determine the length or type of the received UID based on the received SAK.
  • the card information of the simulated card stored in the mobile phone 10 can be obtained by using the NFC management application in the mobile phone 10 to read the card information of the physical card.
  • the specific process will be described later in conjunction with the specific technical architecture. This will not be described in detail.
  • FIG. 3 shows a technical architecture diagram of an NFC-based card swiping method according to some embodiments of the present application.
  • the software environment of the mobile phone 10 includes a rich execution environment (Rich Execution Environment, REE) 11 and a trusted execution environment (Trusted Execution Environment, TEE) 12.
  • REE 11 can be used to run general-purpose operating systems, such as Android TM , IOS TM , Hongmeng TM , etc.
  • the general-purpose operating system can be used to run applications/services with low security requirements, such as wallet application 11A, NFC service 11B, etc. Or store data with lower security requirements.
  • TEE 12 can be used to run highly secure operating systems, such as Trusted Operating System (Trusted OS), Card Operating System (COS), etc.
  • the Trusted Operating System is used to run trusted applications ( Trusted Application (TA), such as the trusted application corresponding to the wallet application (hereinafter referred to as wallet application TA) 12A, applications or services related to payment/biometrics/security verification, etc., or used to store data with high security requirements, For example, keys, biometric information, card information of simulated cards, etc.
  • Trusted Application such as the trusted application corresponding to the wallet application (hereinafter referred to as wallet application TA) 12A
  • applications or services related to payment/biometrics/security verification, etc. or used to store data with high security requirements, For example, keys, biometric information, card information of simulated cards, etc.
  • the NFC-related hardware of the mobile phone 10 may include the eSE 13 and the NFC controller 14.
  • eSE 13 can be used to store card information of simulated cards (such as card A1, card A2, card B1, etc. shown in Figure 3), and according to the instructions of the trusted application in TEE 12, store the card information of simulated cards.
  • the information is written into the NFC controller 14 , or the card information of the physical card currently close to the NFC controller 14 is obtained from the NFC controller 14 , and stored in the eSE 13 .
  • the eSE 13 may also be other types of hardware used to store data with high security requirements, such as a security element (Secure Element, SE), etc., which is not limited here.
  • the eSE 13 can also be used to run a Java applet to write the card information of the simulated card to the NFC controller 14 according to the instructions of the trusted application in the TEE 12.
  • the eSE 13 can also be used to run a Java applet, which is used to read the card information of the physical card through the eSE 13 according to the trusted application in the TEE 12.
  • the NFC controller 14 may be configured to send a message to an application in the REE 11, such as the wallet application 11A and/or the NFC service 11B, when a near field communication signal is detected, such as a near field communication signal of the NFC card reader 01.
  • a triggering instruction that triggers the NFC-based card swiping method provided by the embodiment of the present application can also be used to send the card information to the eSE 13 when the card information is read.
  • the NFC controller 14 can also be used to send the card information to a card reading device through NFC technology after receiving the card information sent by the eSE 13, for example, to the NFC card reader 01 to realize card swiping.
  • the technical architecture diagram shown in Figure 3 is only an example.
  • the mobile phone 10 may include more or less execution environments/hardware, and the functions/hardware of part of the execution environments may also be split or combined.
  • Hardware is not limited in the embodiments of this application.
  • FIG. 4 shows a schematic flow chart of an NFC-based card swiping method according to some embodiments of the present application.
  • the execution subject of this process is the mobile phone 10.
  • the process includes the following steps.
  • the mobile phone 10 When the mobile phone 10 detects the card swiping triggering instruction, it triggers the NFC-based card swiping method provided by the embodiment of the present application. Specifically, in some embodiments, the mobile phone 10 can use an application/service in the mobile phone 10 to detect the card swipe triggering instruction, such as the aforementioned wallet application 11A, NFC service 11B, etc.
  • the mobile phone 10 when the mobile phone 10 is close to the NFC card reader 01 and the NFC controller 14 detects a near field communication signal, the mobile phone 10 can detect the card swipe triggering instruction. In other embodiments, the mobile phone 10 can detect the user's operation for swiping the card on the mobile phone 10, for example, detecting that the user presses the power button of the mobile phone 10 twice in succession when the screen of the mobile phone 10 is turned off. A card swipe trigger command is detected.
  • the card swipe triggering instruction can also be other instructions, such as voice instructions, instructions triggered according to the location of the mobile phone 10 , etc.
  • the embodiments of the present application do not limit the form in which the card swiping triggering instruction is detected by the mobile phone 10 .
  • the default card of the mobile phone 10 can be activated.
  • the default card can be the default simulation card set by the user in the application (such as wallet application 11A) used by the mobile phone 10 to manage the NFC simulation card, or it can be the simulation card used when the mobile phone 10 last swiped the card, or it can also be the mobile phone 10.
  • the simulation card determined based on the location and application scenario of the mobile phone 10 is not limited here.
  • the default card will be activated first.
  • the user can set the default card of the phone 10 through the wallet application 11A.
  • FIGS. 5A to 5D show a schematic interface diagram of the wallet application 11A displayed on the mobile phone 10 when the user sets the default card of the mobile phone 10 through the wallet application 11A.
  • the user can first enter the setting interface shown in Figure 5B by clicking on the "My" control 51 shown in Figure 5A; and then click on the "Card Swipe Settings" control 52 shown in Figure 5B Click to enter the card setting interface shown in Figure 5C; then click on the "default card” control 53 shown in Figure 5C to enter the default card setting interface shown in Figure 5D; finally, click on the "default card” control 53 shown in Figure 5C Select the default card of the mobile phone 10 in the default card setting interface. For example, by clicking the "Smart Flash Card” control 54, select the Smart Flash Card as the default card of the mobile phone 10.
  • the mobile phone 10 can automatically set different default cards according to different scenarios. For example, the last simulated card used by the mobile phone 10 is used as the default card, or according to the mobile phone 10 10. The geographical location where the user is located, selects the simulation card frequently used by the user in that geographical location as the default card, etc.
  • the user can also set the default card of the mobile phone 10 through other methods, which is not limited here.
  • step S402 Determine whether a near field communication signal is detected. If a near field communication signal is detected, it means that the mobile phone 10 has been close to the NFC card reader device, such as the aforementioned NFC card reader 01; otherwise, step S402 is repeated.
  • the NFC controller 14 of the mobile phone 10 when the NFC controller 14 of the mobile phone 10 detects a near field communication signal, it may send information that the near field communication signal is detected to the wallet application 11A or the NFC service 11B.
  • the mobile phone 10 may not determine whether a near field communication signal is detected, but directly go to step S403 after executing step S401, which is not limited here.
  • AID Determine whether AID is received. If AID is received, it means that the current card swiping scene is a scene with AID, such as a transportation card, bank card, etc. scene, and go to step S404; otherwise, it means that the current scene is a scene without AID, and go to step S405.
  • the mobile phone 10 When the mobile phone 10 receives the AID, it detects whether the received AID exists in the mobile phone 10 . If the AID exists in the mobile phone 10, it means that there is a simulation card corresponding to the AID in the mobile phone 10, and go to step S405; otherwise, it means that the simulation card corresponding to the AID does not exist in the mobile phone 10, and go to step S406.
  • the AID list of cards with AID in the mobile phone 10 can be stored in the aforementioned eSE 13, so that a trusted application in the TEE 12 of the mobile phone 10, such as the wallet application TA 12A, determines whether the card in the mobile phone 10 There is a received AID.
  • a trusted application in the TEE 12 of the mobile phone 10 such as the wallet application TA 12A
  • the AID list of simulated tablets with AID stored in the mobile phone 10 can also be stored in the memory of the mobile phone 10, so that the application/service in the REE 11 of the mobile phone 10, such as a wallet application, can 11A and NFC service 11B to determine whether the received AID exists in the mobile phone 10 .
  • the embodiment of the present application does not limit the location where the AID list is stored.
  • S405 Terminate the activation state of the default card based on TEE 12 and eSE 13, and activate the simulation card corresponding to the received AID.
  • the mobile phone 10 After determining that the received AID exists in the mobile phone 10, the mobile phone 10 terminates the activation state of the default card based on the TEE 12 and eSE 1, and activates the analog chip corresponding to the received AID.
  • the mobile phone 10 can first interact with the eSE 13 and the NFC controller 14 through the wallet application TA 12A.
  • the wallet application TA 12A sends an instruction to terminate the activation state of the default card to the eSE 13; and after the activation of the default card
  • a preset interface such as the Open Mobile Application Programming Interface (OMAPI)
  • OMAPI Open Mobile Application Programming Interface
  • every time the mobile phone 10 activates a simulation card it must first terminate the activation state of the currently activated simulation card (such as the default card), and then activate the simulation card to be activated. (For example, write the card information of the simulated card to be simulated into the NFC controller 14). In the process of activating an emulated card on the mobile phone 10, it is necessary to interact with the eSE 13 and/or the NFC controller 14 multiple times through the trusted application in the TEE 12.
  • the mobile phone 10 determines that the received AID does not exist in the mobile phone 10, it prompts the user that the card swiping failed. For example, in some embodiments, the mobile phone 10 can display the prompt box 61 shown in FIG. 6 to prompt the user to "Failed to swipe the card, please try again.”
  • the mobile phone 10 can also prompt the user to fail to swipe the card through other forms, such as playing sound effects, voices, etc. for failure to swipe the card.
  • the embodiments of the present application do not limit the specific form of prompting the user to fail to swipe the card.
  • step S407 Determine whether there is a simulation card without AID in the mobile phone 10. If there is a simulation card without AID in the mobile phone 10, it means that there may be a simulation card without AID corresponding to the current scene in the mobile phone 10, and go to step S408; otherwise, it means that there is no simulation card in the mobile phone 10. If there is a simulation card without AID corresponding to the current scene, go to step S406.
  • the mobile phone 10 can determine whether there is a simulation card that does not have an AID in the mobile phone 10 by determining whether each simulation card stored in the eSE 13 has an AID. In the eSE 13, there is a situation where the simulation card does not have an AID. Next, confirm that there is a simulation card without AID in the mobile phone 10.
  • SAK Select Acknowledge
  • the mobile phone 10 can also use other methods to determine whether there is a simulation card without AID in the mobile phone 10, which is not limited here.
  • simulation card with or without AID can be an access control card, a membership card, etc., or other simulation cards, which are not limited here.
  • S408 Terminate the activation status of the current card based on TEE 12 and eSE 13, and select a simulated card without AID for activation.
  • the activation state of the currently activated simulation card is terminated based on TEE 12 and eSE 13, and one of the simulation cards without AID is selected for activation.
  • the simulation card without AID can be marked as activated, so that the next time you select an activated simulation card without AID, you will not repeat the selection. This is a simulation card without AID to increase switching speed.
  • the current card can be the default card of the mobile phone 10, or it can be the simulated card that was last activated by the mobile phone 10.
  • the mobile phone 10 when the mobile phone 10 selects one of the multiple simulated cards without AID to activate, it can select according to the storage order of the simulated cards without AID, or according to the use of the simulated cards without AID. Frequency selection can also be selected based on the current location of the mobile phone 10. It can be understood that in other embodiments, the mobile phone 10 can also use other methods to select one of the simulation cards without AID for activation, such as randomly selecting an unactivated simulation card without AID for activation, which is not the case here. Make limitations.
  • the mobile phone 10 can send a termination activation instruction and an activation instruction to the NFC controller 14 through a trusted application in the mobile phone 10, such as the wallet application TA 12A. After receiving the activation termination instruction/activation instruction, the NFC controller 14 terminates The activation status of the currently activated simulation card/or activate the selected simulation card without AID.
  • step S409 Determine whether the termination conditions are met. If it is determined that the termination condition is met, end this card swiping session; otherwise, go to step S410 for further judgment.
  • the termination condition may include at least one of the following conditions: the mobile phone 10 does not detect a near field communication signal beyond the preset waiting time (that is, the mobile phone 10 has moved away from the NFC card reader 01), the NFC function of the mobile phone 10 has expired. Closed, the current card swiping time has exceeded the preset card swiping time, the card swiping is successful, and the mobile phone 10 detects the user's operation or instruction to cancel the card swiping on the mobile phone 10.
  • step S410 Determine whether all simulation cards without AID have been activated. If it is determined that all the simulation cards without AID have been activated, it means that the card swiping failed this time, and go to step S406; otherwise, go to step S408 to activate the next simulation card without AID.
  • steps S401 to S410 is just an example. In other embodiments, the execution order of some steps can be adjusted, some steps can be merged or split, and some steps can also be added or deleted.
  • the application examples are not limiting.
  • the mobile phone 10 can simulate a card without AID through NFC, such as an access control card. Automatically select the simulated card without AID stored in the mobile phone 10 to try until the card swiping is successful or the card swiping is terminated, without the user having to manually select, which improves the user's card swiping experience.
  • NFC such as an access control card
  • the card information of the simulated card without AID (such as access control card) is stored in the eSE 13.
  • the mobile phone 10 activates a card.
  • Each simulated card requires a trusted application in TEE 12 (such as wallet application TA 12A) to interact with eSE 13 to terminate the activation status of the activated simulated card and activate the simulated card to be activated. Since it takes a long time to terminate the activation status of the card and activate the card through TEE 12, eSE 13, and NFC controller 14, the operation of terminating activation and activation usually takes about 0.7 seconds.
  • the simulated card without AID stored in the mobile phone 10 When the quantity is large, the card swiping time will be longer, affecting the user's card swiping experience. In addition, due to the small storage space of eSE 13 (usually 50KB), if you want to store more simulation cards, you need to equip the mobile phone 10 with multiple eSEs or increase the storage space size of eSE, which increases development costs.
  • embodiments of the present application provide another technical architecture of an NFC-based card swiping method.
  • storing the card information of a simulation card with lower security requirements such as a simulation card without AID
  • the application in the REE of the mobile phone 10 or the trusted application in the TEE of the mobile phone 10 reads the card information of the simulated card without AID from the memory, and stores the card The information is written to the NFC controller to realize automatic selection of the simulated card.
  • FIG. 7 shows a schematic technical architecture diagram of another NFC-based card swiping method according to some embodiments of the present application.
  • the software layer of the mobile phone 10 includes TEE 12 and REE 11, and the hardware layer includes eSE 13, NFC controller 14 and memory 103.
  • the schematic diagram of the technical architecture shown in Figure 6 and that shown in Figure 3 modules with the same labels have similar functions.
  • the mobile phone 10 stores card information of simulated cards with high security requirements (bank cards with AID, transportation cards, etc., such as card A1, card A2 and card A3 shown in Figure 7). It is stored in the eSE 13, and the card information of simulation cards with lower security requirements (simulation cards without AID, etc., such as card B1, card B2, and card B3 shown in Figure 7) is stored in the memory 103.
  • the mobile phone 10 After the mobile phone 10 detects the card swipe triggering command, if it receives the AID, it will refer to the aforementioned embodiment to realize the selection of the simulated card through the interaction between the trusted application in the TEE 12, the eSE 13 and the NFC controller 14; if it does not receive the AID AID reads the card information of the simulated card from the memory 103 through the application program or service in the REE 11 or TEE 12, and writes the card information into the NFC controller 14 to complete the selection of the simulated card.
  • FIG. 8 shows a schematic flow chart of another NFC-based card swiping method according to some embodiments of the present application.
  • the execution subject of this process is the mobile phone 10.
  • the method includes the following steps.
  • the mobile phone 10 When the mobile phone 10 detects the card swiping trigger instruction, it triggers the near field communication simulation card selection method provided by the embodiment of the present application. For details, please refer to step S401, which will not be described again here.
  • S802 Determine whether a near field communication signal is detected.
  • the mobile phone 10 determines whether a near field communication signal is detected. If a near field communication signal is detected, it means that the mobile phone 10 is close to the NFC card reader device and goes to step S803. Otherwise, step S802 is repeated and the judgment is continued. For details, reference may be made to step S402, which will not be described again here.
  • the mobile phone 10 determines whether it has received AID. If it receives the AID, it means that the simulation corresponding to the NFC card reading device currently close to the mobile phone 10
  • the card information of the card is stored in the eSE 13, and the process goes to step S804; otherwise, it means that the card information of the simulated card corresponding to the NFC card reading device currently close to the mobile phone 10 is stored in the memory 103, and the process goes to step S807.
  • the mobile phone 10 determines whether the received AID exists in the mobile phone 10. If the received AID exists in the mobile phone 10, then go to step S805, otherwise go to step S806. For the specific process, please refer to the aforementioned step S404, which will not be described again here.
  • S805 Terminate the activation state of the default card based on TEE 12 and eSE 13, and activate the simulation card corresponding to the received AID.
  • the mobile phone 10 determines that the stored AID has been received, it terminates the activation state of the default card based on the TEE 12 and eSE 13 and activates the simulated card corresponding to the received AID.
  • the mobile phone 10 determines that the stored AID has been received, it terminates the activation state of the default card based on the TEE 12 and eSE 13 and activates the simulated card corresponding to the received AID.
  • the mobile phone 10 determines that the stored AID has been received, it terminates the activation state of the default card based on the TEE 12 and eSE 13 and activates the simulated card corresponding to the received AID.
  • the mobile phone 10 determines that the AID has not been received and there is no analog card without AID in the mobile phone, it prompts that the card swiping fails.
  • the specific prompting method please refer to the aforementioned step S406, which will not be described again here.
  • the mobile phone 10 determines whether there is a simulation card without AID in the mobile phone 10 through the wallet application 11A in the REE 11. If there is a simulation card without AID, it means that the mobile phone 10 may store For the card information of the simulated card corresponding to the NFC card reading device that the mobile phone 10 is currently close to, go to step S808; otherwise, it means that the card information of the simulated card corresponding to the NFC card reading device that the mobile phone 10 is currently close to is not stored in the mobile phone 10, go to Step S806.
  • the mobile phone 10 may determine that there is a simulation card without AID in the mobile phone 10 when the card information is stored in the file used to store the card information of the simulation card without AID; in other embodiments , the mobile phone 10 may also determine that there is a simulated card without AID in the mobile phone 10 when the card information without AID is stored in the mobile phone 10 .
  • simulation cards without AID can be access control cards, membership cards, etc., or other cards. There is no limitation here on having AID.
  • the mobile phone 10 determines that there is a simulation card without AID in the mobile phone 10, it terminates the activation state of the default card.
  • the mobile phone 10 can interact with the eSE 13 through the aforementioned wallet application TA 12A to terminate the activation state of the default card.
  • the mobile phone 10 can interact with the NFC controller 14 through the aforementioned wallet application 11A to terminate the activation state of the default card.
  • the mobile phone 10 can also terminate the activation state of the default card through other applications/services, which is not limited here.
  • the mobile phone 10 may skip step S808 after executing step S807 and directly Go to step S809. Therefore, the time of terminating the activation state of the default card can be saved, and the card swiping speed can be further improved.
  • the mobile phone 10 When there is a simulation card without AID in the mobile phone 10 , the mobile phone 10 obtains the card information of a simulation card without AID from the memory 103 , and writes the obtained card information into the NFC controller 14 .
  • the mobile phone 10 can utilize the aforementioned wallet application 11A, Select a simulation card without AID from the memory, and write the card information of the simulation card without AID into the NFC controller 14.
  • the NFC controller 14 After receiving the card information, the NFC controller 14 passes the card information through NFC technology is transmitted to NFC card reading devices, such as the aforementioned NFC card reader 01.
  • the card information of the simulation card without AID can include the UID of the simulation card without AID, and can also include the UID and SAK of the simulation card without AID. It can also include more information, which is not limited here. .
  • the mobile phone 10 when the mobile phone 10 obtains the card information of the simulated cards without AID from the memory 103, it can obtain it according to the card information storage order of the simulated cards without AID, or it can obtain it according to the card information of the simulated cards without AID. It can be obtained based on the usage frequency, and can also be obtained based on the current location of the mobile phone 10. It can be understood that in other embodiments, the mobile phone 10 can also use other methods to determine which card information of a simulation card without AID to obtain, such as randomly selecting the card information of an unselected simulation card without AID. , no limitation is made here.
  • the NFC controller 14 may include a contactless front-end chip (Contactless Frontend, CLF), and the mobile phone 10 completes the card swiping by updating the card information of the simulated card without AID to the CLF.
  • CLF is an NFC control chip used to send card information to the card reading device through the NFC transmitting antenna.
  • the mobile phone 10 can also mark the selection status of the simulation card without AID as selected to avoid obtaining the card information next time.
  • the card information of a simulated card without AID is obtained, the card information of the simulated card without AID is repeatedly obtained to increase the card swiping speed.
  • FIG. 9 shows a schematic log diagram of the data transmitted by the mobile phone 10 during the process of automatically switching to a simulation card without AID obtained by using an NFC air interface packet capture tool.
  • the row corresponding to serial number 57 records the data corresponding to the UID sent by mobile phone 10 received by NFC card reader 01, where "11 11 11 11" is the UID of the simulation card without AID; the serial number The row corresponding to 58 records the data corresponding to the SAK sent by the mobile phone 10 to the card reader 01, where "18" is the SAK of the simulated card (that is, the simulated card without AID).
  • the mobile phone 10 can communicate with the NFC card reader 01 Send the UID data of another simulated card without AID, where "33 33 33 33" is the UID of the simulated card; then, referring to the serial number 81 and the corresponding line, NFC card reader 01 receives the UID "33 33 33 33", referring to the row corresponding to serial number 82, mobile phone 10 sends the SAK data of the simulation card with UID "33 33 33 33" to NFC card reader 01, where "08" is the SAK of the simulation card.
  • the mobile phone 10 determines whether the termination condition is met, and if the termination condition is met, the card swiping session ends, otherwise, the process goes to step S811.
  • the termination condition may include at least one of the following conditions: the mobile phone 10 does not detect a near field communication signal beyond the preset waiting time (that is, the mobile phone 10 has moved away from the NFC card reader 01), the NFC function of the mobile phone 10 It has been closed, the current card swiping time has exceeded the preset card swiping time, the card swiping is successful, and the mobile phone 10 detects the user's operation or instruction to cancel the card swiping on the mobile phone 10.
  • the mobile phone 10 determines whether all the simulation cards without AID have been selected. If it is determined that the mobile phone 10 has selected all the simulation cards without AID, then go to step S806; otherwise, go to step S809 to obtain the next card without AID.
  • the card information of the simulated card with AID is written to the NFC controller 14.
  • the selection status of all simulation cards without AID can be set to unselected, so that the mobile phone 10 can The next time you swipe your card, you can select one of the simulated cards without AID whose selection status is unselected to swipe your card.
  • the selected status of all simulation cards without AID can also be changed. All are set to unselected, and go to step S809 to write the card information of each simulated card without AID into the NFC controller 14 one by one for the next round of attempts to prevent the mobile phone 10 from correctly emulating the simulated card without AID. After the card information of the card is written into the NFC controller 14, if the card swiping fails due to other reasons, the success rate of the card swiping is increased.
  • execution order of the aforementioned steps S801 to S811 is just an example. In other embodiments, the execution order of some steps can be adjusted, some steps can be merged or split, and some steps can also be added or reduced. Limitations here.
  • the embodiment shown in Figure 4 takes 7 seconds from selecting a card to successfully swiping the card, and this application implements The method provided in the example only takes 1 second, which greatly shortens the user's waiting time and improves the user experience.
  • the card information of the simulated card without AID is stored in the memory 103 of the mobile phone 10 instead of being stored in the eSE 13
  • the mobile phone 10 can store more cards without increasing the storage space or quantity of the eSE and reducing the cost. development costs.
  • FIG. 10 shows the battery of the mobile phone 10 when the mobile phone 10 terminates activation/activation of the simulated card through the eSE 13, reads the card information of the simulated card from the memory 103 and writes it to the NFC controller 14, according to some embodiments of the present application. changes in current.
  • the methods provided by the embodiments shown in Figure 4 and Figure 8 are applicable to all electronic devices equipped with eSE.
  • the embodiment of the present application also provides another NFC-based card swiping method, which can be applied to devices with NFC functions but excluding eSE.
  • Electronic devices, such as smart bracelets, etc. enable such electronic devices to automatically select a simulated card to complete card swiping when multiple simulated cards without AID are stored.
  • the method provided by the embodiment of the present application can be applied to any electronic device with NFC function, but does not include eSE, such as smart watches, smart bracelets, etc.
  • eSE such as smart watches, smart bracelets, etc.
  • the smart bracelet 20 is taken as an example for introduction below.
  • the software layer of the smart bracelet 20 includes REE 201, which is used to run lightweight systems, such as Wear OS TM , Lite OS TM, etc., and the smart bracelet 20 is used to manage NFC function applications, such as NFC Application 2011 runs on the lightweight system described above.
  • the hardware related to the NFC function in the smart bracelet 20 includes a memory 202 and an NFC controller 203.
  • the memory 202 is used to store card information of different simulated cards
  • the NFC controller 203 is used to send the card information of the simulated cards to NFC through NFC technology. Card reading equipment or card information that reads physical cards.
  • FIG. 12 shows a schematic flow chart of yet another NFC-based card swiping method according to some embodiments of the present application.
  • the execution subject of this process is the smart bracelet 20.
  • the execution process of step S1201 to step S1203 can refer to the aforementioned step S801 to step S803
  • the execution process of step S1207 can refer to the aforementioned step S807
  • the execution process of step S1208 to step S1210 can refer to the aforementioned step S809 to step S811.
  • the execution process of step S1204 to step S1206 that is different from the previous embodiment will be introduced.
  • S1204 Determine whether the received AID exists in the smart bracelet 20.
  • the smart bracelet 20 can compare the received AID with the AID of the card information of each simulated card stored in the memory 202 to determine whether the received AID exists in the smart bracelet 20 .
  • S1205 Read the card information of the simulated card corresponding to the received AID from the memory 202, and write the card information into the NFC controller 203.
  • the smart bracelet 20 When the smart bracelet 20 determines that the received AID exists in the smart bracelet 20 , it reads the card information of the analog card corresponding to the received AID from the memory 202 , and writes the card information to the NFC controller 203 , so that the NFC controller 203 sends the card information to the card reading device through NFC technology.
  • the smart bracelet 20 determines that there is no AID received by the smart bracelet 20, it prompts that the card swiping fails. For example, the smart bracelet 20 may display a card swiping failure message, vibrate, emit a prompt sound, flash the breathing light of the smart bracelet 20, etc.
  • step S1207 when detecting a near field communication signal in step S1202 without executing The contents of step S1203 to step S1205.
  • electronic devices that support NFC functions but do not have eSE can also automatically select simulated cards for card swiping, which improves user experience.
  • FIG. 13 shows a schematic flow chart of a near field communication simulation card opening method according to some embodiments of the present application.
  • the execution subject of this process is the mobile phone 10.
  • the process includes the following steps.
  • the application in the mobile phone 10 that manages the NFC function such as the aforementioned wallet application 11A, enters the card opening mode after detecting the user's card opening operation. It can be understood that after the mobile phone 10 enters the card opening mode, the NFC controller 14 of the mobile phone 10 enters the card reader mode.
  • FIG. 14A to FIG. 14E show a schematic interface diagram of the wallet application 11A displayed on the mobile phone 10 when the mobile phone 10 enters the card opening mode according to some embodiments of the present application.
  • the user can enter the card package interface shown in Figure 14B by clicking the "card package” control 141 shown in Figure 14A; and then click the "+" control shown in Figure 14B to enter the card package interface shown in Figure 14C.
  • the add card interface shown in Figure 14C secondly, use the controls in the add card interface shown in Figure 14C to select the type of card to add, for example, by clicking on the "key" control 143 to enter the add key interface shown in Figure 14D; finally, by clicking on Figure 14D
  • the "access card” control 144 in the key adding interface shown operates the mobile phone 10 to enter the card opening mode. For example, after detecting the user's click operation on the "access card” control 144, the mobile phone 10 enters the card opening mode and displays Figure 14E The simulated access card interface shown.
  • the mobile phone 10 can also enter the card opening mode through other methods, such as receiving the user's voice command, card opening gesture, etc., to enter the card opening mode, which is not limited by the embodiments of this application.
  • the mobile phone 10 After the mobile phone 10 enters the card opening mode, it determines whether the physical card is detected. If detected, proceed to step S1303; otherwise, repeat step S1302 to continue detection.
  • the mobile phone 10 may determine that a physical card is detected when a near field communication signal is detected.
  • S1303 Obtain the card information of the physical card and determine whether the physical card has AID.
  • the mobile phone 10 When the mobile phone 10 detects the physical card, it obtains the card information of the physical card and determines whether the physical card has AID. If it is determined that the physical card has AID, go to step S1304; otherwise, go to step S1305.
  • the mobile phone 10 can determine whether the physical card has AID based on the SAK in the obtained card information. For example, if the SAK in the obtained card information is 08, it is determined that the physical card does not have AID. It can be understood that in other embodiments, the mobile phone 10 can also determine whether the physical card has AID in other ways, such as determining whether the physical card has AID according to the length of the UID in the card information, which is not limited in the embodiments of this application.
  • the mobile phone 10 can obtain the card information of the physical card from the NFC controller 14 through an application program in the REE 11, such as the wallet application 11A or the NFC service 11B.
  • the mobile phone 10 can also obtain the card information of the physical card from the NFC controller 14 through an application program in the TEE 12, such as the wallet application TA 12A.
  • the wallet application TA 12A can obtain the card information of the physical card from the NFC controller 14 through the eSE 13, or can directly obtain the card information of the physical card from the NFC controller 14, which is not limited here.
  • the mobile phone 10 determines that the physical card has AID, it uses the card opening logic corresponding to other physical cards.
  • the mobile phone 10 is preset with card opening logic for different types of physical cards. For example, for bank cards, due to high security requirements, a complex security verification process is required. The mobile phone 10 can perform security verification through the corresponding server, and If the verification is successful, the card information of the bank card is written to eSE 13.
  • the first file includes the card opening logic of the simulated card without AID and the data writing method of eSE 13.
  • eSE 13 can write the card information into eSE 13 based on the first file.
  • the first file is generally stored in a server, such as a Trusted Service Manager (TMS) server, and is obtained from the server by a trusted application in the mobile phone 10, such as the aforementioned wallet application TA 12A when opening a card.
  • TMS Trusted Service Manager
  • the first file may include a Java applet
  • the Java applet includes running logic for writing card information into the eSE 13.
  • the mobile phone 10 Based on the card opening logic in the first file, the mobile phone 10 writes the card information of the physical card into the eSE 13.
  • the mobile phone 10 can use a trusted application, such as the aforementioned wallet application TA 12A, to write the card information of the physical card to the eSE based on the card opening logic of the simulated card without AID in the first file and the data writing method of the eSE 13 In 13, card opening is completed.
  • the mobile phone 10 needs to obtain the first file from the server, and based on the card opening logic of the simulated card without AID and the data of the eSE 13 recorded in the first file
  • the writing method is to write the read card information into eSE 13, which takes a long time. It takes about 20 seconds to obtain the first file from the server, and it takes 20 seconds to write the card information of the physical card into eSE 13. It takes a long time to open a card.
  • FIG. 15 shows a schematic flow chart of another near field communication simulation card opening method according to some embodiments of the present application.
  • the execution subject of this process is the mobile phone 10.
  • steps S1501 to S1504 reference can be made to the aforementioned steps S1301 to S1304, which will not be described again here. Differences from the embodiment shown in FIG. 13 will be introduced below.
  • S1505 Store the card information of the physical card in the memory 103.
  • the mobile phone 10 determines that the physical card is a simulated card without AID
  • the UID and SAK of the physical card can be stored in the memory 103 of the mobile phone 10 .
  • the mobile phone 10 can also store only the UID of the physical card, and can also store other information of the physical card. No limitation is made here.
  • the mobile phone 10 can also upload the card information of each physical card stored in the mobile phone 10 to the server when the mobile phone 10 can access the network, so that the user can obtain the card from the server through other electronic devices. information, and use other electronic devices to simulate the simulation cards corresponding to each card information.
  • the mobile phone 10 does not need to access the server when opening the card, nor does it need to write the card information to the eSE 13 through the aforementioned first file. Instead, the card information of the physical card is directly stored in the mobile phone. In the memory 103, it takes less time (usually less than 1 second to store the information of a card), which reduces the card opening time of the mobile phone 10 and improves the user experience.
  • FIG. 16 shows a schematic flow chart of yet another near field communication simulation card opening method according to some embodiments of the present application.
  • the execution subject of this process is the smart bracelet 20.
  • the process includes the following steps.
  • the smart bracelet 20 can establish a binding relationship with other electronic devices, such as the aforementioned mobile phone 10, and then the mobile phone 10 controls the smart bracelet 20 to enter the card opening mode.
  • S1602 Determine whether the physical card is detected.
  • the smart bracelet 20 determines whether the physical card is detected. If detected, the process goes to step S1603. Otherwise, step S1602 is repeated to continue detection.
  • the smart bracelet 20 may determine that the physical card is detected when a near field communication signal is detected.
  • the smart bracelet 20 determines whether the physical card is supported. If so, go to step S1605; otherwise, go to step S1604.
  • the smart bracelet 20 can determine whether to support the physical card based on the type of the physical card. For example, the smart bracelet 20 can obtain the SAK of the physical card, and when the obtained SAK is in the list of SAKs supported by the smart bracelet 20, it is determined that the smart bracelet 20 supports the physical card.
  • the smart bracelet 20 determines that the smart bracelet 20 does not support the current physical card, it prompts that the card activation fails. For example, the smart bracelet 20 prompts the user to fail to open a card through breathing light, prompt sound, display prompt message, vibration, etc.
  • S1605 Obtain the card information of the physical card and store the card information in the memory 202.
  • the smart bracelet 20 determines that the smart bracelet 20 supports the current physical card, it obtains the card information of the physical card and stores the card information in the memory 202 .
  • the card information of the physical card includes but is not limited to the UID, AID, SAK, etc. of the physical card.
  • the card information stored in the electronic device can also be shared with the smart bracelet 20 through an electronic device connected to the smart bracelet 20 .
  • the card information of the simulated card without AID can be stored in the memory, so as to facilitate the method provided by the embodiment shown in Figure 12 To simulate a simulated card without AID, realize card swiping and improve the user experience.
  • FIG. 17 shows a schematic structural diagram of a mobile phone 10 according to some embodiments of the present application.
  • the mobile phone 10 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, and a battery 142.
  • SIM subscriber identification module
  • the sensor module 180 may include a pressure sensor 180A, a gyro sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, and ambient light. Sensor 180L, bone conduction Sensor 180M and so on.
  • the processor 110 may include one or more processing units.
  • the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processing unit (GPU), and an image signal processor. (image signal processor, ISP), controller, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural network processor (neural-network processing unit, NPU), etc.
  • application processor application processor, AP
  • modem processor graphics processing unit
  • GPU graphics processing unit
  • image signal processor image signal processor
  • ISP image signal processor
  • controller video codec
  • digital signal processor digital signal processor
  • DSP digital signal processor
  • baseband processor baseband processor
  • neural network processor neural-network processing unit
  • the controller can generate operation control signals based on the instruction operation code and timing signals to complete the control of fetching and executing instructions.
  • the processor 110 may also be provided with a memory for storing instructions and data.
  • the memory in processor 110 is cache memory. This memory may hold instructions or data that have been recently used or recycled by processor 110 . If the processor 110 needs to use the instructions or data again, it can be called directly from the memory. Repeated access is avoided and the waiting time of the processor 110 is reduced, thus improving the efficiency of the system.
  • the processor 110 can call and execute the execution instructions of the NFC-based card swiping method provided by various embodiments of the present application stored in the memory to implement the NFC-based card swiping method provided by the embodiments of the present application.
  • processor 110 may include one or more interfaces.
  • Interfaces can include integrated circuit (inter-integrated circuit, I2C) interface, integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, pulse code modulation (pulse code modulation, PCM) interface, serial peripheral interface (Serial Peripheral) Interface (SPI), universal asynchronous receiver/transmitter (UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, Subscriber identity module (SIM) interface, and/or universal serial bus (USB) interface, etc.
  • I2C integrated circuit
  • I2S integrated circuit built-in audio
  • PCM pulse code modulation
  • PCM pulse code modulation
  • SPI serial peripheral interface
  • UART universal asynchronous receiver/transmitter
  • MIPI mobile industry processor interface
  • GPIO general-purpose input/output
  • SIM Subscriber identity module
  • USB universal serial bus
  • the I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (derail clock line, SCL).
  • processor 110 may include multiple sets of I2C buses.
  • the processor 110 can separately couple the touch sensor 180K, charger, flash, camera 193, NFC controller, etc. through different I2C bus interfaces.
  • the processor 110 can be coupled to the NFC controller through the I2C interface to obtain card information from the NFC controller or write card information to the NFC controller.
  • the I2S interface can be used for audio communication.
  • processor 110 may include multiple sets of I2S buses.
  • the processor 110 can be coupled with the audio module 170 through the I2S bus to implement communication between the processor 110 and the audio module 170 .
  • the audio module 170 can transmit audio signals to the wireless communication module 160 through the I2S interface to implement the function of answering calls through a Bluetooth headset.
  • the PCM interface can also be used for audio communications to sample, quantize and encode analog signals.
  • the audio module 170 and the wireless communication module 160 may be coupled through a PCM bus interface.
  • the audio module 170 can also transmit audio signals to the wireless communication module 160 through the PCM interface to implement the function of answering calls through a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
  • the SPI interface is a full-duplex three-wire synchronous serial peripheral interface first proposed by Motorola TM . It adopts a master-slave mode (Master-Slave) architecture and supports one or more Slave devices.
  • the SPI interface can be used to couple the eSE so that the trusted application can obtain card information from the eSE or write card information to the eSE.
  • the UART interface is a universal serial data bus used for asynchronous communication.
  • the bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication.
  • a UART interface is generally used to connect the processor 110 and the wireless communication module 160 .
  • the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to implement the Bluetooth function.
  • the audio module 170 can transmit audio signals to the wireless communication module 160 through the UART interface to implement the function of playing music through a Bluetooth headset.
  • the MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193 .
  • MIPI interface includes camera string serial interface (camera serial interface, CSI), display serial interface (display serial interface, DSI), etc.
  • the processor 110 and the camera 193 communicate through the CSI interface to implement the shooting function of the mobile phone 10 .
  • the processor 110 and the display screen 194 communicate through the DSI interface to realize the display function of the mobile phone 10 .
  • the GPIO interface can be configured through software.
  • the GPIO interface can be configured as a control signal or as a data signal.
  • the GPIO interface can be used to connect the processor 110 with the camera 193, display screen 194, wireless communication module 160, audio module 170, sensor module 180, etc.
  • the GPIO interface can also be configured as an I2C interface, I2S interface, UART interface, MIPI interface, etc.
  • the USB interface 130 is an interface that complies with the USB standard specification, and may be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc.
  • the USB interface 130 can be used to connect a charger to charge the mobile phone 10, and can also be used to transmit data between the mobile phone 10 and peripheral devices. It can also be used to connect headphones to play audio through them. This interface can also be used to connect other electronic devices, such as AR devices, etc.
  • the charging management module 140 is used to receive charging input from the charger. While the charging management module 140 charges the battery 142, it can also provide power to the electronic device through the power management module 141.
  • the power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110.
  • the power management module 141 receives input from the battery 142 and/or the charging management module 140, and supplies power to the processor 110, the internal memory 121, the display screen 194, the camera 193, the wireless communication module 160, and the like.
  • the wireless communication function of the mobile phone 10 can be realized through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.
  • Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals.
  • the mobile communication module 150 can provide wireless communication solutions including 2G/3G/4G/5G applied on the mobile phone 10 .
  • the mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc.
  • the mobile communication module 150 can receive electromagnetic waves through the antenna 1, perform filtering, amplification and other processing on the received electromagnetic waves, and transmit them to the modem processor for demodulation.
  • the mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves through the antenna 1 for radiation.
  • at least part of the functional modules of the mobile communication module 150 may be disposed in the processor 110 .
  • at least part of the functional modules of the mobile communication module 150 and at least part of the modules of the processor 110 may be provided in the same device.
  • the wireless communication module 160 can provide applications on the mobile phone 10 including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) network), Bluetooth (bluetooth, BT), and global navigation satellite system. (global navigation satellite system, GNSS), frequency modulation (FM), NFC, infrared technology (infrared, IR) and other wireless communication solutions.
  • WLAN wireless local area networks
  • BT Bluetooth
  • GNSS global navigation satellite system
  • FM frequency modulation
  • NFC infrared technology
  • IR infrared technology
  • the wireless communication module 160 may be one or more devices integrating at least one communication processing module.
  • the wireless communication module 160 receives electromagnetic waves via the antenna 2 , frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110 .
  • the wireless communication module 160 can also receive the signal to be sent from the processor 110, frequency modulate it, amplify it, and convert it into electromagnetic waves through the antenna 2 for radiation.
  • the hardware layer may include the aforementioned eSE 13 and NFC controller 14.
  • the mobile phone 10 implements display functions through the GPU, the display screen 194, and the application processor.
  • the GPU is an image processing microprocessor and is connected to the display screen 194 and the application processor. GPUs are used to perform mathematical and geometric calculations for graphics rendering.
  • Processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
  • the display screen 194 is used to display images, videos, etc.
  • Display 194 includes a display panel.
  • the display panel can use a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active matrix organic light emitting diode or an active matrix organic light emitting diode (active-matrix organic light).
  • LCD liquid crystal display
  • OLED organic light-emitting diode
  • active-matrix organic light active-matrix organic light
  • emitting diode AMOLED
  • the mobile phone 10 may include 1 or N display screens 194, where N is a positive integer greater than 1.
  • Camera 193 is used to capture still images or video.
  • the object passes through the lens to produce an optical image that is projected onto the photosensitive element.
  • the photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor.
  • CMOS complementary metal-oxide-semiconductor
  • the photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP to convert it into a digital image signal.
  • ISP outputs digital image signals to DSP for processing.
  • DSP converts digital image signals into standard RGB, YUV and other format image signals.
  • the mobile phone 10 may include 1 or N cameras 193, where N is a positive integer greater than 1.
  • the external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the mobile phone 10 .
  • the external memory card communicates with the processor 110 through the external memory interface 120 to implement the data storage function. Such as saving music, videos, etc. files in external memory card.
  • Internal memory 121 may be used to store computer executable program code including instructions, such as the aforementioned memory 103 .
  • Internal memory 121 may include program storage areas and data storage areas. Among them, the program storage area can store the operating system, at least one application required for the function (such as the aforementioned wallet application 11A, wallet application TA 12A), etc.
  • the data storage area can store data created during the use of the mobile phone 10 (such as the card information of the aforementioned simulation cards), etc.
  • the internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc.
  • the processor 110 executes various functional applications of the mobile phone 10 by executing instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor 110 .
  • the mobile phone 10 can implement audio functions through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone interface 170D, and the application processor. Such as music playback, recording, etc.
  • the audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. Audio module 170 may also be used to encode and decode audio signals.
  • Speaker 170A also called “speaker” is used to convert audio electrical signals into sound signals.
  • the speaker 170A may be used to play a prompt sound indicating success/failure of a card swipe to the user.
  • Receiver 170B also called “earpiece” is used to convert audio electrical signals into sound signals.
  • Microphone 170C also called “microphone” or “microphone”, is used to convert sound signals into electrical signals.
  • the headphone interface 170D is used to connect wired headphones.
  • the pressure sensor 180A is used to sense pressure signals and can convert the pressure signals into electrical signals.
  • pressure sensor 180A may be disposed on display screen 194 .
  • pressure sensors 180A there are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc.
  • a capacitive pressure sensor may include at least two parallel plates of conductive material.
  • the mobile phone 10 determines the intensity of the pressure based on changes in capacitance.
  • the mobile phone 10 detects the intensity of the touch operation according to the pressure sensor 180A.
  • the mobile phone 10 can also calculate the touch position based on the detection signal of the pressure sensor 180A.
  • touch operations acting on the same touch location but with different touch operation intensities may correspond to different operation instructions.
  • the acceleration sensor 180E can detect the acceleration of the mobile phone 10 in various directions (generally three axes). When the mobile phone 10 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of electronic devices and be used in horizontal and vertical screen switching, pedometer and other applications.
  • the ambient light sensor 180L is used to sense ambient light brightness.
  • the mobile phone 10 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness.
  • the ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures.
  • the ambient light sensor 180L also works with a proximity light sensor 180G cooperates to detect whether the mobile phone 10 is in the pocket to prevent accidental touching.
  • Fingerprint sensor 180H is used to collect fingerprints.
  • Mobile phone 10 can use the collected fingerprint characteristics to achieve fingerprint unlocking, access to application locks, fingerprint photography, fingerprint answering incoming calls, etc.
  • the main space and the private space can use different unlocking fingerprints for verification and login to ensure the security of private data in the private space. Users can verify different fingerprints on the mobile phone 10 to enter the main space and private space respectively.
  • Touch sensor 180K also known as "touch device”.
  • the touch sensor 180K can be disposed on the display screen 194.
  • the touch sensor 180K and the display screen 194 form a touch screen, which is also called a "touch screen”.
  • the touch sensor 180K is used to detect a touch operation on or near the touch sensor 180K.
  • the touch sensor can pass the detected touch operation to the application processor to determine the touch event type.
  • Visual output related to the touch operation may be provided through display screen 194 .
  • the touch sensor 180K may also be disposed on the surface of the mobile phone 10 in a position different from that of the display screen 194 .
  • Bone conduction sensor 180M can acquire vibration signals.
  • the bone conduction sensor 180M can acquire the vibration signal of the vibrating bone mass of the human body's vocal part.
  • the bone conduction sensor 180M can also contact the human body's pulse and receive blood pressure beating signals.
  • the buttons 190 include a power button, a volume button, etc.
  • Key 190 may be a mechanical key. It can also be a touch button.
  • the mobile phone 10 can receive key input and generate key signal input related to user settings and function control of the mobile phone 10 . For example, in some embodiments, when the mobile phone 10 presses the power button twice in a row while the screen is off, the NFC-based card swiping method provided by the embodiments of the present application is triggered.
  • the motor 191 can generate vibration prompts.
  • the mobile phone 10 can prompt the user by vibrating when the user successfully/fails to swipe the card.
  • the indicator 192 may be an indicator light, which may be used to indicate charging status, power changes, or may be used to indicate messages, missed calls, notifications, etc.
  • the mobile phone 10 can prompt the user by setting the indicator light to different colors when the user successfully/fails to swipe the card.
  • the SIM card interface 195 is used to connect a SIM card.
  • the structure of the mobile phone 10 shown in the embodiment of the present application does not constitute a specific limitation on the mobile phone 10 .
  • the mobile phone 10 may include more or less components than shown in the figures, or some components may be combined, some components may be separated, or some components may be arranged differently.
  • the components illustrated may be implemented in hardware, software, or a combination of software and hardware.
  • Embodiments of the mechanisms disclosed in this application may be implemented in hardware, software, firmware, or a combination of these implementation methods.
  • Embodiments of the present application may be implemented as a computer program or program code executing on a programmable system including at least one processor, a storage system (including volatile and non-volatile memory and/or storage elements) , at least one input device and at least one output device.
  • Program code may be applied to input instructions to perform the functions described herein and to generate output information.
  • Output information can be applied to one or more output devices in a known manner.
  • a processing system includes any system having a processor such as, for example, a digital signal processor (DSP), a microcontroller, an application specific integrated circuit (ASIC), or a microprocessor.
  • DSP digital signal processor
  • ASIC application specific integrated circuit
  • Program code may be implemented in a high-level procedural language or an object-oriented programming language to communicate with the processing system.
  • assembly language or machine language can also be used to implement program code.
  • the mechanisms described in this application are not limited to the scope of any particular programming language. In either case, the language may be a compiled or interpreted language.
  • the disclosed embodiments may be implemented in hardware, firmware, software, or any combination thereof.
  • the disclosed embodiments may also be implemented as instructions carried on or stored on one or more transitory or non-transitory machine-readable (e.g., computer-readable) storage media, which may be operated by one or more processors Read and execute.
  • instructions may be distributed over a network or through other computer-readable media.
  • machine-readable media may include any mechanism for storing or transmitting information in a form readable by a machine (e.g., a computer), including, but not limited to, floppy disks, optical disks, optical disks, read-only memories (CD-ROMs), magnetic Optical disc, read only memory (ROM), random access memory (RAM), erasable programmable read only memory (EPROM), electrically erasable programmable read only memory (EEPROM), magnetic card or Optical card, flash memory, or tangible machine-readable memory used to transmit information using electrical, optical, acoustic, or other forms of propagation signals (e.g., carrier waves, infrared signals, digital signals, etc.) using the Internet.
  • machine-readable media includes any type of machine-readable media suitable for storing or transmitting electronic instructions or information in a form readable by a machine (eg, computer).
  • each unit/module mentioned in each device embodiment of this application is a logical unit/module.
  • a logical unit/module can be a physical unit/module, or it can be a physical unit/module.
  • Part of the module can also be implemented as a combination of multiple physical units/modules.
  • the physical implementation of these logical units/modules is not the most important.
  • the combination of functions implemented by these logical units/modules is what solves the problem of this application. Key technical issues raised.
  • the above-mentioned equipment embodiments of this application do not introduce units/modules that are not closely related to solving the technical problems raised by this application. This does not mean that the above-mentioned equipment embodiments do not exist. Other units/modules.

Abstract

The present application relates to the technical field of near field communications (NFC), and in particular to an NFC-based card swiping method, a readable medium, and an electronic device. The method comprises: an electronic device enters a card emulation mode, wherein the electronic device stores card information of a plurality of first-type emulation cards; and when the electronic device does not receive a service identifier, the electronic device selects the first-type emulation cards one by one from among the plurality of first-type emulation cards to perform emulation. Therefore, when storing a plurality of first-type emulation cards, the electronic device can automatically select the first-type emulation cards one by one for emulation, without manual switching by a user, thereby improving user experience. In addition, the card information of the first-type emulation cards can also be stored in a memory of the electronic device instead of a secure element or an embedded secure element, so that the speed of the electronic device switching the first-type emulation cards can be improved, the speed of the user swiping a card by using the electronic device is further improved, and the user experience is improved.

Description

基于NFC的刷卡方法、介质和电子设备NFC-based card swiping method, media and electronic device
本申请要求于2022年04月02日提交中国专利局、申请号为202210352015.9、申请名称为“基于NFC的刷卡方法、介质和电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims priority to the Chinese patent application submitted to the China Patent Office on April 2, 2022, with the application number 202210352015.9 and the application name "NFC-based card swiping method, medium and electronic device", the entire content of which is incorporated by reference in in this application.
技术领域Technical field
本申请涉及近场通信技术领域,特别涉及一种基于NFC的刷卡方法、可读介质和电子设备。This application relates to the field of near field communication technology, and in particular to an NFC-based card swiping method, readable media and electronic equipment.
背景技术Background technique
近场通信(near field communication,NFC)是一种短距离的无线通信技术,允许电子设备之间进行非接触式点对点数据传输交换数据。目前NFC具有三种工作模式:卡模拟模式(card emulation mode)、点对点模式(P2P mode)、读卡器模式(reader/writer mode)。其中,卡模拟即是采用射频识别(radiofrequency identification,RFID)技术的集成电路(integrated circuit,IC)卡来模拟实体卡,例如公交卡、门禁卡、会员卡、银行卡等,并代替实体卡为读卡设备,例如刷卡器,提供实体卡的卡片信息。Near field communication (NFC) is a short-range wireless communication technology that allows contactless point-to-point data transmission and exchange of data between electronic devices. Currently, NFC has three working modes: card emulation mode, point-to-point mode (P2P mode), and reader/writer mode. Among them, card simulation is an integrated circuit (IC) card that uses radio frequency identification (RFID) technology to simulate physical cards, such as bus cards, access control cards, membership cards, bank cards, etc., and replaces physical cards with Card reading devices, such as card readers, provide card information for physical cards.
目前,电子设备通常将实体卡的信息存储在电子设备的嵌入式安全单元(embedded Secure Element,eSE)中,在电子设备通过NFC的卡模拟模式模拟实体卡时,电子设备先从读卡设备获取当前场景的业务标识,例如应用标识(application identifier,AID)。然后电子设备根据获取的AID从eSE中获取AID对应模拟卡的卡片信息,再将该模拟卡的卡片信息写入到NFC控制器中,从而将该模拟片的卡片信息传送给读卡设备,完成刷卡。但是对于部分实体卡,例如门禁卡等,并不具有统一的业务标识,电子设备中并未存储有该类卡片对应的AID,该类卡片的读卡设备也不会向电子设备提供AID,导致在电子设备中存在多张不具备AID的卡片的情况下,需要用户手动选择模拟卡,影响用户体验。At present, electronic devices usually store physical card information in the embedded secure element (eSE) of the electronic device. When the electronic device simulates the physical card through the card emulation mode of NFC, the electronic device first obtains it from the card reading device. The business identifier of the current scenario, such as application identifier (AID). Then the electronic device obtains the card information of the simulated card corresponding to the AID from the eSE based on the obtained AID, and then writes the card information of the simulated card into the NFC controller, thereby transmitting the card information of the simulated card to the card reading device, completing Swipe your card. However, some physical cards, such as access control cards, do not have a unified business identifier. The electronic device does not store the AID corresponding to this type of card, and the card reading device of this type of card does not provide AID to the electronic device, resulting in When there are multiple cards without AID in the electronic device, the user is required to manually select the simulated card, which affects the user experience.
发明内容Contents of the invention
有鉴于此,本申请实施例提供了一种基于NFC的刷卡方法、可读介质和电子设备。在电子设备中存储有多张第一类模拟卡的卡片信息的情况下,逐个选择第一类模拟卡进行刷卡,有利于提高用户体验。In view of this, embodiments of the present application provide an NFC-based card swiping method, a readable medium, and an electronic device. When the card information of multiple first-class simulation cards is stored in the electronic device, selecting the first-class simulation cards one by one to swipe the card will help improve the user experience.
第一方面,本申请实施例提供了一种基于NFC的刷卡方法,该方法包括:电子设备进入卡模拟模式,其中,电子设备上存储有多张第一类模拟卡的卡片信息;当电子设备未接收到业务标识时,电子设备从多张第一类模拟卡中逐个选择第一类模拟卡进行模拟。In a first aspect, embodiments of the present application provide a card swiping method based on NFC. The method includes: the electronic device enters a card simulation mode, in which the card information of multiple first-type simulated cards is stored on the electronic device; when the electronic device When the service identification is not received, the electronic device selects the first type simulation cards one by one from multiple first type simulation cards for simulation.
在本申请实施例中,电子设备在存储有多张第一类模拟卡(例如下文中的不具备AID的模拟卡,如门禁卡、会员卡等)的情况下,电子设备可以自动逐个使用第一类模型卡进行模拟、尝试刷卡,而无需用户手动切换,提升了用户体验。In the embodiment of the present application, when the electronic device stores multiple first-type simulation cards (such as the simulation cards without AID below, such as access control cards, membership cards, etc.), the electronic device can automatically use the first-type simulation cards one by one. One type of model card can be simulated and tried to swipe without requiring the user to manually switch, which improves the user experience.
在上述第一方面的一种可能实现中,上述电子设备从多张第一类模拟卡中逐个选择第一类模拟卡进行模拟,包括:电子设备逐个从多张第一类模拟卡中选择出第一类模拟卡进行卡模拟,直至满足预设终止条件。In a possible implementation of the above first aspect, the above electronic device selects the first type simulation cards one by one from multiple first type simulation cards for simulation, including: the electronic device selects the first type simulation cards one by one from the multiple first type simulation cards. The first type of simulation card performs card simulation until the preset termination conditions are met.
在本申请实施例中,电子设备可以循环使用各第一类模拟卡进行模拟,直到满足预设终止条件, 从而可以避免由于读卡器在电子设备模拟正确的第一类模拟卡时未读取到该正确的模拟卡的卡片信息而导致刷卡失败的情况下,可以提升用户利用电子设备刷卡的功能率。In the embodiment of the present application, the electronic device can cycle through each first-type simulation card for simulation until the preset termination conditions are met. This can avoid the situation where the card reader fails to swipe the card due to the card reader not reading the card information of the correct simulated card when the electronic device simulates the correct first-type simulated card, and the functionality rate of the user using the electronic device to swipe the card can be improved.
在上述第一方面的一种可能实现中,上述预设终止条件包括以下条件中的任意一个:In a possible implementation of the above first aspect, the above preset termination condition includes any one of the following conditions:
电子设备进行卡模拟的时长超过预设时长;The electronic device performs card emulation for longer than the preset time;
电子设备的NFC功能关闭;The NFC function of the electronic device is turned off;
电子设备检测到刷卡成功;The electronic device detects that the card has been successfully swiped;
电子设备超过预设时长未检测到近场通信信号;The electronic device does not detect near field communication signals for more than the preset time;
电子设备检测到用户的取消刷卡操作或指令。The electronic device detects the user's cancellation operation or instruction.
在上述第一方面的一种可能实现中,上述电子设备包括存储器;并且,第一类模拟卡的卡片信息存储于存储器中。In a possible implementation of the first aspect, the electronic device includes a memory; and card information of the first type of analog card is stored in the memory.
在本申请实施例中,电子设备将第一类模拟卡的卡片信息存储于存储器中,而非安全单元或嵌入式安全单元中,从而在切换第一类模拟卡的过程中无需安全单元或嵌入式安全单元的参与,可以提高电子设备切换上述多张第一类模拟卡的速度,从而提高用户使用电子设备刷卡的速度、提升用户体验。In the embodiment of the present application, the electronic device stores the card information of the first type of simulation card in the memory instead of the security unit or the embedded security unit, so that no security unit or embedded security unit is needed in the process of switching the first type of simulation card. The participation of the security unit can increase the speed of electronic devices switching among the above-mentioned first-class simulation cards, thereby increasing the speed of users using electronic devices to swipe cards and improving user experience.
此外,由于第一类模拟卡的卡片信息存储于存储器中,可以大量存储,并且安全单元或嵌入式安全单元可以用于存储其他安全需要较高的模拟卡的卡片信息,可以提高电子设备支持的模拟卡的数量。由于不需要更多的安全单元或嵌入式安全单元来存储第一类模拟卡的卡片信息,可以节省电子设备的制造成本。In addition, since the card information of the first type of simulation card is stored in the memory, it can be stored in large quantities, and the security unit or embedded security unit can be used to store the card information of other simulation cards with higher security requirements, which can improve the support of electronic equipment. The number of emulated cards. Since no more security units or embedded security units are needed to store the card information of the first type of analog card, the manufacturing cost of the electronic device can be saved.
在上述第一方面的一种可能实现中,上述第一类模拟卡的卡片信息,由电子设备在对各第一类模拟卡开卡时,在未获取到业务标识的情况下,存储于存储器中。In a possible implementation of the above first aspect, the card information of the above first type simulation card is stored in the memory by the electronic device when opening each first type simulation card without obtaining the business identifier. middle.
在本申请实施例中,电子设备在对第一类模拟卡进行开卡时,直接将第一类模拟卡的卡片信息存储到存储器中,而非安全单元或嵌入式安全单元中,从而电子设备无需从网络获取第一类模拟卡开卡的相关程序,也无需安全单元或嵌入式安全单元的参与,可以提高电子设备对第一类模拟卡的开卡速度。In the embodiment of the present application, when the electronic device opens the first type of simulation card, the card information of the first type of simulation card is directly stored in the memory instead of the security unit or the embedded security unit, so that the electronic device There is no need to obtain the relevant procedures for opening the first type of simulation card from the network, and there is no need for the participation of a security unit or an embedded security unit, which can improve the speed of the electronic device for opening the first type of simulation card.
在上述第一方面的一种可能实现中,上述电子设备还包括NFC控制器;并且,电子设备从多张第一类模拟卡中逐个选择第一类模拟卡进行模拟,包括:电子设备从存储器中逐个获取各第一类模拟卡的卡片信息,并将获取的卡片信息写入到NFC控制器中进行卡模拟。In a possible implementation of the above first aspect, the above electronic device further includes an NFC controller; and, the electronic device selects the first type simulation cards one by one from a plurality of first type simulation cards for simulation, including: the electronic device selects the first type simulation card from the memory The card information of each first-type simulation card is obtained one by one, and the obtained card information is written to the NFC controller for card simulation.
在上述第一方面的一种可能实现中,上述电子设备包括安全单元SE或嵌入式安全单元eSE;并且,第一类模拟卡的卡片信息存储于安全单元SE或嵌入式安全单元eSE中。In a possible implementation of the first aspect, the electronic device includes a security unit SE or an embedded security unit eSE; and the card information of the first type of simulated card is stored in the security unit SE or the embedded security unit eSE.
在上述第一方面的一种可能实现中,上述电子设备的可信执行环境中运行有可信应用,电子设备还包括NFC控制器;并且,电子设备从多张第一类模拟卡中逐个选择第一类模拟卡进行模拟,包括:电子设备利用可信应用、安全单元SE或嵌入式安全单元eSE,逐个将第一类模拟卡的卡片信息写入到NFC控制器中进行卡模拟。In a possible implementation of the first aspect, a trusted application is run in the trusted execution environment of the electronic device, and the electronic device further includes an NFC controller; and, the electronic device selects one by one from multiple first-type simulation cards. The simulation of the first type of simulation card includes: the electronic device uses the trusted application, security unit SE or embedded security unit eSE to write the card information of the first type of simulation card into the NFC controller one by one to perform card simulation.
在上述第一方面的一种可能实现中,上述卡片信息包括唯一标识符UID;业务标识包括应用标识符AID。In a possible implementation of the first aspect, the card information includes a unique identifier UID; the service identifier includes an application identifier AID.
在上述第一方面的一种可能实现中,上述电子设备在检测到用户在电子设备上预设的操作和/或检测到近场通信信号的情况下,进入卡模拟模式。In a possible implementation of the above first aspect, the above electronic device enters the card emulation mode when detecting a user's preset operation on the electronic device and/or detecting a near field communication signal.
第二方面,本申请实施例提供了一种电子设备,该中存储有多张第一类模拟卡的卡片信息,该电子设备包括:存储器,存储器中存储有指令;以及处理器,用于指行指令使电子设备在进入卡模 拟模式后,当电子设备未接收到业务标识时,从多张第一类模拟卡中逐个选择第一类模拟卡进行模拟。In a second aspect, embodiments of the present application provide an electronic device in which card information of multiple first-type analog cards is stored. The electronic device includes: a memory storing instructions; and a processor for instructing Execute the command to make the electronic device enter the card mode. After entering the simulation mode, when the electronic device does not receive the service identification, it selects the first type simulation cards one by one from multiple first type simulation cards for simulation.
在上述第二方面的一种可能实现中,上述从多张第一类模拟卡中逐个选择第一类模拟卡进行模拟,包括:电子设备逐个从多张第一类模拟卡中选择出第一类模拟卡进行卡模拟,直至满足预设终止条件。In a possible implementation of the second aspect, the above-mentioned selection of the first type simulation cards from multiple first type simulation cards one by one for simulation includes: the electronic device selects the first type first simulation cards one by one from the multiple first type simulation cards. Class simulation card performs card simulation until the preset termination conditions are met.
在上述第二方面的一种可能实现中,上述预设终止条件包括以下条件中的任意一个:In a possible implementation of the above second aspect, the above preset termination condition includes any one of the following conditions:
电子设备进行卡模拟的时长超过预设时长;The electronic device performs card emulation for longer than the preset time;
电子设备的NFC功能关闭;The NFC function of the electronic device is turned off;
电子设备检测到刷卡成功;The electronic device detects that the card has been successfully swiped;
电子设备超过预设时长未检测到近场通信信号;The electronic device does not detect near field communication signals for more than the preset time;
电子设备检测到用户的取消刷卡操作或指令。The electronic device detects the user's cancellation operation or instruction.
在上述第二方面的一种可能实现中,上述第一类模拟卡的卡片信息存储于存储器中。In a possible implementation of the above second aspect, the card information of the above first type of simulation card is stored in the memory.
在上述第二方面的一种可能实现中,上述第一类模拟卡的卡片信息,由电子设备在对各第一类模拟卡开卡时,在未获取到业务标识的情况下,存储于存储器中。In a possible implementation of the above second aspect, the card information of the above first type of simulation card is stored in the memory by the electronic device when opening each first type of simulation card without obtaining the business identifier. middle.
在上述第二方面的一种可能实现中,上述电子设备还包括NFC控制器;并且上述从多张第一类模拟卡中逐个选择第一类模拟卡进行模拟,包括:In a possible implementation of the second aspect, the electronic device further includes an NFC controller; and the first-type simulation cards are selected one by one from multiple first-type simulation cards for simulation, including:
电子设备从存储器中逐个获取各第一类模拟卡的卡片信息,并将获取的卡片信息写入到NFC控制器中进行卡模拟。The electronic device obtains the card information of each first-type simulation card one by one from the memory, and writes the obtained card information into the NFC controller for card simulation.
在上述第二方面的一种可能实现中,上述电子设备还包括安全单元SE或嵌入式安全单元eSE;并且,第一类模拟卡的卡片信息存储于安全单元SE或嵌入式安全单元eSE中。In a possible implementation of the second aspect, the electronic device further includes a security unit SE or an embedded security unit eSE; and the card information of the first type of simulated card is stored in the security unit SE or the embedded security unit eSE.
在上述第二方面的一种可能实现中,上述电子设备的可信执行环境中运行有可信应用,电子设备还包括NFC控制器;并且上述从多张第一类模拟卡中逐个选择第一类模拟卡进行模拟,包括:电子设备利用可信应用、安全单元SE或嵌入式安全单元eSE,逐个将第一类模拟卡的卡片信息写入到NFC控制器中进行卡模拟。In a possible implementation of the second aspect, a trusted application is run in the trusted execution environment of the electronic device, and the electronic device further includes an NFC controller; and the first one is selected one by one from multiple first-type simulation cards. Simulation of a class of simulation cards includes: the electronic device uses a trusted application, security unit SE or embedded security unit eSE to write the card information of the first type of simulation card into the NFC controller one by one for card simulation.
在上述第二方面的一种可能实现中,上述卡片信息包括唯一标识符UID;上述业务标识包括应用标识符AID。In a possible implementation of the second aspect, the card information includes a unique identifier UID; the service identifier includes an application identifier AID.
在上述第二方面的一种可能实现中,上述指令被处理器执行时,还使得电子设备在检测到用户在电子设备上预设的操作和/或检测到近场通信信号的情况下,控制电子设备进入卡模拟模式。In a possible implementation of the second aspect, when the above instructions are executed by the processor, the electronic device also causes the electronic device to control the The electronic device enters card emulation mode.
第三方面,本申请实施例提供了一种可读介质,该可读介质上存储有指令,该指令在电子设备上执行时使电子设备实现上述第一方面及上述第一方面的各种可能实现提供的任意一种方法。In a third aspect, embodiments of the present application provide a readable medium that stores instructions. When the instructions are executed on an electronic device, the electronic device enables the electronic device to implement the first aspect and various possibilities of the first aspect. Implement any of the provided methods.
可以理解的是,上述第二方面和第三方面的有益效果可以参见上述第一方面中的相关描述,在此不再赘述。It can be understood that the beneficial effects of the above-mentioned second aspect and the third aspect can be referred to the relevant description in the above-mentioned first aspect, and will not be described again here.
附图说明Description of drawings
图1根据本申请的一些实施例,示出了一种门禁系统00的结构示意图;Figure 1 shows a schematic structural diagram of an access control system 00 according to some embodiments of the present application;
图2根据本申请的一些实施例,示出了一种手机10显示的刷卡界面的示意图;Figure 2 shows a schematic diagram of a card swiping interface displayed by a mobile phone 10 according to some embodiments of the present application;
图3根据本申请的一些实施例,示出了一种基于NFC的刷卡方法的技术架构图;Figure 3 shows a technical architecture diagram of an NFC-based card swiping method according to some embodiments of the present application;
图4根据本申请的一些实施例,示出了一种基于NFC的刷卡方法的流程示意图;Figure 4 shows a schematic flow chart of an NFC-based card swiping method according to some embodiments of the present application;
图5A根据本申请的一些实施例,示出了一种用户通过钱包应用11A设置手机10的默认卡的过程中,手机10显示的钱包应用11A的主界面示意图; Figure 5A shows a schematic diagram of the main interface of the wallet application 11A displayed on the mobile phone 10 when the user sets the default card of the mobile phone 10 through the wallet application 11A according to some embodiments of the present application;
图5B根据本申请的一些实施例,示出了一种用户通过钱包应用11A设置手机10的默认卡的过程中,手机10显示的钱包应用11A的设置界面示意图;Figure 5B shows a schematic diagram of the setting interface of the wallet application 11A displayed on the mobile phone 10 when the user sets the default card of the mobile phone 10 through the wallet application 11A according to some embodiments of the present application;
图5C根据本申请的一些实施例,示出了一种用户通过钱包应用11A设置手机10的默认卡的过程中,手机10显示的钱包应用11A的刷卡设置界面示意图;Figure 5C shows a schematic diagram of the card swiping setting interface of the wallet application 11A displayed on the mobile phone 10 when the user sets the default card of the mobile phone 10 through the wallet application 11A according to some embodiments of the present application;
图5D根据本申请的一些实施例,示出了一种用户通过钱包应用11A设置手机10的默认卡的过程中,手机10显示的钱包应用11A的默认卡设置界面示意图;Figure 5D shows a schematic diagram of the default card setting interface of the wallet application 11A displayed on the mobile phone 10 when the user sets the default card of the mobile phone 10 through the wallet application 11A according to some embodiments of the present application;
图6根据本申请的一些实施例,示出了一种手机10显示的刷卡失败界面示意图;Figure 6 shows a schematic diagram of a card swiping failure interface displayed by the mobile phone 10 according to some embodiments of the present application;
图7根据本申请的一些实施例,示出了另一种基于NFC的刷卡方法的技术架构示意图;Figure 7 shows a schematic technical architecture diagram of another NFC-based card swiping method according to some embodiments of the present application;
图8根据本申请的一些实施例,示出了另一种基于NFC的刷卡方法的流程示意图;Figure 8 shows a schematic flow chart of another NFC-based card swiping method according to some embodiments of the present application;
图9根据本申请的一些实施例,示出了利用NFC空口抓包工具获取的手机10在自动切换门禁卡的过程中手机10传递的数据的一种日志示意图;Figure 9 shows a schematic log diagram of the data transmitted by the mobile phone 10 during the process of automatically switching access control cards obtained by using the NFC air interface packet capture tool according to some embodiments of the present application;
图10根据本申请的一些实施例,示出了一种手机10通过eSE 13终止激活/激活模拟卡、从存储器103读取模拟卡的卡片信息并写入NFC控制器14时,手机10的电池的电流的变化情况;Figure 10 shows a battery of the mobile phone 10 when the mobile phone 10 terminates activation/activation of the simulated card through the eSE 13, reads the card information of the simulated card from the memory 103 and writes it to the NFC controller 14, according to some embodiments of the present application. changes in current;
图11根据本申请的一些实施例,示出了又一种基于NFC的刷卡方法的技术架构示意图;Figure 11 shows a schematic technical architecture diagram of yet another NFC-based card swiping method according to some embodiments of the present application;
图12根据本申请的一些实施例,示出了又一种基于NFC的刷卡方法的流程示意图;Figure 12 shows a schematic flow chart of yet another NFC-based card swiping method according to some embodiments of the present application;
图13根据本申请的一些实施例,示出了一种近场通信模拟卡开卡方法的流程示意图;Figure 13 shows a schematic flow chart of a near field communication simulation card opening method according to some embodiments of the present application;
图14A根据本申请的一些实施例,示出了一种手机10进入开卡模式过程中,手机10显示的钱包应用11A的主界面示意图;Figure 14A shows a schematic diagram of the main interface of the wallet application 11A displayed on the mobile phone 10 when the mobile phone 10 enters the card opening mode according to some embodiments of the present application;
图14B根据本申请的一些实施例,示出了一种手机10进入开卡模式过程中,手机10显示的钱包应用11A的卡包界面示意图;Figure 14B shows a schematic diagram of the card package interface of the wallet application 11A displayed on the mobile phone 10 when the mobile phone 10 enters the card opening mode according to some embodiments of the present application;
图14C根据本申请的一些实施例,示出了一种手机10进入开卡模式过程中,手机10显示的钱包应用11A的添加卡片界面示意图;Figure 14C shows a schematic diagram of the card-adding interface of the wallet application 11A displayed on the mobile phone 10 when the mobile phone 10 enters the card opening mode according to some embodiments of the present application;
图14D根据本申请的一些实施例,示出了一种手机10进入开卡模式过程中,手机10显示的钱包应用11A的添加钥匙界面示意图;Figure 14D shows a schematic diagram of the key-adding interface of the wallet application 11A displayed on the mobile phone 10 when the mobile phone 10 enters the card opening mode according to some embodiments of the present application;
图14E根据本申请的一些实施例,示出了一种手机10进入开卡模式过程中,手机10显示的钱包应用11A的模拟门禁卡界面示意图;Figure 14E shows a schematic diagram of the simulated access card interface of the wallet application 11A displayed on the mobile phone 10 when the mobile phone 10 enters the card opening mode according to some embodiments of the present application;
图15根据本申请的一些实施例,示出了另一种近场通信模拟卡开卡方法的流程示意图;Figure 15 shows a schematic flow chart of another near field communication simulation card opening method according to some embodiments of the present application;
图16根据本申请的一些实施例,示出了又一种近场通信模拟卡开卡方法的流程示意图;Figure 16 shows a schematic flow chart of yet another near field communication simulation card opening method according to some embodiments of the present application;
图17根据本申请的一些实施例,示出了一种手机10的结构示意图。Figure 17 shows a schematic structural diagram of a mobile phone 10 according to some embodiments of the present application.
具体实施方式Detailed ways
本申请的说明性实施例包括但不限于基于NFC的刷卡方法、可读介质和电子设备。Illustrative embodiments of the present application include, but are not limited to, NFC-based card swiping methods, readable media, and electronic devices.
下面结合附图进行说明本申请实施例的技术方案。The technical solutions of the embodiments of the present application will be described below with reference to the accompanying drawings.
可以理解,本申请实施例提供的基于NFC的刷卡方法,适用于任意可以通过NFC功能来模拟实体卡的电子设备,包括但不限于手机,膝上型计算机、平板计算机、可穿戴设备、头戴式显示器、移动电子邮件设备、便携式游戏机、便携式音乐播放器、阅读器设备等,本申请实施例不做限定。为便于描述,以下以可以通过NFC功能来模拟实体卡的电子设备为手机10进行介绍。It can be understood that the NFC-based card swiping method provided by the embodiment of the present application is applicable to any electronic device that can simulate a physical card through the NFC function, including but not limited to mobile phones, laptop computers, tablet computers, wearable devices, and headsets. display, mobile email device, portable game console, portable music player, reader device, etc., the embodiments of this application are not limited. For ease of description, the following introduction takes the mobile phone 10 as an electronic device that can simulate a physical card through the NFC function.
可以理解,本申请实施例提供的基于NFC的刷卡方法,适用于任意通过电子设备的NFC功能来模拟实体卡的场景,例如模拟门禁卡、会员卡等。为便于描述,以下以门禁卡为例介绍本申请实施例的技术方案。 It can be understood that the NFC-based card swiping method provided by the embodiment of the present application is suitable for any scenario where the NFC function of an electronic device is used to simulate a physical card, such as simulating access control cards, membership cards, etc. For the convenience of description, the following uses an access control card as an example to introduce the technical solutions of the embodiments of the present application.
图1根据本申请的一些实施例,示出了一种门禁系统00的结构示意图。Figure 1 shows a schematic structural diagram of an access control system 00 according to some embodiments of the present application.
如图1所示,门禁系统00包括NFC读卡器01、门控制器02和门03。在手机10模拟门禁卡靠近NFC读卡器01时,NFC读卡器01获取手机10模拟的门禁卡的唯一标识符(unique identifier,UID),并将获取的UID发送给门控制器02;门控制器02接收到UID后,将UID与预先存储的UID白名单中的各UID进行对比,若接收到的UID存在于UID白名单中,说明该UID具有门03的通行权限,门控制器02打开门03;否则,说明该UID不具备门03的通行权限,保持门03关闭。As shown in Figure 1, the access control system 00 includes an NFC reader 01, a door controller 02 and a door 03. When the simulated access card of the mobile phone 10 is close to the NFC card reader 01, the NFC card reader 01 obtains the unique identifier (UID) of the simulated access card of the mobile phone 10 and sends the obtained UID to the door controller 02; the door After controller 02 receives the UID, it compares the UID with each UID in the pre-stored UID white list. If the received UID exists in the UID white list, it means that the UID has the access authority of door 03. Door controller 02 Open door 03; otherwise, it means that the UID does not have the permission to pass door 03, and keep door 03 closed.
如前所述,由于门禁卡并不具有统一的AID,在手机10中只存储有一张不具备AID的模拟卡时,手机10可以在未接收到AID时通过NFC来模拟该卡片。但是,在手机10中存储有多张不具备AID的模拟卡时,手机10不能确定出当前场景对应的模拟卡,而需要由用户手动选择待模拟的模拟卡。例如,参考图2,手机10在未接收到AID且手机10中存储有多张不具备AID的模拟卡的情况下,会显示图2所示的界面,用户需要通过在手机10上的操作,例如上下滑动操作、点击操作等,来选择手机10模拟的模拟卡,影响用户刷卡体验。As mentioned above, since the access control card does not have a unified AID, when only one simulation card without AID is stored in the mobile phone 10, the mobile phone 10 can simulate the card through NFC when it does not receive the AID. However, when there are multiple simulation cards without AID stored in the mobile phone 10, the mobile phone 10 cannot determine the simulation card corresponding to the current scene, and the user needs to manually select the simulation card to be simulated. For example, referring to Figure 2, when the mobile phone 10 does not receive AID and there are multiple simulation cards without AID stored in the mobile phone 10, the interface shown in Figure 2 will be displayed. The user needs to perform operations on the mobile phone 10. For example, sliding up and down, clicking, etc., to select the simulated card simulated by mobile phone 10 will affect the user's card swiping experience.
有鉴于此,本申请实施例提供了一种基于NFC的刷卡方法,手机10靠近NFC读卡器01时,若未接收到NFC读卡器01发送的AID,则逐一将手机10中存储的、不具备AID的模拟卡的卡片信息写入到手机10的NFC控制器中,直到刷卡成功(例如门03打开)或用户取消刷卡。如此,即便门禁卡不具有统一的AID,手机10也可以自动选择手机10中存储的模拟卡来完成刷卡,而无需用户手动进行选择,提升了用户体验。In view of this, the embodiment of the present application provides a card swiping method based on NFC. When the mobile phone 10 is close to the NFC card reader 01, if the AID sent by the NFC card reader 01 is not received, the AID stored in the mobile phone 10 will be swiped one by one. The card information of the simulated card without AID is written into the NFC controller of the mobile phone 10 until the card is swiped successfully (for example, door 03 is opened) or the user cancels the card swipe. In this way, even if the access control card does not have a unified AID, the mobile phone 10 can automatically select the simulated card stored in the mobile phone 10 to complete the card swiping without the user having to manually select, which improves the user experience.
可以理解,模拟卡的卡片信息包括但不限于模拟卡的UID、选择确认(Select Acknowledge,SAK)标识。其中,UID可以用于唯一标识一张模拟卡。SAK可以用于指示模拟卡的卡片类型,例如,对于SAK=08的卡片可以为门禁卡,对于SAK=20的卡片可以为交通卡、银行卡等。此外,具有不同SAK的模拟卡可以具有不同长度和/或类型的UID。在一些实施例中,NFC读卡设备可以根据接收到的SAK,来确定接收UID的长度或类型。It can be understood that the card information of the simulated card includes but is not limited to the UID and Select Acknowledge (SAK) identification of the simulated card. Among them, UID can be used to uniquely identify a simulation card. SAK can be used to indicate the card type of the simulated card. For example, a card with SAK=08 can be an access control card, and a card with SAK=20 can be a transportation card, bank card, etc. Additionally, emulated cards with different SAKs can have different lengths and/or types of UIDs. In some embodiments, the NFC card reading device may determine the length or type of the received UID based on the received SAK.
可以理解,手机10中存储的模拟卡的卡片信息,可以利用手机10中的NFC管理应用程通过读取实体卡的卡片信息来获取,具体过程将在后文结合具体的技术架构进行描述,在此不做赘述。It can be understood that the card information of the simulated card stored in the mobile phone 10 can be obtained by using the NFC management application in the mobile phone 10 to read the card information of the physical card. The specific process will be described later in conjunction with the specific technical architecture. This will not be described in detail.
具体地,图3根据本申请的一些实施例,示出了一种基于NFC的刷卡方法的技术架构图。Specifically, FIG. 3 shows a technical architecture diagram of an NFC-based card swiping method according to some embodiments of the present application.
如图3所示,手机10的软件环境包括通用执行环境(Rich Execution Environment,REE)11和可信执行环境(Trusted Execution Environment,TEE)12。其中,REE 11可以用于运行通用操作系统,例如安卓TM、IOSTM、鸿蒙TM等,通用操作系统可以用于运行安全性需求低的应用程序/服务,例如钱包应用11A、NFC服务11B等,或存储安全要求较低的数据。TEE 12可以用于运行安全性高的操作系统,例如可信操作系统(Trusted Operating System,Trusted OS)、卡片操作系统(Card Operating System,COS)等,可信操作系统用于运行可信应用(Trusted Application,TA),例如钱包应用对应的可信应用(以下称为钱包应用TA)12A、与支付/生物识别/安全验证相关的应用或服务等,或用于存储安全要求较高的数据,例如密钥、生物识别信息、模拟卡的卡片信息等。As shown in Figure 3, the software environment of the mobile phone 10 includes a rich execution environment (Rich Execution Environment, REE) 11 and a trusted execution environment (Trusted Execution Environment, TEE) 12. Among them, REE 11 can be used to run general-purpose operating systems, such as Android TM , IOS TM , Hongmeng TM , etc. The general-purpose operating system can be used to run applications/services with low security requirements, such as wallet application 11A, NFC service 11B, etc. Or store data with lower security requirements. TEE 12 can be used to run highly secure operating systems, such as Trusted Operating System (Trusted OS), Card Operating System (COS), etc. The Trusted Operating System is used to run trusted applications ( Trusted Application (TA), such as the trusted application corresponding to the wallet application (hereinafter referred to as wallet application TA) 12A, applications or services related to payment/biometrics/security verification, etc., or used to store data with high security requirements, For example, keys, biometric information, card information of simulated cards, etc.
手机10与NFC相关的硬件可以包括eSE 13和NFC控制器14。The NFC-related hardware of the mobile phone 10 may include the eSE 13 and the NFC controller 14.
其中,eSE 13可以用于存储模拟卡(例如图3所示的卡A1、卡A2和卡B1等)的卡片信息,并根据TEE 12中的可信应用的指令,将存储的模拟卡的卡片信息写入到NFC控制器14中,或从NFC控制器14中获取当前靠近NFC控制器14的实体卡的卡片信息,并存储在eSE 13中。在另一些实施例中,eSE 13也可以是其他类型的用于存储安全需要较高的数据的硬件,例如安全单元(Secure Element,SE)等,在此不做限定。 Among them, eSE 13 can be used to store card information of simulated cards (such as card A1, card A2, card B1, etc. shown in Figure 3), and according to the instructions of the trusted application in TEE 12, store the card information of simulated cards. The information is written into the NFC controller 14 , or the card information of the physical card currently close to the NFC controller 14 is obtained from the NFC controller 14 , and stored in the eSE 13 . In other embodiments, the eSE 13 may also be other types of hardware used to store data with high security requirements, such as a security element (Secure Element, SE), etc., which is not limited here.
可以理解,在一些实施例中,eSE 13还可以用于运行Java小程序(Java Applet),用于根据TEE 12中的可信应用的指令向NFC控制器14写入模拟卡的卡片信息。It can be understood that in some embodiments, the eSE 13 can also be used to run a Java applet to write the card information of the simulated card to the NFC controller 14 according to the instructions of the trusted application in the TEE 12.
可以理解,另在一些实施例中,eSE 13还可以用于运行Java小程序(Java Applet),用于根据TEE 12中的可信应用也可以通过eSE 13来读取实体卡的卡片信息。It can be understood that in some embodiments, the eSE 13 can also be used to run a Java applet, which is used to read the card information of the physical card through the eSE 13 according to the trusted application in the TEE 12.
NFC控制器14可以用于在检测到近场通信信号时,例如检测到NFC读卡器01的近场通信信号时,向REE 11中的应用程序,例如钱包应用11A和/或NFC服务11B发送触发本申请实施例提供的基于NFC的刷卡方法的触发指令。NFC控制器14也可以用于在读取到卡片信息时将卡片信息发送给eSE 13。NFC控制器14还可以用于在接收到eSE 13发送的卡片信息后,将卡片信息通过NFC技术发送给读卡设备,例如发送给NFC读卡器01,实现刷卡。The NFC controller 14 may be configured to send a message to an application in the REE 11, such as the wallet application 11A and/or the NFC service 11B, when a near field communication signal is detected, such as a near field communication signal of the NFC card reader 01. A triggering instruction that triggers the NFC-based card swiping method provided by the embodiment of the present application. The NFC controller 14 can also be used to send the card information to the eSE 13 when the card information is read. The NFC controller 14 can also be used to send the card information to a card reading device through NFC technology after receiving the card information sent by the eSE 13, for example, to the NFC card reader 01 to realize card swiping.
可以理解,图3所示的技术架构图只是一种示例,在另一些实施例中,手机10可以包括更多或更少的执行环境/硬件,也可以拆分或组合部分执行环境的功能/硬件,本申请实施例不做限定。It can be understood that the technical architecture diagram shown in Figure 3 is only an example. In other embodiments, the mobile phone 10 may include more or less execution environments/hardware, and the functions/hardware of part of the execution environments may also be split or combined. Hardware is not limited in the embodiments of this application.
下面结合图1所示的场景和图3所示的技术架构图,介绍本申请实施例提供的基于NFC的刷卡方法。The following describes the NFC-based card swiping method provided by the embodiment of the present application based on the scenario shown in Figure 1 and the technical architecture diagram shown in Figure 3.
具体地,图4根据本申请的一些实施例,示出了一种基于NFC的刷卡方法的流程示意图。该流程的执行主体为手机10,如图4所示,该流程包括如下步骤。Specifically, FIG. 4 shows a schematic flow chart of an NFC-based card swiping method according to some embodiments of the present application. The execution subject of this process is the mobile phone 10. As shown in Figure 4, the process includes the following steps.
S401:检测到刷卡触发指令。S401: A card swipe trigger instruction is detected.
手机10在检测到刷卡触发指令的情况下,触发本申请实施例提供的基于NFC的刷卡方法。具体地,在一些实施例中,手机10可以利用手机10中的应用程序/服务来检测刷卡触发指令,例如前述钱包应用11A、NFC服务11B等。When the mobile phone 10 detects the card swiping triggering instruction, it triggers the NFC-based card swiping method provided by the embodiment of the present application. Specifically, in some embodiments, the mobile phone 10 can use an application/service in the mobile phone 10 to detect the card swipe triggering instruction, such as the aforementioned wallet application 11A, NFC service 11B, etc.
在一些实施例中,参考图1,在手机10靠近NFC读卡器01的情况下,NFC控制器14检测到近场通信信号的情况下,手机10可以检测到刷卡触发指令。在另一些实施例中,手机10可以在检测到用户在手机10上的用于刷卡的操作,例如检测用户在手机10熄屏的情况下连续两次按下手机10的电源键的情况下,检测到刷卡触发指令。In some embodiments, referring to FIG. 1 , when the mobile phone 10 is close to the NFC card reader 01 and the NFC controller 14 detects a near field communication signal, the mobile phone 10 can detect the card swipe triggering instruction. In other embodiments, the mobile phone 10 can detect the user's operation for swiping the card on the mobile phone 10, for example, detecting that the user presses the power button of the mobile phone 10 twice in succession when the screen of the mobile phone 10 is turned off. A card swipe trigger command is detected.
可以理解,在另一些实施例中,刷卡触发指令也可以是其他指令,例如语音指令、根据手机10的位置触发的指令等,本申请实施例对手机10检测到刷卡触发指令的形式不做限定。It can be understood that in other embodiments, the card swipe triggering instruction can also be other instructions, such as voice instructions, instructions triggered according to the location of the mobile phone 10 , etc. The embodiments of the present application do not limit the form in which the card swiping triggering instruction is detected by the mobile phone 10 .
可以理解,在一些实施例中,手机10检测到刷卡触发指令后,可以激活手机10的默认卡。其中,默认卡可以是用户在手机10用于管理NFC模拟卡的应用程序(例如钱包应用11A)中设置的默认模拟卡,也可以是手机10上一次刷卡时使用的模拟卡,还可以是手机10根据手机10的位置、应用场景确定的模拟卡,在此不做限定。手机10在NFC功能激活时,会首先激活默认卡。It can be understood that in some embodiments, after the mobile phone 10 detects the card swiping triggering instruction, the default card of the mobile phone 10 can be activated. Among them, the default card can be the default simulation card set by the user in the application (such as wallet application 11A) used by the mobile phone 10 to manage the NFC simulation card, or it can be the simulation card used when the mobile phone 10 last swiped the card, or it can also be the mobile phone 10. 10 The simulation card determined based on the location and application scenario of the mobile phone 10 is not limited here. When the NFC function is activated on Mobile Phone 10, the default card will be activated first.
在一些实施例中,用户可以通过钱包应用11A来设置手机10的默认卡。In some embodiments, the user can set the default card of the phone 10 through the wallet application 11A.
例如,图5A至图5D,示出了用户通过钱包应用11A设置手机10的默认卡的过程中,手机10显示的钱包应用11A的界面示意图。参考图5A至图5D,用户可以先通过对图5A所示的“我的”控件51的点击操作,进入图5B所示的设置界面;再通过对图5B所示的“刷卡设置”控件52的点击操作,进入图5C所示的刷卡设置界面;然后通过对图5C所示的“默认卡”控件53的点击操作,进入图5D所示的默认卡设置界面;最后在图5D所示的默认卡设置界面选择手机10的默认卡,例如通过点击“智闪卡”控件54,选择智闪卡作为手机10的默认卡。For example, FIGS. 5A to 5D show a schematic interface diagram of the wallet application 11A displayed on the mobile phone 10 when the user sets the default card of the mobile phone 10 through the wallet application 11A. Referring to Figures 5A to 5D, the user can first enter the setting interface shown in Figure 5B by clicking on the "My" control 51 shown in Figure 5A; and then click on the "Card Swipe Settings" control 52 shown in Figure 5B Click to enter the card setting interface shown in Figure 5C; then click on the "default card" control 53 shown in Figure 5C to enter the default card setting interface shown in Figure 5D; finally, click on the "default card" control 53 shown in Figure 5C Select the default card of the mobile phone 10 in the default card setting interface. For example, by clicking the "Smart Flash Card" control 54, select the Smart Flash Card as the default card of the mobile phone 10.
可以理解,在手机10选择了“智闪卡”作为默认卡后,手机10可以根据不同的场景自动设置不同的默认卡,例如以手机10上一次使用的模拟卡作为默认卡,又例如根据手机10所处的地理位置,选择用户在该地理位置常使用的模拟卡作为默认卡等。It can be understood that after the mobile phone 10 selects "Smart Flash Card" as the default card, the mobile phone 10 can automatically set different default cards according to different scenarios. For example, the last simulated card used by the mobile phone 10 is used as the default card, or according to the mobile phone 10 10. The geographical location where the user is located, selects the simulation card frequently used by the user in that geographical location as the default card, etc.
可以理解,在另一些实施例中,用户也可以通过其他方式来设置手机10的默认卡,在此不做限定。 It can be understood that in other embodiments, the user can also set the default card of the mobile phone 10 through other methods, which is not limited here.
S402:判断是否检测到近场通信信号。如果检测到近场通信信号,说明手机10已经靠近NFC读卡设备,例如前述NFC读卡器01;否则,重复步骤S402。S402: Determine whether a near field communication signal is detected. If a near field communication signal is detected, it means that the mobile phone 10 has been close to the NFC card reader device, such as the aforementioned NFC card reader 01; otherwise, step S402 is repeated.
具体地,在一些实施例中,手机10的NFC控制器14在检测到近场通信信号的情况下,可以向钱包应用11A或NFC服务11B发送检测到近场通信信号的信息。Specifically, in some embodiments, when the NFC controller 14 of the mobile phone 10 detects a near field communication signal, it may send information that the near field communication signal is detected to the wallet application 11A or the NFC service 11B.
可以理解,在一些实施例中,手机10也可以不判断是否检测到近场通信信号,而是在执行完步骤S401后直接转至步骤S403,在此不做限定。It can be understood that in some embodiments, the mobile phone 10 may not determine whether a near field communication signal is detected, but directly go to step S403 after executing step S401, which is not limited here.
S403:判断是否接收到AID。如果接收到AID,说明当前刷卡场景是具备AID的场景、例如刷交通卡、银行卡等场景,转至步骤S404;否则,说明当前场景是不具备AID的场景,转至步骤S405。S403: Determine whether AID is received. If AID is received, it means that the current card swiping scene is a scene with AID, such as a transportation card, bank card, etc. scene, and go to step S404; otherwise, it means that the current scene is a scene without AID, and go to step S405.
可以理解,对于具备AID的场景,例如通过手机10模拟银行卡、交通卡的场景,对应的读卡设备(例如前述NFC读卡器01)在检测到具有NFC功能的设备时,例如检测到近场通信信号时,可以主动通过NFC技术发送该场景对应的AID,以便于具有NFC功能的电子设备可以根据AID选择对应的模拟卡来完成刷卡。It can be understood that for scenarios with AID, such as scenarios where the mobile phone 10 simulates a bank card or a transportation card, when the corresponding card reading device (such as the aforementioned NFC card reader 01) detects a device with an NFC function, for example, when a nearby card is detected, When communicating in the field, the AID corresponding to the scene can be actively sent through NFC technology, so that the electronic device with NFC function can select the corresponding simulation card based on the AID to complete the card swiping.
S404:判断手机10中是否存在接收到的AID。S404: Determine whether the received AID exists in the mobile phone 10.
手机10在接收到AID的情况下,检测手机10中是否存在接收到的AID。如果手机10中存在该AID,说明手机10中存在该AID对应的模拟卡,转至步骤S405;否则说明手机10中不存在该AID对应的模拟卡,转至步骤S406。When the mobile phone 10 receives the AID, it detects whether the received AID exists in the mobile phone 10 . If the AID exists in the mobile phone 10, it means that there is a simulation card corresponding to the AID in the mobile phone 10, and go to step S405; otherwise, it means that the simulation card corresponding to the AID does not exist in the mobile phone 10, and go to step S406.
例如,在一些实施例中,手机10中具备AID的卡片的AID列表可以存储于前述eSE 13中,从而由手机10的TEE 12中的可信应用,例如钱包应用TA 12A来判断手机10中是否存在接收到的AID。For example, in some embodiments, the AID list of cards with AID in the mobile phone 10 can be stored in the aforementioned eSE 13, so that a trusted application in the TEE 12 of the mobile phone 10, such as the wallet application TA 12A, determines whether the card in the mobile phone 10 There is a received AID.
又例如,在另一些实施例中,手机10中存储的具备AID的模拟片的AID列表也可以存储于手机10的存储器中,从而由手机10的REE 11中的应用程序/服务,例如钱包应用11A、NFC服务11B,来判断手机10中是否存在接收到的AID。本申请实施例对AID列表存储的位置不做限定。For example, in other embodiments, the AID list of simulated tablets with AID stored in the mobile phone 10 can also be stored in the memory of the mobile phone 10, so that the application/service in the REE 11 of the mobile phone 10, such as a wallet application, can 11A and NFC service 11B to determine whether the received AID exists in the mobile phone 10 . The embodiment of the present application does not limit the location where the AID list is stored.
S405:基于TEE 12和eSE 13终止默认卡的激活状态,并激活接收到的AID对应的模拟卡。S405: Terminate the activation state of the default card based on TEE 12 and eSE 13, and activate the simulation card corresponding to the received AID.
手机10在确定出手机10中存在接收到的AID的情况下,去基于TEE 12和eSE 1终止默认卡的激活状态,并激活接收到的AID对应的模拟片。After determining that the received AID exists in the mobile phone 10, the mobile phone 10 terminates the activation state of the default card based on the TEE 12 and eSE 1, and activates the analog chip corresponding to the received AID.
在一些实施例中,手机10可以先通过钱包应用TA 12A与eSE 13、NFC控制器14交互,例如由钱包应用TA 12A向eSE 13发送终止默认卡的激活状态的指令;并在默认卡的激活状态已终止的情况下,再通过预设的接口,例如开放移动应用程序接口(Open Mobile Application Programming Interface,OMAPI),与eSE 13进行交互,例如向NFC控制器14写入接收到的AID对应的模拟卡的卡片信息,以激活该模拟卡。也即是说,在图3所示的技术架构下,手机10每激活一张模拟卡,都要先终止当前已激活的模拟卡(例如默认卡)的激活状态,再激活待激活的模拟卡(例如将待模拟的模拟卡的卡片信息写入到NFC控制器14中)。在手机10激活一张模拟卡的过程中,需要通过TEE 12中的可信应用多次与eSE 13和/或NFC控制器14交互。In some embodiments, the mobile phone 10 can first interact with the eSE 13 and the NFC controller 14 through the wallet application TA 12A. For example, the wallet application TA 12A sends an instruction to terminate the activation state of the default card to the eSE 13; and after the activation of the default card When the status has been terminated, interact with the eSE 13 through a preset interface, such as the Open Mobile Application Programming Interface (OMAPI), such as writing the received AID corresponding to the NFC controller 14 Card information of the simulated card to activate the simulated card. That is to say, under the technical architecture shown in Figure 3, every time the mobile phone 10 activates a simulation card, it must first terminate the activation state of the currently activated simulation card (such as the default card), and then activate the simulation card to be activated. (For example, write the card information of the simulated card to be simulated into the NFC controller 14). In the process of activating an emulated card on the mobile phone 10, it is necessary to interact with the eSE 13 and/or the NFC controller 14 multiple times through the trusted application in the TEE 12.
S406:提示刷卡失败。S406: Prompt that card swiping failed.
手机10在确定出手机10中不存在接收到的AID的情况下,提示用户刷卡失败。例如,在一些实施例中,手机10可以显示图6所示的提示框61,提示用户“刷卡失败,请重试”。When the mobile phone 10 determines that the received AID does not exist in the mobile phone 10, it prompts the user that the card swiping failed. For example, in some embodiments, the mobile phone 10 can display the prompt box 61 shown in FIG. 6 to prompt the user to "Failed to swipe the card, please try again."
可以理解,在另一些实施例中,手机10也可以通过其他形式提示用户刷卡失败,例如播放刷卡失败的音效、语音等,本申请实施例对提示刷卡失败的具体形式不做限定。It can be understood that in other embodiments, the mobile phone 10 can also prompt the user to fail to swipe the card through other forms, such as playing sound effects, voices, etc. for failure to swipe the card. The embodiments of the present application do not limit the specific form of prompting the user to fail to swipe the card.
S407:判断手机10中是否存在不具备AID的模拟卡。如果手机10中存在不具备AID的模拟卡,说明手机10中可能存在当前场景对应的不具备AID的模拟卡,转至步骤S408;否则,说明手机10中不 存在当前场景对应的不具备AID的模拟卡,转至步骤S406。S407: Determine whether there is a simulation card without AID in the mobile phone 10. If there is a simulation card without AID in the mobile phone 10, it means that there may be a simulation card without AID corresponding to the current scene in the mobile phone 10, and go to step S408; otherwise, it means that there is no simulation card in the mobile phone 10. If there is a simulation card without AID corresponding to the current scene, go to step S406.
在一些实施例中,手机10可以通过判断eSE 13中存储的各模拟卡是否都具备AID来确定手机10中是否存在不具备AID的模拟卡,在eSE 13中存在有模拟卡不具备AID的情况下,确定手机10中存在不具备AID的模拟卡。In some embodiments, the mobile phone 10 can determine whether there is a simulation card that does not have an AID in the mobile phone 10 by determining whether each simulation card stored in the eSE 13 has an AID. In the eSE 13, there is a situation where the simulation card does not have an AID. Next, confirm that there is a simulation card without AID in the mobile phone 10.
在另一些实施例中,手机10还可以根据手机10中存储的模拟卡的卡片类型标识,例如选择确认(Select Acknowledge,SAK)标识,确定手机10中是否存在不具备AID的模拟卡。例如,在一些实施例中,手机10可以在手机10中存在SAK=08的模拟卡时,确定手机10中存在不具备AID的模拟卡。In other embodiments, the mobile phone 10 can also determine whether there is a simulation card without AID in the mobile phone 10 based on the card type identification of the simulation card stored in the mobile phone 10, such as the Select Acknowledge (SAK) identification. For example, in some embodiments, the mobile phone 10 may determine that there is a simulation card without AID in the mobile phone 10 when there is a simulation card with SAK=08 in the mobile phone 10 .
可以理解,手机10也可以采用其他方式来确定手机10中是否存在不具备AID的模拟卡,在此不做限定。It can be understood that the mobile phone 10 can also use other methods to determine whether there is a simulation card without AID in the mobile phone 10, which is not limited here.
可以理解,具备AID不具备AID的模拟卡可以是门禁卡、会员卡等,也可以是其他的模拟卡,在此不做限定。It can be understood that the simulation card with or without AID can be an access control card, a membership card, etc., or other simulation cards, which are not limited here.
S408:基于TEE 12和eSE 13终止当前卡的激活状态,并选择一张不具备AID的模拟卡激活。S408: Terminate the activation status of the current card based on TEE 12 and eSE 13, and select a simulated card without AID for activation.
手机10在手机10中存在多张不具备AID的模拟卡的情况下,基于TEE 12和eSE 13终止当前激活的模拟卡的激活状态,并选择不具备AID的模拟卡中的其中一张激活。When there are multiple simulation cards without AID in the mobile phone 10, the activation state of the currently activated simulation card is terminated based on TEE 12 and eSE 13, and one of the simulation cards without AID is selected for activation.
可以理解,在手机10激活一张不具备AID的模拟卡后,可以将该张不具备AID的模拟卡标记为已激活过,以便于下一次选择激活的不具备AID的模拟卡时不重复选择该张张不具备AID的模拟卡,以提升切换速度。It can be understood that after the mobile phone 10 activates a simulation card without AID, the simulation card without AID can be marked as activated, so that the next time you select an activated simulation card without AID, you will not repeat the selection. This is a simulation card without AID to increase switching speed.
可以理解,当前卡可以是手机10的默认卡,也可以是手机10上一次激活的模拟卡。It can be understood that the current card can be the default card of the mobile phone 10, or it can be the simulated card that was last activated by the mobile phone 10.
在一些实施例中,手机10选择多张不具备AID的模拟卡中的一张激活时,可以按照各不具备AID的模拟卡的存储顺序来选择,也可以根据不具备AID的模拟卡的使用频率来选择,还可以根据手机10的当前位置来选择。可以理解,在另一些实施例中,手机10也可以采用其他方式选择不具备AID的模拟卡中的一张激活,例如随机选择一张未激活过的不具备AID的模拟卡激活,在此不做限定。In some embodiments, when the mobile phone 10 selects one of the multiple simulated cards without AID to activate, it can select according to the storage order of the simulated cards without AID, or according to the use of the simulated cards without AID. Frequency selection can also be selected based on the current location of the mobile phone 10. It can be understood that in other embodiments, the mobile phone 10 can also use other methods to select one of the simulation cards without AID for activation, such as randomly selecting an unactivated simulation card without AID for activation, which is not the case here. Make limitations.
具体地,手机10可以通过手机10中的可信应用,例如钱包应用TA 12A,向NFC控制器14发送终止激活指令和激活指令,NFC控制器14在接收到终止激活指令/激活指令后,终止当前已激活的模拟卡的激活状态/或激活选择出的不具备AID的模拟卡。Specifically, the mobile phone 10 can send a termination activation instruction and an activation instruction to the NFC controller 14 through a trusted application in the mobile phone 10, such as the wallet application TA 12A. After receiving the activation termination instruction/activation instruction, the NFC controller 14 terminates The activation status of the currently activated simulation card/or activate the selected simulation card without AID.
S409:判断是否满足终止条件。如果确定出满足终止条件,结束本次刷卡;否则,转至步骤S410进一步判断。S409: Determine whether the termination conditions are met. If it is determined that the termination condition is met, end this card swiping session; otherwise, go to step S410 for further judgment.
在一些实施例中,终止条件可以包括以下条件中的至少一个:手机10超过预设等待时长未检测到近场通信信号(即手机10已远离NFC读卡器01)、手机10的NFC功能已关闭、本次刷卡已超过预设刷卡时长、刷卡成功、手机10检测到用户在手机10上的取消刷卡的操作或指令。In some embodiments, the termination condition may include at least one of the following conditions: the mobile phone 10 does not detect a near field communication signal beyond the preset waiting time (that is, the mobile phone 10 has moved away from the NFC card reader 01), the NFC function of the mobile phone 10 has expired. Closed, the current card swiping time has exceeded the preset card swiping time, the card swiping is successful, and the mobile phone 10 detects the user's operation or instruction to cancel the card swiping on the mobile phone 10.
S410:判断是否已激活过所有不具备AID的模拟卡。如果确定出已经激活过所有不具备AID的模拟卡,说明本次刷卡失败,转至步骤S406;否则,转至步骤S408,激活下一张不具备AID的模拟卡。S410: Determine whether all simulation cards without AID have been activated. If it is determined that all the simulation cards without AID have been activated, it means that the card swiping failed this time, and go to step S406; otherwise, go to step S408 to activate the next simulation card without AID.
可以理解,在另一些实施例中,在手机10确定出已激活过所有不具备AID的模拟卡的情况下,若依然检测到有近场通信信号,可以清除所有不具备AID的模拟卡的已激活过的标记,重新逐一激活各不具备AID的模拟卡尝试刷卡,以避免在手机10激活正确的模拟卡时由于其他原因导致刷卡失败情况,增加刷卡的成功率。It can be understood that in other embodiments, when the mobile phone 10 determines that all simulation cards without AID have been activated, if a near field communication signal is still detected, all the simulated cards without AID can be cleared. Activated marks, re-activate the simulated cards without AID one by one and try to swipe the card, so as to avoid card swiping failure due to other reasons when the mobile phone 10 activates the correct simulated card and increase the success rate of swiping the card.
可以理解,前述步骤S401至步骤S410的执行顺序只是一种示例,在另一些实施例中,可以调整部分步骤的执行顺序,也可以合并或拆分部分步骤,还可以增加或删除部分步骤,本申请实施例不做限定。It can be understood that the execution order of steps S401 to S410 is just an example. In other embodiments, the execution order of some steps can be adjusted, some steps can be merged or split, and some steps can also be added or deleted. The application examples are not limiting.
通过本申请实施例提供的方法,手机10在通过NFC模拟不具备AID的卡片,例如门禁卡时,可以 自动选择手机10中存储的不具备AID的模拟卡进行尝试,直到刷卡成功或刷卡终止,而无需用户手动选择,提升了用户的刷卡体验。Through the method provided by the embodiment of the present application, the mobile phone 10 can simulate a card without AID through NFC, such as an access control card. Automatically select the simulated card without AID stored in the mobile phone 10 to try until the card swiping is successful or the card swiping is terminated, without the user having to manually select, which improves the user's card swiping experience.
在上述实施例中,不具备AID的模拟卡(例如门禁卡)的卡片信息存储于eSE 13中,手机10在选择手机10中存储的不具备AID的模拟卡进行刷卡的过程中,每激活一张模拟卡,都需要TEE 12中的可信应用(例如钱包应用TA 12A)和eSE 13进行交互来终止已激活的模拟卡的激活状态和激活待激活的模拟卡。由于通过TEE 12、eSE 13、NFC控制器14来终止卡片的激活状态和激活卡片耗时较长,通常一次终止激活和激活的操作约0.7秒,在手机10中存储的不具备AID的模拟卡数量较多时,刷卡时间较长,影响用户刷卡体验。此外,由于eSE 13的存储空间较小(通常为50KB),若要存储更多的模拟卡需要为手机10配备多个eSE或增加eSE的存储空间大小,增加了开发成本。In the above embodiment, the card information of the simulated card without AID (such as access control card) is stored in the eSE 13. In the process of selecting the simulated card without AID stored in the mobile phone 10 to swipe the card, the mobile phone 10 activates a card. Each simulated card requires a trusted application in TEE 12 (such as wallet application TA 12A) to interact with eSE 13 to terminate the activation status of the activated simulated card and activate the simulated card to be activated. Since it takes a long time to terminate the activation status of the card and activate the card through TEE 12, eSE 13, and NFC controller 14, the operation of terminating activation and activation usually takes about 0.7 seconds. The simulated card without AID stored in the mobile phone 10 When the quantity is large, the card swiping time will be longer, affecting the user's card swiping experience. In addition, due to the small storage space of eSE 13 (usually 50KB), if you want to store more simulation cards, you need to equip the mobile phone 10 with multiple eSEs or increase the storage space size of eSE, which increases development costs.
为了解决上述问题,本申请实施例提供了另一种基于NFC的刷卡方法的技术架构。通过将安全需求较低的模拟卡(例如不具备AID的模拟卡)的卡片信息存储在手机10的存储器中,而不是存储在eSE中。并且在对该类模拟卡进行刷卡过程中,由手机10的REE中的应用程序或手机10的TEE中的可信应用从存储器中读取各不具备AID的模拟卡的卡片信息,并将卡片信息写入到NFC控制器中,来实现模拟卡的自动选择。由于不需要每选择一张模拟卡片都进行终止激活和激活操作,并且不需要TEE 12和eSE13的参与,可以节省刷卡的时间,提升用户体验。此外,由于将安全需求较低的模拟卡的卡片信息存储在手机10的存储器中,而不必占用eSE 13的空间,可以在增加手机10支持的模拟卡数据的同时,降低手机10的开发成本。In order to solve the above problem, embodiments of the present application provide another technical architecture of an NFC-based card swiping method. By storing the card information of a simulation card with lower security requirements (such as a simulation card without AID) in the memory of the mobile phone 10 instead of storing it in the eSE. And during the process of swiping this type of simulated card, the application in the REE of the mobile phone 10 or the trusted application in the TEE of the mobile phone 10 reads the card information of the simulated card without AID from the memory, and stores the card The information is written to the NFC controller to realize automatic selection of the simulated card. Since there is no need to terminate the activation and activation operations every time a simulated card is selected, and there is no need for the participation of TEE 12 and eSE13, it can save the time of swiping the card and improve the user experience. In addition, since the card information of the analog card with lower security requirements is stored in the memory of the mobile phone 10 without occupying the space of the eSE 13, the development cost of the mobile phone 10 can be reduced while increasing the simulation card data supported by the mobile phone 10.
具体地,图7根据本申请的一些实施例,示出了另一种基于NFC的刷卡方法的技术架构示意图。Specifically, FIG. 7 shows a schematic technical architecture diagram of another NFC-based card swiping method according to some embodiments of the present application.
如图7所示,手机10的软件层包括TEE 12和REE 11,硬件层包括eSE 13、NFC控制器14和存储器103。图6中与图3所示的技术架构示意图中,相同标记的模块具有相似的功能,具体可以参考前述图3所示实施例的相关描述,下面介绍和图3所示的实施例的不同之处。As shown in Figure 7, the software layer of the mobile phone 10 includes TEE 12 and REE 11, and the hardware layer includes eSE 13, NFC controller 14 and memory 103. In the schematic diagram of the technical architecture shown in Figure 6 and that shown in Figure 3, modules with the same labels have similar functions. For details, please refer to the relevant description of the embodiment shown in Figure 3. The differences from the embodiment shown in Figure 3 will be introduced below. at.
参考图7,在本申请实施例中,手机10将安全需求较高的模拟卡(具备AID的银行卡、交通卡等,例如图7所示的卡A1、卡A2和卡A3)的卡片信息存储在eSE 13中,而将安全需求较低的模拟卡(不具备AID的模拟卡等,例如图7所示的卡B1、卡B2、卡B3)的卡片信息存储在存储器103中。手机10在检测到刷卡触发指令后,若接收到AID,则参考前述实施例,通过TEE 12中的可信应用、eSE 13与NFC控制器14间交互来实现模拟卡的选择;若未接收到AID,则通过REE 11或TEE 12中的应用程序或服务,从存储器103中读取模拟卡的卡片信息,并将卡片信息写入到NFC控制器14中来完成模拟卡的选择。Referring to Figure 7, in the embodiment of the present application, the mobile phone 10 stores card information of simulated cards with high security requirements (bank cards with AID, transportation cards, etc., such as card A1, card A2 and card A3 shown in Figure 7). It is stored in the eSE 13, and the card information of simulation cards with lower security requirements (simulation cards without AID, etc., such as card B1, card B2, and card B3 shown in Figure 7) is stored in the memory 103. After the mobile phone 10 detects the card swipe triggering command, if it receives the AID, it will refer to the aforementioned embodiment to realize the selection of the simulated card through the interaction between the trusted application in the TEE 12, the eSE 13 and the NFC controller 14; if it does not receive the AID AID reads the card information of the simulated card from the memory 103 through the application program or service in the REE 11 or TEE 12, and writes the card information into the NFC controller 14 to complete the selection of the simulated card.
下面结合图7所示的技术架构,介绍本申请实施例的技术方案。The technical solution of the embodiment of the present application will be introduced below in conjunction with the technical architecture shown in Figure 7 .
具体地,图8根据本申请的一些实施例,示出了另一种基于NFC的刷卡方法的流程示意图。该流程的执行主体为手机10,如图8所示,该方法包括如下步骤。Specifically, FIG. 8 shows a schematic flow chart of another NFC-based card swiping method according to some embodiments of the present application. The execution subject of this process is the mobile phone 10. As shown in Figure 8, the method includes the following steps.
S801:检测到刷卡触发指令。S801: A card swipe trigger instruction is detected.
手机10在检测到刷卡触发指令的情况下,触发本申请实施例提供的近场通信模拟卡选择方法。具体可以参考步骤S401,在此不做赘述。When the mobile phone 10 detects the card swiping trigger instruction, it triggers the near field communication simulation card selection method provided by the embodiment of the present application. For details, please refer to step S401, which will not be described again here.
S802:判断是否检测到近场通信信号。S802: Determine whether a near field communication signal is detected.
手机10判断是否检测到近场通信信号,如果检测到近场通信信号,说明手机10已经靠近NFC读卡设备,转至步骤S803,否则重复步骤S802,继续判断。具体可以参考步骤S402,在此不做赘述。The mobile phone 10 determines whether a near field communication signal is detected. If a near field communication signal is detected, it means that the mobile phone 10 is close to the NFC card reader device and goes to step S803. Otherwise, step S802 is repeated and the judgment is continued. For details, reference may be made to step S402, which will not be described again here.
S803:判断是否接收到AID。S803: Determine whether AID is received.
手机10判断是否接收到AID,如果接收到AID,说明手机10当前靠近的NFC读卡设备对应的模拟 卡的卡片信息存储于eSE 13中,转至步骤S804;否则,说明手机10当前靠近的NFC读卡设备对应的模拟卡的卡片信息存储于存储器103中,转至步骤S807。The mobile phone 10 determines whether it has received AID. If it receives the AID, it means that the simulation corresponding to the NFC card reading device currently close to the mobile phone 10 The card information of the card is stored in the eSE 13, and the process goes to step S804; otherwise, it means that the card information of the simulated card corresponding to the NFC card reading device currently close to the mobile phone 10 is stored in the memory 103, and the process goes to step S807.
S804:判断手机10中是否存在接收到的AID。S804: Determine whether the received AID exists in the mobile phone 10.
手机10判断手机10中是否存在接收到的AID,若手机10中存在接收到的AID,则转至步骤S805,否则转至步骤S806。具体过程可以参考前述步骤S404,在此不做赘述。The mobile phone 10 determines whether the received AID exists in the mobile phone 10. If the received AID exists in the mobile phone 10, then go to step S805, otherwise go to step S806. For the specific process, please refer to the aforementioned step S404, which will not be described again here.
S805:基于TEE 12和eSE 13终止默认卡的激活状态,并激活接收到的AID对应的模拟卡。S805: Terminate the activation state of the default card based on TEE 12 and eSE 13, and activate the simulation card corresponding to the received AID.
手机10在确定出存储接收到手AID的情况下,基于TEE 12和eSE 13终止默认卡的激活状态并激活接收到的AID对应的模拟卡。具体过程可以参考前述步骤S405,在此不做赘述。When the mobile phone 10 determines that the stored AID has been received, it terminates the activation state of the default card based on the TEE 12 and eSE 13 and activates the simulated card corresponding to the received AID. For the specific process, please refer to the aforementioned step S405, which will not be described again here.
S806:提示刷卡失败。S806: Prompt that card swiping failed.
手机10在确定出未接收到AID、且手机中不存在不具备AID的模拟卡的情况下,提示刷卡失败。具体的提示方式可以参考前述步骤S406,在此不做赘述。When the mobile phone 10 determines that the AID has not been received and there is no analog card without AID in the mobile phone, it prompts that the card swiping fails. For the specific prompting method, please refer to the aforementioned step S406, which will not be described again here.
S807:判断手机10中是否存在不具备AID的模拟卡。S807: Determine whether there is a simulation card without AID in the mobile phone 10.
手机10在确定出未接收到AID的情况下,通过REE 11中的钱包应用11A判断手机10中是否存在不具备AID的模拟卡,如果存在不具备AID的模拟卡,说明手机10中可能存储有手机10当前靠近的NFC读卡设备对应的模拟卡的卡片信息,转至步骤S808;否则,说明手机10中未存储有手机10当前靠近的NFC读卡设备对应的模拟卡的卡片信息,转至步骤S806。When the mobile phone 10 determines that it has not received AID, it determines whether there is a simulation card without AID in the mobile phone 10 through the wallet application 11A in the REE 11. If there is a simulation card without AID, it means that the mobile phone 10 may store For the card information of the simulated card corresponding to the NFC card reading device that the mobile phone 10 is currently close to, go to step S808; otherwise, it means that the card information of the simulated card corresponding to the NFC card reading device that the mobile phone 10 is currently close to is not stored in the mobile phone 10, go to Step S806.
在一些实施例中,手机10可以在用于存储不具备AID的模拟卡的卡片信息的文件中存储有卡片信息的情况下,确定手机10中存在不具备AID的模拟卡;在另一些实施例中,手机10也可以在手机10中存储有不具备AID的卡片信息的情况下,确定手机10中存在不具备AID的模拟卡。手机10还可以通过其他方式来判断手机10中是否存在不具备AID的模拟卡,例如,手机10可以在存储的模拟卡的卡片信息中,存在有SAK=08的模拟卡的情况下,确定手机10中存在不具备AID的模拟卡。可以理解,本申请实施例对判断手机10中是否存在不具备AID的模拟卡的具体方式不做限定。In some embodiments, the mobile phone 10 may determine that there is a simulation card without AID in the mobile phone 10 when the card information is stored in the file used to store the card information of the simulation card without AID; in other embodiments , the mobile phone 10 may also determine that there is a simulated card without AID in the mobile phone 10 when the card information without AID is stored in the mobile phone 10 . The mobile phone 10 can also determine whether there is a simulation card without AID in the mobile phone 10 through other methods. For example, the mobile phone 10 can determine if there is a simulation card with SAK=08 in the stored card information of the simulation card. There are emulation cards in 10 that do not have AID. It can be understood that the embodiment of the present application does not limit the specific method of determining whether there is a simulation card without AID in the mobile phone 10 .
可以理解,不具备AID的模拟卡可以是门禁卡、会员卡等,也可以是其他卡片,在此不做限定具备AID。It can be understood that simulation cards without AID can be access control cards, membership cards, etc., or other cards. There is no limitation here on having AID.
S808:终止默认卡的激活状态。S808: Terminate the activation state of the default card.
手机10在确定出手机10中存在不具备AID的模拟卡的情况下,终止默认卡的激活状态。When the mobile phone 10 determines that there is a simulation card without AID in the mobile phone 10, it terminates the activation state of the default card.
例如,在默认卡的卡片信息存储在eSE 13中的情况下,手机10可以通过前述钱包应用TA 12A与eSE 13交互,终止默认卡的激活状态。For example, when the card information of the default card is stored in eSE 13, the mobile phone 10 can interact with the eSE 13 through the aforementioned wallet application TA 12A to terminate the activation state of the default card.
又例如,在默认卡的卡片信息存储在手机10的存储器103中时,手机10可以通过前述钱包应用11A与NFC控制器14交互,终止默认卡的激活状态。For another example, when the card information of the default card is stored in the memory 103 of the mobile phone 10, the mobile phone 10 can interact with the NFC controller 14 through the aforementioned wallet application 11A to terminate the activation state of the default card.
在另一些实施例中,手机10也可以通过其他应用程序/服务来终止默认卡的激活状态,在此不做限定。In other embodiments, the mobile phone 10 can also terminate the activation state of the default card through other applications/services, which is not limited here.
可以理解,在一些实施例中,在默认卡为不具备AID的模拟卡的情况下,例如默认卡为门禁卡的情况下,手机10在执行完步骤S807后,也可以跳过步骤S808,直接转至步骤S809。从而,可以节省终止默认卡的激活状态的时间,进一步提高刷卡速度。It can be understood that in some embodiments, when the default card is an analog card without AID, for example, when the default card is an access control card, the mobile phone 10 may skip step S808 after executing step S807 and directly Go to step S809. Therefore, the time of terminating the activation state of the default card can be saved, and the card swiping speed can be further improved.
S809:从存储器103中获取一张不具备AID的模拟卡的卡片信息,并将获取的卡片信息写入NFC控制器14。S809: Obtain card information of a simulated card without AID from the memory 103, and write the acquired card information into the NFC controller 14.
手机10在手机10中存在不具备AID的模拟卡的情况下,从存储器103中获取一张不具备AID的模拟卡的卡片信息,并将获取的卡片信息写入NFC控制器14。例如,手机10可以利用前述钱包应用11A, 从存储器中选择一张不具备AID的模拟卡,将将该不具备AID的模拟卡的卡片信息,写入到NFC控制器14中,NFC控制器14在接收到卡片信息后,将卡片信息通过NFC技术传送给NFC读卡设备,例如前述NFC读卡器01。When there is a simulation card without AID in the mobile phone 10 , the mobile phone 10 obtains the card information of a simulation card without AID from the memory 103 , and writes the obtained card information into the NFC controller 14 . For example, the mobile phone 10 can utilize the aforementioned wallet application 11A, Select a simulation card without AID from the memory, and write the card information of the simulation card without AID into the NFC controller 14. After receiving the card information, the NFC controller 14 passes the card information through NFC technology is transmitted to NFC card reading devices, such as the aforementioned NFC card reader 01.
可以理解,不具备AID的模拟卡的卡片信息可以包括不具备AID的模拟卡的UID,也可以包括不具备AID的模拟卡的UID和SAK,还可以包括更多的信息,在此不做限定。It can be understood that the card information of the simulation card without AID can include the UID of the simulation card without AID, and can also include the UID and SAK of the simulation card without AID. It can also include more information, which is not limited here. .
在一些实施例中,手机10在从存储器103获取不具备AID的模拟卡的卡片信息时,可以按照各不具备AID的模拟卡的卡片信息存储顺序来获取,也可以根据不具备AID的模拟卡的使用频率来来获取,还可以根据手机10的当前位置来获取。可以理解,在另一些实施例中,手机10也可以采用其他方式确定获取哪一张不具备AID的模拟卡的卡片信息,例如随机选择一张未选择过的不具备AID的模拟卡的卡片信息,在此不做限定。In some embodiments, when the mobile phone 10 obtains the card information of the simulated cards without AID from the memory 103, it can obtain it according to the card information storage order of the simulated cards without AID, or it can obtain it according to the card information of the simulated cards without AID. It can be obtained based on the usage frequency, and can also be obtained based on the current location of the mobile phone 10. It can be understood that in other embodiments, the mobile phone 10 can also use other methods to determine which card information of a simulation card without AID to obtain, such as randomly selecting the card information of an unselected simulation card without AID. , no limitation is made here.
在一些实施例中,NFC控制器14可以包括非接触前端芯片(Contactless Frontend,CLF),手机10通过将不具备AID的模拟卡的卡片信息更新到CLF中,来完成刷卡。其中,CLF是一种NFC控制芯片,用于将卡片信息通过NFC的发射天线发送给读卡设备。In some embodiments, the NFC controller 14 may include a contactless front-end chip (Contactless Frontend, CLF), and the mobile phone 10 completes the card swiping by updating the card information of the simulated card without AID to the CLF. Among them, CLF is an NFC control chip used to send card information to the card reading device through the NFC transmitting antenna.
可以理解,在一些实施例中,手机10在获取一张不具备AID的模拟卡的卡片信息后,还可以将该张不具备AID的模拟卡的选择状态标记为已选择,以避免下一次获取不具备AID的模拟卡的卡片信息时重复获取到该张不具备AID的模拟卡的卡片信息,以提高刷卡速度。It can be understood that in some embodiments, after obtaining the card information of a simulation card without AID, the mobile phone 10 can also mark the selection status of the simulation card without AID as selected to avoid obtaining the card information next time. When the card information of a simulated card without AID is obtained, the card information of the simulated card without AID is repeatedly obtained to increase the card swiping speed.
可以理解,手机10在将一张不具备AID的模拟卡的卡片信息写入到NFC控制器14中后,读卡设备,例如前述NFC读卡器01,即可以接收到该不具备AID的模拟卡的信息。例如,图9示出了利用NFC空口抓包工具获取的手机10在自动切换不具备AID的模拟卡的过程中手机10传递的数据的一种日志示意图。参考图9,序号57对应的行中记录了NFC读卡器01接收到的手机10发送的UID对应的数据,其中“11 11 11 11”即是该张不具备AID的模拟卡的UID;序号58对应的行中记录了手机10向读卡器01发送的SAK对应的数据,其中“18”为模拟卡(即该张不具备AID的模拟卡)的SAK。继续参考图9,在上述UID为“11 11 11 11”的不具备AID的模拟卡不具有上述门04的通行权限的情况下,参考序号80对应的行,手机10可以向NFC读卡器01发送另一张不具备AID的模拟卡的UID数据,其中“33 33 33 33”即为该张模拟卡的UID;然后,参考序号81和对应的行,NFC读卡器01接收到UID“33 33 33 33”后,参考序号82对应的行,手机10向NFC读卡器01发送UID为“33 33 33 33”的模拟卡的SAK数据,其中“08”即为该张模拟卡的SAK。It can be understood that after the mobile phone 10 writes the card information of an analog card without AID into the NFC controller 14, the card reading device, such as the aforementioned NFC card reader 01, can receive the analog card without AID. card information. For example, FIG. 9 shows a schematic log diagram of the data transmitted by the mobile phone 10 during the process of automatically switching to a simulation card without AID obtained by using an NFC air interface packet capture tool. Referring to Figure 9, the row corresponding to serial number 57 records the data corresponding to the UID sent by mobile phone 10 received by NFC card reader 01, where "11 11 11 11" is the UID of the simulation card without AID; the serial number The row corresponding to 58 records the data corresponding to the SAK sent by the mobile phone 10 to the card reader 01, where "18" is the SAK of the simulated card (that is, the simulated card without AID). Continuing to refer to Figure 9, in the case where the above-mentioned simulation card without AID with the UID of "11 11 11 11" does not have the access authority of the above-mentioned door 04, refer to the row corresponding to the serial number 80, the mobile phone 10 can communicate with the NFC card reader 01 Send the UID data of another simulated card without AID, where "33 33 33 33" is the UID of the simulated card; then, referring to the serial number 81 and the corresponding line, NFC card reader 01 receives the UID "33 33 33 33", referring to the row corresponding to serial number 82, mobile phone 10 sends the SAK data of the simulation card with UID "33 33 33 33" to NFC card reader 01, where "08" is the SAK of the simulation card.
S810:判断是否满足终止条件。S810: Determine whether the termination condition is met.
手机10判断是否满足终止条件,如果满足终止条件,则结束本次刷卡,否则转至步骤S811。The mobile phone 10 determines whether the termination condition is met, and if the termination condition is met, the card swiping session ends, otherwise, the process goes to step S811.
在一些实施例中,终止条件可以包括以下条件中的至少一种:手机10超过预设等待时长未检测到近场通信信号(即手机10已远离NFC读卡器01)、手机10的NFC功能已关闭、本次刷卡已超过预设刷卡时长、刷卡成功、手机10检测到用户在手机10上的取消刷卡的操作或指令。In some embodiments, the termination condition may include at least one of the following conditions: the mobile phone 10 does not detect a near field communication signal beyond the preset waiting time (that is, the mobile phone 10 has moved away from the NFC card reader 01), the NFC function of the mobile phone 10 It has been closed, the current card swiping time has exceeded the preset card swiping time, the card swiping is successful, and the mobile phone 10 detects the user's operation or instruction to cancel the card swiping on the mobile phone 10.
S811:判断是否已选择过所有不具备AID的模拟卡。S811: Determine whether all simulation cards without AID have been selected.
手机10判断是否已经选择过所有的不具备AID的模拟卡,若确定出手机10已选择过所有的不具备AID的模拟卡,则转至步骤S806;否则转至步骤S809,获取下一张不具备AID的模拟卡的卡片信息,并将获取的卡片信息写到NFC控制器14。The mobile phone 10 determines whether all the simulation cards without AID have been selected. If it is determined that the mobile phone 10 has selected all the simulation cards without AID, then go to step S806; otherwise, go to step S809 to obtain the next card without AID. The card information of the simulated card with AID is written to the NFC controller 14.
可以理解,在一些实施例中,手机10在确定出已选择过所有不具备AID的模拟卡的情况下,可以将所有不具备AID的模拟卡的选择状态都设置为未选择,以便于手机10下一次刷卡时可以将从选择状态为未选择的不具备AID的模拟卡中选择一张进行刷卡。 It can be understood that in some embodiments, when the mobile phone 10 determines that all simulation cards without AID have been selected, the selection status of all simulation cards without AID can be set to unselected, so that the mobile phone 10 can The next time you swipe your card, you can select one of the simulated cards without AID whose selection status is unselected to swipe your card.
可以理解,在一些实施例中,手机10在确定出已选择过所有不具备AID的模拟卡的情况下,若仍然检测到近场通信信号,还可以将所有不具备AID的模拟卡的选择状态都设置为未选择,并转至步骤S809,逐一将各不具备AID的模拟卡的卡片信息写入到NFC控制器14中进行下一轮尝试,以避免手机10将正确的不具备AID的模拟卡的卡片信息写入NFC控制器14后,由于其他原因导致刷卡失败情况,增加刷卡的成功率。It can be understood that in some embodiments, after the mobile phone 10 determines that all simulation cards without AID have been selected, if the near field communication signal is still detected, the selected status of all simulation cards without AID can also be changed. All are set to unselected, and go to step S809 to write the card information of each simulated card without AID into the NFC controller 14 one by one for the next round of attempts to prevent the mobile phone 10 from correctly emulating the simulated card without AID. After the card information of the card is written into the NFC controller 14, if the card swiping fails due to other reasons, the success rate of the card swiping is increased.
可以理解,前述步骤S801至步骤S811的执行顺序只是一种示例,在另一些实施例中,可以调整部分步骤的执行顺序,也可以合并或拆分部分步骤,还可以增加或减小部分步骤,在此做限定。It can be understood that the execution order of the aforementioned steps S801 to S811 is just an example. In other embodiments, the execution order of some steps can be adjusted, some steps can be merged or split, and some steps can also be added or reduced. Limitations here.
通过本申请实施例提供的方法,由于从手机10的存储器103中获取存储的不具备AID的模拟卡的卡片信息,并将卡片信息写入到NFC控制器14的过程中不需要与TEE 12和eSE 13进行交互,耗时较少(通常一次获取和写入操作耗时约0.1秒),相较于图4所示实施例,在手机10中存储的不具备AID的模拟卡较多时,可以节约刷卡时间,提升用户体验。例如,在手机10中存储有10张不具备AID的模拟卡的卡片信息的情况下,在最坏的情况下,图4所示实施例从选择卡片到刷卡成功需要7秒,而本申请实施例提供的方法只需要1秒,大量缩短了用户的等待时间,提升了用户体验。此外,由于不具备AID的模拟卡的卡片信息存储在手机10的存储器103中,而不是存储在eSE 13中,可以使得手机10存储更多的卡片同时,不用增加eSE的存储空间或数量,降低了开发成本。Through the method provided by the embodiment of the present application, since the card information of the stored analog card without AID is obtained from the memory 103 of the mobile phone 10 and the card information is written to the NFC controller 14, there is no need to interact with the TEE 12 and Interaction with eSE 13 takes less time (usually one acquisition and writing operation takes about 0.1 seconds). Compared with the embodiment shown in Figure 4, when there are many simulation cards without AID stored in the mobile phone 10, you can Save time on card swiping and improve user experience. For example, in the case where the card information of 10 simulated cards without AID is stored in the mobile phone 10, in the worst case, the embodiment shown in Figure 4 takes 7 seconds from selecting a card to successfully swiping the card, and this application implements The method provided in the example only takes 1 second, which greatly shortens the user's waiting time and improves the user experience. In addition, since the card information of the simulated card without AID is stored in the memory 103 of the mobile phone 10 instead of being stored in the eSE 13, the mobile phone 10 can store more cards without increasing the storage space or quantity of the eSE and reducing the cost. development costs.
特别地,在图4所示的实施例中,由于卡片的激活和终止激活需要由eSE 13和NFC控制器14交互,会消耗更多的电量,因此,对于采用本申请实施例提供的方法,由于切换不具备AID的模拟卡的过程不需要eSE 13的参与,可以节省手机10的电量消耗,提高手机10的续航能力。例如,图10根据本申请的一些实施例,示出了手机10通过eSE 13终止激活/激活模拟卡、从存储器103读取模拟卡的卡片信息并写入NFC控制器14时,手机10的电池的电流的变化情况。参考图10,可见,在eSE 13终止激活/激活模拟卡的过程中,手机10的电池的电流明显增加,而通过从存储器103读取模拟卡的卡片信息并写入NFC控制器14的过程中,手机10的电池的电流基本不变,其中,I0为手机10未通过NFC模拟实体卡时电池的电流。In particular, in the embodiment shown in Figure 4, since the activation and termination of activation of the card requires interaction between the eSE 13 and the NFC controller 14, more power will be consumed. Therefore, for the method provided by the embodiment of the present application, Since the process of switching to a simulation card without AID does not require the participation of the eSE 13, the power consumption of the mobile phone 10 can be saved and the battery life of the mobile phone 10 can be improved. For example, FIG. 10 shows the battery of the mobile phone 10 when the mobile phone 10 terminates activation/activation of the simulated card through the eSE 13, reads the card information of the simulated card from the memory 103 and writes it to the NFC controller 14, according to some embodiments of the present application. changes in current. Referring to Figure 10, it can be seen that when the eSE 13 terminates activation/activation of the simulated card, the current of the battery of the mobile phone 10 increases significantly, and during the process of reading the card information of the simulated card from the memory 103 and writing it to the NFC controller 14 , the current of the battery of the mobile phone 10 is basically unchanged, where I 0 is the current of the battery when the mobile phone 10 does not simulate a physical card through NFC.
图4和图8所示的实施例提供的方法适用的电子设备都设置有eSE,本申请实施例还提供了又一种基于NFC的刷卡方法,可以应用于具有NFC功能,但不包括eSE的电子设备,例如智能手环等,使得该类电子设备也可以在存储有多张不具备AID的模拟卡的情况下,自动选择模拟卡来完成刷卡。The methods provided by the embodiments shown in Figure 4 and Figure 8 are applicable to all electronic devices equipped with eSE. The embodiment of the present application also provides another NFC-based card swiping method, which can be applied to devices with NFC functions but excluding eSE. Electronic devices, such as smart bracelets, etc., enable such electronic devices to automatically select a simulated card to complete card swiping when multiple simulated cards without AID are stored.
可以理解,本申请实施例提供的方法可以应用于任意具有NFC功能,但不包括eSE的电子设备,例如智能手表、智能手环等。为便于描述,以下以智能手环20为例进行介绍。It can be understood that the method provided by the embodiment of the present application can be applied to any electronic device with NFC function, but does not include eSE, such as smart watches, smart bracelets, etc. For the convenience of description, the smart bracelet 20 is taken as an example for introduction below.
例如,参考图11,智能手环20的软件层包括REE 201,用于运行轻量级的系统,例如Wear OSTM、Lite OSTM等,智能手环20用于管理NFC功能的应用程序,例如NFC应用2011运行于上述轻量级系统中。智能手环20中与NFC功能相关的硬件包括存储器202和NFC控制器203,存储器202用于存储不同模拟卡的卡片信息,NFC控制器203用于将模拟卡的卡片信息通过NFC技术发送给NFC读卡设备或读取实体卡的卡片信息。For example, referring to Figure 11, the software layer of the smart bracelet 20 includes REE 201, which is used to run lightweight systems, such as Wear OS TM , Lite OS TM, etc., and the smart bracelet 20 is used to manage NFC function applications, such as NFC Application 2011 runs on the lightweight system described above. The hardware related to the NFC function in the smart bracelet 20 includes a memory 202 and an NFC controller 203. The memory 202 is used to store card information of different simulated cards, and the NFC controller 203 is used to send the card information of the simulated cards to NFC through NFC technology. Card reading equipment or card information that reads physical cards.
下面结合图11所示的技术架构,介绍本申请实施例的技术方案。The following describes the technical solution of the embodiment of the present application in conjunction with the technical architecture shown in Figure 11.
具体地,图12根据本申请的一些实施例,示出了又一种基于NFC的刷卡方法的流程示意图。如图12所示,该流程的执行主体为智能手环20。在图12中,步骤S1201至步骤S1203的执行过程可以参考前述步骤S801至步骤S803,步骤S1207可以参考前述步骤S807,步骤S1208至步骤S1210的执行过程可以参考前述步骤S809至步骤S811,下面对与前述实施例不同的步骤S1204至步骤S1206的执行过程进行介绍。 Specifically, FIG. 12 shows a schematic flow chart of yet another NFC-based card swiping method according to some embodiments of the present application. As shown in Figure 12, the execution subject of this process is the smart bracelet 20. In Figure 12, the execution process of step S1201 to step S1203 can refer to the aforementioned step S801 to step S803, the execution process of step S1207 can refer to the aforementioned step S807, and the execution process of step S1208 to step S1210 can refer to the aforementioned step S809 to step S811. The following is The execution process of step S1204 to step S1206 that is different from the previous embodiment will be introduced.
S1204:判断智能手环20中是否存在接收到的AID。S1204: Determine whether the received AID exists in the smart bracelet 20.
智能手环20在接收到AID后,可以将接收到的AID与存储在存储器202中的各模拟卡的卡片信息的AID进行对比来确定智能手环20中是否存在接收到的AID。After receiving the AID, the smart bracelet 20 can compare the received AID with the AID of the card information of each simulated card stored in the memory 202 to determine whether the received AID exists in the smart bracelet 20 .
S1205:从存储器202中读取接收到的AID对应的模拟卡的卡片信息,并将该卡片信息写入NFC控制器203。S1205: Read the card information of the simulated card corresponding to the received AID from the memory 202, and write the card information into the NFC controller 203.
智能手环20在确定出智能手环20中存在接收到的AID的情况下,从存储器202中读取接收到的AID对应的模拟卡的卡片信息,并将该卡片信息写入NFC控制器203中,以便于NFC控制器203通过NFC技术将该卡片信息发送给读卡设备。When the smart bracelet 20 determines that the received AID exists in the smart bracelet 20 , it reads the card information of the analog card corresponding to the received AID from the memory 202 , and writes the card information to the NFC controller 203 , so that the NFC controller 203 sends the card information to the card reading device through NFC technology.
S1206:提示刷卡失败。S1206: Prompt that card swiping failed.
智能手环20在确定出智能手环20不存在接收到的AID的情况下,提示刷卡失败。例如,智能手环20可能通过显示刷卡失败的消息、振动、发出提示音、闪烁智能手环20的呼吸灯等。When the smart bracelet 20 determines that there is no AID received by the smart bracelet 20, it prompts that the card swiping fails. For example, the smart bracelet 20 may display a card swiping failure message, vibrate, emit a prompt sound, flash the breathing light of the smart bracelet 20, etc.
可以理解,在一些实施例中,若智能手环20并不支持具备AID的实体卡的模拟,智能手环20在步骤S1202检测到近场通信信号的情况下,直接执行步骤S1207,而无需执行步骤S1203至步骤S1205的内容。It can be understood that in some embodiments, if the smart bracelet 20 does not support the simulation of a physical card with AID, the smart bracelet 20 directly executes step S1207 when detecting a near field communication signal in step S1202 without executing The contents of step S1203 to step S1205.
通过本申请实施例提供的方法,支持NFC功能但不具有eSE的电子设备也可以自动选择模拟卡进行刷卡,提升了用户体验。Through the method provided by the embodiments of this application, electronic devices that support NFC functions but do not have eSE can also automatically select simulated cards for card swiping, which improves user experience.
下面对上述各实施例中模拟卡的开卡过程进行介绍。The card opening process of the simulated card in each of the above embodiments is introduced below.
首先,对图3所示的技术架构下,手机10获取实体卡的卡片信息,并存储在手机10的eSE 13中的过程进行介绍。First, under the technical architecture shown in Figure 3, the process of the mobile phone 10 obtaining the card information of the physical card and storing it in the eSE 13 of the mobile phone 10 is introduced.
具体地,图13根据本申请的一些实施例,示出了一种近场通信模拟卡开卡方法的流程示意图。该流程的执行主体为手机10,如图13所示,该流程包括如下步骤。Specifically, FIG. 13 shows a schematic flow chart of a near field communication simulation card opening method according to some embodiments of the present application. The execution subject of this process is the mobile phone 10. As shown in Figure 13, the process includes the following steps.
S1301:进入开卡模式。S1301: Enter card opening mode.
手机10中进行NFC功能管理的应用程序,例如前述钱包应用11A,在检测到用户的开卡操作后,进入开卡模式。可以理解,手机10进入开卡模式后,手机10的NFC控制器14即进入读卡器模式。The application in the mobile phone 10 that manages the NFC function, such as the aforementioned wallet application 11A, enters the card opening mode after detecting the user's card opening operation. It can be understood that after the mobile phone 10 enters the card opening mode, the NFC controller 14 of the mobile phone 10 enters the card reader mode.
例如,图14A至图14E根据本申请的一些实施例,示出了手机10进入开卡模式过程中,手机10显示的钱包应用11A的界面示意图。参考图14A至图14E,用户可以通过点击图14A所示的“卡包”控件141,进入图14B所示的卡包界面;然后通过点击图14B所示的“+”控件,进入图14C所示的添加卡片界面;其次,在图14C所示的添加卡片界面中的控件来选择添加卡片的类型,例如通过点击“钥匙”控件143进入图14D所示的添加钥匙界面;最后通过点击图14D所示的添加钥匙界面中的“门禁卡”控件144操作手机10进入开卡模式,例如手机10在检测到用户对上述“门禁卡”控件144的点击操作后,进入开卡模式并显示图14E所示的模拟门禁卡界面。For example, FIG. 14A to FIG. 14E show a schematic interface diagram of the wallet application 11A displayed on the mobile phone 10 when the mobile phone 10 enters the card opening mode according to some embodiments of the present application. Referring to Figures 14A to 14E, the user can enter the card package interface shown in Figure 14B by clicking the "card package" control 141 shown in Figure 14A; and then click the "+" control shown in Figure 14B to enter the card package interface shown in Figure 14C. The add card interface shown in Figure 14C; secondly, use the controls in the add card interface shown in Figure 14C to select the type of card to add, for example, by clicking on the "key" control 143 to enter the add key interface shown in Figure 14D; finally, by clicking on Figure 14D The "access card" control 144 in the key adding interface shown operates the mobile phone 10 to enter the card opening mode. For example, after detecting the user's click operation on the "access card" control 144, the mobile phone 10 enters the card opening mode and displays Figure 14E The simulated access card interface shown.
可以理解,另一些实施例中,手机10也可以通过其他方式进入开卡模式,例如接收到用户的语音指令、开卡手势等情况下,进入开卡模式,本申请实施例不做限定。It can be understood that in other embodiments, the mobile phone 10 can also enter the card opening mode through other methods, such as receiving the user's voice command, card opening gesture, etc., to enter the card opening mode, which is not limited by the embodiments of this application.
S1302:判断是否检测到实体卡。S1302: Determine whether the physical card is detected.
手机10进入开卡模式后,即判断是否检测到实体卡,如检测到,则步骤S1303,否则重复步骤S1302继续检测。After the mobile phone 10 enters the card opening mode, it determines whether the physical card is detected. If detected, proceed to step S1303; otherwise, repeat step S1302 to continue detection.
例如,手机10可以在检测到近场通信信号的情况下,确定检测到实体卡。For example, the mobile phone 10 may determine that a physical card is detected when a near field communication signal is detected.
S1303:获取实体卡的卡片信息并判断实体卡是否具备AID。S1303: Obtain the card information of the physical card and determine whether the physical card has AID.
手机10在检测到实体卡的情况下,获取实体卡的卡片信息并判断实体卡是否具备AID。如果确定出实体卡具备AID,则转至步骤S1304;否则转至步骤S1305。 When the mobile phone 10 detects the physical card, it obtains the card information of the physical card and determines whether the physical card has AID. If it is determined that the physical card has AID, go to step S1304; otherwise, go to step S1305.
在一些实施例中,手机10可以根据获取到的卡片信息中的SAK来确定实体卡是否具备AID,例如,在获取的卡片信息中的SAK=08的情况下,确定实体卡为不具备AID。可以理解,在另一些实施例中,手机10也可以通过其他方式确定实体卡是否具备AID,例如根据卡片信息中的UID的长度来确定实体卡是否具备AID,本申请实施例不做限定。In some embodiments, the mobile phone 10 can determine whether the physical card has AID based on the SAK in the obtained card information. For example, if the SAK in the obtained card information is 08, it is determined that the physical card does not have AID. It can be understood that in other embodiments, the mobile phone 10 can also determine whether the physical card has AID in other ways, such as determining whether the physical card has AID according to the length of the UID in the card information, which is not limited in the embodiments of this application.
可以理解,在一些实施例中,手机10可以通过REE 11中的应用程序,例如钱包应用11A或NFC服务11B,来从NFC控制器14获取实体卡的卡片信息。It can be understood that in some embodiments, the mobile phone 10 can obtain the card information of the physical card from the NFC controller 14 through an application program in the REE 11, such as the wallet application 11A or the NFC service 11B.
可以理解,在另一些实施例中,手机10也可以通过TEE 12中的应用程序,例如钱包应用TA 12A,来从NFC控制器14获取实体卡的卡片信息。可以理解,钱包应用TA 12A可以通过eSE 13来从NFC控制器14获取实体卡的卡片信息,也可以直接从NFC控制器14获取实体卡的卡片信息,在此不做限定。It can be understood that in other embodiments, the mobile phone 10 can also obtain the card information of the physical card from the NFC controller 14 through an application program in the TEE 12, such as the wallet application TA 12A. It can be understood that the wallet application TA 12A can obtain the card information of the physical card from the NFC controller 14 through the eSE 13, or can directly obtain the card information of the physical card from the NFC controller 14, which is not limited here.
S1304:采用其他实体卡对应的开卡逻辑。S1304: Use the card opening logic corresponding to other physical cards.
手机10在确定出实体卡具备AID的情况下,采用其他实体卡对应的开卡逻辑。When the mobile phone 10 determines that the physical card has AID, it uses the card opening logic corresponding to other physical cards.
可以理解,手机10中预设有不同类型的实体卡的开卡逻辑,例如,对于银行卡,由于安全要求较高,需要复杂的安全验证过程,手机10可以通过相应的服务器进行安全验证,并在验证成功的情况下,将银行卡的卡片信息写入到eSE 13中。It can be understood that the mobile phone 10 is preset with card opening logic for different types of physical cards. For example, for bank cards, due to high security requirements, a complex security verification process is required. The mobile phone 10 can perform security verification through the corresponding server, and If the verification is successful, the card information of the bank card is written to eSE 13.
S1305:从服务器获取第一文件,并将第一文件写入eSE 13。S1305: Get the first file from the server and write the first file to eSE 13.
可以理解,第一文件中包括了不具备AID的模拟卡的开卡逻辑及eSE 13的数据写入方法,eSE 13可以基于该第一文件,将卡片信息写入到eSE 13中。第一文件一般存储在服务器中,例如可信服务管理(Trusted Service Manager,TMS)的服务器中,并且由手机10中的可信应用,例如前述钱包应用TA 12A在开卡时从服务器获取。It can be understood that the first file includes the card opening logic of the simulated card without AID and the data writing method of eSE 13. eSE 13 can write the card information into eSE 13 based on the first file. The first file is generally stored in a server, such as a Trusted Service Manager (TMS) server, and is obtained from the server by a trusted application in the mobile phone 10, such as the aforementioned wallet application TA 12A when opening a card.
可以理解,在一些实施例中,第一文件可以包括Java小程序,该Java小程序中包括了将卡片信息写入到eSE 13中的运行逻辑。It can be understood that in some embodiments, the first file may include a Java applet, and the Java applet includes running logic for writing card information into the eSE 13.
S1306:基于第一文件,将实体卡的卡片信息写入到eSE 13中。S1306: Based on the first file, write the card information of the physical card into eSE 13.
手机10基于第一文件中的开卡逻辑,由将实体卡的卡片信息写入到eSE 13中。例如手机10可以利用可信应用,例如前述钱包应用TA 12A,基于第一文件中不具备AID的模拟卡的开卡逻辑及eSE 13的数据写入方法,将实体卡的卡片信息写入到eSE 13中,完成开卡。Based on the card opening logic in the first file, the mobile phone 10 writes the card information of the physical card into the eSE 13. For example, the mobile phone 10 can use a trusted application, such as the aforementioned wallet application TA 12A, to write the card information of the physical card to the eSE based on the card opening logic of the simulated card without AID in the first file and the data writing method of the eSE 13 In 13, card opening is completed.
在前述对应于图3所示的技术架构的开卡过程中,手机10需要从服务器获取第一文件,并基于第一文件中记录的不具备AID的模拟卡的开卡逻辑及eSE 13的数据写入方法,将读取的卡片信息写入到eSE 13中,耗时较长,通过从服务器获取第一文件约需要20秒,将实体卡的卡片信息写入到eSE 13中需要20秒,开卡时间较长。而对应于图7所示的技术架构,由于只需要将不具备AID的模拟卡的卡片信息,例如UID和SAK,存储到存储器103中,而无需将卡片信息写入到eSE 13中,可以缩短不具备AID的模拟卡的开卡时间。此外,由于第一文件存储于服务器中,手机10必须在能够连接到服务器的情况下,即能访问网络的情况下才能进行开卡,影响用户体验。In the aforementioned card opening process corresponding to the technical architecture shown in Figure 3, the mobile phone 10 needs to obtain the first file from the server, and based on the card opening logic of the simulated card without AID and the data of the eSE 13 recorded in the first file The writing method is to write the read card information into eSE 13, which takes a long time. It takes about 20 seconds to obtain the first file from the server, and it takes 20 seconds to write the card information of the physical card into eSE 13. It takes a long time to open a card. Corresponding to the technical architecture shown in Figure 7, since only the card information of the simulated card without AID, such as UID and SAK, needs to be stored in the memory 103, there is no need to write the card information to the eSE 13, which can be shortened. The opening time of the simulation card without AID. In addition, since the first file is stored in the server, the mobile phone 10 must be able to connect to the server, that is, be able to access the network, before opening the card, which affects the user experience.
具体地,图15根据本申请的一些实施例,示出了另一种近场通信模拟卡开卡方法的流程示意图。该流程的执行主体为手机10,其中,步骤S1501至步骤S1504的执行过程可以参考前述步骤S1301至步骤S1304,在此不做赘述。下面对与图13所示实施例的不同之处进行介绍。Specifically, FIG. 15 shows a schematic flow chart of another near field communication simulation card opening method according to some embodiments of the present application. The execution subject of this process is the mobile phone 10. For the execution process of steps S1501 to S1504, reference can be made to the aforementioned steps S1301 to S1304, which will not be described again here. Differences from the embodiment shown in FIG. 13 will be introduced below.
S1505:将实体卡的卡片信息存储到存储器103中。S1505: Store the card information of the physical card in the memory 103.
例如,手机10在确定出实体卡为不具备AID的模拟卡的情况下,可将实体卡的UID和SAK存储在手机10的存储器103中。For example, when the mobile phone 10 determines that the physical card is a simulated card without AID, the UID and SAK of the physical card can be stored in the memory 103 of the mobile phone 10 .
可以理解,在一些实施例中,手机10也可以只存储实体卡的UID,还可以存储实体卡的其他信息, 在此不做限定。It can be understood that in some embodiments, the mobile phone 10 can also store only the UID of the physical card, and can also store other information of the physical card. No limitation is made here.
可以理解,在一些实施例中,手机10还可以在手机可以访问网络的情况下将手机10中存储的各实体卡的卡片信息上传到服务器中,以便于用户可以通过其他电子设备从服务器获取卡片信息,并通过其他电子设备来模拟各条卡片信息对应的模拟卡。It can be understood that in some embodiments, the mobile phone 10 can also upload the card information of each physical card stored in the mobile phone 10 to the server when the mobile phone 10 can access the network, so that the user can obtain the card from the server through other electronic devices. information, and use other electronic devices to simulate the simulation cards corresponding to each card information.
通过本申请实施例提供的开卡方法,手机10在开卡时无需访问服务器,也无需通过前述第一文件来向eSE 13写入卡片信息,而是直接将实体卡的卡片信息存储到手机的存储器103中,耗时较短(通常存储一张卡片的信息小于1秒),减小了手机10的开卡时间,提升了用户体验。Through the card opening method provided by the embodiment of this application, the mobile phone 10 does not need to access the server when opening the card, nor does it need to write the card information to the eSE 13 through the aforementioned first file. Instead, the card information of the physical card is directly stored in the mobile phone. In the memory 103, it takes less time (usually less than 1 second to store the information of a card), which reduces the card opening time of the mobile phone 10 and improves the user experience.
进一步,图16根据本申请的一些实施例,示出了又一种近场通信模拟卡开卡方法的流程示意图。该流程的执行主体为智能手环20,如图16所示,该流程包括如下步骤。Furthermore, FIG. 16 shows a schematic flow chart of yet another near field communication simulation card opening method according to some embodiments of the present application. The execution subject of this process is the smart bracelet 20. As shown in Figure 16, the process includes the following steps.
S1601:进入开卡模式。S1601: Enter card opening mode.
智能手环20可以与其他电子设备,例如前述手机10建立绑定关系后,由手机10控制智能手环20进入开卡模式。The smart bracelet 20 can establish a binding relationship with other electronic devices, such as the aforementioned mobile phone 10, and then the mobile phone 10 controls the smart bracelet 20 to enter the card opening mode.
S1602:判断是否检测到实体卡。S1602: Determine whether the physical card is detected.
智能手环20判断是否检测到实体卡,如果检测到,则转至步骤S1603,否则重复步骤S1602继续检测。The smart bracelet 20 determines whether the physical card is detected. If detected, the process goes to step S1603. Otherwise, step S1602 is repeated to continue detection.
例如,智能手环20可以在检测到近场通信信号的情况下,确定检测到实体卡。For example, the smart bracelet 20 may determine that the physical card is detected when a near field communication signal is detected.
S1603:判断是否支持该实体卡。S1603: Determine whether the physical card is supported.
智能手环20判断是否支持该实体卡,如果支持,转至步骤S1605,否则转至步骤S1604。The smart bracelet 20 determines whether the physical card is supported. If so, go to step S1605; otherwise, go to step S1604.
在一些实施例中,智能手环20可以根据实体卡的类型,确定是否支持该实体卡。例如智能手环20可以获取实体卡的SAK,并在获取的SAK在智能手环20支持的SAK的列表中时,确定智能手环20支持该实体卡。In some embodiments, the smart bracelet 20 can determine whether to support the physical card based on the type of the physical card. For example, the smart bracelet 20 can obtain the SAK of the physical card, and when the obtained SAK is in the list of SAKs supported by the smart bracelet 20, it is determined that the smart bracelet 20 supports the physical card.
S1604:提示开卡失败。S1604: Prompt card activation failed.
智能手环20在确定出智能手环20不支持当前的实体卡时,提示开卡失败。例如,智能手环20通过呼吸灯、提示音、显示提示消息、振动等方式,提示用户开卡失败。When the smart bracelet 20 determines that the smart bracelet 20 does not support the current physical card, it prompts that the card activation fails. For example, the smart bracelet 20 prompts the user to fail to open a card through breathing light, prompt sound, display prompt message, vibration, etc.
S1605:获取实体卡的卡片信息,并将卡片信息存储到存储器202中。S1605: Obtain the card information of the physical card and store the card information in the memory 202.
智能手环20在确定出智能手环20支持当前的实体卡时,获取实体卡的卡片信息,并将卡片信息存储到存储器202中。其中,实体卡的卡片信息包括但不限于实体卡的UID、AID、SAK等。When the smart bracelet 20 determines that the smart bracelet 20 supports the current physical card, it obtains the card information of the physical card and stores the card information in the memory 202 . Among them, the card information of the physical card includes but is not limited to the UID, AID, SAK, etc. of the physical card.
可以理解,对于部分智能手环20,还可以通过与智能手环20连接的电子设备,将该电子设备中存储的卡片信息分享给智能手环20。It can be understood that for some smart bracelets 20 , the card information stored in the electronic device can also be shared with the smart bracelet 20 through an electronic device connected to the smart bracelet 20 .
通过本申请实施例提供的开卡方法,智能手环20即使没有eSE芯片,也可以将不具备AID的模拟卡的卡片信息存储到存储器中,以便于通过图12所示的实施例提供的方法来模拟不具备AID的模拟卡,实现刷卡,提升了用户体验。Through the card opening method provided by the embodiment of the present application, even if the smart bracelet 20 does not have an eSE chip, the card information of the simulated card without AID can be stored in the memory, so as to facilitate the method provided by the embodiment shown in Figure 12 To simulate a simulated card without AID, realize card swiping and improve the user experience.
进一步,图17根据本申请的一些实施例,示出了一种手机10的结构示意图。Further, FIG. 17 shows a schematic structural diagram of a mobile phone 10 according to some embodiments of the present application.
如图17所示,手机10可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导 传感器180M等等。As shown in Figure 17, the mobile phone 10 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, and a battery 142. Antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone interface 170D, sensor module 180, button 190, motor 191, indicator 192, camera 193, Display 194, and subscriber identification module (subscriber identification module, SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyro sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, and ambient light. Sensor 180L, bone conduction Sensor 180M and so on.
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processing unit (GPU), and an image signal processor. (image signal processor, ISP), controller, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural network processor (neural-network processing unit, NPU), etc. Among them, different processing units can be independent devices or integrated in one or more processors.
控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。The controller can generate operation control signals based on the instruction operation code and timing signals to complete the control of fetching and executing instructions.
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。在一些实施例中,处理器110可以调用并执行存储器中存储的本申请各实施例提供的基于NFC的刷卡方法的执行指令,以实现本申请实施例所提供的基于NFC的刷卡方法。The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in processor 110 is cache memory. This memory may hold instructions or data that have been recently used or recycled by processor 110 . If the processor 110 needs to use the instructions or data again, it can be called directly from the memory. Repeated access is avoided and the waiting time of the processor 110 is reduced, thus improving the efficiency of the system. In some embodiments, the processor 110 can call and execute the execution instructions of the NFC-based card swiping method provided by various embodiments of the present application stored in the memory to implement the NFC-based card swiping method provided by the embodiments of the present application.
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,串行外设接口(Serial Peripheral Interface,SPI),通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。In some embodiments, processor 110 may include one or more interfaces. Interfaces can include integrated circuit (inter-integrated circuit, I2C) interface, integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, pulse code modulation (pulse code modulation, PCM) interface, serial peripheral interface (Serial Peripheral) Interface (SPI), universal asynchronous receiver/transmitter (UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, Subscriber identity module (SIM) interface, and/or universal serial bus (USB) interface, etc.
I2C接口是一种双向同步串行总线,包括一根串行数据线(serial data line,SDA)和一根串行时钟线(derail clock line,SCL)。在一些实施例中,处理器110可以包含多组I2C总线。处理器110可以通过不同的I2C总线接口分别耦合触摸传感器180K,充电器,闪光灯,摄像头193、NFC控制器等。例如:处理器110可以通过I2C接口耦合NFC控制器,以从NFC控制器获取卡片信息或向NFC控制器写入卡片信息。The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (derail clock line, SCL). In some embodiments, processor 110 may include multiple sets of I2C buses. The processor 110 can separately couple the touch sensor 180K, charger, flash, camera 193, NFC controller, etc. through different I2C bus interfaces. For example, the processor 110 can be coupled to the NFC controller through the I2C interface to obtain card information from the NFC controller or write card information to the NFC controller.
I2S接口可以用于音频通信。在一些实施例中,处理器110可以包含多组I2S总线。处理器110可以通过I2S总线与音频模块170耦合,实现处理器110与音频模块170之间的通信。在一些实施例中,音频模块170可以通过I2S接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。The I2S interface can be used for audio communication. In some embodiments, processor 110 may include multiple sets of I2S buses. The processor 110 can be coupled with the audio module 170 through the I2S bus to implement communication between the processor 110 and the audio module 170 . In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 through the I2S interface to implement the function of answering calls through a Bluetooth headset.
PCM接口也可以用于音频通信,将模拟信号抽样,量化和编码。在一些实施例中,音频模块170与无线通信模块160可以通过PCM总线接口耦合。在一些实施例中,音频模块170也可以通过PCM接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。所述I2S接口和所述PCM接口都可以用于音频通信。The PCM interface can also be used for audio communications to sample, quantize and encode analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 may be coupled through a PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 through the PCM interface to implement the function of answering calls through a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
SPI接口最早由MotorolaTM首先提出的全双工三线同步串行外围接口,采用主从模式(Master—Slave)架构,支持一个或多个Slave设备。在一些实施例中,SPI接口可以用于耦合eSE,以便于可信应用可以从eSE中获取卡片信息或向eSE中写入卡片信息。The SPI interface is a full-duplex three-wire synchronous serial peripheral interface first proposed by Motorola TM . It adopts a master-slave mode (Master-Slave) architecture and supports one or more Slave devices. In some embodiments, the SPI interface can be used to couple the eSE so that the trusted application can obtain card information from the eSE or write card information to the eSE.
UART接口是一种通用串行数据总线,用于异步通信。该总线可以为双向通信总线。它将要传输的数据在串行通信与并行通信之间转换。在一些实施例中,UART接口通常被用于连接处理器110与无线通信模块160。例如:处理器110通过UART接口与无线通信模块160中的蓝牙模块通信,实现蓝牙功能。在一些实施例中,音频模块170可以通过UART接口向无线通信模块160传递音频信号,实现通过蓝牙耳机播放音乐的功能。The UART interface is a universal serial data bus used for asynchronous communication. The bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, a UART interface is generally used to connect the processor 110 and the wireless communication module 160 . For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to implement the Bluetooth function. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 through the UART interface to implement the function of playing music through a Bluetooth headset.
MIPI接口可以被用于连接处理器110与显示屏194,摄像头193等外围器件。MIPI接口包括摄像头串 行接口(camera serial interface,CSI),显示屏串行接口(display serial interface,DSI)等。在一些实施例中,处理器110和摄像头193通过CSI接口通信,实现手机10的拍摄功能。处理器110和显示屏194通过DSI接口通信,实现手机10的显示功能。The MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193 . MIPI interface includes camera string serial interface (camera serial interface, CSI), display serial interface (display serial interface, DSI), etc. In some embodiments, the processor 110 and the camera 193 communicate through the CSI interface to implement the shooting function of the mobile phone 10 . The processor 110 and the display screen 194 communicate through the DSI interface to realize the display function of the mobile phone 10 .
GPIO接口可以通过软件配置。GPIO接口可以被配置为控制信号,也可被配置为数据信号。在一些实施例中,GPIO接口可以用于连接处理器110与摄像头193,显示屏194,无线通信模块160,音频模块170,传感器模块180等。GPIO接口还可以被配置为I2C接口,I2S接口,UART接口,MIPI接口等。The GPIO interface can be configured through software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 with the camera 193, display screen 194, wireless communication module 160, audio module 170, sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, I2S interface, UART interface, MIPI interface, etc.
USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口130可以用于连接充电器为手机10充电,也可以用于手机10与外围设备之间传输数据。也可以用于连接耳机,通过耳机播放音频。该接口还可以用于连接其他电子设备,例如AR设备等。The USB interface 130 is an interface that complies with the USB standard specification, and may be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the mobile phone 10, and can also be used to transmit data between the mobile phone 10 and peripheral devices. It can also be used to connect headphones to play audio through them. This interface can also be used to connect other electronic devices, such as AR devices, etc.
充电管理模块140用于从充电器接收充电输入。充电管理模块140为电池142充电的同时,还可以通过电源管理模块141为电子设备供电。The charging management module 140 is used to receive charging input from the charger. While the charging management module 140 charges the battery 142, it can also provide power to the electronic device through the power management module 141.
电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,显示屏194,摄像头193,和无线通信模块160等供电。The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and/or the charging management module 140, and supplies power to the processor 110, the internal memory 121, the display screen 194, the camera 193, the wireless communication module 160, and the like.
手机10的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。The wireless communication function of the mobile phone 10 can be realized through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.
天线1和天线2用于发射和接收电磁波信号。Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals.
移动通信模块150可以提供应用在手机10上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。The mobile communication module 150 can provide wireless communication solutions including 2G/3G/4G/5G applied on the mobile phone 10 . The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves through the antenna 1, perform filtering, amplification and other processing on the received electromagnetic waves, and transmit them to the modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves through the antenna 1 for radiation. In some embodiments, at least part of the functional modules of the mobile communication module 150 may be disposed in the processor 110 . In some embodiments, at least part of the functional modules of the mobile communication module 150 and at least part of the modules of the processor 110 may be provided in the same device.
无线通信模块160可以提供应用在手机10上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),NFC,红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。The wireless communication module 160 can provide applications on the mobile phone 10 including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) network), Bluetooth (bluetooth, BT), and global navigation satellite system. (global navigation satellite system, GNSS), frequency modulation (FM), NFC, infrared technology (infrared, IR) and other wireless communication solutions. The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2 , frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110 . The wireless communication module 160 can also receive the signal to be sent from the processor 110, frequency modulate it, amplify it, and convert it into electromagnetic waves through the antenna 2 for radiation.
其中NFC的解决方案可以由前述图3、图7所示的技术架构来实现。例如,在一些实施中,硬件层可以包括前述eSE 13和NFC控制器14。The NFC solution can be implemented by the technical architecture shown in Figure 3 and Figure 7 mentioned above. For example, in some implementations, the hardware layer may include the aforementioned eSE 13 and NFC controller 14.
手机10通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。The mobile phone 10 implements display functions through the GPU, the display screen 194, and the application processor. The GPU is an image processing microprocessor and is connected to the display screen 194 and the application processor. GPUs are used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED), 柔性发光二极管(flex light-emitting diode,FLED),Mini-LED,Micro-LED,Micro-OLED,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,手机10可以包括1个或N个显示屏194,N为大于1的正整数。The display screen 194 is used to display images, videos, etc. Display 194 includes a display panel. The display panel can use a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active matrix organic light emitting diode or an active matrix organic light emitting diode (active-matrix organic light). emitting diode, AMOLED), Flexible light-emitting diodes (FLED), Mini-LED, Micro-LED, Micro-OLED, quantum dot light emitting diodes (QLED), etc. In some embodiments, the mobile phone 10 may include 1 or N display screens 194, where N is a positive integer greater than 1.
摄像头193用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。在一些实施例中,手机10可以包括1个或N个摄像头193,N为大于1的正整数。Camera 193 is used to capture still images or video. The object passes through the lens to produce an optical image that is projected onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP to convert it into a digital image signal. ISP outputs digital image signals to DSP for processing. DSP converts digital image signals into standard RGB, YUV and other format image signals. In some embodiments, the mobile phone 10 may include 1 or N cameras 193, where N is a positive integer greater than 1.
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展手机10的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the mobile phone 10 . The external memory card communicates with the processor 110 through the external memory interface 120 to implement the data storage function. Such as saving music, videos, etc. files in external memory card.
内部存储器121可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令,例如前述存储器103。内部存储器121可以包括程序存储区和数据存储区。其中,程序存储区可存储操作系统,至少一个功能所需的应用程序(比如前述钱包应用11A、钱包应用TA 12A)等。数据存储区可存储手机10使用过程中所创建的数据(比如前述各模拟卡的卡片信息)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。处理器110通过运行存储在内部存储器121的指令,和/或存储在设置于处理器110中的存储器的指令,执行手机10的各种功能应用。Internal memory 121 may be used to store computer executable program code including instructions, such as the aforementioned memory 103 . Internal memory 121 may include program storage areas and data storage areas. Among them, the program storage area can store the operating system, at least one application required for the function (such as the aforementioned wallet application 11A, wallet application TA 12A), etc. The data storage area can store data created during the use of the mobile phone 10 (such as the card information of the aforementioned simulation cards), etc. In addition, the internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc. The processor 110 executes various functional applications of the mobile phone 10 by executing instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor 110 .
手机10可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。The mobile phone 10 can implement audio functions through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone interface 170D, and the application processor. Such as music playback, recording, etc.
音频模块170用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块170还可以用于对音频信号编码和解码。The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. Audio module 170 may also be used to encode and decode audio signals.
扬声器170A,也称“喇叭”,用于将音频电信号转换为声音信号。例如,在一些实施例中,扬声器170A可以用于向用户播放刷卡成功/失败的提示音。Speaker 170A, also called "speaker", is used to convert audio electrical signals into sound signals. For example, in some embodiments, the speaker 170A may be used to play a prompt sound indicating success/failure of a card swipe to the user.
受话器170B,也称“听筒”,用于将音频电信号转换成声音信号。Receiver 170B, also called "earpiece", is used to convert audio electrical signals into sound signals.
麦克风170C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。Microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals.
耳机接口170D用于连接有线耳机。The headphone interface 170D is used to connect wired headphones.
压力传感器180A用于感受压力信号,可以将压力信号转换成电信号。在一些实施例中,压力传感器180A可以设置于显示屏194。压力传感器180A的种类很多,如电阻式压力传感器,电感式压力传感器,电容式压力传感器等。电容式压力传感器可以是包括至少两个具有导电材料的平行板。当有力作用于压力传感器180A,电极之间的电容改变。手机10根据电容的变化确定压力的强度。当有触摸操作作用于显示屏194,手机10根据压力传感器180A检测所述触摸操作强度。手机10也可以根据压力传感器180A的检测信号计算触摸的位置。在一些实施例中,作用于相同触摸位置,但不同触摸操作强度的触摸操作,可以对应不同的操作指令。The pressure sensor 180A is used to sense pressure signals and can convert the pressure signals into electrical signals. In some embodiments, pressure sensor 180A may be disposed on display screen 194 . There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. A capacitive pressure sensor may include at least two parallel plates of conductive material. When a force is applied to pressure sensor 180A, the capacitance between the electrodes changes. The mobile phone 10 determines the intensity of the pressure based on changes in capacitance. When a touch operation is performed on the display screen 194, the mobile phone 10 detects the intensity of the touch operation according to the pressure sensor 180A. The mobile phone 10 can also calculate the touch position based on the detection signal of the pressure sensor 180A. In some embodiments, touch operations acting on the same touch location but with different touch operation intensities may correspond to different operation instructions.
加速度传感器180E可检测手机10在各个方向上(一般为三轴)加速度的大小。当手机10静止时可检测出重力的大小及方向。还可以用于识别电子设备姿态,应用于横竖屏切换,计步器等应用。The acceleration sensor 180E can detect the acceleration of the mobile phone 10 in various directions (generally three axes). When the mobile phone 10 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of electronic devices and be used in horizontal and vertical screen switching, pedometer and other applications.
环境光传感器180L用于感知环境光亮度。手机10可以根据感知的环境光亮度自适应调节显示屏194亮度。环境光传感器180L也可用于拍照时自动调节白平衡。环境光传感器180L还可以与接近光传感器 180G配合,检测手机10是否在口袋里,以防误触。The ambient light sensor 180L is used to sense ambient light brightness. The mobile phone 10 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness. The ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures. The ambient light sensor 180L also works with a proximity light sensor 180G cooperates to detect whether the mobile phone 10 is in the pocket to prevent accidental touching.
指纹传感器180H用于采集指纹。手机10可以利用采集的指纹特性实现指纹解锁,访问应用锁,指纹拍照,指纹接听来电等。在本申请实施例中,主空间和隐私空间可以采用不同的解锁指纹进行验证登录,以保障隐私空间内隐私数据的安全性。用户可以在手机10上验证不同的指纹分别进入主空间和隐私空间。Fingerprint sensor 180H is used to collect fingerprints. Mobile phone 10 can use the collected fingerprint characteristics to achieve fingerprint unlocking, access to application locks, fingerprint photography, fingerprint answering incoming calls, etc. In the embodiment of this application, the main space and the private space can use different unlocking fingerprints for verification and login to ensure the security of private data in the private space. Users can verify different fingerprints on the mobile phone 10 to enter the main space and private space respectively.
触摸传感器180K,也称“触控器件”。触摸传感器180K可以设置于显示屏194,由触摸传感器180K与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180K用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180K也可以设置于手机10的表面,与显示屏194所处的位置不同。Touch sensor 180K, also known as "touch device". The touch sensor 180K can be disposed on the display screen 194. The touch sensor 180K and the display screen 194 form a touch screen, which is also called a "touch screen". The touch sensor 180K is used to detect a touch operation on or near the touch sensor 180K. The touch sensor can pass the detected touch operation to the application processor to determine the touch event type. Visual output related to the touch operation may be provided through display screen 194 . In other embodiments, the touch sensor 180K may also be disposed on the surface of the mobile phone 10 in a position different from that of the display screen 194 .
骨传导传感器180M可以获取振动信号。在一些实施例中,骨传导传感器180M可以获取人体声部振动骨块的振动信号。骨传导传感器180M也可以接触人体脉搏,接收血压跳动信号。Bone conduction sensor 180M can acquire vibration signals. In some embodiments, the bone conduction sensor 180M can acquire the vibration signal of the vibrating bone mass of the human body's vocal part. The bone conduction sensor 180M can also contact the human body's pulse and receive blood pressure beating signals.
按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。手机10可以接收按键输入,产生与手机10的用户设置以及功能控制有关的键信号输入。例如,在一些实施例中,手机10在手机10处于熄屏状态连续两次按下开机键时,触发本申请实施例提供的基于NFC的刷卡方法。The buttons 190 include a power button, a volume button, etc. Key 190 may be a mechanical key. It can also be a touch button. The mobile phone 10 can receive key input and generate key signal input related to user settings and function control of the mobile phone 10 . For example, in some embodiments, when the mobile phone 10 presses the power button twice in a row while the screen is off, the NFC-based card swiping method provided by the embodiments of the present application is triggered.
马达191可以产生振动提示。例如,在一些实施例中,手机10可以在用户刷卡成功/失败时,通过振动来提示用户。The motor 191 can generate vibration prompts. For example, in some embodiments, the mobile phone 10 can prompt the user by vibrating when the user successfully/fails to swipe the card.
指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。例如,例如,在一些实施例中,手机10可以在用户刷卡成功/失败时,通过将指示灯设置不同的颜色来提示用户。The indicator 192 may be an indicator light, which may be used to indicate charging status, power changes, or may be used to indicate messages, missed calls, notifications, etc. For example, in some embodiments, the mobile phone 10 can prompt the user by setting the indicator light to different colors when the user successfully/fails to swipe the card.
SIM卡接口195用于连接SIM卡。The SIM card interface 195 is used to connect a SIM card.
可以理解,本申请实施例示出的手机10的结构并不构成对手机10的具体限定。在本申请另一些实施例中,手机10可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It can be understood that the structure of the mobile phone 10 shown in the embodiment of the present application does not constitute a specific limitation on the mobile phone 10 . In other embodiments of the present application, the mobile phone 10 may include more or less components than shown in the figures, or some components may be combined, some components may be separated, or some components may be arranged differently. The components illustrated may be implemented in hardware, software, or a combination of software and hardware.
本申请公开的机制的各实施例可以被实现在硬件、软件、固件或这些实现方法的组合中。本申请的实施例可实现为在可编程系统上执行的计算机程序或程序代码,该可编程系统包括至少一个处理器、存储系统(包括易失性和非易失性存储器和/或存储元件)、至少一个输入设备以及至少一个输出设备。Various embodiments of the mechanisms disclosed in this application may be implemented in hardware, software, firmware, or a combination of these implementation methods. Embodiments of the present application may be implemented as a computer program or program code executing on a programmable system including at least one processor, a storage system (including volatile and non-volatile memory and/or storage elements) , at least one input device and at least one output device.
可将程序代码应用于输入指令,以执行本申请描述的各功能并生成输出信息。可以按已知方式将输出信息应用于一个或多个输出设备。为了本申请的目的,处理系统包括具有诸如例如数字信号处理器(DSP)、微控制器、专用集成电路(ASIC)或微处理器之类的处理器的任何系统。Program code may be applied to input instructions to perform the functions described herein and to generate output information. Output information can be applied to one or more output devices in a known manner. For the purposes of this application, a processing system includes any system having a processor such as, for example, a digital signal processor (DSP), a microcontroller, an application specific integrated circuit (ASIC), or a microprocessor.
程序代码可以用高级程序化语言或面向对象的编程语言来实现,以便与处理系统通信。在需要时,也可用汇编语言或机器语言来实现程序代码。事实上,本申请中描述的机制不限于任何特定编程语言的范围。在任一情形下,该语言可以是编译语言或解释语言。Program code may be implemented in a high-level procedural language or an object-oriented programming language to communicate with the processing system. When necessary, assembly language or machine language can also be used to implement program code. In fact, the mechanisms described in this application are not limited to the scope of any particular programming language. In either case, the language may be a compiled or interpreted language.
在一些情况下,所公开的实施例可以以硬件、固件、软件或其任何组合来实现。所公开的实施例还可以被实现为由一个或多个暂时或非暂时性机器可读(例如,计算机可读)存储介质承载或存储在其上的指令,其可以由一个或多个处理器读取和执行。例如,指令可以通过网络或通过其他计算机可读介质分发。因此,机器可读介质可以包括用于以机器(例如,计算机)可读的形式存储或传输信息的任何机制,包括但不限于,软盘、光盘、光碟、只读存储器(CD-ROMs)、磁光盘、只读存储器(ROM)、随机存取存储器(RAM)、可擦除可编程只读存储器(EPROM)、电可擦除可编程只读存储器(EEPROM)、磁卡或 光卡、闪存、或用于利用因特网以电、光、声或其他形式的传播信号来传输信息(例如,载波、红外信号数字信号等)的有形的机器可读存储器。因此,机器可读介质包括适合于以机器(例如,计算机)可读的形式存储或传输电子指令或信息的任何类型的机器可读介质。In some cases, the disclosed embodiments may be implemented in hardware, firmware, software, or any combination thereof. The disclosed embodiments may also be implemented as instructions carried on or stored on one or more transitory or non-transitory machine-readable (e.g., computer-readable) storage media, which may be operated by one or more processors Read and execute. For example, instructions may be distributed over a network or through other computer-readable media. Thus, machine-readable media may include any mechanism for storing or transmitting information in a form readable by a machine (e.g., a computer), including, but not limited to, floppy disks, optical disks, optical disks, read-only memories (CD-ROMs), magnetic Optical disc, read only memory (ROM), random access memory (RAM), erasable programmable read only memory (EPROM), electrically erasable programmable read only memory (EEPROM), magnetic card or Optical card, flash memory, or tangible machine-readable memory used to transmit information using electrical, optical, acoustic, or other forms of propagation signals (e.g., carrier waves, infrared signals, digital signals, etc.) using the Internet. Thus, machine-readable media includes any type of machine-readable media suitable for storing or transmitting electronic instructions or information in a form readable by a machine (eg, computer).
在附图中,可以以特定布置和/或顺序示出一些结构或方法特征。然而,应该理解,可能不需要这样的特定布置和/或排序。而是,在一些实施例中,这些特征可以以不同于说明性附图中所示的方式和/或顺序来布置。另外,在特定图中包括结构或方法特征并不意味着暗示在所有实施例中都需要这样的特征,并且在一些实施例中,可以不包括这些特征或者可以与其他特征组合。In the drawings, some structural or methodological features may be shown in specific arrangements and/or orders. However, it should be understood that such specific arrangement and/or ordering may not be required. Rather, in some embodiments, the features may be arranged in a manner and/or order different than that shown in the illustrative figures. Additionally, the inclusion of structural or methodological features in a particular figure is not meant to imply that such features are required in all embodiments, and in some embodiments these features may not be included or may be combined with other features.
需要说明的是,本申请各设备实施例中提到的各单元/模块都是逻辑单元/模块,在物理上,一个逻辑单元/模块可以是一个物理单元/模块,也可以是一个物理单元/模块的一部分,还可以以多个物理单元/模块的组合实现,这些逻辑单元/模块本身的物理实现方式并不是最重要的,这些逻辑单元/模块所实现的功能的组合才是解决本申请所提出的技术问题的关键。此外,为了突出本申请的创新部分,本申请上述各设备实施例并没有将与解决本申请所提出的技术问题关系不太密切的单元/模块引入,这并不表明上述设备实施例并不存在其它的单元/模块。It should be noted that each unit/module mentioned in each device embodiment of this application is a logical unit/module. Physically, a logical unit/module can be a physical unit/module, or it can be a physical unit/module. Part of the module can also be implemented as a combination of multiple physical units/modules. The physical implementation of these logical units/modules is not the most important. The combination of functions implemented by these logical units/modules is what solves the problem of this application. Key technical issues raised. In addition, in order to highlight the innovative part of this application, the above-mentioned equipment embodiments of this application do not introduce units/modules that are not closely related to solving the technical problems raised by this application. This does not mean that the above-mentioned equipment embodiments do not exist. Other units/modules.
需要说明的是,在本专利的示例和说明书中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。It should be noted that in the examples and descriptions of this patent, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply There is no such actual relationship or sequence between these entities or operations. Furthermore, the terms "comprises," "comprises," or any other variations thereof are intended to cover a non-exclusive inclusion such that a process, method, article, or apparatus that includes a list of elements includes not only those elements, but also those not expressly listed other elements, or elements inherent to the process, method, article or equipment. Without further limitation, an element defined by the statement "comprises a" does not exclude the presence of additional identical elements in a process, method, article, or device that includes the stated element.
虽然通过参照本申请的某些优选实施例,已经对本申请进行了图示和描述,但本领域的普通技术人员应该明白,可以在形式上和细节上对其作各种改变,而不偏离本申请的精神和范围。 Although the present application has been illustrated and described with reference to certain preferred embodiments thereof, it will be understood by those of ordinary skill in the art that various changes may be made in form and detail without departing from the present invention. The spirit and scope of the application.

Claims (21)

  1. 一种基于NFC的刷卡方法,其特征在于,包括:An NFC-based card swiping method is characterized by including:
    电子设备进入卡模拟模式,其中,所述电子设备上存储有多张第一类模拟卡的卡片信息;The electronic device enters the card simulation mode, wherein the card information of multiple first-type simulation cards is stored on the electronic device;
    当所述电子设备未接收到业务标识时,所述电子设备从所述多张第一类模拟卡中逐个选择所述第一类模拟卡进行模拟。When the electronic device does not receive the service identification, the electronic device selects the first-type simulation cards one by one from the plurality of first-type simulation cards for simulation.
  2. 根据权利要求1所述的方法,其特征在于,所述电子设备从所述多张第一类模拟卡中逐个选择所述第一类模拟卡进行模拟,包括:The method of claim 1, wherein the electronic device selects the first-type simulation cards one by one from the plurality of first-type simulation cards for simulation, including:
    所述电子设备逐个从所述多张第一类模拟卡中选择出第一类模拟卡进行卡模拟,直至满足预设终止条件。The electronic device selects the first-type simulation cards from the plurality of first-type simulation cards one by one to perform card simulation until the preset termination conditions are met.
  3. 根据权利要求2中所述的方法,其特征在于,所述预设终止条件包括以下条件中的任意一个:The method according to claim 2, characterized in that the preset termination conditions include any one of the following conditions:
    所述电子设备进行卡模拟的时长超过预设时长;The duration for which the electronic device performs card simulation exceeds the preset duration;
    所述电子设备的NFC功能关闭;The NFC function of the electronic device is turned off;
    所述电子设备检测到刷卡成功;The electronic device detects that the card is successfully swiped;
    所述电子设备超过预设时长未检测到近场通信信号;The electronic device does not detect a near field communication signal for more than a preset time period;
    所述电子设备检测到用户的取消刷卡操作或指令。The electronic device detects the user's cancellation operation or instruction of card swiping.
  4. 根据权利要求1至3中任一项所述的方法,其特征在于,所述电子设备包括存储器;并且,所述第一类模拟卡的卡片信息存储于所述存储器中。The method according to any one of claims 1 to 3, characterized in that the electronic device includes a memory; and the card information of the first type of simulation card is stored in the memory.
  5. 根据权利要求4所述的方法,其特征在于,所述第一类模拟卡的卡片信息,由所述电子设备在对各所述第一类模拟卡开卡时,在未获取到业务标识的情况下,存储于所述存储器中。The method according to claim 4, characterized in that the card information of the first type of simulation card is obtained by the electronic device when the business identification is not obtained when opening each of the first type of simulation cards. case, stored in the memory.
  6. 根据权利要求5所述的方法,其特征在于,所述电子设备还包括NFC控制器;并且,所述电子设备从所述多张第一类模拟卡中逐个选择所述第一类模拟卡进行模拟,包括:The method of claim 5, wherein the electronic device further includes an NFC controller; and the electronic device selects the first-type simulation cards one by one from the plurality of first-type simulation cards. Simulations, including:
    所述电子设备从所述存储器中逐个获取各所述第一类模拟卡的卡片信息,并将获取的卡片信息写入到所述NFC控制器中进行卡模拟。The electronic device obtains the card information of each of the first-type simulated cards one by one from the memory, and writes the obtained card information into the NFC controller to perform card simulation.
  7. 根据权利要求1至3中任一项所述的方法,其特征在于,所述电子设备包括安全单元SE或嵌入式安全单元eSE;并且,所述第一类模拟卡的卡片信息存储于所述安全单元SE或嵌入式安全单元eSE中。The method according to any one of claims 1 to 3, characterized in that the electronic device includes a security unit SE or an embedded security unit eSE; and the card information of the first type of simulation card is stored in the Security unit SE or embedded security unit eSE.
  8. 根据权利要求7所述的方法,其特征在于,所述电子设备的可信执行环境中运行有可信应用,所述电子设备还包括NFC控制器;并且,所述电子设备从所述多张第一类模拟卡中逐个选择所述第一类模拟卡进行模拟,包括:The method according to claim 7, characterized in that a trusted application runs in a trusted execution environment of the electronic device, the electronic device further includes an NFC controller; and, the electronic device obtains the information from the plurality of The first type of simulation cards are selected one by one from the first type of simulation cards for simulation, including:
    所述电子设备利用所述可信应用、所述安全单元SE或所述嵌入式安全单元eSE,逐个将所述第一类模拟卡的卡片信息写入到所述NFC控制器中进行卡模拟。The electronic device uses the trusted application, the security unit SE or the embedded security unit eSE to write the card information of the first type of simulation card into the NFC controller one by one to perform card simulation.
  9. 根据权利要求1至8中任一项所述的方法,其特征在于,所述卡片信息包括唯一标识符UID;所述业务标识包括应用标识符AID。The method according to any one of claims 1 to 8, wherein the card information includes a unique identifier UID; and the service identifier includes an application identifier AID.
  10. 根据权利要求1至8中任一项所述的方法,其特征在于,所述电子设备在检测到用户在所述电子设备上预设的操作和/或检测到近场通信信号的情况下,进入卡模拟模式。The method according to any one of claims 1 to 8, characterized in that, when the electronic device detects a user's preset operation on the electronic device and/or detects a near field communication signal, Enter card emulation mode.
  11. 一种电子设备,其特征在于,所述电子设备中存储有多张第一类模拟卡的卡片信息,所述电子设备包括:An electronic device, characterized in that the electronic device stores card information of multiple first-type analog cards, and the electronic device includes:
    存储器,所述存储器中存储有指令;A memory in which instructions are stored;
    以及处理器,用于执行所述指令使所述电子设备在进入卡模拟模式后,当所述电子设备未接收 到业务标识时,从所述多张第一类模拟卡中逐个选择所述第一类模拟卡进行模拟。and a processor, configured to execute the instruction so that after the electronic device enters the card emulation mode, when the electronic device does not receive When the service identification is reached, the first-type simulation cards are selected one by one from the plurality of first-type simulation cards for simulation.
  12. 根据权利要求11所述的电子设备,其特征在于,所述从所述多张第一类模拟卡中逐个选择所述第一类模拟卡进行模拟,包括:The electronic device according to claim 11, characterized in that, selecting the first-type simulation cards one by one from the plurality of first-type simulation cards for simulation includes:
    所述电子设备逐个从所述多张第一类模拟卡中选择出第一类模拟卡进行卡模拟,直至满足预设终止条件。The electronic device selects the first-type simulation cards from the plurality of first-type simulation cards one by one to perform card simulation until the preset termination conditions are met.
  13. 根据权利要求12中所述的电子设备,其特征在于,所述预设终止条件包括以下条件中的任意一个:The electronic device according to claim 12, wherein the preset termination condition includes any one of the following conditions:
    所述电子设备进行卡模拟的时长超过预设时长;The duration for which the electronic device performs card simulation exceeds the preset duration;
    所述电子设备的NFC功能关闭;The NFC function of the electronic device is turned off;
    所述电子设备检测到刷卡成功;The electronic device detects that the card is successfully swiped;
    所述电子设备超过预设时长未检测到近场通信信号;The electronic device does not detect a near field communication signal for more than a preset time period;
    所述电子设备检测到用户的取消刷卡操作或指令。The electronic device detects the user's cancellation operation or instruction of card swiping.
  14. 根据权利要求11至13中任一项所述的电子设备,其特征在于,所述第一类模拟卡的卡片信息存储于所述存储器中。The electronic device according to any one of claims 11 to 13, characterized in that the card information of the first type of simulation card is stored in the memory.
  15. 根据权利要求14所述的电子设备,其特征在于,所述第一类模拟卡的卡片信息,由所述电子设备在对各所述第一类模拟卡开卡时,在未获取到业务标识的情况下,存储于所述存储器中。The electronic device according to claim 14, characterized in that the card information of the first type of simulation card is obtained by the electronic device when the business identifier is not obtained when opening each of the first type of simulation cards. , stored in the memory.
  16. 根据权利要求15所述的电子设备,其特征在于,所述电子设备还包括NFC控制器;并且所述从所述多张第一类模拟卡中逐个选择所述第一类模拟卡进行模拟,包括:The electronic device according to claim 15, wherein the electronic device further includes an NFC controller; and the first-type simulation cards are selected one by one from the plurality of first-type simulation cards for simulation, include:
    所述电子设备从所述存储器中逐个获取各所述第一类模拟卡的卡片信息,并将获取的卡片信息写入到所述NFC控制器中进行卡模拟。The electronic device obtains the card information of each of the first-type simulated cards one by one from the memory, and writes the obtained card information into the NFC controller to perform card simulation.
  17. 根据权利要求11至13中任一项所述的电子设备,其特征在于,所述电子设备还包括安全单元SE或嵌入式安全单元eSE;并且,所述第一类模拟卡的卡片信息存储于所述安全单元SE或嵌入式安全单元eSE中。The electronic device according to any one of claims 11 to 13, characterized in that the electronic device further includes a security unit SE or an embedded security unit eSE; and the card information of the first type of simulation card is stored in The security unit SE or the embedded security unit eSE.
  18. 根据权利要求17所述的电子设备,其特征在于,所述电子设备的可信执行环境中运行有可信应用,所述电子设备还包括NFC控制器;并且所述从所述多张第一类模拟卡中逐个选择所述第一类模拟卡进行模拟,包括:The electronic device according to claim 17, characterized in that a trusted application runs in a trusted execution environment of the electronic device, the electronic device further includes an NFC controller; and the first The first type of simulation cards are selected one by one for simulation, including:
    所述电子设备利用所述可信应用、所述安全单元SE或所述嵌入式安全单元eSE,逐个将所述第一类模拟卡的卡片信息写入到所述NFC控制器中进行卡模拟。The electronic device uses the trusted application, the security unit SE or the embedded security unit eSE to write the card information of the first type of simulation card into the NFC controller one by one to perform card simulation.
  19. 根据权利要求11至18中任一项所述的电子设备,其特征在于,所述卡片信息包括唯一标识符UID;所述业务标识包括应用标识符AID。The electronic device according to any one of claims 11 to 18, wherein the card information includes a unique identifier UID; and the service identifier includes an application identifier AID.
  20. 根据权利要求11至18中任一项所述的电子设备,其特征在于,所述指令被所述处理器执行时,还使得所述电子设备在检测到用户在所述电子设备上预设的操作和/或检测到近场通信信号的情况下,控制所述电子设备进入卡模拟模式。The electronic device according to any one of claims 11 to 18, characterized in that, when the instruction is executed by the processor, the electronic device also causes the electronic device to detect that the user has preset on the electronic device. In case of operation and/or detection of a near field communication signal, the electronic device is controlled to enter a card emulation mode.
  21. 一种可读介质,其特征在于,所述可读介质上存储有指令,所述指令在电子设备上执行时使所述电子设备实现权利要求1至10中任一项所述的方法。 A readable medium, characterized in that instructions are stored on the readable medium, and when the instructions are executed on an electronic device, the electronic device implements the method described in any one of claims 1 to 10.
PCT/CN2023/084062 2022-04-02 2023-03-27 Nfc-based card swiping method, medium, and electronic device WO2023185731A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210352015.9 2022-04-02
CN202210352015.9A CN116933809A (en) 2022-04-02 2022-04-02 NFC-based card swiping method, medium and electronic equipment

Publications (1)

Publication Number Publication Date
WO2023185731A1 true WO2023185731A1 (en) 2023-10-05

Family

ID=88199332

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/084062 WO2023185731A1 (en) 2022-04-02 2023-03-27 Nfc-based card swiping method, medium, and electronic device

Country Status (2)

Country Link
CN (1) CN116933809A (en)
WO (1) WO2023185731A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107315609A (en) * 2017-06-22 2017-11-03 北京小米移动软件有限公司 The switching method and device of card analog functuion
CN111784335A (en) * 2020-07-17 2020-10-16 Oppo广东移动通信有限公司 Analog card management method, analog card management device, storage medium, and electronic apparatus
CN112069848A (en) * 2020-11-12 2020-12-11 深圳市汇顶科技股份有限公司 Card selection method, chip, terminal and storage medium for NFC card simulation mode
CN113541741A (en) * 2021-07-20 2021-10-22 西安易朴通讯技术有限公司 Analog card switching method and device, electronic equipment and storage medium
US20220038899A1 (en) * 2019-04-16 2022-02-03 Samsung Electronics Co., Ltd. Method for duplicating near field communication card and electronic device therefor

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107315609A (en) * 2017-06-22 2017-11-03 北京小米移动软件有限公司 The switching method and device of card analog functuion
US20220038899A1 (en) * 2019-04-16 2022-02-03 Samsung Electronics Co., Ltd. Method for duplicating near field communication card and electronic device therefor
CN111784335A (en) * 2020-07-17 2020-10-16 Oppo广东移动通信有限公司 Analog card management method, analog card management device, storage medium, and electronic apparatus
CN112069848A (en) * 2020-11-12 2020-12-11 深圳市汇顶科技股份有限公司 Card selection method, chip, terminal and storage medium for NFC card simulation mode
CN113541741A (en) * 2021-07-20 2021-10-22 西安易朴通讯技术有限公司 Analog card switching method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN116933809A (en) 2023-10-24

Similar Documents

Publication Publication Date Title
WO2020182065A1 (en) Shortcut function activation method and electronic device
WO2021031856A1 (en) Nfc-based communication method and device
JP7378598B2 (en) Near field communication methods and electronic devices
WO2021052290A1 (en) Volume adjustment method and electronic device
WO2021063237A1 (en) Control method for electronic device, and electronic device
WO2020238728A1 (en) Login method for intelligent terminal, and electronic device
CN112115444B (en) Unlocking method and electronic equipment
WO2021082564A1 (en) Operation prompt method and electronic device
WO2020015259A1 (en) Data backup method and terminal
WO2020047868A1 (en) Business processing method and device
CN110559645B (en) Application operation method and electronic equipment
EP4270184A1 (en) Cross-device authentication method and electronic devices
CN111124503A (en) Automatic activation method of NFC application and terminal
CN113452945A (en) Method and device for sharing application interface, electronic equipment and readable storage medium
CN112698756A (en) Display method of user interface and electronic equipment
WO2021082620A1 (en) Image recognition method and electronic device
CN113688019A (en) Response time duration detection method and device
CN111492678A (en) File transmission method and electronic equipment
WO2023185731A1 (en) Nfc-based card swiping method, medium, and electronic device
WO2023279830A1 (en) Fingerprint entry method and electronic device
WO2022165939A1 (en) Cross-device authentication method and electronic devices
CN116828100A (en) Bluetooth audio playing method, electronic equipment and storage medium
WO2024002137A1 (en) Communication method, communication system, and electronic device
WO2023193720A1 (en) Control method and central control equipment
WO2023185623A1 (en) Background application recovery method, apparatus, electronic device and readable storage medium

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: 23778098

Country of ref document: EP

Kind code of ref document: A1