[go: up one dir, main page]

CN107315609B - Card simulation function switching method and device - Google Patents

Card simulation function switching method and device Download PDF

Info

Publication number
CN107315609B
CN107315609B CN201710481700.0A CN201710481700A CN107315609B CN 107315609 B CN107315609 B CN 107315609B CN 201710481700 A CN201710481700 A CN 201710481700A CN 107315609 B CN107315609 B CN 107315609B
Authority
CN
China
Prior art keywords
card
storage area
function
option
information
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN201710481700.0A
Other languages
Chinese (zh)
Other versions
CN107315609A (en
Inventor
冯超
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software Co Ltd
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 Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN201710481700.0A priority Critical patent/CN107315609B/en
Publication of CN107315609A publication Critical patent/CN107315609A/en
Application granted granted Critical
Publication of CN107315609B publication Critical patent/CN107315609B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K19/00Record carriers for use with machines and with at least a part designed to carry digital markings
    • G06K19/06Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code
    • G06K19/067Record carriers with conductive marks, printed circuits or semiconductor circuit elements, e.g. credit or identity cards also with resonating or responding marks without active components
    • G06K19/07Record carriers with conductive marks, printed circuits or semiconductor circuit elements, e.g. credit or identity cards also with resonating or responding marks without active components with integrated circuit chips
    • G06K19/077Constructional details, e.g. mounting of circuits in the carrier
    • G06K19/07749Constructional details, e.g. mounting of circuits in the carrier the record carrier being capable of non-contact communication, e.g. constructional details of the antenna of a non-contact smart card
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Microelectronics & Electronic Packaging (AREA)
  • Facsimiles In General (AREA)
  • Telephone Function (AREA)

Abstract

本公开揭示了一种卡模拟功能的切换方法,属于近场通信技术领域。所述方法包括:展示卡模拟功能切换界面,切换界面中包含第一功能选项和第二功能选项,第一功能选项对应第一存储区域,第二功能选项对应第二存储区域,第一存储区域中存储有固定用户标识,第二存储区域中存储有随机用户标识;根据对目标选项执行的选择操作,将NFC组件对应的卡模拟功能切换为对应的卡模拟功能。通过设置不同的具有独立的存储区域的卡模拟功能,在对应的存储区域中分别存储固定用户标识和随即用户标识,根据切换操作来切换不同的卡模拟功能,从而实现在同一个电子设备中同时支持要求固定用户标识的卡模拟功能和要求随机用户标识的卡模拟功能的效果。

Figure 201710481700

The present disclosure discloses a switching method of a card simulation function, which belongs to the technical field of near field communication. The method includes: displaying a card simulation function switching interface, the switching interface includes a first function option and a second function option, the first function option corresponds to the first storage area, the second function option corresponds to the second storage area, the first storage area A fixed user identifier is stored in the second storage area, and a random user identifier is stored in the second storage area; according to the selection operation performed on the target option, the card emulation function corresponding to the NFC component is switched to the corresponding card emulation function. By setting different card emulation functions with independent storage areas, the fixed user ID and the random user ID are stored in the corresponding storage areas, and different card emulation functions are switched according to the switching operation, so as to realize the simultaneous operation of the same electronic device. Supports the effects of card emulation functions that require fixed user IDs and card emulation functions that require random user IDs.

Figure 201710481700

Description

卡模拟功能的切换方法及装置Card simulation function switching method and device

技术领域technical field

本公开涉及近场通信技术领域,特别涉及一种卡模拟功能的切换方法及装置。The present disclosure relates to the technical field of near field communication, and in particular, to a method and device for switching a card emulation function.

背景技术Background technique

卡模式(Card emulation,CE)是近场通信(Near Field Communication,NFC)功能的一种常用的工作模式,在卡模式下,支持NFC功能的电子设备(比如智能手机可以)可以模拟为一张采用射频识别(Radio Frequency Identification,RFID)技术的集成电路(integrated circuit,IC)卡。Card mode (Card emulation, CE) is a common working mode of Near Field Communication (NFC) function. In card mode, NFC-enabled electronic devices (such as smartphones) can be simulated as a An integrated circuit (IC) card using radio frequency identification (Radio Frequency Identification, RFID) technology.

在相关技术中,支持NFC功能的电子设备除了可以模拟为银行卡或者交通卡等用于支付的IC卡之外,还可以模拟为门禁卡。在模拟为门禁卡时,支持NFC功能的电子设备在读卡状态下读取门禁卡的信息,并将读取到的门禁卡的信息存储为NFC功能的用户标识(uid),后续刷门禁卡时,NFC组件可以将存储的uid提供给门禁卡的读卡器。In the related art, an electronic device supporting the NFC function can be simulated as an IC card for payment, such as a bank card or a transportation card, and also as an access control card. When simulating as an access control card, the electronic device supporting the NFC function reads the information of the access control card in the card reading state, and stores the read information of the access control card as the user ID (uid) of the NFC function. , the NFC component can provide the stored uid to the reader of the access control card.

发明内容SUMMARY OF THE INVENTION

本公开提供一种卡模拟功能的切换方法及装置。所述技术方案如下:The present disclosure provides a method and device for switching a card emulation function. The technical solution is as follows:

根据本公开实施例的第一方面,提供了一种卡模拟功能的切换方法,所述方法包括:According to a first aspect of the embodiments of the present disclosure, a method for switching a card emulation function is provided, and the method includes:

展示卡模拟功能切换界面,所述切换界面中包含第一功能选项和第二功能选项,所述第一功能选项对应第一存储区域,所述第二功能选项对应第二存储区域,所述第一存储区域中存储有固定用户标识,所述第二存储区域中存储有随机用户标识;The display card simulates a function switching interface, the switching interface includes a first function option and a second function option, the first function option corresponds to the first storage area, the second function option corresponds to the second storage area, and the first function option corresponds to the second storage area. A fixed user identifier is stored in a storage area, and a random user identifier is stored in the second storage area;

根据对所述切换界面中的目标选项执行的选择操作,将电子设备的近场通信NFC组件对应的卡模拟功能切换为所述目标选项对应的卡模拟功能,所述目标选项是所述第一功能选项或者所述第二功能选项。According to the selection operation performed on the target option in the switching interface, the card simulation function corresponding to the near field communication NFC component of the electronic device is switched to the card simulation function corresponding to the target option, where the target option is the first function option or the second function option.

可选的,当所述目标选项为所述第一功能选项时,所述方法还包括:Optionally, when the target option is the first functional option, the method further includes:

在接收到读卡设备对所述NFC组件的读卡操作时,将所述第一存储区域中存储的固定用户标识提供给所述读卡设备。When receiving the card reading operation of the NFC component by the card reading device, the fixed user identification stored in the first storage area is provided to the card reading device.

可选的,当所述目标选项为所述第二功能选项时,所述方法还包括:Optionally, when the target option is the second functional option, the method further includes:

在接收到读卡设备对所述NFC组件的读卡操作时,将所述第二存储区域中存储的随机用户标识以及卡片信息提供给所述读卡设备。When receiving a card reading operation of the NFC component by a card reading device, the random user identification and card information stored in the second storage area are provided to the card reading device.

可选的,所述第一存储区域为主机卡模拟HCE功能对应的存储区域,所述第二存储区域为嵌入式安全模块eSE芯片中的存储区域或者客户识别模块SIM芯片中的存储区域;Optionally, the first storage area is a storage area corresponding to the host card simulating HCE function, and the second storage area is a storage area in the embedded security module eSE chip or a storage area in the customer identification module SIM chip;

或者,or,

所述第一存储区域为eSE芯片中的存储区域或者SIM芯片中的存储区域,所述第二存储区域为HCE功能对应的存储区域。The first storage area is the storage area in the eSE chip or the storage area in the SIM chip, and the second storage area is the storage area corresponding to the HCE function.

可选的,所述方法还包括:Optionally, the method further includes:

在接收到对所述第一功能选项的设置操作时,通过所述NFC组件读取卡片信息;When receiving the setting operation for the first function option, read the card information through the NFC component;

在成功读取到卡片信息后,将读取到的卡片信息存储为所述固定用户标识。After the card information is successfully read, the read card information is stored as the fixed user identification.

可选的,所述第一存储区域中存储的卡片信息为门禁卡的卡片信息。Optionally, the card information stored in the first storage area is card information of an access control card.

根据本公开实施例的第二方面,提供了一种卡模拟功能的切换装置,所述装置包括:According to a second aspect of the embodiments of the present disclosure, there is provided a device for switching a card emulation function, the device comprising:

界面展示模块,用于展示卡模拟功能切换界面,所述切换界面中包含第一功能选项和第二功能选项,所述第一功能选项对应第一存储区域,所述第二功能选项对应第二存储区域,所述第一存储区域中存储有固定用户标识,所述第二存储区域中存储有随机用户标识;The interface display module is used to display the card simulation function switching interface, the switching interface includes a first function option and a second function option, the first function option corresponds to the first storage area, and the second function option corresponds to the second function option a storage area, where a fixed user identifier is stored in the first storage area, and a random user identifier is stored in the second storage area;

功能切换模块,用于根据对所述切换界面中的目标选项执行的选择操作,将电子设备的近场通信NFC组件对应的卡模拟功能切换为所述目标选项对应的卡模拟功能,所述目标选项是所述第一功能选项或者所述第二功能选项。A function switching module, configured to switch the card simulation function corresponding to the near field communication NFC component of the electronic device to the card simulation function corresponding to the target option according to the selection operation performed on the target option in the switching interface. An option is the first functional option or the second functional option.

可选的,所述装置还包括:Optionally, the device further includes:

第一提供模块,用于当所述目标选项为所述第一功能选项,且接收到读卡设备对所述NFC组件的读卡操作时,将所述第一存储区域中存储的固定用户标识提供给所述读卡设备。A first providing module, configured to store the fixed user identifier stored in the first storage area when the target option is the first function option and a card reading operation of the NFC component by a card reader device is received provided to the card reader.

可选的,当所述目标选项为所述第二功能选项时,所述方法还包括:Optionally, when the target option is the second functional option, the method further includes:

第二提供模块,用于当所述目标选项为所述第二功能选项,且接收到读卡设备对所述NFC组件的读卡操作时,将所述第二存储区域中存储的随机用户标识以及卡片信息提供给所述读卡设备。A second providing module, configured to store the random user identifier stored in the second storage area when the target option is the second function option and a card reading operation of the NFC component by a card reader device is received And card information is provided to the card reading device.

可选的,所述第一存储区域为主机卡模拟HCE功能对应的存储区域,所述第二存储区域为嵌入式安全模块eSE芯片中的存储区域或者客户识别模块SIM芯片中的存储区域;Optionally, the first storage area is a storage area corresponding to the host card simulating HCE function, and the second storage area is a storage area in the embedded security module eSE chip or a storage area in the customer identification module SIM chip;

或者,or,

所述第一存储区域为eSE芯片中的存储区域或者SIM芯片中的存储区域,所述第二存储区域为HCE功能对应的存储区域。The first storage area is the storage area in the eSE chip or the storage area in the SIM chip, and the second storage area is the storage area corresponding to the HCE function.

可选的,所述装置还包括:Optionally, the device further includes:

读取模块,用于在接收到对所述第一功能选项的设置操作时,通过所述NFC组件读取卡片信息;a reading module, configured to read card information through the NFC component when receiving the setting operation for the first function option;

存储模块,用于在成功读取到卡片信息后,将读取到的卡片信息存储为所述固定用户标识。The storage module is configured to store the read card information as the fixed user identifier after successfully reading the card information.

可选的,所述第一存储区域中存储的卡片信息为门禁卡的卡片信息。Optionally, the card information stored in the first storage area is card information of an access control card.

根据本公开实施例的第三方面,提供了一种卡模拟功能的切换装置,所述装置包括:According to a third aspect of the embodiments of the present disclosure, there is provided a device for switching a card emulation function, the device comprising:

处理器;processor;

用于存储所述处理器的可执行指令的存储器;memory for storing executable instructions for the processor;

其中,所述处理器被配置为:wherein the processor is configured to:

展示卡模拟功能切换界面,所述切换界面中包含第一功能选项和第二功能选项,所述第一功能选项对应第一存储区域,所述第二功能选项对应第二存储区域,所述第一存储区域中存储有固定用户标识,所述第二存储区域中存储有随机用户标识;The display card simulates a function switching interface, the switching interface includes a first function option and a second function option, the first function option corresponds to the first storage area, the second function option corresponds to the second storage area, and the first function option corresponds to the second storage area. A fixed user identifier is stored in a storage area, and a random user identifier is stored in the second storage area;

根据对所述切换界面中的目标选项执行的选择操作,将电子设备的近场通信NFC组件对应的卡模拟功能切换为所述目标选项对应的卡模拟功能,所述目标选项是所述第一功能选项或者所述第二功能选项。According to the selection operation performed on the target option in the switching interface, the card simulation function corresponding to the near field communication NFC component of the electronic device is switched to the card simulation function corresponding to the target option, where the target option is the first function option or the second function option.

本公开的实施例提供的技术方案可以包括以下有益效果:The technical solutions provided by the embodiments of the present disclosure may include the following beneficial effects:

设置不同的且具有独立的存储区域的卡模拟功能,在不同卡模拟功能对应的存储区域中分别存储固定用户标识和随即用户标识,同时提供卡模拟功能的切换界面,并根据在切换界面中的切换操作来切换不同的卡模拟功能,从而实现在同一个电子设备中同时支持要求固定用户标识的卡模拟功能和要求随机用户标识的卡模拟功能的效果。Set up different card emulation functions with independent storage areas, store fixed user IDs and random user IDs in the storage areas corresponding to different card emulation functions, and provide a switching interface for the card emulation function. The switching operation is used to switch different card emulation functions, thereby realizing the effect of simultaneously supporting the card emulation function requiring a fixed user identification and the card emulation function requiring a random user identification in the same electronic device.

应当理解的是,以上的一般描述和后文的细节描述仅是示例性的,并不能限制本公开。It is to be understood that the foregoing general description and the following detailed description are exemplary only and do not limit the present disclosure.

附图说明Description of drawings

此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本公开的实施例,并于说明书一起用于解释本公开的原理。The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure, and together with the description serve to explain the principles of the disclosure.

图1是根据部分示例性实施例示出的一种卡模拟功能的切换方法所涉及的电子设备的示意图;1 is a schematic diagram of an electronic device involved in a method for switching a card emulation function according to some exemplary embodiments;

图2是根据一示例性实施例示出的一种卡模拟功能的切换方法的流程图;FIG. 2 is a flowchart of a method for switching a card emulation function according to an exemplary embodiment;

图3是根据一示例性实施例示出的一种卡模拟功能的切换方法的流程图;FIG. 3 is a flowchart of a method for switching a card emulation function according to an exemplary embodiment;

图4是图3所示实施例涉及的一种切换界面示意图;4 is a schematic diagram of a switching interface involved in the embodiment shown in FIG. 3;

图5是根据一示例性实施例示出的一种卡模拟功能的切换方法的流程图;FIG. 5 is a flowchart of a method for switching a card emulation function according to an exemplary embodiment;

图6是图5所示实施例涉及的一种功能选项设置界面的界面示意图;Fig. 6 is the interface schematic diagram of a kind of function option setting interface involved in the embodiment shown in Fig. 5;

图7是图5所示实施例涉及的一种切换界面示意图;7 is a schematic diagram of a switching interface involved in the embodiment shown in FIG. 5;

图8是根据一示例性实施例示出的一种卡模拟功能的切换装置的框图;8 is a block diagram of a device for switching a card emulation function according to an exemplary embodiment;

图9是根据一示例性实施例示出的一种卡模拟功能的切换装置的框图;FIG. 9 is a block diagram of a device for switching a card emulation function according to an exemplary embodiment;

图10是根据一示例性实施例示出的一种装置的框图。Fig. 10 is a block diagram of an apparatus according to an exemplary embodiment.

具体实施方式Detailed ways

这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本公开相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本公开的一些方面相一致的装置和方法的例子。Exemplary embodiments will be described in detail herein, examples of which are illustrated in the accompanying drawings. Where the following description refers to the drawings, the same numerals in different drawings refer to the same or similar elements unless otherwise indicated. The implementations described in the illustrative examples below are not intended to represent all implementations consistent with this disclosure. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present disclosure as recited in the appended claims.

应当理解的是,在本文中提及的“若干个”是指一个或者多个,“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。字符“/”一般表示前后关联对象是一种“或”的关系。It should be understood that reference herein to "several" refers to one or more, and "plurality" refers to two or more. "And/or", which describes the association relationship of the associated objects, means that there can be three kinds of relationships, for example, A and/or B, which can mean that A exists alone, A and B exist at the same time, and B exists alone. The character "/" generally indicates that the associated objects are an "or" relationship.

图1是根据部分示例性实施例示出的一种卡模拟功能的切换方法所涉及的电子设备的示意图,如图1所示,该电子设备可以包括:处理器101、存储器102、NFC组件103以及安全芯片104。FIG. 1 is a schematic diagram of an electronic device involved in a method for switching a card emulation function according to some exemplary embodiments. As shown in FIG. 1 , the electronic device may include: a processor 101 , a memory 102 , an NFC component 103 and Security chip 104 .

处理器101可以执行存储器102中存储的程序或指令。The processor 101 may execute programs or instructions stored in the memory 102 .

其中,存储器102中存储有各种可执行的程序或指令,比如,存储器102中可以存储有操作系统程序、硬件驱动程序以及第三方应用程序等等。The memory 102 stores various executable programs or instructions. For example, the memory 102 may store operating system programs, hardware drivers, and third-party application programs.

NFC组件103为电子设备提供两种NFC工作模式:卡模式和点对点模式。其中,卡模式又分为两种模式,分别为主动模式和被动模式。The NFC component 103 provides two NFC working modes for the electronic device: a card mode and a peer-to-peer mode. Among them, the card mode is divided into two modes, namely active mode and passive mode.

在主动模式下,电子设备可以作为一个读卡器,通过发出射频场去识别和读/写其它支持NFC功能的电子设备的设备信息。In the active mode, the electronic device can be used as a card reader to identify and read/write the device information of other electronic devices that support the NFC function by sending out a radio frequency field.

在被动模式下,电子设备被模拟成一张IC卡,其只在其它支持NFC功能的电子设备或者读卡器发出的射频场中被动响应,将电子设备的设备信息提供给其它支持NFC功能的电子设备或者读卡器。In passive mode, the electronic device is simulated as an IC card, which only passively responds to the radio frequency field sent by other NFC-enabled electronic devices or card readers, and provides the device information of the electronic device to other NFC-enabled electronic devices. device or card reader.

在双向模式下,电子设备可以与另一个支持NFC功能的电子设备双方通过射频场来建立点对点的通信。In the two-way mode, an electronic device can establish a point-to-point communication with another electronic device that supports the NFC function through a radio frequency field.

安全芯片104具有独立的信息处理功能和存储区域,通常情况下,安全芯片104用于存储和处理安全性要求较强的业务或数据,比如,在本公开实施例中,安全芯片104可以用于对电子设备实现卡模拟功能过程中涉及的部分或者全部敏感数据(比如、卡密数据以及交易数据等)进行处理或者存储。The security chip 104 has an independent information processing function and storage area. Generally, the security chip 104 is used to store and process services or data requiring strong security. For example, in the embodiment of the present disclosure, the security chip 104 can be used for Process or store some or all of the sensitive data (for example, card secret data and transaction data, etc.) involved in the process of implementing the card emulation function of the electronic device.

在一种可能的实现方式中,安全芯片104可以是NFC组件103对应的嵌入式安全元件(embedded safety element,eSE),或者,该安全芯片104也可以是支持NFC功能的客户识别模块(Subscriber Identification Module,SIM)芯片。In a possible implementation manner, the security chip 104 may be an embedded safety element (embedded safety element, eSE) corresponding to the NFC component 103 , or the security chip 104 may also be a Subscriber Identification Module (Subscriber Identification Module) supporting the NFC function Module, SIM) chip.

在本公开实施例中,存储器102中存储的可执行的程序或指令中,包含用于支持NFC功能的程序或者指令,比如,包括用于实现主机卡模拟(Host Card Emulation,HCE)的程序或指令,该用于实现主机卡模拟(Host Card Emulation,HCE)的程序或指令在被处理器101执行时,可以在脱离安全芯片104的支持下实现电子设备的卡模拟功能。In this embodiment of the present disclosure, the executable programs or instructions stored in the memory 102 include programs or instructions for supporting the NFC function, for example, including a program for implementing host card emulation (Host Card Emulation, HCE) or The instruction, when the program or instruction for implementing host card emulation (Host Card Emulation, HCE) is executed by the processor 101 , can implement the card emulation function of the electronic device without the support of the security chip 104 .

在本公开实施例中,电子设备中的安全芯片104以及HCE功能分别对应各自的用户标识(uid),且安全芯片104以及HCE功能各自的uid相互独立。In the embodiment of the present disclosure, the security chip 104 and the HCE function in the electronic device correspond to respective user identifiers (uid), and the respective uids of the security chip 104 and the HCE function are independent of each other.

在相关技术中,支持NFC的电子设备在实现卡模拟功能时,对外提供其所模拟的卡片的卡片信息。比如,当电子设备模拟门禁卡时,将门禁卡的卡片信息存储为NFC功能的uid,在NFC组件处于被动模式下,且接受到读卡操作,向读卡设备(比如另一个支持NFC功能且处于主动模式下的电子设备或者读卡器)提供该uid;或者,当电子设备模拟支付卡(比如银行卡或者交通卡)时,将支付卡的卡片信息(比如卡号和支付密码等信息)存储在安全的存储区域中,在NFC组件处于被动模式下,且接受到读卡操作,向读卡设备提供支付卡的卡片信息和uid。In the related art, when an NFC-enabled electronic device implements a card emulation function, it provides externally the card information of the card it emulates. For example, when the electronic device simulates an access control card, the card information of the access control card is stored as the uid of the NFC function. When the NFC component is in passive mode, and the card reading operation is accepted, the card reading device (such as another NFC-enabled and The uid is provided by the electronic device or card reader in active mode; or, when the electronic device simulates a payment card (such as a bank card or a transportation card), the card information of the payment card (such as card number and payment password) is stored In the secure storage area, when the NFC component is in passive mode and accepts a card reading operation, the card information and uid of the payment card are provided to the card reader device.

在实际应用中,为了保证卡片信息的安全性,在模拟支付卡时,要求NFC功能的uid是随机生成的,而门禁卡的卡片信息通常是固定的,这就导致当电子设备模拟支付卡之后,NFC功能的uid会被改写。In practical applications, in order to ensure the security of the card information, when simulating a payment card, the uid of the NFC function is required to be randomly generated, while the card information of the access control card is usually fixed, which leads to when the electronic device simulates the payment card. , the uid of the NFC function will be rewritten.

为了使得同一个电子设备的NFC功能可以同时支持门禁卡和支付卡,本公开各个实施例提供了一种卡模拟功能的切换,通过将uid固定的卡片的卡片信息和uid随机的卡片的卡片信息分别设置独立的卡模拟功能,并将两种卡片的卡片信息存储在两个卡模拟功能各自对应的存储区域中,在不同的卡模拟功能下,NFC组件只对外提供对应的存储区域中的卡片信息,同时,电子设备提供两种不同的卡模拟功能的切换入口,用户只需要在不同的卡模拟功能之间进行切换,即可以使得电子设备分别模拟uid固定的卡片和uid随机的卡片。In order to enable the NFC function of the same electronic device to support an access control card and a payment card at the same time, various embodiments of the present disclosure provide a switching of the card emulation function, by changing the card information of the card with a fixed uid and the card information of the card with a random uid Set up independent card emulation functions respectively, and store the card information of the two cards in the corresponding storage areas of the two card emulation functions. Under different card emulation functions, the NFC component only provides the cards in the corresponding storage areas to the outside world. At the same time, the electronic device provides a switch entry for two different card simulation functions, and the user only needs to switch between different card simulation functions, that is, the electronic device can simulate a card with a fixed uid and a card with a random uid.

图2是根据一示例性实施例示出的一种卡模拟功能的切换方法的流程图,该卡模拟功能的切换可以方法应用于图1所示的电子设备中。如图2所示,该方法可以包括以下步骤。FIG. 2 is a flowchart illustrating a method for switching a card emulation function according to an exemplary embodiment, and the method for switching the card emulation function can be applied to the electronic device shown in FIG. 1 . As shown in Figure 2, the method may include the following steps.

在步骤201中,展示卡模拟功能切换界面,该切换界面中包含第一功能选项和第二功能选项,该第一功能选项对应第一存储区域,该第二功能选项对应第二存储区域,该第一存储区域中存储有固定用户标识,该第二存储区域中存储有随机用户标识;In step 201, the display card simulates a function switching interface, the switching interface includes a first function option and a second function option, the first function option corresponds to the first storage area, the second function option corresponds to the second storage area, the A fixed user identifier is stored in the first storage area, and a random user identifier is stored in the second storage area;

在步骤202中,根据对该切换界面中的目标选项执行的选择操作,将电子设备的近场通信NFC组件对应的卡模拟功能切换为该目标选项对应的卡模拟功能,该目标选项是该第一功能选项或者该第二功能选项。In step 202, according to the selection operation performed on the target option in the switching interface, the card emulation function corresponding to the near field communication NFC component of the electronic device is switched to the card emulation function corresponding to the target option, and the target option is the first A functional option or the second functional option.

可选的,当该目标选项为该第一功能选项时,该方法还包括:Optionally, when the target option is the first functional option, the method further includes:

在接收到读卡设备对该NFC组件的读卡操作时,将该第一存储区域中存储的固定用户标识提供给该读卡设备。When receiving the card reading operation of the NFC component by the card reading device, the fixed user identifier stored in the first storage area is provided to the card reading device.

可选的,当该目标选项为该第二功能选项时,该方法还包括:Optionally, when the target option is the second functional option, the method further includes:

在接收到读卡设备对该NFC组件的读卡操作时,将该第二存储区域中存储的随机用户标识以及卡片信息提供给该读卡设备。When receiving the card reading operation of the NFC component by the card reading device, the random user identifier and the card information stored in the second storage area are provided to the card reading device.

可选的,该第一存储区域为主机卡模拟HCE功能对应的存储区域,该第二存储区域为嵌入式安全模块eSE芯片中的存储区域或者客户识别模块SIM芯片中的存储区域;Optionally, the first storage area is a storage area corresponding to the host card simulating HCE function, and the second storage area is a storage area in the embedded security module eSE chip or a storage area in the customer identification module SIM chip;

或者,or,

该第一存储区域为eSE芯片中的存储区域或者SIM芯片中的存储区域,该第二存储区域为HCE功能对应的存储区域。The first storage area is the storage area in the eSE chip or the storage area in the SIM chip, and the second storage area is the storage area corresponding to the HCE function.

可选的,该方法还包括:Optionally, the method further includes:

在接收到对该第一功能选项的设置操作时,通过该NFC组件读取卡片信息;When receiving the setting operation of the first function option, read the card information through the NFC component;

在成功读取到卡片信息后,将读取到的卡片信息存储为该固定用户标识。After the card information is successfully read, the read card information is stored as the fixed user ID.

可选的,该第一存储区域中存储的卡片信息为门禁卡的卡片信息。Optionally, the card information stored in the first storage area is the card information of the access control card.

综上所述,本公开实施例示出的卡模拟功能的切换方法,设置不同的且具有独立的存储区域的卡模拟功能,在不同卡模拟功能对应的存储区域中分别存储固定用户标识和随即用户标识,同时提供卡模拟功能的切换界面,并根据在切换界面中的切换操作来切换不同的卡模拟功能,从而实现在同一个电子设备中同时支持要求固定用户标识的卡模拟功能和要求随机用户标识的卡模拟功能的效果。To sum up, in the method for switching the card emulation function shown in the embodiments of the present disclosure, different card emulation functions with independent storage areas are set, and fixed user identifiers and random user IDs are respectively stored in the storage areas corresponding to different card emulation functions. At the same time, it provides a switching interface for the card emulation function, and switches different card emulation functions according to the switching operation in the switching interface, so as to support the card emulation function that requires a fixed user identification and random users in the same electronic device. Identifies the effect of the card emulation function.

图3是根据一示例性实施例示出的一种卡模拟功能的切换方法的流程图,该卡模拟功能的切换可以方法应用于图1所示的电子设备中。如图3所示,该方法可以包括以下步骤。FIG. 3 is a flowchart illustrating a method for switching a card emulation function according to an exemplary embodiment, and the method for switching the card emulation function can be applied to the electronic device shown in FIG. 1 . As shown in Figure 3, the method may include the following steps.

在步骤301中,展示卡模拟功能切换界面,该切换界面中包含第一功能选项和第二功能选项,该第一功能选项对应第一存储区域,该第二功能选项对应第二存储区域,该第一存储区域中存储有固定用户标识,该第二存储区域中存储有随机用户标识。In step 301, the display card simulates a function switching interface, the switching interface includes a first function option and a second function option, the first function option corresponds to the first storage area, the second function option corresponds to the second storage area, the A fixed user identifier is stored in the first storage area, and a random user identifier is stored in the second storage area.

在本公开实施例中,电子设备可以通过安全芯片中的存储区域与主机卡模式对应的存储区域分别存储固定用户标识的卡片信息以及随机用户标识的卡片信息。In the embodiment of the present disclosure, the electronic device may store the card information of the fixed user identification and the card information of the random user identification through the storage area in the security chip and the storage area corresponding to the host card mode, respectively.

可选的,该第一存储区域为主机卡模拟HCE功能对应的存储区域,该第二存储区域为嵌入式安全模块eSE芯片中的存储区域或者客户识别模块SIM芯片中的存储区域。比如,电子设备可以在安全芯片中的存储区域中存储银行卡或者交通卡等要求随机uid的卡片的卡片信息,并在电子设备的HCE功能对应的存储区域中存储门禁卡等要求固定uid的卡片的卡片信息。Optionally, the first storage area is a storage area corresponding to the host card simulating HCE function, and the second storage area is a storage area in the embedded security module eSE chip or a storage area in the customer identification module SIM chip. For example, the electronic device can store the card information of a bank card or a transportation card that requires a random uid in the storage area in the security chip, and store access control cards and other cards that require a fixed uid in the storage area corresponding to the HCE function of the electronic device card information.

或者,该第一存储区域为eSE芯片中的存储区域或者SIM芯片中的存储区域,该第二存储区域为HCE功能对应的存储区域。比如,电子设备可以在HCE功能对应的存储区域中存储银行卡或者交通卡等要求随机uid的卡片的卡片信息,并在安全芯片中的存储区域中存储门禁卡等要求固定uid的卡片的卡片信息。Alternatively, the first storage area is a storage area in an eSE chip or a storage area in a SIM chip, and the second storage area is a storage area corresponding to the HCE function. For example, the electronic device can store the card information of cards that require random UIDs, such as bank cards or transportation cards, in the storage area corresponding to the HCE function, and store the card information of cards that require fixed UIDs, such as access control cards, in the storage area in the security chip. .

在步骤302中,根据对该切换界面中的目标选项执行的选择操作,将电子设备的近场通信NFC组件对应的卡模拟功能切换为该目标选项对应的卡模拟功能。In step 302, according to the selection operation performed on the target option in the switching interface, the card emulation function corresponding to the near field communication NFC component of the electronic device is switched to the card emulation function corresponding to the target option.

其中,该目标选项是该第一功能选项或者该第二功能选项。Wherein, the target option is the first functional option or the second functional option.

在步骤303,在接收到读卡设备对该NFC组件的读卡操作时,将当前卡模拟功能对应的存储区域中存储的信息提供给该读卡设备。In step 303, when a card reading operation of the NFC component by the card reading device is received, the information stored in the storage area corresponding to the current card emulation function is provided to the card reading device.

可选的,当目标选项为该第一功能选项,即电子设备当前的卡模拟功能为第一功能选项对应的卡模拟功能时,在接收到读卡设备对该NFC组件的读卡操作时,电子设备将该第一存储区域中存储的固定用户标识提供给该读卡设备。Optionally, when the target option is the first function option, that is, when the current card simulation function of the electronic device is the card simulation function corresponding to the first function option, when receiving the card reading operation of the NFC component by the card reader, The electronic device provides the fixed user identification stored in the first storage area to the card reading device.

可选的,当该目标选项为该第二功能选项,即电子设备当前的卡模拟功能为第二功能选项对应的卡模拟功能时,在接收到读卡设备对该NFC组件的读卡操作时,电子设备将该第二存储区域中存储的随机用户标识以及卡片信息提供给该读卡设备。Optionally, when the target option is the second function option, that is, when the current card emulation function of the electronic device is the card emulation function corresponding to the second function option, when receiving the card reading operation of the NFC component by the card reader device , the electronic device provides the random user identification and card information stored in the second storage area to the card reading device.

请参考图4,其示出了本公开实施例涉及的一种切换界面示意图,在图4所示的卡模拟功能切换界面40中,包含至少两个功能选项,每个功能选项对应一种卡模拟功能,其中,功能选项41是对应存储有固定用户标识的选项(即第一功能选项,图4中以门禁卡为例进行说明),功能选项42是对应存储有随机用户标识的选项(即第二功能选项,图4中以公交卡为例进行说明)。Please refer to FIG. 4 , which shows a schematic diagram of a switching interface involved in an embodiment of the present disclosure. The card simulation function switching interface 40 shown in FIG. 4 includes at least two function options, and each function option corresponds to a card Simulation function, wherein, the function option 41 is an option corresponding to a fixed user identification (that is, the first function option, illustrated in FIG. 4 with an access card as an example), and the function option 42 is an option corresponding to a random user identification stored (i.e. The second function option is illustrated by taking the bus card as an example in Figure 4).

在图4所示的界面中,当用户想要将电子设备的NFC组件的卡模拟功能切换为门禁卡功能(即用户想要通过电子设备刷门禁卡)时,只需要选择图4中的功能选项41即可,此时,电子设备将NFC组件的卡模拟功能切换为门禁卡功能。当用户想要将电子设备的NFC组件的卡模拟功能切换为公交卡功能(即用户想要通过电子设备刷公交卡)时,只需要选择图4中的功能选项42即可,此时,电子设备将NFC组件的卡模拟功能切换为公交卡功能。In the interface shown in Figure 4, when the user wants to switch the card emulation function of the NFC component of the electronic device to the access control card function (that is, the user wants to swipe the access control card through the electronic device), he only needs to select the function in Figure 4 Option 41 is sufficient. At this time, the electronic device switches the card emulation function of the NFC component to the access control card function. When the user wants to switch the card simulation function of the NFC component of the electronic device to the bus card function (that is, the user wants to swipe the bus card through the electronic device), he only needs to select the function option 42 in FIG. The device switches the card emulation function of the NFC component to the bus card function.

当电子设备将NFC组件的卡模拟功能切换为门禁卡功能后,用户想要刷门禁卡时,将电子设备靠近门禁卡的读卡器,NFC组件检测到读卡操作后,将当前卡模拟功能对应的存储区域中存储的固定uid作为门禁卡的卡片信息发送给读卡器。When the electronic device switches the card simulation function of the NFC component to the access control card function, when the user wants to swipe the access control card, the electronic device is brought close to the card reader of the access control card. After the NFC component detects the card reading operation, the current card simulation function The fixed uid stored in the corresponding storage area is sent to the card reader as the card information of the access control card.

当电子设备将NFC组件的卡模拟功能切换为公交卡功能后,用户想要刷公交卡时,将电子设备靠近公交卡的读卡器,NFC组件检测到读卡操作后,将当前卡模拟功能对应的存储区域中存储的卡片信息以及随机uid作为公交卡的卡片信息发送给读卡器。When the electronic device switches the card simulation function of the NFC component to the bus card function, when the user wants to swipe the bus card, the electronic device is brought close to the card reader of the bus card. After the NFC component detects the card reading operation, the current card simulation function The card information and random uid stored in the corresponding storage area are sent to the card reader as the card information of the bus card.

综上所述,本公开实施例示出的卡模拟功能的切换方法,设置不同的且具有独立的存储区域的卡模拟功能,在不同卡模拟功能对应的存储区域中分别存储固定用户标识和随即用户标识,同时提供卡模拟功能的切换界面,并根据在切换界面中的切换操作来切换不同的卡模拟功能,从而实现在同一个电子设备中同时支持要求固定用户标识的卡模拟功能和要求随机用户标识的卡模拟功能的效果。To sum up, in the method for switching the card emulation function shown in the embodiments of the present disclosure, different card emulation functions with independent storage areas are set, and fixed user identifiers and random user IDs are respectively stored in the storage areas corresponding to different card emulation functions. At the same time, it provides a switching interface for the card emulation function, and switches different card emulation functions according to the switching operation in the switching interface, so as to support the card emulation function that requires a fixed user identification and random users in the same electronic device. Identifies the effect of the card emulation function.

图5是根据一示例性实施例示出的一种卡模拟功能的切换方法的流程图,该卡模拟功能的切换可以方法应用于图1所示的电子设备中。如图5所示,该方法可以包括以下步骤。FIG. 5 is a flowchart illustrating a method for switching a card emulation function according to an exemplary embodiment, and the method for switching the card emulation function can be applied to the electronic device shown in FIG. 1 . As shown in Figure 5, the method may include the following steps.

在步骤501中,展示功能选项设置界面,该功能选项设置界面中包含第一功能选项和第二功能选项。In step 501, a function option setting interface is displayed, and the function option setting interface includes a first function option and a second function option.

其中,该第一功能选项和第二功能选项分别对应不同的卡模拟功能,且该第一功能选项对应第一存储区域,第二功能选项对应第二存储区域,且第一存储区域和第二存储区域是相互独立的存储区域。The first function option and the second function option correspond to different card emulation functions respectively, and the first function option corresponds to the first storage area, the second function option corresponds to the second storage area, and the first storage area and the second function option correspond to the second storage area. The storage areas are mutually independent storage areas.

可选的,该第一存储区域为主机卡模拟HCE功能对应的存储区域,该第二存储区域为嵌入式安全模块eSE芯片中的存储区域或者客户识别模块SIM芯片中的存储区域。Optionally, the first storage area is a storage area corresponding to the host card simulating HCE function, and the second storage area is a storage area in the embedded security module eSE chip or a storage area in the customer identification module SIM chip.

或者,该第一存储区域为eSE芯片中的存储区域或者SIM芯片中的存储区域,该第二存储区域为HCE功能对应的存储区域。Alternatively, the first storage area is a storage area in an eSE chip or a storage area in a SIM chip, and the second storage area is a storage area corresponding to the HCE function.

在步骤502中,在接收到对该第一功能选项的设置操作时,通过NFC组件读取卡片信息,并在成功读取到卡片信息后,将读取到的卡片信息存储为固定用户标识。In step 502, upon receiving the setting operation for the first functional option, the card information is read through the NFC component, and after the card information is successfully read, the read card information is stored as a fixed user identifier.

其中,该第一功能选项可以是预先设置为用于存储固定用户标识的功能选项,电子设备在接收到对第一功能选项的设置操作后,即将NFC组件的工作模式设置为主动模式,当有支持RFID功能的IC卡接近NFC组件时,NFC组件可以读取该IC卡中的卡片信息,电子设备接收到卡片信息后,直接将读取到的卡片信息存储为该第一功能选项对应的卡模拟功能的uid。The first function option may be a function option preset for storing a fixed user identifier. After receiving the setting operation for the first function option, the electronic device sets the working mode of the NFC component to the active mode. When an IC card that supports RFID function is close to the NFC component, the NFC component can read the card information in the IC card. After receiving the card information, the electronic device directly stores the read card information as the card corresponding to the first function option. The uid of the mock function.

或者,该功能选项设置界面中的各个功能选项也可以不预先设置用于存储固定用户标识或者随机用户标识,而是根据实际的使用情况而定。比如,电子设备在接收到对第一功能选项的设置操作后,即将NFC组件的工作模式设置为主动模式,当有支持RFID功能的IC卡接近NFC组件时,NFC组件可以读取该IC卡中的卡片信息,电子设备接收到卡片信息后,可以对卡片信息进行识别,如果识别出卡片信息是门禁卡类的卡片,则直接将读取到的卡片信息存储为该第一功能选项对应的卡模拟功能的uid。Alternatively, each function option in the function option setting interface may not be preset for storing a fixed user ID or a random user ID, but is determined according to actual usage conditions. For example, after receiving the setting operation for the first function option, the electronic device sets the working mode of the NFC component to the active mode. When an IC card supporting the RFID function approaches the NFC component, the NFC component can read the information in the IC card. After receiving the card information, the electronic device can identify the card information. If the card information is identified as an access control card, the read card information is directly stored as the card corresponding to the first function option. The uid of the mock function.

在步骤503中,在接收到对第二功能选项的设置操作时,通过NFC组件读取卡片信息,并在成功读取到卡片信息后,存储卡片信息以及该卡片信息对应的随机用户标识。In step 503, upon receiving the setting operation for the second function option, the card information is read through the NFC component, and after the card information is successfully read, the card information and the random user identifier corresponding to the card information are stored.

其中,该第二功能选项可以是预先设置为用于存储随机用户标识的功能选项,电子设备在接收到对第二功能选项的设置操作后,即将NFC组件的工作模式设置为主动模式,当有支持RFID功能的IC卡接近NFC组件时,NFC组件可以读取该IC卡中的卡片信息,电子设备接收到卡片信息后,存储读取到的卡片信息以及卡片信息对应的随机uid。The second function option may be a function option preset for storing a random user identifier. After receiving the setting operation for the second function option, the electronic device sets the working mode of the NFC component to the active mode. When an IC card that supports the RFID function approaches the NFC component, the NFC component can read the card information in the IC card. After the electronic device receives the card information, it stores the read card information and the random uid corresponding to the card information.

或者,该功能选项设置界面中的各个功能选项也可以不预先设置用于存储固定用户标识或者随机用户标识,而是根据实际的使用情况而定。比如,电子设备在接收到对第二功能选项的设置操作后,即将NFC组件的工作模式设置为主动模式,当有支持RFID功能的IC卡接近NFC组件时,NFC组件可以读取该IC卡中的卡片信息,电子设备接收到卡片信息后,可以对卡片信息进行识别,如果识别出卡片信息是支付卡类的卡片,则存储读取到的卡片信息以及卡片信息对应的随机uid。Alternatively, each function option in the function option setting interface may not be preset for storing a fixed user ID or a random user ID, but is determined according to actual usage conditions. For example, after receiving the setting operation for the second function option, the electronic device sets the working mode of the NFC component to the active mode. When an IC card supporting the RFID function approaches the NFC component, the NFC component can read the information in the IC card. After receiving the card information, the electronic device can identify the card information. If the card information is identified as a payment card type card, the read card information and the random uid corresponding to the card information are stored.

在步骤504中,展示卡模拟功能切换界面,该切换界面中包含第一功能选项和第二功能选项,该第一功能选项对应第一存储区域,该第二功能选项对应第二存储区域,该第一存储区域中存储有固定用户标识,该第二存储区域中存储有随机用户标识。In step 504, the display card simulates a function switching interface, the switching interface includes a first function option and a second function option, the first function option corresponds to the first storage area, the second function option corresponds to the second storage area, the A fixed user identifier is stored in the first storage area, and a random user identifier is stored in the second storage area.

在本公开实施例中,卡模拟功能切换界面以及上述功能选项设置界面可以是相互独立的两个界面。或者,卡模拟功能切换界面以及上述功能选项设置界面也可以是同一个界面。In the embodiment of the present disclosure, the card simulation function switching interface and the above-mentioned function option setting interface may be two interfaces independent of each other. Alternatively, the card simulation function switching interface and the above-mentioned function option setting interface may also be the same interface.

在一种可能的实现方式中,该卡模拟功能切换界面中的每一个功能选项可以分别对应各自的备注信息,该备注信息用于指示对应的功能选项所模拟的IC卡的简介信息。In a possible implementation manner, each function option in the card simulation function switching interface may correspond to respective remark information, and the remark information is used to indicate the brief information of the IC card simulated by the corresponding function option.

其中,上述简介信息可以由用户自行设置,比如,用户在步骤502或者503中执行对第一功能选项或者第二功能选项的设置操作时,电子设备可以展示一个简介信息设置界面,用户可以在该简介信息设置界面中手动输入待模拟的IC卡的简介信息,比如,当待模拟的IC卡是某小区的门禁卡时,用户可以在简介信息设置界面中选择卡片类型为“门禁卡”,并在简介信息的输入框中输入“XX小区”,点击该简介信息设置界面中的确定按钮后,电子设备存储该卡片类型和简介信息,在展示卡模拟功能切换界面时,电子设备在卡模拟功能切换界面中展示卡片类型和简介信息,以便用户选择切换至想要模拟的IC卡。The above-mentioned profile information can be set by the user. For example, when the user performs the setting operation for the first function option or the second function option in step 502 or 503, the electronic device can display a profile information setting interface, where the user can In the profile information setting interface, manually enter the profile information of the IC card to be simulated. For example, when the IC card to be simulated is an access control card of a certain community, the user can select the card type as "access control card" in the profile information setting interface, and Enter "XX cell" in the input box of the profile information, click the OK button in the profile information setting interface, the electronic device stores the card type and profile information, and when the card simulation function switching interface is displayed, the electronic device is in the card simulation function The card type and brief information are displayed in the switching interface, so that users can choose to switch to the IC card they want to simulate.

或者,上述简介信息也可以由电子设备自动设置,比如,用户在步骤502或者503中执行对第一功能选项或者第二功能选项的设置操作时,电子设备通过NFC组件读取到卡片信息后,自行分析卡片信息确定IC卡的卡片类型和简介信息(比如当IC卡为中国银行的借机卡时,电子设备通过分析卡片信息确定卡片类型为“借记卡”,简介信息为“中国银行+借记卡尾号”),并将确定的卡片类型和简介信息对应功能选项进行存储。Alternatively, the above-mentioned profile information can also be automatically set by the electronic device. For example, when the user performs the setting operation for the first function option or the second function option in step 502 or 503, after the electronic device reads the card information through the NFC component, Analyze the card information by yourself to determine the card type and profile information of the IC card (for example, when the IC card is a debit card of Bank of China, the electronic device determines the card type is "debit card" by analyzing the card information, and the profile information is "Bank of China + Debit card tail number”), and store the determined card type and profile information corresponding to the function options.

在步骤505中,根据对该切换界面中的目标选项执行的选择操作,将电子设备的近场通信NFC组件对应的卡模拟功能切换为该目标选项对应的卡模拟功能。In step 505, according to the selection operation performed on the target option in the switching interface, the card emulation function corresponding to the near field communication NFC component of the electronic device is switched to the card emulation function corresponding to the target option.

其中,该目标选项是该第一功能选项或者该第二功能选项。Wherein, the target option is the first functional option or the second functional option.

在步骤506,在接收到读卡设备对该NFC组件的读卡操作时,将当前卡模拟功能对应的存储区域中存储的信息提供给该读卡设备。In step 506, when a card reading operation of the NFC component by the card reading device is received, the information stored in the storage area corresponding to the current card emulation function is provided to the card reading device.

可选的,当目标选项为该第一功能选项,即电子设备当前的卡模拟功能为第一功能选项对应的卡模拟功能时,在接收到读卡设备对该NFC组件的读卡操作时,电子设备将该第一存储区域中存储的固定用户标识提供给该读卡设备。Optionally, when the target option is the first function option, that is, when the current card simulation function of the electronic device is the card simulation function corresponding to the first function option, when receiving the card reading operation of the NFC component by the card reader, The electronic device provides the fixed user identification stored in the first storage area to the card reading device.

可选的,当该目标选项为该第二功能选项,即电子设备当前的卡模拟功能为第二功能选项对应的卡模拟功能时,在接收到读卡设备对该NFC组件的读卡操作时,电子设备将该第二存储区域中存储的随机用户标识以及卡片信息提供给该读卡设备。Optionally, when the target option is the second function option, that is, when the current card emulation function of the electronic device is the card emulation function corresponding to the second function option, when receiving the card reading operation of the NFC component by the card reader device , the electronic device provides the random user identification and card information stored in the second storage area to the card reading device.

请参考图6,其示出了本公开实施例涉及的一种功能选项设置界面的界面示意图,在图6所示的界面60中包含至少两个功能选项,其中,每个功能选项可以设置对应的卡模拟功能。假设第一功能选项61是基于电子设备中的HCE功能实现的卡模拟功能,第二功能选项62是基于电子设备中的eSE芯片实现的卡模拟功能。Please refer to FIG. 6 , which shows a schematic interface diagram of a function option setting interface involved in an embodiment of the present disclosure. The interface 60 shown in FIG. 6 includes at least two function options, wherein each function option can be set corresponding to card emulation function. It is assumed that the first functional option 61 is a card emulation function implemented based on the HCE function in the electronic device, and the second functional option 62 is a card emulation function implemented based on the eSE chip in the electronic device.

当用户想要使用第一功能选项61模拟门禁卡时,点击第一功能选项后,电子设备展示读卡提示63,用户将门禁卡靠近电子设备后,电子设备在成功读取到卡片信息后,展示简介信息设置界面64,该简介信息设置界面64中包含卡片类型设置项64a以及简介信息设置项64b,用户可以通过下拉选择框在卡片类型设置项64a中设置卡片类型为“门禁卡”,并在简介信息设置项64b(图6中示出为输入框)中输入简介信息“XX小区”,用户点击简介信息设置界面64中确定按钮64c后,电子设备对应该第一功能选项61存储卡片类型和简介信息,并在HCE功能对应的存储区域中,将读取到的卡片信息存储为uid。When the user wants to use the first function option 61 to simulate an access control card, after clicking the first function option, the electronic device displays a card reading prompt 63. After the user brings the access control card close to the electronic device, after the electronic device successfully reads the card information, The profile information setting interface 64 is displayed. The profile information setting interface 64 includes a card type setting item 64a and a profile information setting item 64b. The user can set the card type to "access control card" in the card type setting item 64a through the drop-down selection box, and Enter the profile information "XX cell" in the profile information setting item 64b (shown as an input box in FIG. 6 ), and after the user clicks the OK button 64c in the profile information setting interface 64, the electronic device stores the card type corresponding to the first function option 61 and profile information, and store the read card information as uid in the storage area corresponding to the HCE function.

类似,在图6中,当用户想要使用第二功能选项62模拟借记卡时,点击第二功能选项62后,电子设备展示读卡提示62,用户将门禁卡靠近电子设备后,电子设备在成功读取到卡片信息后,展示简介信息设置界面64,该简介信息设置界面64中包含卡片类型设置项64a以及简介信息设置项64b,用户可以通过下拉选择框在卡片类型设置项64a中设置卡片类型为“借记卡”,并在简介信息设置项64b中输入简介信息“XX银行+尾号”,用户点击简介信息设置界面64中确定按钮64c后,电子设备对应该第一功能选项61存储卡片类型和简介信息,并在eSE芯片对应的存储区域中存储读取到的卡片信息,并在eSE芯片对应的存储区域中设置卡片信息对应的随机uid。Similarly, in FIG. 6, when the user wants to use the second function option 62 to simulate a debit card, after clicking the second function option 62, the electronic device displays a card reading prompt 62, and after the user brings the access control card close to the electronic device, the electronic device After the card information is successfully read, the profile information setting interface 64 is displayed. The profile information setting interface 64 includes the card type setting item 64a and the profile information setting item 64b. The user can set the card type setting item 64a through the drop-down selection box. The card type is "debit card", and the profile information "XX bank + tail number" is entered in the profile information setting item 64b. After the user clicks the OK button 64c in the profile information setting interface 64, the electronic device corresponds to the first function option 61 Store the card type and profile information, store the read card information in the storage area corresponding to the eSE chip, and set the random uid corresponding to the card information in the storage area corresponding to the eSE chip.

在图6的基础上,用户在第一功能选项61中设置模拟门禁卡功能,并将第二功能选项62中设置模拟借记卡功能后,请参考图7,其示出了本公开实施例涉及的一种切换界面示意图,在图7所示的卡模拟功能切换界面70中包含至少两个功能选项,其中,功能选项71对应门禁卡功能,功能选项72对应借记卡功能,其中,功能选项71对应区域直接显示卡片类型(即门禁卡),同时功能选项71对应的简介信息显示区域73对应显示有门禁卡的简介信息“XX小区”;相应的,功能选项72对应区域直接显示卡片类型(即借记卡),同时功能选项72对应的简介信息显示区域74对应显示有借记卡的简介信息“XX银行-尾号(0634)”。On the basis of FIG. 6 , after the user sets the simulated access card function in the first function option 61 , and sets the simulated debit card function in the second function option 62 , please refer to FIG. 7 , which shows an embodiment of the present disclosure A schematic diagram of a switching interface involved, the card simulation function switching interface 70 shown in FIG. 7 includes at least two function options, wherein the function option 71 corresponds to the access card function, and the function option 72 corresponds to the debit card function, wherein the function The corresponding area of option 71 directly displays the card type (ie access control card), and the brief information display area 73 corresponding to functional option 71 corresponds to displaying the brief information "XX Community" of the access control card; correspondingly, the corresponding area of functional option 72 directly displays the card type (ie a debit card), and at the same time, the profile information display area 74 corresponding to the function option 72 correspondingly displays the profile information of the debit card “XX Bank-Tail Number (0634)”.

在图7所示的界面中,当用户想要将电子设备的NFC组件的卡模拟功能切换为门禁卡功能(即用户想要通过电子设备刷门禁卡)时,只需要选择图7中的功能选项71即可,此时,电子设备将NFC组件的卡模拟功能切换为门禁卡功能。当用户想要将电子设备的NFC组件的卡模拟功能切换为借记卡功能(即用户想要通过电子设备刷借记卡进行消费)时,只需要选择图7中的功能选项72即可,此时,电子设备将NFC组件的卡模拟功能切换为借记卡功能。In the interface shown in Fig. 7, when the user wants to switch the card emulation function of the NFC component of the electronic device to the access control card function (that is, the user wants to swipe the access control card through the electronic device), he only needs to select the function in Fig. 7 Option 71 is sufficient. At this time, the electronic device switches the card emulation function of the NFC component to the access control card function. When the user wants to switch the card emulation function of the NFC component of the electronic device to the debit card function (that is, the user wants to swipe the debit card through the electronic device for consumption), he only needs to select the function option 72 in FIG. 7 , At this time, the electronic device switches the card emulation function of the NFC component to the debit card function.

当电子设备将NFC组件的卡模拟功能切换为门禁卡功能后,用户想要刷门禁卡时,将电子设备靠近门禁卡的读卡器,NFC组件检测到读卡操作后,将HCE功能对应的存储区域中存储的uid作为门禁卡的卡片信息发送给读卡器。When the electronic device switches the card emulation function of the NFC component to the access control card function, when the user wants to swipe the access control card, the electronic device is brought close to the card reader of the access control card. After the NFC component detects the card reading operation, the corresponding HCE function The uid stored in the storage area is sent to the card reader as the card information of the access control card.

当电子设备将NFC组件的卡模拟功能切换为借记卡功能后,用户想要刷借记卡时,将电子设备靠近借记卡的读卡器,NFC组件检测到读卡操作后,将eSE芯片对应的存储区域中存储的卡片信息以及随机uid作为借记卡的卡片信息发送给读卡器。When the electronic device switches the card emulation function of the NFC component to the debit card function, when the user wants to swipe the debit card, the electronic device is brought close to the card reader of the debit card. After the NFC component detects the card reading operation, the eSE The card information and random uid stored in the storage area corresponding to the chip are sent to the card reader as the card information of the debit card.

综上所述,本公开实施例示出的卡模拟功能的切换方法,设置不同的且具有独立的存储区域的卡模拟功能,在不同卡模拟功能对应的存储区域中分别存储固定用户标识和随即用户标识,同时提供卡模拟功能的切换界面,并根据在切换界面中的切换操作来切换不同的卡模拟功能,从而实现在同一个电子设备中同时支持要求固定用户标识的卡模拟功能和要求随机用户标识的卡模拟功能的效果。To sum up, in the method for switching the card emulation function shown in the embodiments of the present disclosure, different card emulation functions with independent storage areas are set, and fixed user identifiers and random user IDs are respectively stored in the storage areas corresponding to different card emulation functions. At the same time, it provides a switching interface for the card emulation function, and switches different card emulation functions according to the switching operation in the switching interface, so as to support the card emulation function that requires a fixed user identification and random users in the same electronic device. Identifies the effect of the card emulation function.

下述为本公开装置实施例,可以用于执行本公开方法实施例。对于本公开装置实施例中未披露的细节,请参照本公开方法实施例。The following are the apparatus embodiments of the present disclosure, which can be used to execute the method embodiments of the present disclosure. For details not disclosed in the apparatus embodiments of the present disclosure, please refer to the method embodiments of the present disclosure.

图8是根据一示例性实施例示出的一种卡模拟功能的切换装置的框图,如图8所示,该卡模拟功能的切换装置可以通过硬件或者软硬结合的方式实现为图1所示电子设备的全部或者部分。该卡模拟功能的切换装置可以包括:FIG. 8 is a block diagram of a device for switching the card emulation function according to an exemplary embodiment. As shown in FIG. 8 , the device for switching the card emulation function can be implemented by hardware or a combination of software and hardware as shown in FIG. 1 . All or part of an electronic device. The switching device for the card emulation function may include:

界面展示模块801,用于展示卡模拟功能切换界面,所述切换界面中包含第一功能选项和第二功能选项,所述第一功能选项对应第一存储区域,所述第二功能选项对应第二存储区域,所述第一存储区域中存储有固定用户标识,所述第二存储区域中存储有随机用户标识;The interface display module 801 is used to display a card simulation function switching interface, the switching interface includes a first function option and a second function option, the first function option corresponds to the first storage area, and the second function option corresponds to the first function option. Two storage areas, the first storage area stores a fixed user identifier, and the second storage area stores a random user identifier;

功能切换模块802,用于根据对所述切换界面中的目标选项执行的选择操作,将电子设备的近场通信NFC组件对应的卡模拟功能切换为所述目标选项对应的卡模拟功能,所述目标选项是所述第一功能选项或者所述第二功能选项。The function switching module 802 is configured to switch the card simulation function corresponding to the near field communication NFC component of the electronic device to the card simulation function corresponding to the target option according to the selection operation performed on the target option in the switching interface, the The target option is the first functional option or the second functional option.

可选的,在图8的基础上,请参考图9,其示出了本公开实施例示出的另一种卡模拟功能的切换装置的框图,所述装置还包括:Optionally, on the basis of FIG. 8 , please refer to FIG. 9 , which shows a block diagram of another device for switching a card emulation function shown in an embodiment of the present disclosure, and the device further includes:

第一提供模块803,用于当所述目标选项为所述第一功能选项,且接收到读卡设备对所述NFC组件的读卡操作时,将所述第一存储区域中存储的固定用户标识提供给所述读卡设备。The first providing module 803 is configured to, when the target option is the first function option and a card reading operation of the NFC component by a card reader device is received, store the fixed user stored in the first storage area. An identification is provided to the card reader device.

可选的,所述装置还包括:Optionally, the device further includes:

第二提供模块804,用于当所述目标选项为所述第二功能选项,且接收到读卡设备对所述NFC组件的读卡操作时,将所述第二存储区域中存储的随机用户标识以及卡片信息提供给所述读卡设备。The second providing module 804 is configured to store the random user stored in the second storage area when the target option is the second function option and a card reading operation of the NFC component by a card reader device is received Identification and card information are provided to the card reader device.

可选的,所述第一存储区域为主机卡模拟HCE功能对应的存储区域,所述第二存储区域为嵌入式安全模块eSE芯片中的存储区域或者客户识别模块SIM芯片中的存储区域;Optionally, the first storage area is a storage area corresponding to the host card simulating HCE function, and the second storage area is a storage area in the embedded security module eSE chip or a storage area in the customer identification module SIM chip;

或者,or,

所述第一存储区域为eSE芯片中的存储区域或者SIM芯片中的存储区域,所述第二存储区域为HCE功能对应的存储区域。The first storage area is the storage area in the eSE chip or the storage area in the SIM chip, and the second storage area is the storage area corresponding to the HCE function.

可选的,所述装置还包括:Optionally, the device further includes:

读取模块805,用于在接收到对所述第一功能选项的设置操作时,通过所述NFC组件读取卡片信息;a reading module 805, configured to read card information through the NFC component when receiving the setting operation for the first function option;

存储模块806,用于在成功读取到卡片信息后,将读取到的卡片信息存储为所述固定用户标识。The storage module 806 is configured to store the read card information as the fixed user identifier after successfully reading the card information.

可选的,所述第一存储区域中存储的卡片信息为门禁卡的卡片信息。Optionally, the card information stored in the first storage area is card information of an access control card.

综上所述,本公开实施例示出的卡模拟功能的切换装置,设置不同的且具有独立的存储区域的卡模拟功能,在不同卡模拟功能对应的存储区域中分别存储固定用户标识和随即用户标识,同时提供卡模拟功能的切换界面,并根据在切换界面中的切换操作来切换不同的卡模拟功能,从而实现在同一个电子设备中同时支持要求固定用户标识的卡模拟功能和要求随机用户标识的卡模拟功能的效果。To sum up, the device for switching the card emulation function shown in the embodiment of the present disclosure sets up different card emulation functions with independent storage areas, and stores the fixed user ID and random user ID in the storage areas corresponding to the different card emulation functions. At the same time, it provides a switching interface for the card emulation function, and switches different card emulation functions according to the switching operation in the switching interface, so as to support the card emulation function that requires a fixed user identification and random users in the same electronic device. Identifies the effect of the card emulation function.

本公开一示例性实施例提供了一种卡模拟功能的切换装置,能够实现本公开上述图2、3或5所示的卡模拟功能的切换方法,该卡模拟功能的切换装置包括:处理器、用于存储处理器可执行指令的存储器;An exemplary embodiment of the present disclosure provides a device for switching a card emulation function, which can implement the method for switching a card emulation function shown in FIG. 2 , 3 or 5 above in the present disclosure, and the device for switching the card emulation function includes: a processor , memory for storing processor executable instructions;

其中,处理器被配置为:where the processor is configured as:

展示卡模拟功能切换界面,所述切换界面中包含第一功能选项和第二功能选项,所述第一功能选项对应第一存储区域,所述第二功能选项对应第二存储区域,所述第一存储区域中存储有固定用户标识,所述第二存储区域中存储有随机用户标识;The display card simulates a function switching interface, the switching interface includes a first function option and a second function option, the first function option corresponds to the first storage area, the second function option corresponds to the second storage area, and the first function option corresponds to the second storage area. A fixed user identifier is stored in a storage area, and a random user identifier is stored in the second storage area;

根据对所述切换界面中的目标选项执行的选择操作,将电子设备的近场通信NFC组件对应的卡模拟功能切换为所述目标选项对应的卡模拟功能,所述目标选项是所述第一功能选项或者所述第二功能选项。According to the selection operation performed on the target option in the switching interface, the card simulation function corresponding to the near field communication NFC component of the electronic device is switched to the card simulation function corresponding to the target option, where the target option is the first function option or the second function option.

可选的,当所述目标选项为所述第一功能选项时,所述处理器还被配置为:Optionally, when the target option is the first function option, the processor is further configured to:

在接收到读卡设备对所述NFC组件的读卡操作时,将所述第一存储区域中存储的固定用户标识提供给所述读卡设备。When receiving the card reading operation of the NFC component by the card reading device, the fixed user identification stored in the first storage area is provided to the card reading device.

可选的,当所述目标选项为所述第二功能选项时,所述处理器还被配置为:Optionally, when the target option is the second function option, the processor is further configured to:

在接收到读卡设备对所述NFC组件的读卡操作时,将所述第二存储区域中存储的随机用户标识以及卡片信息提供给所述读卡设备。When receiving a card reading operation of the NFC component by a card reading device, the random user identification and card information stored in the second storage area are provided to the card reading device.

可选的,所述第一存储区域为主机卡模拟HCE功能对应的存储区域,所述第二存储区域为嵌入式安全模块eSE芯片中的存储区域或者客户识别模块SIM芯片中的存储区域;Optionally, the first storage area is a storage area corresponding to the host card simulating HCE function, and the second storage area is a storage area in the embedded security module eSE chip or a storage area in the customer identification module SIM chip;

或者,or,

所述第一存储区域为eSE芯片中的存储区域或者SIM芯片中的存储区域,所述第二存储区域为HCE功能对应的存储区域。The first storage area is the storage area in the eSE chip or the storage area in the SIM chip, and the second storage area is the storage area corresponding to the HCE function.

可选的,所述处理器还被配置为:Optionally, the processor is further configured to:

在接收到对所述第一功能选项的设置操作时,通过所述NFC组件读取卡片信息;When receiving the setting operation for the first function option, read the card information through the NFC component;

在成功读取到卡片信息后,将读取到的卡片信息存储为所述固定用户标识。After the card information is successfully read, the read card information is stored as the fixed user identification.

可选的,所述第一存储区域中存储的卡片信息为门禁卡的卡片信息。Optionally, the card information stored in the first storage area is card information of an access control card.

需要说明的一点是,上述实施例提供的装置在实现其功能时,仅以上述各个功能模块的划分进行举例说明,实际应用中,可以根据实际需要而将上述功能分配由不同的功能模块完成,即将设备的内容结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。It should be noted that, when the device provided in the above embodiment realizes its functions, only the division of the above functional modules is used as an example for illustration. In practical applications, the above functions can be allocated to different functional modules according to actual needs. That is, the content structure of the device is divided into different functional modules to complete all or part of the functions described above.

关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。Regarding the apparatus in the above-mentioned embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be described in detail here.

图10是根据一示例性实施例示出的一种装置1000的框图。例如,装置1000可以是智能手机、可穿戴设备、智能电视和车载终端等电子设备。FIG. 10 is a block diagram of an apparatus 1000 according to an exemplary embodiment. For example, the apparatus 1000 may be an electronic device such as a smart phone, a wearable device, a smart TV, and an in-vehicle terminal.

参照图10,装置1000可以包括以下一个或多个组件:处理组件1002,存储器1004,电源组件1006,多媒体组件10010,音频组件1010,输入/输出(I/O)的接口1012,传感器组件1014,通信组件1016,NFC组件1018以及安全芯片1020。10, an apparatus 1000 may include one or more of the following components: a processing component 1002, a memory 1004, a power supply component 1006, a multimedia component 10010, an audio component 1010, an input/output (I/O) interface 1012, a sensor component 1014, Communication component 1016, NFC component 1018, and security chip 1020.

处理组件1002通常控制装置1000的整体操作,诸如与显示,电话呼叫,数据通信,相机操作和记录操作相关联的操作。处理组件1002可以包括一个或多个处理器1020来执行指令,以完成上述的方法的全部或部分步骤。此外,处理组件1002可以包括一个或多个模块,便于处理组件1002和其他组件之间的交互。例如,处理组件1002可以包括多媒体模块,以方便多媒体组件1008和处理组件1002之间的交互。The processing component 1002 generally controls the overall operation of the device 1000, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 1002 can include one or more processors 1020 to execute instructions to perform all or some of the steps of the methods described above. Additionally, processing component 1002 may include one or more modules that facilitate interaction between processing component 1002 and other components. For example, processing component 1002 may include a multimedia module to facilitate interaction between multimedia component 1008 and processing component 1002.

存储器1004被配置为存储各种类型的数据以支持在装置1000的操作。这些数据的示例包括用于在装置1000上操作的任何应用程序或方法的指令,联系人数据,电话簿数据,消息,图片,视频等。存储器1004可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(SRAM),电可擦除可编程只读存储器(EEPROM),可擦除可编程只读存储器(EPROM),可编程只读存储器(PROM),只读存储器(ROM),磁存储器,快闪存储器,磁盘或光盘。Memory 1004 is configured to store various types of data to support operation at device 1000 . Examples of such data include instructions for any application or method operating on the device 1000, contact data, phonebook data, messages, pictures, videos, and the like. Memory 1004 may be implemented by any type of volatile or nonvolatile storage device or combination thereof, such as static random access memory (SRAM), electrically erasable programmable read only memory (EEPROM), erasable Programmable Read Only Memory (EPROM), Programmable Read Only Memory (PROM), Read Only Memory (ROM), Magnetic Memory, Flash Memory, Magnetic or Optical Disk.

电源组件1006为装置1000的各种组件提供电力。电源组件1006可以包括电源管理系统,一个或多个电源,及其他与为装置1000生成、管理和分配电力相关联的组件。Power supply assembly 1006 provides power to various components of device 1000 . Power components 1006 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to device 1000 .

多媒体组件1008包括在装置1000和用户之间的提供一个输出接口的屏幕。在一些实施例中,屏幕可以包括液晶显示器(LCD)和触摸面板(TP)。如果屏幕包括触摸面板,屏幕可以被实现为触摸屏,以接收来自用户的输入信号。触摸面板包括一个或多个触摸传感器以感测触摸、滑动和触摸面板上的手势。触摸传感器可以不仅感测触摸或滑动动作的边界,而且还检测与触摸或滑动操作相关的持续时间和压力。在一些实施例中,多媒体组件1008包括一个前置摄像头和/或后置摄像头。当装置1000处于操作模式,如拍摄模式或视频模式时,前置摄像头和/或后置摄像头可以接收外部的多媒体数据。每个前置摄像头和后置摄像头可以是一个固定的光学透镜系统或具有焦距和光学变焦能力。Multimedia component 1008 includes a screen that provides an output interface between device 1000 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touch, swipe, and gestures on the touch panel. A touch sensor can sense not only the boundaries of a touch or swipe action, but also the duration and pressure associated with the touch or swipe action. In some embodiments, the multimedia component 1008 includes a front-facing camera and/or a rear-facing camera. When the device 1000 is in an operation mode, such as a shooting mode or a video mode, the front camera and/or the rear camera may receive external multimedia data. Each of the front and rear cameras can be a fixed optical lens system or have focal length and optical zoom capability.

音频组件1010被配置为输出和/或输入音频信号。例如,音频组件1010包括一个麦克风(MIC),当装置1000处于操作模式,如呼叫模式、记录模式和语音识别模式时,麦克风被配置为接收外部音频信号。所接收的音频信号可以被进一步存储在存储器1004或经由通信组件1016发送。在一些实施例中,音频组件1010还包括一个扬声器,用于输出音频信号。Audio component 1010 is configured to output and/or input audio signals. For example, audio component 1010 includes a microphone (MIC) that is configured to receive external audio signals when device 1000 is in operating modes, such as call mode, recording mode, and voice recognition mode. The received audio signal may be further stored in memory 1004 or transmitted via communication component 1016 . In some embodiments, audio component 1010 also includes a speaker for outputting audio signals.

I/O接口1012为处理组件1002和外围接口模块之间提供接口,上述外围接口模块可以是键盘,点击轮,按钮等。这些按钮可包括但不限于:主页按钮、音量按钮、启动按钮和锁定按钮。The I/O interface 1012 provides an interface between the processing component 1002 and a peripheral interface module, which may be a keyboard, a click wheel, a button, or the like. These buttons may include, but are not limited to: home button, volume buttons, start button, and lock button.

传感器组件1014包括一个或多个传感器,用于为装置1000提供各个方面的状态评估。例如,传感器组件1014可以检测到装置1000的打开/关闭状态,组件的相对定位,例如组件为装置1000的显示器和小键盘,传感器组件1014还可以检测装置1000或装置1000一个组件的位置改变,用户与装置1000接触的存在或不存在,装置1000方位或加速/减速和装置1000的温度变化。传感器组件1014可以包括接近传感器,被配置用来在没有任何的物理接触时检测附近物体的存在。传感器组件1014还可以包括光传感器,如CMOS或CCD图像传感器,用于在成像应用中使用。在一些实施例中,该传感器组件1014还可以包括加速度传感器,陀螺仪传感器,磁传感器,压力传感器或温度传感器。Sensor assembly 1014 includes one or more sensors for providing status assessment of various aspects of device 1000 . For example, the sensor assembly 1014 can detect the open/closed state of the device 1000, the relative positioning of the components, such as the display and keypad of the device 1000, the sensor assembly 1014 can also detect the position change of the device 1000 or a component of the device 1000, the user Presence or absence of contact with device 1000, device 1000 orientation or acceleration/deceleration and temperature changes of device 1000. Sensor assembly 1014 may include a proximity sensor configured to detect the presence of nearby objects in the absence of any physical contact. Sensor assembly 1014 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 1014 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

通信组件1016被配置为便于装置1000和其他设备之间有线或无线方式的通信。装置1000可以接入基于通信标准的无线网络,如WiFi,2G、3G、4G或5G,或它们的组合。在一个示例性实施例中,通信组件1016经由广播信道接收来自外部广播管理系统的广播信号或广播相关信息。Communication component 1016 is configured to facilitate wired or wireless communication between apparatus 1000 and other devices. The device 1000 may access a wireless network based on a communication standard, such as WiFi, 2G, 3G, 4G or 5G, or a combination thereof. In one exemplary embodiment, the communication component 1016 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel.

NFC组件1018可基于射频识别(RFID)技术,红外数据协会(IrDA)技术,超宽带(UWB)技术,蓝牙(BT)技术和其他技术来实现。The NFC component 1018 may be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.

安全芯片1020可以是NFC组件1018对应的eSE芯片,或者,该安全芯片1020也可以是支持NFC功能的SIM芯片。The security chip 1020 may be an eSE chip corresponding to the NFC component 1018, or the security chip 1020 may also be a SIM chip supporting the NFC function.

在示例性实施例中,装置1000可以被一个或多个应用专用集成电路(ASIC)、数字信号处理器(DSP)、数字信号处理设备(DSPD)、可编程逻辑器件(PLD)、现场可编程门阵列(FPGA)、控制器、微控制器、微处理器或其他电子元件实现,用于执行上述方法。In an exemplary embodiment, apparatus 1000 may be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable A gate array (FPGA), controller, microcontroller, microprocessor or other electronic component implementation is used to perform the above method.

在示例性实施例中,还提供了一种包括指令的非临时性计算机可读存储介质,例如包括指令的存储器1004,上述指令可由装置1000的处理器1020执行以完成上述方法。例如,非临时性计算机可读存储介质可以是ROM、随机存取存储器(RAM)、CD-ROM、磁带、软盘和光数据存储设备等。In an exemplary embodiment, there is also provided a non-transitory computer-readable storage medium including instructions, such as a memory 1004 including instructions, executable by the processor 1020 of the apparatus 1000 to perform the method described above. For example, the non-transitory computer-readable storage medium may be ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, and the like.

本领域普通技术人员可以理解的是,实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序指令配合相关的硬件完成,所述程序指令可以存储于存储设备中,该存储设备含有一种计算机可读存储介质,上述提到的存储介质可以是只读存储器,固态硬盘(Solid State Drives,SSD),闪存(Flash),磁盘或光盘等。当存储设备中的指令由装置1000的处理器执行时,使得装置1000能够执行上述卡模拟功能的切换方法。It can be understood by those skilled in the art that all or part of the steps of implementing the above embodiments can be completed by hardware, or can be completed by program instructions in conjunction with relevant hardware, and the program instructions can be stored in a storage device. It contains a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a solid state drive (Solid State Drives, SSD), a flash memory (Flash), a magnetic disk or an optical disk, and the like. When the instructions in the storage device are executed by the processor of the apparatus 1000, the apparatus 1000 is enabled to perform the above-mentioned switching method of the card emulation function.

本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本公开的其它实施方案。本申请旨在涵盖本公开的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本公开的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本公开的真正范围和精神由下面的权利要求指出。Other embodiments of the present disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or techniques in the technical field not disclosed by the present disclosure . The specification and examples are to be regarded as exemplary only, with the true scope and spirit of the disclosure being indicated by the following claims.

应当理解的是,本公开并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本公开的范围仅由所附的权利要求来限制。It is to be understood that the present disclosure is not limited to the precise structures described above and illustrated in the accompanying drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (13)

1. A method for switching a card emulation function, the method comprising:
the display card simulates a function switching interface, wherein the switching interface comprises a first function option and a second function option, the first function option corresponds to a first storage area, the second function option corresponds to a second storage area, a fixed user identifier is stored in the first storage area, a random user identifier is stored in the second storage area, and the first storage area and the second storage area are mutually independent storage areas;
according to selection operation executed on a target option in the switching interface, switching a card simulation function corresponding to a Near Field Communication (NFC) component of the electronic equipment into a card simulation function corresponding to the target option, wherein the target option is the first function option or the second function option;
and when card reading operation of the card reading equipment on the NFC component is received, providing information stored in a storage area corresponding to a current card simulation function to the card reading equipment, wherein the current card simulation function is the card simulation function corresponding to the target option.
2. The method according to claim 1, wherein when the target option is the first function option, the providing, when a card reading operation of a card reading device on the NFC component is received, information stored in a storage area corresponding to a current card emulation function to the card reading device comprises:
and when a card reading operation of a card reading device on the NFC component is received, providing the fixed user identification stored in the first storage area to the card reading device.
3. The method according to claim 1, wherein when the target option is the second function option, the providing, when a card reading operation of a card reading device on the NFC component is received, information stored in a storage area corresponding to a current card emulation function to the card reading device comprises:
and when the card reading operation of the card reading device on the NFC component is received, the random user identification and the card information stored in the second storage area are provided for the card reading device.
4. The method of claim 1,
the first storage area is a storage area corresponding to a host card simulated HCE function, and the second storage area is a storage area in an embedded security module eSE chip or a storage area in a subscriber identity module SIM chip;
or,
the first storage area is a storage area in an eSE chip or a storage area in an SIM chip, and the second storage area is a storage area corresponding to an HCE function.
5. The method of claim 1, further comprising:
reading card information through the NFC component when a setting operation of the first function option is received;
and after the card information is successfully read, storing the read card information as the fixed user identification.
6. The method according to claim 1, wherein the card information stored in the first storage area is card information of an access card.
7. A switching device for card emulation functionality, the device comprising:
the interface display module is used for displaying a card simulation function switching interface, the switching interface comprises a first function option and a second function option, the first function option corresponds to a first storage area, the second function option corresponds to a second storage area, a fixed user identifier is stored in the first storage area, a random user identifier is stored in the second storage area, and the first storage area and the second storage area are mutually independent storage areas;
the function switching module is used for switching a card simulation function corresponding to a Near Field Communication (NFC) component of the electronic equipment into a card simulation function corresponding to a target option according to selection operation executed on the target option in the switching interface, wherein the target option is the first function option or the second function option;
and the information providing module is used for providing the information stored in the storage area corresponding to the current card simulation function to the card reading equipment when the card reading operation of the card reading equipment on the NFC component is received, wherein the current card simulation function is the card simulation function corresponding to the target option.
8. The apparatus of claim 7, wherein the information providing module is configured to provide the information
And when the target option is the first function option and card reading operation of the card reading device on the NFC component is received, providing the fixed user identification stored in the first storage area for the card reading device.
9. The apparatus of claim 7, wherein the information providing module is configured to provide the information
And when the target option is the second function option and card reading operation of the card reading device on the NFC component is received, providing the random user identification and the card information stored in the second storage area to the card reading device.
10. The apparatus of claim 7,
the first storage area is a storage area corresponding to a host card simulated HCE function, and the second storage area is a storage area in an embedded security module eSE chip or a storage area in a subscriber identity module SIM chip;
or,
the first storage area is a storage area in an eSE chip or a storage area in an SIM chip, and the second storage area is a storage area corresponding to an HCE function.
11. The apparatus of claim 7, further comprising:
the reading module is used for reading card information through the NFC component when receiving the setting operation of the first function option;
and the storage module is used for storing the read card information as the fixed user identification after the card information is successfully read.
12. The apparatus according to claim 7, wherein the card information stored in the first storage area is card information of an access card.
13. A switching device for card emulation functionality, the device comprising:
a processor;
a memory for storing executable instructions of the processor;
wherein the processor is configured to:
the display card simulates a function switching interface, wherein the switching interface comprises a first function option and a second function option, the first function option corresponds to a first storage area, the second function option corresponds to a second storage area, a fixed user identifier is stored in the first storage area, a random user identifier is stored in the second storage area, and the first storage area and the second storage area are mutually independent storage areas;
according to selection operation executed on a target option in the switching interface, switching a card simulation function corresponding to a Near Field Communication (NFC) component of the electronic equipment into a card simulation function corresponding to the target option, wherein the target option is the first function option or the second function option;
and when card reading operation of the card reading equipment on the NFC component is received, providing information stored in a storage area corresponding to a current card simulation function to the card reading equipment, wherein the current card simulation function is the card simulation function corresponding to the target option.
CN201710481700.0A 2017-06-22 2017-06-22 Card simulation function switching method and device Active CN107315609B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710481700.0A CN107315609B (en) 2017-06-22 2017-06-22 Card simulation function switching method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710481700.0A CN107315609B (en) 2017-06-22 2017-06-22 Card simulation function switching method and device

Publications (2)

Publication Number Publication Date
CN107315609A CN107315609A (en) 2017-11-03
CN107315609B true CN107315609B (en) 2020-09-08

Family

ID=60183446

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710481700.0A Active CN107315609B (en) 2017-06-22 2017-06-22 Card simulation function switching method and device

Country Status (1)

Country Link
CN (1) CN107315609B (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108170521A (en) * 2017-11-27 2018-06-15 拉卡拉支付股份有限公司 Switching method, device, system, wearable device and the terminal device of transportation card
CN108200285B (en) * 2017-12-28 2021-08-10 努比亚技术有限公司 Photographing method for reducing interference, mobile terminal and computer readable storage medium
WO2019127441A1 (en) 2017-12-29 2019-07-04 华为技术有限公司 Method for selecting emulated card, and mobile device
CN109858578A (en) * 2018-04-20 2019-06-07 深圳如一探索科技有限公司 The method and apparatus of wearable device duplication access card
TWI720678B (en) * 2019-11-06 2021-03-01 愛視購科技有限公司 Identification device and identification setting system
CN112836533A (en) * 2019-11-22 2021-05-25 青岛海信移动通信技术股份有限公司 Virtual card switching method and electronic terminal
CN111651216B (en) * 2020-05-07 2024-05-28 天星数科科技有限公司 NFC card processing method, NFC card processing device and storage medium
CN114520970B (en) * 2022-01-28 2023-10-10 广州万协通信息技术有限公司 Selective switching method of SWP card simulation application based on SIM card
CN116933809A (en) * 2022-04-02 2023-10-24 华为技术有限公司 NFC-based card swiping method, medium and electronic equipment
CN115167722B (en) * 2022-07-29 2025-08-19 Oppo广东移动通信有限公司 Analog card switching method and device, electronic equipment and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011037593A1 (en) * 2009-09-28 2011-03-31 Devicefidelity, Inc. Switching between internal and external antennas
CN102163995A (en) * 2010-02-23 2011-08-24 中兴通讯股份有限公司 Near field communication realization method for mobile equipment and mobile equipment realizing near field communication
CN102209129A (en) * 2011-05-30 2011-10-05 惠州Tcl移动通信有限公司 Mobile phone
CN103778705A (en) * 2014-02-19 2014-05-07 北京中泰方信科技有限公司 Realization method and system of NFC (near field communication) electronic lock and NFC electronic lock card reader
CN204965461U (en) * 2015-04-30 2016-01-13 上海励识电子科技有限公司 Automatic duplicate entrance guard's card and single -chip reading and writing control circuit
CN105491243A (en) * 2016-01-18 2016-04-13 努比亚技术有限公司 NFC mobile terminal and NFC simulation card switching control method
CN105868978A (en) * 2016-03-25 2016-08-17 福建联迪商用设备有限公司 NFC mobile payment method and system thereof
CN106104601A (en) * 2016-06-22 2016-11-09 北京小米移动软件有限公司 Virtual card Activiation method and device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011037593A1 (en) * 2009-09-28 2011-03-31 Devicefidelity, Inc. Switching between internal and external antennas
CN102163995A (en) * 2010-02-23 2011-08-24 中兴通讯股份有限公司 Near field communication realization method for mobile equipment and mobile equipment realizing near field communication
CN102209129A (en) * 2011-05-30 2011-10-05 惠州Tcl移动通信有限公司 Mobile phone
CN103778705A (en) * 2014-02-19 2014-05-07 北京中泰方信科技有限公司 Realization method and system of NFC (near field communication) electronic lock and NFC electronic lock card reader
CN204965461U (en) * 2015-04-30 2016-01-13 上海励识电子科技有限公司 Automatic duplicate entrance guard's card and single -chip reading and writing control circuit
CN105491243A (en) * 2016-01-18 2016-04-13 努比亚技术有限公司 NFC mobile terminal and NFC simulation card switching control method
CN105868978A (en) * 2016-03-25 2016-08-17 福建联迪商用设备有限公司 NFC mobile payment method and system thereof
CN106104601A (en) * 2016-06-22 2016-11-09 北京小米移动软件有限公司 Virtual card Activiation method and device

Also Published As

Publication number Publication date
CN107315609A (en) 2017-11-03

Similar Documents

Publication Publication Date Title
CN107315609B (en) Card simulation function switching method and device
CN109791475B (en) Electronic device with dual-sided display and method for controlling applications
CN106970754B (en) Screen capture processing method and device
US11416112B2 (en) Method and device for displaying an application interface
CN106104601A (en) Virtual card Activiation method and device
EP3136793A1 (en) Method and apparatus for awakening electronic device
EP3232299A2 (en) Physical key component, terminal, and touch response method and device
US10548003B2 (en) Electronic device for controlling an external device using a number and method thereof
US20180053177A1 (en) Resource transfer method, apparatus and storage medium
US20170171321A1 (en) Methods and devices for managing accounts
CN105786507B (en) Display interface switching method and device
CN108073328B (en) Touch response method and device
CN106227419A (en) Screenshotss method and device
CN106095407A (en) icon arrangement method, device and mobile device
CN106790043A (en) The method and device of message is sent in live application
CN106920090A (en) NFC payment and device
CN107562500A (en) Debugging apparatus, method and apparatus
CN106708519A (en) Operation control adding method and device
CN112148149B (en) Touch screen control method, touch screen control device and storage medium
WO2017181544A1 (en) Method and device for managing task of instant messaging application
CN107622189A (en) Method and device for optimizing fingerprint unlocking
KR102246645B1 (en) Apparatus and method for obtaining image
CN108664198A (en) Virtual card Activiation method, device and terminal device
US20200356977A1 (en) Method and device for controlling application and computer-readable storage medium
CN105912202A (en) Application sharing method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant