NFC card migration method, system and related device
By combining encryption keys and migration recovery keys, the problem of cumbersome NFC card operations when replacing electronic devices is solved, enabling secure and convenient migration of NFC cards.
Patent Information
- Application Number
- CN202411867800.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2024-07-19
- Filing Date
- 2024-12-17
- Publication Date
- 2026-01-20
AI Technical Summary
When replacing electronic devices, users need to reactivate multiple NFC emulation cards using a specific card writing device, which is a cumbersome process.
The first electronic device encrypts the first data using the migration recovery key, generates the second data, and sends it to the server along with the migration recovery key encrypted with the encryption key. The second electronic device decrypts the data based on the encryption key to obtain the card information of the first NFC card, thereby activating the NFC card on the new device.
This eliminates the need for users to manually reactivate NFC cards when replacing electronic devices, simplifying the process and enhancing data security through encryption keys, thus improving the security of the migration process.
Smart Images

Figure CN121367904A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of wireless communication, and particularly relates to a NFC card migration method and system and related devices. BACKGROUND
[0002] With the progress of technology, more and more electronic devices support near field communication (NFC) technology. Electronic devices can realize short-distance bidirectional communication through NFC technology. In NFC technology, the working mode of an NFC device with NFC function when communicating through NFC technology can be divided into three types: proximity coupling device (PCD) mode (also known as reader mode), proximity integrated circuit card (PICC) mode (also known as card simulation mode) and point to point (P2P) mode.
[0003] At present, some electronic devices (such as mobile phones, tablets, wearable devices, etc.) supporting NFC technology can simulate PICC. Among them, the user can open one or more NFC simulation cards in the electronic device. When the electronic device is in the PICC mode, it can simulate itself into a PICC conforming to NFC related standards based on the data of the NFC simulation card, and interact with the NFC card reading device. However, when the user replaces the electronic device, the user needs to re-open multiple NFC simulation cards in the new electronic device through a specific card writing device, which is cumbersome to operate. SUMMARY
[0004] The present application provides a NFC card migration method, system and related devices, which realizes the function of migrating NFC cards of electronic devices logged in the same account.
[0005] In a first aspect, the present application provides a NFC card migration method applied to a first electronic device, the method comprising: encrypting, by the first electronic device, first data using a migration recovery key to obtain second data, the first data comprising card information of a first NFC card; encrypting, by the first electronic device, the migration recovery key based on an encryption key to obtain first ciphertext; and sending, by the first electronic device, third data to a first server, the third data comprising the second data and the first ciphertext, the third data being used for a second electronic device to open the first NFC card. In this way, the first electronic device can send the third data of the first NFC card to the first server, facilitating other electronic devices to migrate into the first NFC card. Wherein, since the first electronic device encrypts the first data using the migration recovery key, the security of the card information of the first NFC card can be protected. In order to protect the security of the migration recovery key, the first electronic device encrypts the migration recovery key based on the encryption key. Because other electronic devices can obtain the encryption key from other channels, the first electronic device does not need to send the encryption key to other electronic devices, and the first electronic device only sends the third data comprising the encrypted migration recovery key and the card information of the first NFC card to the first server. The first server cannot obtain the encryption key, so that the process of migrating the card is more secure and reliable.
[0006] In some examples, the first electronic device obtains the encryption key based on a first account logged in by the first electronic device. In this way, other electronic devices logged in the first account can obtain the encryption key through the first account, and the electronic devices logged in the first account can process the third data based on the encryption key to obtain the card information of the first NFC card and open the first NFC card. The first electronic device can ensure the security of the third data, and also enable electronic devices having the authority to migrate into the first NFC card to obtain the card information of the first NFC card.
[0007] In a possible implementation, the first electronic device encrypts the first data using the migration recovery key to obtain the second data, specifically comprising: the first electronic device receiving a first input of migrating out the first NFC card; and the first electronic device, in response to the first input, encrypting the first data using the migration recovery key to obtain the second data. In this way, the first electronic device sends the third data of the first NFC card to the first server after receiving the input of the user migrating out the first NFC card, reducing the data sent to the first server and saving the storage space of the first server.
[0008] In a possible implementation, the first electronic device sends the third data to the first server, specifically comprising: the first electronic device receives a first request of the second electronic device through the first server, the first request being used for migration of the first NFC card; and the first electronic device sends the third data to the first server in response to the first request; wherein the first server is configured to send the third data to the second electronic device. In this way, the first electronic device sends the third data of the first NFC card to the first server after receiving the first request of the second electronic device for migration of the first NFC card, so that the first server can forward the third data of the first NFC card to the second electronic device.
[0009] In a possible implementation, the first electronic device comprises a processor and a security module, and the processor is connected to the security module; the method further comprises: the processor acquires an encryption key based on a first account logged in by the first electronic device; and the first electronic device encrypts the migration recovery key based on the encryption key to obtain the first ciphertext, specifically comprising: the security module encrypts the migration recovery key based on the first private key to obtain the second ciphertext; the processor encrypts the second ciphertext based on the encryption key to obtain the third ciphertext; and the security module decrypts the third ciphertext based on the first private key to obtain the first ciphertext, wherein the first ciphertext and the encryption key are used to obtain the migration recovery key. In this way, the security module of the first electronic device does not send the migration recovery key of the first NFC card to other modules, and the security of the migration recovery key can be enhanced. The first electronic device can also encrypt the migration recovery key through the encryption key, so that an electronic device logged in the first account can decrypt the migration recovery key accordingly.
[0010] In a possible implementation, the security module encrypts the migration recovery key based on the first private key to obtain the second ciphertext, specifically comprising: the security module generates a first public key based on the first private key, wherein the first private key and the first public key form a pair of public and private keys; the security module encrypts the migration recovery key using the first public key to obtain the second ciphertext; and the security module decrypts the third ciphertext based on the first private key to obtain the first ciphertext, specifically comprising: the security module decrypts the third ciphertext using the first private key to obtain the first ciphertext. In this way, the security module generates the first private key and the first public key, which can facilitate the security module to decrypt the third ciphertext using the first public key while protecting the security of the migration recovery key.
[0011] In a possible implementation, before the security module encrypts the migration recovery key based on the first private key to obtain the second ciphertext, the method further comprises: the security module randomly generates the first private key. In this way, the security module randomly generates the first private key, which can ensure that the keys used in multiple encryption operations are different, and protect the security of the encrypted data.
[0012] In some examples, the security module preinstalls the first private key. In this way, the security module uses the preinstalled first private key, and a new key does not need to be generated each time encryption is performed.
[0013] In a possible implementation, the processor runs a rich execution environment (REE) and a trusted execution environment (TEE), the wallet application runs in the REE, and the key management trusted application runs in the TEE; the processor encrypts the second ciphertext based on the encryption key to obtain a third ciphertext, specifically including: the wallet application sends a first asset identifier to the key management trusted application, the first asset identifier being used to indicate the wallet application, or the first asset identifier being used to indicate a device type feature of the first NFC card; the key management trusted application generates a second private key and a second public key based on the first asset identifier and the encryption key, the second private key and the second public key being a pair of public and private keys; the key management trusted application encrypts the second ciphertext using the second public key to obtain the third ciphertext; and the second private key is used to decrypt the third ciphertext to obtain the second ciphertext. In this way, the processor generates a corresponding second private key for the wallet application, which can separate the keys used by different application programs and ensure the security of data between the application programs. The processor generates a second private key for the first NFC card, which can better protect the data of each NFC card.
[0014] In a possible implementation, the processor obtains the encryption key based on a first account logged in by the first electronic device, specifically including: the processor obtains the encryption key from a second server based on the first account logged in by the first electronic device; and the second server is configured to store one or more keys of the first account, and the one or more keys include the encryption key. In this way, the electronic device logged in the first account can obtain the encryption key from the second server, and other electronic devices logged in the first account can also obtain the encryption key from the second server. The two electronic devices logged in the first account do not need to negotiate and transmit the encryption key in the process of transmitting data, and can use the same encryption key to transmit data, thereby ensuring the security of the data.
[0015] In a possible implementation, the method further includes: the first electronic device generates the encryption key based on account information of the first account. In this way, the electronic device logged in the first account can generate the encryption key based on the account information, so that the first electronic device does not need to transmit the encryption key, and the second electronic device can also decrypt the data transmitted by the first electronic device.
[0016] In a possible implementation, the method further includes: the first electronic device obtains the encryption key from a third server based on a first serial number of the first NFC card, and the third server stores a correspondence between one or more serial numbers of NFC cards and keys. In this way, the NFC card and the key correspond to each other, so that the user can obtain the encryption key through the first serial number of the first NFC card on the second electronic device.
[0017] In a possible implementation, the first electronic device sends the third data to the first server, specifically including: the first electronic device sends the first sequence number to the first server. In this way, the second electronic device can obtain the first sequence number from the first server when obtaining the third data.
[0018] In a possible implementation, the security module of the first electronic device stores the second dedicated file (DF) of the first NFC card; after the first electronic device sends the third data to the first server, the method further includes: the first electronic device deletes the second DF of the first NFC card. In this way, the first electronic device can delete the second DF of the first NFC card after migrating out the first NFC card, thereby ensuring the security of the first NFC card.
[0019] In some examples, after the first electronic device sends the third data to the first server, the method further includes: the first electronic device determines that the card type of the first NFC card is the first type, and deletes the second DF of the first NFC card. In this way, the NFC card of the first type usually includes balance information, in order to avoid the balance information in the first NFC card being out of synchronization, only one of the electronic devices that log in the first account opens the first NFC card.
[0020] In a possible implementation, the first electronic device deletes the second DF of the first NFC card, specifically including: the first electronic device receives a first message of the second electronic device through the first server, the first message being used to instruct the first electronic device to delete the DF of the first NFC card; in response to the first message, the second DF is deleted. In this way, the first electronic device can delete the first NFC card after the second electronic device migrates in the first NFC card, so that the user can use the first NFC card through the first electronic device before other electronic devices migrate in the first NFC card.
[0021] In some examples, after the first electronic device deletes the second DF of the first NFC card, the method further includes: the first electronic device displays a migration control, the migration control being used to trigger the first electronic device to migrate in the first NFC card. In this way, the first electronic device can migrate in the first NFC card again through the migration control after migrating out the first NFC card. In some examples, the first data further includes one or more of the authentication key and the device feature information.
[0022] In a second aspect, the present application provides another NFC card migration method, applied to a second electronic device; the method comprises: the second electronic device obtaining third data of a first electronic device from a first server, the third data comprising second data and first ciphertext; the second electronic device obtaining a migration recovery key based on an encryption key and the first ciphertext; the second electronic device decrypting the second data based on the migration recovery key to obtain first data, the first data comprising card information of a first NFC card; and the second electronic device opening the first NFC card based on the card information of the first NFC card. In this way, the second electronic device can obtain the third data of the first NFC card of the first electronic device from the first server, so that the second electronic device can open the first NFC card, realizing the function of the second electronic device migrating the first NFC card from the first electronic device, so that the user does not need to open the first NFC card on the second electronic device again, and the operation is more simple and convenient. In order to protect the security of the migration recovery key, the first electronic device encrypts the migration recovery key based on the encryption key, the first electronic device does not send the encryption key to the first server, and the first server cannot decrypt the card information of the first NFC card. Although the second electronic device cannot obtain the encryption key from the first server, the second electronic device can obtain the encryption key from other channels, so that the process of migrating the card is more secure and reliable.
[0023] In some examples, the first electronic device obtains the encryption key based on a first account logged in by the first electronic device. In this way, other electronic devices logged in the first account can obtain the encryption key through the first account, and the electronic devices logged in the first account can all process the third data based on the encryption key to obtain the card information of the first NFC card and open the first NFC card. The first electronic device can not only ensure the security of the third data, but also enable electronic devices with the permission to migrate the first NFC card to obtain the card information of the first NFC card.
[0024] In a possible implementation, the second electronic device obtains the third data of the first electronic device from the first server, specifically comprising: the second electronic device receiving a second input of migrating the first NFC card; and the second electronic device obtaining the third data of the first electronic device from the first server in response to the second input. In this way, the second electronic device migrates the first NFC card of the first electronic device through the first server after receiving the input of the user migrating the first NFC card, and the user can select the NFC card to be migrated.
[0025] In a possible implementation, the second electronic device obtains the third data of the first electronic device from the first server, specifically including: the second electronic device sends a first request to the first electronic device through the first server, the first request being used to obtain the data of the first NFC card; and the second electronic device obtains the third data of the first electronic device from the first server. In this way, the first server does not need to store the third data of the first NFC card, and the second electronic device can directly obtain the third data from the first electronic device.
[0026] In some examples, the second electronic device logs in the first account; and the second electronic device obtains the third data of the first electronic device from the first server, specifically including: the second electronic device obtains the third data of the first electronic device that logs in the first account from the first server based on the first account. In this way, since the first electronic device and the second electronic device both log in the first account, the second electronic device can obtain the third data of the first electronic device that logs in the first account from the first server.
[0027] In a possible implementation, the second electronic device includes a processor and a security module, and the processor is connected with the security module; the method further includes: the processor obtains an encryption key based on the first account logged in by the second electronic device; and the second electronic device obtains a migration recovery key based on the encryption key and the first ciphertext, specifically including: the security module encrypts the first ciphertext based on a third private key to obtain a fourth ciphertext; the processor decrypts the fourth ciphertext based on the encryption key to obtain a fifth ciphertext; and the security module decrypts the fifth ciphertext based on the third private key to obtain the migration recovery key. In this way, the second electronic device can obtain the migration recovery key based on the encryption key obtained based on the first account, so that all electronic devices that log in the first account can transmit data based on the encryption key, and the security of the data of the NFC card is ensured.
[0028] In a possible implementation, the security module encrypts the first ciphertext based on a third private key to obtain a fourth ciphertext, specifically including: the security module generates a third public key based on the third private key, the third private key and the third public key being a pair of public and private keys; the security module encrypts the first ciphertext using the third public key to obtain the fourth ciphertext; and the security module decrypts the fifth ciphertext based on the third private key to obtain the migration recovery key, specifically including: the security module decrypts the fifth ciphertext using the third private key to obtain the migration recovery key. In this way, the security module encrypts the first ciphertext using the third public key, and sends the fourth ciphertext to the processor, so that the processor cannot obtain the migration recovery key in plaintext after decrypting the fourth ciphertext, and the security of the migration recovery key is enhanced. The security module can obtain the migration recovery key based on the third private key after obtaining the fifth ciphertext.
[0029] In a possible implementation, before the security module encrypts the first ciphertext based on the third private key to obtain a fourth ciphertext, the method further includes: the security module randomly generating the third private key. In this way, the security module randomly generates the third private key, and the key used by the security module each time the encryption operation is performed is different, reducing the probability of the processor obtaining the third private key.
[0030] In a possible implementation, the processor runs a rich execution environment (REE) and a trusted execution environment (TEE), the wallet application runs in the REE, and the key management trusted application runs in the TEE; the processor decrypts the fourth ciphertext based on the asset key to obtain a fifth ciphertext, and specifically includes: the wallet application sends a first asset identifier to the key management trusted application, the first asset identifier being used to indicate the wallet application, or the first asset identifier being used to indicate a device type feature of the first NFC card; the key management trusted application generates a second private key based on the first asset identifier and the encryption key; and the key management trusted application decrypts the fourth ciphertext using the second private key to obtain the fifth ciphertext.
[0031] In a possible implementation, the processor obtains the encryption key based on a first account logged in by the second electronic device, and specifically includes: the processor obtains the encryption key from a second server based on the first account; and the second server is configured to store one or more keys of the first account, and the one or more keys include the encryption key. In this way, the second electronic device can obtain the encryption key based on the logged-in first account, so that multiple electronic devices logged in the first account can securely migrate the NFC card based on the encryption key.
[0032] In a possible implementation, the method further includes: the second electronic device generates the encryption key based on account information of the first account. In this way, the second electronic device and the first electronic device are both logged in the first account, and the second electronic device can decrypt the data sent by the first electronic device accordingly.
[0033] In a possible implementation, the method further includes: the second electronic device obtains the encryption key from a third server based on a first serial number of the first NFC card, and the third server stores a correspondence between the serial numbers of one or more NFC cards and keys. In this way, the second electronic device can obtain the encryption key according to the first serial number of the first NFC card.
[0034] In a possible implementation, before the second electronic device obtains the encryption key from the third server based on the first serial number of the first NFC card, the method further includes: the second electronic device displays prompt information for prompting a user to input the serial number of the first NFC card; and the second electronic device receives the first serial number input by the user. In this way, the second electronic device can receive the first serial number input by the user, and the second electronic device can obtain the encryption key accordingly.
[0035] In a possible implementation, before the second electronic device obtains the encryption key from the third server based on the first serial number of the first NFC card, the method further includes: obtaining, by the second electronic device, the first serial number from the first server. In this way, the first electronic device sends the first serial number to the second electronic device through the first server, so that the user does not need to check the first serial number on the first electronic device, and the user is facilitated to perform the operation of migrating the first NFC card.
[0036] In a possible implementation, after the second electronic device opens the first NFC based on the card information of the first NFC card, the method further includes: sending, by the second electronic device, a first message to the first electronic device through the first server, the first message being used to instruct the first electronic device to delete the second DF of the first NFC card. In this way, after the second electronic device migrates the first NFC card, the second electronic device can instruct the first electronic device to delete the first NFC card, and the user can only use the first NFC card through the second electronic device, so that the security of the first NFC card is ensured.
[0037] In some examples, after the second electronic device generates the first special file DF based on the card information of the first NFC card, the method further includes: determining, by the second electronic device, that the card type of the first NFC card is the first type, and sending, by the second electronic device, a first message to the first electronic device through the first server, the first message being used to instruct the first electronic device to delete the second DF of the first NFC card. In this way, the second electronic device determines that the first NFC card includes balance information, and when multiple electronic devices include the first NFC card, the multiple electronic devices may be used by the user, which may cause the balance information to be out of synchronization. In order to ensure that the balance information of the first NFC card does not become chaotic, the second electronic device can instruct the first electronic device to delete the first NFC card, so that the user can only use the first NFC card through the second electronic device.
[0038] In a possible implementation, the second electronic device opens the first NFC card based on the card information of the first NFC card, and specifically includes: generating, by the second electronic device, a first special file DF, the first DF including the card information of the first NFC card, and the first DF being used to implement the card swiping business of the first NFC card.
[0039] In a possible implementation, the second electronic device logs in the first account; and before the second electronic device obtains the third data of the first electronic device from the first server, the method further includes: obtaining, from the first server, a specified identifier, the specified identifier including an identifier of an NFC card that has not been migrated out of the electronic device logging in the first account and an identifier of an NFC card that has been migrated out of the electronic device logging in the first account, the electronic device logging in the first account including the first electronic device, and the specified identifier including the identifier of the first NFC card; and based on the identifier of the first NFC card, displaying prompt information for prompting the user that the second electronic device supports migration of the first NFC card. In this way, the specified identifier is used to indicate one or more NFC cards of the electronic device logging in the first account, and the second electronic device logging in the first account can determine the NFC cards on other electronic devices logging in the first account based on the specified identifier, and the second electronic device can migrate the NFC cards on the electronic devices logging in the first account based on this.
[0040] It can be understood that the second electronic device displays prompt information for prompting the user that the second electronic device supports migration of an NFC card other than the NFC card of the second electronic device in the one or more NFC cards indicated by the specified identifier. In this way, the second electronic device can obtain the identifiers of all the NFC cards and prompt the user that the NFC card can be migrated to the second electronic device.
[0041] In some other examples, the specified identifier includes an identifier of one or more NFC cards that have been migrated out of the electronic device logging in the first account. In this way, the second electronic device can prompt the user that the other NFC cards that have been migrated out of the electronic device logging in the first account can be migrated to the second electronic device.
[0042] In some other examples, the specified identifier includes an NFC card that has been migrated out of the electronic device logging in the first account and an NFC card of a second type that has not been migrated out of the electronic device logging in the first account. In this way, since the NFC card of the first type includes balance information, the electronic device logging in the first account can only prompt the user to migrate the NFC card of the first type that has been migrated out of other electronic devices. The NFC card of the second type does not include balance information and has a wide range of application scenarios, and the electronic device logging in the first account can prompt the user to migrate the NFC card of the second type to other electronic devices regardless of whether the NFC card of the second type has been migrated out of other electronic devices.
[0043] In a third aspect, the present application provides a near field communication (NFC) card migration method, applied to a first server, the method comprising: receiving third data of a first NFC card sent by a first electronic device logged in a first account, the third data being used for the electronic device logged in the first account to migrate the first NFC card; receiving a first request of migrating the first NFC card sent by a second electronic device logged in the first account; and in response to the first request, sending the third data to the second electronic device. In this way, the first server can manage the data of the NFC cards of multiple electronic devices, so that the electronic devices logged in the same account can conveniently migrate the NFC cards.
[0044] In a possible implementation, after receiving the third data of the first NFC card sent by the first electronic device logged in the first account, the method further comprises: sending an identifier of the first NFC card to the second electronic device logged in the first account, the identifier of the first NFC card being used to indicate that the second electronic device is allowed to migrate the first NFC card. In this way, the first server can inform the second electronic device logged in the first account that the first electronic device logged in the first account migrates the data of the first NFC card, so that the second electronic device logged in the first account can determine the NFC card allowed to be migrated, and the second electronic device can conveniently perform the operation of migrating the first NFC card.
[0045] In a possible implementation, the method further comprises: sending a specified identifier to the electronic device logged in the first account; wherein the specified identifier comprises an identifier of a NFC card migrated by the electronic device logged in the first account and an identifier of a NFC card migrated by the electronic device logged in the first account, or the specified identifier comprises an identifier of a NFC card migrated by the electronic device logged in the first account, or the specified identifier comprises an identifier of a NFC card migrated by the electronic device logged in the first account and an identifier of a second type of NFC card not migrated by the electronic device logged in the first account; and the specified identifier is used for the electronic device logged in the first account to display prompt information for prompting a user to migrate the NFC card not activated on the electronic device. In this way, the electronic device logged in the first account can synchronize the identifiers of the activated NFC cards, and the user can migrate the NFC cards between multiple electronic devices.
[0046] In a fourth aspect, the present application provides a near field communication (NFC) card migration method, applied to a communication system including a first electronic device and a second electronic device; the method comprises: a first electronic device logged in a first account encrypting first data using a migration recovery key to obtain second data, the first data including card information of a first NFC card; the first electronic device encrypting the migration recovery key based on an encryption key to obtain first ciphertext; the first electronic device sending third data to a first server, the third data including the second data and the first ciphertext; the second electronic device obtaining the third data from the first server based on the logged-in first account; the second electronic device obtaining the migration recovery key based on the encryption key and the first ciphertext; the second electronic device decrypting the second data based on the migration recovery key to obtain the first data; and the second electronic device opening the first NFC card based on the card information of the first NFC card. In this way, the first electronic device logged in the first account can migrate the first NFC card to the second electronic device logged in the first account, so that electronic devices logged in the same account can quickly and conveniently migrate the NFC card through the above method, and it is convenient for users to use the same NFC card on different electronic devices. The first electronic device does not send the encryption key to the first server, and the first server cannot decrypt the third data to obtain the card information of the first NFC card, so the whole migration process is more secure and reliable.
[0047] In a possible implementation, the method further comprises: the first electronic device obtaining the encryption key based on the first account; and the second electronic device obtaining the encryption key based on the first account. In this way, the first electronic device and the second electronic device can determine the encryption key based on the logged-in account, and the first electronic device can protect the security of the encryption key without sending the encryption key to the second electronic device.
[0048] In a possible implementation, the first electronic device encrypts the migration recovery key based on the encryption key to obtain the first ciphertext, specifically comprising: a security module of the first electronic device encrypting the migration recovery key based on a first private key to obtain second ciphertext; a processor of the first electronic device encrypting the second ciphertext based on the encryption key to obtain third ciphertext; and the security module of the first electronic device decrypting the third ciphertext based on the first private key to obtain the first ciphertext, the first ciphertext and the encryption key being used to obtain the migration recovery key.
[0049] In a possible implementation, the second electronic device obtains the migration recovery key based on the encryption key and the first ciphertext, specifically comprising: a security module of the second electronic device encrypting the first ciphertext based on a third private key to obtain fourth ciphertext; a processor of the second electronic device decrypting the fourth ciphertext based on the encryption key to obtain fifth ciphertext; and the security module of the second electronic device decrypting the fifth ciphertext based on the third private key to obtain the migration recovery key.
[0050] In a possible implementation, the first electronic device logged in the first account encrypts the first data using the migration recovery key to obtain second data, specifically including: the first electronic device receiving a first input of migrating out the first NFC card; the first electronic device, in response to the first input, encrypting the first data using the migration recovery key to obtain the second data.
[0051] In a possible implementation, before the second electronic device obtains the third data from the first server based on the logged-in first account, the method further includes: the second electronic device sending a first request to the first electronic device through the first server, the first request being used for migrating in the first NFC card; the first electronic device sending the third data to the first server, specifically including: the first electronic device receiving the first request of the second electronic device through the first server; the first electronic device, in response to the first request, sending the third data to the first server.
[0052] In a possible implementation, the processor of the first electronic device runs a rich execution environment (REE) and a trusted execution environment (TEE), the REE runs a first wallet application, and the TEE runs a first key management trusted application; the processor of the first electronic device encrypts the second ciphertext based on the encryption key to obtain third ciphertext, specifically including: the first wallet application sends a first asset identifier to the first key management trusted application, the first asset identifier being used to indicate the wallet application, or the first asset identifier being used to indicate a device type feature of the first NFC card; the first key management trusted application generates a second private key and a second public key based on the first asset identifier and the encryption key, the second private key and the second public key being a pair of public and private keys; the first key management trusted application encrypts the second ciphertext using the second public key to obtain the third ciphertext; wherein the second private key is used to decrypt the third ciphertext to obtain the second ciphertext.
[0053] The processor of the second electronic device runs a rich execution environment (REE) and a trusted execution environment (TEE), the REE runs a second wallet application, and the TEE runs a second key management trusted application; the processor of the first electronic device decrypts the fourth ciphertext based on the asset key to obtain fifth ciphertext, specifically including: the second wallet application sends a first asset identifier to the second key management trusted application, the first asset identifier being used to indicate the wallet application, or the first asset identifier being used to indicate a device type feature of the first NFC card; the second key management trusted application generates a second private key based on the first asset identifier and the encryption key; the second key management trusted application decrypts the fourth ciphertext using the second private key to obtain the fifth ciphertext.
[0054] In a possible implementation, the method further includes: the first electronic device generating the encryption key based on account information of the first account; and the second electronic device generating the encryption key based on the account information of the first account.
[0055] In a possible implementation, the method further includes: obtaining, by the first electronic device, the encryption key from a third server based on the first serial number of the first NFC card, the third server storing a correspondence between serial numbers of one or more NFC cards and keys; and obtaining, by the second electronic device, the encryption key based on the first serial number of the first NFC card.
[0056] In a possible implementation, after the first electronic device sends the third data to the first server, the method further includes: deleting, by the first electronic device, the second DF of the first NFC card.
[0057] In a possible implementation, after the first electronic device sends the third data to the first server, the method further includes: determining, by the first electronic device, that the card type of the first NFC card is the first type, and deleting the second DF of the first NFC card.
[0058] In some examples, before the first electronic device sends the third data to the first server, the method further includes: moving, by the first electronic device, into a radio frequency field of an NFC card reading device, and successfully swiping a card on the NFC card reading device; and after the first electronic device sends the third data to the first server, the method further includes: moving, by the first electronic device, into the radio frequency field of the NFC card reading device, and failing to swipe a card on the NFC card reading device.
[0059] In some examples, after the first electronic device sends the third data to the first server, the method further includes: displaying, by the first electronic device, a migration-in control, the migration-in control being used to trigger the first electronic device to migrate into the first NFC card. In this way, after the first electronic device migrates out of the first NFC card, the first electronic device can migrate into the first NFC card again through the migration-in control.
[0060] In some examples, the first electronic device displays the migration-in control, the migration-in control being used to trigger the first electronic device to migrate into the first NFC card, and specifically includes: displaying the migration-in control before the second electronic device opens the first NFC based on the card information of the first NFC card. In this way, after the first electronic device migrates out of the first NFC card, the first electronic device can migrate into the first NFC card again through the migration-in control after the second electronic device migrates into the first NFC card.
[0061] In some examples, the card type of the first NFC card is the first type. In this way, only one of the electronic devices that log in to the first account includes the first NFC card.
[0062] In a possible implementation, after the second electronic device opens the first NFC based on the card information of the first NFC card, the method further includes: sending, by the second electronic device, a first message to the first electronic device through the first server, the first message being used to instruct the first electronic device to delete the second DF of the first NFC card; and deleting, by the first electronic device, the second DF of the first NFC card, specifically including: receiving, by the first electronic device, the first message from the second electronic device through the first server; and deleting the second DF in response to the first message.
[0063] In some examples, the second electronic device sends the first message to the first electronic device through the first server, specifically including: determining, by the second electronic device, that the card type of the first NFC card is the first type, and sending the first message to the first electronic device.
[0064] In other examples, the first electronic device deletes the second DF of the first NFC card, specifically including: receiving, by the first electronic device, the first message from the second electronic device through the first server; and determining, by the first electronic device, that the card type of the first NFC card is the first type in response to the first message, and deleting the second DF.
[0065] In some examples, after the first electronic device deletes the second DF of the first NFC card, the method further includes: displaying, by the first electronic device, a migration control.
[0066] In a fifth aspect, the present application provides a communication system, including: a first electronic device and a second electronic device; wherein the first electronic device is configured to perform the NFC card migration method in any possible implementation of the first aspect; and the second electronic device is configured to perform the NFC card migration method in any possible implementation of the second aspect.
[0067] In a sixth aspect, the present application provides a near field communication (NFC) card migration method, applied to a communication system including a first electronic device and a second electronic device. The method comprises: obtaining, by the first electronic device, a migration recovery key from a third server based on a first serial number of a first NFC card, the third server storing a correspondence between serial numbers and migration recovery keys; encrypting, by the first electronic device, first data using the migration recovery key to obtain second data, the first data including card information of the first NFC card; sending, by the first electronic device, the second data to a first server; obtaining, by the second electronic device, the second data from the first server; obtaining, by the second electronic device, the migration recovery key from the third server based on the first serial number; decrypting, by the second electronic device, the second data based on the migration recovery key to obtain the first data; and opening, by the second electronic device, the first NFC card based on the card information of the first NFC card. In this way, the first electronic device and the second electronic device can obtain the migration recovery key from the third server, and the card information of the first NFC card is protected. The first server only includes third data, cannot obtain the migration recovery key, and cannot obtain the card information of the first NFC card. Only the electronic device logged in the first account can obtain the encryption key, so that the migration process is more secure and reliable.
[0068] In a seventh aspect, the present application provides an electronic device, comprising one or more processors, one or more memories, and a transceiver. The transceiver, the one or more memories, and the one or more processors are coupled, and the one or more memories are configured to store a computer program. When the one or more processors execute the computer program, the NFC card migration method in the first aspect and any possible implementation manner of the first aspect is executed.
[0069] In an eighth aspect, the present application provides an electronic device, comprising one or more processors, one or more memories, and a transceiver. The transceiver, the one or more memories, and the one or more processors are coupled, and the one or more memories are configured to store a computer program. When the one or more processors execute the computer program, the NFC card migration method in the second aspect and any possible implementation manner of the second aspect is executed.
[0070] In a ninth aspect, the present application provides a computer storage medium, storing a computer program. When the computer program is executed by a processor, the NFC card migration method in the first aspect and any possible implementation manner of the first aspect is implemented.
[0071] In a tenth aspect, the present application provides a computer storage medium, storing a computer program. When the computer program is executed by a processor, the NFC card migration method in the second aspect and any possible implementation manner of the second aspect is implemented.
[0072] In a eleventh aspect, the present application provides a computer program product comprising a computer program which, when executed by a processor, implements the NFC card migration method of the first aspect above and any possible implementation of the first aspect.
[0073] In a twelfth aspect, the present application provides a computer program product comprising a computer program which, when executed by a processor, implements the NFC card migration method of the second aspect above and any possible implementation of the second aspect.
[0074] In a thirteenth aspect, the present application provides a chip system comprising a processing circuit and an interface circuit, the interface circuit being configured to receive code instructions and transmit the code instructions to the processing circuit, and the processing circuit being configured to execute the code instructions to perform the NFC card migration method of the first aspect above and any possible implementation of the first aspect.
[0075] In a fourteenth aspect, the present application provides a chip system comprising a processing circuit and an interface circuit, the interface circuit being configured to receive code instructions and transmit the code instructions to the processing circuit, and the processing circuit being configured to execute the code instructions to perform the NFC card migration method of the second aspect above and any possible implementation of the second aspect.
[0076] The beneficial effects of the fourth aspect to the fourteenth aspect above and any possible implementation of the fourth aspect to the fourteenth aspect can refer to the beneficial effects of the first aspect, the second aspect, any possible implementation of the first aspect, and any possible implementation of the second aspect, which will not be repeated here. BRIEF DESCRIPTION OF DRAWINGS
[0077] Figure 1 A schematic diagram of an NFC working principle provided by an embodiment of the present application;
[0078] Figure 2 A schematic diagram of a communication system 10 provided by an embodiment of the present application;
[0079] Figure 3A A structural schematic diagram of an electronic device provided by an embodiment of the present application;
[0080] Figure 3B A schematic diagram of an NFC protocol stack provided by an embodiment of the present application;
[0081] Figure 3C A schematic diagram of a file structure of an MF provided by an embodiment of the present application;
[0082] Figure 3D A schematic diagram of another file structure of an MF provided by an embodiment of the present application;
[0083] Figures 4A-4IA set of interface schematic diagrams for migrating out of the first NFC card provided by the embodiments of the present application;
[0084] Figures 5A-5L A set of interface schematic diagrams for migrating into the first NFC card provided by the embodiments of the present application;
[0085] Figure 6A And Figure 6B A set of interface schematic diagrams for migrating the NFC card provided by the embodiments of the present application;
[0086] Figure 7 A flowchart of a NFC card migration method provided by the embodiments of the present application;
[0087] Figure 8 A flowchart of another NFC card migration method provided by the embodiments of the present application;
[0088] Figure 9 An interface schematic diagram for migrating the NFC card provided by the embodiments of the present application;
[0089] Figure 10 A flowchart of another NFC card migration method provided by the embodiments of the present application;
[0090] Figure 11 A flowchart of another NFC card migration method provided by the embodiments of the present application;
[0091] Figure 12 A hardware structure schematic diagram of an electronic device provided by the embodiments of the present application;
[0092] Figure 13 A structure schematic diagram of a communication apparatus provided by the embodiments of the present application;
[0093] Figure 14 A structure schematic diagram of another communication apparatus provided by the embodiments of the present application;
[0094] Figure 15 A structure schematic diagram of another communication apparatus provided by the embodiments of the present application;
[0095] Figure 16 A structure schematic diagram of another communication apparatus provided by the embodiments of the present application. DETAILED DESCRIPTION
[0096] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings. In the description of the embodiments of the present application, unless otherwise specified, " / " represents the meaning of or, for example, A / B can represent A or B; the "and / or" in the text only describes the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B, which means that there are three cases of A alone, A and B together, and B alone. In addition, in the description of the embodiments of the present application, "multiple" means two or more than two.
[0097] Hereinafter, the terms "first" and "second" are used only for descriptive purposes, and cannot be understood as implying or suggesting relative importance or implicitly indicating the number of indicated technical features. Therefore, the features defined with "first" and "second" can explicitly or implicitly include one or more features. In the description of the embodiments of the present application, unless otherwise specified, the meaning of "multiple" is two or more than two.
[0098] The working principle of NFC in the embodiments of the present application will be introduced below.
[0099] Figure 1 A schematic diagram of the working principle of NFC provided in the embodiments of the present application is shown.
[0100] As Figure 1 described, the two parties using NFC technology for communication can include a proximity coupling device (PCD) (also known as an NFC card reading device) and a proximity smart card (PICC). Among them, the PCD can realize proximity non-contact communication with the PICC. The PCD and the PICC can allow near field communication at a specific data rate (for example, 106 kilobits per second (kbit / s), 212 kbit / s, 424 kbit / s, 847 kbit / s, etc.). The communication between the PCD and the PICC can occur within a short distance between the PCD and the PICC, for example, within a range of about 2 to 4 centimeters.
[0101] The PCD can generate high-frequency alternating current to generate a radio frequency field at a specified frequency (for example, 13.56 MHz) and transmit data to the PICC through the radio frequency field. After the PICC approaches the PCD, it can induct the radio frequency field emitted by the PCD. Among them, the PICC can obtain energy from the radio frequency field of the PCD through electromagnetic induction after entering the radio frequency field emitted by the PCD, and generate power by means of the obtained energy to drive the circuit inside the PICC, analyze the data transmitted by the PCD through the radio frequency field, and thus realize the data transmission from the PCD to the PICC. The PICC can also send data to the PCD by modulating the radio frequency field as a load, realizing the data transmission from the PICC to the PCD.
[0102] In the embodiments of the present application, the PICC can be an NFC tag card of an entity, and some NFC devices (for example, mobile phones, tablets, smart watches, and other electronic devices) can also simulate themselves into a PICC conforming to NFC related standards by NFC card data (referred to as NFC card data) to realize the functions of the PICC and communicate with the PCD. The NFC card data can include but is not limited to one or more of the card information of the PICC, an external authentication key (referred to as an authentication key), and the like. It should be noted that in the embodiments of the present application, the NFC card in the NFC device can be referred to as an NFC simulation card.
[0103] The device type of the NFC card reading device can be any one of a mobile phone, a tablet computer, a handheld computer, a desktop computer, a laptop computer, an ultra-mobile personal computer, a netbook, a cellular phone, a personal digital assistant, and a smart large screen, a smart sound box, and the like smart home device, a smart bracelet, a smart watch, smart glasses, and the like wearable device, an extended reality device such as augmented reality, virtual reality, and mixed reality, a vehicle, an access control device, a smart door lock, a card swiping device, a payment terminal, a ticket buying and / or checking terminal, a bank service terminal, an identification card reading device, and the like.
[0104] The NFC card reading device can perform a card swiping verification process based on the card information of the PICC. The NFC card reading device can send a card swiping result to the PICC through NFC command interaction. The card information of the PICC can include but is not limited to one or more of access control information, key information, transaction account information, electronic ticket information, and validity period information (used to indicate the validity period of the card information). The access control information can include one or more of a card number and the like. The key information can include one or more of a key code and the like. The transaction account information can include one or more of a transaction account identifier, a remaining amount of the transaction account, and the like. The electronic ticket information can include one or more of an electronic ticket code, a ticket checking time of the electronic ticket, and a validity period of the electronic ticket.
[0105] In some application scenarios, the PICC stores card information and an external authentication key (referred to as an authentication key for short). When the PICC approaches a card swiping area of an NFC card reading device, the PICC can confirm whether to send the card information to the NFC card reading device based on the stored authentication key and an authentication key stored by the NFC card reading device. The PICC can send the card information to the NFC card reading device when it is determined that the stored authentication key is the same as the authentication key stored by the NFC card reading device. The NFC card reading device can complete an NFC service corresponding to the PICC based on the card information obtained from the PICC. In this way, the PICC can authenticate the NFC card reading device through the authentication key, and the NFC card reading device can determine whether to complete the service corresponding to the PICC through the card information of the PICC. For example, when the PCD is an access control device, the PCD can determine whether a user holding the PICC can pass through the access control device based on the card information of the PICC. After the user loses the PICC, other personnel do not have the authentication key and cannot obtain the card information of the PICC.
[0106] In some examples, the PICC can generate a random number. The NFC card reading device can obtain the random number from the PICC. The NFC card reading device can encrypt the random number using the authentication key to obtain authentication ciphertext. The NFC card reading device can send the authentication ciphertext to the PICC. The PICC can decrypt the authentication ciphertext using the stored authentication key to obtain the random number. The PICC can send the card information of the PICC to the NFC card reading device when it is determined that the decrypted random number is the same as the generated random number. The NFC card reading device can complete the NFC service corresponding to the PICC based on the received card information of the PICC. It can be understood that the PICC can not send the card information of the PICC to the NFC card reading device when it is determined that the decrypted random number is not the same as the generated random number. In this way, the PICC can confirm whether to send the card information of the PICC to the NFC card reading device based on the stored authentication key and the authentication key stored by the NFC card reading device.
[0107] In some examples, the PICC can encrypt the random number and the card information using the authentication key to obtain encrypted data when it is determined that the decrypted random number is the same as the generated random number. The PICC can send the encrypted data to the NFC card reading device. After receiving the encrypted data, the NFC card reading device can decrypt the encrypted data based on the authentication key to obtain the card information. In this way, because the random number generated by the PICC is different, the encrypted data sent by the PICC to the NFC card reading device is also different, and it can be avoided that other devices obtain the card information.
[0108] A communication system provided in an embodiment of the present application is introduced below.
[0109] Figure 2 A schematic diagram of a communication system 10 provided in an embodiment of the present application is shown.
[0110] like Figure 2 As shown, the communication system 10 may include electronic device 100, electronic device 200, and server 300. Electronic devices 100 and 200 can simulate themselves as PICC devices conforming to NFC standards using NFC card data to achieve PICC functionality. Server 300 provides a server for a specific application (e.g., a wallet application) with a specified account. Electronic devices logged into the specified application can send NFC card data to server 300, which can store the correspondence between account information and NFC card data. The account information can be used to indicate the account logged into by electronic devices (e.g., electronic devices 100, 200, etc.), and may include, but is not limited to, one or more of the following: account name, mobile phone number, etc.
[0111] After receiving an instruction from an electronic device (e.g., electronic device 100, electronic device 200, etc.) that will log in to a specified account of a specified application to obtain NFC card data, server 300 determines the NFC card data corresponding to the account information of the specified account based on the stored correspondence between account information and NFC card data, and sends the NFC card data to the electronic device. The electronic device can then import an NFC card based on the acquired NFC card data. Afterwards, the electronic device with the imported NFC card can send the NFC card information to a nearby PCD while in PICC mode. The PCD can then complete the NFC service corresponding to the NFC card based on the card information obtained from the electronic device.
[0112] Electronic device 100 and electronic device 200 establish a communication connection with server 300. Electronic device 100 and / or electronic device 200 can send the mapping relationship between the account information of the logged-in designated account and the NFC card data to server 300. Server 300 can store the mapping relationship between the account information of the designated account and the NFC card data. When electronic device 100 and / or electronic device 200 logs in to the designated account, it can download the NFC card data corresponding to the designated account from server 300.
[0113] For example, server 300 stores a mapping between account information and address information. The address information can be used to indicate the address of the electronic device (e.g., Internet Protocol address) of the account indicated by the login account information. Server 300 can establish a communication connection with the electronic device indicated by the address information based on the mapping between the account information and the address information of the electronic device, and then send NFC card data to the electronic device through the communication connection.
[0114] In some examples, the communication system 10 may also include a server 400 and / or a PICC 500 (not shown in the figure). The server 400 and / or PICC 500 stores NFC card data. When an electronic device (e.g., electronic device 100) activates an NFC emulation card, the server 400 and / or PICC 500 can write the NFC card data into a dedicated file (DF) created by the electronic device, enabling the electronic device to emulate a PICC based on the contents of the DF to achieve PICC functionality. Optionally, the server 400 can write the NFC card data into the dedicated file created by the electronic device using a card writing device.
[0115] In some examples, the communication system 10 may also include a server 700. The server 700 may be used to store a shared key. Multiple electronic devices logged into a first account can encrypt data transmitted between them based on the shared key.
[0116] The following is a schematic diagram of the structure of an electronic device 100 provided in the embodiments of this application.
[0117] Figure 3A A schematic diagram of the structure of an electronic device 100 provided in an embodiment of this application is shown.
[0118] like Figure 3A As shown, the electronic device 100 may include a central processing unit (CPU) 101 and an NFC module 102. The processor 101 may run one or more applications. These applications may include one or more of the following: an application for managing NFC emulated cards (e.g., a wallet application), one or more host-based card emulation (HCE) applications, etc. Optionally, the electronic device 100 may also include a secure element (SE) 103 and / or a subscriber identity module (SIM) card 104. The processor 101 may be connected to the NFC module 102, the SE 103, and the SIM card 104, respectively. The NFC module 102 may also be connected to the SE 103 and the SIM card 104.
[0119] NFC module 102 may include an NFC controller ( Figure 3A (not shown in the image), NFC transceiver ( Figure 3A (not shown in the image) and NFC memory ( Figure 3A (Not shown in the image). The NFC controller can be connected to the processor 101, and can also be connected to the NFC transceiver and the NFC memory respectively.
[0120] The NFC controller is mainly used for modulating and demodulating non-contact communication signals, controlling the input and output of data in the NFC memory, and interacting with the processor 101. The NFC transceiver is used to realize the transmission and reception of NFC signals (for example, 13.56 MHz radio frequency signals), which can include an electromagnetic compatibility (EMC) filter circuit, a matching circuit, a receiving circuit, and an NFC antenna, etc., wherein the NFC antenna can be a loop antenna, which is used to realize the proximity-based non-contact communication capability of the NFC module 102. The NFC memory can be used to store data transmitted by the NFC module 102 to the NFC card reading device, and data received from the NFC card reading device. In some embodiments, the NFC memory can be one memory, which can be shared by the above components in the NFC module 102, for example, some data in the NFC memory can be called by the NFC controller, and other data can be called by the SE 103.
[0121] In other embodiments, the NFC memory can also be a collection of multiple memories, for example, the NFC controller can include a first memory of the multiple memories, and the first memory can include instructions or data used or recycled by the NFC controller. If the NFC controller needs to use the instructions or data again, it can be directly called from the first memory, so as to reduce the waiting time of the NFC controller. The SE 103 can include a second memory of the multiple memories. The second memory can include card information of a NFC emulation card based on the secure element, etc., so that if the SE 103 needs to read the card information of the NFC emulation card, the card information of the NFC emulation card can be read from the second memory in the SE 103. The SIM card 104 can include a third memory of the multiple memories. The third memory can include card information of a NFC emulation card based on the SIM card, etc., so that if the SIM card 104 needs to read the card information of the NFC emulation card, the card information of the NFC emulation card can be read from the third memory in the SIM card 104.
[0122] In some embodiments, the NFC memory described above can also store routing information. In some embodiments, the routing information can be controlled or managed by the NFC controller, and the routing information can include a routing table composed of a list of routing rules. Each routing rule contains an applet identifier (AID) and a destination. The destination is where the Applet that implements the business logic of the NFC emulation card runs. The destination can include an HCE application running in the processor 101 of the electronic device 100, or the SE 103 or the SIM card 104 connected to the NFC controller.
[0123] The SE 103 and the NFC module 102 can be two independent chips. Alternatively, the SE 103 and the NFC module 102 can be packaged in one chip.
[0124] The electronic device 100 can open one or more NFC emulation cards in the application according to the user's input, so as to enable the electronic device 100 to support one or more NFC services. The business processing logic of the NFC emulation card in the electronic device 100 is implemented by an applet. The applet can be stored and run in the hardware device or software module (for example, HCE application, SIM card, SE, etc.) corresponding to the NFC emulation card.
[0125] The card emulation mode on the electronic device 100 can be divided into a hardware-based virtual card mode and a software-based HCE mode. In the hardware-based virtual card mode,
[0126] 1. In the hardware-based virtual card mode, the electronic device 100 can provide the running environment of the Applet of the NFC emulation card and the storage and processing of the business data of the NFC emulation card through the SE 103 or the SIM card 104. The NFC module 102 as the front end of the contactless communication forwards the command received from the external PCD to the SE 103 or the SIM card 104, and then the Applet in the SE 103 or the SIM card 104 processes it and sends the response data to the external PCD through the NFC module 102. The user can open one or more NFC emulation cards in the wallet application, and the wallet application can write the Applet and card data of the one or more NFC emulation cards into the SE 103. Alternatively, the user can open one or more NFC emulation cards in the SIM card application. The SIM card application can write the Applet and card data of the one or more NFC emulation cards into the SIM card 104 for storage.
[0127] 2、In the software-based HCE mode, the HCE application running in the processor 101 can provide a running environment of the Applet corresponding to the NFC emulation card and storage and processing of the service data of the NFC emulation card. After receiving a command sent by an external PCD, the NFC module 102 can send the command to the HCE application. The HCE application can process the command received by the NFC module through the Applet running in the HCE application or a cloud server, and generate response data for the PCD. The HCE application can send the response data to the NFC module 102. The NFC module 102 can send the response data to the external PCD. The user can open one or more NFC emulation cards in the HCE application, and the HCE application can run the Applet of the one or more NFC emulation cards and save the card data of the NFC emulation card on the local storage of the electronic device 100 or on the cloud server.
[0128] Optionally, the processor 101 can also run an NFC basic service module. The NFC basic service module can be used to provide common management functions for one or more NFC services. The common management functions can include file management, card long activation, security management, service routing management, and the like.
[0129] It should be noted that the description of the hardware structure of the electronic device 200 can also be referred to the structure schematic diagram shown in Figure 3A , which will not be described here in detail.
[0130] The following describes an NFC protocol stack provided in an embodiment of the present application.
[0131] Figure 3B An NFC protocol stack provided in an embodiment of the present application is shown.
[0132] As Figure 3B shown, the NFC protocol stack can include a physical layer, a radio frequency layer, an access layer, a transmission layer, and an application layer.
[0133] The physical layer can be used to implement the physical characteristics in NFC technology communication.
[0134] The radio frequency layer can be used to implement the radio frequency specifications in NFC technology communication, such as data rate, frequency of radio frequency signals, and the like.
[0135] The access layer can be used to implement the functions of polling and device discovery, service result notification, card conflict management, transmission protocol negotiation, timeout and retransmission mechanism, PICC / PCD mode switching, fusion card selection, and the like.
[0136] The transmission layer includes a high-speed data transmission protocol, through which the data transmission between the PCD and the PICC in the application layer can be implemented.
[0137] The application layer can be used to implement one or more NFC services and one or more service management policies. The one or more NFC services may include codeless payment, electronic tickets, access control, digital ID cards, all-scenario contactless payment, and short-range data transmission. The one or more service management policies may include any one or more of the following: file management, card long-term activation, security management, and service routing management. The processing logic of the NFC services can be executed by Applets. In one possible implementation, the processing logic of the service management policies can be executed by the NFC basic service module.
[0138] In some examples, electronic device 100 can store data from one or more NFC emulator cards using a file tree structure. The NFC emulator card data may include device characteristic information, keys, and permission information associated with the NFC emulator card. The file tree may include a master file (MF), dedicated files (DF), and elementary files (EF). The MF directory may contain one or more EFs and one or more DFs, and each DF directory may contain one or more EFs. One NFC emulator card corresponds to one DF, and different NFC emulator cards correspond to different DFs. Since one NFC emulator card can correspond to one or more card information entries, a DF can store one or more card information entries (EF) used to store card information, as well as authentication keys corresponding to one or more card information entries (EF). The authentication keys corresponding to different card information entries (EF) within the same DF may be the same or different.
[0139] The dedicated file can be used to store data from the NFC simulation card. This data may include one or more of the following: card information, authentication key, and migration / recovery key. The card information may include one or more of the following: access control information, key information, transaction account information, electronic ticket information, and validity period information. In this way, the electronic device 100 can store the PICC data in the corresponding storage area of the dedicated file, enabling the electronic device 100 to activate the corresponding NFC simulation card.
[0140] For example, such as Figure 3C As shown, the NFC-enabled analog cards activated on electronic device 100 can include access cards for community A, access cards for community B, Shenzhen Tong transportation cards, and home door lock key cards. The MF directory can store the following keys: key EF1, Applet identity public key EF, Applet identity private key EF, mapping table EF, DF1, DF2, DF3, and DF4. Among them:
[0141] 1. The key EF1 can include a master key and a maintenance key. The master key in the key EF1 can be used for encryption and decryption when data in the key EF1 is updated. The maintenance key in the key EF1 can be used for encryption and decryption when data in the Applet identity public key EF, the Applet identity private key EF and the mapping table EF is updated.
[0142] 2. The Applet identity private key EF can be used to store one or more Applet identity private keys.
[0143] 3. The Applet identity public key EF can be used to store one or more Applet identity public keys.
[0144] 4. The mapping table EF can be used to indicate the mapping relationship between the device feature information and the identity of the DF. The device feature information can be used to identify the NFC card reading device. After receiving the device feature information sent by the NFC card reading device, the electronic device 100 can determine the NFC emulation card corresponding to the NFC card reading device from one or more NFC emulation cards through the device feature information. For example, the device feature information 1 corresponds to the DF1, which can be used to store the data of the access control card of the A cell. The device feature information 2 corresponds to the DF2, which can be used to store the data of the access control card of the B cell. The device feature information 3 corresponds to the DF3, which can be used to store the data of the Shenzhen Tong traffic card. The device feature information 4 corresponds to the DF4, which can be used to store the data of the home door lock key card.
[0145] 5、DF1 stores a key EF11, device feature information EF12, a file permission list EF13, and X card information EFs. X is a positive integer. The key EF11 can include one or more of a master key, a maintenance key, X authentication keys, a migration recovery key, etc. The master key in the key EF11 can be used for encryption and decryption when data in the key EF11 is updated. The maintenance key in the key EF11 can be used for encryption and decryption when data in the device feature information EF12, the file permission list EF13, and the X card information EFs in the DF1 is updated. The X authentication keys in the DF1 correspond to the X card information EFs in the DF1, and one authentication key corresponds to one card information EF. Different card information EFs in the DF1 can correspond to the same or different authentication keys. For example, the DF1 can include a card information EF storing card information 1 and a card information EF storing card information 2. The card information 1 can be used to open the access control of one building in a cell A, and the card information 2 can be used to open the access control of two buildings in the cell A. The migration recovery key can be used for the electronic device 100 to migrate (or transfer) the NFC card corresponding to the DF1 to another electronic device with the same account number. The device feature information EF12 can be used to store the device feature information corresponding to the DF1. The file permission list EF13 can be used to indicate the read and write permissions of the X card information EFs in the DF1.
[0146] 6、DF2 stores a key EF21, device feature information EF22, a file permission list EF23, and Y card information EFs. Y is a positive integer. The key EF21 can include one or more of a master key, a maintenance key, Y authentication keys, a migration recovery key, etc. The master key in the key EF21 can be used for encryption and decryption when data in the key EF21 is updated. The maintenance key in the key EF21 can be used for encryption and decryption when data in the device feature information EF22, the file permission list EF23, and the Y card information EFs in the DF2 is updated. The Y authentication keys in the DF2 correspond to the Y card information EFs in the DF2, and one authentication key corresponds to one card information EF. Different card information EFs in the DF2 can correspond to the same or different authentication keys. For example, the DF2 can include a card information EF storing card information 3. The card information 3 can be used to open all access controls in a cell B. The migration recovery key can be used for the electronic device 100 to migrate (or transfer) the NFC card corresponding to the DF1 to another electronic device with the same account number. The device feature information EF22 can be used to store the device feature information corresponding to the DF2. The file permission list EF23 can be used to indicate the read and write permissions of the Y card information EFs in the DF2.
[0147] 7、DF3 stores a key EF31, device feature information EF32, a file permission list EF33 and L card information EFs. L is a positive integer. The key EF31 can include one or more of a master key, a maintenance key, L authentication keys, a migration recovery key, etc. The master key in the key EF31 can be used for encryption and decryption when data in the key EF31 is updated. The maintenance key in the key EF31 can be used for encryption and decryption when data in the device feature information EF32, the file permission list EF33 and the L card information EFs in the DF3 is updated. The L authentication keys in the DF3 correspond to the L card information EFs in the DF3, one authentication key corresponding to one card information EF, wherein the authentication keys corresponding to different card information EFs in the DF3 can be the same or different. For example, the DF3 can include a card information EF storing card information 4, wherein the card information 4 can be used for payment of public transportation in Shenzhen. The migration recovery key can be used for the electronic device 100 to migrate (or transfer) the NFC card corresponding to the DF1 to other electronic devices of the same account. The device feature information EF32 can be used to store device feature information corresponding to the DF3. The file permission list EF33 can be used to indicate read and write permissions of the L card information EFs in the DF3.
[0148] 8、DF4 stores a key EF41, device feature information EF42, a file permission list EF43 and M card information EFs. M is a positive integer. The key EF41 can include one or more of a master key, a maintenance key, M authentication keys, a migration recovery key, etc. The master key in the key EF41 can be used for encryption and decryption when data in the key EF41 is updated. The maintenance key in the key EF41 can be used for encryption and decryption when data in the device feature information EF42, the file permission list EF43 and the M card information EFs in the DF4 is updated. The M authentication keys in the DF4 correspond to the M card information EFs in the DF4, one authentication key corresponding to one card information EF, wherein the authentication keys corresponding to different card information EFs in the DF4 can be the same or different. For example, the DF4 can include a card information EF storing card information 5, wherein the card information 5 can be used to open the door lock of the home. The migration recovery key can be used for the electronic device 100 to migrate (or transfer) the NFC card corresponding to the DF1 to other electronic devices of the same account. The device feature information EF42 can be used to store device feature information corresponding to the DF4. The file permission list EF43 can be used to indicate read and write permissions of the M card information EFs in the DF4.
[0149] The above Figure 3C The examples shown above are merely used to explain the present application and should not be construed as limiting the present application.
[0150] In some examples, the service processing logic of the NFC analog card in the electronic device 100 is implemented by a small program (Applet). The Applet can be stored and run in a hardware device or a software module (e.g., the NFC module 102, the HCE application, the SIM card, the SE, etc.) corresponding to the NFC analog card. Since one or more NFC analog cards are opened on the electronic device 100, there can be one or more Applets on the electronic device 100. Among them, one NFC analog card corresponds to one Applet.
[0151] One Applet corresponds to one master file (MF), and different Applets correspond to different MFs. Therefore, after the first Applet is determined, the NFC module 102 can obtain the MF of the first Applet through the first Applet. If the MF of the first Applet includes one DF, the DF is the first DF corresponding to the first NFC analog card. If the MF of the first Applet includes multiple DFs, the MF of the first Applet can further include a first mapping table, wherein the first mapping table is used to indicate the mapping relationship between the device feature information and the identifier of the dedicated file (DF) in the MF of the first Applet. The first Applet can determine the first DF corresponding to the first NFC analog card according to the device feature information of the NFC card reading device 200 and the first mapping table.
[0152] Among them, the electronic device 100 can store the data of one or more NFC analog cards in the form of a file tree. The data of the NFC analog card can include device feature information, keys, permission information, and other data associated with the NFC analog card. Among them, the file tree can include a master file (MF), a dedicated file (DF), and an elementary file (EF). The directory of the MF can save one or more EFs and one or more DFs, and the directory of each DF can save one or more EFs. Among them, one NFC analog card corresponds to one DF, and different NFC analog cards correspond to different DFs. Since one NFC analog card can correspond to one or more card information, one DF can save one or more card information EFs (for example, one DF can save up to 8 card information EFs, and the data length of each card information EF can be 4 bytes) for storing card information and one or more authentication keys corresponding to the card information EFs. Among them, the authentication keys corresponding to different card information EFs in the same DF are the same or different.
[0153] For example, the NFC analog cards opened on the electronic device 100 can include a door access card of A community, a door access card of B community, a Shenzhen Tong traffic card and a home door lock key card. Among them, since all the door access cards can correspond to the same Applet, the card information of the door access card of A community and the card information of the door access card of B community can be placed in different DFs in MF1. The Shenzhen Tong traffic card corresponds to another Applet, and therefore the card information of the Shenzhen Tong traffic card can be placed in a DF of MF2, which includes the migration recovery key of the Shenzhen Tong traffic card. The home door lock key card corresponds to a separate Applet, and therefore the card information of the home door lock key card can be placed in a DF of MF3, which includes the migration recovery key of the home door lock key card.
[0154] As shown in the example of FIG. 1, the MF1 can include a key EF1, an Applet identity public key EF, an Applet identity private key EF, a mapping table EF, a DF1 and a DF2. Figure 3D
[0155] 1. The key EF1 can include a master key and a maintenance key. The master key in the key EF1 can be used for encryption and decryption when the data in the key EF1 is updated. The maintenance key in the key EF1 can be used for encryption and decryption when the data in the Applet identity public key EF, the Applet identity private key EF and the mapping table EF is updated.
[0156] 2. The Applet identity private key EF can be used to save the identity private key used by one or more Applets.
[0157] 3. The Applet identity public key EF can be used to save the identity public key used by one or more Applets.
[0158] 4. The mapping table EF can be used to save the first mapping table described above, which is used to indicate the mapping relationship between the device feature information and the identifier of the DF. For example, the device feature information 1 corresponds to the DF1, which can be used to save the data of the door access card of A community. The device feature information 2 corresponds to the DF2, which can be used to save the data of the door access card of B community.
[0159] 5、DF1 stores a key EF11, device feature information EF12, a file permission list EF13 and X card information EFs. X is a positive integer. The key EF11 can include a master key, a maintenance key, X authentication keys and a migration recovery key. The master key in the key EF11 can be used for encryption and decryption when data in the key EF11 is updated. The maintenance key in the key EF11 can be used for encryption and decryption when data in the device feature information EF12, the file permission list EF13 and the X card information EFs in the DF1 is updated. The X authentication keys in the DF1 correspond to the X card information EFs in the DF1, one authentication key corresponding to one card information EF, wherein the authentication keys corresponding to different card information EFs in the DF1 can be the same or different. For example, the DF1 can include a card information EF storing card information 1 and a card information EF storing card information 2, wherein the card information 1 can be used to open the access control of one building in the A community, and the card information 2 can be used to open the access control of two buildings in the A community. The migration recovery key can be used for the electronic device 100 to migrate (or transfer) the NFC card corresponding to the DF1 to other electronic devices with the same account. The device feature information EF12 can be used to store the device feature information corresponding to the DF1. The file permission list EF13 can be used to indicate the read and write permissions of the X card information EFs in the DF1.
[0160] 6、DF2 stores a key EF21, device feature information EF22, a file permission list EF23 and Y card information EFs. Y is a positive integer. The key EF21 can include a master key, a maintenance key, Y authentication keys and a migration recovery key. The master key in the key EF21 can be used for encryption and decryption when data in the key EF21 is updated. The maintenance key in the key EF21 can be used for encryption and decryption when data in the device feature information EF22, the file permission list EF23 and the Y card information EFs in the DF2 is updated. The Y authentication keys in the DF2 correspond to the Y card information EFs in the DF2, one authentication key corresponding to one card information EF, wherein the authentication keys corresponding to different card information EFs in the DF2 can be the same or different. For example, the DF2 can include a card information EF storing card information 3, wherein the card information 3 can be used to open all access controls in the B community. The migration recovery key can be used for the electronic device 100 to migrate (or transfer) the NFC card corresponding to the DF1 to other electronic devices with the same account. The device feature information EF22 can be used to store the device feature information corresponding to the DF2. The file permission list EF23 can be used to indicate the read and write permissions of the Y card information EFs in the DF2.
[0161] The above Figure 3D The examples shown in the above merely serve to explain the present application, and should not be construed as limiting the present application.
[0162] If the MF corresponding to the first Applet is MF1, the first Applet can obtain the first mapping list from the mapping list EF of MF1 shown in Table 1 after obtaining the device characteristic information of the NFC card reading device 200 from the NFC module 102 or the application. Then, the first Applet can determine the first DF corresponding to the first NFC analog card according to the device characteristic information of the NFC card reading device 200 and the first mapping list. Figure 3D
[0163] In a possible implementation, the electronic device 100 and the electronic device 200 log in the first account. The electronic device 100 opens the first NFC card. The electronic device 100 can send migration data of the first NFC card to the server 300, and the migration data of the first NFC card can include but is not limited to card information of the first NFC card. The electronic device 200 can display a first control, and the first control is used to trigger the electronic device 200 to migrate in the first NFC card. The electronic device 200 can obtain the migration data of the first NFC card from the server 300 after receiving the input of the first control by the user. The electronic device 200 can open the first NFC card based on the migration data of the first NFC card, and display a card icon of the first NFC card, which can indicate that the electronic device 200 opens the first NFC card. In this way, the electronic device 200 can obtain the NFC card opened on other electronic devices logging in the first account after logging in the first account, which facilitates the user to switch different electronic devices and also use the NFC card that has been opened.
[0164] In some examples, the electronic device 100 can send the migration data of the first NFC card to the server 300 in response to the input of the user migrating out the first NFC card after receiving the input. In this way, the electronic device 100 can receive the input of the user and upload the selected NFC card to the server 300, which facilitates the user to migrate in the required NFC card on other devices logging in the first account.
[0165] Next, a set of interface schematic diagrams provided by the embodiments of the present application is introduced.
[0166] For example, Figure 4A As shown, the electronic device 100 displays a desktop 401. The desktop 401 can include a plurality of application icons (e.g., a wallet application icon 402, etc.). The wallet application icon 402 can be used to trigger the electronic device to display an interface of a wallet application, which can be used to provide a user with a function of managing (e.g., adding, deleting, etc.) a simulated NFC card. Optionally, the desktop 401 can further display a status bar 403 above the desktop 401, which can include an NFC indicator 403A, an indicator of strength of a communication signal, a power value, a time, and the like. The NFC indicator 403A can be used to indicate that the electronic device 100 has enabled the NFC function. It should be noted that the wallet application is merely an example, and the electronic device 100 can also manage a simulated NFC card through other applications, such as an NFC application, a payment application, a simulated card management application, and the like, which are not limited in the embodiments of the present application.
[0167] Next, the electronic device 100 sharing a specified simulated card is described by taking the specified simulated card as an access control card as an example. If the electronic device 100 with the enabled NFC function is placed in a card swiping area of an access control device 600 by a user. Since the access control device 600 is a PCD, when the electronic device 100 has enabled the NFC function and is in a PICC mode, the electronic device 100 can simulate an access control card stored in the electronic device 100. It can be understood that the specified simulated card as an access control card is merely an example, and the specified simulated card should not be limited to the access control card.
[0168] After the electronic device 100 simulates the access control card and approaches the card swiping area of the access control device 600, the electronic device 100 can trigger the access control device 600 to switch from a closed state to an open state, so that the user holding the electronic device 100 can pass through the access control device 600. The electronic device 100 can further display an interface 405 as shown. Figure 4B As shown, the interface 405 includes a card icon 406, which can indicate that the electronic device 100 is simulating an access control card. Optionally, the interface 405 can further include a prompt information 407, which can be used to prompt the user that the access control device 600 has been successfully opened through the electronic device 100. Figure 4B The electronic device 100 can display an interface 410 as shown in response to receiving an input of the user to the wallet application icon 402.
[0169] Figure 4A The electronic device 100 can display an interface 410 as shown in response to receiving an input of the user to the wallet application icon 402. Figure 4C Figure 4C As shown, interface 410 includes a navigation bar 412 and a display area 411. The navigation bar 412 includes one or more icons, which can be used to trigger the electronic device 100 to display the content corresponding to that icon in the display area 411. For example, these icons may include, but are not limited to, a homepage icon 412A, a lifestyle icon, a bank card icon, and a "My" icon 412B, etc. Here, the homepage icon 412A is selected, and the display area 411 includes the display content corresponding to the homepage icon 412A.
[0170] Electronic device 100 can receive user input Figure 4C After inputting my icon 412B as shown, in response to that input, the following is displayed: Figure 4D The interface shown is 410. (As shown) Figure 4D As shown, my icon 412B is selected in interface 410, and the display area 411 includes the display content corresponding to my icon 412B. For example, display area 411 includes account option 421 and card wallet option 422. Account option 421 can be used to trigger electronic device 100 to display an interface for setting account information (e.g., account information, avatar, account nickname, password, mobile phone number, etc.). Account option 421 may include, but is not limited to, one or more of avatar thumbnail, account nickname, and account information. Here, account option 421 may represent an account logged in by electronic device 100 with the nickname "Alice" and account information "123******89". Card wallet option 422 can be used to trigger electronic device 100 to display an interface for managing NFC emulator cards. Optionally, card wallet option 422 may also include information indicating the number of NFC emulator cards activated by electronic device 100; here, the number of NFC emulator cards activated by electronic device 100 is 2.
[0171] Electronic device 100 can receive user input Figure 4D After inputting option 422 of the card pack shown, in response to that input, the following is displayed: Figure 4E The interface shown is 430. (As shown) Figure 4E As shown, interface 430 includes one or more card options. These card options can be used to represent NFC analog cards that have been added or are to be added to the electronic device 100. For example, these card options may include, but are not limited to, card option 431 and card option 432. Card option 431 can represent a transportation card already added to the electronic device 100, and card option 432 can represent an access control card already added to the electronic device 100.
[0172] Electronic device 100 can receive user input Figure 4E After inputting the card option 432 shown, in response to that input, the following is displayed: Figure 4FThe interface shown is 440. (As shown) Figure 4F As shown, interface 440 includes a card icon 441, which indicates that electronic device 100 has activated an access control card. Interface 440 also includes one or more functional controls that can be used to manage access control cards. For example, these functional controls may include, but are not limited to, a card swipe control, a migration control 442, a set-default-card control, and a delete control. The card swipe control can be used to trigger electronic device 100 to simulate an access control card, allowing users to use electronic device 100 to access access control device 600. The edit control can be used to trigger electronic device 100 to display an interface for editing access control cards; for example, this interface can provide functions such as modifying the name of the access control card and the color of the card icon 441. The set-default-card control can be used to set the access control card as the default card. After setting the access control card as the default card, when electronic device 100 with NFC enabled comes into contact with an NFC card reader (e.g., access control device 600), it can first simulate the access control card. The delete control can be used to delete an access control card.
[0173] Electronic device 100 can receive user input Figure 4F Upon input to the migration control 442 shown, in response to that input, the following is displayed: Figure 4G The interface shown is 450. (As shown) Figure 4G As shown, interface 450 can be used to prompt the user's electronic device 100 to transfer the NFC card. For example, interface 450 may include a prompt message 451 and a confirmation control 452. Prompt message 451 can be used to prompt the user's electronic device 100 to transfer the NFC card. Prompt message 451 may include, but is not limited to, one or more of text-based prompts, animated prompts, image-based prompts, and voice prompts. For example, prompt message 451 may include the text-based prompt "Card Transfer" and the text-based prompts "1. The card is transferred out of the current device for transfer to other devices or back to this device. 2. You can log in using the same account on devices that support NFC functionality, and you can continue to use the card after it is transferred in," etc. Confirmation control 452 can be used to trigger electronic device 100 to send the access card data to server 300; details can be found in the following description.
[0174] Electronic device 100 can receive user input Figure 4G Upon input to the confirmation control 452 shown, in response to that input, the following is displayed: Figure 4H The interface 460 shown can be used to notify the user that the electronic device has successfully transferred the access card. Figure 4HAs shown, interface 460 may include, but is not limited to, a prompt message 461. For example, prompt message 461 may be a text-based prompt message: "Move-out successful". Optionally, interface 460 may also include a completion control 462, which can be used to trigger electronic device 100 to display, for example... Figure 4E The interface shown is 430.
[0175] Optionally, the electronic device 100 can receive user input... Figure 4F Upon input to the migration control 442 shown, in response to that input, the following is displayed: Figure 4H The interface shown is 460. Optionally, the electronic device 100 displays as shown... Figure 4H When the interface 460 is shown, after receiving input from the user to return to the previous page (e.g., input sliding inward from the edge of the interface 460), the interface can respond to the input by displaying, as shown in the image. Figure 4E The interface shown is 430. Alternatively, the electronic device 100 can display, as shown in the image... Figure 4H When the duration of the interface shown in Figure 460 reaches the preset display duration, the following will be displayed: Figure 4E The interface shown is 430.
[0176] In some examples, the wallet application of electronic device 100 can provide migration controls. These controls can be used to trigger electronic device 100 to display an interface for sending migration data of the NFC cards already activated on electronic device 100 to server 300. This allows electronic device 100 to help users quickly select multiple NFC cards to be migrated, making the operation more convenient.
[0177] For example, electronic device 100 displays as follows Figure 4E The interface 430 shown also includes a migration control 433. The electronic device 100 can receive user input... Figure 4E Upon input to the migration control 433 shown, in response to that input, the following is displayed: Figure 4I The interface shown is 470. (As shown) Figure 4IAs shown, the interface 470 can include, but is not limited to, a card list 471 and a confirmation control 473. The card list 471 can include one or more card options corresponding to the NFC cards that have been opened by the electronic device 100. The one or more card options include a card option 471A and a card option 471B. Here, the card option 471A can be used to indicate an access card, and the card option 471B can be used to indicate a transportation card. The card option 471A and the card option 471B are in a selected state. The confirmation control 473 can be used to send the data of the NFC card corresponding to the selected card option to the server 300. Alternatively, the interface 470 can further include a select all control 472, which can be used to trigger the electronic device 100 to select all the card options or deselect all the card options. In this way, the user can quickly select the card options of multiple NFC cards and quickly determine the NFC cards to be migrated.
[0178] In some other examples, the electronic device 100 can receive an input of the user to migrate all the NFC cards on the electronic device 100. For example, the electronic device 100 can provide a function for triggering the electronic device 100 to migrate all the NFC cards on the electronic device 100. In this way, when the user replaces the electronic device, all the NFC cards can be migrated through the function.
[0179] After receiving the input of the user on the card option 471B, the electronic device 100 can deselect the card option 471B. Then, after receiving the input of the user on the confirmation control 473, the electronic device 100 can send the data of the access card corresponding to the card option 471A to the server 300 in response to the input, and display the interface 460 as shown after sending the data to the server 300. Figure 4H
[0180] In some other examples, the wallet application of the electronic device 100 provides a migration-in control and a migration-out control. The migration-in control can be used to trigger the electronic device 100 to display a migration-in interface, which can be used to download, from the server 300, the NFC cards opened by other electronic devices that log in to the first account, or the migration-in interface can be used to download, from the server 300, the NFC cards that have been migrated out by the electronic device that logs in to the first account. The migration-out control can be used to trigger the electronic device 100 to display a migration-out interface, which can be used to send the data of the NFC cards opened by the electronic device 100 to the server 300. Alternatively, the migration control provided by the wallet application of the electronic device 100 can be used to trigger the electronic device 100 to display the migration-in control and the migration-out control. In this way, the electronic device 100 can help the user to migrate in / migrate out one or more NFC cards through the interface, and the operation is more convenient.
[0181] In some examples, the electronic device 100 can send the migration data of the first NFC card to the server 300 in response to the input of the user migrating out the first NFC card, and delete the first NFC card in the electronic device 100. In this way, the security of the NFC card can be guaranteed, and one NFC card can be used on only one device.
[0182] In a possible implementation, the server 300 can notify the electronic device 100 to delete the first NFC card when sending the migration data of the first NFC card to the electronic device 200. Alternatively, the electronic device 200 can notify the electronic device 100 to delete the first NFC card after successfully migrating in the first NFC card. The electronic device 100 can delete the first NFC card after receiving the notification of deleting the first NFC card.
[0183] In some examples, the electronic device 100 can delete the first NFC card after receiving the notification of deleting the first NFC card and determining that the card type of the first NFC card is the first type. The electronic device 100 can retain the first NFC card after receiving the notification of deleting the first NFC card and determining that the card type of the first NFC card is the second type. The description of the card type of the first NFC card can be referred to the subsequent embodiments. It can be understood that the electronic device 100 can delete the first NFC card after receiving the input of the user deleting the first NFC card after retaining the first NFC card of the second type. In this way, the electronic device 100 deletes only the NFC card of the first type for the convenience of using the NFC card of the second type. The user tends to open the first NFC card on multiple electronic devices, and thus the electronic device 100 retains the first NFC card after migrating out the first NFC card, so that the user does not need to perform the operation of migrating in the first NFC card on the electronic device 100.
[0184] In some examples, the electronic device 100 moves into the radio frequency field of the corresponding NFC card reading device before migrating out the first NFC card, and successfully swipes the card on the NFC card reading device. The electronic device 100 moves into the radio frequency field of the corresponding NFC card reading device after migrating out the first NFC card, and successfully swipes the card on the NFC card reading device before deleting the first NFC card. In this way, the user can still use the first NFC card through the electronic device 100 after the electronic device 100 migrates out the first NFC card. Optionally, the electronic device 100 can display the migration control of the first NFC card after deleting the first NFC card.
[0185] In some examples, the electronic device 100 migrates out of the first NFC card after the first NFC card is deleted. In this way, the electronic device 100 can delete the first NFC card and the first NFC card can no longer be used by the electronic device 100.
[0186] In some examples, the electronic device 100 migrates out of the first NFC card of the second type after the first NFC card is deleted. In this way, the electronic device 100 can delete the first NFC card of the second type and the first NFC card of the second type can no longer be used by the electronic device 100.
[0187] In some examples, the electronic device 100 migrates out of the first NFC card of the second type after the first NFC card is deleted. In this way, the electronic device 100 can delete the first NFC card of the second type and the first NFC card of the second type can no longer be used by the electronic device 100.
[0188] In another possible implementation, the electronic device 100 can delete the first NFC card after the first NFC card is migrated out.
[0189] In some examples, the electronic device logged in the first account can display the migration control of the first NFC card when the first NFC card is not migrated in. In this way, all electronic devices logged in the first account can migrate in the first NFC card.
[0190] In some examples, after the electronic device 100 migrates out of the first NFC card of the first type, the first NFC card can be deleted. When the electronic device 100 migrates out of the first NFC card of the first type and other electronic devices that log in the first account do not migrate into the first NFC card, the electronic device 100 can display a migration control of the first NFC card, which can be used to trigger the electronic device 100 to migrate into the first NFC card. When the electronic device 200 successfully migrates into the first NFC card of the first type, the electronic device 200 can notify the electronic device 100 to cancel the display of the migration control of the first NFC card. In this way, only one of the electronic devices that log in the first account and the server 300 can store the data of the first NFC card of the first type. Since the first NFC card is related to the assets of the user, the security of the first NFC card can be ensured. It can be understood that when the electronic device 200 migrates out of the first NFC card and other electronic devices do not migrate into the first NFC card, the electronic device 100 and the electronic device 200 can both display the migration control of the first NFC card.
[0191] In some examples, after the electronic device 100 migrates out of the first NFC card of the first type, the first NFC card can be deleted. When the electronic device 100 migrates out of the first NFC card of the first type and other electronic devices that log in the first account do not migrate into the first NFC card, the electronic device 100 can display a migration control of the first NFC card, which can be used to trigger the electronic device 100 to migrate into the first NFC card. When the electronic device 200 successfully migrates into the first NFC card of the first type, the electronic device 200 can notify the electronic device 100 to cancel the display of the migration control of the first NFC card. In this way, only one of the electronic devices that log in the first account and the server 300 can store the data of the first NFC card of the first type. Since the first NFC card is related to the assets of the user, the security of the first NFC card can be ensured. It can be understood that when the electronic device 200 migrates out of the first NFC card and other electronic devices do not migrate into the first NFC card, the electronic device 100 and the electronic device 200 can both display the migration control of the first NFC card.
[0192] In some examples, after the electronic device 100 migrates out of the first NFC card of the first type, the first NFC card can be deleted. When the electronic device 100 migrates out of the first NFC card of the first type and other electronic devices that log in the first account do not migrate into the first NFC card, the electronic device 100 can display a migration control of the first NFC card, which can be used to trigger the electronic device 100 to migrate into the first NFC card. When the electronic device 200 successfully migrates into the first NFC card of the first type, the electronic device 200 can notify the electronic device 100 to cancel the display of the migration control of the first NFC card. In this way, only one of the electronic devices that log in the first account and the server 300 can store the data of the first NFC card of the first type. Since the first NFC card is related to the assets of the user, the security of the first NFC card can be ensured. It can be understood that when the electronic device 200 migrates out of the first NFC card and other electronic devices do not migrate into the first NFC card, the electronic device 100 and the electronic device 200 can both display the migration control of the first NFC card.
[0193] Next, the interface schematic diagram of the electronic device 200 provided by the embodiments of the present application is introduced.
[0194] For example, Figure 5AAs shown, the electronic device 200 displays a desktop 501. The desktop 501 may include multiple application icons (e.g., a wallet application icon 502, etc.). Optionally, a status bar 503 is also displayed above the desktop 501. This status bar 503 may include information such as an NFC indicator 503A, a communication signal strength indicator, battery level, and time. The NFC indicator 503A can be used to indicate that the electronic device 100 has its NFC function enabled. For details, please refer to... Figure 4A The embodiments shown are not described in detail here.
[0195] When the electronic device 200 is brought close to the card-swiping area of the access control device 600, it can perform a card-swiping process based on an activated NFC emulated card. However, in this case, since the electronic device 200 has not activated an access card for access control device 600, the card swipe fails, and access control device 600 remains closed. Since the electronic device 200 has not activated any NFC emulated cards, it can display the following: Figure 5B The interface shown is 510. (As shown) Figure 5B As shown, interface 510 includes icon 511, which can be used to prompt the user to add an access card. Optionally, icon 511 may also include an add control, which can be used to trigger electronic device 200 to display an interface for adding an access card.
[0196] Electronic device 200 can receive user input Figure 5A After inputting the wallet application icon 502 as shown, in response to that input, the following will be displayed: Figure 5C The interface shown is 520. (As shown) Figure 5C As shown, interface 520 can be used to display the registration / login methods supported by the wallet application. Interface 520 may include an input field 521, controls 522 and 523. Input field 521 can be used to input the mobile phone number of the account used to log in to the wallet application. Here, input field 521 includes the account name of the first account: "123******89". Control 522 can be used to trigger electronic device 200 to log in to the wallet application using the mobile phone number in input field 521. Control 523 can be used to trigger electronic device 200 to display an interface for logging into the wallet application using an account password. Optionally, interface 520 may also include controls for triggering electronic device 200 to log in to the wallet application using its own phone number; for example, the control may include the text message "One-click login with my phone number".
[0197] Electronic device 200 can receive user input Figure 5C After input is received into control 522, the following display is shown in response to the input: Figure 5D The interface shown is 530. (As shown) Figure 5DAs shown, interface 530 can be used to log in to the wallet application via a verification code sent to the mobile phone number of the first account. Interface 530 may include, but is not limited to, an input field 531 and a login control 532. The input field 531 can be used to enter the verification code received via the mobile phone number of the first account. The login control 532 can be used to trigger electronic device 200 to register / login to the wallet application based on the mobile phone number entered in input field 521.
[0198] After receiving the entered verification code, the input field 531 of the electronic device 200 receives the user's... Figure 5D The electronic device 200 can respond to the input of the login control 532 shown, and display the following: Figure 5E The interface shown is 540. (As shown) Figure 5E As shown, interface 540 includes a navigation bar 542 and a display area 541. The navigation bar 542 includes a homepage icon 542A and a "My" icon 542B, etc. Here, the homepage icon 542A is selected, and the display area 541 includes the content corresponding to the homepage icon 542A. For details, please refer to... Figure 4C The embodiments shown are not described in detail here.
[0199] It should be noted that if electronic device 200 displays something like... Figure 5A Before the desktop 501 shown, the wallet application has been logged in. Upon receiving input from the user regarding the wallet application icon 502, the electronic device 200 can respond to that input by displaying... Figure 5E The interface shown is 540.
[0200] Electronic device 100 can receive user input Figure 5E After inputting my icon 542B as shown, in response to that input, the following is displayed: Figure 5F The interface shown is 540. (As shown) Figure 5F As shown, my icon 542B is selected in interface 540, and the display area 541 includes the display content corresponding to my icon 542B. For example, display area 541 includes account option 545 and card wallet option 546. Account option 545 can be used to trigger electronic device 100 to display an interface for setting account information. Account option 545 may include, but is not limited to, one or more of the following: avatar thumbnail, account nickname, and account information. Here, account option 545 may represent an account logged in by electronic device 100 with the nickname "Alice" and account information "123******89". Card wallet option 546 can be used to trigger electronic device 100 to display an interface for managing NFC emulator cards. Optionally, card wallet option 546 may also include information indicating the number of NFC emulator cards activated by electronic device 100; here, the number of NFC emulator cards activated by electronic device 100 is 0.
[0201] The electronic device 200 can display the interface 550 as shown in FIG. 6B in response to receiving the input of the card package option 546. Figure 5F The electronic device 200 can display the interface 550 as shown in FIG. 6B in response to receiving the input of the card package option 546. Figure 5G The electronic device 200 can display the interface 550 as shown in FIG. 6B in response to receiving the input of the card package option 546. Figure 5G The electronic device 200 can display the interface 550 as shown in FIG. 6B in response to receiving the input of the card package option 546. The one or more card options can be used to represent the NFC analog cards that the electronic device 200 has added or is to be added. For example, the one or more card options can include, but are not limited to, a card option 551 and a card option 552. The card option 551 can represent a transportation card that the electronic device 200 is to be migrated into, and the card option 552 can represent an access control card that the electronic device 200 is to be migrated into. The card option 551 can include a control 553, which can be used to trigger the electronic device 200 to migrate into the transportation card indicated by the card option 551. The card option 552 can include a control 554, which can be used to trigger the electronic device 200 to migrate into the access control card indicated by the card option 552.
[0202] It should be noted that the electronic device logged in the first account can send the device feature information of the NFC card that has been opened to the server 300. The server 300 can synchronize the device feature information of the NFC card to all electronic devices logged in the first account. The electronic device logged in the first account can display a card option of the NFC card (e.g., the first NFC card) that has not been migrated based on the device feature information of the NFC card synchronized by the server 300. The card option can be used for the electronic device logged in the first account and the NFC card that has not been migrated to migrate the NFC card. In this way, the electronic device logged in the first account and the server can indicate the NFC card that has been opened through the device feature information, so as to facilitate the electronic devices to determine the card option displayed.
[0203] In some examples, the electronic device logged in the first account can send the identifier (e.g., the name of the NFC card, the number set by the electronic device 100 or the server 300 for the NFC card, etc.) of the NFC card that has been opened to the server 300. The server 300 can synchronize the identifier of the NFC card to all electronic devices logged in the first account. The electronic device logged in the first account can display a card option of the NFC card (e.g., the first NFC card) that has not been migrated based on the identifier of the NFC card synchronized by the server 300. The card option can be used for the electronic device logged in the first account and the NFC card that has not been migrated to migrate the NFC card. In this way, the electronic devices logged in the first account can display the card option of the NFC card that has not been migrated under the first account, so as to facilitate the user to migrate the NFC card on different devices.
[0204] For example, electronic device 200 can display card options for the first NFC card. After receiving input to transfer the first NFC card, electronic device 200 sends a request message to electronic device 100 via server 300 to obtain transfer data for the first NFC card. Upon receiving this request message, electronic device 100 can send the transfer data of the first NFC card to electronic device 200 via server 300. After receiving the transfer data, electronic device 200 can activate the first NFC card based on the transfer data. Optionally, after sending the transfer data to server 300, electronic device 100 can delete the DF (Defective Function) of the first NFC card; or, electronic device 100 can delete the DF of the first NFC card when it is determined that the first NFC card is a first type of NFC card.
[0205] In other examples, an electronic device logged into the first account can send the data and identifier of the transferred-out NFC card to server 300. Upon receiving the NFC card data and identifier, server 300 can synchronize the received NFC card identifier to all electronic devices logged into the first account. Based on the device characteristic information of the NFC cards synchronized by server 300, the electronic devices logged into the first account can display card options for NFC cards that have not been transferred in (e.g., the first NFC card). These card options can be used by electronic devices logged into the first account that have not transferred in the NFC card to transfer in the NFC card. Thus, electronic devices logged into the first account can transfer in the NFC card that they have transferred out through the card options.
[0206] Optionally, interface 550 may also include a migration control. The migration control can be used to trigger electronic device 200 to display a migration interface, which can be used to download NFC cards activated by other electronic devices logged into the first account from server 300. In this way, electronic device 200 can obtain data from multiple NFC cards through the migration interface, making operation more convenient.
[0207] Electronic device 200 can receive user input Figure 5G After input is received into control 554, the system responds to that input by displaying the following: Figure 5H The interface shown is 560. (As shown) Figure 5H As shown, interface 560 includes a prompt message 561, which can be used to inform the user that electronic device 200 is transferring an access control card. For example, prompt message 561 may include a text message such as: "Transferring access control card, please wait...". Optionally, interface 560 may also include a progress bar, which can be used to indicate the progress of transferring the access control card to the user's electronic device 200.
[0208] Understandably, electronic device 200 can receive user input...Figure 5G After the input of the control 554 shown in FIG. 6M, in response to the input, the interface 560 shown in FIG. 6N is displayed, and the migration data of the access card is obtained from the server 300, the access card is opened in the electronic device 200 based on the obtained migration data of the access card, and the migration of the access card is implemented. Figure 5H
[0209] The electronic device 200 displays the interface 560 shown in FIG. 6M, and after the electronic device 200 successfully migrates the access card, the interface 570 shown in FIG. 6O can be displayed. As shown in FIG. 6O, the interface 570 can be used to prompt the user that the electronic device 200 successfully migrates the access card. Figure 5H Figure 5I The interface 570 can include prompt information 571. For example, the prompt information 571 can include text prompt information: “Migration success”. Figure 5I Figure 5I Optionally, the interface 570 can also include a completion control 572, which can be used to trigger the electronic device 200 to cancel the display of the interface 570. For example, the completion control 572 can be used to trigger the electronic device 200 to display the interface 580 shown in FIG. 6P, or display the interface 550 shown in FIG. 6M.
[0210] The electronic device 200 displays the interface 560 shown in FIG. 6M, and after the electronic device 200 successfully migrates the access card, the interface 570 shown in FIG. 6O can be displayed. As shown in FIG. 6O, the interface 570 can be used to prompt the user that the electronic device 200 successfully migrates the access card. Figure 5J Figure 5K The interface 570 can include prompt information 571. For example, the prompt information 571 can include text prompt information: “Migration success”.
[0211] The electronic device 200 displays the interface 560 shown in FIG. 6M, and after the electronic device 200 successfully migrates the access card, the interface 570 shown in FIG. 6O can be displayed. As shown in FIG. 6O, the interface 570 can be used to prompt the user that the electronic device 200 successfully migrates the access card. Figure 5H Figure 5H The electronic device 200 displays the interface 560 shown in FIG. 6M, and after the electronic device 200 successfully migrates the access card, the interface 570 shown in FIG. 6O can be displayed. As shown in FIG. 6O, the interface 570 can be used to prompt the user that the electronic device 200 successfully migrates the access card. Figure 5J Figure 5J Optionally, the interface 570 can also include a completion control 572, which can be used to trigger the electronic device 200 to cancel the display of the interface 570. For example, the completion control 572 can be used to trigger the electronic device 200 to display the interface 580 shown in FIG. 6P, or display the interface 550 shown in FIG. 6M. Figure 4F The electronic device 200 displays the interface 560 shown in FIG. 6M, and after the electronic device 200 successfully migrates the access card, the interface 570 shown in FIG. 6O can be displayed. As shown in FIG. 6O, the interface 570 can be used to prompt the user that the electronic device 200 successfully migrates the access card.
[0212] Figure 5J The electronic device 200 displays the interface 580 shown in FIG. 6P, and after the electronic device 200 successfully migrates the access card, the interface 550 shown in FIG. 6M can be displayed. As shown in FIG. 6M, the card option 552 can represent an access card that the electronic device 200 has migrated, and the card option 552 can include a control 555, which can be used to trigger the electronic device 200 to simulate the access card indicated by the card option 552. Figure 5J Figure 5K The electronic device 200 displays the interface 580 shown in FIG. 6P, and after the electronic device 200 successfully migrates the access card, the interface 550 shown in FIG. 6M can be displayed. As shown in FIG. 6M, the card option 552 can represent an access card that the electronic device 200 has migrated, and the card option 552 can include a control 555, which can be used to trigger the electronic device 200 to simulate the access card indicated by the card option 552. Figure 5K The electronic device 200 displays the interface 580 shown in FIG. 6P, and after the electronic device 200 successfully migrates the access card, the interface 550 shown in FIG. 6M can be displayed. As shown in FIG. 6M, the card option 552 can represent an access card that the electronic device 200 has migrated, and the card option 552 can include a control 555, which can be used to trigger the electronic device 200 to simulate the access card indicated by the card option 552.
[0213] Optionally, when the electronic device 200 displays the interface 570 as shown in Figure 5I Optionally, when the electronic device 200 displays the interface 570 as shown in Figure 5I Optionally, when the electronic device 200 displays the interface 570 as shown in Figure 5J Optionally, when the electronic device 200 displays the interface 570 as shown in Figure 5K Optionally, when the electronic device 200 displays the interface 570 as shown in Figure 5I Optionally, when the electronic device 200 displays the interface 570 as shown in Figure 5J Optionally, when the electronic device 200 displays the interface 570 as shown in Figure 5K Optionally, when the electronic device 200 displays the interface 570 as shown in
[0214] Optionally, when the electronic device 200 displays the interface 570 as shown in Figure 5H Optionally, when the electronic device 200 displays the interface 570 as shown in Figure 5J Optionally, when the electronic device 200 displays the interface 570 as shown in Figure 5K Optionally, when the electronic device 200 displays the interface 570 as shown in
[0215] Optionally, when the electronic device 200 displays the interface 570 as shown in Figure 5L Optionally, when the electronic device 200 displays the interface 570 as shown in Figure 5L Optionally, when the electronic device 200 displays the interface 570 as shown in
[0216] Thus, the electronic device 200 logged in the first account can migrate the NFC card of the other electronic device logged in the first account through the server 300, and the electronic device 200 can open the NFC card without the server 400 / PICC 500.
[0217] In some examples, the electronic device 100 can notify the server 300 of the card type of the first NFC card when sending the migration data of the first NFC card to the server 300. Wherein, the NFC card can be divided into a first type of NFC card (e.g., a bank card, a transportation card, etc.) and a second type of NFC card (e.g., an access control card, a car key, a door key, etc.). When the first NFC card is a first type of NFC card, the server 300 can notify the electronic device 100 to delete the first NFC card when sending the data of the first NFC card to the electronic device 200. The electronic device 100 can display a second control after deleting the first NFC card, and the second control can be used to trigger the electronic device 100 to open the first NFC card. In this way, since the first type of NFC card is related to the assets of the user, the above steps make the user only use the first type of NFC card on one device, which can better protect the security of the first type of NFC card.
[0218] For example, the electronic device 100 can send the migration data of the transportation card to the server 300 after receiving the input of the transportation card corresponding to the card option 431, and the description of the electronic device 100 migrating out the transportation card can refer to the description of the electronic device 100 migrating out the access control card (e.g., the embodiment shown in FIG. 4B), which will not be repeated here. Figure 4E Figures 4F-4I For example, the electronic device 100 can send the migration data of the transportation card to the server 300 after receiving the input of the transportation card corresponding to the card option 431, and the description of the electronic device 100 migrating out the transportation card can refer to the description of the electronic device 100 migrating out the access control card (e.g., the embodiment shown in FIG. 4B), which will not be repeated here. Figure 6A Figure 6A As shown in FIG. 4E, the interface 430 includes a control 611, and the control 611 can be used by the electronic device 100 to migrate in the transportation card indicated by the card option 431.
[0219] The electronic device 200 displays the interface 550 as shown in FIG. 5B. The electronic device 200 can obtain the migration data of the transportation card indicated by the card option 551 from the server 300 after receiving the input of the user on the control 553, and migrate in the transportation card based on the obtained migration data. Specifically, the description of the electronic device 200 migrating in the transportation card can refer to the description of the electronic device 200 migrating in the access control card (e.g., the embodiment shown in FIG. 4E), which will not be repeated here. Figure 5K Figures 5G-5K As shown in FIG. 5B, the interface 550 includes a card option 551 indicating that the electronic device 200 has migrated in the transportation card. Optionally, the card option 551 can also include a control 612, and the control 612 can be used by the electronic device 200 to display an interface for the transportation card to charge. Figure 6B Figure 6B As shown in FIG. 5B, the interface 550 includes a card option 551 indicating that the electronic device 200 has migrated in the transportation card. Optionally, the card option 551 can also include a control 612, and the control 612 can be used by the electronic device 200 to display an interface for the transportation card to charge.
[0220] In a possible implementation, the electronic device 200 logs in the first account. Before the electronic device 200 migrates the first NFC card of the electronic device 100, the electronic device 200 can obtain, from the server 300, a specified identifier, the specified identifier including an identifier of an NFC card that is not migrated on the electronic device logging in the first account and an identifier of an NFC card that is migrated on the electronic device logging in the first account, the electronic device logging in the first account including the electronic device 100 and the electronic device 200. The electronic device 200 can display, based on the specified identifier, prompt information for prompting the user that the electronic device 200 supports migration of the NFC card indicated by the specified identifier. In this way, the specified identifier is used to indicate one or more NFC cards of the electronic device logging in the first account, and the electronic device 200 logging in the first account can determine, through the specified identifier, the NFC card on the other electronic device logging in the first account, and the electronic device 200 can migrate the NFC card on the electronic device logging in the first account accordingly.
[0221] Here, the specified identifier includes the identifier of the first NFC card, and the electronic device 200 can display, based on the identifier of the first NFC card, prompt information for prompting the user that the electronic device 200 supports migration of the first NFC card. In this way, the electronic device 200 can prompt the user that the electronic device 200 supports migration of the first NFC card.
[0222] It can be understood that the electronic device 200 can display, based on the specified identifier, prompt information for prompting the user that the electronic device 200 supports migration of the NFC card other than the NFC card of the electronic device 200 in the one or more NFC cards indicated by the specified identifier. In this way, the electronic device 200 can obtain the identifier of the NFC card of all the electronic devices logging in the first account, and prompt the user that the NFC card can be migrated on the electronic device 200.
[0223] In some other examples, the specified identifier includes the identifier of one or more NFC cards that are migrated on the electronic device logging in the first account. In this way, the electronic device 200 can prompt the user that the NFC card that is migrated on the other electronic device logging in the first account can be migrated on the electronic device 200.
[0224] In some other examples, the specified identifier includes the NFC card that is migrated on the electronic device logging in the first account and the NFC card of the second type that is not migrated on the electronic device logging in the first account. In this way, since the NFC card of the first type includes balance information, the electronic device logging in the first account can only prompt the user to migrate the NFC card of the first type that is migrated on the other electronic device. The NFC card of the second type does not include balance information and has a wide range of application scenarios, and the electronic device logging in the first account can prompt the user to migrate the NFC card of the second type on the other electronic device regardless of whether the NFC card of the second type is migrated on the other electronic device.
[0225] In some examples, the wallet application of the electronic device 100 can send the migration data of the NFC card opened by the electronic device 100 to the server 300 in response to the input of the login of the first account. In this way, the electronic device 100 can send the migration data of the NFC card to the server 300 without displaying the migration control or the migration control.
[0226] In some examples, the electronic device (e.g., the electronic device 100) logged in the first account can send the migration data of the NFC card to the server 300 when the card information of the NFC card changes (e.g., the balance of the transportation card changes, a new NFC card is opened, etc.). It can be understood that when the electronic device 100 deletes the NFC card, the electronic device 100 can notify the server 300 to delete the migration data of the NFC card. In this way, the electronic device can update the migration data of the NFC card stored in the server 300, so that the migration data stored in the server 300 is the latest migration data, facilitating the migration of the NFC card by other electronic devices. Optionally, the electronic device logged in the first account can also send the migration data of the NFC card opened by the electronic device to the server 300 every preset upload time length.
[0227] In some examples, the electronic device (e.g., the electronic device 100) logged in the first account can send the device feature information of the NFC card opened by the electronic device to the server 300 after opening the NFC card. The server 300 can store the correspondence between the identifier of the electronic device logged in the first account and the device feature information of the NFC card opened by the electronic device. After the electronic device 200 logs in the first account, the server 300 can send the device feature information of the NFC card opened by the electronic device logged in the first account to the electronic device 200. The electronic device 200 can display the card options corresponding to the device feature information of the NFC card. After the electronic device 200 receives the input of the user migrating the NFC card corresponding to one or more card options, the electronic device 200 can obtain the migration data of the NFC card in the corresponding electronic device indicated by the device feature information of the NFC card through the server 300. The electronic device 200 can migrate the NFC card based on the obtained migration data. It can be understood that the electronic device logged in the first account can notify the server 300 to delete the device feature information of the NFC card after deleting the NFC card. In this way, the electronic device 200 can obtain the latest migration data of the NFC card from the corresponding electronic device after receiving the input of the user migrating the NFC card.
[0228] In some examples, after the electronic device 200 obtains the migration data of the NFC card from the electronic device logged in the first account through the server 300, the electronic device 200 can notify the electronic device to delete the NFC card. Alternatively, after the electronic device 200 obtains the migration data of the first type of NFC card from the electronic device logged in the first account through the server 300, the electronic device 200 can notify the electronic device to delete the first type of NFC card. In this way, only one of the electronic devices logged in the first account can use the NFC card, and the number of electronic devices with the NFC card can be limited to protect the security of the NFC card.
[0229] In a possible implementation, the electronic device 100 and the electronic device 200 are logged in the first account. The electronic device 100 stores data of the first NFC card, which includes but is not limited to card information of the first NFC card. The electronic device 100 can encrypt the card information of the first NFC card using the migration recovery key to obtain ciphertext 1. The electronic device 100 can generate a migration session key based on information of the first account. The electronic device 100 can encrypt the migration recovery key using the migration session key to obtain ciphertext 2. The electronic device 100 can send migration data to the server 300, and the migration data includes the ciphertext 1 and the ciphertext 2. The server 300 can save the correspondence between the first account and the migration data.
[0230] After the electronic device 200 receives an input of downloading (migrating in) the first NFC card, the electronic device 200 obtains the migration data corresponding to the first account from the server 300. After the electronic device 200 generates the migration session key based on the information of the first account, the electronic device 200 can decrypt the ciphertext 2 using the migration session key to obtain the migration recovery key. The electronic device 200 can decrypt the ciphertext 1 using the migration recovery key to obtain the card information of the first NFC card. The electronic device 200 can activate the first NFC card based on the data of the first NFC card. In this way, the electronic device 100 that activates the first NFC card can receive an input of the user and share the data of the first NFC card to other electronic devices. The electronic device 200 can activate the first NFC card based on the data shared by the electronic device 100, which is more convenient. After the electronic device 200 that activates the first NFC card starts the NFC function, the electronic device 200 can complete the NFC service corresponding to the first NFC card when approaching the card swiping area of the corresponding PCD.
[0231] The information of the first account can include, but is not limited to, one or more of an account of the first account, a mobile phone number of the first account, an email address of the first account, a nickname of the first account, and a password of the first account, and the like. The electronic device 100 can generate the migration session key by taking the information of the first account as an input of a key generation algorithm. In this way, each electronic device can generate the migration session key based on the logged account, so that the electronic devices that log the same account can not need to transmit the migration session key, which is convenient for the electronic devices to decrypt the migration data and can keep the migration session key secret.
[0232] In some examples, the data of the NFC card stored by the electronic device 100 includes a migration recovery key. The electronic device 100 can randomly generate the migration recovery key when the NFC card is opened, and the electronic device 100 can save the migration recovery key. Alternatively, the electronic device 100 can receive the migration recovery key input by the user when the NFC card is opened, and save the migration recovery key. In this way, the electronic device 100 can use the saved migration recovery key to encrypt the card information when the NFC card is migrated out.
[0233] In some examples, the electronic device 100 can generate a corresponding migration recovery key for each of the N NFC cards before sending the migration data of the N NFC cards to the server 300, and obtain the migration data of the N NFC cards based on the migration session key, the card information of the N NFC cards, and the migration recovery keys of the N NFC cards, where N is greater than 1. The electronic device 100 can send the migration data of the N NFC cards to the server 300. In this way, the electronic device 100 can generate a migration recovery key for each NFC card, which can better protect the card information of different NFC cards.
[0234] In other examples, the electronic device 100 can generate a migration recovery key, encrypt the card information of the N NFC cards using the migration recovery key to obtain ciphertext 1 of the N NFC cards. The electronic device 100 can encrypt the migration recovery key using the migration session key to obtain ciphertext 2. The electronic device 100 can send the migration data including the ciphertext 2 and the ciphertext 1 of the N NFC cards to the server 300. In this way, the electronic device 100 encrypts the card information of the migrated NFC cards using one migration recovery key, so that the electronic device 100 only needs to send one copy of the ciphertext 2 to the server 300, which can faster send the migration data to the server 300.
[0235] In other examples, the electronic device 100 can obtain a card information set based on the card information of the N NFC cards. The electronic device 100 can generate a migration recovery key, and encrypt the card information set using the migration recovery key to obtain ciphertext 1. In this way, the electronic device 100 can encrypt the card information of multiple NFC cards at a time, reducing the overhead of encrypting the card information.
[0236] The following is a flowchart illustrating the NFC card migration method provided in this application embodiment.
[0237] For example, such as Figure 7 As shown, the NFC card migration method provided in this application includes the following steps:
[0238] S701. Electronic device 100 logs into the first account and stores the data of the first NFC card. The data of the first NFC card includes the card information and migration recovery key of the first NFC card.
[0239] In this system, electronic device 100 is logged into a first account. Electronic device 100 has activated a first NFC card and stores data related to the first NFC card, including card information and a migration recovery key. The description of the migration recovery key can be found in the above embodiments and will not be repeated here. Electronic device 100 can activate the first NFC card via server 400 / PICC500, or it can migrate the first NFC card from another electronic device logged into the first account.
[0240] S702. Electronic device 100 generates a migration session key based on the information of the first account.
[0241] Among them, electronic device 100 can use the information of the first account as input to the key generation algorithm to generate a migration session key.
[0242] S703. Electronic device 100 uses the migration recovery key to encrypt the card information of the first NFC card, obtaining ciphertext 1.
[0243] S704. Electronic device 100 uses the migration session key to encrypt the migration recovery key, resulting in ciphertext 2.
[0244] S705. Electronic device 100 sends the identifier of the first account and the migration data of the first NFC card (including ciphertext 1 and ciphertext 2) to server 300.
[0245] The identifier of the first account can be used to indicate that the migration data of the first NFC card belongs to the electronic device logged into the first account. For example, the identifier of the first account can be account information, account nickname, account mobile phone number, etc. The server 300 can determine the account corresponding to the first NFC card based on the identifier of the first account.
[0246] Specifically, electronic device 100 can send migration data of the first NFC card to server 300 when the card information of the NFC card changes. Alternatively, electronic device 100 can send migration data of the first NFC card to server 300 upon receiving input from the user to transfer the first NFC card (e.g., to...). Figure 4F The input of the migration control 442 shown is for...Figure 4I The electronic device 200 can send the migration data of the first NFC card to the server 300, etc. upon receiving the input of the confirmation control 473, etc. shown in FIG. 6. For details, please refer to the above-mentioned embodiments, which will not be repeated here.
[0247] S706. The server 300 stores the correspondence between the identification of the first account and the migration data of the first NFC card.
[0248] S707. The electronic device 200 logs in the first account.
[0249] S708. The electronic device 200 receives an input of migrating the first NFC card.
[0250] For example, the input of migrating the first NFC card can be an input of the control 553 or the control 554 in the interface 550 shown in FIG. 6. Figure 5G
[0251] S709. The electronic device 200 sends a request of migrating the first NFC card to the server 300.
[0252] The electronic device 200 can send the request of migrating the first NFC card to the server 300 upon receiving the input of migrating the first NFC card.
[0253] S710. The electronic device 200 receives the migration data of the first NFC card sent by the server 300.
[0254] Upon receiving the request of migrating the first NFC card sent by the electronic device 200 logged in the first account, the server 300 can determine the migration data of the first NFC card from the stored correspondence between the identification of the first account and the migration data of the first NFC card based on the first account, and send the migration data of the first NFC card to the electronic device 200.
[0255] In some examples, the electronic device 100 can send the identification of the first account, the device feature information of the first NFC card, and the migration data of the first NFC card to the server 300. The server 300 can store the correspondence between the identification of the account, the device feature information of the NFC card, and the migration data of the NFC card. When the electronic device 200 logged in the first account acquires the migration data of the first NFC card, the electronic device 200 can send the identification of the first account and the device feature information of the first NFC card to the server 300, and the server 300 can send the migration data of the first NFC card to the electronic device 200. In this way, the server 300 can store the migration data of multiple different NFC cards of multiple accounts of electronic devices, and provide the function of migrating NFC cards for multiple electronic devices.
[0256] S711. The electronic device 200 generates a migration session key based on the information of the first account.
[0257] The electronic device 200 can also generate the migration session key by taking the information of the first account as input of the key generation algorithm. In this case, the key generation algorithm of the electronic device 200 is the same as that of the electronic device 100, the account logged in by the electronic device 200 is the same as that logged in by the electronic device 100, and the migration session key generated by the electronic device 200 is the same as that generated by the electronic device 100.
[0258] S712. The electronic device 200 decrypts the migration recovery key from the ciphertext 2 using the migration session key.
[0259] After the electronic device 200 generates the migration session key, the electronic device 200 can decrypt the ciphertext 2 in the migration data using the migration session key to obtain the migration recovery key.
[0260] S713. The electronic device 200 decrypts the card information of the first NFC card from the ciphertext 1 using the migration recovery key.
[0261] After the electronic device 200 decrypts the migration recovery key, the electronic device 200 can decrypt the ciphertext 1 in the migration data using the migration recovery key to obtain the card information of the first NFC card.
[0262] S714. The electronic device 200 migrates the first NFC card based on the card information of the first NFC card.
[0263] After the electronic device 200 decrypts the card information of the first NFC card, the electronic device 200 can create a special file of the first NFC card, write the card information of the first NFC card into the special file, and migrate the first NFC card, i.e., open the first NFC card. The description of the special file can be referred to the embodiments shown in Figure 3C After the electronic device 200 migrates the first NFC card, the electronic device 200 can send the card information to the NFC card reading device when in the PICC mode. The NFC card reading device can complete the NFC service corresponding to the first NFC card based on the card information obtained from the electronic device 200.
[0264] In some examples, the electronic device 100 encrypts the first data using the migration recovery key to obtain the ciphertext 1. The first data includes the card information of the first NFC card. Optionally, the first data also includes the authentication key and / or the device feature information. The electronic device 200 opens the first NFC card based on the first data.
[0265] In a possible implementation, after one or more NFC analog cards are opened, the electronic device 100 can save the device characteristic information corresponding to each of the one or more NFC analog cards. The NFC analog cards corresponding to different device characteristic information are different. When the electronic device 100 is in the PICC mode, the PCD (for example, the access control device 600) can send the device characteristic information to the PICC. After receiving the device characteristic information sent by the PCD, the electronic device 100 can determine the first NFC analog card from the one or more NFC analog cards based on the device characteristic information. The electronic device 100 can interact with the PCD through the NFC technology to complete the card swiping business of the first NFC analog card. The device characteristic information can include but is not limited to the device organization identifier (also referred to as the NFC device organization unique identifier (ND_OUI)) and the device group identifier (also referred to as the NFC device group identifier (ND_GID)). In this way, the electronic device 100 can select the appropriate NFC analog card according to the device characteristic information, and the speed and efficiency of NFC card swiping are improved.
[0266] The device organization identifier (ND_OUI) can be used to indicate the manufacturer that provides the NFC service of the PCD. The registration management organization of the NFC protocol standard organization can assign different device organization identifiers to different manufacturers. For example, the manufacturers that provide the NFC service can include one or more smart door lock manufacturers, one or more property companies, one or more automobile part manufacturers, one or more transportation card management departments, and the like.
[0267] For example, if the NFC service of the PCD is a community access control, the device organization identifier of the PCD can be the organization identifier applied for by the property company to which the PCD belongs to the NFC standard organization. If the NFC service provided by the PCD is a smart door lock, the device organization identifier of the PCD can be the organization identifier applied for by the smart door lock manufacturer to which the PCD belongs to the NFC standard organization. If the NFC service provided by the PCD is a vehicle key, the device organization identifier of the PCD can be the organization identifier applied for by the vehicle manufacturer to which the PCD belongs to the NFC standard organization. If the NFC service provided by the PCD is a multi-functional card, the device organization identifier of the PCD can be the organization identifier applied for by the card issuing organization to which the PCD belongs to the NFC standard organization. The PICC corresponding to the multi-functional card can include a campus card, a work card, and the like, which have multiple functions such as access control, value storage, and consumption. The card issuing organization to which the PCD belongs can include a company, a school, and the like. The above examples are only used to explain the present application, and should not be construed as limiting the present application.
[0268] The device group identifier (ND_GID) can be used to indicate the group to which the PCD-provided NFC service belongs. The device group identifier can be allocated according to the use and location of the PCD. Different NFC services can have different group divisions.
[0269] For example, if the PCD-provided NFC service is a community access control, the device group identifier of the PCD can include a hash value obtained by hashing a city name and a community name together, and a random number. If the PCD-provided NFC service is a smart door lock, the device group identifier of the PCD can include a hash value obtained by hashing a serial number (SN) of the PCD, and a random number. If the PCD-provided NFC service is a car key, the device group identifier of the PCD can include a hash value obtained by hashing a vehicle identification number (VIN) of the PCD, and a random number. If the PCD-provided NFC service is a multi-functional card, the device group identifier of the PCD can be a preset value, and so on. The above examples are only used to explain the present application, and should not be construed as limiting the present application.
[0270] In some examples, the electronic device 100 can open an NFC card through the server 400. The server 400 and the PCD corresponding to the NFC card belong to the same management organization (for example, the same property company, the same hotel, etc.). The server 300 can store a correspondence between a management organization identifier (for example, the name and / or address of a community managed by a property company) and a communication address of the server 400. When the electronic device 100 opens the NFC card provided by the management organization of the server 400, the communication address of the server 400 can be determined from the correspondence between the management organization identifier stored in the server 300 and the communication address of the server 400 based on the management organization identifier input by the user. The electronic device 100 can obtain the data of the NFC card from the server 400 based on the communication address of the server 400. The data of the NFC card includes but is not limited to card information, device feature information, etc. In this way, the electronic device 100 can open the NFC card based on the obtained data of the NFC card.
[0271] It should be noted that the electronic device 100 can also open the NFC card in other ways, which are not limited to the above description of opening the NFC card provided by the management organization of the server 400. For example, the server 300 can establish a communication connection with the servers (for example, the server 400) of multiple management organizations. The electronic device 100 can call the interface of the server 400 through the server 300 based on the management organization identifier, and obtain the data of the NFC card, etc. The present application embodiment does not limit this.
[0272] In another possible implementation, the electronic device 100 and the electronic device 200 log in the first account. The electronic device 100 can receive and save the migration recovery key generated by the server 400 when the first NFC card is opened. The server 400 can generate the migration recovery key based on the first serial number of the first NFC card and a root key. The first serial number can be used to mark the first NFC card. The root key is a key stored by the server 400. The electronic device 100 can encrypt the card information of the first NFC card using the migration recovery key to obtain ciphertext 1. The electronic device 100 can send the migration data of the first NFC card to the server 300, and the migration data of the first NFC card includes the ciphertext 1.
[0273] The electronic device 200 can display prompt information for prompting the user to input the serial number of the first NFC card after receiving the input of the user migrating the first NFC card. The electronic device 200 can send the first serial number to the server 400 after receiving the first serial number input by the user. The server 400 can send the migration recovery key to the electronic device 200 based on the first serial number. The electronic device 200 can receive the migration data of the first NFC card sent by the server 300, and decrypt the ciphertext 1 using the migration recovery key provided by the server 400 to obtain the card information of the first NFC card. The electronic device 200 can migrate the first NFC card based on the card information of the first NFC card. In this way, the electronic device logged in the first account can obtain the migration recovery key through the server of the management organization, and realize the migration of the NFC card.
[0274] In other examples, the electronic device 200 can send the first serial number to the server 400 through the server 300 after receiving the first serial number input by the user. In this way, because the management servers (for example, the server 400) corresponding to different NFC cards are different, for example, the management servers corresponding to the NFC cards provided by different hotels or different communities are different. The server 300 can establish a communication connection with different management servers, and the electronic device 200 can obtain the migration recovery key of the NFC card from the management server corresponding to the NFC card through the server 300.
[0275] In some examples, the electronic device 100 can receive and save the first serial number sent by the server 400 when opening the first NFC card. The electronic device 100 can display the first card icon and the first serial number after opening the first NFC card, the first card icon can indicate that the electronic device 100 opens the first NFC card, and the first serial number can be used to mark the first NFC card. The electronic device 100 can send the serial number of the first NFC card to the server 300 when sending the migration data of the first NFC card to the server 300. In this way, the electronic device 200 can obtain the serial number from the server 300 when migrating the first NFC card, and the user does not need to manually input the serial number, thereby reducing the complexity of the migration operation.
[0276] Next, the flowchart of the NFC card migration method provided by the embodiments of the present application is introduced.
[0277] For example, as shown in Figure 8 The NFC card migration method provided by the embodiments of the present application includes the following steps:
[0278] S801. The electronic device 100 logs in the first account.
[0279] S802. The electronic device 100 receives an input of opening the first NFC card.
[0280] S803. The electronic device 100 obtains the data of the first NFC card and the first serial number from the server 400 through the server 300, and the data of the first NFC card includes the card information of the first NFC card and the migration recovery key generated by the server 400 based on the first serial number.
[0281] Among them, the server 300 establishes a communication connection with the servers (for example, the server 400) of multiple management organizations. The electronic device 100 can display the options corresponding to the management organizations in the wallet application, so that the electronic device 100 can open the NFC card provided by the management organization through the option corresponding to the management organization. After the electronic device 100 receives an input of opening the first NFC card provided by the management organization of the server 400, the electronic device 100 can obtain the data of the first NFC card and the first serial number from the server 400 through the server 300. The data of the first NFC card includes the card information of the first NFC card and the migration recovery key. The electronic device 100 can open the first NFC card based on the data of the first NFC card.
[0282] In some examples, the server 300 stores a plurality of correspondence relationships between the identifiers of the management organizations and the communication addresses of the servers (e.g., the server 400), which can be used to establish a communication connection with the corresponding server. The electronic device 100 can display a plurality of options corresponding to the management organizations, so that the electronic device 100 can establish a communication connection with the server of the management organization through the option corresponding to the management organization. The electronic device 100 can obtain the data of the NFC card provided by the management organization through the established communication connection, and open the NFC card based on the obtained data.
[0283] The server 400 can generate the migration recovery key based on the root key and the first serial number. The server 400 stores the root key. The root key can be a key randomly generated by the server 400, or a key set by the personnel of the management organization, etc.
[0284] The first serial number can be used to mark the first NFC card. For example, the first serial number can be a string on the first NFC entity card, the first NFC entity card is an entity card handled by the management organization of the server 400 for the user of the electronic device 100, the card information of the first NFC entity card is the same as the card information of the first NFC, and the server 400 can receive the first serial number input by the personnel of the management organization when opening the first NFC card for the electronic device 100. For another example, the first serial number can be a number set by the personnel of the management organization for the first NFC card.
[0285] S804. The electronic device 100 opens the first NFC card based on the card information of the first NFC card.
[0286] The electronic device 100 can open the first NFC card based on the card information of the first NFC card. Specifically, the electronic device 100 can create a special file of the first NFC card, and write the card information of the first NFC into the special file to open the first NFC card.
[0287] Optionally, the electronic device 100 can write the card information of the first NFC and the migration recovery key into the special file to open the first NFC card.
[0288] S805. The electronic device 100 displays the first card icon and the first serial number, and the first card icon is used to indicate that the electronic device 100 opens the first NFC card.
[0289] After opening the first NFC card, the electronic device 100 can display the first card icon and the first serial number, and the first card icon is used to indicate that the electronic device 100 has opened the first NFC card. For example, the electronic device 100 can display the first serial number on the first card icon. In this way, the user of the electronic device 100 can also determine the first serial number when the user does not handle the entity NFC card corresponding to the first NFC card.
[0290] S806. The electronic device 100 encrypts the card information of the first NFC card using the migration recovery key to obtain ciphertext 1.
[0291] S807. The electronic device 100 sends the identifier of the first account and the migration data (including ciphertext 1) of the first NFC card to the server 300.
[0292] The electronic device 100 can encrypt the card information of the first NFC card using the migration recovery key to obtain ciphertext 1. Wherein, the electronic device 100 can encrypt the card information of the first NFC card using the migration recovery key to obtain ciphertext 1 when the card information of the NFC card changes. After that, the electronic device 100 can send the migration data of the first NFC card to the server 300. Or, the electronic device 100 encrypts the card information of the first NFC card using the migration recovery key and sends the migration data of the first NFC card to the server 300 after receiving the input of the user migrating out the first NFC card, and the like. For details, please refer to the above embodiments, which will not be repeated here.
[0293] The electronic device 100 can also send the identifier of the first account to the server 300 when sending the migration data of the first NFC card to the server 300. In this way, the server 300 can determine the account to which the first NFC card belongs.
[0294] It should be noted that the account to which the first NFC card belongs is not limited to being determined according to the identifier of the first account. The server 300 can determine the account to which the first NFC card belongs through other ways. For example, the electronic device 100 can send the identifier of the electronic device 100 to the server 300. The server 300 stores a list of electronic devices logged in the first account. The server 300 can determine the account to which the first NFC card belongs based on the identifier of the electronic device 100, and the like, which are not limited in the embodiments of the present application.
[0295] S808. The server 300 stores the correspondence between the identifier of the first account and the migration data of the first NFC card.
[0296] The server 300 can store the correspondence between the identifier of the first account and the migration data of the first NFC card after receiving the identifier of the first account and the migration data of the first NFC card sent by the electronic device 100.
[0297] S809. The electronic device 200 logs in the first account.
[0298] S810. The electronic device 200 receives the input of migrating in the first NFC card.
[0299] It can be understood that the electronic device 200 can obtain the specified identifier from the server 300 before receiving the input of migrating the first NFC card. The specified identifier includes identifiers of the NFC cards that have not been migrated by all the electronic devices logged in the first account and identifiers of the NFC cards that have been migrated by all the electronic devices logged in the first account. Alternatively, the specified identifier includes identifiers of the NFC cards that have been migrated by all the electronic devices logged in the first account. Alternatively, the specified identifier includes identifiers of the NFC cards that have been migrated by all the electronic devices logged in the first account and the second type of NFC cards that have not been migrated on all the electronic devices logged in the first account.
[0300] Here, the specified identifier includes the identifier of the first NFC card. The electronic device 200 can display prompt information for prompting the user to migrate the NFC card indicated by the specified identifier according to the obtained specified identifier. In this way, the electronic device 200 can prompt the user that the first NFC card can be migrated on the electronic device 200 based on the specified identifier.
[0301] S811. The electronic device 200 displays prompt information for prompting the user to input the serial number.
[0302] The electronic device 200 can display prompt information for prompting the user to input the serial number after receiving the input of migrating the first NFC card. For example, the input of migrating the first NFC card can be the input of the control 553 or the control 554 in the interface 550 as shown in Figure 5G The electronic device 200 can display the interface 901 as shown in Figure 9 The interface 901 includes an input box 902, a confirmation control 903, and prompt information 904 as shown in Figure 9 The input box 902 can be used to input the serial number. The confirmation control 903 can be used to trigger the electronic device 200 to perform the operation of obtaining the migration recovery key based on the serial number in the input box 902. The prompt information 904 can be used to prompt the user to input the serial number. For example, the prompt information 904 can include but is not limited to text type prompt information: “Please input the serial number” and “For the safety of the card, please input the serial number of the card”. The electronic device 200 receives the input of the serial number input by the user in the input box 902 as shown in Figure 9 The electronic device 200 receives the input of the confirmation control 903 as shown in Figure 9 The electronic device 200 can perform steps S813 to S818.
[0303] S812. The electronic device 200 receives the input of the first serial number.
[0304] The electronic device 200 can receive the input of the first serial number input by the user.
[0305] In some examples, the electronic device 100 can send the first sequence number to the server 300 when sending the migration data of the first NFC card to the server 300. The electronic device 200 can obtain the migration data of the first NFC card and the first sequence number from the server 300 after receiving the input of migrating the first NFC card. The electronic device 200 can obtain the migration recovery key from the server 400 based on the first sequence number. In this way, the electronic device 200 does not need the user to manually input the first sequence number.
[0306] S813. The electronic device 200 sends a request for migrating the first NFC card to the server 300.
[0307] The electronic device 200 can send a request for migrating the first NFC card to the server 300 after receiving the input of migrating the first NFC card.
[0308] S814. The electronic device 200 receives the migration data of the first NFC card sent by the server 300.
[0309] After the server 300 receives the request for migrating the first NFC card sent by the electronic device 200 logged in the first account, the server 300 can determine the migration data of the first NFC card based on the first account from the stored correspondence between the identification of the first account and the migration data of the first NFC card, and send the migration data of the first NFC card to the electronic device 200.
[0310] In some examples, the electronic device 100 can send the identification of the first account, the device feature information of the first NFC card, and the migration data of the first NFC card to the server 300. The server 300 can store the correspondence between the identification of the account, the device feature information of the NFC card, and the migration data of the NFC card. When the electronic device 200 logged in the first account obtains the migration data of the first NFC card, the electronic device 200 can send the identification of the first account and the device feature information of the first NFC card to the server 300, and the server 300 can send the migration data of the first NFC card to the electronic device 200. In this way, the server 300 can store the migration data of multiple different NFC cards of multiple electronic devices of multiple accounts, and provide the function of migrating NFC cards to multiple electronic devices.
[0311] S815. The electronic device 200 sends the first sequence number to the server 400.
[0312] In some examples, the server 300 stores a correspondence between the NFC card and the server of the management organization. The electronic device 200 can determine the server 400 from the server 300 based on the first NFC card, and send the first serial number to the server 400. For example, the server 300 stores a correspondence between the device feature information of the NFC card and the communication address of the server of the management organization. The electronic device 200 can obtain the communication address of the server 400 from the server 300 based on the device feature information of the first NFC card. The electronic device 200 can establish a communication connection with the server 400, and send the first serial number to the server 400. In this way, the device feature information can be used to indicate a unique NFC card, and the electronic device 200 can determine the server of the management organization of the NFC card according to the device feature information.
[0313] In some examples, the electronic device (e.g., the electronic device 100) logged in the first account can send the device feature information of the enabled NFC card to the server 300. The server 300 can store the device feature information of the NFC card under the first account, and send the device feature information of the NFC card under the first account to the electronic device logged in the first account. In this way, the electronic device can determine the NFC card that can be migrated out / in according to the device feature information.
[0314] In some examples, the server 300 can synchronize the device feature information of the enabled NFC card under the first account and the correspondence between the server of the management organization in the electronic device logged in the first account. In this way, the electronic device logged in the first account can determine from the stored data which server needs to send the first serial number to.
[0315] In some examples, the device feature information can also include the service type of the NFC card, which can include but is not limited to, for example, access control, key, transportation, bank, digital currency, digital certificate, no-code payment, electronic ticket, etc. In this way, the electronic device logged in the first account can display the service type of the NFC card and the name of the group to which the NFC service of the NFC card belongs on the card option of the NFC card according to the device feature information, so as to facilitate the user to identify the NFC card that needs to be migrated in / out.
[0316] In this way, the electronic device 200 can send the first serial number to the server 400 based on the device feature information of the first NFC card.
[0317] In some examples, the server 400 can store a correspondence between the serial number, the account information, and the migration recovery key. After receiving the first serial number, the server 400 can verify whether the account logged in by the electronic device 200 is the first account. After determining that the account logged in by the electronic device 200 is the first account, the server 400 sends the migration recovery key to the electronic device 200.
[0318] It should be noted that the electronic device 200 is not limited to performing step S813 first and then performing step S815. The electronic device 200 can also perform step S815 first and then perform step S813. The present application does not limit the order in which the electronic device 100 performs step S813 and step S815.
[0319] S816. The electronic device 200 receives the migration recovery key sent by the server 400.
[0320] After receiving the first serial number, the server 400 can generate the migration recovery key based on the first serial number and the root key. The server 400 can send the migration recovery key to the electronic device 200.
[0321] S817. The electronic device 200 uses the migration recovery key to decrypt the card information of the first NFC card from the ciphertext 1.
[0322] After receiving the migration recovery key, the electronic device 200 can use the migration recovery key to decrypt the card information of the first NFC card from the ciphertext 1.
[0323] S818. The electronic device 200 migrates the first NFC card based on the card information of the first NFC card.
[0324] After the electronic device 200 decrypts the card information of the first NFC card, the electronic device 200 can create a special file of the first NFC card and write the card information of the first NFC card into the special file to migrate the first NFC card, i.e., to open the first NFC card. The description of the special file can be referred to the embodiments shown in Figure 3C After the electronic device 200 migrates the first NFC card, the electronic device 200 can send the card information to the NFC card reading device when in the PICC mode. The NFC card reading device can complete the NFC service corresponding to the first NFC card based on the card information obtained from the electronic device 200.
[0325] In some examples, the electronic device 100 can store a migration recovery key of the first NFC card. The server 400 stores a correspondence between a sequence number and a root key. The server 400 can generate an encryption key based on the first sequence number of the first NFC card and the root key corresponding to the first sequence number. The electronic device 100 can obtain the encryption key generated by the server 400. The electronic device 100 can encrypt the card information of the first NFC card based on the migration recovery key to obtain ciphertext 1. The electronic device 100 can encrypt the migration recovery key based on the encryption key to obtain ciphertext 2. The electronic device 100 can send the migration data of the first NFC card to the server 300, and the migration data of the first NFC card includes the ciphertext 1 and the ciphertext 2.
[0326] The electronic device 200 can display prompt information for prompting the user to input the sequence number of the first NFC card after receiving the input of the user to migrate the first NFC card. The electronic device 200 can send the first sequence number input by the user to the server 400 through the server 300 after receiving the first sequence number input by the user. The server 400 can send the encryption key to the electronic device 200 based on the first sequence number. The electronic device 200 can receive the migration data of the first NFC card sent by the server 300, and decrypt the ciphertext 2 using the encryption key provided by the server 400 to obtain the migration recovery key. And decrypt the ciphertext 1 based on the migration recovery key to obtain the card information of the first NFC card. The electronic device 200 can migrate the first NFC card based on the card information of the first NFC card. In this way, the electronic device logged in the first account can obtain the migration recovery key through the server of the management organization, and realize the migration of the NFC card.
[0327] In a possible implementation, the communication system 10 further includes a server 700 (not shown in the figure). The server 700 can be used to manage the password information of the electronic device logged in the first account. When the electronic device 100 logs in the first account, the password information (including the account and password of the application) of the plurality of applications can be sent to the server 700, and the server 700 can save the correspondence between the first account and the password information of the plurality of applications. When the electronic device 200 logs in the first account, the password information of the plurality of applications corresponding to the first account can be obtained from the server 700. In this way, the electronic device 200 can directly log in the plurality of applications based on the password information of the plurality of applications, and the electronic device 200 does not need to perform the login operation again, and the operation is more convenient.
[0328] In some examples, when the electronic device 100 sends the password information of the application to the server 700, the electronic device 100 sends the verification information (e.g., the lock screen password of the electronic device 100, etc.) to the server 700, and the server 700 can store the correspondence between the first account, the verification information, and the password information of the application. After the electronic device 200 logs in the first account, the electronic device 200 receives the input of the user obtaining the password information of the first account. In response to the input, the electronic device 200 displays an input box for inputting the verification information. After the electronic device 200 receives the verification information input by the user, the electronic device 200 can send the verification information to the server 700. The server 700 can determine whether the verification information of the electronic device 200 is the same as the verification information of the electronic device 100. When the server 700 determines that the verification information of the electronic device 200 is the same as the verification information of the electronic device 100, the server 700 sends the password information corresponding to the first account to the electronic device 200. In this way, the server 700 can confirm the electronic device 200 through the verification information, and protect the security of the password information.
[0329] In some examples, the server 700 can generate a shared key, which can be used to encrypt the transmitted data when the electronic device logged in the first account transmits data. In this way, multiple electronic devices logged in the first account can encrypt the transmitted data through the shared key, to ensure the security of the data.
[0330] Optionally, the server 700 stores the asset identities (AssetIDs) of multiple application programs installed on the electronic device logged in the first account. The asset identities of different application programs can be different. The electronic device 100 can generate an asset key based on the shared key and the asset identity. The electronic device 100 can encrypt the data of the application program indicated by the asset identity through the asset key. In this way, the asset keys used by different applications are different, which can reduce the probability of leakage of the shared key.
[0331] Optionally, the asset identities corresponding to different services of the same application program can also be different. In this way, the electronic device 100 can generate an asset key based on the shared key and the asset identities of different services, and separate the keys used by different services, to strengthen the protection of the data of different services.
[0332] Embodiments of the present application provide a NFC card migration method. An electronic device 100 and an electronic device 200 log in a first account. The electronic device 100 opens a first NFC card. The electronic device 100 includes a processor 11 and a security module 12. The security module 12 of the electronic device 100 can encrypt card information of the first NFC card using a migration recovery key to obtain first encrypted data. The security module 12 of the electronic device 100 can encrypt the migration recovery key based on a temporary key pair 1 to obtain first ciphertext. The processor 11 of the electronic device 100 can obtain an asset key based on the first account. The processor 11 of the electronic device 100 can encrypt the first ciphertext based on the asset key to obtain second ciphertext. The security module 12 of the electronic device 100 can process the second ciphertext based on the temporary key pair 1 to obtain third ciphertext. The third ciphertext can be decrypted by the asset key to obtain the migration recovery key. The electronic device 100 can send migration data of the first NFC card to a server 300, and the migration data of the first NFC card includes the third ciphertext and the first encrypted data.
[0333] The electronic device 200 includes a processor 14 and a security module 15. The electronic device 200 can obtain migration data of the first NFC card from the server 300 after receiving an input of migrating the first NFC card. The security module 15 of the electronic device 200 can encrypt the third ciphertext based on the key 1 to obtain fourth ciphertext. The processor 14 of the electronic device 200 can obtain an asset key based on the first account. The processor 14 of the electronic device 200 can process the fourth ciphertext based on the asset key to obtain fifth ciphertext. The security module 15 of the electronic device 200 can decrypt the fifth ciphertext based on the key 1 to obtain the migration recovery key. The electronic device 200 can decrypt the first encrypted data using the migration recovery key to obtain card information of the first NFC card.
[0334] In this way, the security level of the security module of the electronic device 100 (the electronic device 200) is higher than that of the processor. The electronic device 100 and the electronic device 200 will not send the card information in plaintext to other modules except the security module, and the security of the card information can be better protected.
[0335] In some examples, the electronic device 100 can send migration data of the first NFC card to the server 300 after receiving an input of migrating the first NFC card. The electronic device 200 can obtain migration data of the first NFC card from the server 300 after receiving an input of migrating the first NFC card. In this way, the user can actively migrate the NFC card in the electronic device.
[0336] In some examples, the electronic device 200 can send a request message to the electronic device 100 for obtaining the migration data of the first NFC card through the server 300 after receiving the input of migrating the first NFC card. After receiving the request message, the electronic device 100 can send the migration data of the first NFC card to the server 300, and the server 300 can relay the migration data of the first NFC card to the electronic device 200. In this way, the electronic device 200 can obtain the migration data of the first NFC card from the corresponding electronic device 100 after receiving the input of migrating the first NFC card, and the electronic device 100 does not need to upload the migration data to the server 300 in advance, thereby protecting the security of the migration data.
[0337] It should be noted that the electronic device 100 can also send the migration data of the first NFC card to the server 300 at a preset upload time interval, and the present application does not limit this.
[0338] Next, the schematic diagram of the NFC card migration method provided by the present application is introduced.
[0339] The NFC card migration method provided by the present application can be applied to Figure 2 the communication system 10 as shown in the figure. The communication system 10 can include an electronic device 100, an electronic device 200, a server 300 and a server 700 (not shown in the figure).
[0340] As shown in Figure 10 , the electronic device 100 can include a processor 11, a security module (security chip, SE Chip) 12 and an NFC module 13. The security module 12 can be connected with the NFC module 13, the security module 12 can be connected with the processor 11, and the NFC module 13 can be connected with the processor 11. The description of the NFC module 13 can refer to the description of the NFC module 102 as shown in Figure 3A . The description of the security module 12 can refer to the description of the SE 103 and / or the SIM card 104 as shown in Figure 3A . The security module 12 and the NFC module 13 can be two independent chips. Alternatively, the security module 12 and the NFC module 13 can be integrated in the same chip.
[0341] The processor 11 can run two application environments: a trusted execution environment (TEE) and a rich execution environment (REE). The REE can run a key synchronization application 21 and a wallet application 22. The TEE can run a key management trusted application (TA) 23 and a shared key management module 24.
[0342] An operating system running in the REE can be referred to as a rich execution environment operating system (REE OS), and an operating system running in the TEE can be referred to as a trusted execution environment operating system (TEE OS). The TEE is a secure running environment running in the CPU, and its secure startup process needs to be verified and is separate from the REE. The applications running in the TEE are independent of each other, and cannot access each other without authorization, ensuring that the processing of the resources and data of the applications in the TEE is performed in a trusted environment, thereby providing security services for the REE operating system. The TEE has its own execution space and a higher security level than the REE operating system, and is a security architecture that overlaps with the hardware architecture of the currently used CPU. The software and hardware resources accessible by the TEE are separate from the REE operating system and provide hardware-supported isolation.
[0343] The key synchronization application 21 can be used to obtain a shared key from the server 700 by the electronic device 100. The key management TA 23 can be used to encrypt / decrypt data based on the shared key or an asset key. The shared key management module 24 can be used to save the shared key and generate an asset key based on the asset identifier and the shared key.
[0344] The process in which the electronic device 100 migrates out of the first NFC card includes the following steps:
[0345] S1001. The secure module 12 generates a migration recovery key, encrypts the card information of the first NFC card using the migration recovery key, and obtains first encrypted data.
[0346] The secure module 12 stores data of one or more NFC cards. The one or more NFC cards include the first NFC card. The secure module 12 can generate a migration recovery key and encrypt the card information of the first NFC card using the migration recovery key to obtain first encrypted data.
[0347] The security module 12 can randomly generate the migration recovery key when the card information of the first NFC card changes. Alternatively, the security module 12 can obtain the migration recovery key when the first NFC card is opened (for example, receive the migration recovery key sent by the server 400 / PICC 500, or randomly generate the migration recovery key). Alternatively, the security module 12 can generate the migration recovery key after receiving the input of the user migrating out of the first NFC card (for example, randomly generate the migration recovery key, or generate the migration recovery key based on the first account logged in by the electronic device 100), and the like.
[0348] For example, the card information of the first NFC card is P. The security module 12 can generate a random number m, and use the random number m as the migration recovery key. The security module 12 encrypts P using m to obtain the first encrypted data C0. Wherein, C0 = specified encryption algorithm (m, P).
[0349] When the electronic device 100 migrates out of multiple NFC cards, the security module 12 can use the card information of the multiple NFC cards as P, and encrypt the card information of the multiple NFC cards using the migration recovery key m to obtain the first encrypted data. In this way, the security module 12 can encrypt the card information of the multiple NFC cards using one migration recovery key, so that the electronic device 100 only needs to encrypt one migration recovery key, and the migration efficiency is higher.
[0350] In some examples, the security module 12 can generate one migration recovery key for the card information of each NFC card. In this way, using different migration recovery keys to encrypt the card information of different NFC cards can isolate the card information of different NFC cards, and improve the security of the card information of the NFC card.
[0351] S1002. The security module 12 can generate a temporary key pair 1, encrypt the migration recovery key based on the public key 1 of the temporary key pair 1 to obtain the first ciphertext; wherein the temporary key pair 1 includes a private key 1 and a public key 1, and the private key 1 can be used to decrypt the first ciphertext to obtain the migration recovery key.
[0352] The security module 12 can encrypt the migration recovery key based on the elliptic curve cryptography (ECC) technology to obtain the first ciphertext. The security module 12 can generate a temporary key pair 1, and the temporary key pair 1 includes a private key 1 and a public key 1. The public key 1 is calculated by the security module 12 based on the private key 1. The security module 12 can process the migration recovery key based on the temporary key pair 1 and the parameters for generating the public key 1 to obtain the first ciphertext.
[0353] For example, the security module 12 generates the first ciphertext through an algorithm as follows:
[0354] 1. The security module 12 determines an elliptic curve E and takes a point G on the elliptic curve E as a base point. In the following embodiments, [A]B represents a point multiplication calculation of a parameter A and a parameter B on the elliptic curve E. A+B represents a point addition calculation of the parameter A and the parameter B on the elliptic curve E.
[0355] 2. The security module 12 generates a temporary key pair 1, which can be represented as <x1, Y1>. Wherein Y1 = [x1]G, x1 is a private key 1, and Y1 is a public key 1.
[0356] 3. The security module 12 generates a random number r1 and calculates Q1 = [r1]G.
[0357] 4. The security module 12 encodes m as a point n on the elliptic curve.
[0358] 5. The security module 12 uses blind to n and obtains the first ciphertext C1 = (Q1, n / ). Wherein,
[0359] U1 = [r1]Y1
[0360] n / = U1 + n
[0361] It should be noted that since n = n / - [x1]Q1, as long as the private key 1 is known, n can be obtained, and m can be obtained based on n.
[0362] S1003. The security module 12 sends the first ciphertext to the wallet application 22.
[0363] S1004. The wallet application 22 sends the first ciphertext and the first asset identifier to the key synchronization application 21, and the first asset identifier can be used to indicate the wallet application 22.
[0364] In other examples, the first asset identifier can be used to indicate the service type of the first NFC card, such as access control, key, transportation, bank, digital currency, digital certificate, no-code payment, electronic ticket, etc. In this way, the shared key management module 34 can determine the asset key according to the service type of the NFC card, and can separate the data of different services so that the data of different services do not affect each other.
[0365] S1005. The key synchronization application 21 sends the first ciphertext and the first asset identifier to the key management trusted application 23.
[0366] Wherein, since the key synchronization application 21 is under the REE, the key synchronization application 21 can encrypt / decrypt data through the key management TA 23 under the TEE. Here, after the key management trusted application 23 receives the first ciphertext and the first asset identifier, the asset key can be obtained based on the first asset identifier.
[0367] S1006. The key management TA 23 can send the first asset identifier to the shared key management module 24.
[0368] S1007. The shared key management module 24 can generate the private key 2 in the temporary key pair 2 based on the first asset identifier.
[0369] Wherein, the shared key management module 24 can generate the asset key by taking the first asset identifier and the shared key as inputs of a specified key algorithm, and here the asset key is the private key 2 in the temporary key pair 2. For example, the specified key algorithm can be a key derivation function (KDF). The private key 2 can be represented as x2, x2=KDF(MK, AssetID1), wherein MK is the shared key and AssetID1 is the first asset identifier.
[0370] S1008. The shared key management module 24 sends the private key 2 to the key management TA 23.
[0371] S1009. The key management TA 23 can generate the public key 2 in the temporary key pair 2 based on the private key 2.
[0372] S1010. The key management TA 23 encrypts the first ciphertext based on the public key 2 to obtain the second ciphertext, and the private key 1 and the private key 2 can be used to decrypt the second ciphertext to obtain the migration recovery key.
[0373] For example, the process of the key management TA 23 generating the second ciphertext through an algorithm is as follows:
[0374] 1. The key management TA 23 generates a temporary key pair 2 based on the private key 2, and the temporary key pair 2 can be represented as <x2, Y2>. Wherein, Y2=[x2]G, x2 is the private key 2, and Y2 is the public key 2.
[0375] 2. The key management TA 23 generates a mask random number t1.
[0376] 3. The key management TA 23 performs a mask operation on C1 based on t1 to calculate D1.
[0377] D1=([t1]G+Q1, [r1]Y1+n / ) = ([t1+r1]G, [t1+r1]Y1+n) = ([t2]G, [t2]Y1+n), wherein t2=t1+r1
[0378] 4. The key management TA 23 generates a random number r2 and calculates Q2 = [r2]G.
[0379] 5. The key management TA 23 blinds [t2]Y1 + n in D1 to obtain the second ciphertext C2 = (Q2, [t2]G, n / * ). Wherein,
[0380] U2 = [r2]Y2
[0381] n / * = U2 + [t2]Y1 + n
[0382] It should be noted that since n = n / * - U2 + [t2]Y1 = n / * - [x2]Q2 - [x1][t2]G, as long as the private key 1 and the private key 2 are known, n can be obtained, and m can be obtained based on n.
[0383] In some examples, the electronic device 100 can use the shared key as the private key 2. In this way, the electronic device 100 can encrypt the first ciphertext based on the public key 2 generated by the shared key to obtain the second ciphertext. The electronic device 200 can also directly use the shared key to perform the decryption operation.
[0384] S1011. The key management TA 23 can send the second ciphertext to the key synchronization application 21.
[0385] S1012. The key synchronization application 21 can send the second ciphertext to the wallet application 22.
[0386] S1013. The wallet application 22 can send the second ciphertext to the secure module 12.
[0387] S1014. The secure module 12 can process the second ciphertext based on the private key 1 to obtain the third ciphertext; wherein the private key 2 can be used to decrypt the third ciphertext to obtain the migration recovery key.
[0388] Illustratively, the process of the secure module 12 generating the third ciphertext through an algorithm is as follows:
[0389] 1. The secure module 12 performs de-blinding processing on n / * in the second ciphertext C1 based on the temporary key pair 1 to obtain T1. Wherein, for T1, as long as the private key 2 is known, n can be determined. In this way, the secure module 12 removes the private key 1 in the second ciphertext to obtain the migration recovery key encrypted only based on the private key 2.
[0390] T1 = n / * - [x1][t2]G = U2 + n
[0391] 2. The security module 12 generates a masked random number t3.
[0392] 3. The security module 12 generates a third ciphertext C3=(Q3, n * ) based on t3 and (Q2, T1).
[0393] Q3=[t3]G+Q2=[t3+r2]G=[r3]G, r3=t3+r2
[0394] n * =[t3]Y2+T1=[t3]Y2+[r2]Y2+n=[r3]Y2+n
[0395] It should be noted that since n=n * -[r3]Y2=n * -[x2][r3]G=n * -[x2]Q3, n can be obtained as long as the private key 2 is known, and m can be obtained based on n.
[0396] Optionally, the security module 12 can send (Q2, T1) to the wallet application 22 as the third ciphertext. The electronic device 200 can decrypt the third ciphertext based on the private key 2 to obtain n. In this way, the security module 12 of the electronic device 100 can obtain the third ciphertext more quickly.
[0397] S1015. The security module 12 sends the first encrypted data and the third ciphertext to the wallet application 22.
[0398] S1016. The wallet application 22 sends the identification of the first account and the migration data of the first NFC card to the server 300, and the migration data of the first NFC card includes the first encrypted data and the third ciphertext.
[0399] S1017. The server 300 stores the correspondence between the identification of the first account and the migration data of the first NFC card.
[0400] The server 300 can store the correspondence between the identification of the first account and the migration data of the first NFC card after receiving the identification of the first account and the migration data of the first NFC card sent by the wallet application 22 of the electronic device 100.
[0401] In some examples, the wallet application 22 can send the identification of the first account, the identification of the first NFC card and the migration data of the first NFC card to the server 300. The server 300 can store the correspondence between the identification of the account, the identification of the NFC card and the migration data of the NFC card. When the electronic device 200 logged in the first account acquires the migration data of the first NFC card, the identification of the first account and the identification of the first NFC card can be sent to the server 300, and the server 300 can send the migration data of the first NFC card to the wallet application 32 of the electronic device 200. In this way, the server 300 can store the migration data of multiple different NFC cards of multiple accounts of multiple electronic devices, and provide the function of migrating NFC cards to multiple electronic devices.
[0402] As shown in Figure 11 , the electronic device 200 can include a processor 14, a security module 15 and an NFC module 16. The security module 15 can be connected with the NFC module 16, the security module 15 can be connected with the processor 14, and the NFC module 16 can be connected with the processor 14. The description of the NFC module 16 can refer to the description of the NFC module 102 shown in Figure 3A . The description of the security module 15 can refer to the description of the SE 103 and / or the SIM card 104 shown in Figure 3A . The security module 15 and the NFC module 16 can be two independent chips. Alternatively, the security module 15 and the NFC module 16 can be integrated in the same chip.
[0403] Among them, the processor 14 can run two application environments: TEE and REE. Among them, the REE can run a key synchronization application 31 and a wallet application 32. The TEE can run a key management TA 33 and a shared key management module 34.
[0404] Among them, the key synchronization application 31 can be used to acquire a shared key from the server 700 by the electronic device 100. The key management TA 33 can be used to encrypt / decrypt data based on the shared key or the asset key. The shared key management module 34 can be used to save the shared key, and generate the asset key based on the asset identification and the shared key.
[0405] Among them, the process of the electronic device 200 migrating the first NFC card includes the following steps:
[0406] S1101. The server 300 stores the correspondence between the identification of the first account and the migration data of the first NFC card, and the migration data of the first NFC card includes the first encrypted data and the third ciphertext.
[0407] S1102. The wallet application 32 receives the input of migrating the first NFC card.
[0408] S1103. The wallet application 32 sends a request for migrating the first NFC card to the server 300.
[0409] S1104. The wallet application 32 receives the migration data of the first NFC card sent by the server 300.
[0410] Specifically, the wallet application 32 obtains the description of the migration data of the first NFC card of the server 300, which can be referred to the above embodiments, and will not be described here.
[0411] S1105. The wallet application 32 sends the migration data of the first NFC card to the secure module 15.
[0412] S1106. The secure module 15 generates a key 1, encrypts the third ciphertext based on the key 1 to obtain a fourth ciphertext, and the key 1 and the private key 2 can be used to decrypt the fourth ciphertext to obtain the migration recovery key.
[0413] Exemplarily, the secure module 15 generates the fourth ciphertext through an algorithm as follows:
[0414] 1. The secure module 12 generates a mask random number d1.
[0415] 2. The secure module 12 obtains Q4 and T2 based on d1 and the third ciphertext C3.
[0416] Q4 = [d1]G + Q3 = [d1 + r3]G = [d2]G, d2 = d1 + r3
[0417] T2 = [d1]Y2 + n * = [d1 + r3]Y2 + n = [d2]Y2 + n
[0418] 3. The secure module 12 generates a key 1, which can be denoted as K, K being a point on an elliptic curve E.
[0419] 4. The secure module 12 blinds T2 to obtain n *+ .
[0420] n *+ = K + T2 = K + [d2]Y2 + n
[0421] 5. The secure module 12 obtains the fourth ciphertext C4 = (Q4, n *+ ).
[0422] It should be noted that since n = n *+ -K-[d2]Y2 = n *+ -K-[x2][d2]G = n *+ -K-[x2]Q4, as long as the private key 2 and the key 1 are known, n can be obtained, and m can be obtained based on n.
[0423] In some examples, the security module 12 can generate a temporary key pair 3, the security module 12 can encrypt the third ciphertext based on the public key 3 in the temporary key pair 3 to obtain a fourth ciphertext. Then, the security module 12 can decrypt the fifth ciphertext based on the private key 3 in the temporary key pair 3 to obtain the migration recovery key, and the embodiments of the present application are not limited thereto.
[0424] S1107. The security module 15 sends the fourth ciphertext to the wallet application 32.
[0425] S1108. The wallet application 32 sends the fourth ciphertext and the first asset identifier to the key synchronization application 31, and the first asset identifier can be used to indicate the wallet application 32.
[0426] S1109. The key synchronization application 31 sends the fourth ciphertext and the first asset identifier to the key management TA 33.
[0427] S1110. The key management TA 33 can send the first asset identifier to the shared key management module 34.
[0428] S1111. The shared key management module 34 can generate the private key 2 in the temporary key pair 2 based on the first asset identifier.
[0429] The shared key management module 34 can generate the asset key by taking the first asset identifier and the shared key as inputs of the specified key algorithm, and the asset key is the private key 2 in the temporary key pair 2. For example, the specified key algorithm can be a key derivation function (KDF). The private key 2 can be represented as x2, x2 = KDF(MK, AssetID1), where MK is the shared key, and AssetID1 is the first asset identifier.
[0430] It can be understood that since the account logged in by the electronic device 100 and the electronic device 200 is the first account, the shared key obtained by the electronic device 100 and the electronic device 200 is the same. The first asset identifier of the wallet application 32 of the electronic device 100 and the electronic device 200 and the specified key algorithm used are the same, and the asset key generated by the electronic device 100 and the electronic device 200 is the same.
[0431] S1112. The shared key management module 34 sends the private key 2 to the key management TA 33.
[0432] S1113. The key management TA 33 generates the public key 2 in the temporary key pair 2 based on the private key 2.
[0433] S1114. The key management TA 33 processes the fourth ciphertext based on the temporary key pair 2 to obtain a fifth ciphertext, and the key 1 can be used to decrypt the fifth ciphertext to obtain the migration recovery key.
[0434] Illustratively, the key management TA 33 generates the fifth ciphertext through an algorithm as follows:
[0435] 1. The key management TA 33 generates a temporary key pair 2 based on the private key 2, and the temporary key pair 2 can be represented as <x2, Y2>. Wherein Y2 = [x2]G, x2 is the private key 2, and Y2 is the public key 2.
[0436] 2. The key management TA 33 processes n *+ in the fourth ciphertext based on the private key 2 to obtain the fifth ciphertext C5 = (n + ). In this way, the security module 12 removes the private key 2 in the fourth ciphertext to obtain the migration recovery key encrypted only based on the key 1.
[0437] n + = n *+ -[x2]Q4 = K + n
[0438] It should be noted that since n = n + -K, as long as the key 1 is known, n can be obtained. Optionally, since the public key 2 is used to encrypt data, the key management TA 33 can only generate the private key 2, not the public key 2, and decrypt the fourth ciphertext based on the private key 2 to obtain the fifth ciphertext.
[0439] S1115. The key management TA 33 can send the fifth ciphertext to the key synchronization application 31.
[0440] S1116. The key synchronization application 31 can send the fifth ciphertext to the wallet application 32.
[0441] S1117. The wallet application 32 can send the fifth ciphertext to the security module 15.
[0442] S1118. The security module 15 processes the fifth ciphertext based on the key 1 to obtain the migration recovery key.
[0443] Illustratively, the security module 15 obtains the migration recovery key through an algorithm as follows:
[0444] 1. The security module 15 processes the fifth ciphertext based on the key 1 to obtain n.
[0445] n = n + -K
[0446] 2. The security module 15 decodes n to obtain the migration recovery key m.
[0447] S1119. The security module 15 decrypts the first encrypted data based on the migration recovery key to obtain the card information of the first NFC card.
[0448] The security module 15 can decrypt the first encrypted data C0 using the migration recovery key m to obtain the card information P of the first NFC card. P = Dec (m, C0), where Dec is a designated decryption algorithm corresponding to the designated encryption algorithm.
[0449] S1120. The security module 15 migrates the first NFC card based on the card information of the first NFC card.
[0450] After the security module 15 decrypts the card information of the first NFC card, the security module 15 can create a dedicated file for the first NFC card and write the card information of the first NFC card into the dedicated file to migrate the first NFC card, i.e., to activate the first NFC card. The dedicated file can be described with reference to the embodiment shown in FIG. 6. After the security module 15 migrates the first NFC card, the security module 15 can send the card information to the NFC card reading device through the NFC module 16 when the electronic device 200 is in the PICC mode. The NFC card reading device can complete the NFC service corresponding to the first NFC card based on the card information obtained from the electronic device 200. Figure 3C
[0451] In some examples, the electronic device 100 and the electronic device 200 log in to the first account. The electronic device 100 activates the first NFC card. The electronic device 100 includes a processor 11 and a security module 12. The security module 12 of the electronic device 100 can encrypt the card information of the first NFC card based on a temporary key pair 1 to obtain first ciphertext. The processor 11 of the electronic device 100 can obtain an asset key based on the first account. The processor 11 of the electronic device 100 can encrypt the first ciphertext based on the asset key to obtain second ciphertext. The security module 12 of the electronic device 100 can process the second ciphertext based on the temporary key pair 1 to obtain third ciphertext. The third ciphertext can be decrypted by the asset key to obtain the card information of the first NFC card. The electronic device 100 can send migration data of the first NFC card to the server 300, and the migration data of the first NFC card includes the third ciphertext.
[0452] The electronic device 200 includes the processor 14 and the security module 15. The electronic device 200 can obtain the migration data of the first NFC card from the server 300 after receiving the input of migrating the first NFC card. The security module 15 of the electronic device 200 can encrypt the third ciphertext based on the key 1 to obtain the fourth ciphertext. The processor 14 of the electronic device 200 can obtain the asset key based on the first account. The processor 14 of the electronic device 200 can process the fourth ciphertext based on the asset key to obtain the fifth ciphertext. The security module 15 of the electronic device 200 can decrypt the fifth ciphertext based on the key 1 to obtain the card information of the first NFC card. In this way, the electronic device 100 and the electronic device 200 can use the encryption key to encrypt and decrypt the card information of the first NFC card, and protect the security of the card information of the first NFC card.
[0453] In a possible implementation, the electronic device 100 can search for the electronic device in the vicinity through a near distance communication technology (for example, Bluetooth, NFC, etc.) after receiving the input of migrating the first NFC card. The electronic device 100 can establish a near distance communication connection with the electronic device 200 after receiving the input of selecting the electronic device 200 by the user. The electronic device 100 can send the migration data of the first NFC card to the electronic device 200 through the near distance communication connection after establishing the near distance communication connection with the electronic device 200. The electronic device 200 can open the first NFC card based on the migration data of the first NFC card after receiving the migration data of the first NFC card sent by the electronic device 100 through the near distance communication connection. Specifically, the electronic device 100 generates the migration data of the first NFC card, and the electronic device 200 opens the first NFC card based on the migration data of the first NFC card. The description can be referred to the above embodiments, and will not be described here. In this way, when the electronic device 100 is close to the electronic device 200, the electronic device 100 and the electronic device 200 can migrate the first NFC card in a near distance.
[0454] It can be understood that when the account logged in by the electronic device 200 is different from the account logged in by the electronic device 100, the electronic device 200 fails to decrypt the migration data after receiving the migration data of the first NFC card, because the account logged in by the electronic device 200 is different from the account logged in by the electronic device 100.
[0455] Optionally, the electronic device 100 can obtain the information of the account logged in by the electronic device 200 after establishing the near field communication connection with the electronic device 200. The electronic device 100 can determine that the account logged in by the electronic device 200 is the same as the account logged in by the electronic device 100 based on the obtained information of the account of the electronic device 200, and send the migration data of the first NFC card to the electronic device 200 through the near field communication connection. In this way, the electronic device 100 can verify whether the account logged in by the electronic device 200 is the same as the account logged in by itself, and protect the security of the migration data of the first NFC card.
[0456] Optionally, the electronic device 100 can send a request message for establishing a communication connection to the electronic device 200 after receiving the input of the user selecting the electronic device 200. The electronic device 200 can display prompt information for prompting the user whether to establish a communication connection with the electronic device 100 after receiving the request message sent by the electronic device 100. The electronic device 200 can establish a communication connection with the electronic device 100 after receiving the input of the user establishing a communication connection with the electronic device 100.
[0457] In some examples, the electronic device 200 can search for an electronic device in the vicinity based on a near field communication technology after receiving the input of migrating the first NFC card of the electronic device 100. The electronic device 200 can establish a near field communication connection with the electronic device 100 after receiving the input of the user selecting the electronic device 100. The electronic device 200 can obtain the migration data of the first NFC card of the electronic device 100 through the near field communication connection, and open the first NFC card based on the migration data. For example, the electronic device 200 can send a request message for migrating the first NFC card to the electronic device 100 through the near field communication connection, and the electronic device 100 can send the migration data of the first NFC card to the electronic device 200 after receiving the request message. In this way, the electronic device 200 can actively migrate the first NFC card.
[0458] Optionally, the electronic device 200 can obtain the information of the account logged in by the electronic device 100 after establishing the near field communication connection with the electronic device 100. The electronic device 200 can determine that the account logged in by the electronic device 100 is the same as the account logged in by the electronic device 200 based on the information of the account of the electronic device 100, and obtain the migration data of the first NFC card of the electronic device 100 through the near field communication connection. The electronic device 200 can open the first NFC card based on the migration data of the first NFC card.
[0459] In some examples, after receiving the input of migrating out the first NFC card, the electronic device 100 can display prompt information for prompting the user to select migrating the first NFC card through the server or migrating the first NFC card through the near distance communication technology. After receiving the input of the user selecting to migrate the first NFC card through the server, the electronic device 100 can migrate the first NFC card through the server 300. After receiving the input of the user selecting to migrate the first NFC card through the near distance communication technology, the electronic device 100 can establish a near distance communication connection with the electronic device 200, and migrate the first NFC card through the near distance communication connection. In this way, the user can select different migration manners in different scenarios, and the method is applicable to more scenarios.
[0460] In some application scenarios, after receiving the input of the user migrating the specified data of the electronic device 100 to the electronic device 200, the electronic device 100 can send the specified data of the electronic device 100 to the electronic device 200 through the near distance communication technology. The specified data of the electronic device 100 can include migration data of one or more NFC cards in the electronic device 100. The specified data of the electronic device 100 can also include, but is not limited to, one or more of the following: contact information stored by the electronic device 100, images stored by the electronic device 100, and application programs installed by the electronic device 100. The electronic device 200 can store the specified data. The electronic device 200 can open one or more NFC cards based on the received specified data. In this way, when the user replaces the electronic device, the user can migrate all the specified data of the electronic device 100 to the electronic device 200, which facilitates the user.
[0461] In some examples, after receiving the input of the user migrating the specified data of the electronic device 100, the electronic device 100 can search for nearby electronic devices through the near distance communication technology. The electronic device 100 can display device options corresponding to the searched electronic devices, and the device options can be used to trigger the electronic device 100 to establish a communication connection with the electronic device indicated by the device option. After receiving the input of the user selecting the device option indicating the electronic device 200, the electronic device 100 can send a request message for establishing a communication connection to the electronic device 200. After receiving the input of the user establishing a communication connection with the electronic device 100, the electronic device 200 can establish a communication connection with the electronic device 100, and the electronic device 100 can send the specified data to the electronic device 200 through the communication connection. For details, refer to the above embodiments, which will not be described here. In this way, the user can migrate the specified data of the electronic device 100 to the electronic device 200 through the NFC card migration method provided in the embodiments of the present application.
[0462] Figure 12 A hardware structure schematic diagram of an electronic device 100 is shown.
[0463] The following will be described in detail with the electronic device 100 as an example. It should be understood that, Figure 12 The electronic device 100 shown is only an example, and the electronic device 100 can have more or fewer components than those shown in Figure 12 The electronic device 100 shown is only an example, and the electronic device 100 can have more or fewer components than those shown in The various components shown in the figure can be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and / or application specific integrated circuits.
[0464] The electronic device 100 can include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charge management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headset interface 170D, a sensor module 180, a key 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 can include one or more of a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0465] It can be understood that the structure shown in the embodiments of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 can include more or fewer components than those shown in the figure, or combine certain components, or split certain components, or different component arrangements. The components shown in the figure can be implemented in hardware, software, or a combination of software and hardware.
[0466] The processor 110 can include one or more processing units, for example: the processor 110 can include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units can be independent devices or integrated in one or more processors. The controller can generate operation control signals according to instruction operation codes and timing signals, and complete the control of fetching and executing instructions. The processor 110 can also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory can save instructions or data that have just been used or are repeatedly used by the processor 110. If the processor 110 needs to use the instructions or data again, it can directly call from the memory. This avoids repeated access and reduces the waiting time of the processor 110, thereby improving the efficiency of the system.
[0467] In some embodiments, the processor 110 can include one or more interfaces. The interfaces can include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.
[0468] It can be understood that the interface connection relationship between the modules shown in the embodiments of the present application is only illustrative and does not constitute a structural limitation of the electronic device 100. In some other embodiments of the present application, the electronic device 100 can also use different interface connection modes or a combination of multiple interface connection modes in the above embodiments.
[0469] The charging management module 140 is configured to receive charging input from a charger. The power management module 141 is configured to connect the battery 142 and the charging management module 140. The power management module 141 receives input from the battery 142 and / or the charging management module 140 to power the processor 110, the internal memory 121, the external memory, the display screen 194, the camera 193, and the wireless communication module 160.
[0470] The wireless communication function of the electronic device 100 can be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, and the baseband processor. The antenna 1 and the antenna 2 are configured to transmit and receive electromagnetic wave signals. Each antenna in the electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization rate of the antennas. For example, the antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.
[0471] The mobile communication module 150 can provide a solution for wireless communication including 2G / 3G / 4G / 5G, etc. applied to the electronic device 100. The mobile communication module 150 can include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1 and perform filtering, amplification, etc. on the received electromagnetic waves, and transmit the processed electromagnetic waves to the modem processor for demodulation. The mobile communication module 150 can also amplify the signals modulated by the modem processor and convert them into electromagnetic waves radiated through the antenna 1. In some embodiments, at least part of the functional modules of the mobile communication module 150 can be arranged in the processor 110. In some embodiments, at least part of the functional modules of the mobile communication module 150 and at least part of the modules of the processor 110 can be arranged in the same device.
[0472] The wireless communication module 160 can provide a solution for wireless communication including wireless local area networks (WLAN) (e.g., wireless fidelity (Wi-Fi) network), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR) technology, etc. applied to the electronic device 100. The wireless communication module 160 can be one or more devices that integrate at least one communication processing module. The wireless communication module 160 receives an electromagnetic wave via the antenna 2, frequency-modulates and filters the electromagnetic wave signal, and transmits the processed signal to the processor 110. The wireless communication module 160 can also receive a signal to be transmitted from the processor 110, frequency-modulate it, amplify it, and radiate it as an electromagnetic wave via the antenna 2.
[0473] In some embodiments, the antenna 1 and the mobile communication module 150 of the electronic device 100 are coupled, and the antenna 2 and the wireless communication module 160 are coupled, so that the electronic device 100 can communicate with a network and other devices through wireless communication technology. The wireless communication technology can include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology, etc. The GNSS can include a global positioning system (GPS), a global navigation satellite system (GLONASS), a beidu navigation satellite system (BDS), a quasi-zenith satellite system (QZSS), and / or a satellite based augmentation systems (SBAS).
[0474] The electronic device 100 implements a display function through a GPU, a display screen 194, and an application processor, etc. The GPU is a microprocessor for image processing, which is connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 can include one or more GPUs, which execute program instructions to generate or change display information.
[0475] The display 194 is configured to display images, videos, and the like. The display 194 includes a display panel. The display panel can be implemented by a liquid crystal display (LCD). The display panel can also be implemented by an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a miniled, a microled, a micro-oled, a quantum dot light emitting diode (QLED), or the like. In some embodiments, the electronic device 100 can include one or N displays 194, where N is a positive integer greater than one.
[0476] The electronic device 100 can implement a photographing function through an ISP, the camera 193, a video codec, a GPU, the display 194, and an application processor.
[0477] The external memory interface 120 can be configured to connect with an external memory card, such as a micro SD card, to expand the storage capacity of the electronic device 100. The internal memory 121 can be configured to store computer-executable program codes including instructions. The processor 110 can execute various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 can include a program storage area and a data storage area. The program storage area can store an operating system, at least one application program required for at least one function (such as a sound play function, an image play function, and the like), and the like. The data storage area can store data created during the use of the electronic device 100 (such as audio data, a phonebook, and the like), and the like. In addition, the internal memory 121 can include a high-speed random access memory, and can further include a non-volatile memory such as at least one of a magnetic disk storage device, a flash memory device, a universal flash storage (UFS), and the like.
[0478] The electronic device 100 can implement an audio function through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, and an application processor. For example, music play, recording, and the like.
[0479] The pressure sensor 180A is configured to sense a pressure signal and convert the pressure signal into an electrical signal. The gyro sensor 180B is configured to determine a motion posture of the electronic device 100. The barometric sensor 180C is configured to measure a barometric pressure. The magnetic sensor 180D includes a Hall sensor. The acceleration sensor 180E is configured to detect an acceleration of the electronic device 100 in various directions (typically, three axes). The distance sensor 180F is configured to measure a distance. The proximity light sensor 180G can include, for example, a light emitting diode (LED) and a photo detector, such as a photodiode. The ambient light sensor 180L is configured to sense an ambient light brightness. The fingerprint sensor 180H is configured to acquire a fingerprint. The temperature sensor 180J is configured to detect a temperature. The touch sensor 180K, also referred to as a "touch panel," can be disposed on the display screen 194. The touch sensor 180K and the display screen 194 can form a touch screen, also referred to as a "touch screen panel." The touch sensor 180K is configured to detect a touch operation applied thereto or in the vicinity thereof. The touch sensor 180K can transmit a detected touch operation to the application processor to determine a touch event type. A visual output related to the touch operation can be provided via the display screen 194. In other embodiments, the touch sensor 180K can be disposed on a surface of the electronic device 100, which is different from a location where the display screen 194 is disposed. The bone conduction sensor 180M can acquire a vibration signal. The keys 190 include a power key, a volume key, and the like. The motor 191 can generate a vibration alert. The indicator 192 can be an indicator light configured to indicate a charging state, a power level change, and the like, and can also be configured to indicate a message, a missed call, a notification, and the like.
[0480] The SIM card interface 195 is configured to connect a SIM card. The SIM card can be inserted into or removed from the SIM card interface 195 to achieve contact and separation with the electronic device 100. The electronic device 100 can support one or N SIM card interfaces, where N is a positive integer greater than one. The SIM card interface 195 can support a Nano SIM card, a Micro SIM card, a SIM card, and the like. The same SIM card interface 195 can simultaneously insert multiple cards. The types of the multiple cards can be the same or different. The SIM card interface 195 can also be compatible with different types of SIM cards. The SIM card interface 195 can also be compatible with external storage cards. The electronic device 100 interacts with a network through the SIM card to achieve functions such as calling and data communication. In some embodiments, the electronic device 100 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.
[0481] In some embodiments, the wireless communication module 160 can be specifically configured to establish a short-range wireless communication link with other electronic devices (e.g., the access control device 600, the electronic device 200) so as to perform short-range wireless data transmission between the two. Exemplarily, the short-range wireless communication link can be a Bluetooth link, a Wi-Fi link, an NFC link, etc. Therefore, the wireless communication module 160 can specifically include a Bluetooth communication module, a Wi-Fi communication module, or an NFC module. The NFC module can include any appropriate components for implementing proximity-based non-contact communication between the electronic device 100 and the access control device 600, thereby providing the electronic device 100 with NFC functionality. For the NFC module, refer to the description of the NFC module in the above Figure 3A embodiments, which will not be repeated here.
[0482] It should be noted that the description of the hardware structure of the electronic device 200 can refer to the description of the hardware structure of the electronic device 100 in the above Figure 12 embodiments, which will not be repeated here.
[0483] The above describes the method provided by the present application in detail. In order to better implement the above-mentioned scheme of the embodiments of the present application, the embodiments of the present application also provide a corresponding device or equipment.
[0484] The embodiments of the present application can divide the functional modules of the electronic device 100 or the electronic device 200 according to the above-mentioned method examples. For example, each functional module can be divided according to each function, or two or more functions can be integrated in one processing module. The above-mentioned integrated module can be realized in the form of hardware or in the form of a software functional module. It should be noted that the division of the modules in the embodiments of the present application is illustrative, and is only a logical functional division. In actual implementation, there can be another division manner.
[0485] The communication device of the embodiments of the present application will be described in detail below. Figure 13 and Figure 14 The communication device of the embodiments of the present application will be described in detail below.
[0486] In the case of using an integrated unit, refer to Figure 13 , Figure 13 is a structural schematic diagram of the communication device 1300 provided by the embodiments of the present application. The communication device 1300 can be the electronic device 100 or the electronic device 200 in the above-mentioned embodiments. Optionally, the communication device 1300 can be a chip / chip system, for example, an NFC chip. As Figure 13 indicated, the communication device 1300 can include a transceiver unit 1310 and a processing unit 1320.
[0487] The transceiving unit 1310 can also be configured to perform the functions of the electronic device 100 or the electronic device 200 in the above embodiments of the present application, such as sending and receiving.
[0488] The processing unit 1320 can also be configured to perform the functions of the electronic device 100 or the electronic device 200 in the above embodiments of the present application, such as NFC protocol analysis and packaging, NFC service processing flow, NFC card migration, and display.
[0489] It should be understood that the communication apparatus 1300 in this design can perform the method steps of the electronic device 100 or the electronic device 200 in the above embodiments. For brevity, details are not repeated here.
[0490] The electronic device 100 or the electronic device 200 in the above embodiments of the present application should be understood as any product with the functions of the electronic device 100 and / or the electronic device 200 described above. Figure 13 Any product with the functions of the communication apparatus 1300 described above falls within the protection scope of the embodiments of the present application.
[0491] In the case of using integrated units, refer to Figure 14 , Figure 14 is a structural schematic diagram of a communication apparatus 1400 provided by the embodiments of the present application. The communication apparatus 1400 can be the server 300 in the above embodiments. As shown in Figure 14 , the communication apparatus 1400 can include a transceiving unit 1410 and a processing unit 1420.
[0492] The transceiving unit 1410 can also be configured to perform the functions of the server 300 in the above embodiments of the present application, such as sending and receiving migration data of the NFC card.
[0493] The processing unit 1420 can also be configured to perform the functions of the server 300 in the above embodiments of the present application, such as NFC card migration in and out processing flow.
[0494] It should be understood that the communication apparatus 1400 in this design can perform the method steps of the server 300 in the above embodiments. For brevity, details are not repeated here.
[0495] The electronic device 100, the electronic device 200, and the server 300 in the above embodiments of the present application should be understood as any product with the functions of the electronic device 100 and / or the electronic device 200 described above. Figure 14 Any product with the functions of the server 300 described above falls within the protection scope of the embodiments of the present application. Figure 14
[0496] As a possible product form, the electronic device 100 or electronic device 200 described in the embodiments of this application can be implemented by a general bus architecture.
[0497] See Figure 15 , Figure 15 This is a schematic diagram of the structure of the communication device 1500 provided in an embodiment of this application. The communication device 1500 can be an electronic device 100, or a device therein. The communication device 1500 can also be an electronic device 200, or a device therein. Figure 15 As shown, the communication device 1500 includes a processor 1501 and a transceiver 1502 internally connected and communicating with the processor 1501. The processor 1501 can be a general-purpose processor or a dedicated processor, such as a central processing unit and / or an NFC controller. The transceiver 1502, also known as a transceiver unit, transceiver, or transceiver circuit, is used to implement transceiver functions. The transceiver 1502 may include a receiver and a transmitter. The receiver, also known as a receiver circuit, is used to implement a receiving function, such as an NFC receiving function; the transmitter, also known as a transmitter or transmitting circuit, is used to implement a transmitting function, such as an NFC transmitting function. Optionally, the communication device 1500 may also include an antenna 1503 and / or a radio frequency unit (RF unit). Figure 15 (Not shown in the image), for example, an NFC antenna, where the NFC antenna can be a coil-type antenna. The antenna 1503 and / or the radio frequency unit can be located inside the communication device 1500 or separate from the communication device 1500, that is, the antenna 1503 and / or the radio frequency unit can be remotely or distributedly deployed.
[0498] Optionally, the communication device 1500 may include one or more memories 1504, which may store instructions, which may be computer programs, that can be executed on the communication device 1500 to cause the communication device 1500 to perform the method steps described in the above embodiments of this application. Optionally, the memory 1504 may also store data. The communication device 1500 and the memory 1504 may be provided separately or integrated together.
[0499] The processor 1501, transceiver 1502, and memory 1504 can be connected via a communication bus.
[0500] In one design, the communication apparatus 1500 can be configured to perform the functions of the electronic device 100 in the above-described embodiments: the processor 1501 can be configured to perform the functional steps and / or other procedures described above for the electronic device 100 to perform NFC protocol analysis and packaging, NFC service processing flow, NFC card migration flow, and display, etc., and / or for the techniques described herein; and the transceiver 1502 can be configured to perform the functional steps and / or other procedures described above for the electronic device 100 to perform sending and receiving, etc., and / or for the techniques described herein.
[0501] In any of the above designs, the processor 1501 can include a transceiver for implementing the receiving and sending functions. For example, the transceiver can be a transceiver circuit, or an interface, or an interface circuit. The transceiver circuit, interface, or interface circuit for implementing the receiving and sending functions can be separate or integrated together. The above-described transceiver circuit, interface, or interface circuit can be used for code / data reading and writing, or the above-described transceiver circuit, interface, or interface circuit can be used for signal transmission or transfer.
[0502] In any of the above designs, the processor 1501 can store instructions, which can be a computer program, and the computer program can run on the processor 1501 to cause the communication apparatus 1500 to perform the method steps described above for the electronic device 100. The computer program can be fixed in the processor 1501, in which case the processor 1501 can be implemented by hardware.
[0503] In an implementation manner, the communication apparatus 1500 can include circuitry which can implement the functions of transmitting or receiving or communicating in the foregoing method embodiments. The processor and the transceiver described in the present application can be implemented on an integrated circuit (IC), an analog IC, a radio frequency integrated circuit (RFIC), a mixed-signal IC, an application specific integrated circuit (ASIC), a printed circuit board (PCB), an electronic device, etc. The processor and the transceiver can also be manufactured using various IC process technologies, such as complementary metal oxide semiconductor (CMOS), N-type metal oxide semiconductor (NMOS), positive channel metal oxide semiconductor (PMOS), bipolar junction transistor (BJT), bipolar CMOS (BiCMOS), silicon germanium (SiGe), gallium arsenide (GaAs), etc.
[0504] The scope of the communication apparatus described in the present application is not limited thereto, and the structure of the communication apparatus can not be limited by Figure 15 The communication apparatus 1500 can be a standalone device or can be part of a larger device. For example, the communication apparatus 1500 can be:
[0505] (1) a standalone integrated circuit (IC), or a chip, or a chip system or subsystem; (2) a set of one or more ICs, optionally including storage components for storing data, computer programs; (3) an ASIC, such as an NFC chip; (4) a module that can be embedded in other devices; (5) a receiver, a terminal, a smart terminal, a cellular phone, a wireless device, a handset, a mobile unit, a vehicle-mounted device, a network device, a cloud device, an artificial intelligence device, etc.; (6) others, etc.
[0506] As a possible product form, the server 300 described in the embodiments of the present application can be implemented by a general bus architecture.
[0507] Referring to Figure 16 , Figure 16 is a structural schematic diagram of the communication apparatus 1600 provided by the embodiments of the present application. The communication apparatus 1600 can be the server 300, or an apparatus therein. As Figure 16As shown, the communication apparatus 1600 includes a processor 1601 and a transceiver 1602 which is connected with the processor 1601 internally for communication. The processor 1601 is a general processor or a special processor, etc. The transceiver 1602 can be referred to as a transceiving unit, a transceiver, or a transceiving circuit, etc., and is used to realize the transceiving function. The transceiver 1602 can include a receiver and a transmitter. The receiver can be referred to as a receiver or a receiving circuit, etc., and is used to realize the receiving function. The transmitter can be referred to as a transmitter or a transmitting circuit, etc., and is used to realize the transmitting function.
[0508] The communication apparatus 1600 can include one or more memories 1603 in which instructions can be stored. The instructions can be computer programs which can be run on the communication apparatus 1600, so that the communication apparatus 1600 performs the method steps described in the above embodiments. The memory 1603 can also store data (for example, migration data of the NFC card, etc.). The communication apparatus 1600 and the memory 1604 can be separately arranged or integrated together.
[0509] The processor 1601, the transceiver 1602 and the memory 1603 can be connected through a communication bus.
[0510] In one design, the communication apparatus 1600 can be used to perform the functions of the server 300 in the above embodiments. The processor 1601 can be used to perform the above Figure 16 The transceiver 1602 can be used to perform the above Figure 16 The transceiver 1602 can be used to perform the above
[0511] In any of the above designs, the processor 1601 can include a transceiver for realizing the receiving and transmitting functions. For example, the transceiver can be a transceiving circuit, or an interface, or an interface circuit. The transceiving circuit, the interface or the interface circuit for realizing the receiving and transmitting functions can be separate or integrated together. The above transceiving circuit, the interface or the interface circuit can be used for reading and writing of codes / data, or the above transceiving circuit, the interface or the interface circuit can be used for transmission or transfer of signals.
[0512] In any of the above designs, the processor 1601 can store instructions which can be computer programs. The computer programs can be run on the processor 1601, so that the communication apparatus 1600 performs the method steps performed by the server 300 in the above method embodiments. The computer programs can be fixed in the processor 1601, and in this case, the processor 1601 can be implemented by hardware.
[0513] The embodiment of the present application further provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to realize the steps executed by the electronic device 100 or the electronic device 200 in the method embodiments.
[0514] The embodiment of the present application further provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to realize the steps executed by the server 300 in the method embodiments.
[0515] The embodiment of the present application further provides a computer program product, which includes a computer program, and when the computer program is run on a computer, the computer can realize the steps executed by the electronic device 100 or the electronic device 200 in the method embodiments.
[0516] The embodiment of the present application further provides a computer program product, which includes a computer program, and when the computer program is run on a computer, the computer can realize the steps executed by the server 300 in the method embodiments.
[0517] The embodiment of the present application further provides a chip system, which includes a processing circuit and an interface circuit, the interface circuit is used for receiving code instructions and transmitting to the processing circuit, and the processing circuit is used for running the code instructions to make the chip system realize the steps executed by the electronic device 100 or the electronic device 200 in the method embodiments of the present application. Wherein, the chip system can be a single chip, or a chip module composed of multiple chips.
[0518] The embodiment of the present application further provides a chip system, which includes a processing circuit and an interface circuit, the interface circuit is used for receiving code instructions and transmitting to the processing circuit, and the processing circuit is used for running the code instructions to make the chip system realize the steps executed by the server 300 in the method embodiments of the present application. Wherein, the chip system can be a single chip, or a chip module composed of multiple chips.
[0519] The above described, the above embodiments are only used to illustrate the technical solutions of the present application, rather than limit them; although the present application is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement to part of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A near field communication (NFC) card migration method, characterized by, The method applied to a first electronic device comprises: The first electronic device encrypts first data using a migration recovery key to obtain second data, wherein the first data comprises card information of a first NFC card; The first electronic device encrypts the migration recovery key based on an encryption key to obtain first ciphertext; The first electronic device sends third data to a first server, wherein the third data comprises the second data and the first ciphertext, and the third data is used for opening the first NFC card by a second electronic device.
2. The method of claim 1, wherein, The first electronic device encrypts first data using a migration recovery key to obtain second data, and specifically comprises: The first electronic device receives a first input of migrating out the first NFC card; The first electronic device encrypts the first data using the migration recovery key to obtain the second data in response to the first input.
3. The method of claim 1, wherein, The first electronic device sends third data to a first server, and specifically comprises: The first electronic device receives a first request of a second electronic device through the first server, wherein the first request is used for migrating in the first NFC card; The first electronic device sends the third data to the first server in response to the first request, wherein the first server is used for sending the third data to the second electronic device.
4. The method according to any one of claims 1 to 3, characterized in that, The first electronic device comprises a processor and a security module, wherein the processor is connected with the security module; and the method further comprises: The processor acquires the encryption key based on a first account logged in by the first electronic device; The first electronic device encrypts the migration recovery key based on an encryption key to obtain first ciphertext, and specifically comprises: The security module encrypts the migration recovery key based on a first private key to obtain second ciphertext; The processor encrypts the second ciphertext based on the encryption key to obtain third ciphertext; The security module decrypts the third ciphertext based on the first private key to obtain the first ciphertext, wherein the first ciphertext and the encryption key are used for obtaining the migration recovery key.
5. The method of claim 4, wherein, The security module encrypts the migration recovery key based on the first private key to obtain second ciphertext, and specifically comprises: The security module generates a first public key based on the first private key, wherein the first private key and the first public key are a pair of public and private keys; The security module encrypts the migration recovery key using the first public key to obtain the second ciphertext; The security module decrypts the third ciphertext based on the first private key to obtain the first ciphertext, and specifically comprises: The security module decrypts the third ciphertext using the first private key to obtain the first ciphertext.
6. The method of claim 5, wherein, Before the security module encrypts the migration recovery key based on the first private key to obtain second ciphertext, the method further comprises: The security module randomly generates the first private key.
7. The method according to any one of claims 4-6, characterized in that, The processor runs a rich execution environment (REE) and a trusted execution environment (TEE), wherein the REE runs a wallet application, and the TEE runs a key management trusted application; The processor encrypts the second ciphertext based on the encryption key to obtain third ciphertext, and specifically comprises: The wallet application sends a first asset identifier to the key management trusted application, the first asset identifier being used to indicate the wallet application, or the first asset identifier being used to indicate a device type feature of the first NFC card; The key management trusted application generates a second private key and a second public key based on the first asset identifier and the encryption key, the second private key and the second public key being a pair of public and private keys; The key management trusted application encrypts the second ciphertext using the second public key to obtain the third ciphertext; wherein the second private key is used to decrypt the third ciphertext to obtain the second ciphertext.
8. The method according to any one of claims 4-6, characterized in that, The processor obtains the encryption key based on a first account logged in by the first electronic device, specifically including: The processor obtains the encryption key from a second server based on a first account logged in by the first electronic device; wherein the second server is used to store one or more keys of the first account, and the one or more keys include the encryption key.
9. The method of any one of claims 1-3, wherein, The method further includes: The first electronic device generates the encryption key based on account information of the first account.
10. The method of any one of claims 1-3, wherein, The method further includes: The first electronic device obtains the encryption key from a third server based on a first serial number of the first NFC card, and the third server stores a correspondence between one or more NFC cards and keys.
11. The method of claim 10, wherein, The first electronic device sends third data to a first server, specifically including: The first electronic device sends the first serial number to the first server.
12. The method according to any one of claims 1-11, characterized in that, The security module of the first electronic device stores a second dedicated file (DF) of the first NFC card; after the first electronic device sends third data to a first server, the method further includes: The first electronic device deletes the second DF of the first NFC card.
13. The method of claim 12, wherein, The first electronic device deletes the second DF of the first NFC card, specifically including: The first electronic device receives a first message of a second electronic device through the first server, and the first message is used to instruct the first electronic device to delete the DF of the first NFC card; In response to the first message, the second DF is deleted.
14. A near field communication (NFC) card migration method, characterized by, Applied to a second electronic device; the method includes: The second electronic device obtains third data of a first electronic device from a first server, and the third data includes second data and first ciphertext; The second electronic device obtains the migration recovery key based on an encryption key and the first ciphertext; The second electronic device decrypts the second data based on the migration recovery key to obtain first data, and the first data includes card information of the first NFC card; The second electronic device opens the first NFC card based on the card information of the first NFC card.
15. The method of claim 14, wherein, The second electronic device obtains third data of a first electronic device from a first server, specifically including: The second electronic device receives a second input of migrating the first NFC card; The second electronic device obtains the third data of the first electronic device from the first server in response to the second input.
16. The method of claim 15, wherein, The second electronic device obtains the third data of the first electronic device from the first server, specifically comprising: The second electronic device sends a first request to the first electronic device through the first server, and the first request is used to obtain the data of the first NFC card; The second electronic device obtains the third data of the first electronic device through the first server.
17. The method according to any one of claims 14-16, characterized by, The second electronic device comprises a processor and a security module, and the processor is connected with the security module; the method further comprises: The processor obtains the encryption key based on the first account logged in by the second electronic device; The second electronic device obtains the migration recovery key based on the encryption key and the first ciphertext, specifically comprising: The security module encrypts the first ciphertext based on the third private key to obtain the fourth ciphertext; The processor decrypts the fourth ciphertext based on the encryption key to obtain the fifth ciphertext; The security module decrypts the fifth ciphertext based on the third private key to obtain the migration recovery key.
18. The method of claim 17, wherein, The security module encrypts the first ciphertext based on the third private key to obtain the fourth ciphertext, specifically comprising: The security module generates a third public key based on the third private key, and the third private key and the third public key are a pair of public and private keys; The security module encrypts the first ciphertext using the third public key to obtain the fourth ciphertext; The security module decrypts the fifth ciphertext using the third private key to obtain the migration recovery key, specifically comprising: The security module decrypts the fifth ciphertext using the third private key to obtain the migration recovery key.
19. The method of claim 18, wherein, Before the security module encrypts the first ciphertext based on the third private key to obtain the fourth ciphertext, the method further comprises: The security module randomly generates the third private key.
20. The method of any one of claims 17-19, wherein, The processor runs a rich execution environment (REE) and a trusted execution environment (TEE), the REE runs a wallet application, and the TEE runs a key management trusted application; The processor decrypts the fourth ciphertext based on the asset key to obtain the fifth ciphertext, specifically comprising: The wallet application sends a first asset identifier to the key management trusted application, and the first asset identifier is used to indicate the wallet application, or the first asset identifier is used to indicate the device type characteristics of the first NFC card; The key management trusted application generates a second private key based on the first asset identifier and the encryption key; The key management trusted application decrypts the fourth ciphertext using the second private key to obtain the fifth ciphertext.
21. The method according to any one of claims 17-20, characterized in that, The processor obtains the encryption key based on the first account logged in by the second electronic device, specifically comprising: The processor obtains the encryption key from a second server based on the first account, and the second server is used to store one or more keys of the first account, and the one or more keys include the encryption key.
22. The method of any one of claims 14-16, wherein, The method further comprises: The second electronic device generates the encryption key based on the account information of the first account.
23. The method of any one of claims 14-16, wherein, The method further comprises: The second electronic device obtains the encryption key from a third server based on the first sequence number of the first NFC card, the third server storing a correspondence between sequence numbers of one or more NFC cards and keys.
24. The method of claim 23, wherein, Before the second electronic device obtains the encryption key from the third server based on the first sequence number of the first NFC card, the method further comprises: The second electronic device displays prompt information for prompting a user to input the sequence number of the first NFC card. The second electronic device receives the first sequence number input by the user.
25. The method of claim 24, wherein, Before the second electronic device obtains the encryption key from the third server based on the first sequence number of the first NFC card, the method further comprises: The second electronic device obtains the first sequence number from the first server.
26. The method of any one of claims 14-25, wherein, After the second electronic device opens the first NFC card based on the card information of the first NFC card, the method further comprises: The second electronic device sends a first message to the first electronic device through the first server, the first message being used to instruct the first electronic device to delete a second DF of the first NFC card.
27. The method of any one of claims 14-25, wherein, The second electronic device opens the first NFC card based on the card information of the first NFC card, specifically comprising: The second electronic device generates a first DF, the first DF including the card information of the first NFC card, and the first DF being used to implement a card swiping service of the first NFC card.
28. An electronic device, comprising: Comprise: One or more processors, one or more memories, and a transceiver, wherein the transceiver, the one or more memories, and the one or more processors are coupled, and the one or more memories are configured to store a computer program, and when the one or more processors execute the computer program, the NFC card migration method according to any one of claims 1-13 is implemented.
29. An electronic device, comprising: Comprise: One or more processors, one or more memories, and a transceiver, wherein the transceiver, the one or more memories, and the one or more processors are coupled, and the one or more memories are configured to store a computer program, and when the one or more processors execute the computer program, the NFC card migration method according to any one of claims 14-27 is implemented.
30. A computer-readable storage medium, characterized in that, A computer program is stored, and when the computer program is executed by a processor, the NFC card migration method according to any one of claims 1-13 is implemented.
31. A computer readable storage medium, characterized in that, A computer program is stored, and when the computer program is executed by a processor, the NFC card migration method according to any one of claims 14-27 is implemented.
32. A computer program product, characterised in that, A computer program is included, and when the computer program is executed by a processor, the NFC card migration method according to any one of claims 1-13 is executed.
33. A computer program product, characterised in that, A computer program is included, and when the computer program is executed by a processor, the NFC card migration method according to any one of claims 14-27 is executed.
34. A chip system, characterized by comprising processing circuitry and interface circuitry for receiving code instructions and transferring to the processing circuitry, the processing circuitry for running the code instructions to perform the NFC card migration method of any one of claims 1-13.
35. A chip system, characterized by comprising processing circuitry and interface circuitry for receiving code instructions and transferring to the processing circuitry, the processing circuitry for running the code instructions to perform the NFC card migration method of any one of claims 14-27.
Citation Information
Patent Citations
Data migration method for analog card, mobile terminal and TSM (Trusted Service Manager) platform
CN105792181A
Data security backup and security recovery method and electronic device
CN110086609A
Data uploading method, data downloading method and related equipment
CN114026820A
Digital vehicle key processing method, sharing method and device, SIM card and vehicle
CN114697898A