NFC card migration method, system, and related apparatus
By combining encryption keys and migration recovery keys, secure and convenient migration of NFC cards between electronic devices is achieved, solving the problem of cumbersome NFC card migration operations in existing technologies and improving data security and server storage efficiency.
Patent Information
- Application Number
- PCT/CN2025/108772
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-12-17
- Filing Date
- 2025-07-16
- Publication Date
- 2026-01-22
AI Technical Summary
When replacing electronic devices, users need to reactivate multiple NFC emulator cards in the new electronic devices 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 using the encryption key to obtain the card information of the first NFC card, thus realizing the migration of the NFC card.
It simplifies the NFC card migration process, improves data security and ease of operation, reduces server storage requirements, and enhances the security of migration recovery keys.
Smart Images

Figure CN2025108772_22012026_PF_FP_ABST
Abstract
Description
An NFC card migration method, system and related device
[0001] This application claims priority to Chinese Patent Application No. 202410980429.5, filed on July 19, 2024, entitled "An NFC Card Migration Method, System and Related Apparatus", and to Chinese Patent Application No. 202411867800.3, filed on December 17, 2024, entitled "An NFC Card Migration Method, System and Related Apparatus", the entire contents of which are incorporated herein by reference. Technical Field
[0002] This application relates to the field of wireless communication technology, and in particular to an NFC card migration method, system and related device. Background Technology
[0003] With technological advancements, an increasing number of electronic devices support Near Field Communication (NFC) technology. Electronic devices can achieve short-range, two-way communication through NFC. Within NFC technology, NFC-enabled devices can operate in three modes when communicating via NFC: Proximity Coupling Device (PCD) mode (also known as reader mode), Proximity Integrated Circuit Card (PICC) mode (also known as card emulation mode), and Point-to-Point (P2P) mode.
[0004] Currently, some NFC-enabled electronic devices (such as mobile phones, tablets, and wearable devices) can emulate PICC. Users can activate one or more NFC emulated cards within the electronic device. When the device is in PICC mode, it can emulate a PICC compliant with NFC standards based on the data from the NFC emulated card and interact with NFC card readers. However, when a user changes electronic devices, they need to use a specific card writing device to activate multiple NFC emulated cards in the new device, which is cumbersome. Summary of the Invention
[0005] This application provides an NFC card migration method, system, and related apparatus, which enables the migration of NFC cards between electronic devices logged into the same account.
[0006] Firstly, this application provides an NFC card migration method applied to a first electronic device. The method includes: the first electronic device encrypting first data using a migration recovery key to obtain second data, the first data including card information of the first NFC card; the first electronic device encrypting a migration recovery key based on an encryption key to obtain first ciphertext; and the first electronic device sending third data to a first server, the third data including the second data and the first ciphertext, the third data being used by a second electronic device to activate 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 the migration of the first NFC card to other electronic devices. Since the first electronic device uses a migration recovery key to encrypt the first data, the security of the card information of the first NFC card can be protected. To protect the security of the migration recovery key, the first electronic device encrypts the migration recovery key based on an encryption key. Because other electronic devices can obtain the encryption key through other means, the first electronic device does not need to send the encryption key to other electronic devices; the first electronic device only sends the third data, including 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, making the card migration process more secure and reliable.
[0007] In some examples, the first electronic device obtains an encryption key based on a first account it has logged into. This allows other electronic devices logged into the first account to access the encryption key, process third-party data using the encryption key, obtain the card information of the first NFC card, and activate the first NFC card. The first electronic device can both ensure the security of the third-party data and allow electronic devices with the authority to transfer data to the first NFC card to obtain its card information.
[0008] In one possible implementation, the first electronic device encrypts the first data using a migration recovery key to obtain the second data. Specifically, this includes: the first electronic device receiving a first input indicating that the first NFC card has been migrated; 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, after receiving the user's input indicating that the first NFC card has been migrated, the first electronic device then sends the third data of the first NFC card to the first server, reducing the amount of data sent to the first server and saving storage space on the first server.
[0009] In one possible implementation, the first electronic device sends third data to the first server, specifically including: the first electronic device receiving a first request from the second electronic device via the first server, the first request being for transferring the first NFC card; the first electronic device responding to the first request sending third data to the first server; wherein, the first server is used to send the third data to the second electronic device. Thus, after receiving the first request from the second electronic device to transfer the first NFC card, the first electronic device then sends the third data of the first NFC card to the first server, enabling the first server to forward the third data of the first NFC card to the second electronic device.
[0010] In one possible implementation, the first electronic device includes a processor and a security module, with the processor connected to the security module. The method further includes: the processor obtaining an encryption key based on a first account logged into the first electronic device; the first electronic device encrypting a migration recovery key based on the encryption key to obtain a first ciphertext, specifically including: the security module encrypting the migration recovery key based on a first private key to obtain a second ciphertext; the processor encrypting the second ciphertext based on the encryption key to obtain a third ciphertext; and the security module decrypting the third ciphertext based on the first private key to obtain the first ciphertext. 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, thus enhancing the security of the migration recovery key. The first electronic device can also encrypt the migration recovery key using the encryption key, allowing electronic devices logged into the first account to decrypt it and obtain the migration recovery key.
[0011] In one possible implementation, the security module encrypts the migration recovery key based on a first private key to obtain a second ciphertext. Specifically, this includes: the security module generating a first public key based on the first private key, where the first private key and the first public key form a public-private key pair; the security module using the first public key to encrypt the migration recovery key to obtain the second ciphertext; and the security module decrypting the third ciphertext based on the first private key to obtain the first ciphertext. This process allows the security module to generate the first private key and the first public key, protecting the security of the migration recovery key while facilitating the decryption of the third ciphertext using the first public key.
[0012] In one 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 includes: the security module randomly generating the first private key. This random generation of the first private key ensures that different keys are used in multiple encryption operations, thus protecting the security of the encrypted data.
[0013] In other examples, the security module pre-configures a first private key. This way, the security module uses the pre-configured first private key and does not need to generate a new key for each encryption attempt.
[0014] In one possible implementation, the processor runs a Rich Execution Environment (REE) and a Trusted Execution Environment (TEE). A wallet application runs in the REE, and a key management trusted application runs in the TEE. The processor encrypts a second ciphertext based on an encryption key to obtain a third ciphertext. Specifically, the wallet application sends a first asset identifier to the key management trusted application. The first asset identifier indicates either the wallet application or the device type characteristics 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 form a public-private key pair. The key management trusted application uses the second public key to encrypt the second ciphertext to obtain the third ciphertext. The second private key is then 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 applications and ensure the security of data between applications. The processor generates a second private key for the first NFC card, which can better protect the data of each NFC card.
[0015] In one possible implementation, the processor obtains an encryption key based on a first account logged in by a first electronic device. Specifically, the processor obtains the encryption key from a second server based on the first account logged in by the first electronic device. The second server stores one or more keys for the first account, including the encryption key. In this way, electronic devices logged in with the first account can obtain encryption keys from the second server, and other electronic devices logged in with the first account can also obtain encryption keys from the second server. Two electronic devices logged in with the first account can transmit data using the same encryption key without needing to negotiate and transmit encryption keys, thus ensuring data security.
[0016] In one possible implementation, the method further includes: the first electronic device generating an encryption key based on the account information of the first account. In this way, the electronic device logged into the first account can generate an encryption key based on the account information, allowing the second electronic device to decrypt data sent by the first electronic device without needing to transmit the encryption key itself.
[0017] In one possible implementation, the method further includes: a first electronic device obtaining an encryption key from a third server based on a first serial number of a first NFC card, the third server storing a mapping between serial numbers and keys of one or more NFC cards. In this way, the NFC cards and keys are mutually associated, allowing a user to obtain the encryption key on a second electronic device using the first serial number of the first NFC card.
[0018] In one possible implementation, the first electronic device sends third data to the first server, specifically by sending a first serial number to the first server. In this way, the second electronic device can obtain the first serial number from the first server when acquiring the third data.
[0019] In one possible implementation, 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 the third data to the first server, the method further includes: the first electronic device deleting the second DF of the first NFC card. Thus, after the first electronic device removes the first NFC card, it can delete the second DF of the first NFC card, ensuring the security of the first NFC card.
[0020] In some examples, after the first electronic device sends the third data to the first server, the method further includes: the first electronic device determining that the card type of the first NFC card is a first type, and deleting the second DF of the first NFC card. Thus, the first type of NFC card typically includes balance information. To avoid discrepancies in the balance information of the first NFC card, only one device among the electronic devices logged into the first account will have the first NFC card activated.
[0021] In one possible implementation, the first electronic device deleting the second DF of the first NFC card specifically includes: the first electronic device receiving a first message from the second electronic device via a first server, the first message instructing the first electronic device to delete the DF of the first NFC card; and deleting the second DF in response to the first message. In this way, the first electronic device can delete the first NFC card after the second electronic device has transferred the first NFC card, allowing the user to use the first NFC card through the first electronic device before other electronic devices transfer the first NFC card.
[0022] 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 displaying a migration control, which triggers the first electronic device to migrate the first NFC card. This allows the first electronic device to migrate the first NFC card again via the migration control after it has been migrated out. In some examples, the first data also includes one or more of the authentication key and device characteristic information.
[0023] Secondly, this application provides another NFC card migration method applied to a second electronic device. The method includes: the second electronic device obtaining third data from a first server, the third data including 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 the first data, the first data including card information of the first NFC card; and the second electronic device activating the first NFC card based on the card information. In this way, the second electronic device can obtain the third data of the first NFC card from the first server, enabling the second electronic device to activate the first NFC card and realizing the function of migrating the first NFC card from the first electronic device. This eliminates the need for the user to reactivate the first NFC card on the second electronic device, making the operation simpler. To protect the security of the migration recovery key, the first electronic device encrypts the migration recovery key based on the encryption key, and the first electronic device does not send the encryption key to the first server, so the first server cannot decrypt it to obtain the card information of the first NFC card. Although the second electronic device cannot obtain the encryption key from the first server, it can obtain the encryption key through other means, making the card migration process more secure and reliable.
[0024] In some examples, the first electronic device obtains an encryption key based on a first account it has logged into. This allows other electronic devices logged into the first account to access the encryption key, process third-party data using the encryption key, obtain the card information of the first NFC card, and activate the first NFC card. The first electronic device can both ensure the security of the third-party data and allow electronic devices with the authority to transfer data to the first NFC card to obtain its card information.
[0025] In one possible implementation, the second electronic device obtains third data from the first server, specifically including: the second electronic device receiving a second input to transfer the first NFC card; and the second electronic device, in response to the second input, obtaining the third data from the first server. Thus, after receiving input from the user to transfer the first NFC card, the second electronic device transfers the first NFC card to the first electronic device via the first server, and the user can select the NFC card they wish to transfer.
[0026] In one possible implementation, the second electronic device obtains third data from the first server. Specifically, this includes: the second electronic device sending a first request to the first electronic device through the first server, the first request being used to obtain data from the first NFC card; and the second electronic device obtaining the third data from the first electronic device through 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.
[0027] In some examples, the second electronic device logs into the first account; the second electronic device obtains third data from the first server, specifically including: the second electronic device, based on the first account, obtains the third data of the first electronic device logged into the first account from the first server. Thus, since both the first and second electronic devices are logged into the first account, the second electronic device can obtain the third data from the first electronic device logged into the first account, used to activate the first NFC card, from the first server.
[0028] In one possible implementation, the second electronic device includes a processor and a security module, with the processor connected to the security module. The method further includes: the processor obtaining an encryption key based on a first account logged into by the second electronic device; the second electronic device obtaining a migration recovery key based on the encryption key and a first ciphertext, specifically including: the security module encrypting the first ciphertext using a third private key to obtain a fourth ciphertext; the processor decrypting the fourth ciphertext using the encryption key to obtain a fifth ciphertext; and the security module decrypting the fifth ciphertext using 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 from the first account, enabling all electronic devices logged into the first account to transmit data based on the encryption key, thus ensuring the security of the NFC card data.
[0029] In one possible implementation, the security module encrypts the first ciphertext based on a third private key to obtain the fourth ciphertext. Specifically, this involves: the security module generating a third public key based on the third private key, where the third private key and third public key form a public-private key pair; the security module using the third public key to encrypt the first ciphertext to obtain the fourth ciphertext; and the security module decrypting the fifth ciphertext based on the third private key to obtain the migration recovery key. This process ensures that even after decrypting the fourth ciphertext, the processor cannot obtain the plaintext migration recovery key, thus enhancing the security of the migration recovery key. After obtaining the fifth ciphertext, the security module can then use the third private key to obtain the migration recovery key.
[0030] In one possible implementation, before the security module encrypts the first ciphertext based on the third private key to obtain the 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, ensuring that the key used by the security module is different each time it performs an encryption operation, thus reducing the probability that the processor will obtain the third private key.
[0031] In one possible implementation, the processor runs a Rich Execution Environment (REE) and a Trusted Execution Environment (TEE). A wallet application runs in the REE, and a key management trusted application runs in the TEE. The processor decrypts the fourth ciphertext based on the asset key to obtain the fifth ciphertext. Specifically, the process includes: the wallet application sending a first asset identifier to the key management trusted application; the first asset identifier indicating the wallet application, or indicating the device type characteristics of the first NFC card; the key management trusted application generating a second private key based on the first asset identifier and an encryption key; and the key management trusted application using the second private key to decrypt the fourth ciphertext to obtain the fifth ciphertext.
[0032] In one possible implementation, the processor obtains an encryption key based on the first account logged in by the second electronic device. Specifically, the processor obtains the encryption key from a second server based on the first account. The second server stores one or more keys for the first account, including the encryption key. In this way, the second electronic device can obtain the encryption key based on the logged-in first account, enabling multiple electronic devices logged into the first account to securely transfer NFC cards using the encryption key.
[0033] In one possible implementation, the method further includes: the second electronic device generating an encryption key based on the account information of the first account. In this way, both the second and first electronic devices are logged into the first account, and the second electronic device can use this key to decrypt data sent by the first electronic device.
[0034] In one possible implementation, the method further includes: a second electronic device obtaining an encryption key from a third server based on the first serial number of the first NFC card, wherein the third server stores a correspondence between the serial numbers and keys of one or more NFC cards. In this way, the second electronic device can obtain the encryption key based on the first serial number of the first NFC card.
[0035] In one 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 displaying a prompt message asking the user to enter the serial number of the first NFC card; and the second electronic device receiving the first serial number entered by the user. In this way, the second electronic device can receive the first serial number entered by the user and obtain the encryption key accordingly.
[0036] In one 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 obtaining 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 view the first serial number on the first electronic device, facilitating the user's operation of transferring the first NFC card.
[0037] In one possible implementation, after the second electronic device activates the first NFC based on the card information of the first NFC card, the method further includes: the second electronic device sending a first message to the first electronic device through a first server, the first message instructing the first electronic device to delete the second DF of the first NFC card. In this way, after the second electronic device has transferred the first NFC card, it can notify the first electronic device to delete the first NFC card, ensuring that the user can only use the first NFC card through the second electronic device, thus guaranteeing the security of the first NFC card.
[0038] In some examples, after the second electronic device generates a first dedicated file (DF) based on the card information of the first NFC card, the method further includes: the second electronic device determining that the card type of the first NFC card is a first type, and sending a first message to the first electronic device through a first server. The first message instructs the first electronic device to delete the second DF of the first NFC card. Thus, the second electronic device determines that the first NFC card includes balance information. When multiple electronic devices include the first NFC card, and multiple electronic devices are used by users, the balance information may become out of sync. To ensure that the balance information of the first NFC card is not confused, the second electronic device can notify the first electronic device to delete the first NFC card, ensuring that the user can only use the first NFC card through the second electronic device.
[0039] In one possible implementation, the second electronic device activates the first NFC card based on the card information of the first NFC card, specifically including: the second electronic device generating a first dedicated 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 service of the first NFC card.
[0040] In one possible implementation, the second electronic device logs into the first account. Before the second electronic device obtains the third data of the first electronic device from the first server, the method further includes: obtaining a designated identifier from the first server, the designated identifier including the identifier of an NFC card that has not been transferred out from the electronic device logged into the first account and the identifier of an NFC card that has been transferred out from the electronic device logged into the first account. The electronic device logged into the first account includes the first electronic device, and the designated identifier includes the identifier of the first NFC card. Based on the identifier of the first NFC card, a prompt message is displayed to inform the user that the second electronic device supports the transfer of the first NFC card. In this way, the designated identifier is used to indicate one or more NFC cards of the electronic device logged into the first account. The second electronic device logged into the first account can determine the NFC cards on other electronic devices logged into the first account through the designated identifier, and the second electronic device can transfer the NFC cards on the electronic device logged into the first account accordingly.
[0041] Understandably, the second electronic device, based on a specified identifier, displays a prompt message to the user indicating that the second electronic device supports the transfer of NFC cards other than the NFC card of the second electronic device from one or more NFC cards indicated by the specified identifier. In this way, the second electronic device can obtain the identifiers of all NFC cards and prompt the user to transfer the NFC card to the second electronic device.
[0042] In other examples, the specified identifier includes the identifier of one or more NFC cards that have been transferred out by the electronic device logged into the first account. This allows the second electronic device to prompt the user to transfer other NFC cards that have been transferred out by the first electronic device to the second electronic device.
[0043] In other examples, the identifiers include NFC cards transferred from electronic devices logged into the first account and NFC cards of type 2 that were not transferred from the same devices. Thus, since type 1 NFC cards include balance information, the electronic device logged into the first account can only prompt the user to transfer type 1 NFC cards that have been transferred from other electronic devices. Type 2 NFC cards do not include balance information and have a wide range of applications; regardless of whether other electronic devices have transferred type 2 NFC cards, the electronic device logged into the first account can prompt the user to transfer type 2 NFC cards to other electronic devices.
[0044] Thirdly, this application provides a near-field communication (NFC) card migration method applied to a first server. The method includes: receiving third data of a first NFC card sent by a first electronic device logged into a first account, the third data being used by the electronic device logged into the first account to migrate the first NFC card; receiving a first request to migrate the first NFC card sent by a second electronic device logged into the first account; and responding to the first request by sending the third data to the second electronic device. In this way, the first server can manage the NFC card data of multiple electronic devices, enabling electronic devices logged into the same account to easily migrate their NFC cards.
[0045] In one possible implementation, after receiving the third data of the first NFC card sent by the first electronic device logged into the first account, the method further includes: sending the identifier of the first NFC card to the second electronic device logged into the first account, the identifier of the first NFC card being used to indicate to the second electronic device that the first NFC card is allowed to be transferred in. In this way, the first server can notify the second electronic device logged into the first account to transfer out the data of the first NFC card, enabling the second electronic device to determine the NFC card that is allowed to be transferred in, thus facilitating the second electronic device to perform the operation of transferring in the first NFC card.
[0046] In one possible implementation, the method further includes: sending a designated identifier to the electronic device logged into the first account; wherein the designated identifier includes the identifier of an NFC card that has been transferred into the electronic device logged into the first account and the identifier of an NFC card that has been transferred out of the electronic device logged into the first account, or the designated identifier includes the identifier of an NFC card that has been transferred out of the electronic device logged into the first account, or the designated identifier includes the identifier of an NFC card that has been transferred out of the electronic device logged into the first account and the identifier of a second type of NFC card that has not been transferred out; the designated identifier is used by the electronic device logged into the first account to display a prompt message to the user prompting them to transfer an unactivated NFC card to the electronic device. In this way, the electronic device logged into the first account can synchronize the identifiers of activated NFC cards, and the user can transfer NFC cards between multiple electronic devices.
[0047] Fourthly, this application provides a method for migrating a near-field communication (NFC) card, applied to a communication system including a first electronic device and a second electronic device. The method includes: a first electronic device logged into 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 a 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 retrieving the third data from the first server based on the logged-in first account; the second electronic device obtaining a 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 activating the first NFC card based on the card information of the first NFC card. In this way, the first electronic device logged into the first account can migrate the first NFC card to the second electronic device logged into the first account, enabling electronic devices logged into the same account to quickly and conveniently migrate NFC cards using the above method, facilitating users to use the same NFC card on different electronic devices. Since the first electronic device does not send the encryption key to the first server, the first server cannot decrypt the third data to obtain the card information of the first NFC card, making the entire migration process more secure and reliable.
[0048] In one possible implementation, the method further includes: a first electronic device obtaining an encryption key based on a first account; and a second electronic device obtaining the encryption key based on the first account. In this way, both the first and second electronic devices can determine the encryption key based on the logged-in accounts, and the first electronic device can avoid sending the encryption key to the second electronic device, thus protecting the security of the encryption key.
[0049] In one possible implementation, the first electronic device encrypts the migration recovery key based on the encryption key to obtain the first ciphertext, specifically including: the security module of the first electronic device encrypts the migration recovery key based on the first private key to obtain the second ciphertext; the processor of the first electronic device encrypts the second ciphertext based on the encryption key to obtain the third ciphertext; the security module of the first electronic device decrypts the third ciphertext based on the first private key to obtain the first ciphertext, and the first ciphertext and the encryption key are used to obtain the migration recovery key.
[0050] In one possible implementation, the second electronic device obtains a migration recovery key based on the encryption key and the first ciphertext. Specifically, the security module of the second electronic device encrypts the first ciphertext based on the third private key to obtain the fourth ciphertext; the processor of the second electronic device decrypts the fourth ciphertext based on the encryption key to obtain the fifth ciphertext; and the security module of the second electronic device decrypts the fifth ciphertext based on the third private key to obtain the migration recovery key.
[0051] In one possible implementation, the first electronic device logged into the first account encrypts the first data using a migration recovery key to obtain the second data. Specifically, the first electronic device receives a first input from the first NFC card that has been migrated out; in response to the first input, the first electronic device encrypts the first data using the migration recovery key to obtain the second data.
[0052] In one 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 to transfer 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 from the second electronic device through the first server; and the first electronic device responding to the first request by sending the third data to the first server.
[0053] In one possible implementation, the processor of the first electronic device runs a Rich Execution Environment (REE) and a Trusted Execution Environment (TEE). A first wallet application runs in the REE, and a first key management trusted application runs in the TEE. The processor of the first electronic device encrypts a second ciphertext based on an encryption key to obtain a third ciphertext. Specifically, the first wallet application sends a first asset identifier to the first key management trusted application. The first asset identifier indicates the wallet application, or it indicates the device type characteristics 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 form a public-private key pair. The first key management trusted application uses the second public key to encrypt the second ciphertext to obtain the third ciphertext. The second private key is used to decrypt the third ciphertext to obtain the second ciphertext.
[0054] The processor of the second electronic device runs a Rich Execution Environment (REE) and a Trusted Execution Environment (TEE). A second wallet application runs in the REE, and a second key management trusted application runs in the TEE. The processor of the first electronic device decrypts the fourth ciphertext based on the asset key to obtain the fifth ciphertext. Specifically, the second wallet application sends a first asset identifier to the second key management trusted application. The first asset identifier is used to indicate the wallet application, or it is used to indicate the device type characteristics 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 uses the second private key to decrypt the fourth ciphertext to obtain the fifth ciphertext.
[0055] In one possible implementation, the method further includes: a first electronic device generating an encryption key based on the account information of the first account; and a second electronic device generating an encryption key based on the account information of the first account.
[0056] In one possible implementation, the method further includes: a first electronic device obtaining an encryption 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 keys of one or more NFC cards; and a second electronic device based on the first serial number of the first NFC card.
[0057] In one possible implementation, after the first electronic device sends the third data to the first server, the method further includes: the first electronic device deleting the second DF of the first NFC card.
[0058] In one possible implementation, after the first electronic device sends the third data to the first server, the method further includes: the first electronic device determining that the card type of the first NFC card is a first type, and deleting the second DF of the first NFC card.
[0059] In some examples, before the first electronic device sends the third data to the first server, the method further includes: the first electronic device moving into the radio frequency field of the NFC card reader, and the first electronic device successfully swiping a card on the NFC card reader; after the first electronic device sends the third data to the first server, the method further includes: the first electronic device moving into the radio frequency field of the NFC card reader, and the first electronic device failing to swipe a card on the NFC card reader.
[0060] In some examples, after the first electronic device sends third data to the first server, the method further includes: the first electronic device displaying a migration control, which triggers the first electronic device to migrate the first NFC card. Thus, after the first electronic device migrates out of the first NFC card, it can migrate back into the first NFC card via the migration control.
[0061] In some examples, the first electronic device displays a migration control to trigger the migration of the first NFC card. Specifically, the migration control is displayed before the second electronic device activates the first NFC based on the card information of the first NFC card. Thus, the first electronic device can migrate the first NFC card again via the migration control before migrating it out and after the second electronic device has migrated it in.
[0062] In some examples, the first NFC card is of type 1. This ensures that only one electronic device among those logging into the first account includes the first NFC card.
[0063] In one possible implementation, after the second electronic device activates the first NFC based on the card information of the first NFC card, the method further includes: the second electronic device sending 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; the first electronic device deleting the second DF of the first NFC card specifically includes: the first electronic device receiving the first message from the second electronic device through the first server; and deleting the second DF in response to the first message.
[0064] In some examples, the second electronic device sends a first message to the first electronic device through the first server, specifically including: the second electronic device determining that the card type of the first NFC card is a first type, and sending the first message to the first electronic device.
[0065] In other examples, the first electronic device deletes the second DF of the first NFC card, specifically including: the first electronic device receiving a first message from the second electronic device through a first server; in response to the first message, determining that the card type of the first NFC card is a first type, and deleting the second DF.
[0066] In some examples, after the first electronic device removes the second DF of the first NFC card, the method further includes: the first electronic device displaying a migration control.
[0067] Fifthly, this application provides a communication system, including: a first electronic device and a second electronic device; wherein the first electronic device is used to perform the near-field communication (NFC) card migration method in any possible implementation of the first aspect; and the second electronic device is used to perform the near-field communication (NFC) card migration method in any possible implementation of the second aspect.
[0068] Sixthly, this 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 includes: the first electronic device obtaining a migration recovery key from a third server based on a first serial number of the first NFC card; the third server storing a correspondence between serial numbers and migration recovery keys; the first electronic device encrypting first data using the migration recovery key to obtain second data, the first data including card information of the first NFC card; the first electronic device sending the second data to the first server; the second electronic device obtaining the second data from the first server; the second electronic device obtaining the migration recovery key from the third server based on the first serial number; the second electronic device decrypting the second data using the migration recovery key to obtain the first data; and the second electronic device activating the first NFC card based on the card information of the first NFC card. In this way, both the first and second electronic devices can obtain the migration recovery key from the third server, protecting the card information of the first NFC card. The first server only contains the third data and cannot obtain the migration recovery key or the card information of the first NFC card; only the electronic device logged into the first account can obtain the encryption key, making the migration process more secure and reliable.
[0069] In a seventh aspect, this application provides an electronic device including one or more processors, one or more memories, and a transceiver. The transceiver, the one or more memories, and the one or more memories are coupled to the one or more processors. The one or more memories are used to store a computer program, which, when executed by the one or more processors, performs the NFC card migration method described in the first aspect and any possible implementation thereof.
[0070] Eighthly, this application provides an electronic device including 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 together. The one or more memories are used to store a computer program, which, when executed by the one or more processors, performs the NFC card migration method described in the second aspect above and any possible implementation thereof.
[0071] Ninthly, this application provides a computer storage medium storing a computer program that, when executed by a processor, implements the NFC card migration method described in the first aspect and any possible implementation thereof.
[0072] In a tenth aspect, this application provides a computer storage medium storing a computer program that, when executed by a processor, implements the NFC card migration method in the second aspect and any possible implementation thereof.
[0073] In the eleventh aspect, this application provides a computer program product, including a computer program that, when executed by a processor, implements the NFC card migration method in the first aspect and any possible implementation thereof.
[0074] In a twelfth aspect, this application provides a computer program product, including a computer program that, when executed by a processor, implements the NFC card migration method in the second aspect and any possible implementation thereof.
[0075] In a thirteenth aspect, this application provides a chip system including a processing circuit and an interface circuit. The interface circuit is used to receive code instructions and transmit them to the processing circuit. The processing circuit is used to execute the code instructions to perform the NFC card migration method in the first aspect and any possible implementation thereof.
[0076] In a fourteenth aspect, this application provides a chip system including a processing circuit and an interface circuit. The interface circuit is used to receive code instructions and transmit them to the processing circuit, which is used to execute the code instructions to perform the NFC card migration method in the second aspect and any possible implementation thereof.
[0077] The beneficial effects of aspects four through fourteen and any of the possible implementations of aspects four through fourteen can be referred to the beneficial effects of aspects one and two, any of the possible implementations of aspects one and two, and will not be repeated here. Attached Figure Description
[0078] Figure 1 is a schematic diagram of the working principle of NFC provided in an embodiment of this application;
[0079] Figure 2 is a schematic diagram of a communication system 10 provided in an embodiment of this application;
[0080] Figure 3A is a schematic diagram of the structure of an electronic device provided in an embodiment of this application;
[0081] Figure 3B is a schematic diagram of an NFC protocol stack provided in an embodiment of this application;
[0082] Figure 3C is a schematic diagram of the file structure of an MF provided in an embodiment of this application;
[0083] Figure 3D is a schematic diagram of another MF file structure provided in an embodiment of this application;
[0084] Figures 4A-4I are schematic diagrams of a set of interfaces for transferring out the first NFC card provided in an embodiment of this application;
[0085] Figures 5A-5L are schematic diagrams of a set of interfaces for transferring in a first NFC card according to an embodiment of this application;
[0086] Figures 6A and 6B are schematic diagrams of the interface of a set of NFC migration cards provided in the embodiments of this application;
[0087] Figure 7 is a flowchart illustrating an NFC card migration method provided in an embodiment of this application;
[0088] Figure 8 is a flowchart illustrating another NFC card migration method provided in an embodiment of this application;
[0089] Figure 9 is a schematic diagram of the interface of a migration NFC card provided in an embodiment of this application;
[0090] Figure 10 is a flowchart illustrating another NFC card migration method provided in an embodiment of this application;
[0091] Figure 11 is a flowchart illustrating another NFC card migration method provided in an embodiment of this application;
[0092] Figure 12 is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application;
[0093] Figure 13 is a schematic diagram of the structure of a communication device provided in an embodiment of this application;
[0094] Figure 14 is a schematic diagram of another communication device provided in an embodiment of this application;
[0095] Figure 15 is a schematic diagram of another communication device provided in an embodiment of this application;
[0096] Figure 16 is a schematic diagram of another communication device provided in an embodiment of this application. Detailed Implementation
[0097] The technical solutions in the embodiments of this application will be clearly and thoroughly described below with reference to the accompanying drawings. In the description of the embodiments of this application, unless otherwise stated, " / " means "or," for example, A / B can mean A or B; the word "and / or" in the text is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Furthermore, in the description of the embodiments of this application, "multiple" refers to two or more than two.
[0098] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature, and in the description of the embodiments of this application, unless otherwise stated, "multiple" means two or more.
[0099] The working principle of NFC in the embodiments of this application is described below.
[0100] Figure 1 shows a schematic diagram of the working principle of NFC provided in an embodiment of this application.
[0101] As shown in Figure 1, the two parties communicating using NFC technology can include a proximity coupling device (PCD) (also known as an NFC card reader) and a proximity smart card (PICC). The PCD can achieve contactless communication with the PICC in close proximity. The PCD and PICC can allow near-field communication at specific data rates (e.g., 106 kbit / s, 212 kbit / s, 424 kbit / s, 847 kbit / s, etc.). Communication between the PCD and PICC can occur at close range, for example, within a range of approximately 2 to 4 centimeters.
[0102] The PCD (Polymer Capacitor) can generate high-frequency alternating current to produce a radio frequency (RF) field of a specified frequency (e.g., 13.56 MHz), and transmit data to the PICC (Peripherally Input Cell) via this RF field. When the PICC is near the PCD, it can sense the RF field emitted by the PCD. Upon entering the RF field, the PICC can obtain energy from the PCD's RF field through electromagnetic induction, and use this energy to generate electricity to drive the internal circuitry of the PICC, thus enabling data transmission from the PCD to the PICC. Alternatively, the PICC can also transmit data to the PCD by modulating the RF field with a load, achieving data transmission from the PICC to the PCD.
[0103] In this embodiment, the PICC can be a physical NFC tag card. Some NFC devices (e.g., mobile phones, tablets, smartwatches, and other electronic devices) can also simulate themselves as a PICC conforming to NFC standards through NFC card data (hereinafter referred to as NFC card data) to realize the functions of a PICC and communicate with the PCD. The NFC card data may include, but is not limited to, one or more of the following: PICC card information, external authentication keys (hereinafter referred to as authentication keys). It should be noted that in this embodiment, the NFC card in the NFC device can be called an NFC emulation card.
[0104] The NFC card reader can be any of the following types of devices: mobile phone, tablet computer, handheld computer, desktop computer, laptop computer, super mobile personal computer, netbook, cellular phone, personal digital assistant, as well as smart home devices such as smart screen and smart speaker, wearable devices such as smart bracelet, smart watch and smart glasses, extended reality devices such as augmented reality, virtual reality and mixed reality, vehicles, access control devices, smart door locks, card readers, payment terminals, ticket purchase and / or ticket verification terminals, bank service terminals, and document card reading devices.
[0105] NFC card readers can perform card-swiping verification processes based on PICC card information. The NFC card reader can send the card-swiping result to the PICC via NFC command interaction. The PICC card information may include, but is not limited to, one or more of the following: access control information, key information, transaction account information, electronic ticket information, and validity period information (used to indicate the card's validity period). Access control information may include one or more of the following: card number, key information may include one or more of the following: key code, transaction account information may include one or more of the following: transaction account identifier, remaining balance in the transaction account, etc., electronic ticket information may include one or more of the following: electronic ticket code, electronic ticket verification time, electronic ticket validity period, etc.
[0106] In some application scenarios, PICC stores card information and an external authentication key (referred to as the authentication key). When the PICC is brought close to the card-swiping area of an NFC card reader, the PICC can determine whether to send card information to the NFC card reader based on the stored authentication key and the authentication key stored in the NFC card reader. If the PICC determines that its stored authentication key matches the NFC card reader's stored authentication key, it will send the card information to the NFC card reader. The NFC card reader can then use the card information obtained from the PICC to complete the corresponding NFC service. In this way, the PICC can authenticate the NFC card reader using the authentication key, and the NFC card reader can use the PICC's card information to determine whether to complete the corresponding service. For example, when a PCD (Personal Access Control Device) is used as an access control device, the PCD can determine whether a user holding the PICC can pass through the access control device based on the PICC's card information. If a user loses their PICC, other personnel do not have the authentication key and cannot obtain the PICC's card information.
[0107] In some examples, the PICC can generate random numbers. An NFC reader can obtain these random numbers from the PICC. The NFC reader can encrypt the random numbers using an authentication key to obtain ciphertext. The NFC reader can then send the ciphertext to the PICC. The PICC can decrypt the ciphertext using its stored authentication key to obtain another random number. The PICC can send its card information to the NFC reader if it determines that the decrypted random number matches the generated random number. The NFC reader can then use the received PICC card information to perform the corresponding NFC services. It is understandable that the PICC can also choose not to send its card information to the NFC reader if it determines that the decrypted random number differs from the generated random number. In this way, the PICC can determine whether to send its card information to the NFC reader based on its stored authentication key and the authentication key stored by the NFC reader.
[0108] In some examples, the PICC can encrypt the random number and card information using an authentication key when it determines that the decrypted random number matches the generated random number, thus obtaining encrypted data. The PICC can then send the encrypted data to an NFC card reader. Upon receiving the encrypted data, the NFC card reader can decrypt it using the authentication key to obtain the card information. In this way, because the random numbers generated by the PICC are different, the encrypted data sent by the PICC to the NFC card reader will also be different, preventing other devices from obtaining the card information.
[0109] The following describes a communication system provided in an embodiment of this application.
[0110] Figure 2 shows a schematic diagram of a communication system 10 provided in an embodiment of this application.
[0111] As shown in Figure 2, 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.
[0112] 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.
[0113] 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.
[0114] 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.
[0115] 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.
[0116] In some examples, the communication system 10 may also include a server 700. The server 700 can be used to store a shared key. Multiple electronic devices logged into a primary account can encrypt data transmitted between them based on the shared key.
[0117] The following is a schematic diagram of the structure of an electronic device 100 provided in the embodiments of this application.
[0118] Figure 3A shows a schematic diagram of the structure of an electronic device 100 provided in an embodiment of this application.
[0119] As shown in Figure 3A, 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.
[0120] The NFC module 102 may include an NFC controller (not shown in Figure 3A), an NFC transceiver (not shown in Figure 3A), and an NFC memory (not shown in Figure 3A). The NFC controller may be connected to the processor 101, and may also be connected to the NFC transceiver and the NFC memory, respectively.
[0121] The NFC controller is primarily used for modulation and demodulation of contactless 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 transmit and receive NFC signals (e.g., 13.56MHz radio frequency signals), and may include an electromagnetic compatibility (EMC) filter circuit, a matching circuit, a receiving circuit, and an NFC antenna, where the NFC antenna may be a loop antenna, used to enable the proximity-based contactless communication capability of the NFC module 102. The NFC memory can be used to store data sent by the NFC module 102 to the NFC reader device, as well as data received from the NFC reader device. In some embodiments, the NFC memory can be a shared memory that can be used by the various components in the NFC module 102; for example, some data in the NFC memory can be accessed by the NFC controller, while other data can be accessed by the SE 103.
[0122] In other embodiments, the NFC memory may be a collection of multiple memories. For example, the NFC controller may include a first memory among these multiple memories. The first memory may include instructions or data that the NFC controller has used or reused. If the NFC controller needs to use the instruction or data again, it can directly retrieve it from the first memory, thus reducing the waiting time of the NFC controller. SE103 may include a second memory among these multiple memories. The second memory may include card information such as that of the NFC emulator based on the secure element. Thus, if SE103 needs to read the card information of the NFC emulator, it can read the card information of the NFC emulator from the second memory in SE103. SIM card 104 may include a third memory among these multiple memories. The third memory may include card information such as that of the NFC emulator based on the SIM card. Thus, if SIM card 104 needs to read the card information of the NFC emulator, it can read the card information of the NFC emulator from the third memory in SIM card 104.
[0123] In some embodiments, the NFC memory described above may also store routing information. In some embodiments, this routing information may be controlled or managed by the NFC controller, and may include a routing table consisting of a list of routing rules. Each routing rule contains an applet identifier (AID) and a destination; the destination is the location where the applet used to implement the business logic of the NFC emulator card runs. The destination may include an HCE application running in the processor 101 of the electronic device 100, or an SE 103 or SIM card 104 connected to the NFC controller.
[0124] The SE103 and NFC module 102 can be two separate chips. Alternatively, the SE103 and NFC module 102 can be packaged into a single chip.
[0125] Electronic device 100 can activate one or more NFC emulator cards in an application based on user input, thereby enabling electronic device 100 to support one or more NFC services. The specific business processing logic of the NFC emulator card in electronic device 100 is implemented by an applet. The applet can be stored and run in the corresponding hardware device or software module (e.g., HCE application, SIM card, SE, etc.) of the NFC emulator card.
[0126] The card emulation modes of electronic device 100 can be divided into hardware-based virtual card mode and software-based HCE mode. Among them,
[0127] 1. In hardware-based virtual card mode, electronic device 100 can provide the operating environment for the Applet corresponding to the NFC emulator card, as well as the storage and processing of the NFC emulator card's business data, through SE103 or SIM card 104. NFC module 102, as the front end of contactless communication, receives commands from the external PCD and forwards them to SE103 or SIM card 104. The Applet in SE103 or SIM card 104 then processes the commands and sends response data to the external PCD via NFC module 102. Users can activate one or more NFC emulator cards in a wallet application, which can write the Applets and card data of one or more NFC emulator cards into SE103. Alternatively, users can activate one or more NFC emulator cards in a SIM card application, which can write the Applets and card data of one or more NFC emulator cards into SIM card 104 for storage.
[0128] 2. In software-based HCE mode, the HCE application running in processor 101 can provide the operating environment for the Applet corresponding to the NFC emulator card, as well as the storage and processing of the NFC emulator card's business data. After receiving a command from an external PCD, 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 then send the response data to NFC module 102. NFC module 102 can then send the response data to the external PCD. Users can activate one or more NFC emulator cards in the HCE application. The HCE application can run one or more NFC emulator card Applets and store the NFC emulator card data on the local memory of electronic device 100 or on a cloud server.
[0129] 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. These common management functions may include file management, card activation, security management, service routing management, and other functions.
[0130] It should be noted that the hardware structure of the electronic device 200 can also be described in the structural diagram shown in Figure 3A, and will not be repeated here.
[0131] The following describes an NFC protocol stack provided in an embodiment of this application.
[0132] Figure 3B illustrates an NFC protocol stack provided in an embodiment of this application.
[0133] As shown in Figure 3B, the NFC protocol stack can include a physical layer, a radio frequency layer, an access layer, a transport layer, and an application layer.
[0134] The physical layer can be used to implement the physical characteristics of NFC technology communication.
[0135] The radio frequency (RF) layer can be used to implement RF specifications for NFC technology communication, such as data rate and RF signal frequency.
[0136] The access layer can be used to implement functions such as polling and device discovery, service result notification, card conflict management, transmission protocol negotiation, timeout and retransmission mechanism, PICC / PCD mode switching, and converged card selection.
[0137] The transport layer includes a high-speed data transmission protocol, which enables data transmission between the PCD and PICC at the application layer.
[0138] 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.
[0139] 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.
[0140] 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.
[0141] For example, as shown in Figure 3C, the NFC analog cards activated on electronic device 100 may include access cards for community A, access cards for community B, Shenzhen Tong transportation cards, and home door lock key cards. The MF directory may store key EF1, Applet identity public key EF, Applet identity private key EF, mapping table EF, DF1, DF2, DF3, and DF4. Among them:
[0142] 1. Key EF1 may include a master key and a maintenance key. The master key in key EF1 can be used for encryption and decryption during data updates. The maintenance key in key EF1 can be used for encryption and decryption during data updates in the Applet identity public key EF, Applet identity private key EF, and mapping table EF.
[0143] 2. The Applet Identity Private Key (EF) can be used to store the identity private key used by one or more Applets.
[0144] 3. The Applet identity public key EF can be used to store the identity public key used by one or more Applets.
[0145] 4. The mapping list EF can be used to indicate the mapping relationship between device feature information and the identifier of DF. The device feature information can be used to identify the NFC card reader. After receiving the device feature information sent by the NFC card reader, the electronic device 100 can determine the NFC analog card corresponding to the NFC card reader from one or more NFC analog cards using the device feature information. For example, device feature information 1 corresponds to DF1, and DF1 can be used to store the access card data for community A. Device feature information 2 corresponds to DF2, and DF2 can be used to store the access card data for community B. Device feature information 3 corresponds to DF3, and DF3 can be used to store the data for the Shenzhen Tong transportation card. Device feature information 4 corresponds to DF4, and DF4 can be used to store the data for the home door lock key card.
[0146] 5. DF1 stores key EF11, device characteristic information EF12, file permission list EF13, and X card information EFs. X is a positive integer. Key EF11 may include one or more of the following: master control key, maintenance key, X authentication keys, migration recovery key, etc. The master control key in key EF11 can be used for encryption and decryption when the data in key EF11 is updated. The maintenance key in key EF11 can be used for encryption and decryption when the device characteristic information EF12, file permission list EF13, and X card information EFs in DF1 are updated. The X authentication keys in DF1 correspond to the X card information EFs in DF1, with one authentication key corresponding to one card information EF. Different card information EFs in DF1 may correspond to the same or different authentication keys. For example, DF1 may include card information EF storing card information 1 and card information EF storing card information 2. Card information 1 can be used to open the access control of building 1 in community A, and card information 2 can be used to open the access control of building 2 in community A. The migration recovery key can be used by electronic device 100 to migrate (or transfer) the NFC card corresponding to DF1 to other electronic devices under the same account. Device characteristic information EF12 can be used to store device characteristic information corresponding to DF1. File permission list EF13 can be used to indicate read and write permissions for X card information EF in DF1.
[0147] 6. DF2 stores key EF21, device feature information EF22, file permission list EF23, and Y card information EFs. Y is a positive integer. Key EF21 may include one or more of the following: master control key, maintenance key, Y authentication keys, migration recovery key, etc. The master control key in key EF21 can be used for encryption and decryption when the data in key EF21 is updated. The maintenance key in key EF21 can be used for encryption and decryption when the device feature information EF22, file permission list EF23, and Y card information EFs in DF2 are updated. The Y authentication keys in DF2 correspond to the Y card information EFs in DF2, with one authentication key corresponding to one card information EF. Different card information EFs in DF2 may have the same or different authentication keys. For example, DF2 may include card information EF storing card information 3, where card information 3 can be used to open all access control systems within cell B. The migration recovery key can be used by electronic device 100 to migrate (or transfer) the NFC card corresponding to DF1 to other electronic devices with the same account. Device characteristic information EF22 can be used to store the device characteristic information corresponding to DF2. File permission list EF23 can be used to indicate the read and write permissions of the Y card information EF in DF2.
[0148] 7. DF3 stores key EF31, device feature information EF32, file permission list EF33, and L card information EFs. L is a positive integer. Key EF31 may include one or more of the following: master control key, maintenance key, L authentication keys, migration recovery key, etc. The master control key in key EF31 can be used for encryption and decryption when the data in key EF31 is updated. The maintenance key in key EF31 can be used for encryption and decryption when the device feature information EF32, file permission list EF33, and L card information EFs in DF3 are updated. The L authentication keys in DF3 correspond to the L card information EFs in DF3, with one authentication key corresponding to one card information EF. Different card information EFs in DF3 may have the same or different authentication keys. For example, DF3 may include card information EF storing card information 4, which can be used for public transportation payments within Shenzhen. The migration recovery key can be used by electronic device 100 to migrate (or transfer) the NFC card corresponding to DF1 to other electronic devices with the same account. Device feature information EF32 can be used to store device feature information corresponding to DF3. The file permission list EF33 can be used to indicate the read and write permissions for L card information EFs in DF3.
[0149] 8. DF4 stores key EF41, device feature information EF42, file permission list EF43, and M card information EFs. M is a positive integer. Key EF41 may include one or more of the following: master control key, maintenance key, M authentication keys, migration recovery key, etc. The master control key in key EF41 can be used for encryption and decryption when the data in key EF41 is updated. The maintenance key in key EF41 can be used for encryption and decryption when the device feature information EF42, file permission list EF43, and M card information EFs in DF4 are updated. The M authentication keys in DF4 correspond to the M card information EFs in DF4, with one authentication key corresponding to one card information EF. Different card information EFs in DF4 may have the same or different authentication keys. For example, DF4 may include card information EF storing card information 5, which can be used to unlock a door lock. The migration recovery key can be used by electronic device 100 to migrate (or transfer) the NFC card corresponding to DF1 to other electronic devices under the same account. Device feature information EF42 can be used to store device feature information corresponding to DF4. File permission list EF43 can be used to indicate the read and write permissions of M card information EFs in DF4.
[0150] The example shown in Figure 3C above is only for explaining this application and should not be construed as limiting this application.
[0151] In other examples, the service processing logic of the NFC emulator card in electronic device 100 is specifically implemented by an applet. The applet can be stored and run in the hardware device or software module corresponding to the NFC emulator card (e.g., NFC module 102, HCE application, SIM card, SE, etc.). Since one or more NFC emulator cards are activated on electronic device 100, there can be one or more applets on electronic device 100. Specifically, one applet corresponds to one NFC emulator card.
[0152] Each applet corresponds to a master file (MF), and different applets correspond to different MFs. Therefore, upon identifying the first applet, the NFC module 102 can obtain the MF of the first applet. If the MF of the first applet includes a dedicated file (DF), then that DF is the first DF corresponding to the first NFC emulator. If the MF of the first applet includes multiple DFs, then the MF of the first applet may also include a first mapping table, wherein the first mapping table is used to indicate the mapping relationship between device feature information in the MF of the first applet and the identifier of the dedicated file (DF). The first applet can determine the first DF corresponding to the first NFC emulator based on the device feature information of the NFC reader and the first mapping table.
[0153] The electronic device 100 can store data from one or more NFC emulator cards via a file tree. The data from the NFC emulator card can include device characteristic information, keys, and permission information associated with the NFC emulator card. The file tree can include a master file (MF), a dedicated file (DF), and an elementary file (EF). The MF directory can contain one or more EFs and one or more DFs, and each DF directory can 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) for storing card information (e.g., a DF can support storing up to 8 card information entries, each with a data length of 4 bytes) and one or more authentication keys corresponding to card information entries (EF). The authentication keys corresponding to different card information entries (EF) within the same DF can be the same or different.
[0154] For example, the NFC-enabled analog cards activated on electronic device 100 can include access cards for community A, community B, a Shenzhen Tong transit card, and a home door lock key card. Since all access cards can correspond to the same Applet, the card information for community A and community B can be stored under different function keys (DFs) in MF1. The Shenzhen Tong transit card corresponds to another Applet; therefore, its card information can be stored in a DF in MF2, which includes the migration and recovery key for the Shenzhen Tong transit card. The home door lock key card corresponds to a separate Applet; therefore, its card information can be stored in a DF in MF3, which includes the migration and recovery key for the home door lock key card.
[0155] For example, as shown in Figure 3D, MF1 may include key EF1, Applet identity public key EF, Applet identity private key EF, mapping table EF, DF1 and DF2.
[0156] 1. Key EF1 may include a master key and a maintenance key. The master key in key EF1 can be used for encryption and decryption during data updates. The maintenance key in key EF1 can be used for encryption and decryption during data updates in the Applet identity public key EF, Applet identity private key EF, and mapping table EF.
[0157] 2. The Applet Identity Private Key (EF) can be used to store the identity private key used by one or more Applets.
[0158] 3. The Applet identity public key EF can be used to store the identity public key used by one or more Applets.
[0159] 4. The mapping list EF can be used to store the first mapping list mentioned above. The first mapping list indicates the mapping relationship between device feature information and DF identifiers. For example, device feature information 1 corresponds to DF1, and DF1 can be used to store the access card data for community A. Device feature information 2 corresponds to DF2, and DF2 can be used to store the access card data for community B.
[0160] 5. DF1 stores key EF11, device characteristic information EF12, file permission list EF13, and X card information EFs. X is a positive integer. Key EF11 may include a master control key, a maintenance key, X authentication keys, and a migration recovery key. The master control key in key EF11 can be used for encryption and decryption during data updates. The maintenance key in key EF11 can be used for encryption and decryption during data updates to device characteristic information EF12, file permission list EF13, and the X card information EFs in DF1. The X authentication keys in DF1 correspond to the X card information EFs in DF1, with one authentication key corresponding to one card information EF. Different card information EFs in DF1 may correspond to the same or different authentication keys. For example, DF1 may include card information EF storing card information 1 and card information EF storing card information 2. Card information 1 can be used to open the access control of Building 1 in Community A, and card information 2 can be used to open the access control of Building 2 in Community A. The migration recovery key can be used by electronic device 100 to migrate (or transfer) the NFC card corresponding to DF1 to other electronic devices under the same account. Device characteristic information EF12 can be used to store device characteristic information corresponding to DF1. File permission list EF13 can be used to indicate read and write permissions for X card information EF in DF1.
[0161] 6. DF2 stores key EF21, device feature information EF22, file permission list EF23, and Y card information EFs. Y is a positive integer. Key EF21 may include a master control key, a maintenance key, Y authentication keys, and a migration recovery key. The master control key in key EF21 can be used for encryption and decryption during data updates. The maintenance key in key EF21 can be used for encryption and decryption during data updates of device feature information EF22, file permission list EF23, and the Y card information EFs in DF2. The Y authentication keys in DF2 correspond to the Y card information EFs in DF2, with one authentication key corresponding to one card information EF. Different card information EFs in DF2 may have the same or different authentication keys. For example, DF2 may include card information EF storing card information 3, which can be used to open all access control systems within cell B. The migration recovery key can be used by electronic device 100 to migrate (or transfer) the NFC card corresponding to DF1 to other electronic devices with the same account. Device feature information EF22 can be used to store device feature information corresponding to DF2. File permission list EF23 can be used to indicate the read and write permissions of Y card information EF in DF2.
[0162] The example shown in Figure 3D above is only for explaining this application and should not be construed as limiting this application.
[0163] 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 Figure 3D after obtaining the device feature information of the NFC card reader from the NFC module 102 or the application. Then, the first Applet can determine the first DF corresponding to the first NFC analog card based on the device feature information of the NFC card reader and the first mapping list.
[0164] In one possible implementation, electronic devices 100 and 200 log into a first account. Electronic device 100 activates a first NFC card. Electronic device 100 can send migration data of the first NFC card to server 300. The migration data of the first NFC card may include, but is not limited to, card information of the first NFC card. Electronic device 200 can display a first control to trigger the migration of the first NFC card. After receiving user input to the first control, electronic device 200 can obtain the migration data of the first NFC card from server 300. Electronic device 200 can activate the first NFC card based on the migration data and display the card icon of the first NFC card, which indicates that electronic device 200 has activated the first NFC card. In this way, after logging into the first account, electronic device 200 can obtain NFC cards activated on other electronic devices logged into the first account, facilitating users to switch between different electronic devices and use already activated NFC cards.
[0165] In some examples, after receiving input from a user to transfer out a first NFC card, electronic device 100 can, in response to that input, send the transfer data of the first NFC card to server 300. In this way, electronic device 100 can receive user input and upload the selected NFC card to server 300, facilitating the transfer of the required NFC card to other devices logged into the first account.
[0166] The following section presents a set of interface diagrams provided in the embodiments of this application.
[0167] For example, as shown in Figure 4A, the electronic device 100 displays a desktop 401. The desktop 401 may include multiple 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 the wallet application interface, which can provide users with the function of managing (e.g., adding, deleting, etc.) simulated NFC cards. Optionally, a status bar 403 is also displayed above the desktop 401. The status bar 403 may include information such as an NFC indicator 403A, a communication signal strength indicator, battery level, and time. The NFC indicator 403A can be used to indicate that the electronic device 100 has its NFC function enabled. It should be noted that the wallet application is only an example; the electronic device 100 can also manage simulated NFC cards through other applications. For example, NFC applications, payment applications, simulated card management applications, etc., are not limited in this embodiment.
[0168] The following example, using a designated simulated card as an access control card, illustrates the steps for electronic device 100 to share a designated simulated card. If electronic device 100 with NFC enabled is placed by a user within the card-swiping area of access control device 600, and since access control device 600 is a PCD (Personalized Control Device), when electronic device 100 has NFC enabled and is in PICC mode, electronic device 100 can simulate the access control card stored in it. It is understood that using a designated simulated card as an access control card is merely an example and should not constitute a specific limitation on the designated simulated card.
[0169] After the electronic device 100 simulates an access card and is brought close to the card reader area of the access control device 600, it can trigger the access control device 600 to switch from a closed state to an open state, allowing the user holding the electronic device 100 to pass through the access control device 600. The electronic device 100 can also display an interface 405 as shown in Figure 4B. As shown in Figure 4B, the interface 405 includes a card icon 406, which indicates that the electronic device 100 is simulating an access card. Optionally, the interface 405 may also include a prompt message 407, which can be used to notify the user that the access control device 600 has been successfully opened using the electronic device 100.
[0170] Upon receiving input from a user onto the wallet application icon 402 shown in Figure 4A, the electronic device 100 responds to the input by displaying an interface 410 as shown in Figure 4C. As shown in Figure 4C, the 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, the one or more icons may include, but are not limited to, the 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.
[0171] Upon receiving input from a user regarding the "My Icon" 412B shown in Figure 4C, the electronic device 100 responds to this input by displaying an interface 410 as shown in Figure 4D. As shown in Figure 4D, the "My Icon" 412B is selected in the interface 410, and the display area 411 includes the content corresponding to the "My Icon" 412B. For example, the display area 411 includes an account option 421 and a wallet option 422. The account option 421 can be used to trigger the electronic device 100 to display an interface for setting account information (e.g., account information, avatar, nickname, password, phone number, etc.). The account option 421 may include, but is not limited to, one or more of the following: avatar thumbnail, nickname, and account information. Here, the account option 421 may represent the electronic device 100 logging into an account with the nickname "Alice" and account information "123******89". The wallet option 422 can be used to trigger the electronic device 100 to display an interface for managing NFC analog cards. Optionally, the card pack option 422 may also include information indicating the number of NFC analog cards activated by the electronic device 100, where the number of NFC analog cards activated by the electronic device 100 is 2.
[0172] Upon receiving input from a user regarding the card wallet option 422 shown in FIG. 4D, the electronic device 100, in response to the input, displays an interface 430 as shown in FIG. 4E. As shown in FIG. 4E, the interface 430 includes one or more card options. These one or more card options can be used to represent NFC emulated cards that the electronic device 100 has added or is about to add. For example, these one or more card options may include, but are not limited to, card option 431 and card option 432. Card option 431 may represent a transportation card that the electronic device 100 has already added, and card option 432 may represent an access control card that the electronic device 100 has already added.
[0173] Upon receiving input from a user regarding card option 432 shown in Figure 4E, electronic device 100 responds by displaying interface 440 as shown in Figure 4F. As shown in Figure 4F, 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 for managing access control cards. These 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 trigger electronic device 100 to simulate an access control card, allowing the user to use electronic device 100 to access access control device 600. The editing control can trigger electronic device 100 to display an interface for editing access control cards; for example, this interface can provide functions such as modifying the access control card name and the color of card icon 441. The "Set as Default Card" control can be used to set an access control card as the default card. After the access control card is set as the default card, when the 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.
[0174] Upon receiving input from a user onto the migration control 442 shown in Figure 4F, the electronic device 100 responds to the input by displaying the interface 450 shown in Figure 4G. As shown in Figure 4G, the interface 450 can be used to prompt the user that the electronic device 100 can transfer the NFC card. For example, the interface 450 may include a prompt message 451 and a confirmation control 452. The prompt message 451 can be used to prompt the user that the electronic device 100 can transfer the NFC card. The prompt message 451 may include, but is not limited to, one or more of the following: text-based prompts, animated prompts, image-based prompts, and voice-based prompts. For example, the 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 use on 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. The confirmation control 452 can be used to trigger the electronic device 100 to send the access card data to the server 300; details can be found in the following description.
[0175] Upon receiving user input to the confirmation control 452 shown in Figure 4G, the electronic device 100, in response to the input, displays an interface 460 as shown in Figure 4H. Interface 460 can be used to notify the user that the electronic device 100 has successfully transferred the access card. As shown in Figure 4H, interface 460 may include, but is not limited to, a prompt message 461. For example, prompt message 461 may be a text message such as "Transfer successful." Optionally, interface 460 may also include a completion control 462, which can be used to trigger the electronic device 100 to display interface 430 as shown in Figure 4E.
[0176] Optionally, after receiving input from the user onto the migration control 442 shown in FIG. 4F, the electronic device 100 may, in response to the input, display the interface 460 shown in FIG. 4H. Optionally, when displaying the interface 460 shown in FIG. 4H, the electronic device 100 may, in response to receiving input from the user to return to the previous page (e.g., input from sliding inward from the edge of the interface 460), display the interface 430 shown in FIG. 4E. Alternatively, the electronic device 100 may display the interface 430 shown in FIG. 4E when the duration of displaying the interface 460 shown in FIG. 4H reaches a preset display duration.
[0177] 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.
[0178] For example, electronic device 100 displays interface 430 as shown in FIG. 4E, which also includes a migration control 433. Upon receiving user input to the migration control 433 shown in FIG. 4E, electronic device 100 can, in response to the input, display interface 470 as shown in FIG. 4I. As shown in FIG. 4I, interface 470 may include, but is not limited to, a card list 471 and a confirmation control 473. The card list 471 may include one or more card options corresponding to NFC cards activated by electronic device 100. These card options include card option 471A and card option 471B. Here, card option 471A can be used to indicate an access card, and card option 471B can be used to indicate a transit card. Card options 471A and card option 471B are in a selected state. The confirmation control 473 can be used to send data of the NFC card corresponding to the selected card option to server 300. Optionally, the interface 470 may also include a select all control 472, which can be used to trigger the electronic device 100 to select all card options, or to deselect all card options. This allows users to quickly select multiple NFC card options and quickly identify the NFC cards that need to be migrated.
[0179] In other examples, electronic device 100 can receive user input to transfer all NFC cards on electronic device 100. For example, electronic device 100 can provide a function to trigger the transfer of all NFC cards on electronic device 100. This way, when a user changes electronic devices, all NFC cards can be transferred using this function.
[0180] After receiving input from the user regarding card option 471B, electronic device 100 can deselect card option 471B. Then, after receiving input from the user regarding confirmation control 473, electronic device 100, in response to that input, sends the data of the access card corresponding to card option 471A to server 300, and after sending the data to server 300, displays interface 460 as shown in Figure 4H.
[0181] In other examples, the wallet application of electronic device 100 provides migration controls and migration controls. The migration control can trigger electronic device 100 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, or to download NFC cards that have already been migrated from electronic devices logged into the first account from server 300. The migration control can trigger electronic device 100 to display a migration interface, which can be used to send data of NFC cards activated on electronic device 100 to server 300. Optionally, the migration control provided by the wallet application of electronic device 100 can be used to trigger electronic device 100 to display both migration controls. In this way, electronic device 100 can help users migrate one or more NFC cards through this interface, making the operation more convenient.
[0182] In other examples, upon receiving input from a user to transfer the first NFC card, the electronic device 100 can, in response to this input, send the transfer data of the first NFC card to the server 300 and delete the first NFC card from the electronic device 100. This ensures the security of the NFC card, guaranteeing that each NFC card can only be used on one device.
[0183] In one possible implementation, server 300 can notify electronic device 100 to delete the first NFC card when sending migration data of the first NFC card to electronic device 200. Alternatively, electronic device 200 can notify electronic device 100 to delete the first NFC card after successfully migrating it in. Electronic device 100 can delete the first NFC card after receiving the notification to delete it.
[0184] In other examples, electronic device 100 can delete the first NFC card after receiving a notification to delete it and determining that the card type of the first NFC card is a first type. Electronic device 100 can retain the first NFC card after receiving a notification to delete it and determining that the card type of the first NFC card is a second type. The description of the card type of the first NFC card can be found in subsequent embodiments. It is understood that after retaining the second type of first NFC card, electronic device 100 can delete the first NFC card after receiving input from the user to delete it. Thus, to facilitate the use of the second type of NFC card, electronic device 100 only deletes the first type of NFC card. Users tend to activate the first NFC card on multiple electronic devices; therefore, after electronic device 100 removes the first NFC card, it retains it, so that the user does not need to perform the operation of transferring the first NFC card onto electronic device 100.
[0185] In some examples, before removing the first NFC card, the electronic device 100 moves into the radio frequency field of the corresponding NFC card reader and successfully swipes the card on the NFC card reader. After removing the first NFC card and before deleting it, the electronic device 100 moves into the radio frequency field of the corresponding NFC card reader and successfully swipes the card on the NFC card reader. Thus, after removing the first NFC card, the user can still use the first NFC card through the electronic device 100. Optionally, after deleting the first NFC card, the electronic device 100 can display the first NFC card's import control.
[0186] In other examples, after the first NFC card is transferred out but before it is deleted, the electronic device 100 enters the radio frequency field of the corresponding NFC card reader, where swiping fails. In this way, the electronic device 100 can continue to store the data of the first NFC card after it is transferred out. If a user transfers the first NFC card into the electronic device 100, the transfer data of the first NFC card does not need to be obtained, but the user cannot use the first NFC card through the electronic device 100. Optionally, after the first NFC card is transferred out, the electronic device 100 can display a control for transferring the first NFC card into the device. It is understood that if the electronic device 100 receives user input to the transfer control before deleting the first NFC card, it can activate the first NFC card based on the stored data. If the electronic device 100 receives user input to the transfer control after deleting the first NFC card, it can obtain the transfer data of the first NFC card through the electronic device 200 or the server 300, and activate the first NFC card based on this transfer data.
[0187] In some examples, after the electronic device 100 removes the first NFC card (card type 2) but before deleting it, it enters the radio frequency field of the corresponding NFC card reader and successfully swipes the card on that NFC card reader. Conversely, after removing the first NFC card (card type 1) but before deleting it, it enters the radio frequency field of the corresponding NFC card reader and fails to swipe the card on that NFC card reader. In this way, the electronic device 100 can retain the card-swiping function of the first NFC card (card type 2).
[0188] It is understandable that after the electronic device 100 removes the first NFC card, it moves into the radio frequency field of the corresponding NFC card reader, and the card swiping fails on the NFC card reader.
[0189] In another possible implementation, the first NFC card can be deleted after the electronic device 100 removes it.
[0190] In some examples, electronic devices logged into the first account can display the first NFC card's migration control even before the first NFC card has been migrated. This allows all electronic devices logged into the first account to migrate the first NFC card.
[0191] In other examples, when electronic device 100 removes the first NFC card and other electronic devices logged into the first account have not yet transferred in the first NFC card, electronic device 100 can display a transfer-in control for the first NFC card. This transfer-in control can be used to trigger electronic device 100 to transfer in the first NFC card. After electronic device 200 successfully transfers in the first NFC card, electronic device 200 can notify electronic device 100 to de-display the transfer-in control for the first NFC card. Electronic device 100 can de-display the transfer-in control for the first NFC card after receiving the notification from electronic device 200. In this way, electronic device 200 has already transferred in the first NFC card, and electronic device 100 can no longer transfer in the first NFC card. It is understandable that when electronic device 200 removes the first NFC card, both electronic devices 100 and 200 can display the transfer-in control for the first NFC card.
[0192] In some examples, after electronic device 100 removes the first NFC card of the first type, it can delete the first NFC card. When electronic device 100 removes the first NFC card of the first type and other electronic devices logged into the first account have not yet transferred the first NFC card, electronic device 100 can display a transfer control for the first NFC card, which can be used to trigger electronic device 100 to transfer the first NFC card. When electronic device 200 successfully transfers the first NFC card of the first type, electronic device 200 can notify electronic device 100 to cancel the display of the transfer control for the first NFC card. In this way, only one device among the electronic devices logged into the first account and server 300 can store the data of the first NFC card of the first type. Since the first NFC card is related to the user's assets, the security of the first NFC card can be guaranteed. It is understood that when electronic device 200 removes the first NFC card and other electronic devices have not yet transferred the first NFC card, both electronic device 100 and electronic device 200 can display the transfer control for the first NFC card.
[0193] In some examples, after electronic device 100 transfers out the second type of first NFC card, the first NFC card can be deleted / retained. When electronic device 200 successfully transfers in the second type of first NFC card, electronic devices logged into the first account that have not yet transferred in the first NFC card can display the transfer control for the first NFC card. Thus, because the second type of first NFC card has many application scenarios, users can transfer the first NFC card to multiple electronic devices, allowing users to perform NFC card swiping transactions using the second type of NFC card across multiple electronic devices.
[0194] The following is a schematic diagram of the interface of the electronic device 200 provided in the embodiments of this application.
[0195] For example, as shown in Figure 5A, 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 an NFC indicator 503A, a communication signal strength indicator, battery level, time, and other information. The NFC indicator 503A can be used to indicate that the electronic device 100 has its NFC function enabled. For specific details, please refer to the embodiment shown in Figure 4A, which will not be repeated here.
[0196] 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, since the electronic device 200 has not activated any access control card for use with the access control device 600, the card swipe fails, and the access control device 600 remains closed. Since the electronic device 200 has not activated any NFC emulated card, it can display the interface 510 shown in Figure 5B. As shown in Figure 5B, the interface 510 includes an icon 511, which can be used to prompt the user to add an access control card. Optionally, the icon 511 may also include an add control, which can be used to trigger the electronic device 200 to display an interface for adding an access control card.
[0197] Upon receiving input from a user onto the wallet application icon 502 shown in Figure 5A, the electronic device 200 responds to the input by displaying an interface 520 as shown in Figure 5C. As shown in Figure 5C, the interface 520 can display the registration / login methods supported by the wallet application. The interface 520 may include an input field 521, controls 522 and 523. The input field 521 can be used to input the mobile phone number of the account used to log in to the wallet application. Here, the input field 521 includes the account name of the first account: "123******89". The control 522 can be used to trigger the electronic device 200 to log in to the wallet application using the mobile phone number in the input field 521. The control 523 can be used to trigger the electronic device 200 to display an interface for logging in to the wallet application using an account password. Optionally, the interface 520 may also include controls for triggering the 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".
[0198] Upon receiving user input to control 522 as shown in Figure 5C, electronic device 200 can respond to the input by displaying interface 530 as shown in Figure 5D. As shown in Figure 5D, interface 530 can be used to log in to a wallet application using 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 input 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.
[0199] After receiving the verification code in the input field 531 of the electronic device 200, the user inputs to the login control 532 shown in Figure 5D. The electronic device 200 can respond to this input and display the interface 540 shown in Figure 5E. As shown in Figure 5E, the 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 display content corresponding to the homepage icon 542A. For details, please refer to the embodiment shown in Figure 4C, which will not be repeated here.
[0200] It should be noted that if the electronic device 200 has already logged into the wallet application before displaying the desktop 501 as shown in Figure 5A, the electronic device 200 can respond to the user's input to the wallet application icon 502 and display the interface 540 as shown in Figure 5E.
[0201] Upon receiving input from a user regarding the "My Icon" 542B shown in Figure 5E, the electronic device 100 responds by displaying an interface 540 as shown in Figure 5F. As shown in Figure 5F, the "My Icon" 542B is selected in the interface 540, and the display area 541 includes the content corresponding to the "My Icon" 542B. For example, the display area 541 includes an account option 545 and a wallet option 546. The account option 545 can trigger the electronic device 100 to display an interface for setting account information. The account option 545 may include, but is not limited to, one or more of the following: a thumbnail avatar, a username, and account information. Here, the account option 545 may represent the electronic device 100 logging into an account with the username "Alice" and account information "123******89". The wallet option 546 can trigger the electronic device 100 to display an interface for managing NFC emulator cards. Optionally, the wallet option 546 may also include information indicating the number of NFC emulator cards activated by the electronic device 100; here, the number of NFC emulator cards activated by the electronic device 100 is 0.
[0202] Upon receiving input from a user regarding the card wallet option 546 shown in Figure 5F, the electronic device 200, in response to the input, displays an interface 550 as shown in Figure 5G. As shown in Figure 5G, the interface 550 includes one or more card options. These card options can represent NFC emulated cards that the electronic device 200 has added or is about to add. For example, these card options may include, but are not limited to, card options 551 and 552. Card option 551 can represent a transit card to be transferred to the electronic device 200, and card option 552 can represent an access card to be transferred to the electronic device 200. Card option 551 may include a control 553, which can be used to trigger the electronic device 200 to transfer the transit card indicated by card option 551. Card option 552 may include a control 554, which can be used to trigger the electronic device 200 to transfer the access card indicated by card option 552.
[0203] It should be noted that the electronic device logged into the first account can send the device feature information of the activated NFC card to the server 300. The server 300 can synchronize the NFC card device feature information to all electronic devices logged into the first account. Based on the NFC card device feature information synchronized by the server 300, the electronic device logged into the first account can display card options for NFC cards that have not yet been migrated (e.g., the first NFC card). These card options can be used by electronic devices logged into the first account that have not yet migrated the NFC card to migrate the NFC card. In this way, the electronic device logged into the first account and the server can indicate the activated NFC card through the device feature information, making it easier for each electronic device to determine the displayed card options.
[0204] In some examples, an electronic device logged into the first account can send the identifier of the activated NFC card (e.g., the NFC card name, the number assigned to the NFC card by electronic device 100 or server 300, etc.) to server 300. Server 300 can then synchronize the NFC card identifier to all electronic devices logged into the first account. Based on the NFC card identifier synchronized by server 300, the electronic devices logged into the first account can display card options for un-migrated NFC cards (e.g., the first NFC card). These card options can be used by electronic devices logged into the first account that have the un-migrated NFC card to migrate the NFC card. In this way, each electronic device logged into the first account can display card options for un-migrated NFC cards under the first account, facilitating the migration of NFC cards between different devices.
[0205] 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.
[0206] 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.
[0207] 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.
[0208] Upon receiving input from a user onto the control 554 shown in Figure 5G, the electronic device 200 can respond to the input by displaying an interface 560 as shown in Figure 5H. As shown in Figure 5H, the interface 560 includes a prompt message 561, which can be used to inform the user that the electronic device 200 is transferring an access control card. For example, the prompt message 561 may include a text message such as: "Transferring access control card, please wait...". Optionally, the interface 560 may also include a progress bar, which can be used to indicate the progress of the electronic device 200 transferring the access control card.
[0209] It is understandable that after receiving input from the user to the control 554 shown in Figure 5G, the electronic device 200 can respond to the input by displaying the interface 560 shown in Figure 5H, and obtain the access card migration data from the server 300. Based on the obtained access card migration data, the electronic device 200 can activate the access card and realize the migration of the access card.
[0210] Electronic device 200 displays interface 560 as shown in Figure 5H. After successfully transferring the access control card, electronic device 200 can display interface 570 as shown in Figure 5I. As shown in Figure 5I, interface 570 can be used to notify the user that electronic device 200 has successfully transferred the access control card. As shown in Figure 5I, interface 570 can include a prompt message 571. For example, prompt message 571 can include a text prompt message: "Transfer successful".
[0211] Optionally, the interface 570 may 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 Figure 5J, or to display the interface 550 shown in Figure 5K.
[0212] Electronic device 200 displays interface 560 as shown in FIG. 5H. Upon receiving user input to completion control 572 shown in FIG. 5H, electronic device 200, in response to the input, displays interface 580 as shown in FIG. 5J. For example, as shown in FIG. 5J, interface 580 includes a card icon 581. The card icon 581 can be used to indicate that electronic device 200 has successfully transferred an access control card. Optionally, interface 550 may also include one or more functional controls; for specific examples, please refer to the embodiment shown in FIG. 4F, which will not be repeated here.
[0213] Electronic device 200 displays interface 580 as shown in Figure 5J. Upon receiving input from a user to return to the previous page (e.g., an input sliding inward from the edge of interface 580 shown in Figure 5J), electronic device 200 responds to this input by displaying interface 550 as shown in Figure 5K. As shown in Figure 5K, card option 552 can represent an access card that electronic device 200 has already installed. Card option 552 can include control 555, which can be used to trigger electronic device 200 to simulate the access card indicated by card option 552.
[0214] Optionally, when displaying interface 570 as shown in FIG. 5I, electronic device 200 may, upon receiving input from the user to return to the previous page (e.g., input sliding inward from the edge of interface 570 shown in FIG. 5I), respond to the input by displaying interface 580 as shown in FIG. 5J or interface 550 as shown in FIG. 5K. Alternatively, electronic device 100 may display interface 580 as shown in FIG. 5J or interface 550 as shown in FIG. 5K when the duration of displaying interface 570 as shown in FIG. 5I reaches a preset display duration.
[0215] Optionally, the electronic device 200 displays interface 560 as shown in Figure 5H. After the electronic device 200 successfully activates the access control card, it can display interface 580 as shown in Figure 5J, or interface 550 as shown in Figure 5K.
[0216] After the access control card is transferred to the electronic device 200, when the NFC-enabled electronic device 200 comes into contact with the card reader area of the access control device 600, the electronic device 200 can display the interface 590 shown in Figure 5L, and the access control device 600 can switch from a closed state to an open state, allowing the holder of the electronic device 200 to access the access control device 600. For example, as shown in Figure 5L, the interface 590 includes a card icon 591, which indicates that the electronic device 200 is simulating an access control card. Optionally, the interface 590 may also include a prompt message 592, which can be used to notify the user that the access control device 600 has been successfully opened using the electronic device 200.
[0217] In this way, the electronic device 200 logged into the first account can transfer the NFC card of other electronic devices logged into the first account through the server 300, and the electronic device 200 can activate the NFC card without going through the server 400 / PICC500.
[0218] In other examples, electronic device 100 can notify server 300 of the card type of the first NFC card when sending migration data of the first NFC card to server 300. NFC cards can be categorized into first-type NFC cards (e.g., bank cards, transportation cards, etc.) and second-type NFC cards (e.g., access cards, car keys, door keys, etc.). When the first NFC card is a first-type NFC card, server 300 can notify electronic device 100 to delete the first NFC card when sending its data to electronic device 200. After deleting the first NFC card, electronic device 100 can display a second control that can trigger the activation of the first NFC card. Thus, since the first-type NFC card is associated with the user's assets, the above steps ensure that the user can only use the first-type NFC card on one device, better protecting the security of the first-type NFC card.
[0219] For example, after receiving input indicating that the transit card corresponding to card option 431 shown in FIG4E is being transferred out, electronic device 100 can send the transit card transfer data to server 300. Specifically, the description of electronic device 100 transferring out a transit card can be found in the description of electronic device 100 transferring out an access control card (e.g., the embodiments shown in FIG4F-FIG4I), which will not be repeated here. After transferring out the transit card, electronic device 100 can display interface 430 as shown in FIG6A. As shown in FIG6A, interface 430 includes control 611, which can be used by electronic device 100 to transfer in the transit card indicated by card option 431.
[0220] Electronic device 200 displays interface 550 as shown in Figure 5K. After receiving user input to control 553, electronic device 200 can obtain the transit card migration data indicated by card option 551 from server 300, and migrate the transit card based on the obtained migration data. Specifically, a description of electronic device 200 migrating a transit card can be found in the description of electronic device 200 migrating an access control card (e.g., the embodiments shown in Figures 5G-5K), which will not be repeated here. After migrating the transit card, electronic device 200 can display interface 550 as shown in Figure 6B. As shown in Figure 6B, interface 550 includes card option 551 indicating that electronic device 200 has migrated a transit card. Optionally, card option 551 may also include control 612, which can be used to trigger electronic device 200 to display an interface for recharging the transit card.
[0221] In one possible implementation, electronic device 200 logs into a first account. Before migrating the first NFC card from electronic device 100 to electronic device 200, electronic device 200 can obtain a specified identifier from server 300. The specified identifier includes the identifiers of NFC cards that have not been migrated out of the electronic device logged into the first account, as well as the identifiers of NFC cards that have been migrated out of the electronic device logged into the first account. Electronic devices logged into the first account include electronic device 100 and electronic device 200. Based on the specified identifier, electronic device 200 can display a prompt message to the user indicating that electronic device 200 supports migrating into NFC cards indicated by the specified identifier. In this way, the specified identifier is used to indicate one or more NFC cards of the electronic device logged into the first account. Electronic device 200 logged into the first account can determine the NFC cards on other electronic devices logged into the first account through the specified identifier, and electronic device 200 can migrate into the NFC cards on the electronic device logged into the first account accordingly.
[0222] Here, the designated identifier includes the identifier of the first NFC card. Based on the identifier of the first NFC card, the electronic device 200 can display a prompt message to the user indicating that the electronic device 200 supports the transfer of the first NFC card. In this way, the electronic device 200 can prompt the user that the electronic device 200 supports the transfer of the first NFC card.
[0223] Understandably, electronic device 200 can display a prompt message based on a specified identifier, indicating to the user that electronic device 200 supports the migration of one or more NFC cards other than the NFC card of electronic device 200, as indicated by the specified identifier. In this way, electronic device 200 can obtain the identifiers of the NFC cards of all electronic devices logged into the first account and prompt the user to migrate the NFC card to electronic device 200.
[0224] In other examples, the specified identifier includes the identifier of one or more NFC cards that have been transferred out by the electronic device logged into the first account. In this way, electronic device 200 can prompt the user to transfer other NFC cards that have been transferred out by the electronic device logged into the first account to electronic device 200.
[0225] In other examples, the identifiers include NFC cards transferred from electronic devices logged into the first account and NFC cards of type 2 that were not transferred from the same devices. Thus, since type 1 NFC cards include balance information, the electronic device logged into the first account can only prompt the user to transfer type 1 NFC cards that have been transferred from other electronic devices. Type 2 NFC cards do not include balance information and have a wide range of applications; regardless of whether other electronic devices have transferred type 2 NFC cards, the electronic device logged into the first account can prompt the user to transfer type 2 NFC cards to other electronic devices.
[0226] In other examples, the wallet application of electronic device 100 can, upon receiving a power-off input, send the migration data of the NFC card activated by electronic device 100 to server 300 in response to that input. In this way, electronic device 100 can send the NFC card migration data to server 300 without displaying a transfer-out or transfer control.
[0227] In other examples, the electronic device logged into the first account (e.g., electronic device 100) can send NFC card migration data to server 300 when the card information of the NFC card changes (e.g., a change in the balance of a transit card, activation of a new NFC card, etc.). Understandably, when electronic device 100 deletes an NFC card, it can notify server 300 to delete the migration data for that NFC card. This allows the electronic device to update the NFC card migration data stored in server 300, ensuring that the migration data stored in server 300 is the latest, facilitating the migration of NFC cards by other electronic devices. Optionally, the electronic device logged into the first account can also send the migration data of activated NFC cards to server 300 at preset upload intervals.
[0228] In other examples, an electronic device logged into the first account (e.g., electronic device 100) can send the device feature information of the activated NFC card to server 300 after activating the NFC card. Server 300 can store the correspondence between the identifier of the electronic device logged into the first account and the device feature information of the NFC card activated by that electronic device. After electronic device 200 logs into the first account, server 300 can send the device feature information of the NFC card activated by the electronic device logged into the first account to electronic device 200. Electronic device 200 can display card options corresponding to the device feature information of the NFC card. After receiving input from the user to migrate one or more NFC cards corresponding to the card options, electronic device 200 can obtain the migration data of the corresponding NFC card in the electronic device indicated by the device feature information of the NFC card through server 300. Electronic device 200 can migrate the NFC card based on the obtained migration data. It is understood that an electronic device logged into the first account can notify server 300 to delete the device feature information of the NFC card after deleting the NFC card. In this way, electronic device 200 can obtain the migration data of the NFC card from the corresponding electronic device after receiving input from the user to migrate the NFC card, and electronic device 200 can obtain the latest migration data.
[0229] In some examples, after electronic device 200 obtains the migration data of the NFC card from the electronic device logged into the first account via server 300, it can notify the electronic device to delete the NFC card. Optionally, after electronic device 200 obtains the migration data of a first type of NFC card from the electronic device logged into the first account via server 300, it can notify the electronic device to delete the first type of NFC card. In this way, only one of the multiple electronic devices logged into the first account can use the NFC card, which can limit the number of electronic devices with the NFC card and protect the security of the NFC card.
[0230] In one possible implementation, electronic devices 100 and 200 log into a first account. Electronic device 100 stores data from a first NFC card, including but not limited to card information. Electronic device 100 can encrypt the card information of the first NFC card using a migration recovery key to obtain ciphertext 1. Electronic device 100 can generate a migration session key based on the information of the first account. Electronic device 100 can encrypt the migration recovery key using the migration session key to obtain ciphertext 2. Electronic device 100 can send migration data, including ciphertext 1 and ciphertext 2, to server 300. Server 300 can maintain the correspondence between the first account and the migration data.
[0231] After receiving input to download (migrate) the first NFC card, electronic device 200 retrieves the migration data corresponding to the first account from server 300. Based on the first account information, electronic device 200 generates a migration session key and can use this key to decrypt ciphertext 2 to obtain the migration recovery key. Electronic device 200 can then use the migration recovery key to decrypt ciphertext 1 to obtain the card information of the first NFC card. Based on the data from the first NFC card, electronic device 200 can activate the first NFC card. Thus, electronic device 100, with the first NFC card activated, can receive user input and share the data of the first NFC card with other electronic devices. Electronic device 200 can also activate the first NFC card based on the data shared by electronic device 100, making the process more convenient. After enabling NFC functionality, electronic device 200 with the first NFC card activated can complete the NFC service corresponding to the first NFC card by placing it near the card reader area of the corresponding PCD.
[0232] The information of the first account may include, but is not limited to, one or more of the following: the first account's username, mobile phone number, email address, nickname, and password. Electronic device 100 can use this first account information as input to a key generation algorithm to generate a migration session key. In this way, each electronic device can generate a migration session key based on the logged-in account, allowing electronic devices logged into the same account to avoid transmitting the migration session key. This facilitates the decryption of migration data by electronic devices and ensures the confidentiality of the migration session key.
[0233] In some examples, the data stored in the NFC card by the electronic device 100 includes a migration recovery key. Specifically, the electronic device 100 can randomly generate a migration recovery key when activating the NFC card and can save this key. Alternatively, the electronic device 100 can receive a migration recovery key input by the user when activating the NFC card and save this key. In this way, the electronic device 100 can use the saved migration recovery key to encrypt card information when transferring the NFC card out.
[0234] In some examples, before sending migration data for N NFC cards to server 300, electronic device 100 can generate a corresponding migration recovery key for each NFC card. Based on the migration session key, the card information of the N NFC cards, and the migration recovery keys, it can obtain the migration data for the N NFC cards, where N is greater than 1. Electronic device 100 can then send the migration data of the N NFC cards to server 300. In this way, electronic device 100 can generate a migration recovery key for each NFC card, which better protects the card information of different NFC cards.
[0235] In other examples, electronic device 100 can generate a migration recovery key, use this key to encrypt the card information of N NFC cards, resulting in ciphertext 1 for the N NFC cards. Electronic device 100 can then use a migration session key to encrypt the migration recovery key, resulting in ciphertext 2. Electronic device 100 can then send the migration data, including ciphertext 2 and ciphertext 1 for the N NFC cards, to server 300. In this way, electronic device 100 uses a single migration recovery key to encrypt the card information of the migrated NFC cards, allowing it to send only one copy of ciphertext 2 to server 300, thus enabling faster transmission of migration data.
[0236] In other examples, electronic device 100 can obtain a set of card information based on the card information of N NFC cards. Electronic device 100 can generate a migration recovery key and use this key to encrypt the set of card information, obtaining ciphertext 1. In this way, electronic device 100 can encrypt the card information of multiple NFC cards at once, reducing the overhead of encrypting card information.
[0237] The following is a flowchart illustrating the NFC card migration method provided in this application embodiment.
[0238] For example, as shown in Figure 7, the NFC card migration method provided in this application embodiment includes the following steps:
[0239] 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.
[0240] 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.
[0241] S702. Electronic device 100 generates a migration session key based on the information of the first account.
[0242] 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.
[0243] S703. Electronic device 100 uses the migration recovery key to encrypt the card information of the first NFC card, obtaining ciphertext 1.
[0244] S704. Electronic device 100 uses the migration session key to encrypt the migration recovery key, resulting in ciphertext 2.
[0245] 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.
[0246] 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.
[0247] In this embodiment, the electronic device 100 can send the migration data of the first NFC card to the server 300 when the card information of the NFC card changes. Alternatively, the electronic device 100 can send the migration data of the first NFC card to the server 300 upon receiving input from the user to transfer the first NFC card (e.g., input to the migration control 442 shown in FIG. 4F, input to the confirmation control 473 shown in FIG. 4I, etc.). For specific details, please refer to the above embodiments, which will not be repeated here.
[0248] S706. Server 300 stores the correspondence between the identifier of the first account and the migration data of the first NFC card.
[0249] S707. Electronic Device 200 Login First Account.
[0250] S708. Electronic device 200 receives input of the first NFC card being transferred in.
[0251] For example, the input for the first NFC card can be an input to control 553 or control 554 in interface 550 shown in Figure 5G.
[0252] S709. Electronic device 200 sends a request to server 300 to transfer in the first NFC card.
[0253] After receiving input indicating that a first NFC card has been transferred, electronic device 200 can send a request to server 300 to transfer the first NFC card.
[0254] S710. Electronic device 200 receives migration data of the first NFC card sent by server 300.
[0255] After receiving a request from the electronic device 200 logged into the first account to transfer the first NFC card, the server 300 can determine the migration data of the first NFC card based on the first account and the correspondence between the stored identifier 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.
[0256] In some examples, electronic device 100 can send the identifier of the first account, the device feature information of the first NFC card, and the migration data of the first NFC card to server 300. Server 300 can store the correspondence between the account identifier, the device feature information of the NFC card, and the migration data of the NFC card. When electronic device 200 logged into the first account retrieves the migration data of the first NFC card, it can send the identifier of the first account and the device feature information of the first NFC card to server 300, and server 300 can send the migration data of the first NFC card to electronic device 200. In this way, server 300 can store the migration data of multiple different NFC cards from electronic devices with multiple accounts, providing NFC card migration functionality to multiple electronic devices.
[0257] S711. Electronic device 200 generates a migration session key based on the information of the first account.
[0258] Electronic device 200 can also use the information of the first account as input to the key generation algorithm to generate a migration session key. Specifically, electronic device 200 uses the same key generation algorithm as electronic device 100, and when the account logged into electronic device 200 is the same as the account logged into electronic device 100, the migration session keys generated by electronic device 200 and electronic device 100 are also the same.
[0259] S712. Electronic device 200 uses the migration session key to decrypt the migration recovery key from ciphertext 2.
[0260] After generating the migration session key, the electronic device 200 can use the migration session key to decrypt ciphertext 2 in the migration data to obtain the migration recovery key.
[0261] S713. Electronic device 200 uses the migration recovery key to decrypt the card information of the first NFC card from ciphertext 1.
[0262] After obtaining the migration recovery key by decrypting the electronic device 200, the ciphertext 1 in the migration data can be decrypted using the migration recovery key to obtain the card information of the first NFC card.
[0263] S714. Electronic device 200 transfers the first NFC card based on the card information of the first NFC card.
[0264] After the electronic device 200 decrypts and obtains the card information of the first NFC card, it can create a dedicated file for the first NFC card and write the card information into this dedicated file, thus activating the first NFC card. A description of this dedicated file can be found in the embodiment shown in Figure 3C. After the electronic device 200 imports the first NFC card, it can send the card information to an NFC card reader when in PICC mode. The NFC card reader can then use the card information obtained from the electronic device 200 to complete the NFC services corresponding to the first NFC card.
[0265] In some examples, electronic device 100 encrypts the first data using a migration recovery key to obtain ciphertext 1. The first data includes card information of the first NFC card. Optionally, the first data also includes an authentication key and / or device characteristic information. Electronic device 200 activates the first NFC card based on the first data.
[0266] In one possible implementation, after activating one or more NFC emulated cards, electronic device 100 can store device feature information corresponding to each of the one or more NFC emulated cards. Different NFC emulated cards correspond to different device feature information. When electronic device 100 is in PICC mode, PCD (e.g., access control device 600) can send device feature information to PICC. After receiving the device feature information sent by PCD, electronic device 100 can determine the first NFC emulated card from one or more NFC emulated cards based on the device feature information. Electronic device 100 can interact with PCD via NFC technology to complete the card swiping transaction of the first NFC emulated card. The device feature information may include, but is not limited to, device organization identifier (also known as NFC device organization unique identifier (ND_OUI)) and device group identifier (also known as NFC device group identifier (ND_GID)). In this way, electronic device 100 can select the appropriate NFC emulated card according to the device feature information, improving the speed and efficiency of NFC card swiping.
[0267] The Device Organization Identifier (ND_OUI) can be used to indicate the manufacturer providing NFC services using PCD. The NFC protocol standards organization's registration management agency can assign different Device Organization Identifiers to different manufacturers. For example, manufacturers providing NFC services may include one or more smart lock manufacturers, one or more property management companies, one or more automotive parts manufacturers, one or more transportation card management departments, etc.
[0268] For example, if the PCD's NFC service is for community access control, the PCD's device organization identifier can be the organization identifier applied for by the property management company to which the PCD belongs from the NFC standards organization. If the PCD's NFC service is for smart locks, the PCD's device organization identifier can be the organization identifier applied for by the smart lock manufacturer to which the PCD belongs from the NFC standards organization. If the PCD's NFC service is for car keys, the PCD's device organization identifier can be the organization identifier applied for by the vehicle manufacturer to which the PCD belongs from the NFC standards organization. If the PCD's NFC service is for multi-functional smart cards, the PCD's device organization identifier can be the organization identifier applied for by the smart card issuing organization to which the PCD belongs from the NFC standards organization. The PICC corresponding to the multi-functional smart card can include campus cards, employee cards, and other cards with multiple functions such as access control, stored value, and consumption. The smart card issuing organization to which the PCD belongs can include companies, schools, and other organizations. The above examples are merely for explaining this application and should not be construed as limiting this application.
[0269] The Device Group Identifier (ND_GID) indicates the group to which the NFC services provided by the PCD belong. The Device Group Identifier can be assigned based on the PCD's purpose and location. Different NFC services can be assigned to different groups.
[0270] For example, if the NFC service provided by the PCD is for community access control, the PCD's device group identifier may include a hash value obtained by hashing the city name and community name together, and a random number. If the NFC service provided by the PCD is for smart locks, the PCD's device group identifier may include a hash value obtained by hashing the PCD's serial number (SN), and a random number. If the NFC service provided by the PCD is for car keys, the PCD's device group identifier may include a hash value obtained by hashing the PCD's vehicle identification number (VIN), and a random number. If the NFC service provided by the PCD is for multi-functional access cards, the PCD's device group identifier may be a preset value, and so on. The above examples are merely for explaining this application and should not be construed as limiting this application.
[0271] In some examples, electronic device 100 can activate an NFC card through server 400. Server 400 and the PCD corresponding to the NFC card belong to the same management organization (e.g., the same property management company, the same hotel, etc.). Server 300 can store the mapping between management organization identifiers (e.g., the name and / or address of the community managed by the property management company) and the communication address of server 400. When electronic device 100 activates an NFC card provided by the management organization of server 400, it can determine the communication address of server 400 based on the management organization identifier input by the user, from the mapping between management organization identifiers and communication addresses stored in server 300. Electronic device 100 can then obtain NFC card data from server 400 based on server 400's communication address. This NFC card data includes, but is not limited to, card information and device feature information. Thus, electronic device 100 can activate the NFC card based on the obtained NFC card data.
[0272] It should be noted that, not limited to the NFC card provided by the management organization that activated server 400 described above, electronic device 100 can also activate NFC cards in other ways. For example, server 300 can establish communication connections with servers of multiple management organizations (e.g., server 400). Electronic device 100 can obtain data from NFC simulation cards, etc., by calling the interface of server 400 through server 300 based on the management organization's identifier. This application embodiment does not limit this aspect.
[0273] In another possible implementation, electronic devices 100 and 200 log into a first account. When activating the first NFC card, electronic device 100 can receive and save the migration recovery key generated by server 400. Server 400 can generate the migration recovery key based on the first serial number and root key of the first NFC card. The first serial number can be used to identify the first NFC card. The root key is a key stored by server 400. Electronic device 100 can use the migration recovery key to encrypt the card information of the first NFC card, obtaining ciphertext 1. Electronic device 100 can then send the migration data of the first NFC card, including ciphertext 1, to server 300.
[0274] After receiving input from a user requesting the migration of a first NFC card, electronic device 200 can display a prompt message asking the user to enter the serial number of the first NFC card. Upon receiving the first serial number, electronic device 200 can send it to server 400. Server 400 can then send a migration recovery key to electronic device 200 based on the first serial number. Electronic device 200 can receive the migration data of the first NFC card sent by server 300 and use the migration recovery key provided by server 400 to decrypt ciphertext 1 to obtain the card information of the first NFC card. Based on the card information, electronic device 200 can then migrate the first NFC card. In this way, electronic devices logged into the first account can obtain the migration recovery key from the management organization's server to migrate NFC cards.
[0275] In other examples, after receiving the first serial number input by the user, electronic device 200 can send the first serial number to server 400 via server 300. Thus, since different NFC cards correspond to different management servers (e.g., server 400), for example, different hotels or different residential communities may provide NFC cards with different management servers. Server 300 can establish communication connections with different management servers, and electronic device 200 can obtain the migration recovery key of the NFC card from the management server corresponding to the NFC card through server 300.
[0276] In other examples, electronic device 100 can receive and save the first serial number sent by server 400 when activating the first NFC card. After activation, electronic device 100 can display a first card icon and the first serial number; the first card icon indicates that electronic device 100 has activated the first NFC card, and the first serial number can be used to identify the first NFC card. When sending migration data of the first NFC card to server 300, electronic device 100 can also send the serial number of the first NFC card to server 300. In this way, when migrating the first NFC card, electronic device 200 can obtain the serial number from server 300, eliminating the need for the user to manually enter the serial number and reducing the complexity of the migration operation.
[0277] The following is a flowchart illustrating the NFC card migration method provided in this application embodiment.
[0278] For example, as shown in Figure 8, the NFC card migration method provided in this application embodiment includes the following steps:
[0279] S801. Electronic device 100 Login First Account.
[0280] S802. Electronic device 100 receives input to activate the first NFC card.
[0281] S803. Electronic device 100 obtains data of the first NFC card and the first serial number from server 400 through server 300. The data of the first NFC card includes the card information of the first NFC card and the migration recovery key generated by server 400 based on the first serial number.
[0282] In this system, server 300 establishes communication connections with servers of multiple management organizations (e.g., server 400). Electronic device 100 can then display options corresponding to these management organizations in its wallet application, allowing it to activate NFC cards provided by those organizations through those options. Upon receiving input from the management organization activating server 400 for a first NFC simulated card, electronic device 100 can retrieve the data and first serial number of the first NFC simulated card from server 400 via server 300. The data of the first NFC card includes its card information and migration recovery key. Electronic device 100 can activate the first NFC card based on this data.
[0283] In some examples, server 300 stores a mapping between the identifiers of multiple management organizations and the communication addresses of servers (e.g., server 400), which can be used to establish communication connections with the corresponding servers. Electronic device 100 can display options corresponding to multiple management organizations, allowing it to establish a communication connection with the server of that management organization through those options. Electronic device 100 can then obtain data from the NFC card provided by that management organization through the established communication connection and activate the NFC card based on the obtained data.
[0284] Server 400 can generate a migration recovery key based on the root key and the first serial number. Server 400 stores the root key. The root key can be a randomly generated key by server 400, or a key set by personnel in the management organization.
[0285] The first serial number can be used to identify the first NFC card. For example, the first serial number can be a string on the first NFC physical card, which is a physical card issued by the management organization of server 400 to the user of electronic device 100. The card information of the first NFC physical card is the same as the card information of the first NFC card. Server 400 can receive the first serial number entered by personnel of the management organization when activating the first NFC card for electronic device 100. As another example, the first serial number can be a number set by personnel of the management organization for the first NFC card.
[0286] S804. Electronic device 100 activates the first NFC card based on the card information of the first NFC card.
[0287] The electronic device 100 can activate the first NFC card based on the card information of the first NFC card. Specifically, the electronic device 100 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 activate the first NFC card.
[0288] Optionally, the electronic device 100 can write the card information and migration recovery key of the first NFC into the dedicated file to activate the first NFC card.
[0289] S805. Electronic device 100 displays a first card icon and a first serial number, the first card icon being used to indicate that electronic device 100 has activated the first NFC card.
[0290] After activating the first NFC card, electronic device 100 can display a first card icon and a first serial number. The first card icon indicates that electronic device 100 has activated the first NFC card. For example, electronic device 100 can display the first serial number on the first card icon. In this way, even if the user of electronic device 100 has not obtained a physical NFC card corresponding to the first NFC card, the first serial number can still be identified.
[0291] S806. Electronic device 100 uses the migration recovery key to encrypt the card information of the first NFC card, obtaining ciphertext 1.
[0292] S807. Electronic device 100 sends the identifier of the first account and the migration data (including ciphertext 1) of the first NFC card to server 300.
[0293] Electronic device 100 can encrypt the card information of the first NFC card using a migration recovery key to obtain ciphertext 1. Specifically, electronic device 100 can encrypt the card information of the first NFC card using the migration recovery key when the card information changes, obtaining ciphertext 1. Afterwards, electronic device 100 can send the migration data of the first NFC card to server 300. Alternatively, upon receiving input from a user indicating that the first NFC card has been migrated, electronic device 100 can encrypt the card information of the first NFC card using the migration recovery key and send the migration data of the first NFC card to server 300, and so on. For details, please refer to the above embodiments, which will not be repeated here.
[0294] When sending the migration data of the first NFC card to the server 300, the electronic device 100 can also send the identifier of the first account to the server 300. In this way, the server 300 can determine the account to which the first NFC card belongs.
[0295] It should be noted that the server 300 is not limited to determining the account to which the first NFC card belongs based on the identifier of the first account. The server 300 can determine the account to which the first NFC card belongs through other means. For example, the electronic device 100 can send its identifier to the server 300. The server 300 stores a list of electronic devices logged into 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, etc., but this embodiment does not limit this approach.
[0296] S808. Server 300 stores the correspondence between the identifier of the first account and the migration data of the first NFC card.
[0297] After receiving the identifier of the first account and the migration data of the first NFC card sent by the electronic device 100, the server 300 can store the correspondence between the identifier of the first account and the migration data of the first NFC card.
[0298] S809. Electronic Device 200 Login First Account.
[0299] S810. Electronic device 200 receives input of the first NFC card being transferred in.
[0300] Understandably, before receiving input to transfer the first NFC card, electronic device 200 can obtain a specified identifier from server 300. This specified identifier includes identifiers of all electronic devices logged into the first account that have not transferred out NFC cards, and identifiers of all electronic devices logged into the first account that have transferred out NFC cards. Alternatively, the specified identifier includes identifiers of all electronic devices logged into the first account that have transferred out NFC cards. Or, the specified identifier includes identifiers of all electronic devices logged into the first account that have transferred out NFC cards, and identifiers of all electronic devices logged into the first account that have not transferred out a second type of NFC card.
[0301] Here, the designated identifier includes the identifier of the first NFC card. The electronic device 200 can display a prompt message to the user indicating the NFC card to be transferred, based on the acquired designated identifier. Thus, the electronic device 200 can prompt the user to transfer the first NFC card to the electronic device 200 based on the designated identifier.
[0302] S811. Electronic device 200 displays a prompt message to prompt the user to enter a serial number.
[0303] After receiving input of the first NFC card being transferred, the electronic device 200 can display a prompt message prompting the user to enter a serial number. For example, the input of the first NFC card can be input to control 553 or control 554 in interface 550 shown in Figure 5G. In response to this input, the electronic device 200 can display interface 901 as shown in Figure 9. As shown in Figure 9, interface 901 includes an input box 902, a confirmation control 903, and a prompt message 904. The input box 902 can be used to input a serial number. The confirmation control 903 can be used to trigger the electronic device 200 to perform an operation to obtain a migration recovery key based on the serial number in the input box 902. The prompt message 904 can be used to prompt the user to enter a serial number. For example, the prompt message 904 can include, but is not limited to, text prompts such as "Please enter the serial number" and "To ensure card security, please enter the card's serial number." After receiving the serial number entered by the user in the input box 902 shown in Figure 9, the electronic device 200 receives the user's input to the confirmation control 903 shown in Figure 9. The electronic device 200 can perform steps S813 to S818.
[0304] S812. Electronic device 200 receives the input first serial number.
[0305] Electronic device 200 can receive the first serial number entered by the user.
[0306] In other examples, electronic device 100 can send a first serial number to server 300 when sending migration data of the first NFC card. Electronic device 200 can retrieve the migration data and first serial number of the first NFC card from server 300 after receiving input indicating the first NFC card has been migrated. Electronic device 200 can then retrieve a migration recovery key from server 400 based on the first serial number. In this way, electronic device 200 does not require the user to manually enter the first serial number.
[0307] S813. Electronic device 200 sends a request to server 300 to transfer the first NFC card.
[0308] After receiving input indicating that a first NFC card has been transferred, electronic device 200 can send a request to server 300 to transfer the first NFC card.
[0309] S814. Electronic device 200 receives migration data of the first NFC card sent by server 300.
[0310] After receiving a request from the electronic device 200 logged into the first account to transfer the first NFC card, the server 300 can determine the migration data of the first NFC card based on the first account and the correspondence between the stored identifier 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.
[0311] In some examples, electronic device 100 can send the identifier of the first account, the device feature information of the first NFC card, and the migration data of the first NFC card to server 300. Server 300 can store the correspondence between the account identifier, the device feature information of the NFC card, and the migration data of the NFC card. When electronic device 200 logged into the first account retrieves the migration data of the first NFC card, it can send the identifier of the first account and the device feature information of the first NFC card to server 300, and server 300 can send the migration data of the first NFC card to electronic device 200. In this way, server 300 can store the migration data of multiple different NFC cards from electronic devices with multiple accounts, providing NFC card migration functionality to multiple electronic devices.
[0312] S815. Electronic device 200 sends the first serial number to server 400.
[0313] In some examples, server 300 stores a mapping between NFC cards and the servers of the managing organization. Electronic device 200 can determine server 400 from server 300 based on the first NFC card and send a first serial number to server 400. For example, server 300 stores a mapping between the device characteristic information of NFC cards and the communication addresses of the servers of the managing organization. Electronic device 200 can obtain the communication address of server 400 from server 300 based on the device characteristic information of the first NFC card. Electronic device 200 can establish a communication connection with server 400 and send the first serial number to server 400. In this way, the device characteristic information can be used to identify a unique NFC card, and electronic device 200 can determine the server of the managing organization that issued the NFC card based on the device characteristic information.
[0314] In some examples, an electronic device logged into the first account (e.g., electronic device 100) can send the device characteristic information of activated NFC cards to server 300. Server 300 can store the device characteristic information of NFC cards under the first account and send it to the electronic device logged into the first account. In this way, the electronic device can determine which NFC cards can be transferred out / in based on the device characteristic information.
[0315] In some examples, server 300 can synchronize the device feature information of the NFC card under the activated first account and the corresponding server of the management organization on the electronic device logged into the first account. In this way, the electronic device logged into the first account can determine from the stored data which server needs to send the first serial number.
[0316] In some examples, device feature information may also include the NFC card's service type. The NFC card's service type can include, but is not limited to, access control, keys, transportation, banking, digital currency, digital certificates, codeless payment, electronic tickets, etc. In this way, the electronic device logged into the primary account can display the NFC card's service type and the name of the group to which the NFC card's NFC service belongs on the NFC card's card options based on the device feature information, making it easier for users to identify the NFC card to be transferred in / out.
[0317] 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.
[0318] In some examples, server 400 can store the correspondence between serial numbers, account information, and migration recovery keys. Upon receiving the first serial number, server 400 can verify whether the account logged into electronic device 200 is the first account. Once server 400 determines that the account logged into electronic device 200 is the first account, it sends the migration recovery key to electronic device 200.
[0319] It should be noted that, not limited to electronic device 200 executing step S813 first and then step S815, electronic device 200 may also execute step S815 first and then step S813. The order in which electronic device 100 executes steps S813 and S815 is not limited in this application embodiment.
[0320] S816. Electronic device 200 receives migration recovery key sent by server 400.
[0321] After receiving the first serial number, server 400 can generate a migration recovery key based on the first serial number and the root key. Server 400 can then send the migration recovery key to electronic device 200.
[0322] S817. Electronic device 200 uses the migration recovery key to decrypt the card information of the first NFC card from ciphertext 1.
[0323] 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.
[0324] S818. Electronic device 200 transfers the first NFC card based on the card information of the first NFC card.
[0325] After the electronic device 200 decrypts and obtains the card information of the first NFC card, it can create a dedicated file for the first NFC card and write the card information into this dedicated file, thus activating the first NFC card. A description of this dedicated file can be found in the embodiment shown in Figure 3C. After the electronic device 200 imports the first NFC card, it can send the card information to an NFC card reader when in PICC mode. The NFC card reader can then use the card information obtained from the electronic device 200 to complete the NFC services corresponding to the first NFC card.
[0326] In other examples, electronic device 100 may store a migration recovery key for the first NFC card. Server 400 stores a mapping between serial numbers and root keys. Server 400 may generate an encryption key based on the first serial number of the first NFC card and the corresponding root key. Electronic device 100 may obtain the encryption key generated by server 400. Electronic device 100 may encrypt the card information of the first NFC card based on the migration recovery key to obtain ciphertext 1. Electronic device 100 may encrypt the migration recovery key based on the encryption key to obtain ciphertext 2. Electronic device 100 may send the migration data of the first NFC card to server 300, the migration data of the first NFC card including ciphertext 1 and ciphertext 2.
[0327] After receiving input from a user requesting the migration of a first NFC card, electronic device 200 can display a prompt message asking the user to enter the serial number of the first NFC card. Upon receiving the first serial number, electronic device 200 can send it to server 400 via server 300. Server 400 can then send an encryption key to electronic device 200 based on the first serial number. Electronic device 200 can receive the migration data of the first NFC card sent by server 300 and decrypt ciphertext 2 using the encryption key provided by server 400 to obtain the migration recovery key. It then decrypts ciphertext 1 based on the migration recovery key to obtain the card information of the first NFC card. Electronic device 200 can then migrate the first NFC card based on the card information. In this way, electronic devices logged into the first account can obtain the migration recovery key from the management organization's server to migrate NFC cards.
[0328] In one 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 electronic devices logged into the first account. When electronic device 100 logs into the first account, it can send the password information (including the application's username and password) to the server 700. The server 700 can store the mapping between the first account and the password information of these multiple applications. When electronic device 200 logs into the first account, it can retrieve the password information of the multiple applications corresponding to the first account from the server 700. In this way, electronic device 200 can directly log into multiple applications based on the password information of multiple applications without needing to re-perform the login operation, making the operation more convenient.
[0329] In some examples, when electronic device 100 can send application password information to server 700, it also sends verification information (e.g., the lock screen password of electronic device 100) to server 700. Server 700 can store the correspondence between the first account, verification information, and application password information. After logging into the first account, electronic device 200 receives input from the user to obtain the password information for the first account. Electronic device 200 can respond to this input by displaying an input box for entering verification information. After receiving the verification information entered by the user, electronic device 200 can send the verification information to server 700. Server 700 can determine whether the verification information of electronic device 200 is the same as that of electronic device 100. If server 700 determines that the verification information of electronic device 200 is the same as that of electronic device 100, it can send the password information corresponding to the first account to electronic device 200. In this way, server 700 can verify electronic device 200 through the verification information, protecting the security of password information.
[0330] In some examples, server 700 can generate a shared key, which can be used to encrypt data transmitted by electronic devices logged into the primary account. In this way, multiple electronic devices logged into the primary account can encrypt transmitted data using the shared key, ensuring data security.
[0331] Optionally, server 700 stores asset identities (AssetIDs) for multiple applications installed on the electronic device logged into the first account. The asset identities for different applications can be different. Electronic device 100 can generate an asset key based on a shared key and the asset identities. Electronic device 100 can encrypt data of the application indicated by the asset identity using the asset key. In this way, different applications use different asset keys, reducing the probability of shared key leakage.
[0332] Optionally, different services within the same application can have different asset identifiers. In this way, the electronic device 100 can generate asset keys based on a shared key and the asset identifiers of different services, thus separating the keys used by each service and strengthening the protection of data for each service.
[0333] This application provides an NFC card migration method. Electronic devices 100 and 200 log into a first account. Electronic device 100 activates a first NFC card. Electronic device 100 includes a processor 11 and a security module 12. The security module 12 of electronic device 100 can encrypt the card information of the first NFC card using a migration recovery key to obtain first encrypted data. The security module 12 of electronic device 100 can encrypt the migration recovery key based on a temporary key pair 1 to obtain first ciphertext. The processor 11 of electronic device 100 can obtain an asset key based on the first account. The processor 11 of electronic device 100 can encrypt the first ciphertext based on the asset key to obtain second ciphertext. The security module 12 of 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 using the asset key to obtain the migration recovery key. Electronic device 100 can send the migration data of the first NFC card to a server 300. The migration data of the first NFC card includes the third ciphertext and the first encrypted data.
[0334] Electronic device 200 includes processor 14 and security module 15. Upon receiving input of a first NFC card being transferred, electronic device 200 can retrieve the migration data of the first NFC card from server 300. Security module 15 of electronic device 200 can encrypt a third ciphertext based on key 1 to obtain a fourth ciphertext. Processor 14 of electronic device 200 can obtain an asset key based on a first account. Processor 14 of electronic device 200 can process the fourth ciphertext based on the asset key to obtain a fifth ciphertext. Security module 15 of electronic device 200 can decrypt the fifth ciphertext based on key 1 to obtain a migration recovery key. Electronic device 200 can use the migration recovery key to decrypt the first encrypted data to obtain the card information of the first NFC card.
[0335] In this way, the security level of the security module of electronic device 100 (electronic device 200) is higher than that of the processor. Electronic devices 100 and 200 will not send plaintext card information to any modules other than the security module, thus better protecting the security of the card information.
[0336] In some examples, electronic device 100 can send the migration data of the first NFC card to server 300 after receiving input to transfer out the first NFC card. Electronic device 200 can retrieve the migration data of the first NFC card from server 300 after receiving input to transfer in the first NFC card. In this way, users can actively transfer out NFC cards from their electronic devices.
[0337] In other examples, after receiving input indicating the inbound of the first NFC card, electronic device 200 can send a request message to electronic device 100 via server 300 to retrieve the migration data of the first NFC card. Upon receiving this request message, electronic device 100 can send the migration data of the first NFC card to server 300, which can then relay the migration data to electronic device 200. In this way, electronic device 200 can retrieve the migration data of the first NFC card from electronic device 100 only after receiving input indicating the inbound of the first NFC card, without needing to upload the migration data to server 300 beforehand, thus protecting the security of the migration data.
[0338] It should be noted that, not limited to the above-mentioned method of electronic device 100 sending the migration data of the first NFC card to server 300, electronic device 100 may also send the migration data of the first NFC card to server 300 at preset upload intervals. This application embodiment does not limit this.
[0339] The following is a schematic diagram of the NFC card migration method provided in the embodiments of this application.
[0340] The NFC card migration method provided in this application embodiment can be applied to the communication system 10 shown in FIG2. The communication system 10 may include an electronic device 100, an electronic device 200, a server 300, and a server 700 (not shown in the figure).
[0341] As shown in Figure 10, the electronic device 100 may include a processor 11, a security chip (SE chip) 12, and an NFC module 13. The security module 12 can be connected to the NFC module 13, and the security module 12 can be connected to the processor 11. The description of the NFC module 13 can be found in the description of the NFC module 102 shown in Figure 3A. The description of the security module 12 can be found in the description of the SE 103 and / or SIM card 104 shown in Figure 3A. The security module 12 and the NFC module 13 can be two separate chips. Optionally, the security module 12 and the NFC module 13 can be integrated into the same chip.
[0342] 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 trusted key management application (TEE application, TA) 23 and a shared key management module 24.
[0343] An operating system running in a REE (Reliable Execution Environment) can be called a Rich Execution Environment (REE) OS, while an operating system running in a TEE (Trusted Execution Environment) can be called a Trusted Execution Environment (TEE) OS. The TEE is a secure runtime environment running on the CPU. Its secure boot process requires verification and is separate from the REE. Applications running within the TEE are independent of each other and cannot access each other without authorization, ensuring that the processing of resources and data within the TEE is performed in a trusted environment, thus providing security services for the REE OS. The TEE has its own execution space, offering a higher level of security than the REE OS, and is a secure architecture overlapping with the current CPU hardware architecture. The hardware and software resources accessible by the TEE are separate from those of the REE OS, providing hardware-supported isolation.
[0344] Specifically, the key synchronization application 21 can be used by electronic device 100 to obtain a shared key from server 700. Key management TA 23 can be used to encrypt / decrypt data based on the shared key or asset key. The shared key management module 24 can be used to store the shared key and generate asset keys based on asset identifiers and the shared key.
[0345] The process of removing the first NFC card from electronic device 100 includes the following steps:
[0346] S1001. Security module 12 generates a migration recovery key and uses the migration recovery key to encrypt the card information of the first NFC card to obtain the first encrypted data.
[0347] The security module 12 stores data from one or more NFC cards, including a first NFC card. The security module 12 can generate a migration recovery key and use this key to encrypt the card information of the first NFC card, obtaining first encrypted data.
[0348] Specifically, the security module 12 can randomly generate a 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 activated (e.g., by receiving a migration recovery key sent by the server 400 / PICC500, or by randomly generating a migration recovery key). Alternatively, the security module 12 can generate a migration recovery key after receiving input from the user to migrate the first NFC card (e.g., by randomly generating a migration recovery key, or by generating a migration recovery key based on the first account logged in on the electronic device 100), and so on.
[0349] 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 uses m to encrypt P to obtain the first encrypted data C0. Wherein, C0 = specified encryption algorithm (m, P).
[0350] When the electronic device 100 transfers out 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 transfer recovery key m to obtain the first encrypted data. In this way, the security module 12 can use one transfer recovery key to encrypt the card information of multiple NFC cards, so that the electronic device 100 only needs to encrypt one transfer recovery key, resulting in higher transfer efficiency.
[0351] In some examples, security module 12 can generate a migration recovery key for the card information of each NFC card. This allows for the isolation of card information across different NFC cards by encrypting the card information with different migration recovery keys, thus improving the security of the NFC card information.
[0352] S1002. The security module 12 can generate a temporary key pair 1, and 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.
[0353] The security module 12 encrypts the migration recovery key using elliptic curve cryptography (ECC) to obtain the first ciphertext. The security module 12 can generate a temporary key pair 1, which 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 then process the migration recovery key based on the temporary key pair 1 and the parameters used to generate the public key 1 to obtain the first ciphertext.
[0354] For example, the process by which security module 12 generates the first ciphertext using an algorithm is as follows:
[0355] 1. Security module 12 determines the elliptic curve E and uses point G on the elliptic curve E as the base point. In subsequent embodiments, [A]B represents the dot product of parameters A and B on the elliptic curve E. A+B represents the addition of parameters A and B on the elliptic curve E.
[0356] 2. Security module 12 generates temporary key pair 1, which can be represented as:<x1,Y1> Where Y1 = [x1]G, x1 is private key 1, and Y1 is public key 1.
[0357] 3. Security module 12 generates a random number r1 and calculates Q1 = [r1]G.
[0358] 4. Security module 12 encodes m as a point n on an elliptic curve.
[0359] 5. Security module 12 uses blinding on n to obtain the first ciphertext C1 = (Q1, n) / Where, U1=[r1]Y1 n / =U1+n
[0360] It should be noted that, since n = n / -[x1]Q1, therefore, as long as the private key 1 is known, n can be obtained, and m can be obtained based on n.
[0361] S1003. Security module 12 sends the first ciphertext to wallet application 22.
[0362] S1004. Wallet application 22 sends the first ciphertext and the first asset identifier to key synchronization application 21. The first asset identifier can be used to instruct wallet application 22.
[0363] In other examples, the first asset identifier can be used to indicate the service type of the first NFC card, such as access control, keys, transportation, banking, digital currency, digital certificates, codeless payment, electronic tickets, etc. In this way, the shared key management module 34 can determine the asset key based on the service type of the NFC card, separating data for different services so that data from different services does not interfere with each other.
[0364] S1005. Key synchronization application 21 sends the first ciphertext and the first asset identifier to the key management trusted application 23.
[0365] Since the key synchronization application 21 is located under the REE, it can encrypt / decrypt data through the key management TA23 under the TEE. Here, after receiving the first ciphertext and the first asset identifier, the key management trusted application 23 can obtain the asset key based on the first asset identifier.
[0366] S1006. Key Management TA23 can send the first asset identifier to the shared key management module 24.
[0367] 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.
[0368] The shared key management module 24 can use the first asset identifier and the shared key as input to a specified key algorithm to generate an asset key. 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), where MK is the shared key and AssetID1 is the first asset identifier.
[0369] S1008. Shared key management module 24 sends private key 2 to key management TA23.
[0370] S1009. Key Management TA23 can generate public key 2 in temporary key pair 2 based on private key 2.
[0371] S1010. Key Management TA23 encrypts the first ciphertext based on public key 2 to obtain the second ciphertext. Private key 1 and private key 2 can be used to decrypt the second ciphertext to obtain the migration recovery key.
[0372] For example, the process by which key management TA23 generates the second ciphertext using an algorithm is as follows:
[0373] 1. Key management TA23 generates a temporary key pair 2 based on private key 2. Temporary key pair 2 can be represented as:<x2,Y2> Where Y2 = [x2]G, x2 is private key 2, and Y2 is public key 2.
[0374] 2. Key management TA23 generates a masked random number t1.
[0375] 3. Key management TA23 performs a masking operation on C1 based on t1 to calculate D1. D1 = ([t1]G+Q1, [r1]Y1+n) / )=([t1+r1]G, [t1+r1]Y1+n)=([t2]G, [t2]Y1+n), where t2=t1+r1
[0376] 4. Key management TA23 generates a random number r2, and calculates Q2 = [r2]G.
[0377] 5. Key management TA23 blinds [t2]Y1+n in D1 to obtain the second ciphertext C2=(Q2,[t2]G,n / *Where, U2=[r2]Y2 n / * =U2+[t2]Y1+n
[0378] It should be noted that, since n = n / * -U2+[t2]Y1=n / * -[x2]Q2-[x1][t2]G, therefore, as long as private key 1 and private key 2 are known, n can be obtained, and m can be obtained based on n.
[0379] In other examples, electronic device 100 can use the shared key as private key 2. In this way, electronic device 100 can directly encrypt the first ciphertext using public key 2 generated from the shared key to obtain the second ciphertext. Electronic device 200 can also directly use the shared key to perform decryption operations.
[0380] S1011. Key management TA23 can send the second ciphertext to the key synchronization application 21.
[0381] S1012. The key synchronization application 21 can send the second ciphertext to the wallet application 22.
[0382] S1013. Wallet application 22 can send the second ciphertext to security module 12.
[0383] S1014. Security module 12 can process the second ciphertext based on private key 1 to obtain the third ciphertext; wherein, private key 2 can be used to decrypt the third ciphertext to obtain the migration recovery key.
[0384] For example, the process by which security module 12 generates the third ciphertext using an algorithm is as follows:
[0385] 1. Security module 12 is based on temporary key pair 1 and the second ciphertext C1. / * After unblinding, T1 is obtained. For T1, n can be determined as long as private key 2 is known. Thus, security module 12 removes private key 1 from the second ciphertext, obtaining the migration recovery key encrypted solely with private key 2. T1 = n / * -[x1][t2]G=U2+n
[0386] 2. Security module 12 generates a mask random number t3.
[0387] 3. Security module 12 generates a third ciphertext C3 = (Q3, n) based on t3 and (Q2, T1). * ). Q3=[t3]G+Q2=[t3+r2]G=[r3]G, r3=t3+r2 n * =[t3]Y2+T1=[t3]Y2+[r2]Y2+n=[r3]Y2+n
[0388] It should be noted that, since n = n * -[r3]Y2=n * -[x2][r3]G=n * -[x2]Q3, therefore, as long as the private key 2 is known, n can be obtained, and m can be obtained based on n.
[0389] Optionally, security module 12 can send (Q2, T1) as a third ciphertext to wallet application 22. Electronic device 200 can decrypt the third ciphertext based on private key 2 to obtain n. In this way, security module 12 of electronic device 100 can obtain the third ciphertext faster.
[0390] S1015. Security module 12 sends the first encrypted data and the third ciphertext to wallet application 22.
[0391] S1016. Wallet application 22 sends the identifier of the first account and the migration data of the first NFC card to server 300. The migration data of the first NFC card includes first encrypted data and third ciphertext.
[0392] S1017. Server 300 stores the correspondence between the identifier of the first account and the migration data of the first NFC card.
[0393] After receiving the identifier of the first account and the migration data of the first NFC card sent by the wallet application 22 of the electronic device 100, the server 300 can store the correspondence between the identifier of the first account and the migration data of the first NFC card.
[0394] In some examples, wallet application 22 can send the identifier of the first account, the identifier of the first NFC card, and the migration data of the first NFC card to server 300. Server 300 can store the correspondence between the account identifier, the NFC card identifier, and the NFC card migration data. When electronic device 200 logged into the first account retrieves the migration data of the first NFC card, it can send the identifier of the first account and the identifier of the first NFC card to server 300, and server 300 can send the migration data of the first NFC card to wallet application 32 of electronic device 200. In this way, server 300 can store the migration data of multiple different NFC cards of electronic devices with multiple accounts, providing NFC card migration functionality to multiple electronic devices.
[0395] As shown in Figure 11, the electronic device 200 may include a processor 14, a security module 15, and an NFC module 16. The security module 15 can be connected to the NFC module 16, and the security module 15 can be connected to the processor 14. The description of the NFC module 16 can be found in the description of the NFC module 102 shown in Figure 3A. The description of the security module 15 can be found in the description of the SE 103 and / or SIM card 104 shown in Figure 3A. The security module 15 and the NFC module 16 can be two separate chips. Optionally, the security module 15 and the NFC module 16 can be integrated into the same chip.
[0396] The processor 14 can run two application environments: TEE and REE. 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.
[0397] Among them, key synchronization application 31 can be used by electronic device 100 to obtain shared keys from server 700. Key management TA 33 can be used to encrypt / decrypt data based on shared keys or asset keys. Shared key management module 34 can be used to store shared keys and generate asset keys based on asset identifiers and shared keys.
[0398] The process of transferring the first NFC card to electronic device 200 includes the following steps:
[0399] S1101. Server 300 stores the correspondence between the identifier of the first account and the migration data of the first NFC card. The migration data of the first NFC card includes first encrypted data and third ciphertext.
[0400] S1102. Wallet application 32 receives input of the first NFC card being transferred in.
[0401] S1103. Wallet application 32 sends a request to server 300 to transfer the first NFC card.
[0402] S1104. Wallet application 32 receives migration data of the first NFC card sent by server 300.
[0403] Specifically, the description of how the wallet application 32 obtains the migration data of the first NFC card from the server 300 can be found in the above embodiments, and will not be repeated here.
[0404] S1105. Wallet application 32 sends the migration data of the first NFC card to security module 15.
[0405] S1106. Security module 15 generates key 1, encrypts the third ciphertext based on key 1 to obtain the fourth ciphertext, and key 1 and private key 2 can be used to decrypt the fourth ciphertext to obtain the migration recovery key.
[0406] For example, the process by which security module 15 generates the fourth ciphertext using an algorithm is as follows:
[0407] 1. Security module 12 generates a mask random number d1.
[0408] 2. Security module 12 obtains Q4 and T2 based on d1 and the third ciphertext C3. Q4 = [d1]G + Q3 = [d1 + r3]G = [d2]G, d2 = d1 + r3 T2 = [d1]Y2 + n * =[d1+r3]Y2+n=[d2]Y2+n
[0409] 3. Security module 12 generates key 1, which can be represented by K, where K is a point on the elliptic curve E.
[0410] 4. Security module 12 performs blinding on T2, obtaining n. *+ n *+ =K+T2=K+[d2]Y2+n
[0411] 5. Security module 12 obtains the fourth ciphertext C4 = (Q4, n *+ ).
[0412] It should be noted that, since n = n *+ -K-[d2]Y2=n *+ -K-[x2][d2]G=n *+ -K-[x2]Q4, therefore, as long as private key 2 and key 1 are known, n can be obtained, and m can be obtained based on n.
[0413] In other examples, security module 12 can generate a temporary key pair 3, and security module 12 can encrypt a third ciphertext based on the public key 3 in the temporary key pair 3 to obtain a fourth ciphertext. Then, security module 12 can decrypt a fifth ciphertext based on the private key 3 in the temporary key pair 3 to obtain the migration recovery key. This embodiment of the application does not limit this process.
[0414] S1107. Security module 15 sends the fourth ciphertext to wallet application 32.
[0415] S1108. Wallet application 32 sends the fourth ciphertext and the first asset identifier to key synchronization application 31. The first asset identifier can be used to instruct wallet application 32.
[0416] S1109. Key synchronization application 31 sends the fourth ciphertext and the first asset identifier to key management TA33.
[0417] S1110. Key management TA33 can send the first asset identifier to the shared key management module 34.
[0418] 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.
[0419] The shared key management module 34 can use the first asset identifier and the shared key as input to a specified key algorithm to generate an asset key. 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), where MK is the shared key and AssetID1 is the first asset identifier.
[0420] It is understandable that since both electronic devices 100 and 200 are logged into using the same account, they obtain the same shared key. Furthermore, the first asset identifier and the specified key algorithm used in the wallet application 32 of both electronic devices 100 and 200 are the same, resulting in identical asset keys generated by both devices.
[0421] S1112. The shared key management module 34 sends the private key 2 to the key management TA 33.
[0422] S1113. Key Management TA33 generates public key 2 in temporary key pair 2 based on private key 2.
[0423] S1114. Key Management TA33 processes the fourth ciphertext based on temporary key pair 2 to obtain the fifth ciphertext. Key 1 can be used to decrypt the fifth ciphertext to obtain the migration recovery key.
[0424] For example, the process by which key management TA33 generates the fifth ciphertext using an algorithm is as follows:
[0425] 1. Key management TA33 generates temporary key pair 2 based on private key 2. Temporary key pair 2 can be represented as:<x2,Y2> Where Y2 = [x2]G, x2 is private key 2, and Y2 is public key 2.
[0426] 2. Key management TA33 is based on private key 2 and the n in the fourth ciphertext. *+ After unblinding, the fifth ciphertext C5 = (n + Thus, security module 12 removes private key 2 from the fourth ciphertext, obtaining the migration recovery key encrypted solely based on key 1. + = n*+ -[x2]Q4=K+n
[0427] It should be noted that, since n = n + -K, therefore, n can be obtained as long as key 1 is known. Optionally, since public key 2 is used to encrypt data, key management TA33 can generate only private key 2 without generating public key 2, and decrypt the fourth ciphertext based on private key 2 to obtain the fifth ciphertext.
[0428] S1115. Key management TA33 can send the fifth ciphertext to the key synchronization application 31.
[0429] S1116. The key synchronization application 31 can send the fifth ciphertext to the wallet application 32.
[0430] S1117. Wallet application 32 can send the fifth ciphertext to security module 15.
[0431] S1118. Security module 15 processes the fifth ciphertext based on key 1 to obtain the migration recovery key.
[0432] For example, the process by which security module 15 obtains the migration recovery key through an algorithm is as follows:
[0433] 1. Security module 15 processes the fifth ciphertext based on key 1 to obtain n. n = n + -K
[0434] 2. Security module 15 decodes n to obtain migration recovery key m.
[0435] S1119. Security module 15 decrypts the first encrypted data based on the migration recovery key to obtain the card information of the first NFC card.
[0436] The security module 15 can use the migration recovery key m to decrypt the first encrypted data C0 to obtain the card information P of the first NFC card. Here, P = specified decryption algorithm (m, C0). The specified decryption algorithm is the decryption algorithm corresponding to the specified encryption algorithm.
[0437] S1120. Security module 15 transfers the first NFC card based on the card information of the first NFC card.
[0438] After the security module 15 decrypts and obtains the card information of the first NFC card, it can create a dedicated file for the first NFC card and write the card information into this dedicated file, thus activating the first NFC card. A description of this dedicated file can be found in the embodiment shown in Figure 3C. After the security module 15 transfers the first NFC card, it can send the card information to the NFC reader device via the NFC module 16 when in PICC mode. The NFC reader device can then complete the NFC services corresponding to the first NFC card based on the card information obtained from the electronic device 200.
[0439] In other examples, electronic devices 100 and 200 log into a first account. Electronic device 100 activates a first NFC card. Electronic device 100 includes a processor 11 and a security module 12. The security module 12 of electronic device 100 can encrypt the card information of the first NFC card based on a temporary key pair 1 to obtain a first ciphertext. The processor 11 of electronic device 100 can obtain an asset key based on the first account. The processor 11 of electronic device 100 can encrypt the first ciphertext based on the asset key to obtain a second ciphertext. The security module 12 of electronic device 100 can process the second ciphertext based on the temporary key pair 1 to obtain a third ciphertext. The third ciphertext can be decrypted using the asset key to obtain the card information of the first NFC card. Electronic device 100 can send the migration data of the first NFC card to server 300, and the migration data of the first NFC card includes the third ciphertext.
[0440] Electronic device 200 includes processor 14 and security module 15. Upon receiving input indicating the inbound of a first NFC card, electronic device 200 can retrieve the migration data of the first NFC card from server 300. Security module 15 of electronic device 200 can encrypt a third ciphertext based on key 1 to obtain a fourth ciphertext. Processor 14 of electronic device 200 can obtain an asset key based on the first account. Processor 14 of electronic device 200 can process the fourth ciphertext based on the asset key to obtain a fifth ciphertext. Security module 15 of electronic device 200 can decrypt the fifth ciphertext based on key 1 to obtain the card information of the first NFC card. In this way, electronic devices 100 and 200 can use the encryption key to encrypt and decrypt the card information of the first NFC card, protecting the security of the card information.
[0441] In one possible implementation, after receiving input indicating the transfer of the first NFC card, electronic device 100 can search for nearby electronic devices using near-field communication (NFC) technology (e.g., Bluetooth, NFC). After receiving input from a user selecting electronic device 200, electronic device 100 can establish a near-field communication connection with electronic device 200. After establishing this connection, electronic device 100 can send transfer data for the first NFC card to electronic device 200. Electronic device 200 can receive the transfer data and activate the first NFC card based on it. Specifically, the description of electronic device 100 generating the transfer data and electronic device 200 activating the first NFC card based on it can be found in the above embodiments and will not be repeated here. Thus, when electronic device 100 and electronic device 200 are close together, they can transfer the first NFC card at close range.
[0442] Understandably, when the account logged into electronic device 200 is different from the account logged into electronic device 100, after electronic device 200 receives the migration data from the first NFC card, it will fail to decrypt the migration data because the accounts logged into electronic device 200 and electronic device 100 are different.
[0443] Optionally, after establishing a short-range communication connection with electronic device 200, electronic device 100 can obtain information about the account logged in by electronic device 200. Based on the obtained account information, if electronic device 100 determines that the account logged in by electronic device 200 is the same as the account logged in by electronic device 100, it can send the migration data of the first NFC card to electronic device 200 through the short-range communication connection. In this way, electronic device 100 can verify whether the account logged in by electronic device 200 is the same as its own, thus protecting the security of the migration data of the first NFC card.
[0444] Optionally, after receiving input from the user selecting electronic device 200, electronic device 100 may send a request message to electronic device 200 to establish a communication connection. After receiving the request message from electronic device 100, electronic device 200 may display a prompt message asking the user whether to establish a communication connection with electronic device 100. Electronic device 200 may also establish a communication connection with electronic device 100 after receiving input from the user to establish a communication connection with electronic device 100.
[0445] In some examples, electronic device 200 can search for nearby electronic devices based on near-field communication (NFC) technology after receiving input of a first NFC card to be transferred to electronic device 100. Electronic device 200 can also establish a near-field communication connection with electronic device 100 after receiving input from a user selecting electronic device 100. Electronic device 200 can obtain the transfer data of the first NFC card from electronic device 100 through the near-field communication connection and activate the first NFC card based on this transfer data. For example, electronic device 200 can send a request message to electronic device 100 to transfer the first NFC card through the near-field communication connection, and electronic device 100 can send the transfer data of the first NFC card to electronic device 200 after receiving the request message. In this way, electronic device 200 can actively transfer the first NFC card.
[0446] Optionally, after establishing a near-field communication connection with electronic device 100, electronic device 200 can obtain the account information logged in by electronic device 100. If electronic device 200 determines that the accounts logged in by electronic device 100 and electronic device 100 are the same, then electronic device 200 can obtain the migration data of the first NFC card of electronic device 100 through the near-field communication connection. Electronic device 200 can then activate the first NFC card based on the migration data of the first NFC card.
[0447] In some examples, after receiving input indicating that the first NFC card is being migrated, electronic device 100 can display a prompt message suggesting that the user choose to migrate the first NFC card via a server or via Near Field Communication (NFC). Alternatively, after receiving input from the user choosing to migrate the first NFC card via a server, electronic device 100 can migrate the first NFC card through the aforementioned server 300. Or, after receiving input from the user choosing to migrate the first NFC card via NFC, electronic device 100 can establish a NFC connection with electronic device 200 and migrate the first NFC card through that NFC connection. This allows users to choose different migration methods in different scenarios, making it suitable for a wider range of situations.
[0448] In some application scenarios, after receiving input from a user requesting the transfer of specified data from electronic device 100 to electronic device 200, electronic device 100 transmits the specified data to electronic device 200 via near-field communication (NFC) technology. The specified data may include transfer data from one or more NFC cards stored in electronic device 100. The specified data may also include, but is not limited to, contact information stored in electronic device 100, images stored in electronic device 100, and applications installed in electronic device 100, among other things. Electronic device 200 can store the specified data. Based on the received specified data, electronic device 200 can activate one or more NFC cards. This allows users to transfer the specified data from electronic device 100 to electronic device 200 when switching electronic devices, providing convenience for users.
[0449] In some examples, after receiving specified data from a user transferring data from electronic device 100, electronic device 100 can search for nearby electronic devices using near-field communication (NFC) technology. Electronic device 100 can display device options corresponding to the searched electronic devices, which can be used to trigger electronic device 100 to establish a communication connection with the electronic device indicated by the device option. After receiving input from the user selecting a device option for electronic device 200, electronic device 100 can send a request message to electronic device 200 to establish a communication connection. After receiving input from the user to establish a communication connection with electronic device 100, electronic device 200 can establish a communication connection with electronic device 100, through which electronic device 100 can send specified data to electronic device 200. Specifically, please refer to the above embodiments, which will not be repeated here. Thus, the user can use the NFC card transfer method provided in this application to transfer specified data from electronic device 100 to electronic device 200.
[0450] Figure 12 shows a schematic diagram of the hardware structure of an electronic device 100 provided in an embodiment of this application.
[0451] The following description uses electronic device 100 as an example to illustrate the embodiment. It should be understood that the electronic device 100 shown in FIG12 is merely an example, and the electronic device 100 may have more or fewer components than shown in FIG12, may combine two or more components, or may have different component configurations. 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.
[0452] Electronic device 100 may include: processor 110, external memory interface 120, internal memory 121, universal serial bus (USB) interface 130, charging management module 140, power management module 141, battery 142, antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, sensor module 180, button 190, motor 191, indicator 192, camera 193, display screen 194, and subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include one or more of the following: pressure sensor 180A, gyroscope sensor 180B, barometric pressure sensor 180C, magnetic sensor 180D, accelerometer sensor 180E, distance sensor 180F, proximity sensor 180G, fingerprint sensor 180H, temperature sensor 180J, touch sensor 180K, ambient light sensor 180L, bone conduction sensor 180M, etc.
[0453] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0454] Processor 110 may include one or more processing units, such as an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural network processing unit (NPU). Different processing units may be independent devices or integrated into one or more processors. The controller can generate operation control signals based on instruction opcodes and timing signals to control instruction fetching and execution. Processor 110 may also include memory for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. This memory can store instructions or data that processor 110 has just used or is recurring. If processor 110 needs to reuse the instruction or data, it can directly retrieve it from the memory. This avoids repeated access, reduces the waiting time of processor 110, and thus improves system efficiency.
[0455] In some embodiments, the processor 110 may include one or more interfaces. Interfaces may 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.
[0456] It is understood that the interface connection relationships between the modules illustrated in the embodiments of this application are merely illustrative and do not constitute a structural limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may also employ different interface connection methods or combinations of multiple interface connection methods as described in the above embodiments.
[0457] The charging management module 140 receives charging input from the charger. The power management module 141 connects to the battery 142, and the charging management module 140 connects to the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140 to power the processor 110, internal memory 121, external memory, display 194, camera 193, and wireless communication module 160, etc.
[0458] The wireless communication function of electronic device 100 can be implemented through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor, and baseband processor. Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover one or more communication frequency bands. Different antennas can also be multiplexed to improve antenna utilization. For example, antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antennas can be used in conjunction with tuning switches.
[0459] The mobile communication module 150 can provide solutions for wireless communication, including 2G / 3G / 4G / 5G, applied to the electronic device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves via antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to a modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via antenna 1. In some embodiments, at least some functional modules of the mobile communication module 150 may be housed in the processor 110. In some embodiments, at least some functional modules of the mobile communication module 150 and at least some modules of the processor 110 may be housed in the same device.
[0460] The wireless communication module 160 can provide solutions for wireless communication applications on the electronic device 100, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via antenna 2, performs frequency modulation and filtering of the electromagnetic wave signals, and sends the processed signal to processor 110. The wireless communication module 160 can also receive signals to be transmitted from processor 110, perform frequency modulation and amplification, and convert them into electromagnetic waves for radiation via antenna 2.
[0461] In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, enabling electronic device 100 to communicate with networks and other devices via wireless communication technology. The wireless communication technology may 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 technologies, etc. The GNSS may include the Global Positioning System (GPS), the Global Navigation Satellite System (GLONASS), the BeiDou Navigation Satellite System (BDS), the Quasi-Zenith Satellite System (QZSS), and / or satellite-based augmentation systems (SBAS).
[0462] Electronic device 100 implements display functions through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.
[0463] Display screen 194 is used to display images, videos, etc. Display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD). The display panel can also be manufactured using organic light-emitting diodes (OLEDs), active-matrix organic light-emitting diodes (AMOLEDs), flexible light-emitting diodes (FLEDs), miniled, microled, micro-OLEDs, quantum dot light-emitting diodes (QLEDs), etc. In some embodiments, electronic device 100 may include one or N displays 194, where N is a positive integer greater than 1.
[0464] Electronic device 100 can perform shooting functions through ISP, camera 193, video codec, GPU, display 194 and application processor.
[0465] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The internal memory 121 can be used to store computer-executable program code, which includes instructions. The processor 110 executes 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 may include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback, image playback, etc.), etc. The data storage area may store data created during the use of the electronic device 100 (such as audio data, phonebook, etc.). Furthermore, the internal memory 121 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc.
[0466] Electronic device 100 can implement audio functions, such as music playback and recording, through audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, and application processor.
[0467] Pressure sensor 180A is used to sense pressure signals and convert them into electrical signals. Gyroscope sensor 180B can be used to determine the motion posture of electronic device 100. Barometric pressure sensor 180C is used to measure air pressure. Magnetic sensor 180D includes a Hall sensor. Accelerometer sensor 180E can detect the magnitude of acceleration of electronic device 100 in various directions (generally three axes). Distance sensor 180F is used to measure distance. Proximity sensor 180G may include, for example, a light-emitting diode (LED) and a photodetector, such as a photodiode. Ambient light sensor 180L is used to sense ambient light intensity. Fingerprint sensor 180H is used to collect fingerprints. Temperature sensor 180J is used to detect temperature. Touch sensor 180K, also called a "touch panel". Touch sensor 180K can be set on display screen 194, and touch sensor 180K and display screen 194 form a touch screen, also called a "touch screen". Touch sensor 180K is used to detect touch operations applied to or near it. A touch sensor can transmit detected touch operations to an application processor to determine the type of touch event. Visual output related to the touch operation can be provided via display screen 194. In some embodiments, touch sensor 180K may also be located on the surface of electronic device 100, in a different position than display screen 194. Bone conduction sensor 180M can acquire vibration signals. Buttons 190 include a power button, volume buttons, etc. Motor 191 can generate vibration cues. Indicator 192 may be an indicator light, used to indicate charging status, battery level changes, or to indicate messages, missed calls, notifications, etc.
[0468] The SIM card interface 195 is used to connect a SIM card. The SIM card can be inserted into or removed from the SIM card interface 195 to make contact with and separate from the electronic device 100. The electronic device 100 can support one or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, etc. Multiple cards can be inserted into the same SIM card interface 195 simultaneously. The multiple cards can be of the same or different types. The SIM card interface 195 is also compatible with different types of SIM cards. The SIM card interface 195 is also compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to realize functions such as calls 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.
[0469] In some embodiments, the wireless communication module 160 can specifically be used to establish a short-range wireless communication link with other electronic devices (e.g., access control device 600, electronic device 200) so that the two can perform short-range wireless data transmission with each other. Exemplarily, the aforementioned 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 suitable components for enabling proximity-based contactless communication between the electronic device 100 and the access control device 600, thereby providing NFC functionality to the electronic device 100. A description of the NFC module can be found in the embodiment shown in FIG3A above, and will not be repeated here.
[0470] It should be noted that the hardware structure of the electronic device 200 can be described in the embodiment shown in Figure 12, and will not be repeated here.
[0471] The foregoing details the method provided in this application. To facilitate better implementation of the above-described solutions in the embodiments of this application, corresponding apparatus or devices are also provided in the embodiments of this application.
[0472] This application embodiment can divide the electronic device 100 or electronic device 200 into functional modules according to the above method example. For example, each function can be divided into its own functional module, or two or more functions can be integrated into one processing module. The integrated module can be implemented in hardware or as a software functional module. It should be noted that the module division in this application embodiment is illustrative and only represents one logical functional division. In actual implementation, there may be other division methods.
[0473] The communication device of the present application embodiment will now be described in detail with reference to Figures 13 and 14.
[0474] Referring to FIG13, which is a schematic diagram of the structure of a communication device 1300 provided in an embodiment of this application, the communication device 1300 can be the electronic device 100 or electronic device 200 in the above embodiments. Optionally, the communication device 1300 can be a chip / chip system, such as an NFC chip. As shown in FIG13, the communication device 1300 may include a transceiver unit 1310 and a processing unit 1320.
[0475] The transceiver unit 1310 can also be used to perform the sending and receiving functions performed by the electronic device 100 or electronic device 200 in the above embodiments of this application.
[0476] Optionally, the processing unit 1320 can also be used to perform functional steps related to NFC protocol parsing and encapsulation, NFC service processing flow, NFC card migration and display performed by the electronic device 100 or electronic device 200 in the above embodiments of this application.
[0477] It should be understood that the communication device 1300 in this design can perform the method steps performed by the electronic device 100 or electronic device 200 in the foregoing embodiments, and for the sake of brevity, it will not be described again here.
[0478] The above describes the electronic device 100 or electronic device 200 of the embodiments of this application. It should be understood that any product with the functions of the communication device 1300 described in FIG13 above falls within the protection scope of the embodiments of this application.
[0479] Referring to FIG14, which is a schematic diagram of the structure of a communication device 1400 provided in an embodiment of this application, the communication device 1400 can be the server 300 in the above embodiments. As shown in FIG14, the communication device 1400 may include a transceiver unit 1410 and a processing unit 1420.
[0480] Optionally, the transceiver unit 1410 can also be used to perform the functional steps related to NFC card migration data transmission and reception performed by the server 300 in the above embodiments of this application.
[0481] Optionally, the processing unit 1420 can also be used to execute the functional steps related to the NFC card transfer-in and transfer-out processing flow executed by the server 300 in the above embodiments of this application.
[0482] It should be understood that the communication device 1400 in this design can perform the method steps executed by the server 300 in the aforementioned embodiment, and for the sake of brevity, it will not be described again here.
[0483] The above describes the electronic device 100, electronic device 200, and server 300 of the embodiments of this application. It should be understood that any product with the functions of the electronic device 100 and / or electronic device 200 described in FIG14 above, and any product with the functions of the server 300 described in FIG14 above, falls within the protection scope of the embodiments of this application.
[0484] 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.
[0485] Referring to Figure 15, Figure 15 is a structural schematic diagram 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. As shown in Figure 15, 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, etc. For example, it can be a central processing unit and / or an NFC controller, etc. The transceiver 1502 can be referred to as a transceiver unit, transceiver, or transceiver circuit, etc., and is used to implement transceiver functions. The transceiver 1502 can include a receiver and a transmitter. The receiver can be referred to as a receiver or receiving circuit, etc., and is used to implement a receiving function, such as an NFC receiving function; the transmitter can be referred to as a transmitter or transmitting circuit, etc., and 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 (not shown in FIG. 15), such as an NFC antenna, wherein the NFC antenna may be a coil-type antenna. The antenna 1503 and / or the radio frequency unit may be located inside the communication device 1500 or may be separate from the communication device 1500, that is, the antenna 1503 and / or the radio frequency unit may be remotely or distributedly deployed.
[0486] 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.
[0487] The processor 1501, transceiver 1502, and memory 1504 can be connected via a communication bus.
[0488] In one design, the communication device 1500 can be used to perform the functions of the electronic device 100 in the foregoing embodiments: the processor 1501 can be used to perform the functional steps related to NFC protocol parsing and encapsulation, NFC service processing flow, NFC card migration flow and display performed by the electronic device 100 in the foregoing embodiments of this application and / or other processes used in the technology described herein; the transceiver 1502 can be used to perform the functional steps related to sending and receiving performed by the electronic device 100 in the foregoing embodiments of this application and / or other processes used in the technology described herein.
[0489] In any of the above designs, the processor 1501 may include a transceiver for implementing receive and transmit functions. For example, the transceiver may be a transceiver circuit, an interface, or an interface circuit. The transceiver circuit, interface, or interface circuit for implementing receive and transmit functions may be separate or integrated. The aforementioned transceiver circuit, interface, or interface circuit may be used for reading and writing code / data, or it may be used for transmitting or relaying signals.
[0490] In any of the above designs, the processor 1501 may store instructions, which may be computer programs. These computer programs, running on the processor 1501, cause the communication device 1500 to execute the method steps performed by the electronic device 100 in the above embodiments of this application. The computer program may be embedded in the processor 1501; in this case, the processor 1501 may be implemented in hardware.
[0491] In one implementation, the communication device 1500 may include circuitry capable of performing the functions of transmitting, receiving, or communicating as described in the foregoing method embodiments. The processor and transceiver described in this application can be implemented on integrated circuits (ICs), analog ICs, radio frequency integrated circuits (RFICs), mixed-signal ICs, application-specific integrated circuits (ASICs), printed circuit boards (PCBs), electronic devices, etc. The processor and transceiver can also be manufactured using various IC process technologies, such as complementary metal-oxide-semiconductor (CMOS), n-metal-oxide-semiconductor (NMOS), p-type metal-oxide-semiconductor (PMOS), bipolar junction transistors (BJTs), bipolar CMOS (BiCMOS), silicon-germanium (SiGe), gallium arsenide (GaAs), etc.
[0492] The scope of the communication device described in this application is not limited thereto, and the structure of the communication device is not limited to that shown in Figure 15. The communication device 1500 can be a standalone device or part of a larger device. For example, the communication device 1500 can be:
[0493] (1) A standalone integrated circuit IC, or chip, or chip system or subsystem; (2) A collection of one or more ICs, optionally including storage components for storing data or computer programs; (3) An ASIC, such as an NFC chip; (4) A module that can be embedded in other devices; (5) A receiver, terminal, smart terminal, cellular phone, wireless device, handheld device, mobile unit, vehicle device, network device, cloud device, artificial intelligence device, etc.; (6) Others, etc.
[0494] As one possible product form, the server 300 described in this application embodiment can be implemented using a general bus architecture.
[0495] Referring to Figure 16, which is a schematic diagram of the structure of a communication device 1600 provided in an embodiment of this application, the communication device 1600 may be a server 300, or a device therein. As shown in Figure 16, the communication device 1600 includes a processor 1601 and a transceiver 1602 internally connected and communicating with the processor 1601. The processor 1601 may be a general-purpose processor or a dedicated processor, etc. The transceiver 1602 may be referred to as a transceiver unit, transceiver, or transceiver circuit, etc., and is used to implement transceiver functions. The transceiver 1602 may include a receiver and a transmitter. The receiver may be referred to as a receiver or receiving circuit, etc., and is used to implement a receiving function; the transmitter may be referred to as a transmitter or transmitting circuit, etc., and is used to implement a transmitting function.
[0496] The communication device 1600 may include one or more memories 1603, which may store instructions, which may be computer programs, that can be executed on the communication device 1600 to cause the communication device 1600 to perform the method steps described in the above embodiments of this application. The memories 1603 may also store data (e.g., migration data of an NFC card). The communication device 1600 and the memories 1603 may be provided separately or integrated together.
[0497] The processor 1601, transceiver 1602, and memory 1603 can be connected via a communication bus.
[0498] In one design, the communication device 1600 can be used to perform the functions of the server 300 in the foregoing embodiments: the processor 1601 can be used to perform the functional steps related to the NFC card migration process performed by the server 300 in the embodiment shown in FIG16 and / or other processes used in the technology described herein; the transceiver 1602 can be used to perform the functional steps related to NFC card migration data transmission and reception performed by the server 300 in the embodiment shown in FIG16 and / or other processes used in the technology described herein.
[0499] In any of the above designs, the processor 1601 may include a transceiver for implementing receive and transmit functions. For example, the transceiver may be a transceiver circuit, an interface, or an interface circuit. The transceiver circuit, interface, or interface circuit for implementing receive and transmit functions may be separate or integrated. The aforementioned transceiver circuit, interface, or interface circuit may be used for reading and writing code / data, or it may be used for transmitting or relaying signals.
[0500] In any of the above designs, the processor 1601 may store instructions, which may be computer programs. These computer programs, running on the processor 1601, cause the communication device 1600 to execute the method steps performed by the server 300 in the above method embodiments. The computer program may be embedded in the processor 1601; in this case, the processor 1601 may be implemented in hardware.
[0501] This application also provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it can implement the steps performed by the electronic device 100 or the electronic device 200 in the above-described method embodiments.
[0502] This application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, can implement the steps performed by the server 300 in the above-described method embodiments.
[0503] This application also provides a computer program product, including a computing program, which, when run on a computer, enables the computer to perform the steps executed by the electronic device 100 or electronic device 200 in the above-described method embodiments.
[0504] This application also provides a computer program product, including a computing program, which, when run on a computer, enables the computer to perform the steps executed by the server 300 in the above-described method embodiments.
[0505] This application also provides a chip system, which includes a processing circuit and an interface circuit. The interface circuit receives code instructions and transmits them to the processing circuit. The processing circuit executes the code instructions to enable the chip system to perform the steps executed by electronic device 100 or electronic device 200 in any method embodiment of this application. The chip system can be a single chip or a chip module composed of multiple chips.
[0506] This application also provides a chip system, which includes a processing circuit interface circuit. The interface circuit receives code instructions and transmits them to the processing circuit. The processing circuit executes the code instructions to enable the chip system to perform the steps executed by the server 300 in any method embodiment of this application. The chip system can be a single chip or a chip module composed of multiple chips.
[0507] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit it. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
Claims
A near field communication (NFC) card migration method, characterized in that, 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. 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. 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. The method according to any one of claims 1-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. The method according to claim 4, characterized in that 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. The method according to claim 5, characterized in that 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. 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. 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. The method according to any one of claims 1-3, characterized in that The method further includes: The first electronic device generates the encryption key based on account information of the first account. The method according to any one of claims 1-3, characterized in that 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. 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. 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. 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. A near field communication (NFC) card migration method, characterized in that, 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. 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. 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. The method according to any one of claims 14-16, characterized in that 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. 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. 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. The method according to any one of claims 17-19, characterized in that 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. 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. The method according to any one of claims 14-16, characterized in that The method further comprises: The second electronic device generates the encryption key based on the account information of the first account. The method according to any one of claims 14-16, characterized in that 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. 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. 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. The method according to any one of claims 14-25, characterized in that 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. The method according to any one of claims 14-25, characterized in that 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. An electronic device, characterized by 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. An electronic device, characterized by 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. A computer-readable storage medium, characterized by 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. A computer-readable storage medium, characterized by, 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. A computer program product, characterized by 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. A computer program product, characterized 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. 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. 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
Virtual machine migration method and system, terminal and storage medium
CN110708154A
Migration method, migration device, electronic equipment and storage medium
CN112511646A
Task migration system and method
US20240086231A1